Line Breaks and Blank Spaces in LaTeX: \\, \newline, \par and Spacing

Date Published

How to Add Blank Spaces and Line Breaks in LaTeX (Complete Guide)

To start a new line in LaTeX, end the line with \\ (two backslashes) or \newline; to start a new paragraph, leave one blank line in the source. Pressing Enter once does nothing, because LaTeX treats a single line break in your .tex file as an ordinary space, and it collapses runs of spaces and blank lines into one. Vertical gaps come from \vspace{1cm}, \bigskip, or the optional argument \\[2em], and horizontal gaps from \hspace{1cm}, \quad, and ~.

This guide covers every spacing command you will actually use: line breaks versus paragraph breaks, blank vertical space, horizontal space inside text and math, breaks inside tables and align, and the fix for the error "There's no line here to end".

Quick answer: How do you make a new line in LaTeX? End the line with \\ (two backslashes) or \newline to break the line inside the same paragraph. Leave a blank line in the source (or write \par) to start a new paragraph. Pressing Enter once does nothing.

Need extra space? Use \\[1em] for a line break plus a gap, \vspace{\baselineskip} for one visible blank line, and ~, \quad or \hspace{1cm} for horizontal space.

LaTeX New Line Cheat Sheet (Copy and Paste)

The line break and spacing commands people search for most, in one document you can paste and compile (no extra packages). Use the copy button on the box:

1\documentclass{article}
2\begin{document}
3First line\\ second line. % \\ line break, same paragraph
4First line\newline second line. % \newline same as \\ in running text
5First line\\[1em] second line. % \\[1em] line break plus 1em of extra space
6First line\linebreak second line. % \linebreak break but keep the line justified
7
8A new paragraph. % blank line (or \par) = new paragraph
9\vspace{\baselineskip} % one empty line between paragraphs
10
11Fig.~3, 10\,km, A\quad B\hfill C % ~ tie, \, thin, \quad 1em, \hfill push right
12\end{document}

Try this in Octree — free LaTeX editor with AI, compiles in your browser

Line Breaks and New Lines in LaTeX: Line Break vs Paragraph Break

The distinction matters because the two look different on the page. A line break moves to the next line without any extra vertical space and without indenting. A paragraph break ends the paragraph, adds \parskip (zero by default in article), and indents the first line of the next paragraph by \parindent.

Source

What it does

single Enter

nothing; treated as a space

blank line

new paragraph (indented, adds \parskip)

\par

new paragraph, identical to a blank line

\\

new line, no indent, no extra space

\\[2em]

new line plus 2em of vertical space

\\*

new line that forbids a page break at that point

\newline

new line; same as \\ in text, but has no optional argument

\linebreak

asks LaTeX to break here and stretch the line to the full width (justified)

1\documentclass{article}
2\begin{document}
3First line of a paragraph.\\
4Second line, same paragraph, no indent.\newline
5Third line.\\[2em]
6Fourth line, after a 2em gap.
7
8A blank line starts a new paragraph, which is indented.
9\par This sentence is another paragraph; \verb|\par| and a blank line are equivalent.
10\end{document}

Use \\ for addresses, poems, title blocks, and rows in tables and multi-line equations; use blank lines for prose. Writers coming from Word often put \\ at the end of every paragraph, which produces unindented paragraphs and, when a \\ lands on an empty line, the error described below.

\\ versus \newline

Inside ordinary paragraphs the two are interchangeable. The differences show up in special contexts: \\ accepts the [length] option and is redefined inside tabular, align, and \author to mean "end this row", while \newline always means a plain line break in text. In a p{} table column, for example, \\ ends the row, so to break a line inside the cell you write \newline.

\linebreak and justification

\\ ends the line and leaves the rest of it empty. \linebreak ends the line but keeps it justified, stretching the inter-word spaces to the right margin, which on a short line produces ugly gaps and an "Underfull \hbox" warning. \linebreak[n] (n from 0 to 4) makes it a hint rather than an order. \\ is the everyday command.

Blank Vertical Space

\vspace and \vspace*

\vspace{length} inserts vertical space between paragraphs: \vspace{1cm}, \vspace{2\baselineskip}, or a negative value such as \vspace{-5mm} to pull two things closer. Put it between paragraphs (after a blank line); inside a paragraph it is applied after the current line ends, which surprises people.

Space inserted with \vspace is discarded at the top of a page. If you want a gap that survives there, for instance to push a title down a title page, use the starred form \vspace*{3cm}.

\smallskip, \medskip, \bigskip

These three insert preset gaps of roughly a quarter, half, and one line of space, and they stretch slightly to help LaTeX balance the page, which makes them nicer than hard-coded lengths:

1\documentclass{article}
2\begin{document}
3Paragraph one.
4
5\smallskip
6Paragraph two, a small gap above it.
7
8\medskip
9Paragraph three, a medium gap.
10
11\bigskip
12Paragraph four, a large gap.
13
14\vspace{1cm}
15Paragraph five, exactly one centimetre below.
16
17\vfill
18This line is pushed to the bottom of the page.
19\end{document}

\vfill is a rubber length that absorbs all remaining vertical space, which is how you put a line at the bottom of a page or center a block vertically with two \vfills around it.

Space between all paragraphs

Instead of adding \vspace after every paragraph, set the document-wide parameters once in the preamble:

1\documentclass{article}
2\setlength{\parskip}{1em} % blank space between paragraphs
3\setlength{\parindent}{0pt} % no first-line indent
4\begin{document}
5Paragraph one.
6
7Paragraph two, separated by 1em and not indented.
8
9\noindent Even with a default indent, \verb|\noindent| suppresses it for one paragraph.
10\end{document}

The parskip package does the same thing but also fixes the lists and headings that a raw \parskip change disturbs, so \usepackage{parskip} is the better choice for a whole document. \noindent at the start of a paragraph removes the indent for that paragraph only; \indent forces one.

Horizontal Blank Space

Spaces in text

Command

Width

Typical use

~

one normal space, no line break allowed

Fig.~3, Dr.~Smith, 10~km

`\ ` (backslash space)

one normal space

after an abbreviation: e.g.\ this

\,

thin space (about 1/6 em)

10\,000, between a number and a unit

\quad

1 em

separating items on a line

\qquad

2 em

wider separation

\hspace{2cm}

exactly 2 cm

fixed indentation

\hspace*{2cm}

2 cm, kept even at a line start

indenting the first line

\hfill

all remaining space

pushing text to the right margin

The tie ~ is the one to memorise: it prints a space but forbids a line break there, so a reference like "Figure 3" never splits across lines. \hspace at the start of a line is dropped (like \vspace at the top of a page), so use \hspace* when you want it kept.

1\documentclass{article}
2\begin{document}
3See Figure~3 and Table~2 on page~7.\\
4Left\hfill Right\\
5Name:\quad Alice\qquad Age:\quad 30\\
6\hspace*{2cm}Indented by exactly two centimetres.\\
7A number with a thin space: 10\,000~km.
8\end{document}

\hfill is how you right-align a date on the same line as a heading, lay out "label ... value" rows without a table, or build a résumé header; for drawn rules see https://www.useoctree.com/learn/horizontal-lines.

Spaces in math mode

Math mode ignores the spaces you type, so there is a separate set of commands for fine adjustments:

Command

Width

Example

\!

negative thin space (−3/18 em)

\int\!\!\int f to tighten a double integral

\,

thin space (3/18 em)

\int f(x)\,dx before the differential

\:

medium space (4/18 em)

between a function and its argument

\;

thick space (5/18 em)

before a condition: x \; \text{for} \; x>0

\quad

1 em

between two equations on one line

\qquad

2 em

before a qualifying phrase

1\documentclass{article}
2\usepackage{amsmath}
3\begin{document}
4\[ \int_0^1 f(x)\,dx \qquad \text{versus} \qquad \int_0^1 f(x)dx \]
5\[ \iint\!\!\!\iint \quad x \; \text{for} \; x>0 \quad f(x)=\sin x,\quad g(x)=\cos x \]
6\end{document}

The thin space before dx is the one you will use constantly. Note that \! is not an "invisible character"; it is negative space, used to tighten things that would otherwise sit too far apart.

Line Breaks in Tables and Equations

In tabular, \\ ends a row, and \\[6pt] adds 6pt of space below that row, which is a quick way to breathe between groups of rows. To break a line inside a cell you need a paragraph column (p{3cm}) and then \newline, or wrap the cell content in a \parbox or \makecell (makecell package).

In align and gather from amsmath, \\ ends a line of the equation, and \\[1ex] opens a little space between lines. The equation environment is a single line and does not accept \\ at all; use multline or split for a long equation that must wrap.

1\documentclass{article}
2\usepackage{amsmath}
3\begin{document}
4\begin{tabular}{l p{4cm}}
5Short & A paragraph cell that is long enough to wrap, and here is a forced\newline break. \\[6pt]
6Next & Second row, with 6pt of extra space above it. \\
7\end{tabular}
8
9\begin{align}
10f(x) &= (x+1)^2 \\[1ex]
11 &= x^2 + 2x + 1
12\end{align}
13\end{document}

Fixing "There's no line here to end"

This is the error that \\ produces when there is no text on the current line to end. It happens when \\ sits on its own line after a blank line, directly after a heading such as \section{...}, after \item with no text, or at the start of a center environment.

For example, \section{Introduction} followed by a line containing only \\ stops compilation with exactly this message. The fix is to say what you actually mean:

  • For a gap after a heading or between paragraphs, delete the \\ and use \vspace{1em}, \bigskip, or a blank line.
  • For an intentional empty line, write \mbox{}\\ or \hfill\\, which gives LaTeX an (empty) line to end, or use \vspace{\baselineskip}.
  • For a blank item in a list, write \item ~ or \item \mbox{}.
1\documentclass{article}
2\begin{document}
3\section{Introduction}
4\vspace{1em}
5Text after a gap, with no error.
6
7First line.\\
8\mbox{}\\
9A line after an intentionally empty line.
10\end{document}

A related symptom is a trailing \\ just before a blank line: it compiles but leaves an empty line and an "Underfull \hbox (badness 10000)" warning. Remove it.

Common Line Break Errors and Fixes

"There's no line here to end"

Cause: \\ or \newline with no text before it on the line, typically after a blank line or right after \section{...}. Fix: delete it and use a blank line, \vspace{1em} or \bigskip; if you really want an empty line, write \mbox{}\\ (details in the section above).

"Missing number, treated as zero" after \\

Cause: the next line starts with [, so \\ reads it as the optional spacing argument, as in \\[1em], and fails on [a]. Fix: end the line with \\{} or \\\relax so the bracket is printed as text.

"Missing $ inserted" from a blank line in an equation

Cause: a blank line inside \[ ... \] or equation is a paragraph break, which is not allowed in math (in align the message is "Paragraph ended before \align was complete"). Fix: remove the blank line, or keep a line with just % to space out the source. Use \\ only inside align or gather to break an equation.

1\documentclass{article}
2\usepackage{amsmath}
3\begin{document}
4First line\\{}
5[a] second line, the bracket prints as text.
6
7\[
8 a + b = c
9 % a comment line, not an empty line, inside math
10\]
11\begin{align}
12 x &= 1 \\
13 y &= 2
14\end{align}
15\end{document}

A fourth one is only a warning: "Underfull \hbox (badness 10000)" usually means a \\ at the end of a paragraph or two \\ in a row. Remove the extra break and add space with \vspace instead.

Quick Reference

Need

Write

new line

\\ or \newline

new line plus space

\\[1em]

new paragraph

blank line or \par

blank line in output

\vspace{\baselineskip} or \mbox{}\\

gap between paragraphs

\smallskip, \medskip, \bigskip, \vspace{1cm}

space at top of page

\vspace*{1cm}

space between all paragraphs

\setlength{\parskip}{1em} or \usepackage{parskip}

no first-line indent

\noindent or \setlength{\parindent}{0pt}

non-breaking space

~

horizontal gap

\hspace{1cm}, \quad, \qquad

push text right

\hfill

thin space in math

\,

new page

\newpage or \clearpage

For page-level layout, including where headers and footers sit relative to these spaces, see https://www.useoctree.com/learn/page-numbering.

Frequently Asked Questions

How do I make a new line in LaTeX?

End the line with \\ or \newline. For a new paragraph, leave an empty line in the source instead. A single Enter key press is treated as a space.

How do I add a blank line in LaTeX?

Use \vspace{\baselineskip} between two paragraphs for exactly one line of empty space, or \\[\baselineskip] at the end of a line. \bigskip is a good general-purpose alternative. Typing two blank lines in the source does nothing extra; LaTeX collapses them into one paragraph break.

What is the difference between \\ and \newline?

In ordinary text they are the same. \\ takes an optional length (\\[3mm]) and is redefined inside tables and align to mean "end this row"; \newline has no optional argument and always means a text line break, which is why it is the one to use inside a p{} table cell.

How do I add vertical space in LaTeX?

\vspace{1cm} between paragraphs, or the preset \smallskip, \medskip, and \bigskip. Use \vspace*{1cm} if the space must survive at the top of a page, and \vfill to fill the rest of the page.

Why does LaTeX ignore my extra spaces?

Because LaTeX, not the author, controls spacing: multiple spaces, tabs, and single line breaks all become one inter-word space, which is what gives documents their even texture. When you need something specific, use the commands above rather than extra keystrokes.

How do I go to the next line in LaTeX?

Type \\ at the end of the line: First line\\ Second line. \newline does the same. Starting a new line in the .tex file alone is not enough, because a single line break counts as a space.

Is \newline the same as a new paragraph?

No. \newline and \\ only break the line; the text after it stays in the same paragraph, with no indent and no paragraph spacing. A new paragraph comes from a blank line or \par, which indents the first line (or adds \parskip space).

How do I add a space in LaTeX?

A normal space is just a space; LaTeX collapses several into one. For a fixed gap use \quad (1em), \qquad (2em) or \hspace{1cm}, for a space that must not break use ~, and in math mode use \,, \:, ; or \quad.

How do I break a line inside a table cell?

In a tabular, \\ ends the whole row. To break inside a cell, use a paragraph column such as p{4cm} and \newline inside it, or load the makecell package and write \makecell{First\\Second}.

Write your next document in Octree, the AI LaTeX editor that flags spacing mistakes as you type and compiles instantly: https://www.useoctree.com

Try this in Octree — free LaTeX editor with AI, compiles in your browser

Octree vs Overleaf
News

Discover how Octree compares to Overleaf — from AI-assisted LaTeX writing and TikZ/BibTeX automation to open-source flexibility and offline editing for researchers.