[tex4ht] TeX4ht warning --- Cannot determine size of graphic in svg graphics. Does tex4ht support bounding box on svg?

Radhakrishnan CV cvr at river-valley.org
Sat May 16 10:27:07 CEST 2015

On Sat, May 16, 2015 at 6:55 AM, Nasser M. Abbasi <nma at 12000.org> wrote:

> Currently I use svg graphics for all images since it looks better
> than png on the web. Here is a typical latex file. I use
> pdf version of the image for pdflatex and use the svg version
> for htlatex.
> I convert the pdf to svg using the program  pdf2svg which works
> much better thank inkscape I found.
> -------------------------------
> \documentclass[12pt]{article}
> \usepackage{graphicx}
> \begin{document}
> \ifdefined\HCode
>  \includegraphics[width=0.5\paperwidth]{p.svg}
> \else
>  \includegraphics[width=0.5\paperwidth]{p.pdf}
> \fi
> \end{document}
> ---------------------------

​You may kindly change the above to the following:



  {\Picture[pict]{\csname Gin at base\endcsname.svg
          Gin at req@width\endcsname"
           Gin at req@height\endcsname"



I got the following output for graphics inclusion part:

<p class="noindent">
  <img src="gr1.svg" alt="pict"
   width="307.14749pt" height="307.26057pt" >

​Hope this is what you have been looking for.  TeX4ht needs .eps format of
the figure since it works with dvips graphics driver and hence cannot
accept any other graphics file format.
​Best regards​

River Valley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20150516/1c9566b5/attachment.html>

More information about the tex4ht mailing list