See http://bugzilla.lyx.org/show_bug.cgi?id=2234 and
http://bugzilla.lyx.org/show_bug.cgi?id=2236. The patches have been tested
by Enrico. OK to commit to both 1.4 and 1.5?


Georg
Index: src/tex2lyx/ChangeLog
===================================================================
--- src/tex2lyx/ChangeLog	(Revision 13316)
+++ src/tex2lyx/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@
+2006-03-10  Georg Baum  <[EMAIL PROTECTED]>
+
+	* text.C (parse_text): Handle \verb
+	* math.C (parse_math): Handle \tag and \tag*
+
 2005-10-18  Jean-Marc Lasgouttes  <[EMAIL PROTECTED]>
 
 	* Makefile.am: rename LINKED_SOURCES to LINKED_FILES.
Index: src/tex2lyx/text.C
===================================================================
--- src/tex2lyx/text.C	(Revision 13316)
+++ src/tex2lyx/text.C	(Arbeitskopie)
@@ -1956,6 +1956,15 @@ void parse_text(Parser & p, ostream & os
 			}
 		}
 
+		else if (t.cs() == "verb") {
+			context.check_layout(os);
+			char const delimiter = p.next_token().character();
+			string const arg = p.getArg(delimiter, delimiter);
+			ostringstream oss;
+			oss << "\\verb" << delimiter << arg << delimiter;
+			handle_ert(os, oss.str(), context);
+		}
+
 		else if (t.cs() == "\"") {
 			context.check_layout(os);
 			string const name = p.verbatim_item();
Index: src/tex2lyx/math.C
===================================================================
--- src/tex2lyx/math.C	(Revision 13316)
+++ src/tex2lyx/math.C	(Arbeitskopie)
@@ -179,7 +179,8 @@ void parse_math(Parser & p, ostream & os
 
 		else if (t.cs() == "textrm" || t.cs() == "textsf" || t.cs() == "textbf"
 				|| t.cs() == "texttt" || t.cs() == "textsc"
-				|| t.cs() == "text" || t.cs() == "intertext") {
+				|| t.cs() == "text" || t.cs() == "intertext"
+				|| t.cs() == "tag" || t.cs() == "tag*") {
 			os << '\\' << t.cs() << '{';
 			parse_math(p, os, FLAG_ITEM, MATHTEXT_MODE);
 			os << '}';
Index: lib/ChangeLog
===================================================================
--- lib/ChangeLog	(Revision 13316)
+++ lib/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,7 @@
+2006-03-10  Georg Baum  <[EMAIL PROTECTED]>
+
+	* symbols: Add \tag and \tag*
+
 2006-02-24  Enrico Forestieri  <[EMAIL PROTECTED]>
 
 	* scripts/legacy_lyxpreview2ppm.py (extract_metrics_info): 
Index: lib/symbols
===================================================================
--- lib/symbols	(Revision 13316)
+++ lib/symbols	(Arbeitskopie)
@@ -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

Reply via email to