]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/math.C
Really fix start_of_appendix output
[lyx.git] / src / tex2lyx / math.C
index ea3cc9d4e03374e0718bf74127466452b611aa73..eb57b1b822b53117c96b9a90aa47f4a063690445 100644 (file)
@@ -25,14 +25,15 @@ using std::string;
 
 bool is_math_env(string const & name)
 {
-       static char const * known_math_envs[] = { "equation", "equation*",
-       "eqnarray", "eqnarray*", "align", "align*", "gather", "gather*",
-       "multline", "multline*", "math", "displaymath", "flalign", "flalign*",
+       static char const * const known_math_envs[] = { "equation",
+       "equation*", "eqnarray", "eqnarray*", "align", "align*", "gather",
+       "gather*", "multline", "multline*", "math", "displaymath", "flalign",
+       "flalign*",
        // These require extra args
        "alignat", "alignat*", "xalignat", "xalignat*", "xxalignat",
        0};
 
-       for (char const ** what = known_math_envs; *what; ++what)
+       for (char const * const * what = known_math_envs; *what; ++what)
                if (*what == name)
                        return true;
        return false;
@@ -215,6 +216,13 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
                else if (t.cs() == "ss")
                        os << "ß";
 
+               else if (t.cs() == "cr") {
+                       // lyx can't handle \\cr
+                       cerr << "Warning: Converting TeX '\\cr' to LaTeX '\\\\'."
+                            << endl;
+                       os << "\\\\";
+               }
+
                else
                        os << t.asInput();