]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.py
Allow using icon names in InsetInfo
[lyx.git] / lib / configure.py
index 341c11f8acb901a607f9eb342858b0d86710d602..0b06cdecc2f81cebc19ae6664cd0e13990430dfa 100644 (file)
@@ -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"
@@ -735,7 +736,9 @@ def checkConverterEntries():
     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")