]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Allow using \binom without amsmath and add support for \brace and \brack
[lyx.git] / src / Font.cpp
index d3dd3bbc2ab0ed462a6c03b74262d9b3640fad2e..94549dac3938fa4ff0d6c301a137bea6468bb783 100644 (file)
@@ -31,6 +31,8 @@
 #include "support/gettext.h"
 #include "support/lstrings.h"
 
+#include <cstring>
+
 using namespace std;
 using namespace lyx::support;
 
@@ -450,8 +452,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
 
        if (language()->encoding()->package() == Encoding::CJK) {
                pair<bool, int> const c = switchEncoding(os, bparams,
-                               runparams, *(runparams.encoding),
-                               *(language()->encoding()));
+                               runparams, *(language()->encoding()));
                if (c.first) {
                        open_encoding_ = true;
                        count += c.second;
@@ -619,10 +620,9 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
        if (open_encoding_) {
                // We need to close the encoding even if it does not change
                // to do correct environment nesting
-               Encoding const * const ascii = encodings.getFromLyXName("ascii");
+               Encoding const * const ascii = encodings.fromLyXName("ascii");
                pair<bool, int> const c = switchEncoding(os, bparams,
-                               runparams, *(runparams.encoding),
-                               *ascii);
+                               runparams, *ascii);
                BOOST_ASSERT(c.first);
                count += c.second;
                runparams.encoding = ascii;
@@ -755,7 +755,7 @@ void Font::validate(LaTeXFeatures & features) const
                        // probably we should put here all interface colors used for
                        // font displaying! For now I just add this ones I know of (Jug)
                case Color_latex:
-               case Color_note:
+               case Color_notelabel:
                        break;
                default:
                        features.require("color");