[tex4ht] [bug #504] tex4ht does not scale math font along with text when using mathjax

Nasser M. Abbasi puszcza-hackers at gnu.org.ua
Tue Mar 30 06:45:03 CEST 2021


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

                 Summary: tex4ht does not scale math font along with text when
using mathjax
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Tue 30 Mar 2021 07:41:48 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 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.






    _______________________________________________________

Reply to this item at:

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

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


More information about the tex4ht mailing list.