Tue Mar 30 04:41:48 2021, original submission:
Reference and screen shots at
https://tex.stackexchange.com/questions/590609/tex4ht-does-not-scale-math-font-along-with-text-when-using-mathjax
In this MWE
======================
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\tiny
All of this font should be tiny include the math
\begin{align*}
\sin x &= 1
\end{align*}
\normalsize
All of this font should be normal include the math
\begin{align*}
\sin x &= 1
\end{align*}
\end{document}
================
Both math and text fonts sizes change when compiled to PDF.
But when compiling to HTML using tex4ht and when using mathjax option, only the text size is changed. Math size remains normal.
make4ht -ulm default foo5.tex "mathjax,htm"
The raw HTML generated is
===================
<!DOCTYPE html>
<html xml:lang='en-US' 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 href='foo5.css' type='text/css' rel='stylesheet' />
<meta name='src' content='foo5.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 async='async' id='MathJax-script' type='text/javascript' src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js'></script>
</head><body>
<!-- l. 6 --><p class='noindent'><span class='rm-lmr-5'>All of this font should be tiny include the math </span>\begin {align} \sin x &= 1 \end {align}
</p><!-- l. 11 --><p class='indent'> All of this font should be normal include the math \begin {align} \sin x &= 1 \end {align}
</p>
</body>
</html>
=============
Is this tex4ht issue or mathjax? And how to make both text and math change size at same time as the case is when compiling to PDF?
Using TL 2020 on Linux.
|