bugtex4ht - Bugs: bug #581, tex4ht does not show some math in...

 
 
Show feedback again

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

bug #581: tex4ht does not show some math in table

Submitted by:  Nasser M. Abbasi <nma123>
Submitted on:  Sat Nov 19 18:42:47 2022  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Sat Nov 19 19:05:54 2022, comment #1:

I would say that this is an issue in MathJax. As I already said in my answer on TeX.sx, it seems to interpret the square brackets after start of the aligned environment as an optional parameter, so it discards it. Use this instead:

\begin{aligned}
\left[y \left(0\right) = 3\right]
\end{aligned}

Michal Hoftich <michal_h21>
Project Member
Sat Nov 19 18:42:47 2022, original submission:

reference and screen shots at

https://tex.stackexchange.com/questions/665779/tex4ht-does-not-show-some-math-in-table

This MWE makes one small table of 2 rows of type p. The first row has has two math equations. tex4ht only shows the first one but not the second. While compiling with lualatex to pdf shows both as expect.

------------------------
\documentclass[12pt]{book}
\usepackage{amsmath,mathtools}
\usepackage{array}

\begin{document}
\begin{tabular}{|p{.6in}|>{\setlength\columnwidth{5.8in}}p{5.8in}|}\hline
ODE&\vspace{-2em}\begin{gather*}
y^{\prime}-1-2 x=0
\end{gather*}
With initial conditions
$
\begin{aligned}
[y \left(0\right) = 3]
\end{aligned}
$
\\ \hline
program solution&\vspace{-1em}
\begin{align*}
y \left(x \right) = x^{2}+x +3
\end{align*}
Verified OK.
\\ \hline
\end{tabular}

\end{document}
-----------------------------

the pdf shows the math on the right in first row. But HTML does not.

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

Here is the raw HTML generated. I see the missing math is there, but it is not displayed but it is sitting there doing nothing.

------------------------------------
<!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='foo.css' rel='stylesheet' type='text/css' />
<meta content='foo.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>
<div class='tabular'> <table class='tabular' id='TBL-1'><colgroup id='TBL-1-1g'><col id='TBL-1-1' /></colgroup><colgroup id='TBL-1-2g'><col id='TBL-1-2' /></colgroup><tr class='hline'><td></td><td></td></tr><tr id='TBL-1-1-' style='vertical-align:baseline;'><td class='td11' id='TBL-1-1-1' style='white-space:normal; text-align:left;'> <!-- l. 18 --><p class='noindent'>ODE </p></td>
<td class='td11' id='TBL-1-1-2' style='white-space:normal; text-align:left;'> <!-- l. 20 --><p class='noindent'>\begin {gather} y^{\prime }-1-2 x=0 \end {gather} With initial conditions \( \begin {aligned} [y \left (0\right ) = 3] \end {aligned} \)
</p></td></tr><tr class='hline'><td></td><td></td></tr><tr id='TBL-1-2-' style='vertical-align:baseline;'><td class='td11' id='TBL-1-2-1' style='white-space:normal; text-align:left;'> <!-- l. 28 --><p class='noindent'>program
solution </p></td><td class='td11' id='TBL-1-2-2' style='white-space:normal; text-align:left;'> <!-- l. 31 --><p class='noindent'>\begin {align} y \left (x \right ) = x^{2}+x +3 \end {align}
</p><!-- l. 32 --><p class='noindent'>Verified OK. </p></td>
</tr><tr class='hline'><td></td><td></td></tr></table> </div>

</body>
</html>
--------------------------------

Using TL 2022 on linux

>which tex4ht

/usr/local/texlive/2022/bin/x86_64-linux/tex4ht

>make4ht --version

make4ht version v0.3l

>


How to correct this so that the math shows up in HTML?

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
    Tue Nov 29 10:07:40 2022michal_h21Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray