'Preview' crashing/no response after large-scale code replacements

Hi @apurva and Rebus Community! I’m guiding an adaptation of OpenStax’s Calculus Vol. 2 in Pressbooks, and after making widespread ‘search and replace’ adjustments, the ‘Preview’ function keeps giving a blank screen. The faculty member’s desire is to change many formulas from inline to display-style math. So far:

-standard $$ LaTex notation for her new formulas works fine;
-she’s writing new code in Notepad and pasting into PB’s text editor instead of using the in-PB search and replace (to avoid not being able to ‘undo’ global search and replace – she’s already had to ‘undo’ global changes chapter by chapter using the revision history. :woozy_face:
-Quick LaTex settings look normal.

Are we missing something, or is it something that changing a theme might help, or is it just hard for the PB preview tool to take on so many code changes at once?

Thanks!

Hi Dylan, thanks for the question. Blank screens are especially worrying during the production process - so sorry you’re facing the problem!

Is there a reason the faculty member wants to make the change from inline to display math in the text editor? From what I understand, Pressbooks will automatically display formulae via MathJax or QuickLaTeX in the webbook and other formats.

I imagine that the Preview tool may be overwhelmed trying to pull up so many search results (given how large the OpenStax book is) but @steel Pressbooks may be able to offer more input!

Hi @woodcockd – I think the issue here may be that Quick LaTeX generates an image and inserts it into the text for every math expression in a chapter(!). This process can be a bit resource intensive and can take a very long time for the initial build for a large chapter with lots of math. The good thing is that WP Quick LaTeX will cache these images, though, so once you get through the lengthy initial build and load, pages should load much faster in the future, even in preview. That’s my best guess for what’s happening here, at least. I could take a quicker look if I had the book URL in question. Feel free to post it here or send me a direct message if you like?

Hi @steel : thanks for the feedback – makes sense. Here’s the URL if you’d like to take a quick look around: Log In ‹ Calculus Volume 2 (Second University of Manitoba Edition) — Pressbooks

@woodcockd I spot checked a couple of chapters over the weekend and couldn’t see anything immediately apparent. My hunch is that it was the issue described earlier. Is the problem still persisting for you? If so, let me know a specific chapter or chapters and I’ll look again.