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.


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, 2014 at 4:56
  • If your math is big enough that this is a concern it should probably be set as a display not inline May 16, 2014 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 May 16, 2014 at 13:11

1 Answer 1


These can be changed at any point, for example

\csname @highpenalty\endcsname=700

would make [3] use 700 instead of 301.

Although manual linebreaking should be a last resort in most document types (unless you are a poet:-)

  • Thanks David I'm sorry I didn't respond long ago, but I haven't been receiving email notification of responses to my questions. Though not a poet, I do find I was to break lines manually. Unfortunately I couldn't get your suggestion to work, as the following example shows. Well, I don't have room for a full example, but I tried \documentclass[11pt]{article} \begin{document} \csname @highpenalty\endcsname=9999 then \linebreak[3], which should have behaved essentially like \linebreak[4], but did not break the line prematurely, as I wanted it to. Could you explain my error?
    – Leo Simon
    Jun 20, 2014 at 4:56
  • @LeoSimon no error, perhaps to break at that point would hav erequired something to be infinitely bad in which case 9999 has no effect but 10000 is infinitey good so forces a break Jun 20, 2014 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .