[tex4ht] problem using \sl and \sc in tex4ht when using matghjax mode

Michal Hoftich michal.h21 at gmail.com
Sun Nov 18 21:34:15 CET 2018


Hi Nasser,


> Maplesoft seems to have abandoned working maintaining its
> Latex export for some other exotic math rendering software
> so no chance this will fixed by them.


That's unfortunate!

>
> I also tried using this class istead
>
> \documentclass[11pt,enabledeprecatedfontcommands]{scrartcl}%this also fail
>
> I also tried adding
>
> \makeatletter
> \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
> \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
> \makeatother
>
> But had no effect on resulting HTML.
>

This needs to be fixed in the MatJax configuration, the definitions on
TeX side don't have any effect on MathJax.

> This seems to affect only \sl and \sc commands, but there
> might be more.
>
The configuration may look like this:

------------------------------
\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",
      }
    },
    }
  });
</script>
}}
\begin{document}
\EndPreamble
-------------------------

MathJax doesn't seem to support small caps, so we must fakt it a bit.
You may need to add more command definitions to the macros section in
the config file. Note that you can use only command supported by
MathJax. I am not sure if it is a good idea to to add these
definitions to mathjax-latex-4h.

Best regards,
Michal


More information about the tex4ht mailing list