On 12/12/2015 12:02 PM, Kornel Benko wrote: > Am Samstag, 12. Dezember 2015 um 10:28:35, schrieb Richard Heck > <rgh...@lyx.org> >> On 12/12/2015 02:16 AM, Georg Baum wrote: >>> Kornel Benko wrote: >>> >>>> Am Freitag, 11. Dezember 2015 um 22:15:07, schrieb Scott Kostyshak >>>> <skost...@lyx.org> >>>>> Directory: /home/scott/lyxbuilds/master/CMakeBuild/autotests/out-home >>>>> "_lyx2lyx/mathmacros/architecture" start time: Dec 11 13:09 EST Output: >>>>> ---------------------------------------------------------- -- Executing >>>>> /usr/bin/python2.7 /home/scott/lyxbuilds/master/repo/lib/lyx2lyx/lyx2lyx >>>>> -e 8GvmV -o nxiYZj >>>>> /home/scott/lyxbuilds/master/repo/development/mathmacros/architecture.lyx >>>>> -- Error output of lyx2lyx = 0 -- Warning: Malformed LyX document: No >>>>> \use_non_tex_fonts! -- Warning: Malformed LyX document: No \font_math! >>>>> CMake Error at >>>>> >>> /home/scott/lyxbuilds/master/repo/development/autotests/lyx2lyxtest.cmake:49 >>>>> (message): >>>>> lyx2lyx failed >>>> If someone declares this warnings as not important, we can check for them >>>> too. >>> No, this is a bug. Either the documents are invalid (then they should be >>> fixed), or it is a lyx2lyx bug (then this should be fixed). >> What file is it? > Should be visible. > development/mathmacros/architecture.lyx
Patch. Richard
>From d59c918994ab1d5425a487b51b6d86b1a488c8bb Mon Sep 17 00:00:00 2001 From: Richard Heck <rgh...@lyx.org> Date: Sat, 12 Dec 2015 13:19:41 -0500 Subject: [PATCH] Fix a couple minor issues noticed by tests. --- lib/lyx2lyx/lyx_2_0.py | 12 +++++++----- lib/lyx2lyx/lyx_2_2.py | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/lyx2lyx/lyx_2_0.py b/lib/lyx2lyx/lyx_2_0.py index 7914cc4..efd29ba 100644 --- a/lib/lyx2lyx/lyx_2_0.py +++ b/lib/lyx2lyx/lyx_2_0.py @@ -2394,13 +2394,15 @@ def revert_script(document): def convert_use_xetex(document): " convert \\use_xetex to \\use_non_tex_fonts " - i = 0 i = find_token(document.header, "\\use_xetex", 0) if i == -1: - return - - val = get_value(document.header, "\\use_xetex", 0) - document.header[i] = "\\use_non_tex_fonts " + val + i = find_token(document.header, "\\textclass", 0) + i += 1 + document.header.insert(i, "\\use_non_tex_fonts 0") + val = "0" + else: + val = get_value(document.header, "\\use_xetex", 0) + document.header[i] = "\\use_non_tex_fonts " + val def revert_use_xetex(document): diff --git a/lib/lyx2lyx/lyx_2_2.py b/lib/lyx2lyx/lyx_2_2.py index c4121c1..1ede0cb 100644 --- a/lib/lyx2lyx/lyx_2_2.py +++ b/lib/lyx2lyx/lyx_2_2.py @@ -2009,7 +2009,8 @@ def convert_fontsettings(document): for f in fontsettings: i = find_token(document.header, f + " ", 0) if i == -1: - document.warning("Malformed LyX document: No " + f + "!") + if f != "\\font_math": #this one is not required + document.warning("Malformed LyX document: No " + f + "!") j = j + 1 continue value = document.header[i][len(f):].strip() -- 2.1.0