From 3f1199d56ad45d5da46dd0d7e30a45f506cabf96 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sun, 31 Jul 2016 00:52:22 -0400 Subject: [PATCH] Allow XHTML export of Dia diagrams. --- lib/configure.py | 10 ++++++---- lib/external_templates | 6 ++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/configure.py b/lib/configure.py index a8515f30e6..16f592669e 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -974,11 +974,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 diff --git a/lib/external_templates b/lib/external_templates index c689920d25..465d691099 100644 --- a/lib/external_templates +++ b/lib/external_templates @@ -453,5 +453,11 @@ Template Dia ReferencedFile docbook "$$AbsPath$$Basename.eps" ReferencedFile docbook-xml "$$AbsPath$$Basename.eps" FormatEnd + Format XHTML + Product "" + UpdateFormat svg + UpdateResult "$$AbsPath$$Basename.svg" + ReferencedFile xhtml "$$AbsPath$$Basename.svg" + FormatEnd TemplateEnd