# Learn how to indent in LaTeX

## 1. Change (remove) indentation

The vertical separation between paragraphs is determined by the \parskip length (more details); as it has been said, by default this length is 0pt. Similarly, the indentation of the first line of a new paragraph is controlled by the length \parindent which, by default, is 20pt for the article and book classes.

These default values can be changed using the \setlength command. This command is used to change the value of already existing LaTeX lengths, and it gets passed:

• as a first mandatory argument the length to be set and
• as a second mandatory argument the TeX dimension to which you want to set it.

For example, using the following declaration in the preamble of your document:

\setlenght{\parindent}{0pt}

will cause the paragraphs of your document not to be indented.

## 2. Change (remove) indent for a specific paragraph

However, if what you want is to insert more space at the beginning of a given line, and not for the whole document, you will have to use a spacing command for that given line. If you try to do this directly, you may be faced with the LaTeX system ignoring your space. This is due to the fact that the underlying system TeX prevents blank space from appearing at the beginning of the line, and this behavior is respected by most LaTeX processors (although not for all of them).

In case your system is ignoring the blank space at the start of a new line, you will have to make this space breakable, using the \- command before the declaration that inserts the space. For example, the line produced by

\-\hspace{2cm} My line.

will have 2cm of extra space before the text. Another option is using the \hspace* command, which isn’t ignored either.

For more details, I deeply invite you to read this full tutorial “LaTeX Space Guide: vertical, horizontal, text and math modes, and much more!

We reached the end of this short tutorial, If you have any remarks or suggestions, please feel free to reach us via email at admin@latex-tutorial.com