[tex4ht] about \dag and \ddag in tex4ht with mathjax
Nasser M. Abbasi
nma at 12000.org
Wed Apr 3 09:59:15 CEST 2019
Hello;
mathjax does not support \dag and \ddag. I had to use
them since Scientific word I use to generate Latex
does not generate \dagger and \ddagger only \dag and \ddag.
MWE
=========================
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$A^\dag$
$B^\ddag$
\end{document}
==============================
The above does not work in mathjax mode
>make4ht foo.tex "mathjax"
First question: Why \renewcommand did not work in
the following example
-----------------
\documentclass{article}
\usepackage{amsmath}
\renewcommand{\dag}{\dagger}
\begin{document}
$A^\dag$
\end{document}
-------------------
>make4ht foo.tex "mathjax"
It had no effect on mathjax mode. Same as before, the
\dag still did not render.
I found I had to edit my .cfg and add this to it to make it work
--------------------------------------------
%thanks to Michal Hoftich. Added Nov 18, 2018 to handle Maple Latex export problem
\Configure{@HEAD}{\HCode{
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
noalign: ["\#1", 1],
medskip: "",
\unexpanded{
sc : "\\small\\rm",
sl: "\\it",
LommelS: ["\\operatorname{LommelS\#1}",1],
sinc: ["\\operatorname{sinc}"],
dag: ["\\dagger"], %ADDED THIS NOW
ddag: ["\\ddagger"], %ADDED THIS NOW
tauL: "\\tau L"
}
},
}
});
</script>
}}
-----------------------------------
Now it worked when compiled in mathjax mode using
the above .cfg file
My question is why \renewcommand did not work, I
remember seeing something like this before, something
to do with order how things are processed?
and is it possible to add the above configuration of
dag and ddag to the official make4ht mathjax style file
itself so it is there by default all the time instead
of adding it to the .cfg file?
I am using TL 2018 on Linux.
Thanks
--Nasser
More information about the tex4ht
mailing list