I have one file, and I want to alternately produce printable PDF files via xelatex
and HTML pages via htlatex
. By default, htlatex
produces just really ugly, low-resolution PNG equations. I want SVG instead.
I do not want to use MathJaX. I want my file to work without JavaScript, and I don't want users to have to render the complex TeX every time.
Following advice online, I put this in c.cfg
...
\Preamble{ext=htm,charset="utf-8",p-width,pic-align}
\Configure{Picture}{.svg}
\makeatletter
\Configure{graphics*}
{svg}
{
{\Configure{Needs}{File: \[email protected]}\Needs{}}
\Picture[\csname a:GraphicsAlt\endcsname]{\csname Gin@base\endcsname.svg
\csname a:Gin-dim\endcsname}
}
\begin{document}
\EndPreamble
Ran htlatex
via htlatex myfile "c"
...and, got this: pstoedit: Unsupported output format svg
.
Hmm, what happened here? Is my system misconfigured, as this Debian bug reporter thought? No. Perhaps at one point pstoedit
's SVG conversion was free software, but not anymore.
SVG is a shareware "plugin" of pstoedit
, and there is no binary for my OS, FreeBSD.
How can I have SVG math, and really SVG anything else marked between some command, with htlatex
without pstoedit
?
I've determined that htlatex
works internally by first generating an EPS file, e.g. zztest.eps
. It then tries pstoedit -f svg zztest.eps test0x.svg
. So I thought I'd just try another converter, but other converters, such as uniconvertor
and inkscape -z
, do not properly recognize LaTeX's magic, and put the EPS onto a huge canvas (see below). Also, it is cumbersome to have to run the other convertor every time, there should be a way to specify which convertor to use.
The image should look like the output of default htlatex
, just as an SVG.