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.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}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}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}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.Pitfalls
- The KOMA-Script classes have a class option for this, so the package is not needed there:
\documentclass[parskip=half]{scrartcl}. - Do not end paragraphs with
\\to avoid the indentation. The paragraph does not end there, and LaTeX reports underfull lines; see Line break and new paragraph in LaTeX.
Compiled with pdfLaTeX from TeX Live 2023.
Related pages
- Package
parskip - How-to Space between paragraphs in LaTeX
- How-to Line break and new paragraph in LaTeX
- How-to Line spacing in LaTeX
- How-to Horizontal and vertical space in LaTeX