In LaTeX, manually pressing the Enter
button on the keyboard does not create a new line or paragraph as we do in a word processor. LaTeX treats the input as a continuous line unless specific commands are employed. To start a new line or control line breaks, users need to use appropriate LaTeX commands.
Commands for Creating a New Line in LaTeX
The following methods provide flexibility in determining where new lines should commence, contributing to effective text formatting and presentation.
Method 1: Using ‘\newline’ command
You can use the direct command \newline
to initiate a new line. When you place this command before a text segment, LaTeX ensures that the specified text is printed on a fresh line, effectively creating a line break in the document. This command is particularly useful when you want to control the layout of your document by explicitly indicating where new lines should begin.
\documentclass{article}
\begin{document}
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.\newline
Many species exhibit remarkable mimicry skills and effortlessly reproducing various sounds.
\end{document}
Output
Method 2: Using ‘\linebreak’ command
You can also generate a new line in LaTeX by employing a \linebreak
command at the end of the previous line.
The \linebreak
command in LaTeX compels the text in the last line to span the entire page width. When you use \linebreak
, it enforces a line break while ensuring that the content on that line extends from the left margin to the right margin of the page. This command is particularly handy when you want it to maintain a consistent width across the page.
\documentclass{article}
\begin{document}
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.\linebreak
Many species exhibit remarkable mimicry skills and effortlessly reproducing various sounds.
\end{document}
Output
Method 3: Using ‘\\’ command
We can also generate a new line in LaTeX by employing a \\
command at the end of the previous line.
\documentclass{article}
\begin{document}
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.\\
Many species exhibit remarkable mimicry skills and effortlessly reproducing various sounds.
\end{document}
Output
Method 4: Using ‘\\\\’ command
We can also generate a new line in LaTeX by employing a \\\\
command at the end of the previous line.
\documentclass{article}
\begin{document}
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.\\\\
Many species exhibit remarkable mimicry skills and effortlessly reproducing various sounds.
\end{document}
Output
The \\\\
command in LaTeX not only causes the subsequent text to be printed on a new line but also introduces a blank line in the document. This command is useful when you want to create a clear visual separation between two blocks of text or to enhance the overall readability of your document by introducing additional space between lines.
Method 5: Using a blank line
A new line can also be created by inserting a blank line.
When a blank line is present in the input file, it initiates a new line in the output with an indentation, denoted by some blank space at the beginning of the line. This indentation effect persists even if more than one blank line is left in the input, ensuring consistent formatting and visual separation between lines in the resulting output.
\documentclass{article}
\begin{document}
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.
Many species exhibit remarkable mimicry skills and effortlessly reproducing various sounds.
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.
\end{document}
Output
Additional Options
Additional vertical space above the subsequent new line can be defined by including a value within square brackets [ ]
following the \\
command after the previous line. For example, using \\[3mm]
will generate an additional vertical gap of 3mm above the new line.
\documentclass{article}
\begin{document}
Parrots have been cherished as captive companions since ancient times, renowned for their entertaining and intelligent nature.\\[3mm]
Many species exhibit remarkable mimicry skills and effortlessly reproducing various sounds.
\end{document}
Output
1 thought on “New Line or Line Break in LaTeX”