-#ifndef NO_LATEX
- if (orgfont.latex() != latex()) {
- // This is only for backwards compatibility
- switch (latex()) {
- case OFF: os << "\\latex no_latex \n"; break;
- case ON: os << "\\latex latex \n"; break;
- case TOGGLE: lyxerr << "LyXFont::lyxWriteFontChanges: "
- "TOGGLE should not appear here!"
- << endl;
- break;
- case INHERIT: os << "\\latex default \n"; break;
- case IGNORE: lyxerr << "LyXFont::lyxWriteFontChanges: "
- "IGNORE should not appear here!"
- << endl;
- break;
- }
- }
-#endif
- if (orgfont.color() != color()) {
- // To make us file compatible with older
- // lyx versions we emit "default" instead
- // of "inherit"
- string col_str(lcolor.getLyXName(color()));
- if (col_str == "inherit") col_str = "default";
- os << "\\color " << col_str << "\n";
- }
- if (orgfont.language() != language()) {
- if (language() == inherit_language)
- os << "\\lang " << doclang->lang() << "\n";
- else if (language())
+ if (orgfont.color() != color())
+ os << "\\color " << lcolor.getLyXName(color()) << '\n';
+ if (orgfont.language() != language() &&
+ language() != latex_language) {
+ if (language())