From dd8ed95a0cc5afa5805eaf621fd3861469af9520 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Tue, 7 Jun 2011 15:11:18 +0000 Subject: [PATCH] Fix bug #7610 (wrong latex flavor flag set by pref2pref). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38976 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/prefs2prefs_prefs.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/scripts/prefs2prefs_prefs.py b/lib/scripts/prefs2prefs_prefs.py index 40b5072f82..7a2cdd69bc 100644 --- a/lib/scripts/prefs2prefs_prefs.py +++ b/lib/scripts/prefs2prefs_prefs.py @@ -71,10 +71,18 @@ def latex_flavor(line): conv = m.group(1) fmat = m.group(2) args = m.group(3) - flavor = "pdflatex" - if conv in ("platex", "xetex", "luatex"): + conv2fl = { + "luatex": "lualatex", + "pplatex": "latex", + "xetex": "xelatex", + } + if conv in conv2fl.keys(): + flavor = conv2fl[conv] + else: flavor = conv - return (True, + if flavor == "latex": + return no_match + return (True, "\\converter \"%s\" \"%s\" \"%s\" \"latex=%s\"" % (conv, fmat, args, flavor)) emre = re.compile(r'^\\[Ff]ormat\s+(.*)\s+"(document[^"]*?)"')