handle \cr in math arrays and tables

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8846 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2004-07-23 18:47:57 +00:00
parent 49d79cba04
commit 1a9a77b074
3 changed files with 17 additions and 1 deletions

View 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

View 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();

View 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;