- ''' 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'],
- 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', ['dvipdfm $$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'],
+ rc_entry = [ r'\converter html latex "%%" ""' ])
+ #
+ checkProg('an MS Word -> 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('a LaTeX -> OpenOffice.org converter', ['oolatex $$i', 'oolatex.sh $$i'],
+ rc_entry = [ r'\converter latex sxw "%%" "latex"' ])
+ # 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 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 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" ""