Follow-up Comment #1, bug #664 (project tex4ht):
I will reporst my asnwer from TeX.sx here. But TLDR: it is not possible to use
tabular inside math with MathJax.
----
Why do you put the whole tabular into inline math? In MathJax mode (used by
TeX4ht), when you open any mathematical environment, TeX4ht will keep reading
everything until it finds the corresponding closing delimiter. In this case,
it interprets your code as:
$ \begin{tabular}[c]{l}
$
This fragment is then inserted verbatim into the output HTML. After that,
TeX4ht reads i\in C(J) in text mode, which produces even more errors.
If you really want your table to appear in math mode, you must use different
delimiters for the outer and inner math expressions. For example:
\documentclass[10pt]{article}
\usepackage{amsmath} % pro jistotu
\begin{document}
\begin{tabular}{|l|}
\hline
\begin{tabular}{l}
\(i \in C(J)\)\\
\(j \in C(J)\)
\end{tabular}
\\\hline
$
\begin{tabular}{l}
\(i \in C(J)\)\\
\(j \notin C(J)\)
\end{tabular}
$
\\\hline
\end{tabular}
\end{document}
This code ensures that TeX4ht outputs everything inside $ \begin{tabular} ...
\end{tabular} $ verbatim to the HTML file without causing compilation errors.
However, you’ll then notice that MathJax doesn’t support tabular at all
— the resulting HTML will display an error like this:
mathjax error message about unknown command \begin{tabular}
So the best solution is to just not use math delimiters around tabular:
_______________________________________________________
Reply to this item at: <https://puszcza.gnu.org.ua/bugs/?664>
_______________________________________________
Message sent via/by Puszcza <https://puszcza.gnu.org.ua/>