[LyX/master] Search for external xslt stylesheets.

Pavel Sanda sanda at lyx.org
Fri Feb 12 22:39:17 UTC 2021


commit 19a9387f72009483cbe50f910bf800709452e8cd
Author: Pavel Sanda <sanda at lyx.org>
Date:   Fri Feb 12 23:33:47 2021 +0100

    Search for external xslt stylesheets.
    
    Tested with debian's docbook-xsl-ns (1.79.1)
---
 lib/configure.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 24a51cb..0bf0772 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1006,9 +1006,14 @@ 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 + '\\" none $$i $$o" ""')
+        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 none $$i $$o" ""')
     #


More information about the lyx-cvs mailing list