MathJax Issues

Hello, hivemind!

After the exciting announcement about MathJax yesterday, I have been working on changing over the math in a version of OpenStax University Physics that the Iowa State team is working on right now (since OpenStax has MathML, this update has made copying a lot easier). However, I have run into a strange issue that I’m unsure how to fix:

Most equations are displaying correctly in the book (example),
image
but some are displaying with the fonts much smaller than the surrounding text. Do you know what might be causing this? There is nothing inherently different about the equations that are displaying incorrectly.

Incorrect%20display

I look forward to hearing your hypotheses and potential fixes!

-Abbey Elder

Abbey could you post the HTML (or a link to the chapter with the problems)?

No problem, here is the chapter I’ve already fixed the code (from $ $ around equations to $latex $ around equations) for example: https://iastate.pressbooks.pub/universityphysics2/chapter/1-2-thermometers-and-temperature-scales/

(The book is set to public for now, but I will have to set it to private after this since it is definitely not finished.)

On closer inspection, it looks like when the equation is in a box or table it renders properly, but in the main text is becomes small. It might be something fixable in the theme?

In which output are you finding the problem? Web, pdf, or epub?

Good question!

I had only been checking in Web so far, as this was my first try at cleaning up the equations with new formatting. After a quick export, it appears that everything is displaying at the correct size in pdf and epub (though some of the equations aren’t rendering at all anymore- I’ll need to look into that).

If I weren’t already 11 chapters into the book, I’d consider starting over and doing it all in MathML, but…

Abby,

Thanks for doing this important work. Importing OpenStax books are not easy, and lots of work to do the cleaning and adding back metadata.

There are quite a few organizations that are doing this kind of work. We should make sure we all know who each other are and that we aren’t duplicating each others labor. @allisonbrown has done quite a few of these in SUNY. Just a thought. Thanks for your work.

Ed

1 Like

Thanks, Ed,

This is the first OpenStax book we’ve worked on, since it’s one of the few not already in Pressbooks.
I checked ahead of time and it looks like no one had done University Physics Vol 2 yet, but I’ll be sure to share out the news when we’ve got our import into Pressbooks done, to avoid extra duplication!

I will also 100% be importing the back matter from University Physics Vol I in the SUNY catalog. Thanks for the information!

Abbey

1 Like

Update for anyone following this thread. @mcgratay wrote offline to @Abbey_Elder:

The theory we’re working with right now is that MathJax equation sizing is relative to the size of the text. If you’ll notice, the text within the textbox has a different font and font size than that of the body.

Abbey replied that when she changed the theme to one that uses a larger font, the anomalously small equations were rendering more in line with her expectations. For others seeing math expressions smaller than they expect, our advice for now is to check the font size of the surrounding text and/or CSS rules for the active theme.

1 Like