Use context-sensitive command termination

This fixes some kerning issues.
This commit is contained in:
Juergen Spitzmueller 2016-12-16 09:26:01 +01:00
parent c37fde6559
commit d8df5397ca

View File

@ -369,22 +369,23 @@ void InsetSpecialChar::latex(otexstream & os,
os << "\\-"; os << "\\-";
break; break;
case LIGATURE_BREAK: case LIGATURE_BREAK:
os << "\\textcompwordmark{}"; os << "\\textcompwordmark" << termcmd;
break; break;
case END_OF_SENTENCE: case END_OF_SENTENCE:
os << "\\@."; os << "\\@.";
break; break;
case LDOTS: case LDOTS:
os << "\\ldots{}"; os << "\\ldots" << termcmd;
break; break;
case MENU_SEPARATOR: case MENU_SEPARATOR:
if (rp.local_font->isRightToLeft()) if (rp.local_font->isRightToLeft())
os << "\\lyxarrow*{}"; os << "\\lyxarrow*";
else else
os << "\\lyxarrow{}"; os << "\\lyxarrow";
os << termcmd;
break; break;
case SLASH: case SLASH:
os << "\\slash{}"; os << "\\slash" << termcmd;
break; break;
case NOBREAKDASH: case NOBREAKDASH:
if (rp.moving_arg) if (rp.moving_arg)
@ -394,22 +395,22 @@ void InsetSpecialChar::latex(otexstream & os,
case PHRASE_LYX: case PHRASE_LYX:
if (rp.moving_arg) if (rp.moving_arg)
os << "\\protect"; os << "\\protect";
os << "\\LyX{}"; os << "\\LyX" << termcmd;
break; break;
case PHRASE_TEX: case PHRASE_TEX:
if (rp.moving_arg) if (rp.moving_arg)
os << "\\protect"; os << "\\protect";
os << "\\TeX{}"; os << "\\TeX" << termcmd;
break; break;
case PHRASE_LATEX2E: case PHRASE_LATEX2E:
if (rp.moving_arg) if (rp.moving_arg)
os << "\\protect"; os << "\\protect";
os << "\\LaTeXe{}"; os << "\\LaTeXe" << termcmd;
break; break;
case PHRASE_LATEX: case PHRASE_LATEX:
if (rp.moving_arg) if (rp.moving_arg)
os << "\\protect"; os << "\\protect";
os << "\\LaTeX{}"; os << "\\LaTeX" << termcmd;
break; break;
} }
} }