As Barbara Beeton has commented, forcing the first paragraph after an
equation environment to indent can be achieved with
\aftergroup -- use this command to add a
\par after the group established by the environment.
Forcing the first paragraph after an environment not to indent isn't that straightforward. I came up with the following:
I defined a new macro
\@doendeq that will redefine
\everypar so that it a) removes the indentation from the first paragraph following it b) reverts to its original (empty) definition. (
\@doendeq is an abridged version of LaTeX's
\@doendpe which is used after paragraph-making environments.)
To change every instance of the
equation environment to remove indents after it, one could simply add
\aftergroup\@doendeq to the definition of
\endequation. As you are looking for a command to modify only some instances of
equation, I used
\csappto from the etoolbox package to locally add
\@currenvir being the name of the current environment).
I suspect that there are more elegant ways to do this.
f(x) = x^2 + 1 \eqend
Some text here, but it's gonna get indented.
f(x) = x^2 + 1 \eqcntd
Some text here, but it's not gonna get indented.