bugtex4ht - Bugs: bug #557, tex4ht no longer process some...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #557: tex4ht no longer process some math. What is the cause?

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Thu Mar 24 21:20:55 2022  
 
Category: NonePriority: 5 - Normal
Severity: 7 - ImportantStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu Mar 24 22:50:16 2022, comment #2:

Hi Nasser, thanks for the confirmation that it works. I think we can close this now.

Michal Hoftich <michal_h21>
Project Member
Thu Mar 24 22:21:19 2022, comment #1:

Hi Nasser,

thanks for the report. I changed the way how environments are handled to use just internal LaTeX commands. It seems that this caused this issue. I've added extra \detokenize to the sources. It works for your example.

Best,
Michal

Michal Hoftich <michal_h21>
Project Member
Thu Mar 24 21:20:55 2022, original submission:

reference and screen shots at

https://tex.stackexchange.com/questions/638304/tex4ht-no-longer-process-some-math-what-is-the-cause

This looks like a new serious problem.

I have a document that used to compile OK with tex4ht. I have not build it for someone. Today when I build it to HTML it is not able to convert some math to HTML.

This only happens when using mathjax mode. The math is all valid amsmath package math so One would expect mathjax to handle it directly.

Here is MWE
=====================
\documentclass[12pt]{book}
\usepackage{amsmath}
\begin{document}
\begin{align}%
\begin{Bmatrix}
c_{1}\\
c_{2}\\
c_{3}\\
c_{4}%
\end{Bmatrix}
& =%
\begin{pmatrix}
1 & -a & -b & ab\\
1 & a & -b & -ab\\
1 & a & b & ab\\
1 & -a & b & ab
\end{pmatrix}
^{-1}\tag{2}%
\end{align}
\end{document}
====================
And now

make4ht -ulm default -a debug foo2.tex "mathjax,htm"

gives HTML error (screen shot)

tex4ht compiles it OK when removing mathjax options, which indicates mathjax is either not able to handle this correctly or tex4ht generated wrong HTML? But then how did it work OK before?

Here is the raw HTML

==================
<!DOCTYPE html>
<html lang='en-US' xml:lang='en-US'>
<head><title></title>
<meta charset='utf-8' />
<meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' />
<meta content='width=device-width,initial-scale=1' name='viewport' />
<link href='foo2.css' rel='stylesheet' type='text/css' />
<meta content='foo2.tex' name='src' />
<script>window.MathJax = { tex: { tags: "ams", }, }; </script>
<script async='async' id='MathJax-script' src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js' type='text/javascript'></script>
</head><body>
<!-- l. 33 --><p class='noindent'>\begin {align} \csname @begin:Bmatrix\endcsname \choose:begin {\let \choose:begin \@firstoftwo \ifx \EndPicture \:Undef \PushStack \envn:list \n:list \SaveEverypar \fi \let \chk:pic \EndPicture \ifx \EndPicture \:UnDef \list:save \let \after:end \empty \csname before:beginBmatrix\endcsname \fi \UseHook {env/Bmatrix/before}\@ifundefined {Bmatrix}{\def \reserved@a {\@latex@error {Environment Bmatrix undefined}\@eha }}{\def \reserved@a {\def \@currenvir {Bmatrix}\edef \@currenvline {\on@line }\ifx \EndPicture \:UnDef \ifx \this:listConfigure \empty \null:listConfigure \csname onBmatrix:list\endcsname \fi \fi \@execute@begin@hook {Bmatrix}\csname Bmatrix\endcsname }}\global \@ignorefalse \begingroup \@endpefalse \reserved@a }{\o:begin: {Bmatrix}} c_{1}\\ c_{2}\\ c_{3}\\ c_{4}\end {Bmatrix} &amp; =\begin {pmatrix} 1 &amp; -a &amp; -b &amp; ab\\ 1 &amp; a &amp; -b &amp; -ab\\ 1 &amp; a &amp; b &amp; ab\\ 1 &amp; -a &amp; b &amp; ab \end {pmatrix} ^{-1}\tag {2} \end {align}
</p>

</body>
</html>
===================

What has changed to cause this math no longer to work in mathjax mode of tex4ht?

Using TL 2021, fully updated about 2 week ago. On Linux ubuntu.

Thanks
--Nasser

Nasser M. Abbasi <nma123>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by nma123 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    1 latest change follows.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Mar 24 22:50:16 2022michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray