]> git.lyx.org Git - features.git/commitdiff
Add a math-as-LaTeX option, and fix some issues with lyx2lyx.
authorRichard Heck <rgheck@comcast.net>
Fri, 19 Mar 2010 15:02:12 +0000 (15:02 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 19 Mar 2010 15:02:12 +0000 (15:02 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33801 a592a061-630c-0410-9148-cb99ea01b6c8

development/FORMAT
lib/lyx2lyx/lyx_2_0.py
src/BufferParams.h

index 8ebcf5de22ca9879e855a76a5a5991634d319ea3..e6720b443b8a11c34581b6bafbb0504af344edb4 100644 (file)
@@ -4,7 +4,7 @@ LyX file-format changes
 2010-03-18: Richard Heck <rgheck@comcast.net>
   * Format incremented to 379: revise format 374
          Replace boolean \html_use_mathml with \html_math_output,
-               which at the moment can be: MathML, HTML, or Images.
+               which at the moment can be: MathML, HTML, Images, or LaTeX.
 
 2010-02-12 Pavel Sanda <sanda@lyx.org>
        * Format incremented to 378: support for revision InsetInfo.
index 64250f31093aedbb7e0534136fc7476b1b4e7909..982983031f1f9cdabe84e9a3672de781f56334c9 100644 (file)
@@ -1225,14 +1225,16 @@ def revert_math_output(document):
     i = find_token(document.header, "\\html_math_output", 0)
     if i == -1:
         return
-    rgx = re.compile(r'\\html_math_output\s+(\w+)')
+    rgx = re.compile(r'\\html_math_output\s+(\d)')
     m = rgx.match(document.header[i])
+    newval = "true"
     if rgx:
-        newval = "false"
         val = m.group(1)
-        if val != "MathML":
-            newval = "true"
-        document.header[i] = "\\html_use_mathml " + newval
+        if val == "1" or val == "2":
+            newval = "false"
+    else:
+        document.warning("Unable to match " + document.header[i])
+    document.header[i] = "\\html_use_mathml " + newval
                 
 
 ##
index cbd1d70d4a1133aa64bff86f3a31cf845ae4231f..c1992aac591d8551292cb340f9ddf17130d4808e 100644 (file)
@@ -378,7 +378,8 @@ public:
        enum MathOutput {
                MathML,
                HTML,
-               Images          
+               Images,
+               LaTeX
        };
        /// what to use for math output. present choices are above
        MathOutput html_math_output;