This is the best configuration to use. It makes the math use .svg for images instead of png, and also supports an includes pictures as svg.
First thing is to edit tex4ht.env
sudo vi /usr/local/texlive/2014/texmf-dist/tex4ht/base/unix/tex4ht.env
The next step is to edit your .cfg and make it like this
\Preamble{ext=htm,charset="utf-8",p-width,pic-align} \Configure{VERSION}{} \Configure{DOCTYPE}{\HCode{<!DOCTYPE html>\Hnewline}} \Configure{HTML}{\HCode{<html>\Hnewline}}{\HCode{\Hnewline</html>}} \Configure{@HEAD}{} \Configure{@HEAD}{\HCode{<meta charset="utf-8"/>\Hnewline}} \Configure{@HEAD}{\HCode{<meta name="generator" content="TeX4ht (http://www.cse.ohio-state.edu/\string~gurari/TeX4ht/)" />\Hnewline}} \Configure{@HEAD}{\HCode{<link rel="stylesheet" type="text/css" href="\expandafter\csname aa:CssFile\endcsname" />\Hnewline}} \Configure{Picture}{.svg} \makeatletter \Configure{graphics*} {svg} { {\Configure{Needs}{File: \Gin@base.svg}\Needs{}} \Picture[\csname a:GraphicsAlt\endcsname]{\csname Gin@base\endcsname.svg \csname a:Gin-dim\endcsname} } % \makeatletter \Configure{graphics*} {eps}% {\Needs{"convert \csname Gin@base\endcsname.eps \csname Gin@base\endcsname.png"}% \Picture[pict]{\csname Gin@base\endcsname.png}% \special{t4ht+@File: \csname Gin@base\endcsname.png} } \begin{document} \EndPreamble
Now compile your .tex file like this (where nma.cfg below is your tex4eht .cfg
file.)
make4ht index.tex "nma,htm,pic-align,charset=utf-8,notoc*" " -cunihtf -utf8"
Make sure to inlcude \usepackage{graphicx} in your latex document! else you’ll get this
error
(/usr/local/texlive/2014/texmf-dist/tex/generic/tex4ht/html4-math.4ht)) l.34 --- TeX4ht warning --- \Configure{graphics*}? --- ! LaTeX Error: Missing \begin{document} in `nma.cfg'.
Thanks goes to Michal-h21 for help in making the above instructions.