]> git.lyx.org Git - features.git/commitdiff
fix bug 2234
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 16 Mar 2006 15:05:47 +0000 (15:05 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Thu, 16 Mar 2006 15:05:47 +0000 (15:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13399 a592a061-630c-0410-9148-cb99ea01b6c8

lib/ChangeLog
lib/symbols
src/mathed/ChangeLog
src/mathed/math_parser.C
src/tex2lyx/ChangeLog
src/tex2lyx/math.C

index bea669ea8cb9a62c6214083730468d7efbae4218..771fea0db9bd57df2ee486cee12862b5cdf7d286 100644 (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
index 41f6b2ac0d7c6511042ff675266faedfd1d86ce8..4bc306d62f86e280fb996f0ea64bfef8a1bc4911 100644 (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
index 2a8defab0285c4499a5ed8c4a86ce32d895f56eb..ebbccdb6ae259c08a423cb8c7433cac59ac2a1c9 100644 (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
index be12a451e55004f885095806144fecdb5eb445cc..275c9ee4974d689e589ff611e408d4ea99d3cc92 100644 (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;
index f4fb4db02c2fd0aa8ce4cc6a15c5ae3682cbc7d3..eb9ac40e53a7fba65cf3ed3e3bb3a46c843c780b 100644 (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
index 7a883d928b21a4b814289c6ce53c84af822d86af..b4fcfd88c94eb43792bb7ebbb7640e44490eea6e 100644 (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);