# tex4ht: italicized matrices inline and display mode when using \mathbf{X}

I have had good experience with tex4ht (htlatex), but in a new article I am compiling, there are random cases where inline and display mode matrices are in italics when using $\mathbf{L}$ for inline and e.g.

$$\hat{\mathbf{E}}$$


for display mode. Is this likely due to not using  or $...$ for html projects?

• the default tex4ht configuration compiles your example to picture which keeps the used style. other solutions that should work is to use "mathjax" or "mathml,mathjax" tex4ht options on the command line or in the configuration file – michal.h21 Jun 28 at 6:57

%% your own.cfg%%
\Configure{mathbf}%
{\bgroup \Tg<span class="bold">\PauseMathClass}%
{\EndPauseMathClass\Tg</span>\egroup }%
%


Also, refer michal's suggestion on More TeX4ht issues with chrome and safari for better clarification...

• Thanks, but adding that configuration to the .cfg and recompiling didn't fix the issue. Also, I only use \Preamble{xhtml} in the .cfg, since I am using the high-resolution .svg equation files, and not the default .png. This is accomplished by using a command line like htlatex myfile.tex "myfile.cfg,charset=utf-8,pic-m" " -utf8 -cunihft", which is performed by the pic-m option. – JoleT Jun 28 at 7:47
• @JoleT Glad to hear that you fixed the issue... – MadyYuvi Jun 28 at 9:06
• It didn't fix the issue. Please re-read the comment above. – JoleT Jun 28 at 9:07
• I am outputting all of my equations in .svg per the pic-m command line option and \Preamble{xhtml}, so <span> class="bold" ... I believe are not being used? – JoleT Jun 28 at 16:59
• @JoleT when you use pictures, the math should look exactly the same as in the PDF. does it look correct in the PDF? there may be some issue caused by some package or macro – michal.h21 Jun 28 at 18:07