mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Joao's patches
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6976 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ff98dcea08
commit
c9095d82d5
@ -1,3 +1,6 @@
|
||||
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>
|
||||
|
||||
|
@ -21,7 +21,8 @@ using std::vector;
|
||||
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)
|
||||
|
@ -218,7 +218,7 @@ string Parser::getArg(char left, char right)
|
||||
|
||||
string Parser::getOpt()
|
||||
{
|
||||
string res = getArg('[', ']');
|
||||
string const res = getArg('[', ']');
|
||||
return res.size() ? '[' + res + ']' : string();
|
||||
}
|
||||
|
||||
@ -252,14 +252,21 @@ void Parser::tokenize(istream & is)
|
||||
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);
|
||||
|
@ -113,8 +113,10 @@ void handle_par(ostream & os)
|
||||
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")
|
||||
@ -285,10 +287,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer)
|
||||
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";
|
||||
parse_text(p, os, FLAG_END, outer);
|
||||
} else if (name == "enumerate" || name == "itemize"
|
||||
|| name == "lyxlist") {
|
||||
|
Loading…
Reference in New Issue
Block a user