2

I want to end a line without ending the paragraph. Using\\ or \newline gives me the the result I want, but also creates the 'Underfull \hbox (badness 10000)' warning. Using an empty line causes the next line to have an indent, which I don't want in this particular case. In other cases i might want to have an indent at the beginning of a paragraph, so I don't want to set the \parindent to zero.

  • you shouldn't get an underfull hbox warning if there is something on the second line. Better show a real, small complete example. – Ulrike Fischer Jul 11 '22 at 13:30
  • 3
    The first question is: why would you want to “end a line without ending a paragraph”? – egreg Jul 11 '22 at 13:32
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 11 '22 at 13:37
  • please always show a complete input. It is not impossible but highly unlikely to get badness 10000 from \\ which is not at the end of a paragraph. You mean you have line one\\ line two and get that message? – David Carlisle Jul 11 '22 at 13:38
  • 3
    What about occasionally using \noindent on selected paragraphs? – user202729 Jul 11 '22 at 13:54
  • \centering (for example) defines \ and \newline differently. – John Kormylo Jul 11 '22 at 14:11
  • 1
    @user202729 if a non paragraph ending newline is intended then certainly \\ is better markup than a blank line followed by \noindent, which is explicitly ending the paragraph – David Carlisle Jul 11 '22 at 15:29

1 Answers1

3

enter image description here

The correct markup to force a line break without ending a paragraph is \\ if you want the line to be short. This is very unlikely to give an badness warning on that line. (Paragraph 2)

If you want to force a line break but retain paragraph justification then use \linebreak (Paragraph 3) This may have to make an underful line and give a warning. Here it is very bad and maximum value 10000 but smaller values could be generated, or no warning at all.

A blank line always ends the paragraph (Paragraphs 4a and 4b)

A blank line followed by \noindent is usually wrong, it starts a new paragraph but obscures that from the reader (Paragraphs 5a and 5b)

If you end a paragraph with a blank line and force a linebreak at the same point with \\ you get a white spurious line generated. (It is a line of text with no text, not vertical space) and is always wrong and always generates a warning about the maximum level of badness (Paragraphs 6a and 6b)

David Carlisle
  • 757,742