I am currently putting a \noindent
before the first paragraph of each theorem, proof, etc. in my memoir
document. Is there any way to have memoir
do this automatically?
For example, is there any way to make this MWE more concise?
\documentclass{memoir}
\usepackage{amsthm}
\newtheorem{thm}{Theorem}[chapter]
\begin{document}
\noindent This is my introduction.
This is the next paragraph of the introduction, which should be indented.
\begin{thm} (Theorem Name)
\noindent This is my theorem.
Note that I do want the ``(Theorem Name)'' to appear on the same line as where it says \textbf{Theorem 0.1}.
This is the next paragraph of the theorem, which should be indented.
\end{thm}
\noindent Here is a note about the theorem.
\begin{proof}
\noindent This proof has no name.
This is the next paragraph of the proof, which should be indented.
\end{proof}
\noindent This is my conclusion.
The end.
\end{document}
Best Answer
To typeset the name of a certain theorem, use the optional argument of the theorem's environment, e.g.,
\begin{thm}[Theorem Name]
. In my example, I use thethmtools
package to conveniently define a new style.To suppress indentation in the first paragraph after a theorem, one may patch the commands
\@endtheorem
and\endproof
(using theetoolbox
package) and then use%
(the comment sign) in the text body. (EDIT: For details aboutamsthm
s implementation of theorems, see my answer to How to prevent paragraph breaks after theorem environments?)The
\noindent
in your example's first paragraph would be superfluous if it was preceded by a sectioning command like\chapter
or\section
.