Sometimes a paragraph starts with an indentation (which could be turned off with \noindent
) but sometimes it does not.
For example, I have currently an article
where the section content is not indented, the text after \\
and \newline
is not indented, but the text after a blank line is indented.
I'd like to understand when an indent is added to the start of a paragraph by default (and perhaps also what commonly used things might inadvertently change that behaviour)
I found: The first paragraph of the section content is not indented by default but the others are.
Best Answer
The short answer is that TeX always indents a new paragraph.
However, in some cases the indentation box is removed:
\chapter
,\section
,\subsection
and so on)\end{<list>}
and the following textThe exception in 1 is lifted if the
indentfirst
package is used or the mainbabel
language is one where the “indent also after sectional titles” behavior is set.Here by
<list>
I mean every environment built around the generic list-making environments: a partial inventory is(the last two are the most generic).
Display math environments behave similarly: if a blank line follows the display, the ensuing text is taken to be a new paragraph and so the indentation box is added. If no blank line follows, then the indentation box is not inserted in the first place (and not removed as in the previous cases).
What's a new paragraph, for the purpose of this answer?
A blank line (or a
\par
command) tells TeX that a paragraph must end and so it should be broken into lines. The following text is then taken as a new paragraph, hence indented as said before (but the indentation box is possibly removed).Note that
\\
does not generally end a paragraph, so no indentation box is added after it (or its sibling\newline
). However\\
should only be used in an environment where manually ending lines is sensible (flushleft
,center
,flushright
). It's also used in tabular material where it denotes the end of a row.The indentation box has width
\parindent
, whose value is determined by the document class or overridden by the user, maybe through some loaded package. Exception: inside lists, the indentation box has width\listparindent
(whose value depends on the current list).Exhortations
\\
to “end paragraphs”. It's not meant for that.TeXnical details
Strictly speaking, also sectional titles and list items are paragraphs; however, LaTeX treats them in a special way, so they can be excluded from the considerations above. Similarly,
\\
incenter
,flushleft
andflushright
actually issues\par
, so in those environments it behaves the same as a blank line; however the\parindent
value is set to zero in such environments.