]> git.lyx.org Git - lyx.git/commitdiff
Allow XHTML export of Dia diagrams.
authorRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 04:52:22 +0000 (00:52 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 31 Jul 2016 05:36:08 +0000 (01:36 -0400)
(cherry picked from commit 3f1199d56ad45d5da46dd0d7e30a45f506cabf96)

lib/configure.py
lib/external_templates

index 8b0c56322895bfd0640fe7de2fc20481615f4155..6e27ac15c700548c6cc09502b77284ecb82d935b 100644 (file)
@@ -968,11 +968,13 @@ def checkConverterEntries():
             r'''\converter dot        eps        "dot -Teps $$i -o $$o"        ""
 \converter dot        png        "dot -Tpng $$i -o $$o"        ""'''])
     #
-    checkProg('a Dia -> PNG converter', ['dia -e $$o -t png $$i'],
-        rc_entry = [ r'\converter dia        png        "%%"   ""'])
+    path, dia = checkProg('a Dia -> Image converter', ['dia'])
+    if dia == 'dia':
+        addToRC(r'''\converter dia        png        "dia -e $$o -t png $$i"   ""
+\converter dia        eps        "dia -e $$o -t eps $$i"       ""'
+\converter dia        svg        "dia -e $$o -t svg $$i"       ""''')
+
     #
-    checkProg('a Dia -> EPS converter', ['dia -e $$o -t eps $$i'],
-        rc_entry = [ r'\converter dia        eps        "%%"   ""'])
     # Actually, this produces EPS, but with a wrong bounding box (usually A4 or letter).
     # The eps2->eps converter then fixes the bounding box by cropping.
     # Although unoconv can convert to png and pdf as well, do not define
index 54b6dbde0b45ca61a4536f648e77eded07a2ad5d..ec2193483bfbf43db4a75b77890890cf2050d9bb 100644 (file)
@@ -493,5 +493,11 @@ Template Dia
                ReferencedFile docbook     "$$AbsPath$$Basename.eps"
                ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
        FormatEnd
+       Format XHTML
+               Product "<img src=\"$$AbsOrRelPathMaster$$Basename.svg\" />"
+               UpdateFormat svg
+               UpdateResult "$$AbsPath$$Basename.svg"
+               ReferencedFile xhtml "$$AbsPath$$Basename.svg"
+       FormatEnd
 TemplateEnd