- properly terminate LaTeX macros (reported in bug 6959).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35746
a592a061-630c-0410-9148-
cb99ea01b6c8
docstring uncodable;
for (size_t n = 0; n < command.size(); ++n) {
try {
- result += runparams.encoding->latexChar(command[n]);
+ char_type const c = command[n];
+ docstring const latex = runparams.encoding->latexChar(c);
+ result += latex;
+ if (latex.length() > 1 && latex[latex.length() - 1] != '}') {
+ // Prevent eating of a following
+ // space or command corruption by
+ // following characters
+ result += "{}";
+ }
} catch (EncodingException & /* e */) {
LYXERR0("Uncodable character in command inset!");
if (runparams.dryrun) {