- # run latex on chklatex.ltx and check result
- if cmdOutput(LATEX + ' chklatex.ltx').find('ThisIsLaTeX2e') != -1:
- lyx_check_config = True
- else:
- print "Latex not usable (not LaTeX2e) "
- # remove temporary files
- removeFiles(['chkltex.ltx', 'chklatex.log'])
-
-checkProg('the pdflatex program', ['pdflatex $$i'],
- rc_entry = [ r'\converter latex pdf2 "%%" "latex"' ])
-
-checkProg('a Tgif viewer and editor', ['tgif'],
- rc_entry = [ r'\Format tgif obj Tgif "" "%%" "%%"'])
-
-checkProg('a FIG viewer and editor', ['xfig'],
- rc_entry = [ r'\Format fig fig FIG "" "%%" "%%"'] )
-
-checkProg('a Grace viewer and editor', ['xmgrace'],
- rc_entry = [ r'\Format agr agr Grace "" "%%" "%%"' ] )
-
-checkProg('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'],
- rc_entry = [ r'\Format fen fen FEN "" "%%" "%%"' ])
-
-path, iv = checkProg('a raster image viewer', ['xv', 'kview', 'gimp'])
-path, ie = checkProg('a raster image editor', ['gimp'])
-addToRC(r'''\Format bmp bmp BMP "" "%s" "%s"
-\Format gif gif GIF "" "%s" "%s"
-\Format jpg jpg JPEG "" "%s" "%s"
-\Format pbm pbm PBM "" "%s" "%s"
-\Format pgm pgm PGM "" "%s" "%s"
-\Format png png PNG "" "%s" "%s"
-\Format ppm ppm PPM "" "%s" "%s"
-\Format tiff tif TIFF "" "%s" "%s"
-\Format xbm xbm XBM "" "%s" "%s"
-\Format xpm xpm XPM "" "%s" "%s"''' % \
-(iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie) )
-
-checkProg('a text editor', ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \
- 'nedit', 'gedit', 'notepad'],
- rc_entry = [
- r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%"
-\Format asciiimage asc "Plain text (image)" "" "" "%%"
-\Format asciixfig asc "Plain text (Xfig output)" "" "" "%%"
-\Format dateout tmp "date (output)" "" "" "%%"
-\Format docbook sgml DocBook B "" "%%"
-\Format docbook-xml xml "Docbook (XML)" "" "" "%%"
-\Format literate nw NoWeb N "" "%%"
-\Format latex tex LaTeX L "" "%%"
-\Format linuxdoc sgml LinuxDoc x "" "%%"
-\Format text txt "Plain text" a "" "%%"
-\Format textparagraph txt "Plain text (paragraphs)" "" "" "%%"''' ])
-
-checkProg('a LaTeX -> LyX converter', [os.path.join('..','src','tex2lyx','tex2lyx') + ' -f $$i $$o', \
- 'tex2lyx' + version_suffix + ' -f $$i $$o' ],
- rc_entry = [ r'\converter latex lyx "%%" ""' ])
-
-checkProg('a Noweb -> LyX converter', ['noweb2lyx' + version_suffix + ' $$i $$o'], path = ['./reLyX'],
- rc_entry = [ r'\converter literate lyx "%%" ""' ])
-
-checkProg('a Noweb -> LaTeX converter', ['noweave' + version_suffix + ' -delay -index $$i > $$o'],
- path = ['./reLyX'], 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 "%%" ""' ])
-
-# FIXME: image_command is not used anywhere.
-checkProg('Image converter', ['convert $$i $$o'])
-
-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 Postscript interpreter', ['gs'],
-# rc_entry = [ r'\ps_command "%%"' ])
-
-checkProg('a Postscript previewer', ['gsview32', 'gv', 'ghostview -swap', 'kghostview'],
- rc_entry = [
- r'''\Format eps eps EPS "" "%%" ""
-\Format ps ps Postscript t "%%" ""''' ])
-
-checkProg('a PDF previewer', ['acrobat', 'acrord32', 'gsview32', \
- 'acroread', 'gv', 'ghostview', 'xpdf', 'kpdf', 'kghostview'],
- rc_entry = [ r'''\Format pdf pdf "PDF (ps2pdf)" P "%%" ""
-\Format pdf2 pdf "PDF (pdflatex)" F "%%" ""
-\Format pdf3 pdf "PDF (dvipdfm)" m "%%" ""''' ])
-
-checkProg('a DVI previewer', ['xdvi', 'windvi', 'yap', 'kdvi'],
- rc_entry = [ r'\Format dvi dvi DVI D "%%" ""' ])
-
-checkProg('a HTML previewer', ['mozilla file://$$p$$i', 'netscape'],
- rc_entry = [ r'\Format html html HTML H "%%" ""' ])
-
-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 "%%" ""' ])
-
-### We have a script to convert previewlyx to ppm
-addToRC(r'\converter lyxpreview ppm "python $$s/scripts/lyxpreview2bitmap.py" ""')
-
-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 *roff formatter', ['groff', 'nroff'],
- rc_entry = [
- r'\ascii_roff_command "groff -t -Tlatin1 $$FName"',
- r'\ascii_roff_command "tbl $$FName | nroff"',
- r'\ascii_roff_command "none"' ])
-
-checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'],
- rc_entry = [ r'\chktex_command "%%"' ])
-
-checkProg('a spellchecker', ['ispell'],
- rc_entry = [ r'\spell_command "%%"' ])
-
-## FIXME: OCTAVE is not used anywhere
-path, OCTAVE = checkProg('Octave', ['octave'])
-
-## FIXME: MAPLE is not used anywhere
-path, MAPLE = checkProg('Maple', ['maple'])
-
-checkProg('a fax program', ['kdeprintfax $$i', 'ksendfax $$i'],
- rc_entry = [ r'\converter ps fax "%%" ""'])
-
-path, LINUXDOC = checkProg('SGML-tools 1.x (LinuxDoc)', ['sgml2lyx'],
- rc_entry = [
- r'''\converter linuxdoc lyx "sgml2lyx $$i" ""
-\converter linuxdoc latex "sgml2latex $$i" ""
-\converter linuxdoc dvi "sgml2latex -o dvi $$i" ""
-\converter linuxdoc html "sgml2html $$i" "" ''',
- r'''\converter linuxdoc lyx "none" ""
-\converter linuxdoc latex "none" ""
-\converter linuxdoc dvi "none" ""
-\converter linuxdoc html "none" "" ''' ])
-
-if LINUXDOC != 'none':
- chk_linuxdoc = 'yes'
- bool_linuxdoc = 'true'
- linuxdoc_cmd = '\\def\\haslinuxdoc{yes}'
-else:
- chk_linuxdoc = 'no'
- bool_linuxdoc = 'false'
- linuxdoc_cmd = ''
-
-path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook) or db2x scripts', ['sgmltools', 'db2dvi'],
- rc_entry = [
- r'''\converter docbook dvi "sgmltools -b dvi $$i" ""
-\converter docbook html "sgmltools -b html $$i" ""''',
- r'''\converter docbook dvi "db2dvi $$i" ""
-\converter docbook html "db2html $$i" ""''',
- r'''\converter docbook dvi "none" ""
-\converter docbook html "none" ""'''])
-
-if DOCBOOK != 'none':
- chk_docbook = 'yes'
- bool_docbook = 'true'
- docbook_cmd = '\\def\\hasdocbook{yes}'
-else:
- chk_docbook = 'no'
- bool_docbook = 'false'
- docbook_cmd = ''
-
-checkProg('a spool command', ['lp', 'lpr'],
- rc_entry = [
- r'''\print_spool_printerprefix "-d "
+ # run latex on chklatex.ltx and check result
+ if cmdOutput(LATEX + ' chklatex.ltx').find('ThisIsLaTeX2e') != -1:
+ # valid latex2e
+ return LATEX
+ else:
+ print "Latex not usable (not LaTeX2e) "
+ # remove temporary files
+ removeFiles(['chklatex.ltx', 'chklatex.log'])
+ return ''
+
+
+def checkFormatEntries(dtl_tools):
+ ''' Check all formats (\Format entries) '''
+ checkViewer('a Tgif viewer and editor', ['tgif'],
+ rc_entry = [r'\Format tgif obj Tgif "" "%%" "%%" "vector"'])
+ #
+ checkViewer('a FIG viewer and editor', ['xfig'],
+ rc_entry = [r'\Format fig fig FIG "" "%%" "%%" "vector"'])
+ #
+ checkViewer('a Grace viewer and editor', ['xmgrace'],
+ rc_entry = [r'\Format agr agr Grace "" "%%" "%%" "vector"'])
+ #
+ checkViewer('a FEN viewer and editor', ['xboard -lpf $$i -mode EditPosition'],
+ rc_entry = [r'\Format fen fen FEN "" "%%" "%%" ""'])
+ #
+ path, iv = checkViewer('a raster image viewer', ['xv', 'kview', 'gimp'])
+ path, ie = checkViewer('a raster image editor', ['gimp'])
+ addToRC(r'''\Format bmp bmp BMP "" "%s" "%s" ""
+\Format gif gif GIF "" "%s" "%s" ""
+\Format jpg jpg JPEG "" "%s" "%s" ""
+\Format pbm pbm PBM "" "%s" "%s" ""
+\Format pgm pgm PGM "" "%s" "%s" ""
+\Format png png PNG "" "%s" "%s" ""
+\Format ppm ppm PPM "" "%s" "%s" ""
+\Format tiff tif TIFF "" "%s" "%s" ""
+\Format xbm xbm XBM "" "%s" "%s" ""
+\Format xpm xpm XPM "" "%s" "%s" ""''' % \
+ (iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie, iv, ie) )
+ #
+ checkViewer('a text editor', ['xemacs', 'gvim', 'kedit', 'kwrite', 'kate', \
+ 'nedit', 'gedit', 'notepad'],
+ rc_entry = [r'''\Format asciichess asc "Plain text (chess output)" "" "" "%%" ""
+\Format asciiimage asc "Plain text (image)" "" "" "%%" ""
+\Format asciixfig asc "Plain text (Xfig output)" "" "" "%%" ""
+\Format dateout tmp "date (output)" "" "" "%%" ""
+\Format docbook sgml DocBook B "" "%%" "document"
+\Format docbook-xml xml "Docbook (XML)" "" "" "%%" "document"
+\Format literate nw NoWeb N "" "%%" "document"
+\Format lilypond ly "LilyPond music" "" "" "%%" "vector"
+\Format latex tex "LaTeX (plain)" L "" "%%" "document"
+\Format linuxdoc sgml LinuxDoc x "" "%%" "document"
+\Format pdflatex tex "LaTeX (pdflatex)" "" "" "%%" "document"
+\Format text txt "Plain text" a "" "%%" "document"
+\Format text2 txt "Plain text (pstotext)" "" "" "%%" "document"
+\Format text3 txt "Plain text (ps2ascii)" "" "" "%%" "document"
+\Format text4 txt "Plain text (catdvi)" "" "" "%%" "document"
+\Format textparagraph txt "Plain text (paragraphs)" "" "" "%%" "document"''' ])
+ #
+ #checkProg('a Postscript interpreter', ['gs'],
+ # rc_entry = [ r'\ps_command "%%"' ])
+ checkViewer('a Postscript previewer', ['gv', 'ghostview -swap', 'kghostview'],
+ rc_entry = [r'''\Format eps eps EPS "" "%%" "" "vector"
+\Format ps ps Postscript t "%%" "" "document,vector"'''])
+ #
+ checkViewer('a PDF previewer', ['acrobat', 'acroread', 'gv', 'ghostview', \
+ 'xpdf', 'kpdf', 'kghostview'],
+ rc_entry = [r'''\Format pdf pdf "PDF (ps2pdf)" P "%%" "" "document,vector"
+\Format pdf2 pdf "PDF (pdflatex)" F "%%" "" "document,vector"
+\Format pdf3 pdf "PDF (dvipdfm)" m "%%" "" "document,vector"'''])
+ #
+ checkViewer('a DVI previewer', ['xdvi', 'kdvi'],
+ rc_entry = [r'\Format dvi dvi DVI D "%%" "" "document,vector"'])
+ if dtl_tools:
+ # Windows only: DraftDVI
+ addToRC(r'\Format dvi2 dvi DraftDVI "" "" "document,vector"')
+ #
+ checkViewer('a HTML previewer', ['mozilla file://$$p$$i', 'netscape'],
+ rc_entry = [r'\Format html html HTML H "%%" "" "document"'])
+ #
+ # entried that do not need checkProg
+ addToRC(r'''\Format date "" "date command" "" "" "" ""
+\Format fax "" Fax "" "" "" "document"
+\Format lyx lyx LyX "" "" "" ""
+\Format lyx13x lyx13 "LyX 1.3.x" "" "" "" "document"
+\Format lyxpreview lyxpreview "LyX Preview" "" "" "" ""
+\Format pdftex pdftex_t PDFTEX "" "" "" ""
+\Format program "" Program "" "" "" ""
+\Format pstex pstex_t PSTEX "" "" "" ""
+\Format rtf rtf "Rich Text Format" "" "" "" "document,vector"
+\Format sxw sxw "OpenOffice.Org Writer" O "" "" "document,vector"
+\Format wmf wmf "Windows Meta File" "" "" "" "vector"
+\Format word doc "MS Word" W "" "" "document,vector"
+\Format wordhtml html "MS Word (HTML)" "" "" "" "document"
+''')
+
+
+def checkConverterEntries():
+ ''' 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('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('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" ""
+\converter fig ppm "fig2dev -L ppm $$i $$o" ""
+\converter fig png "fig2dev -L png $$i $$o" ""''',
+ ''])
+ #
+ checkProg('a TIFF -> PS converter', ['tiff2ps $$i > $$o'],
+ rc_entry = [ r'\converter tiff eps "%%" ""', ''])
+ #
+ checkProg('a TGIF -> EPS/PPM converter', ['tgif'],
+ rc_entry = [
+ r'''\converter tgif eps "tgif -stdout -print -color -eps $$i > $$o" ""
+\converter tgif ppm "tgif -stdout -print -color -ppm $$i > $$o" ""
+\converter tgif png "tgif -stdout -print -color -png $$i > $$o" ""
+\converter tgif pdf "tgif -stdout -print -color -pdf $$i > $$o" ""''',
+ ''])
+ #
+ checkProg('a WMF -> EPS converter', ['wmf2eps -o $$o $$i'],
+ rc_entry = [ r'\converter wmf eps "%%" ""', ''])
+ #
+ checkProg('a EPS -> PDF converter', ['epstopdf'],
+ rc_entry = [ r'\converter eps pdf "epstopdf --outfile=$$o $$i" ""', ''])
+ #
+ checkProg('a Grace -> Image converter', ['gracebat'],
+ rc_entry = [
+ r'''\converter agr eps "gracebat -hardcopy -printfile $$o -hdevice EPS $$i 2>/dev/null" ""
+\converter agr png "gracebat -hardcopy -printfile $$o -hdevice PNG $$i 2>/dev/null" ""
+\converter agr jpg "gracebat -hardcopy -printfile $$o -hdevice JPEG $$i 2>/dev/null" ""
+\converter agr ppm "gracebat -hardcopy -printfile $$o -hdevice PNM $$i 2>/dev/null" ""''',
+ ''])
+ #
+ checkProg('a LaTeX -> HTML converter', ['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 "%%" "originaldir,needaux"' ])
+ #
+ path, lilypond = checkProg('a LilyPond -> EPS/PDF/PNG converter', ['lilypond'])
+ if (lilypond != ''):
+ version_string = cmdOutput("lilypond --version")
+ match = re.match('GNU LilyPond (\S+)', version_string)
+ if match:
+ version_number = match.groups()[0]
+ version = version_number.split('.')
+ if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 6):
+ addToRC(r'''\converter lilypond eps "lilypond -b eps --ps $$i" ""
+\converter lilypond png "lilypond -b eps --png $$i" ""''')
+ if int(version[0]) > 2 or (len(version) > 1 and int(version[0]) == 2 and int(version[1]) >= 9):
+ addToRC(r'\converter lilypond pdf "lilypond -b eps --pdf $$i" ""')
+ print '+ found LilyPond version %s.' % version_number
+ else:
+ print '+ found LilyPond, but version %s is too old.' % version_number
+ else:
+ print '+ found LilyPond, but could not extract version number.'
+ #
+ # FIXME: no rc_entry? comment it out
+ # checkProg('Image converter', ['convert $$i $$o'])
+ #
+ # Entried that do not need checkProg
+ addToRC(r'''\converter lyxpreview ppm "python -tt $$s/scripts/lyxpreview2bitmap.py" ""
+\converter date dateout "date +%d-%m-%Y > $$o" ""
+\converter docbook docbook-xml "cp $$i $$o" "xml"
+\converter fen asciichess "python -tt $$s/scripts/fen2ascii.py $$i $$o" ""
+\converter fig pdftex "python -tt $$s/scripts/fig2pdftex.py $$i $$o" ""
+\converter fig pstex "python -tt $$s/scripts/fig2pstex.py $$i $$o" ""
+\converter lyx lyx13x "python -tt $$s/lyx2lyx/lyx2lyx -t 221 $$i > $$o" ""
+''')
+
+
+def checkLinuxDoc():
+ ''' Check linuxdoc '''
+ #
+ path, LINUXDOC = checkProg('SGML-tools 1.x (LinuxDoc)', ['sgml2lyx'],
+ rc_entry = [
+ r'''\converter linuxdoc lyx "sgml2lyx $$i" ""
+\converter linuxdoc latex "sgml2latex $$i" ""
+\converter linuxdoc dvi "sgml2latex -o dvi $$i" ""
+\converter linuxdoc html "sgml2html $$i" ""''',
+ r'''\converter linuxdoc lyx "" ""
+\converter linuxdoc latex "" ""
+\converter linuxdoc dvi "" ""
+\converter linuxdoc html "" ""''' ])
+ if LINUXDOC != '':
+ return ('yes', 'true', '\\def\\haslinuxdoc{yes}')
+ else:
+ return ('no', 'false', '')
+
+
+def checkDocBook():
+ ''' Check docbook '''
+ path, DOCBOOK = checkProg('SGML-tools 2.x (DocBook) or db2x scripts', ['sgmltools', 'db2dvi'],
+ rc_entry = [
+ r'''\converter docbook dvi "sgmltools -b dvi $$i" ""
+\converter docbook html "sgmltools -b html $$i" ""''',
+ r'''\converter docbook dvi "db2dvi $$i" ""
+\converter docbook html "db2html $$i" ""''',
+ r'''\converter docbook dvi "" ""
+\converter docbook html "" ""'''])
+ #
+ if DOCBOOK != '':
+ return ('yes', 'true', '\\def\\hasdocbook{yes}')
+ else:
+ return ('no', 'false', '')
+
+
+def checkOtherEntries():
+ ''' entries other than Format and Converter '''
+ checkProg('a *roff formatter', ['groff', 'nroff'],
+ rc_entry = [
+ r'\ascii_roff_command "groff -t -Tlatin1 $$FName"',
+ r'\ascii_roff_command "tbl $$FName | nroff"',
+ r'\ascii_roff_command ""' ])
+ checkProg('ChkTeX', ['chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38'],
+ rc_entry = [ r'\chktex_command "%%"' ])
+ checkProg('a spellchecker', ['ispell'],
+ rc_entry = [ r'\spell_command "%%"' ])
+ ## FIXME: OCTAVE is not used anywhere
+ # path, OCTAVE = checkProg('Octave', ['octave'])
+ ## FIXME: MAPLE is not used anywhere
+ # path, MAPLE = checkProg('Maple', ['maple'])
+ checkProg('a spool command', ['lp', 'lpr'],
+ rc_entry = [
+ r'''\print_spool_printerprefix "-d "