// the encoding supports the combination
os << latex2 << latex1;
return latex1.length() + latex2.length();
- } else if (runparams.local_font->language()->lang() == "polutonikogreek") {
+ } else if (runparams.local_font &&
+ runparams.local_font->language()->lang() == "polutonikogreek") {
// polutonikogreek only works without the brackets
os << latex1 << latex2;
return latex1.length() + latex2.length();
for (pos_type i = 0; i <= size(); ++i) {
Change const change = lookupChange(i);
- Changes::lyxMarkChange(os, column, running_change, change);
+ Changes::lyxMarkChange(os, bparams, column, running_change, change);
running_change = change;
if (i == size())
running_font = font;
open_font = true;
docstring fontchange = ods.str();
+ // check whether the fontchange ends with a \\textcolor
+ // modifier and the text starts with a space (bug 4473)
+ docstring const last_modifier = rsplit(fontchange, '\\');
+ if (prefixIs(last_modifier, from_ascii("textcolor")) && c == ' ')
+ os << fontchange << from_ascii("{}");
// check if the fontchange ends with a trailing blank
// (like "\small " (see bug 3382)
- if (suffixIs(fontchange, ' ') && c == ' ')
+ else if (suffixIs(fontchange, ' ') && c == ' ')
os << fontchange.substr(0, fontchange.size() - 1)
<< from_ascii("{}");
else