]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Fix broken layout file syntax
[lyx.git] / src / Font.cpp
index 2c99584f07d93e979bec4a1f5cd73a61a337d068..6e7ab347337476df893c3ea763d7071891cad364 100644 (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
@@ -703,7 +705,7 @@ void Font::validate(LaTeXFeatures & features) const
        // FIXME: Do something for background and soul package?
 
        if (((features.usePolyglossia() && lang_->polyglossia() != doc_language->polyglossia())
-            || (features.useBabel() && lang_->babel() != doc_language->babel()))
+            || (features.useBabel(true) && lang_->babel() != doc_language->babel()))
            && lang_ != ignore_language
            && lang_ != latex_language)
        {