Closed yalguzaq closed 1 year ago
Try this configuration file:
\Preamble{xhtml}
\catcode`\:=11
\makeatletter
\def\:closemi{\HCode{</\a:mathml mi>}\EndPauseMathClass}
\def\bf{\ifmmode\expandafter\@firstoftwo\else\expandafter\@secondoftwo\fi{\PauseMathClass\HCode{<\a:mathml mi mathvariant="bold">}\aftergroup\:closemi}{\bfseries}}
\makeatother
\catcode`\:=12
\begin{document}
\EndPreamble
In general, font switch commands are quite hard to support.
Will this be included in the next make4ht
version or should I keep this in my cfg
file indefinitely?
I can add it to the mathml
output in TeX4ht. Does it work well in your files?
I am busy this week, but I can add it next week, if it works correct.y
Yes, I confirm that this is a solution to my issue. Thanks a lot.
Will this also be included as the default behaviour for mathjax?
I think this example works in MathJax? But in general, you can pass a definition for unknown commands to MathJax, see this example.
LaTeX:
$$\left({\bf E}|X|^p\right)^{\frac{q}{p}} \leq {\bf E} |X|^q$$
Compilation command:
make4ht markup.tex 'mathml,mathjax'
Erroneous output:![image](https://user-images.githubusercontent.com/116675649/200186696-824f40bc-e339-4ade-a0e1-0fcef9da2b38.png)
Correct output:![image](https://user-images.githubusercontent.com/116675649/200186857-c8cded63-fd79-410e-b096-83925a29c7f1.png)
The problem summary: E is not shown in bold when given inside
{\bf ...}
environment. This is a widespread command among TeX users.