开发者

How to start math formulae in new line if bad boxed in latex?

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 ?


You could use \sloppy or \sloppypar, but that will reduce the quality of the line breaks.

Take a look here.


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 :).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜