]> git.lyx.org Git - features.git/commitdiff
IndexPrint and Nomencl were not fully latexified.
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 29 Apr 2017 11:54:01 +0000 (13:54 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 29 Apr 2017 11:54:01 +0000 (13:54 +0200)
Do not treat them as non-verbatim in conversion. This keeps math $...$
as math.

There will be problems with characters that are outside the given
encoding, but as long as there is no way to convert them to the
respective LaTeX macros from within lyx2lyx, I don't know how to solve
this.

lib/lyx2lyx/lyx_2_3.py

index c43bfa4bd5af4b100ba910810d5e9eb6995948f9..113312492b5f020b2f6492604357f70cd1f54fae 100644 (file)
@@ -1550,9 +1550,6 @@ command_insets = ["bibitem", "citation", "href", "index_print", "nomenclature"]
 def convert_literalparam(document):
     " Add param literal "
 
-    # These already had some sort of latexify method
-    latexified_insets = ["href", "index_print", "nomenclature"]
-
     for inset in command_insets:
         i = 0
         while True:
@@ -1566,7 +1563,8 @@ def convert_literalparam(document):
                 continue
             while i < j and document.body[i].strip() != '':
                 i += 1
-            if inset in latexified_insets:
+            # href is already fully latexified. Here we can switch off literal.
+            if inset == "href":
                 document.body.insert(i, "literal \"false\"")
             else:
                 document.body.insert(i, "literal \"true\"")