# How can I change the low, med, high penalty settings for \linebreak? Or perhaps there's better way of breaking lines?

This question really belongs as a comment to

Applications of various strength of \linebreak command

but unfortunately my reputation is so low that I'm not allowed to comment.

http://tex.stackexchange.com/users/1090/david-carlisle

has very helpfully explained that that the reason why the various optional settings for \linebreak don't work very well is because the values of low, med, and highpenalty are "a bit odd". I would use a less charitable term, personally. In particular, linebreak[3] assigns a penalty of 301 out of 10000, which presumably explains why it is so ineffectual. I would like to change these settings to the values that would seem obviously more sensible, e.g., spread them evenly between 0 and 10000. Is this possible?

Why do I care? I'm extremely puzzled that the consensus is that use of linebreak options should be extremely rare. For me, if it worked properly, I'd be using it all the time. The reason is that I want to avoid breaking up possibly long inline math displays, and would like, ideally, to have linebreak decide to insert a linebreak, fill the preceding line and put the entire math display (enclosed in an \mbox to prevent breaking it up) on the beginning of the next line if and only if the math display, if left on the preceding line, would run beyond the regular right margin.

Perhaps there's a better way than linebreak of accomplishing what I need?

-
I don't think adding \linebreaks manually is the way to go for this. What you describe is (I think) a \linebreak[4], where the math must be moved to a new line if it is too long for the current line, not providing subtle hints that it probably should be moved to a new line. In that case, it shoulds more like you need to sort out a way to measure the length of these inline equations so you can come up with rules about where they can or cannot go. (As a matter of taste, the idea of 'filling' the line sounds like it may lead to terribly underfull lines; but look at \parfillskip.) –  jon May 16 '14 at 4:56
If your math is big enough that this is a concern it should probably be set as a display not inline –  David Carlisle May 16 '14 at 13:01
If you put your math in an \mbox you freeze all the glue, so making it impossible for TeX to shrink the math spaces to make the expressions fit on a line –  David Carlisle May 16 '14 at 13:11

\csname @highpenalty\endcsname=700

would make [3] use 700 instead of 301.