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
This commit is contained in:
Julien Rioux 2011-06-07 15:11:18 +00:00
parent 54b626b8e0
commit dd8ed95a0c

View File

@ -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[^"]*?)"')