[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lyx-cvs
Subject:    [LyX/2.2.x] Enable SVG export of XFig figures for XHTML.
From:       Richard Heck <rgheck () lyx ! org>
Date:       2016-07-31 5:37:18
Message-ID: 20160731053718.E8F5D28022D () lyx ! lyx ! org
[Download RAW message or body]

commit 151e004ab1bbe2e825ffcc498a15e518904ebf59
Author: Richard Heck <rgheck@lyx.org>
Date:   Sun Jul 31 00:28:37 2016 -0400

    Enable SVG export of XFig figures for XHTML.
    
    (cherry picked from commit a45ffddb238dde85e54ae0226b20ef347b4e9e4c)
---
 lib/configure.py       |    1 +
 lib/external_templates |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 6e27ac1..84a852a 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -921,6 +921,7 @@ def checkConverterEntries():
     if fig2dev == "fig2dev":
         addToRC(r'''\converter fig        eps        "fig2dev -L eps $$i $$o"	""
 \converter fig        ppm        "fig2dev -L ppm $$i $$o"	""
+\converter fig        svg        "fig2dev -L svg $$i $$o"	""
 \converter fig        png        "fig2dev -L png $$i $$o"	""
 \converter fig        pdftex     "python -tt $$s/scripts/fig2pdftex.py $$i $$o"	""
 \converter fig        pstex      "python -tt $$s/scripts/fig2pstex.py $$i $$o"	""''')
diff --git a/lib/external_templates b/lib/external_templates
index 681b7ee..0f8fcab 100644
--- a/lib/external_templates
+++ b/lib/external_templates
@@ -264,6 +264,12 @@ Template XFig
 		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
 
 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic