Latex color change causes "Formula Does Not Parse" in PDF Export

I am working on an instructor copy of a lab manual in Pressbooks. I am making all completed answers in the instructor copy be blue. Normal Latex equations format fine in all exports. However, I realized today that in the PDF export for digital distribution, Latex formulas that have been formatted blue using the \color{blue} command result in a notification in the PDF export of “Formula Does Not Parse”. It exports fine in the Web Book, but not in the PDF exports. Is this a CSS issue? I had a similar sort of problem with TablePress.
Latex code:

I’ll put other pictures in replies below due to the rule that new users can only post one media file per post.

Formula Does Not Parse error in the exported PDF:

The formula working fine in the web book:

Two questions:

1. what method are you using for rendering LaTeX in this book? MathJax or WP QuickLaTeX?
2. can you share the book’s URL and an example chapter where you’re having problems in the PDF export?
1. I’m actually not sure. I add the Latex code directly to the text for each chapter.
2. The book is here: https://kstatelibraries.pressbooks.pub/soilslabmanual/. The chapter I’m having issues with is not publicly available, but is titled “Instructor Copy of Chapter 10 - Soil Water Measurement and Movement”

I will piggy-back on this one, if that is OK.

My PDF’s are not displaying LaTeX equations ([…]); instead they are displaying the LaTeX code. They display fine in web form. I am using MathJax. Here are a couple of examples:

Another example (outside of textbox):

@ColbyDigsSoil it looks like your book is using MathJax. I don’t see the LaTeX expressions you’re having trouble with in that chapter. I’d recommend sending an email to our premium support address which includes the specific equations that aren’t parsing and a chapter where they can be found and/or a PDF file where the output isn’t being included.

@Ana your issue looks different to me. I’m not sure why initial expressions are rendering correctly in the PDF but later ones aren’t. To debug, I’d need to see the book where you’re having problems or the full contents of the text editor for the chapter in question. Can you share a URL?

1 Like

@Ana before you share the URL, you should check to make sure that the expressions that aren’t rendering in your export files are in fact wrapped in  shortcodes. Most of the time we find that PDF errors like the ones I see in your example are the result of missing shortcodes. At present our export routines need the [latex] shortcode flags to know that they should convert the content in between them into images rendered with LaTeX for our EPUB and PDF exports, which can’t use the MathJax javascript library to render the math like our webbooks can.