[tex4ht] Problem rendering operator name in HTML when using mathjax mode.

Michal Hoftich michal.h21 at gmail.com
Mon Nov 19 08:52:54 CET 2018


Hi Nasser,

>
> 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>
> }}
>

You must provide declaration for the \LommelS macro:

\RequirePackage{mathjax-latex-4ht}
\Preamble{xhtml}
\Configure{@HEAD}{\HCode{
<script type="text/x-mathjax-config">
   MathJax.Hub.Config({
     TeX: {
       Macros: {
         \unexpanded{
         sc : "\\small\\rm",
         sl: "\\it",
        LommelS: ["\\operatorname{LommelS\#1}",1],
       }
     },
     }
   });
</script>
}}
\begin{document}
\EndPreamble


You can use the same declaration as Egreg provided, it is just
necessary to declare it to have a parameter. See the MathJax
documentation for this:

https://docs.mathjax.org/en/latest/tex.html#defining-tex-macros

Best,
Michal


More information about the tex4ht mailing list