[tex4ht] Inline math conversion

Michal Hoftich michal.h21 at gmail.com
Thu Mar 16 14:43:02 CET 2017

Hi MadYuv,

> In my document, I need all math (both inline and display) as in HTML format,
> for this, I used the below commands for conversion:
> htlatex filename "xhtml" " -cunihft" "-cvalidate"
> Everything works fine, but when the fraction commands comes with some arabic
> numbers then the tool converts arabic numbers separately and kept the
> fraction separtely, e.g.,
> $92 \frac{1}{2}$ converted as 92<img src="test6x.png" alt="12"  class="frac"
> align="middle" />
> but my requirement is 92 also should be the math.

contents of inline math are converted to HTML elements by default,
only when you use something what's not easily convertible to HTML,
such as fractions or square roots, it is converted to picture. You can
request conversion of the whole inline math to picture using `pic-m`
or `pic-m+` options. Similar options exists also for equations and
similar environments. See http://cvr.cc/?p=504 for the list of
possible options. In particular those which start with `pic-`.

Btw, if you want to get Unicode html, you should use

      htlatex filename "xhtml,charset=utf-8,pic-m" " -utf8 -cunihft"

alternatively, you can use

    make4ht -u filename "pic-m" "" " -cvalidate"

which is equal to the former method.

Best regards,

More information about the tex4ht mailing list