When I start a section and attempt to indent the first paragraph with \indent, the command has no effect:
\documentclass{article}
\begin{document}
% Section 0
\indent Paragraph 1. % indented
\noindent Paragraph 2.
\section{Section 1}
\indent Paragraph 1. % not indented
\noindent Paragraph 2.
\section{Section 2}
\leavevmode\indent Paragraph 1. % indented
\noindent Paragraph 2.
\end{document}
I found that \leavevmode\indent solves the problem (as does \indent\indent), but why is this happening in the first place?
\usepackage{indentfirst}in the preamble, no\indentor\leavevmodecommand is needed. – egreg Jun 07 '13 at 21:58\indentworks in a sectionless place but not after a section heading. – Lover of Structure Jun 07 '13 at 22:14\indentand\noindentas manual overrides; shouldn't they always work? The user will think of them as if they toggled a bit that is being inspected when a new paragraph is started. I know that this isn't how these two actually work, but it's unexpected that\indent\indentgives double indentation. I would have expected it to be a sort of "indentation ensurer" so that there is no harm in having\indentat the end of a macro and calling it again paragraph-initially. Similarly, shouldn't\indentbe forbidden inside a paragraph? – Lover of Structure Jun 07 '13 at 22:21\indentdoes work, like all your\indentexamples it is redundant as the paragraph indentation is automatic. The heading code removes the indentation box, so it isn't that\indentdoesn't work, it is that the indentation however added is suppressed after a heading. – David Carlisle Jun 07 '13 at 22:23\indentand\noindentnot set a binary flag? I've always understood them to work as if they were named\ensureindentand\ensurenoindent. This is confusing, why can't one add suchensure-macros and use those instead? – Lover of Structure Jun 07 '13 at 22:29\indentand\noindentexist in the first place. If they exist, they serve a function, but this function is achieved in an unexpected manner. So one might as well define a manual override that uses a flag. Also if working with templates were without problems (in that we never needed to adjust anything), everybody would be perfectly content with LaTeX2e and neither resort to plain TeX nor be interested in LaTeX3 :-) – Lover of Structure Jun 07 '13 at 23:18indentfirstpackage to make the problem go away:-) – David Carlisle Jun 07 '13 at 23:25xgalleymodule does indeed use a flag here. What you are actually after though is a different template for the section headings (we'll still set the flag to suppress indents after section, as standard). Parts of this mechanism are set up, others still need work. – Joseph Wright Jun 08 '13 at 05:16