Font.cpp: fix bug #8424

We must group the content which should be changed in size wit a pair of braces because the LaTeX size commands are otherwise switches. We already do so for many case, but not for the case that a size command is inside another command. This patch adds now always a brace pair around the selected text which is the safest method.
This commit is contained in:
Uwe Stöhr 2012-11-19 01:13:37 +01:00
parent 6bdc561714
commit 63295f9dc5

View File

@ -332,7 +332,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
}
}
// When the current language is Hebrew, Arabic, or Farsi
// If the current language is Hebrew, Arabic, or Farsi
// the numbers are written Left-to-Right. ArabTeX package
// reorders the number automatically but the packages used
// for Hebrew and Farsi (Arabi) do not.
@ -428,7 +428,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
}
os << '\\'
<< LaTeXSizeNames[f.size()]
<< ' ';
<< '{';
count += strlen(LaTeXSizeNames[f.size()]) + 2;
}
return count;
@ -513,6 +513,8 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams,
os << '}';
++count;
}
os << '}';
++count;
}
// When the current language is Hebrew, Arabic, or Farsi