fix bug 2234

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13399 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-03-16 15:05:47 +00:00
parent 08604e3519
commit fad5cd6700
6 changed files with 34 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2006-03-14 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* symbols: Add \tag and \tag*
2006-03-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* symbols: Comment out unused insets

View File

@ -122,6 +122,8 @@ underset underset none
overset overset none
#protect protect none
mbox mbox forcetext
tag mbox forcetext
tag* mbox forcetext
#newcommand newcommand none
#label label none
#left left none

View File

@ -1,3 +1,7 @@
2006-03-14 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math_parser.C (parse1): Parse \tag and \tag* correctly
2006-03-14 Martin Vermeer <martin.vermeer@hut.fi>
* math_data.C (x2pos): Fix to bug 2325: Mouse click to right of last

View File

@ -1260,6 +1260,15 @@ void Parser::parse1(MathGridInset & grid, unsigned flags,
parse(cell->back().nucleus()->cell(2), FLAG_ITEM, MathInset::TEXT_MODE);
}
else if (t.cs() == "tag") {
if (nextToken().character() == '*') {
getToken();
cell->push_back(createMathInset(t.cs() + '*'));
} else
cell->push_back(createMathInset(t.cs()));
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, MathInset::TEXT_MODE);
}
#if 0
else if (t.cs() == "infer") {
MathArray ar;

View File

@ -1,3 +1,7 @@
2006-03-13 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* math.C (parse_math): Parse \tag and \tag* correctly
2006-03-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
* text.C (parse_text): Handle \verb

View File

@ -185,6 +185,17 @@ void parse_math(Parser & p, ostream & os, unsigned flags, const mode_type mode)
os << '}';
}
else if (t.cs() == "tag") {
os << '\\' << t.cs();
if (p.next_token().asInput() == "*") {
p.get_token();
os << '*';
}
os << '{';
parse_math(p, os, FLAG_ITEM, MATHTEXT_MODE);
os << '}';
}
else if (t.cs() == "mbox" || t.cs() == "fbox") {
os << "\\" << t.cs() << '{';
parse_math(p, os, FLAG_ITEM, MATHTEXT_MODE);