I am working on 2 rendering, the first one with the classical latex command
and the other with htlatex command
(tex4ht).
I have defined the following \newcommand :
\newcommand{\btFma}[2]{$\mathfrak{e}_{\mathbf{#1}}$$_{}$$^{\mathbf{#2}}$}
\newcommand{\btFmb}[2]{$\mathfrak{e}^{\mathbf{#1}}$$_{}$$_{\mathbf{#2}}$}
and use them like this :
\begin{equation}
\,\,\,\,\textrm{\btFma{i}{j}}=\beq{e_{i}}\otimes\beq{e^{j}}\,\,\,\,;\,\,\,\,\textrm{\btFmb{i}{j}}=\beq{e^{i}}\otimes\beq{e_{j}}
\end{equation}
The rendering with latex command
is what I expect :
You can notice that I want for each of \newcommand
a little shift between upper and lower indices.
My issue is that I can't reproduce the same rendering with htlatex command
. Here what is displayed on generated HTML page :
It seems that MathJax doesn't take into account the 2 \newcommand
.
I produce the HTML page with the following command :
htlatex source.tex config_mathjax
and config file "config_mathjax
" :
\Configure{@HEAD}{\HCode{
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
Macros: {
\unexpanded{
beq: ['{\\mathbf\{\#1\}}',1],
btFma: ['{\$\\mathfrak\{e\}_\{\\mathbf\{\#1\}\}\$\$_\{\}\^\{\\mathbf\{\#2\}\}\$}',2],
btFmb: ['{\$\\mathfrak\{e\}\^\{\\mathbf\{\#1\}\}\$\$\^\{\}_\{\\mathbf\{\#2\}\}\$}',2],
},
equationNumbers: { autoNumber: "AMS" }
},
extensions: ["tex2jax.js"],
tex2jax: {
\unexpanded{
inlineMath: [ ['\$','\$'], ["\\\\(","\\\\)"] ],
displayMath: [ ['$$','$$'], ['\begin{equation}','\end{equation}'], ['\begin{align}','\end{align}'], ["\\[","\\]"] ],}
processEscapes: true
}
});
</script>
}}
I don't understand why htlatex
doesn't take into accound these 2 \newcommand
.
Maybe the \newcommand
\bFma and \bFmb are too complex for htlatex, if someone knows how to simplify them, I will take them.
And if someone has or had the same type of issue, this would be fine to tell me how to circumvent it.
Regards
tex4ht
issue, it passes math input verbatim toMathJax
, as expected.MathJax
doesn't render your commands for some reason