# Strange “There's no line here to end” error

I am starting my adventure with LaTeX.

I have following code on my preamble:

\usepackage{graphicx}
\usepackage{setspace}
\onehalfspacing
\usepackage{indentfirst}
\usepackage{titlesec}

On third and fifth line I have: LaTeX Error: There's no line here to end
Why?

-
I get no error. – egreg Jan 2 '13 at 20:17
99 times out of a hundred that error is caused by mis-using \\ are you sure that the error comes from the code you showed. (It is always best to post a complete small document that reproduces the error) – David Carlisle Jan 2 '13 at 20:36
@MichałHerman: It depends on where it's used. Inside tabular or array, then it's fine. Elsewhere, not so much... See #4 in Documents with typical LaTeX errors, or the UK TeX FAQ entry No line here to end. – Werner Jan 2 '13 at 22:21
@MichałHerman white space before the optional argument is always allowed (except in ams alignments) – David Carlisle Jan 2 '13 at 23:50
@MichałHerman Remember that paragraphs are ended by leaving a blank line in the input file; if you really need a vertical spacing, use \bigskip after the blank line; but I've typeset several books and almost never felt a compelling reason to use it. Never use \\ for ending paragraphs. – egreg Jan 3 '13 at 0:03