- ''' Check all converters (\converter entries) '''
- checkProg('the pdflatex program', ['pdflatex $$i'],
- rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ])
-
- ''' If we're running LyX in-place then tex2lyx will be found in
- ../src/tex2lyx. Add this directory to the PATH temporarily and
- search for tex2lyx.
- Use PATH to avoid any problems with paths-with-spaces.
- '''
- path_orig = os.environ["PATH"]
- os.environ["PATH"] = os.path.join('..', 'src', 'tex2lyx') + \
- os.pathsep + path_orig
-
- checkProg('a LaTeX -> LyX converter', ['tex2lyx -f $$i $$o', \
- 'tex2lyx' + version_suffix + ' -f $$i $$o' ],
- rc_entry = [ r'\converter latex lyx "%%" ""' ])
-
- os.environ["PATH"] = path_orig
-
- #
- checkProg('a Noweb -> LyX converter', ['noweb2lyx' + version_suffix + ' $$i $$o'], path = ['./reLyX'],
- rc_entry = [ r'\converter literate lyx "%%" ""' ])
- #
- checkProg('a Noweb -> LaTeX converter', ['noweave -delay -index $$i > $$o'],
- rc_entry = [ r'\converter literate latex "%%" ""' ])
- #
- checkProg('a HTML -> LaTeX converter', ['html2latex $$i'],
- rc_entry = [ r'\converter html latex "%%" ""' ])
- #
- checkProg('a MSWord -> LaTeX converter', ['wvCleanLatex $$i $$o'],
- rc_entry = [ r'\converter word latex "%%" ""' ])
- #
- checkProg('a LaTeX -> MS Word converter', ["htlatex $$i 'html,word' 'symbol/!' '-cvalidate'"],
- rc_entry = [ r'\converter latex wordhtml "%%" ""' ])
- #
- checkProg('an OpenOffice.org -> LaTeX converter', ['w2l -clean $$i'],
- rc_entry = [ r'\converter sxw latex "%%" ""' ])
- #
- checkProg('an LaTeX -> OpenOffice.org LaTeX converter', ['oolatex $$i', 'oolatex.sh $$i'],
- rc_entry = [ r'\converter latex sxw "%%" "latex"' ])
- #
- checkProg('a PS to PDF converter', ['ps2pdf13 $$i $$o'],
- rc_entry = [ r'\converter ps pdf "%%" ""' ])
- #
- checkProg('a DVI to PS converter', ['dvips -o $$o $$i'],
- rc_entry = [ r'\converter dvi ps "%%" ""' ])
- #
- checkProg('a DVI to PDF converter', ['dvipdfmx -o $$o $$i', 'dvipdfm -o $$o $$i'],
- rc_entry = [ r'\converter dvi pdf3 "%%" ""' ])
- #
- path, dvipng = checkProg('dvipng', ['dvipng'])
- if dvipng == "dvipng":
- addToRC(r'\converter lyxpreview png "python $$s/scripts/lyxpreview2bitmap.py" ""')
- else:
- addToRC(r'\converter lyxpreview png "" ""')
- #
- checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i'],
- rc_entry = [ r'\converter ps fax "%%" ""'])
- #
- checkProg('a FIG -> EPS/PPM converter', ['fig2dev'],
- rc_entry = [
- r'''\converter fig eps "fig2dev -L eps $$i $$o" ""
+ ''' Check all converters (\converter entries) '''
+ checkProg('the pdflatex program', ['pdflatex $$i'],
+ rc_entry = [ r'\converter pdflatex pdf2 "%%" "latex"' ])
+
+ ''' If we're running LyX in-place then tex2lyx will be found in
+ ../src/tex2lyx. Add this directory to the PATH temporarily and
+ search for tex2lyx.
+ Use PATH to avoid any problems with paths-with-spaces.
+ '''
+ path_orig = os.environ["PATH"]
+ os.environ["PATH"] = os.path.join('..', 'src', 'tex2lyx') + \
+ os.pathsep + path_orig
+
+ checkProg('a LaTeX/Noweb -> LyX converter', ['tex2lyx', 'tex2lyx' + version_suffix],
+ rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" ""
+\converter literate lyx "%% -n -f $$i $$o" ""'''])
+
+ os.environ["PATH"] = path_orig
+
+ #
+ checkProg('a Noweb -> LaTeX converter', ['noweave -delay -index $$i > $$o'],
+ rc_entry = [ r'\converter literate latex "%%" ""' ])
+ #
+ checkProg('an HTML -> LaTeX converter', ['html2latex $$i', 'gnuhtml2latex $$i', \
+ 'htmltolatex -input $$i -output $$o', 'java -jar htmltolatex.jar -input $$i -output $$o'],
+ rc_entry = [ r'\converter html latex "%%" ""' ])
+ #
+ checkProg('an MS Word -> LaTeX converter', ['wvCleanLatex $$i $$o'],
+ rc_entry = [ r'\converter word latex "%%" ""' ])
+ # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
+ path, htmlconv = checkProg('a LaTeX -> HTML converter', ['htlatex $$i', 'htlatex.sh $$i', \
+ '/usr/share/tex4ht/htlatex $$i', 'tth -t -e2 -L$$b < $$i > $$o', \
+ 'latex2html -no_subdir -split 0 -show_section_numbers $$i', 'hevea -s $$i'],
+ rc_entry = [ r'\converter latex html "%%" "needaux"' ])
+ if htmlconv.find('htlatex') >= 0 or htmlconv == 'latex2html':
+ addToRC(r'''\copier html "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
+ else:
+ addToRC(r'''\copier html "python -tt $$s/scripts/ext_copy.py $$i $$o"''')
+
+ # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
+ path, htmlconv = checkProg('a LaTeX -> MS Word converter', ["htlatex $$i 'html,word' 'symbol/!' '-cvalidate'", \
+ "htlatex.sh $$i 'html,word' 'symbol/!' '-cvalidate'", \
+ "/usr/share/tex4ht/htlatex $$i 'html,word' 'symbol/!' '-cvalidate'"],
+ rc_entry = [ r'\converter latex wordhtml "%%" "needaux"' ])
+ if htmlconv.find('htlatex') >= 0:
+ addToRC(r'''\copier wordhtml "python -tt $$s/scripts/ext_copy.py -e html,png,css $$i $$o"''')
+ #
+ checkProg('an OpenOffice.org -> LaTeX converter', ['w2l -clean $$i'],
+ rc_entry = [ r'\converter sxw latex "%%" ""' ])
+ #
+ checkProg('an OpenDocument -> LaTeX converter', ['w2l -clean $$i'],
+ rc_entry = [ r'\converter odt latex "%%" ""' ])
+ # On SuSE the scripts have a .sh suffix, and on debian they are in /usr/share/tex4ht/
+ # Both SuSE and debian have oolatex
+ checkProg('a LaTeX -> Open Document converter', [
+ 'htlatex $$i \'xhtml,ooffice\' \'ooffice/! -cmozhtf\' \'-coo\' \'-cvalidate\'', \
+ 'oolatex $$i', 'oolatex.sh $$i', \
+ '/usr/share/tex4ht/oolatex $$i'],
+ rc_entry = [ r'\converter latex odt "%%" "needaux"' ])
+ # On windows it is called latex2rt.exe
+ checkProg('a LaTeX -> RTF converter', ['latex2rtf -p -S -o $$o $$i', 'latex2rt -p -S -o $$o $$i'],
+ rc_entry = [ r'\converter latex rtf "%%" "needaux"' ])
+ #
+ checkProg('a RTF -> HTML converter', ['unrtf --html $$i > $$o'],
+ rc_entry = [ r'\converter rtf html "%%" ""' ])
+ #
+ checkProg('a PS to PDF converter', ['ps2pdf13 $$i $$o'],
+ rc_entry = [ r'\converter ps pdf "%%" ""' ])
+ #
+ checkProg('a PS to TXT converter', ['pstotext $$i > $$o'],
+ rc_entry = [ r'\converter ps text2 "%%" ""' ])
+ #
+ checkProg('a PS to TXT converter', ['ps2ascii $$i $$o'],
+ rc_entry = [ r'\converter ps text3 "%%" ""' ])
+ #
+ checkProg('a PS to EPS converter', ['ps2eps $$i'],
+ rc_entry = [ r'\converter ps eps "%%" ""' ])
+ #
+ checkProg('a PDF to PS converter', ['pdf2ps $$i $$o', 'pdftops $$i $$o'],
+ rc_entry = [ r'\converter pdf ps "%%" ""' ])
+ #
+ checkProg('a PDF to EPS converter', ['pdftops -eps -f 1 -l 1 $$i $$o'],
+ rc_entry = [ r'\converter pdf eps "%%" ""' ])
+ #
+ checkProg('a DVI to TXT converter', ['catdvi $$i > $$o'],
+ rc_entry = [ r'\converter dvi text4 "%%" ""' ])
+ #
+ checkProg('a DVI to PS converter', ['dvips -o $$o $$i'],
+ rc_entry = [ r'\converter dvi ps "%%" ""' ])
+ #
+ checkProg('a DVI to PDF converter', ['dvipdfmx -o $$o $$i', 'dvipdfm -o $$o $$i'],
+ rc_entry = [ r'\converter dvi pdf3 "%%" ""' ])
+ #
+ path, dvipng = checkProg('dvipng', ['dvipng'])
+ if dvipng == "dvipng":
+ addToRC(r'\converter lyxpreview png "python -tt $$s/scripts/lyxpreview2bitmap.py" ""')
+ else:
+ addToRC(r'\converter lyxpreview png "" ""')
+ #
+ checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i'],
+ rc_entry = [ r'\converter ps fax "%%" ""'])
+ #
+ checkProg('a FIG -> EPS/PPM converter', ['fig2dev'],
+ rc_entry = [
+ r'''\converter fig eps "fig2dev -L eps $$i $$o" ""