From 96cd45a9a804ea3c1991506fc3732b708cfb2992 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 10 Sep 2017 19:43:27 +0200 Subject: [PATCH] Fix #10760 --- lib/lyx2lyx/lyx_2_3.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py index 73ac45cf00..edc5b1ffa9 100644 --- a/lib/lyx2lyx/lyx_2_3.py +++ b/lib/lyx2lyx/lyx_2_3.py @@ -1996,7 +1996,8 @@ def revert_mathindent(document): i = find_re(document.header, regexp, 0) if i != -1: value = get_value(document.header, "\\math_indentation" , i).split()[0] - add_to_preamble(document, ["\\setlength{\\mathindent}{" + value + '}']) + if value != "default": + add_to_preamble(document, ["\\setlength{\\mathindent}{" + value + '}']) del document.header[i] # now set the document class option regexp = re.compile(r'(\\is_math_indent 1)')