2

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.

Qw3ry
  • 195
  • 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 07 '19 at 10:51
  • If you don't want indentation after enumerate, just leave no blank line. – egreg Nov 07 '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. – Qw3ry Nov 07 '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. – egreg Nov 07 '19 at 13:47
  • @egreg the incosistency is in the resulting document, with some paragraphs indented, and others not. I want to make sure that the resulting document has consistent formatting – Qw3ry Nov 07 '19 at 13:59
  • 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 07 '19 at 14:01
  • @egreg can you make an example? Off the top of my head I cannot think of one. Are there any typographic rules regarding this specific problem? – Qw3ry Nov 07 '19 at 15:06
  • @Qw3ry -- You've asked for an example where a new paragraph following a list should be indented. This example, found by a semi-random review of TUGboat articles, starts a completely new topic, and indentation is essential: from TUGboat 39:3; see section 3 on the 5th page (p.232). – barbara beeton Nov 07 '19 at 17:48
  • Well, as I wrote in the question, I believe that the vertical space is enough to start a new paragraph visually. The indentation looks odd to me. Of course it will disallow to not start a new paragraph after a list, which is kind of impractical. But from visual guideance, it is always there. That's why I ask for typographic rules for this very situation. – Qw3ry Nov 08 '19 at 06:42
  • I figured that it is probably another question whether to put an indent or not, so I asked it separately – Qw3ry Nov 08 '19 at 08:25

1 Answers1

1

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

Qw3ry
  • 195