# Display equation also needs to convert as HTML tag (TeX4ht)

Is this possible to get the simple math as in HTML tag in display math? My tags are follows:

\documentclass{book}

\begin{document}

This is for test $a+b=c$

$a+b=c\qquad p_1 = \frac{m}{x_1}- p_2.$

$ab$

\end{document}


In inlinemath, simple math, example $a+b=c$ converted as HTML tag, but the same content in display math, then it was converted as image, but I need simple math should convert as HTML tag in both display and inline math? Please advise...

Try this configuration:

\Preamble{xhtml}
\Configure{[]}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="displaymath">}\bgroup$$\everydisplay{}\everymath{}}{$$\egroup\HCode{</div>}}
\Configure{$$}{\ifvmode\IgnorePar\fi\EndP\HCode{<div class="displaymath">}\bgroup\everydisplay{}\everymath{}}{\egroup\HCode{</div>}}{} \begin{document} \EndPreamble  It configures both  and $$..., the math is placed in <div class="displaymath"> element.

Result:

<!--l. 5--><p class="noindent" >This is for test <span
class="cmmi-10">a </span>+ <span
class="cmmi-10">b </span>= <span
class="cmmi-10">c</span>
</p>
<div class="displaymath">
<span
class="cmmi-10">a </span>+ <span
class="cmmi-10">b </span>= <span
class="cmmi-10">c     p</span><sub><span
class="cmr-7">1</span></sub> = <img
src="sample0x.png" alt="m-
x1"  class="frac" align="middle" /> <span
class="cmsy-10">− </span><span
class="cmmi-10">p</span><sub><span
class="cmr-7">2</span></sub><span
class="cmmi-10">.</span>
</div>
<div class="displaymath">
<span
class="cmmi-10">ab</span>
</div>

• what a lovely and fast reply! it is working fine...thanks a lot... – MadyYuvi Nov 27 '18 at 10:45
• Sorry one more question, is it possible to convert \widehat, \widetitle, \langle and \rangle ? These tags are converted as image... – MadyYuvi Nov 27 '18 at 11:17
• @MadyYuvi yes, there is still lot of commands that are converted as images, usually because it is not easy to convert them as HTML – michal.h21 Nov 27 '18 at 13:26