X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fconfigure.py;h=0b06cdecc2f81cebc19ae6664cd0e13990430dfa;hb=0f0750a65a7782a5723e8be6af0896b94c448068;hp=db2df66ce46bfd6d731e0b16c226d9ca2581a917;hpb=d5210c555a4b51fa73eb447f2d86172185562a11;p=lyx.git diff --git a/lib/configure.py b/lib/configure.py index db2df66ce4..0b06cdecc2 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -582,7 +582,7 @@ def checkFormatEntries(dtl_tools): rc_entry = [r'\Format fen fen FEN "" "%%" "%%" "" ""']) # checkViewerEditor('a SVG viewer and editor', ['inkscape'], - rc_entry = [r'\Format svg svg SVG "" "%%" "%%" "vector" "image/svg+xml"']) + rc_entry = [r'\Format svg "svg, svgz" SVG "" "%%" "%%" "vector,zipped=native" "image/svg+xml"']) # imageformats = r'''\Format bmp bmp BMP "" "%s" "%s" "" "image/x-bmp" \Format gif gif GIF "" "%s" "%s" "" "image/gif" @@ -649,7 +649,7 @@ def checkFormatEntries(dtl_tools): checkViewer('a Postscript previewer', ['kghostview', 'okular', 'qpdfview --unique', 'evince', 'gv', 'ghostview -swap', 'gsview64', 'gsview32'], rc_entry = [r'''\Format eps eps EPS "" "%%" "" "vector" "image/x-eps" \Format eps2 eps "EPS (uncropped)" "" "%%" "" "vector" "" -\Format eps3 eps "EPS (cropped)" "" "%%" "" "document,menu=export" "" +\Format eps3 eps "EPS (cropped)" "" "%%" "" "document" "" \Format ps ps Postscript t "%%" "" "document,vector,menu=export" "application/postscript"''']) # for xdg-open issues look here: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg151818.html # the MIME type is set for pdf6, because that one needs to be autodetectable by libmime @@ -661,7 +661,8 @@ def checkFormatEntries(dtl_tools): \Format pdf4 pdf "PDF (XeTeX)" X "%%" "" "document,vector,menu=export" "" \Format pdf5 pdf "PDF (LuaTeX)" u "%%" "" "document,vector,menu=export" "" \Format pdf6 pdf "PDF (graphics)" "" "%%" "" "vector" "application/pdf" -\Format pdf7 pdf "PDF (cropped)" "" "%%" "" "document,menu=export" ""''']) +\Format pdf7 pdf "PDF (cropped)" "" "%%" "" "document,vector" "" +\Format pdf8 pdf "PDF (lower resolution)" "" "%%" "" "document,vector" ""''']) # checkViewer('a DVI previewer', ['xdvi', 'kdvi', 'okular', 'yap', 'dviout -Set=!m'], rc_entry = [r'''\Format dvi dvi DVI D "%%" "" "document,vector,menu=export" "application/x-dvi" @@ -727,15 +728,17 @@ def checkConverterEntries(): # will also have this version suffix. # 4) Otherwise always use tex2lyx. in_binary_subdir = os.path.join(lyx_binary_dir, 'tex2lyx', 'tex2lyx') - in_binary_subdir = os.path.abspath(in_binary_subdir) + in_binary_subdir = os.path.abspath(in_binary_subdir).replace('\\', '/') in_binary_dir = os.path.join(lyx_binary_dir, 'tex2lyx') - in_binary_dir = os.path.abspath(in_binary_dir) + in_binary_dir = os.path.abspath(in_binary_dir).replace('\\', '/') path, t2l = checkProg('a LaTeX/Noweb -> LyX converter', [in_binary_subdir, in_binary_subdir + version_suffix, in_binary_dir, in_binary_dir + version_suffix, 'tex2lyx' + version_suffix, 'tex2lyx'], rc_entry = [r'''\converter latex lyx "%% -f $$i $$o" "" \converter latexclipboard lyx "%% -fixedenc utf8 -f $$i $$o" "" -\converter literate lyx "%% -n -m noweb -f $$i $$o" ""'''], not_found = 'tex2lyx') +\converter literate lyx "%% -n -m noweb -f $$i $$o" "" +\converter sweave lyx "%% -n -m sweave -f $$i $$o" "" +\converter knitr lyx "%% -n -m knitr -f $$i $$o" ""'''], not_found = 'tex2lyx') if path == '': logger.warning("Failed to find tex2lyx on your system.") @@ -861,9 +864,18 @@ def checkConverterEntries(): # Only define a converter from pdf6 for graphics checkProg('a PDF to EPS converter', ['pdftops -eps -f 1 -l 1 $$i $$o'], rc_entry = [ r'\converter pdf6 eps "%%" ""' ]) - # + # Create one converter for a PDF produced using TeX fonts and one for a + # PDF produced using non-TeX fonts. This does not produce non-unique + # conversion paths, since a given document either uses TeX fonts or not. checkProg('a PDF cropping tool', ['pdfcrop $$i $$o'], - rc_entry = [ r'\converter pdf2 pdf7 "%%" ""' ]) + rc_entry = [ r'''\converter pdf2 pdf7 "%%" "" +\converter pdf4 pdf7 "%%" ""''' ]) + # Create one converter for a PDF produced using TeX fonts and one for a + # PDF produced using non-TeX fonts. This does not produce non-unique + # conversion paths, since a given document either uses TeX fonts or not. + checkProg('Ghostscript', ["gswin32c", "gswin64c", "gs"], + rc_entry = [ r'''\converter pdf2 pdf8 "python -tt $$s/scripts/convert_pdf.py $$i $$o ebook" "" +\converter pdf4 pdf8 "python -tt $$s/scripts/convert_pdf.py $$i $$o ebook" ""''' ]) # checkProg('a Beamer info extractor', ['makebeamerinfo -p $$i'], rc_entry = [ r'\converter pdf2 beamer.info "%%" ""' ]) @@ -1462,7 +1474,7 @@ def rescanTeXFiles(): if not os.path.isfile( os.path.join(srcdir, 'scripts', 'TeXFiles.py') ): logger.error("configure: error: cannot find TeXFiles.py script") sys.exit(1) - tfp = cmdOutput("python -tt " + os.path.join(srcdir, 'scripts', 'TeXFiles.py')) + tfp = cmdOutput("python -tt " + '"' + os.path.join(srcdir, 'scripts', 'TeXFiles.py') + '"') logger.info(tfp) logger.info("\tdone") @@ -1479,7 +1491,7 @@ if __name__ == '__main__': lyx_check_config = True lyx_kpsewhich = True outfile = 'lyxrc.defaults' - lyxrc_fileformat = 15 + lyxrc_fileformat = 17 rc_entries = '' lyx_keep_temps = False version_suffix = ''