X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftex2lyx%2Fmath.C;h=ea3cc9d4e03374e0718bf74127466452b611aa73;hb=d68ec289063394f24296ee098f5113e9242f2b0b;hp=5e84b5d50dc23f25d6a45a2b92ada7720e3b73a8;hpb=33f19b9ccc91bb9d9cb3cea38cafd14975bdd9f0;p=lyx.git diff --git a/src/tex2lyx/math.C b/src/tex2lyx/math.C index 5e84b5d50d..ea3cc9d4e0 100644 --- a/src/tex2lyx/math.C +++ b/src/tex2lyx/math.C @@ -100,7 +100,6 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode) } else if (t.cat() == catLetter || - t.cat() == catSpace || t.cat() == catSuper || t.cat() == catSub || t.cat() == catOther || @@ -109,15 +108,6 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode) t.cat() == catParameter) os << t.character(); - else if (t.cat() == catNewline) { - //if (p.next_token().cat() == catNewline) { - // p.get_token(); - // handle_par(os); - //} else { - os << "\n "; // note the space - //} - } - else if (t.cat() == catBegin) { os << '{'; parse_math(p, os, FLAG_BRACE_LAST, mode); @@ -130,8 +120,13 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode) os << "unexpected '}' in math\n"; } - else if (t.cat() == catComment) - handle_comment(p); + else if (t.cat() == catComment) { + if (!t.cs().empty()) + cerr << "Ignoring comment: " << t.asInput(); + else + // "%\n" combination + p.skip_spaces(); + } // // control sequences