I am using htlatex to convert TeX to HTML output.
I try to keep the LaTeX equations unchanged when using the \[...\] command.
my cfg:
\Preamble{xhtml,mathml,NLM,-xtpipes,NoFonts,refcaption,DocBook}
\newtoks\eqtoks
\def\AltMath#1\]{\eqtoks{\[#1\]}%
\HCode{\the\eqtoks}}
\Configure{[]}{\expandafter\AltMath}{}
\begin{document}
\EndPreamble
But i am not getting the required equivalent of the LaTeX code in the HTML output. Lots of errors are reported during the compilation:
! Missing $ inserted.
<inserted text>
$
l.19 B_{n}\subset
C_{n}\subset A_{n}, \textrm{ and }\mu(A_{n}-B_{n})<\frac...
?
! You can't use `\eqno' in math mode.
\endmathdisplay@a ...\df@tag \@empty \else \veqno
\alt@tag \df@tag \fi \ifx ...
l.20 \end{equation}
?
! Extra }, or forgotten $.
\b:equation ->\egroup
\ifvmode \IgnorePar \fi \EndP \HCode {</td><td class="...
l.20 \end{equation}
?
! Missing $ inserted.
<inserted text>
$
l.20 \end{equation}
?
! Missing } inserted.
<inserted text>
}
l.20 \end{equation}
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing \endgroup inserted.
<inserted text>
\endgroup
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
! Missing } inserted.
<inserted text>
}
l.26 \begin{table}[!t]
?
[1] [2
]
! TeX capacity exceeded, sorry [input stack size=5000].
<to be read again>
y
l.27 ... 2\], $Bi = 0.2$\[Bi = 0.2\]\label{tab:1}}
MWE:
\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage{fixltx2e}
\usepackage[numbers,compress]{natbib}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{upgreek}
\usepackage{hyperref}
\usepackage{graphics}
\usepackage{enumerate}
\begin{document}
\noindent {Proof:} Suppose $(\mathcal{X}, \mathcal{A}_{0}, \mu)$\[(\mathcal{X}, \mathcal{A}_{0}, \mu)\] is given. There exists a compact class $\mathcal{K}$\[\mathcal{K}\] that is \hbox{$\mu$\[\mu\]-approximates} $\mathcal{A}_{0}$\[\mathcal{A}_{0}\]. Let $\{A_{n}\}\subset \mathcal{A}_{0}$\[\{A_{n}\}\subset \mathcal{A}_{0}\] such that $A_{n}\searrow\emptyset$\[A_{n}\searrow\emptyset\]. We need to show that \hbox{$\mu(A_{n})\searrow\ 0$\[\mu(A_{n})\searrow\ 0\].} For given $\epsilon>0$\[\epsilon>0\], let $B_{n}\in \mathcal{A}_{0}$\[B_{n}\in \mathcal{A}_{0}\] and $C_{n}\in \mathcal{K}$\[C_{n}\in \mathcal{K}\], such that
\begin{equation}
B_{n}\subset C_{n}\subset A_{n}, \textrm{ and }\mu(A_{n}-B_{n})<\frac{\epsilon}{2^{n}}.
\end{equation}
\[\begin{array}{lllll}
B_{n}\subset C_{n}\subset A_{n}, \textrm{ and }\mu(A_{n}-B_{n})<\frac{\epsilon}{2^{n}}.
\end{array}\]
\begin{table}[!t]
\caption{Variatation of shear stress, Nusselt number and Sherwood number at $y = d$\[y = d\] and $y = 1$\[y = 1\] while taking parameters $K_{R} =2$\[K_{R} =2\], $\alpha _{\text{T}} = 2$\[\alpha _{\text{T}} = 2\], $\alpha _{\text{c}} = 2$\[\alpha _{\text{c}} = 2\], $G_{C} =2$\[G_{C} =2\], $G_{r} = 2$\[G_{r} = 2\], $P_{r} =0.71$\[P_{r} =0.71\], $S_{c} =0.96$\[S_{c} =0.96\], $t = 2$\[t = 2\], $M = 2$\[M = 2\], $Bi = 0.2$\[Bi = 0.2\]\label{tab:1}}
{\tabcolsep=20.4pt\begin{tabular*}{\textwidth}{lrrrrrrr}
& ${\tau }_{f0}$\[{\tau }_{f0}\] & ${\tau }_{f1}$\[{\tau }_{f1}\] & \textit{Nu}\textsubscript{0} & \textit{Nu}\textsubscript{1} & \textit{Sh}\textsubscript{0} & \textit{Sh}\textsubscript{1} \\
\midrule
$\beta $\[\beta \] \\
\quad 2.0 & 0.03699 & 0.01833 & & & & \\
\quad 3.0 & 0.04127 & 0.02063 & & & & \\
\quad 4.0 & 0.04380 & 0.02200 & & & & \\
$Bi$\[Bi\] \\
\end{tabular*}}{}
\end{table}
\begin{enumerate}
\item[$k_{\lambda}{_{1w}}$\[k_{\lambda}{_{1w}}\]] Radiation absorption coefficient at the wall
\item[$e_{b{\lambda}_{1}}$\[e_{b{\lambda}_{1}}\]] Plank's function
\end{enumerate}
\end{document}
How to rectify the errors? How to get the HTML equivalent of the LaTeX Math coding? Please advise.
