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

Nasser M. Abbasi nma at 12000.org
Sun Nov 18 20:27:02 CET 2018

There is problem translating Latex code to HTML when using
mathjax mode when latex uses the old \sl and \sc commands.

This is code generated by Maple Latex so it is not possible
to change it and not practical to edit it by hand each time
since this is autogenerated each time the files are compiled.

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.

I do not know what I need to change in mathjax-latex-4ht.sty
to fix this.

Here is a MWE



\begin{align*} %code below is copied from part of Maple's Latex
u  &= s{{\sl I}_{0}} \\
    &= s{{\sc I}_{0}} \\
    &= s{{\rm I}_{0}}


When compiled using mathjax mode, it gives


I also tried using this class istead

\documentclass[11pt,enabledeprecatedfontcommands]{scrartcl}%this also fail

I also tried adding


But had no effect on resulting HTML.

This seems to affect only \sl and \sc commands, but there
might be more.

Is it possible to change mathjax-latex-4ht.sty to work around this?

The command I used to compile is the same as before and described

make4ht -ulm default  -c ./nma_mathjax.cfg report.tex
       "htm,0,notoc*,p-width,charset=utf-8" " -cunihtf -utf8"

Where nma_mathjax.cfg is


And mathjax-latex-4ht.sty is from



This problem only shows with mathjax. No problem when using SVG.

Thank you for any help.


More information about the tex4ht mailing list