Fix bug #7610 (wrong latex flavor flag set by pref2pref).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@39006 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Julien Rioux 2011-06-11 15:33:35 +00:00
parent d2a09bf5a6
commit 31d76f3368
2 changed files with 13 additions and 3 deletions

View File

@ -71,10 +71,18 @@ def latex_flavor(line):
conv = m.group(1) conv = m.group(1)
fmat = m.group(2) fmat = m.group(2)
args = m.group(3) args = m.group(3)
flavor = "pdflatex" conv2fl = {
if conv in ("platex", "xetex", "luatex"): "luatex": "lualatex",
"pplatex": "latex",
"xetex": "xelatex",
}
if conv in conv2fl.keys():
flavor = conv2fl[conv]
else:
flavor = conv flavor = conv
return (True, if flavor == "latex":
return no_match
return (True,
"\\converter \"%s\" \"%s\" \"%s\" \"latex=%s\"" % (conv, fmat, args, flavor)) "\\converter \"%s\" \"%s\" \"%s\" \"latex=%s\"" % (conv, fmat, args, flavor))
emre = re.compile(r'^\\[Ff]ormat\s+(.*)\s+"(document[^"]*?)"') emre = re.compile(r'^\\[Ff]ormat\s+(.*)\s+"(document[^"]*?)"')

View File

@ -102,6 +102,8 @@ What's new
- On Windows, improve detection of the TeX engine when the file system does - On Windows, improve detection of the TeX engine when the file system does
not support short names and the temp directory contains spaces. not support short names and the temp directory contains spaces.
- Fixed the latex flag set by the prefs2prefs script (bug 7610).
* USER INTERFACE * USER INTERFACE