fix bug 2234

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13400 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-03-16 15:11:03 +00:00
parent 3b7e21a013
commit 2aacaaede1
7 changed files with 36 additions and 0 deletions

View File

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

View File

@ -120,6 +120,8 @@ overset overset none
parbox parbox 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-13 Martin Vermeer <martin.vermeer@hut.fi>
* math_data.C (x2pos): Mouse click to right of last nestinset in a

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

View File

@ -33,6 +33,8 @@ What's new
- Truncate temporary file names that are too long for MikTeX's pdflatex
- Parse \tag and \tag* commands correctly in tex2lyx and mathed (bug 2234).
* User Interface:
- Convert line endings for external copy/paste on OS X (bug 1955).