Last week, I handed in a homework where an equation went off the edge of the page. Embarassing...
I would like to prevent this from happening again by having LaTeX stop compilation when it notices an overfull \hbox. I've tried setting \tolerance=0, but LaTeX seems happy to keep compiling, still printing warnings like: Overfull \hbox (222.96991pt too wide) detected at line 46.
I'm wondering, how can I make sure that documents with equations running off the page fail to compile? (I am using XeLaTeX if it makes a difference.)
Overfull \hboxwarning is not a “failed compilation”. It simply tells you that the equation doesn't fit and TeX never tries to split a displayed equation. – egreg Nov 18 '20 at 18:43\overfullruleto, say, 10pt. The awful blob of ink will be difficult to miss in preview... – Rmano Nov 18 '20 at 21:37\overfullrulewill put a black blob in the margin to the right of the overfull line. But it's easier to just add the[draft]option to the\documentclass. (You might want to remove it from the final run, although if there are no overfull lines left then, no blob will appear to embarrass you.) – barbara beeton Nov 19 '20 at 02:44\hfuzz=.5cmor some such. – barbara beeton Apr 13 '22 at 22:31