]> git.lyx.org Git - features.git/blobdiff - src/Font.cpp
Correctly generate latex for font/language/encoding switches inside and around
[features.git] / src / Font.cpp
index 0ba7aeb1abf330cbae277f0f3ab8aed34774e5a4..b0073ebeb8e109883e94008664b42dc74f8a70c8 100644 (file)
@@ -876,7 +876,8 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
 int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
                                  OutputParams const & runparams,
                                  Font const & base,
-                                 Font const & next) const
+                                 Font const & next,
+                                 bool const & closeLanguage) const
 {
        int count = 0;
        bool env = false;
@@ -955,7 +956,8 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
                open_encoding_ = false;
        }
 
-       if (language() != base.language() && language() != next.language()) {
+       if (closeLanguage &&
+                       language() != base.language() && language() != next.language()) {
                os << '}';
                ++count;
        }