El 17.04.2017 a las 05:30, Uwe Stöhr escribió:
the attached patch fixes several box reversion issues in lyx2lyx. Scott
could verify that the conversion to LyX 2.1.x works now as expected.
Hi Richard,
this patch fixed some issues but Math.lyx uncovered an issue that I
introduced with this patch.
Attached is the patch for LyX 2.2.3 that allows to revert Math.lyx again.
sorry and regards
Uwe
diff --git
"a/C:\\Users\\Usti\\AppData\\Local\\Temp\\TortoiseGit\\lyx_2_2-cac7b00.001.py"
"b/D:\\LyXGit\\2.2.x\\lib\\lyx2lyx\\lyx_2_2.py"
index c30477de17..a65f8ca67d 100644
---
"a/C:\\Users\\Usti\\AppData\\Local\\Temp\\TortoiseGit\\lyx_2_2-cac7b00.001.py"
+++ "b/D:\\LyXGit\\2.2.x\\lib\\lyx2lyx\\lyx_2_2.py"
@@ -1093,11 +1093,13 @@ def revert_BoxFeatures(document):
if i == -1:
return
binset = find_token(document.body, "\\begin_inset Box", i - 11)
- if binset == -1:
- return # then "thickness" is is just a word in the text
+ if binset == -1 or binset != i - 11:
+ i = i + 1
+ continue # then "thickness" is is just a word in the text
einset = find_end_of_inset(document.body, binset)
if einset == -1:
document.warning("Malformed LyX document: Can't find end of box
inset!")
+ i = i + 1
continue
# read out the values
beg = document.body[i].find('"');