From: Georg Baum Date: Fri, 23 Jul 2004 18:47:57 +0000 (+0000) Subject: handle \cr in math arrays and tables X-Git-Tag: 1.6.10~15148 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1a9a77b07453688232a37bead0e0054a3fda8273;p=features.git handle \cr in math arrays and tables git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8846 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/tex2lyx/ChangeLog b/src/tex2lyx/ChangeLog index ae984a25d9..abc8f1e42a 100644 --- a/src/tex2lyx/ChangeLog +++ b/src/tex2lyx/ChangeLog @@ -1,3 +1,8 @@ +2004-07-23 Georg Baum + + * math.C (parse_math): change tex "\\cr" line ending to "\\\\" + * table.C (parse_table): recognize tex "\\cr" line ending + 2004-06-28 Georg Baum * math.C, preamble.C, tex2lyx.[Ch], text.C: const fixes diff --git a/src/tex2lyx/math.C b/src/tex2lyx/math.C index b9458e07ef..eb57b1b822 100644 --- a/src/tex2lyx/math.C +++ b/src/tex2lyx/math.C @@ -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(); diff --git a/src/tex2lyx/table.C b/src/tex2lyx/table.C index 18579870d5..05e1122c52 100644 --- a/src/tex2lyx/table.C +++ b/src/tex2lyx/table.C @@ -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;