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.
- 21
1 Answers
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)
- 757,742

\\which is not at the end of a paragraph. You mean you haveline one\\ line twoand get that message? – David Carlisle Jul 11 '22 at 13:38\noindenton selected paragraphs? – user202729 Jul 11 '22 at 13:54\\is better markup than a blank line followed by\noindent, which is explicitly ending the paragraph – David Carlisle Jul 11 '22 at 15:29