[tex4ht] Problem rendering operator name in HTML when using mathjax mode.
Nasser M. Abbasi
nma at 12000.org
Mon Nov 19 01:26:08 CET 2018
I just found a new problem that I can't resolve.
I had to use
\newcommand{\LommelS}[1]{\operatorname{LommelS#1}}
To correctly compile code in Latex generated by Maple.
I could not use \DeclareMathOperator{\LommelS1}{LommelS1}
since a number can't be at end of operator. I posted question
about this here
https://tex.stackexchange.com/questions/460667/declaremathoperator-not-working-on-some-math-names-with-a-number-at-the-end
And the answer given is what I am using. So the following MWE
works fine in lualatex and pdf
=====================
\documentclass[11pt]{article}
\usepackage{amsmath,mathtools,amssymb}
\newcommand{\LommelS}[1]{\operatorname{LommelS#1}}
\begin{document}
\[
\LommelS1 x + \LommelS2 y
\]
\end{document}
=========================
However, when compiled using make4ht with mathjax mode
it does not work. It gives this
https://www.12000.org/tmp/11182018/screen_shot_2.jpg
I tried to do same Trick like Michal showed and changed my .cfg
to use
\Configure{@HEAD}{\HCode{
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
\unexpanded{
sc : "\\small\\rm",
sl: "\\it",
LommelS1: "\\LommelS1 ",
LommelS2: "\\LommelS2 "
}
},
}
});
</script>
}}
Tried few other things above, but nothing is working.
I do not understand what mathjax wants me to type above.
There is no issue when compiling with SVG.
Is command such as \newcommand{\LommelS}[1]{\operatorname{LommelS#1}}
not supported in the translation to HTML using mathjax?
I used sthe ame command to compile this as I just showed in last email.
But for completion, here they are
make4ht -ulm default -c ./nma_mathjax.cfg report.tex
"htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8"
Where nma_mathjax.cfg is
-------------------------
\RequirePackage{mathjax-latex-4ht}
\Preamble{xhtml}
\begin{document}
\EndPreamble
-------------------
Any workaround with this issue?
Thank you
--Nasser
More information about the tex4ht
mailing list