]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
Allow using \binom without amsmath and add support for \brace and \brack
[lyx.git] / src / output_latex.cpp
index ea4418fe0a5ad7e7e79746d084fba11c904dc03e..5706a4456d5e0b8bc9b6d88b3c1584906cc6104b 100644 (file)
@@ -699,16 +699,12 @@ TeXOnePar(Buffer const & buf,
        }
 
        // If this is the last paragraph, and a local_font was set upon entering
-       // the inset, the encoding should be set back to that local_font's 
-       // encoding. We don't use switchEncoding(), because no explicit encoding
-       // switch command is needed, since latex will automatically revert to it
-       // when this inset closes.
-       // This switch is only necessary if we're using "auto" or "default" 
-       // encoding. 
-       if (nextpit == paragraphs.end() && runparams_in.local_font != 0) {
+       // the inset, and we're using "auto" or "default" encoding, the encoding
+       // should be set back to that local_font's encoding.
+       if (nextpit == paragraphs.end() && runparams_in.local_font != 0
+           && (bparams.inputenc == "auto" || bparams.inputenc == "default")) {
                runparams_in.encoding = runparams_in.local_font->language()->encoding();
-               if (bparams.inputenc == "auto" || bparams.inputenc == "default")
-                       os << setEncoding(runparams_in.encoding->iconvName());
+               os << setEncoding(runparams_in.encoding->iconvName());
 
        }
        // Otherwise, the current encoding should be set for the next paragraph.