+2003-05-17 Joao Luis M. Assirati <assirati@fma.if.usp.br>
+
+ * texparser.C: fix paragraph parsing after comment
2003-04-29 André Pönitz <poenitz@gmx.net>
bool is_math_env(string const & name)
{
static char const * known_math_envs[] = { "equation", "equation*",
- "eqnarray", "eqnarray*", "align", "align*", 0};
+ "eqnarray", "eqnarray*", "align", "align*", "gather", "gather*",
+ "multline", "multline*", 0};
for (char const ** what = known_math_envs; *what; ++what)
if (*what == name)
string Parser::getOpt()
{
- string res = getArg('[', ']');
+ string const res = getArg('[', ']');
return res.size() ? '[' + res + ']' : string();
}
break;
}
-/*
case catComment: {
+ push_back(Token(c, catComment));
while (is.get(c) && catcode(c) != catNewline)
- ;
+ push_back(Token(c, catLetter));
+ push_back(Token(c, catNewline));
++lineno_;
+ is.get(c);
+ if (catcode(c) == catNewline) {
+ push_back(Token("par"));
+ ++lineno_;
+ } else {
+ is.putback(c);
+ }
break;
}
-*/
case catEscape: {
is.get(c);
return;
os << "\n\\layout ";
string s = active_environment();
- if (s == "document" || s == "table" || s == "center")
+ if (s == "document" || s == "table")
os << "Standard\n\n";
+ else if (s == "center")
+ os << "Standard\n\n\\align center\n";
else if (s == "lyxcode")
os << "LyX-Code\n\n";
else if (s == "lyxlist")
parse_text(p, os, FLAG_END, outer);
end_inset(os);
} else if (name == "center") {
- active_environments.pop_back();
- handle_par(os);
- active_environments.push_back(name);
- os << "\\align center\n";
+ handle_par(os);
parse_text(p, os, FLAG_END, outer);
} else if (name == "enumerate" || name == "itemize"
|| name == "lyxlist") {