> open math manual.
> on console i see:
> Lexer.cpp(937): Missing 'use_makebox'-tag in InsetBoxParams::read.

I missed to add a conversion routine that adds

use_makebox 0

to every file containing boxes.

Attached is a patch that should do this but doesn't. I'm unable to figure out the problem because the lyx2lyx document.warning statements are not output in the console in a conversion routine, only in reversion routines. I'm debugging my lyx2lyx code via the document.warning statements.

Can anyone please give me a hint what I'm doing wrong and/or why the warnings 
aren't output?

thanks and regards
Uwe
Index: lyx_2_0.py
===================================================================
--- lyx_2_0.py	(revision 34944)
+++ lyx_2_0.py	(working copy)
@@ -1912,6 +1912,22 @@
     h += 1
 
 
+def convert_use_makebox(document):
+  " Deletes use_makebox option of boxes "
+  i = 0
+  while 1:
+    # remove the option use_makebox
+    j = find_token(document.body, '\\begin_inset Box', i)
+    if j == -1:
+      return
+    k = find_token(document.body, 'use_parbox', j)
+    if k == -1:
+      document.warning("Malformed LyX document: Can't find use_parbox statement in box.")
+      return
+    document.body.insert(k + 1, "use_makebox 0")
+    i += 1
+
+
 def revert_IEEEtran(document):
   " Convert IEEEtran layouts and styles to TeX code "
   if document.textclass != "IEEEtran":
@@ -2094,7 +2110,7 @@
            [391, []],
            [392, [convert_beamer_args]],
            [393, [convert_optarg]],
-           [394, []],
+           [394, [convert_use_makebox]],
            [395, []],
            [396, []],
            [397, [remove_Nameref]],

Reply via email to