LaTeX new line, page break and spacing

A new line is \\ or \newline. A new paragraph is a blank line in the source. A new page is \newpage. All are core LaTeX.

breaks.tex
First line\\
Second line, same paragraph.

A blank line above starts a new paragraph.

Break with an extra gap:\\[1em]
Next line.

\noindent No indent here, \newline and a line break.\par
Another paragraph, started with \verb|\par|.

A single line break in your source file does nothing: LaTeX joins the lines into one paragraph. The first line above breaks only because of the\\.

New line versus new paragraph

Use \\ for addresses, poems and table rows, where the line structure is the content. Do not use it to separate paragraphs; that leaves no paragraph spacing and no indent, and stacking\\ \\ \\ to make gaps is the usual sign of a layout problem. Use a blank line, or set spacing once (see below).

The "no line here to end" error

error.tex
Some text.

\\
More text.

This fails with LaTeX Error: There's no line here to end.\\ ends a line, and after a blank line there is no line yet: LaTeX is between paragraphs. Delete the \\ and use a blank line, or \vspace if you want a gap. A blank line is the same as \par, so \\ straight after either one fails the same way.

Page breaks

pages.tex
Page one.
\newpage
Page two.
\clearpage
Page three.
\pagebreak[3]
Page three continues, or breaks here.

Vertical and horizontal space

spacing.tex
Text before.
\vspace{2cm}

Text after a 2\,cm gap.

Left\hspace{1.5cm}Right

Left\hfill Right

Para A.
\smallskip

Para B.
\medskip

Para C.
\bigskip

Para D.
CommandEffect
\vspace{len}Vertical gap. Dropped at the top of a page.
\vspace*{len}Vertical gap that is kept at the top of a page.
\hspace{len}Horizontal gap.
\hfillStretchable gap that pushes text apart.
\smallskip \medskip \bigskipPreset vertical gaps; sizes follow the class and font size.

Set spacing once

For paragraph spacing across the document, set the length in the preamble. For line spacing, load setspace.

preamble.tex
\usepackage{setspace}
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt}

% in the body
\begin{spacing}{1.5}
Text with one and a half line spacing.
\end{spacing}

Templates that use this

Line breaks matter most in addresses and signature blocks. See thecover letter andformal letter templates, ortitle pages.

Related

Spacing around lists is covered inLaTeX lists; sizes of text and baselines inLaTeX font size. If you are new to the compile loop, start withLaTeX for beginners. Templates set paragraph and page spacing for you; see thethesis templates.

LaTeX font sizeLaTeX lists