]> git.lyx.org Git - lyx.git/blobdiff - lib/configure.py
Make continuous spellcheck the default.
[lyx.git] / lib / configure.py
index 7636438ab73a3d81af45097d963043d388c75279..bb692919232df9209b2d5671edf950116e6b48d8 100644 (file)
@@ -753,6 +753,7 @@ def checkFormatEntries(dtl_tools):
 \Format docbook5   xml    "DocBook 5"             "" ""        "%%"    "document,menu=export"  "application/docbook+xml"
 \Format dot        dot    "Graphviz Dot"          "" ""        "%%"    "vector"        "text/vnd.graphviz"
 \Format dviluatex  tex    "LaTeX (dviluatex)"     "" "" "%%"   "document,menu=export"  ""
+\Format epub       epub    ePub                   "" "" "%%"    "document,menu=export"  "application/epub+zip"
 \Format platex     tex    "LaTeX (pLaTeX)"        "" "" "%%"   "document,menu=export"  ""
 \Format literate   nw      NoWeb                  N  ""        "%%"    "document,menu=export"  ""
 \Format sweave     Rnw    "Sweave"                S  "" "%%"   "document,menu=export"  ""
@@ -1005,6 +1006,17 @@ def checkConverterEntries():
     checkProg('DocBook converter -> PDF (docbook)', ['pandoc -f docbook -t latex --latex-engine=lualatex --toc -o $$o $$i'],
         rc_entry = [ r'\converter docbook5      pdf9      "%%" ""' ])
     #
+    xpath, xslt_sheet = checkProg('XSLT stylesheets for ePub', ['chunk.xsl'], '', ['/usr/share/xml/docbook/stylesheet/docbook-xsl-ns/epub3'])
+    if xslt_sheet == 'chunk.xsl':
+        xpath = '/usr/share/xml/docbook/stylesheet/docbook-xsl-ns'
+    else:
+        xpath = 'none'
+    global java
+    if xsltproc != '':
+        addToRC('\\converter docbook5 epub "python $$s/scripts/docbook2epub.py none none \\"' + xsltproc + '\\" ' + xpath + ' $$i $$o" ""')
+    elif java != '':
+        addToRC('\\converter docbook5 epub "python $$s/scripts/docbook2epub.py \\"' + java + '\\" none none ' + xpath + ' $$i $$o" ""')
+    #
     checkProg('a MS Word Office Open XML converter -> LaTeX', ['pandoc -s -f docx -o $$o -t latex $$i'],
         rc_entry = [ r'\converter word2      latex      "%%"   ""' ])
     # Only define a converter to pdf6, otherwise the odt format could be
@@ -1932,7 +1944,7 @@ if __name__ == '__main__':
     lyx_check_config = True
     lyx_kpsewhich = True
     outfile = 'lyxrc.defaults'
-    lyxrc_fileformat = 34
+    lyxrc_fileformat = 36
     rc_entries = ''
     lyx_keep_temps = False
     version_suffix = ''
@@ -1995,6 +2007,7 @@ Format %i
     if java == '':
         java = check_java()
     perl = checkProg('a perl interpreter', ['perl'])[1]
+    xsltproc = checkProg('xsltproc', ['xsltproc'])[1]
     (inkscape_path, inkscape_gui) = os.path.split(checkInkscape())
     # On Windows, we need to call the "inkscape.com" wrapper
     # for command line purposes. Other OSes do not differentiate.