]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Try to be more pedantic wrt blank lines in lyx2lyx output
[lyx.git] / src / Font.cpp
index 514bf03725fc40f6b3584b6920bab9eabeade35b..cd741d1239df86ba143c092427021f44be54e61b 100644 (file)
@@ -336,11 +336,18 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
        p.reduce(prev.bits_);
 
        if (f.size() != INHERIT_SIZE) {
-               os << '{';
-               ++count;
-               os << '\\'
-                  << LaTeXSizeSwitchNames[f.size()] << termcmd;
-               count += strlen(LaTeXSizeSwitchNames[f.size()]) + 1;
+               if (!runparams.find_effective()) {
+                       os << '{';
+                       ++count;
+                       os << '\\'
+                          << LaTeXSizeSwitchNames[f.size()] << termcmd;
+                       count += strlen(LaTeXSizeSwitchNames[f.size()]) + 1;
+               }
+               else {
+                       os << '\\'
+                          << LaTeXSizeSwitchNames[f.size()] << '{';
+                       count += strlen(LaTeXSizeSwitchNames[f.size()]) + 2;
+               }
        }
        if (f.family() != INHERIT_FAMILY) {
                if (non_inherit_inset) {