From f943897d85524388fdf36d75319b6a996452f70d Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 29 Apr 2017 13:54:01 +0200 Subject: [PATCH] IndexPrint and Nomencl were not fully latexified. 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py index c43bfa4bd5..113312492b 100644 --- a/lib/lyx2lyx/lyx_2_3.py +++ b/lib/lyx2lyx/lyx_2_3.py @@ -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\"") -- 2.39.2