]> git.lyx.org Git - features.git/commitdiff
handle \cr in math arrays and tables
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 23 Jul 2004 18:47:57 +0000 (18:47 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Fri, 23 Jul 2004 18:47:57 +0000 (18:47 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8846 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/ChangeLog
src/tex2lyx/math.C
src/tex2lyx/table.C

index ae984a25d9859bda4c9b457cf736eb2767afc70a..abc8f1e42a2dedb68cf7e988d41046d41b231be5 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-23  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * math.C (parse_math): change tex "\\cr" line ending to "\\\\"
+       * table.C (parse_table): recognize tex "\\cr" line ending
+
 2004-06-28  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * math.C, preamble.C, tex2lyx.[Ch], text.C: const fixes
index b9458e07efe17e69d226ef4a04d0714f7189d65c..eb57b1b822b53117c96b9a90aa47f4a063690445 100644 (file)
@@ -216,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();
 
index 18579870d571f05ee8dc69acb54260155df8121e..05e1122c52cd2cf568cb138f864f1e5e9e0d208a 100644 (file)
@@ -220,7 +220,11 @@ void parse_table(Parser & p, ostream & os, unsigned flags)
                        p.skip_spaces();
                }
 
-               else if (t.cs() == "tabularnewline" || t.cs() == "\\") {
+               else if (t.cs() == "tabularnewline" || t.cs() == "\\" ||
+                        t.cs() == "cr") {
+                       if (t.cs() == "cr")
+                               cerr << "Warning: Converting TeX '\\cr' to LaTeX '\\\\'."
+                                    << endl;
                        // stuff before the line break
                        // and look ahead for stuff after the line break
                        os << HLINE << hlines << HLINE << LINE << read_hlines(p) << HLINE;