]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathString.cpp
Natbib authoryear uses (Ref1; Ref2) by default.
[lyx.git] / src / mathed / InsetMathString.cpp
index af9bc980fc0ecc8324de6f26e1c66a339abc67eb..53aba589899135ca2131cb21841f310af8c56422 100644 (file)
@@ -91,10 +91,10 @@ void InsetMathString::octave(OctaveStream & os) const
 }
 
 
-void InsetMathString::mathmlize(MathStream & /*os*/) const
+void InsetMathString::mathmlize(MathStream &) const
 {
        // useless, no doubt, but we should not be here
-       LASSERT(false, /* */);
+       LATTEST(false);
 }
 
 
@@ -120,7 +120,7 @@ void InsetMathString::write(WriteStream & os) const
                docstring command(1, c);
                try {
                        bool termination = false;
-                       if (c < 0x80 ||
+                       if (isASCII(c) ||
                            Encodings::latexMathChar(c, mathmode, os.encoding(), command, termination)) {
                                if (os.textMode()) {
                                        if (in_forced_mode) {
@@ -129,12 +129,12 @@ void InsetMathString::write(WriteStream & os) const
                                                os.textMode(false);
                                                in_forced_mode = false;
                                        }
-                                       if (c >= 0x80 && os.textMode()) {
+                                       if (!isASCII(c) && os.textMode()) {
                                                os << "\\ensuremath{";
                                                os.textMode(false);
                                                in_forced_mode = true;
                                        }
-                               } else if (c < 0x80 && in_forced_mode) {
+                               } else if (isASCII(c) && in_forced_mode) {
                                        // we were inside \ensuremath
                                        os << '}';
                                        os.textMode(true);
@@ -156,7 +156,7 @@ void InsetMathString::write(WriteStream & os) const
                        // and the last char is ASCII.
                        if (termination)
                                os.pendingSpace(true);
-               } catch (EncodingException & e) {
+               } catch (EncodingException const & e) {
                        switch (os.output()) {
                        case WriteStream::wsDryrun: {
                                os << "<" << _("LyX Warning: ")