def checkTeXPaths():
''' Determine the path-style needed by the TeX engine on Win32 (Cygwin) '''
windows_style_tex_paths = ''
def checkTeXPaths():
''' Determine the path-style needed by the TeX engine on Win32 (Cygwin) '''
windows_style_tex_paths = ''
if os.name == 'nt' or sys.platform == 'cygwin':
from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx')
if os.name == 'nt' or sys.platform == 'cygwin':
from tempfile import mkstemp
fd, tmpfname = mkstemp(suffix='.ltx')
\Format literate nw NoWeb N "" "%%" "document,menu=export"
\Format sweave Rnw "Sweave" S "" "%%" "document,menu=export"
\Format lilypond ly "LilyPond music" "" "" "%%" "vector"
\Format literate nw NoWeb N "" "%%" "document,menu=export"
\Format sweave Rnw "Sweave" S "" "%%" "document,menu=export"
\Format lilypond ly "LilyPond music" "" "" "%%" "vector"
\Format latex tex "LaTeX (plain)" L "" "%%" "document,menu=export"
\Format luatex tex "LaTeX (LuaTeX)" "" "" "%%" "document,menu=export"
\Format pdflatex tex "LaTeX (pdflatex)" "" "" "%%" "document,menu=export"
\Format latex tex "LaTeX (plain)" L "" "%%" "document,menu=export"
\Format luatex tex "LaTeX (LuaTeX)" "" "" "%%" "document,menu=export"
\Format pdflatex tex "LaTeX (pdflatex)" "" "" "%%" "document,menu=export"
#
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 "%%" ""
#
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 "%%" ""
#
checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex $$i', \
'htmltolatex -input $$i -output $$o', 'java -jar htmltolatex.jar -input $$i -output $$o'],
#
checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex $$i', \
'htmltolatex -input $$i -output $$o', 'java -jar htmltolatex.jar -input $$i -output $$o'],
# this, use different output folders for eps and pdf outputs.
addToRC(r'\converter lilypond-book latex "lilypond-book --safe --lily-output-dir=ly-eps $$i" ""')
addToRC(r'\converter lilypond-book pdflatex "lilypond-book --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$i" ""')
# this, use different output folders for eps and pdf outputs.
addToRC(r'\converter lilypond-book latex "lilypond-book --safe --lily-output-dir=ly-eps $$i" ""')
addToRC(r'\converter lilypond-book pdflatex "lilypond-book --safe --pdf --latex-program=pdflatex --lily-output-dir=ly-pdf $$i" ""')
logger.info('+ found LilyPond-book version %s.' % version_number)
else:
logger.info('+ found LilyPond-book, but version %s is too old.' % version_number)
logger.info('+ found LilyPond-book version %s.' % version_number)
else:
logger.info('+ found LilyPond-book, but version %s is too old.' % version_number)
dtl_tools = checkDTLtools()
## Write the first part of outfile
writeToFile(outfile, '''# This file has been automatically generated by LyX' lib/configure.py
dtl_tools = checkDTLtools()
## Write the first part of outfile
writeToFile(outfile, '''# This file has been automatically generated by LyX' lib/configure.py
if windows_style_tex_paths != '':
addToRC(r'\tex_expects_windows_paths %s' % windows_style_tex_paths)
checkOtherEntries()
if windows_style_tex_paths != '':
addToRC(r'\tex_expects_windows_paths %s' % windows_style_tex_paths)
checkOtherEntries()