[tex4ht] another strange error when using make4ht with mathjax mode

Nasser M. Abbasi nma at 12000.org
Fri Oct 26 19:39:54 CEST 2018


On 10/26/2018 12:03 PM, William F Hammond wrote:
> "Nasser M. Abbasi" <nma at 12000.org> writes:
> 
>> This MWE only fails to compile when using make4ht in mathjax mode.
> 
> I think it is more serious than whether or not mathjax is used.
> 
>> It is snippet from old code. May be not well written. But
>> this used to compile OK and still compiles OK when not using
>> mathjax mode in make4ht.
>>
>> --------------------------------
>> \documentclass[11pt]{article}
>> \usepackage{amsmath,mathtools,amssymb}
>>
>> \begin{document}
>> \begin{tabular}[c]{|l|l|}\hline
>> $
>>     \begin{tabular}[c]{l}%
>>       $i\in C(J)$\\
>>       $j\notin C(J)$
>> \end{tabular}
>> $ & $f_{ij}=0$\\\hline
>> \end{tabular}
>> \end{document}
>> ------------------------------------
> 
> Why place "tabular" inside math, especially inline math?
> 

I use Scientific word. This is very old document for a HW. May be
10 years old. I must have selected the table in the GUI and then
pressed math mode button. This made SW put a $$ around the table.

The point is, this compiles with no problem. I've compiled this folder
many times before when I run make on the source tree, It only gives
now since I am using mathjax mode.

Agree, I would not select math mode now when making table like this
in SW. I will try to change it in SW.

> This cannot sensibly become HTML because one cannot put a block element
> -- <table> -- inside an inline element -- <math display="inline">.
> 
> Making use of a suitable LaTeX profile should trap problems of this
> type.
> 
> (I find that simply removing the '$' markup in the first
> cell of the outer tabular surrounding the inner tabular will
> fix it.)
> 
> 
>                                      -- Bill

Yes. Removing $$ from outside inner table removes the error.
But again, if this is an invalid latex, then lualatex should give
an error. But it compiles it with no error. Using TL 2018.

Thank you,
--Nasser


More information about the tex4ht mailing list