Allow XHTML export of Dia diagrams.

This commit is contained in:
Richard Heck 2016-07-31 00:52:22 -04:00
parent daf7cd4c05
commit 3f1199d56a
2 changed files with 12 additions and 4 deletions

View File

@ -974,11 +974,13 @@ def checkConverterEntries():
r'''\converter dot eps "dot -Teps $$i -o $$o" "" r'''\converter dot eps "dot -Teps $$i -o $$o" ""
\converter dot png "dot -Tpng $$i -o $$o" ""''']) \converter dot png "dot -Tpng $$i -o $$o" ""'''])
# #
checkProg('a Dia -> PNG converter', ['dia -e $$o -t png $$i'], path, dia = checkProg('a Dia -> Image converter', ['dia'])
rc_entry = [ r'\converter dia png "%%" ""']) 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). # 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. # The eps2->eps converter then fixes the bounding box by cropping.
# Although unoconv can convert to png and pdf as well, do not define # Although unoconv can convert to png and pdf as well, do not define

View File

@ -453,5 +453,11 @@ Template Dia
ReferencedFile docbook "$$AbsPath$$Basename.eps" ReferencedFile docbook "$$AbsPath$$Basename.eps"
ReferencedFile docbook-xml "$$AbsPath$$Basename.eps" ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
FormatEnd FormatEnd
Format XHTML
Product "<img src=\"$$AbsOrRelPathMaster$$Basename.svg\" />"
UpdateFormat svg
UpdateResult "$$AbsPath$$Basename.svg"
ReferencedFile xhtml "$$AbsPath$$Basename.svg"
FormatEnd
TemplateEnd TemplateEnd