[tex4ht] Inline math conversion

Michal Hoftich michal.h21 at gmail.com
Fri Mar 24 09:54:16 CET 2017


Hi MadYuv,

> In LaTeX output, I got roman output for the text "const." $dx/dt = +v_{0} =
> {\rm const.}$, but the same text came in italic tag in HTML conversion, how
> can I fix the same?

you can use $dx/dt = +v_{0} = {\mathrm{const.}}$., or
\usepackage{amsmath} and \text instead of \mathrm. I think that \rm is
deprecated for quite some time.

> And, inside enumerate environment, for any special number output, I've used
> as \item[1$'$], and I require the text which are comes inside optional
> square brackets in HTML file too, but currently this was omitted...


Regarding custom enumerate labels, the current configuration removes
generated labels and relies on HTML rendering for numbering. If you
want to use custom labels, you can try the following configuration
file:


\Preamble{xhtml}

\def\finishpar{\ifvmode\IgnorePar\fi\EndP}
\ConfigureList{enumerate}
   {\finishpar\HCode{<div class="myenumerate">}\ShowPar%
    \bgroup%
    \def\EndDefItem{}%
   }
   {\finishpar\EndDefItem\egroup%
     \finishpar\HCode{</div>}\ShowPar\par%
   }
   {\finishpar\EndDefItem\HCode{<div class="myenumitem"><span
class="myenumhead">}%
   \def\EndDefItem{\HCode{</div>}}%
 }
   {\HCode{</span>}\par}%

\Css{  .myenumitem .myenumhead{
float: left;
clear: left;
width: 40px;
font-weight: bold;
}}

\Css{.myenumitem p {margin-left:45px;}}

\begin{document}

\EndPreamble


Best regards,
Michal


More information about the tex4ht mailing list