#92 math class inside math-display class, jsMath compatibility

Rob Beezer

The code below is generated by tex4ht, quite often. Yes, it looks like a bad idea. But it previously rendered in jsMath. It is behaving badly in MathJax's jsMath compatibility mode.

Why do this? tex4ht generates a CSS file with several lines like

math .textit { font-style: italic; }

but no analogues for math-display, so maybe the inner div is a cheap way to pass in the font info? I can't say for certain. Right now, this is the only other major systemic problem I'm seeing across several chapters of a textbook converted by tex4ht.

SVN 592, only the jsMath2jax.js extension active, skeleton HTML file, up-to-date Firefox on Ubuntu.

Verbatim code, screenshot attached:

<div class="math-display"><div class="math"
gH = \{gh : h &#x2208; H\}.


  • Rob Beezer

    Rob Beezer - 2010-08-27
  • Davide P. Cervone

    OK, thanks for the report. I have fixed it in SVN 593. The jsMath2tex preprocessor was looking for the regular expression \bmath\b in the class, and the "-" in "math-display" counts as a word boundary, so the outer DIV was being taken as the math indicator rather than the inner one. I have changed the pattern to look for space separators instead.


  • Davide P. Cervone

    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks