0

This is problem specific to tex4ht only.

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"

The HTML output looks like this

Mathematica graphics

When compiling the same file using lualatex foo.tex the output in pdf looks like

Mathematica graphics

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 &amp; 2\\ 1 &amp; \alpha \\ \end{bmatrix}\] </p> 
</body> 
</html>

Using TL 2020 on Linux

  • I would say that this is the MathJax issue – michal.h21 May 10 '20 at 17:53
  • @michal.h21 thanks Michal for looking into it. In this case I will enter a bug report for mathjax today on this using the above as an example. – Nasser May 10 '20 at 17:54
  • That will be probably the best thing to do :) – michal.h21 May 10 '20 at 17:56
  • @michal.h21 FYI, here is link to the bug report. github.com/mathjax/MathJax/issues/2431 – Nasser May 10 '20 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.