LaTeX New Line - How to Insert New lines and White Spaces in LaTeX Documents

Newlines and white spaces are often mistakenly used in order to format a document and position (text) elements on a certain position of the page.

For example, it is quite popular to use newlines to adjust the space between a heading and a paragraph. Needless to say that this makes it hard to manage the formatting of a longer document. You need to go through to whole document over and over again to check if everything is still where it it supposed to be.

"What you see is what you mean" systems like LaTeX or MonsterWriter usually ignore new lines or white spaces. Or at least condense multiple following new lines or white spaces into a single one. The example LaTeX code you see in [listing-1] and [listing-2are producing the exact same PDF.

\documentclass{article}
\begin{document}
text

text
\end{document}
Listing 1 - An example LaTeX document with two paragraphs separated by one empty line
\documentclass{article}
\begin{document}
text





text
\end{document}
Listing 2 - An example LaTeX document with two paragraphs separated by multiple empty lines.

Inserting a New line within LaTeX Text

In order to forcefully insert multiple new lines into a LaTeX document you would need to insert \\ multiple times at the end of line (see listing [listing-3]).

\documentclass{article}
\begin{document}
text \\ \\ \\
text
\end{document}
Listing 3 - How to force LaTeX to insert multiple new lines

Subscribe for updates. We won't spam you.