[tex4ht] [bug #456] what is so special about $\ln$ when using tex4ht in mathjax mode?
Nasser M. Abbasi
puszcza-hackers at gnu.org.ua
Sun Apr 19 02:20:02 CEST 2020
URL:
<http://puszcza.gnu.org.ua/bugs/?456>
Summary: what is so special about $\ln$ when using tex4ht in
mathjax mode?
Project: tex4ht
Submitted by: nma123
Submitted on: Sun 19 Apr 2020 03:19:12 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/539385/what-is-so-special-about-ln-when-using-tex4ht-in-mathjax-mode
When using mathjax mode in tex4ht, it fails to render section title which
contain $\ln$ but works for all other symbols I tried so far.
What is so special about $\ln$ ?
MWE
===================
\documentclass[11pt]{article}%
\usepackage{amsmath}
\begin{document}
This is a document
\section{$\int \arcsin(x) \ln x \,dx$}
test
\section{$\int \arcsin(x) \sqrt x \,dx$}
test
\section{$\int \arcsin(x) \sin x \,dx$}
\end{document}
=====================
It must be compiled as follows to see the problem
make4ht -ulm default foo.tex "htm,1,mathjax"
In the above, the split level is 1. Anything more than 0 is needed to show the
problem.
Now the HTML looks like this (please see link above. Do not know how to add
graphics here)
Not using mathjax mode with tex4ht also solves the problem.
Here is the raw HTML generated. Notice that \qopname \relax o{ln}x is
generated by tex4ht before mathjax does anything.
=============================
<!DOCTYPE html>
<html lang="en-US" xml:lang="en-US" >
<head><title></title>
<meta charset="utf-8" />
<meta name="generator" content="TeX4ht (http://www.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 type="text/x-mathjax-config"> MathJax.Hub.Config({ 'fast-preview':
{disabled: true}, TeX: { extensions: ["color.js","AMSmath.js"],
equationNumbers: { autoNumber: "AMS" } }, extensions: ["tex2jax.js"], tex2jax:
{ inlineMath: [ ["\\\(","\\\)"] ], displayMath: [ ['$$','$$'], ["\\[","\\]"]
], processEscapes: true, processEnvironments: true } }); </script>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head><body
>
<!--l. 6--><p class="noindent" >This is a document
</p>
<div class="tableofcontents">
<span class="sectionToc" >1 <a
href="#x1-10001" id="QQ2-1-1">\(\int \arcsin (x) \qopname \relax o{ln}x
\,dx\)</a></span>
<br /> <span class="sectionToc" >2 <a
href="#x1-20002" id="QQ2-1-2">\(\int \arcsin (x) \sqrt x \,dx\)</a></span>
<br /> <span class="sectionToc" >3 <a
href="#x1-30003" id="QQ2-1-3">\(\int \arcsin (x) \sin x \,dx\)</a></span>
</div>
<h3 class="sectionHead"><span class="titlemark">1 </span> <a
id="x1-10001"></a>\(\int \arcsin (x) \ln x \,dx\)</h3>
<!--l. 9--><p class="noindent" >test
</p><!--l. 11--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">2 </span> <a
id="x1-20002"></a>\(\int \arcsin (x) \sqrt x \,dx\)</h3>
<!--l. 12--><p class="noindent" >test
</p><!--l. 14--><p class="noindent" >
</p>
<h3 class="sectionHead"><span class="titlemark">3 </span> <a
id="x1-30003"></a>\(\int \arcsin (x) \sin x \,dx\)</h3>
</body>
</html>
==================
Is this a bug in tex4ht?
TL 2019 on Linux
_______________________________________________________
Reply to this item at:
<http://puszcza.gnu.org.ua/bugs/?456>
_______________________________________________
Message sent via/by Puszcza
http://puszcza.gnu.org.ua/
More information about the tex4ht
mailing list.