[tex4ht] [bug #462] tex4ht problem with mathjax when using array with text{}

Nasser M. Abbasi puszcza-hackers at gnu.org.ua
Sat May 9 10:35:02 CEST 2020


URL:
  <http://puszcza.gnu.org.ua/bugs/?462>

                 Summary: tex4ht problem with mathjax when using array with
text{}
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Sat 09 May 2020 11:33:38 AM EEST
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:


Reference

https://tex.stackexchange.com/questions/543136/problem-using-tex4ht-in-mathjax-mode-when-using-array-with-text

When compiling this MWE

==============
\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}

\[%
\begin{array}
[c]{c}%
\text{{\small bottom edge}}\\
\text{{\small bottom edge}}\\
\end{array}%
\begin{bmatrix}
\alpha & 2\\
1 & \alpha \\
\end{bmatrix}%
\]
\end{document}

=======================

Using the command

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

it produces bad output (please see screen shot in the above link).

When compiling the same file using lualatex foo.tex the output in pdf is
correct.

How to make tex4ht output the same as in the pdf?

The raw HTML generated by tex4ht is

=====================
<!DOCTYPE html> 
<html lang="en-US" xml:lang="en-US" > 
<head><title></title> 
<meta  charset="utf-8" /> 
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)" /> 
<meta name="viewport" content="width=device-width,initial-scale=1" /> 
<link rel="stylesheet" type="text/css" href="foo.css" /> 
<meta name="src" content="foo.tex" /> 
 <script> window.MathJax = { tex: { tags: "ams", inlineMath: [ ["\\\(","\\\)"]
], displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true,
processEnvironments: true, packages: ['base', 'color', 'ams'] }, loader: {
load: ['[tex]/color', '[tex]/ams'] } }; </script> 
 <script type="text/javascript" async="async" id="MathJax-script"
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js"></script> 

</head><body 
>
<!--l. 18--><p class="noindent" >\[\begin{array} [c]{c}\text{{\small bottom
edge}}\\ \text{{\small bottom edge}}\\ \end{array}\begin{bmatrix} \alpha &
2\\ 1 & \alpha \\ \end{bmatrix}\] </p> 
</body> 
</html>
=================

Using TL 2020 on Linux







    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?462>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/


More information about the tex4ht mailing list.