0

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.

Thinking about this, the logical consequence is that:

  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. – daleif Nov 7 at 10:51
  • If you don't want indentation after enumerate, just leave no blank line. – egreg Nov 7 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. – Qw3ry Nov 7 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. – egreg Nov 7 at 13:47
  • 1
    @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. – egreg Nov 7 at 14:01
0

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}
  • that is a very dangerous package as it messes with \end – daleif Nov 7 at 10:51
  • @daleif why is it dangerous? What does it exactly do and what can break if I use it? – Qw3ry Nov 7 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. – daleif Nov 7 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. – Qw3ry Nov 7 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.