[tex4ht-commits] [SCM] tex4ht updated: r335 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Wed Oct 18 12:17:23 CEST 2017


Author: michal_h21
Date: 2017-10-18 13:17:23 +0300 (Wed, 18 Oct 2017)
New Revision: 335

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-html4.tex
Log:
fixed the pdf to svg and png conversion

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2017-10-18 08:15:04 UTC (rev 334)
+++ trunk/lit/ChangeLog	2017-10-18 10:17:23 UTC (rev 335)
@@ -1,6 +1,9 @@
 2017-10-18  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (graphicx.4ht): added xbb support for PDF and SVG
+	* tex4ht-html4.tex (html4.4ht): use pdf2svg for pdf to svg conversion, the
+	pdf images will be converted to png by default, use "svg" option to request
+	the svg output.
 
 2017-10-16  Michal Hoftich  <michal.h21 at gmail.com>
 

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2017-10-18 08:15:04 UTC (rev 334)
+++ trunk/lit/tex4ht-html4.tex	2017-10-18 10:17:23 UTC (rev 335)
@@ -13619,13 +13619,20 @@
    {{\Configure{Needs}{File: \Gin at base.svg}\Needs{}}%
    \Picture[\a:GraphicsAlt]{{\Gin at base.svg} |<graphics dim|>}}
 
+
 \NewConfigure{PdfConvert}{2}
-\Configure{PdfConvert}{svg}{"inkscape -z -f '\Gin at base.pdf' -l '\Gin at base.\a:PdfConvert'"}
+\edef\svg:ext{.svg}
+\ifx\PictExt\svg:ext
+\Configure{PdfConvert}{svg}{"pdf2svg '\Gin at base.pdf' '\Gin at base-\Gin at page.\a:PdfConvert' \Gin at page"}
+\else
+\Configure{PdfConvert}{png}{"rungs -q -dNOPAUSE -dBATCH -sDEVICE=pngalpha -r300 \ifx\Gin at page\@empty\else -dFirstPage='\Gin at page'  -dLastPage='\Gin at page'\fi\space -sOutputFile='\Gin at base-\Gin at page.\a:PdfConvert' \Gin at base.pdf"}
+\fi
 \Configure{graphics*}
    {pdf}
    {\Needs{\b:PdfConvert}%
-   {\Configure{Needs}{File: \Gin at base.\a:PdfConvert}\Needs{}}%
-   \Picture[\a:GraphicsAlt]{{\Gin at base.\a:PdfConvert}|<graphics dim|>}}
+     \edef\svg:filename{\Gin at base-\Gin at page.\a:PdfConvert}%
+     { \Configure{Needs}{File: \svg:filename}\Needs{}}%
+   \Picture[\a:GraphicsAlt]{{\svg:filename} |<graphics dim|>}}
 
 \NewConfigure{GraphicsAlt}{1}
 \Configure{GraphicsAlt}{PIC}



More information about the tex4ht-commits mailing list