If you need the math line to be unbreakable only at (a) certain place(s) I've found (on the basis of a single experience, with plain TeX) that you can enclose the unbreakable portion in brackets, e.g.
[Breakable text]
{\relpenalty=10000
[unbreakable expression]
}
[More breakable text]
If you ever wrote a document in LaTeX (or TeX) that used inline formulas, you know how frustrating it is when LaTeX insists on breaking your inline formula across two lines. The easiest solution to this problem, in my opinion, is to prevent line breaks in inline formulas at all except under extreme cases. To prevent line breaks in inline formulas, just add the following two lines to your preamble:
relpenalty=9999
binoppenalty=9999
Now I will explain what we did. relpenalty=[number parameter]: the parameter specifies the penalty for breaking a math formula after a relation when the formula appears in a paragraph. Plain TeX sets relpenalty to 500. binoppenalty=[number parameter]: the parameter specifies the penalty for breaking a math formula after a binary operator when the formula appears in a paragraph. Plain TeX sets binoppenalty to 700. Both parameters can be set anywhere from 0 to 10000. If set to 10000, the inline formulas will never break, even in extreme cases. Setting it a bit lower would prevent line breaking except where TeX would encounter extreme cases that must have a line break because of the situation.
| # | Наименование новости | Тональность | Информативность | Дата публикации |
|---|---|---|---|---|
| 1 | Let table rows wrap over several lines | 0 | 7.98 | 03-10-2026 |
| 2 | Can’t split topic (replies) | 0 | 5.1 | 29-06-2026 |
| 3 | Comment on USB Keyboard Not Working in Dracut When Connected via Thunderbolt Dock by Guy | 0 | 8.4 | 14-06-2026 |
| 4 | Three things I decided not to parse, building a live-preview editor | 0 | 12.69 | 27-08-2026 |
| 5 | Reply To: A Lovable Clonewebx file not resizing to full page width. Theme constraint? | 0 | 8.19 | 01-10-2026 |
| 6 | Using link reference definitions as invisible structural markers — sound, or a bad idea? | 0 | 10 | 27-09-2026 |
| 7 | Comment on How to Embed an MP4 Video in WordPress (Block Editor, Classic, HTML, Shortcode, & Plugin) by Konstantin Obenland | 0 | 7.65 | 03-03-2026 |
| 8 | Post adjustment for rigid thread | 0 | 11.49 | 02-10-2026 |
| 9 | Prevent replies to posts? | 0 | 15 | 26-04-2026 |