]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.py
define sweave to xetex|luatex converters
[lyx.git] / lib / configure.py
index 24c3832b5fc12142bd517bb8c2fda94d82894c71..318bdcdc7d9563274afa63934795b8ec92a3b3aa 100644 (file)
@@ -96,6 +96,8 @@ def createDirectories():
 def checkTeXPaths():
     ''' Determine the path-style needed by the TeX engine on Win32 (Cygwin) '''
     windows_style_tex_paths = ''
+    if LATEX == '':
+        return windows_style_tex_paths
     if os.name == 'nt' or sys.platform == 'cygwin':
         from tempfile import mkstemp
         fd, tmpfname = mkstemp(suffix='.ltx')
@@ -657,8 +659,10 @@ def checkConverterEntries():
 \converter literate   pdflatex      "%%"       ""'''])
     #
     checkProg('a Sweave -> LaTeX converter', ['Rscript --verbose --no-save --no-restore $$s/scripts/lyxsweave.R $$p$$i $$p$$o $$e $$r'],
-        rc_entry = [r'''\converter sweave   latex      "%%"    ""
-\converter sweave   pdflatex      "%%" ""'''])
+        rc_entry = [r'''\converter sweave   latex      "%%"    "latex"
+\converter sweave   pdflatex   "%%"    "latex=pdflatex"
+\converter sweave   xetex      "%%"    "latex=xelatex"
+\converter sweave   luatex     "%%"    "latex=lualatex"'''])
     #
     checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex $$i', \
         'htmltolatex -input $$i -output $$o', 'java -jar htmltolatex.jar -input $$i -output $$o'],
@@ -1340,7 +1344,6 @@ Options:
         sys.exit(1)
     setEnviron()
     createDirectories()
-    windows_style_tex_paths = checkTeXPaths()
     dtl_tools = checkDTLtools()
     ## Write the first part of outfile
     writeToFile(outfile, '''# This file has been automatically generated by LyX' lib/configure.py
@@ -1356,6 +1359,7 @@ Options:
     checkConverterEntries()
     (chk_docbook, bool_docbook, docbook_cmd) = checkDocBook()
     checkTeXAllowSpaces()
+    windows_style_tex_paths = checkTeXPaths()
     if windows_style_tex_paths != '':
         addToRC(r'\tex_expects_windows_paths %s' % windows_style_tex_paths)
     checkOtherEntries()