# Suppress parindent after list environments

I learned that the reason for parindents is to provide visual clues for paragraph ends. According to some people, is an error to use both \parindent and \parskip.

1. it is an error to indent the first paragraph in a section (TeX handles this nicely)
2. it is also an error to indent after vertical space

While point 2 should be prevented by not using a parskip, it is not prevented after using a list environment such as itemize. It looks odd to me to indent a paragraph after a list.

Example:

\documentclass{article}
\usepackage{lipsum}
\begin{document}
\section{Lorem Ipsum}

\lipsum

\begin{itemize}
\item \lipsum
\end{itemize}

\lipsum
\end{document}


# Can I generally prevent an \indent after certain environments?

I know I can prevent the indent with \noindent. I also know I can prevent the indent by not leaving a blank line in the tex file:

\lipsum
%
\begin{itemize}
\item \lipsum
\end{itemize}
%
\lipsum


But in my understanding, it should be possible to redefine the itemize environment to prevent this indent in general. The section command does somehow prevent the first paragraph indent, after all.

• Section and envs are very different, the grouping in envs makes it very hard to add a "no indent after env even if there are blank lines" feature. Nov 7 '19 at 10:51
• If you don't want indentation after enumerate, just leave no blank line. Nov 7 '19 at 12:11
• @egreg This is not a solution. I want it to work consistently, not by manually "fixing" the source and hoping I dont miss it anywhere. Nov 7 '19 at 13:09
• @Qw3ry Where's the inconsistency? If you want no indent, no blank line; if you want a new (indented) paragraph, add a blank line. I think that getting the same behavior with or without a blank line is inconsistent. Nov 7 '19 at 13:47
• @Qw3ry The indentation denotes a new paragraph. It can be needed after a list or not, depending on the text that follows the list. You're making life more difficult to your readers if you unconditionally avoid indentation. Nov 7 '19 at 14:01

Oddly, I did not find anything while googling for an answer, but I found the noindentafter package, while trying to tag my question with something like noindent. So I decided to ask it anyway and provide an answer by myself:

The following lines in the preamble do the trick for me:

\usepackage{noindentafter}
\NoIndentAfterEnv{itemize}
\NoIndentAfterEnv{enumerate}


Edit: As the noindentafter package stopped working with up-to-date versions of etoolbox, I found it pretty easy to achieve this without the package

• that is a very dangerous package as it messes with \end Nov 7 '19 at 10:51
• @daleif why is it dangerous? What does it exactly do and what can break if I use it? Nov 7 '19 at 10:52
• Well, for one, it does not compile on an up to date LaTeX installation as \end was changed in the latex kernel. Nov 7 '19 at 12:09
• Yes, I noticed. Still, I got the impression this fragility is there for a lot of packages, and is rather an issue of how LaTeX works in general. Nov 7 '19 at 13:16
• Any alternative? Aug 9 '20 at 21:28