Paragraph indentation in LaTeX (noindent, parindent)

LaTeX indents the first line of every paragraph, except the one after a heading. \noindent removes the indentation of one paragraph, and \setlength{\parindent}{0pt} in the preamble removes it everywhere.

No indentation for one paragraph

Put \noindent in front of the first word of the paragraph.

This paragraph starts with the normal indentation.

\noindent This paragraph starts at the left margin.
Result
The compiled example

Open in the editor

Change the indentation everywhere

\parindent is the width of the indentation, 15 pt in article at 10 pt. Set it to 0pt to remove it, or to another length such as 1em.

This goes into the preamble.

\setlength{\parindent}{0pt}

Open in the editor

Space between paragraphs instead of indentation

Without indentation and without space, a new paragraph is hard to see when the line before it is full. The parskip package sets the indentation to zero, puts half a line of space between paragraphs and adjusts lists to match.

This goes into the preamble.

\usepackage{parskip}

Open in the editor

Indent the first paragraph after a heading

The standard classes leave the paragraph after \section without indentation. The indentfirst package indents it as well.

This goes into the preamble.

\usepackage{indentfirst}

Open in the editor

Hanging indent

\hangindent=2em indents the lines of the paragraph by 2 em, and \hangafter=1 says that this starts after the first line. Both apply to the one paragraph in which they stand.

\noindent\hangindent=2em \hangafter=1
Doe, J. (2024). A long reference entry whose second and third lines are
indented, so the author name at the start of the entry stands out from
the rest of the text.
Result
The compiled example

Open in the editor

Pitfalls

Compiled with pdfLaTeX from TeX Live 2023.

Related pages