# Getting “Theres no line here to end” - exception

I am writing my thesis and have gone to the next line by the ~\\-command and sometimes (when I wanted to hop over one line) by the ~\\\newline-commands.

And this has worked all the time until now, where I get many exceptions caused by all those ~\\ \newline-commands (Which had worked all the time before):

Does anybody of you know why I get that exception from one moment to another?

• don't use \\ for new lines. – samcarter is at topanswers.xyz Mar 27 '18 at 11:53
• But why has it worked all the time? – watchme Mar 27 '18 at 11:55
• If you want a blank line between paragraphs use package parskip. – Johannes_B Mar 27 '18 at 11:55
• It should have never worked. The input is just plain wrong. – Johannes_B Mar 27 '18 at 11:55
• Do not use double backslash nor \newline in normal text. – Johannes_B Mar 27 '18 at 12:04

You should never need \\ or \newline to end a line and certainly never ~\\..

You have not provided a usable example so need to make some guesses to answer.

The form you show with \newline after \\ would normally not be an error but would make the warning

Underfull \hbox (badness 10000) in paragraph at lines 28--29


note that badness of 10000 is infinitely bad according to TeX's measure of how bad the document is.

However in the scope of some commands such as \raggedright the definition of \\ changes and it goes from being just infinitely bad to being an error.

! LaTeX Error: There's no line here to end.


A complete example:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}

zzzz.\\\newline

\raggedright

zzzz.\\\newline
\end{document}


This produces two warnings from the first use and an error from the second:

Underfull \hbox (badness 10000) in paragraph at lines 7--8

Underfull \hbox (badness 10000) in paragraph at lines 7--8

! LaTeX Error: There's no line here to end.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...

l.12 zzzz.\\\newline

?