[tex4ht] Including vector graphics (graphicx and PDF files)

Hans Georg Schaathun georg+tex at schaathun.net
Thu Jan 7 17:32:05 CET 2016


Dear Michal, others,

On Thu, Jan 07, 2016 at 04:23:06PM +0100, Michal Hoftich wrote:
> > The preferred solution would be to use SVG vector graphics on the web
> > page.  Whether tex4ht does the PDF->SVG conversion or I do it separately
> > matters little.  I have tried to google, but all the hits seems to be
> > concerned with generating SVG from tikz and maths, which is not
> > quite the problem.
> 
> You can convert your images to svg using inkcape:
> 
> inkscape -z fplot.eps --export-plain-svg=fplot.svg
> 
> but you need to configure tex4ht to include svg images, see attached
> file hej.cfg. You can change the value in `\emwidth` command to
> influence the displayed image size.

How do I employ the hej.cfg file?

I thought such config files would be included in the first list
of options on the command line, like this:
  htlatex  graphics.tex "xhtml,2,hej,mathml,charset=utf-8" \
     "-cmozhtf -utf8" "-cvalidate"
However, this command still produces a PNG file which is used
in the <img> element in HTML.  Where did I err?

BTW.  What is the purpose of
  \DeclareGraphicsRule{.svg}{bmp}{.xbb}{}
in the config?

TIA
-- 
:-- Hans Georg


More information about the tex4ht mailing list