0

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.

\begin{equation}
\hat{\mathbf{E}} 
\end{equation}

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 '19 at 06:57

1 Answers1

1

Please try with the below:

%% 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...

MadyYuvi
  • 13,693
  • 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. –  Jun 28 '19 at 07:47
  • @JoleT Glad to hear that you fixed the issue... – MadyYuvi Jun 28 '19 at 09:06
  • It didn't fix the issue. Please re-read the comment above. –  Jun 28 '19 at 09:07
  • I am outputting all of my equations in .svg per the pic-m command line option and \Preamble{xhtml}, so class="bold" ... I believe are not being used? –  Jun 28 '19 at 16:59
  • 1
    @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 '19 at 18:07
  • this was resolved, so thanks for the help. works like a charm, so no problems with MiKTeX 2.9, tex4ht, or DOS paths, and cmd escapes, etc. –  Jun 28 '19 at 18:43
  • 1
    this was resolved, so thanks for the help. works like a charm, so no problems with MiKTeX 2.9, tex4ht, or DOS paths, and cmd escapes, etc. –  Jun 28 '19 at 18:44
  • @Michal.h21 - the pictures look just like the equations in the pdf. –  Aug 06 '19 at 15:48