What sort of code should I put in preamble, such that every math fomula (in dolar signs) that is too long to fit in line width (a.k.a. produces Bad Box) start in new line (like putting // before equation) ? Or is it impossible to detect and prevent Bad Box in compiling ?
A:
Are you talking about inline math or TeX-style $$? In the first case: think about putting it in its own environment, long inline math isn't a good idea. In the second case, start using align
(or the appropriate environment) and place those breaks yourself. Or use breqn
, it will do it automatically.
In case it's inline and you want it to stay inline: consider rewriting your sentences, as usual with bad boxes. And consider using microtype
if you're building to pdf, it will enhance the flexibility of the fonts, hence, more possibilities for line breaking.
I don't have an actual solution for line breaks in inline math, I usually resort to these tricks. Maybe someone with a better insignt in inline math can help you with that :).
Pieter
2010-06-05 11:48:41