I'm working with the amsthm
package, especially using the proof
environment. I would like just the word "Proof" to be indented (and to keep the QED
symbol). Can we do that?
2 Answers
Like this?
\documentclass[11pt]{article}
\usepackage{amsthm,xpatch}
\xpatchcmd{\proof}{\hskip\labelsep}{\hskip5\labelsep}{}{} %% change 5 here as you wish
\begin{document}
\begin{proof}
This is the proof of the lemma This is the proof of the lemma This is the proof of the lemma This is the proof of the lemma This is the proof of the lemma
\end{proof}
\end{document}
You have to load xpatch
package (by adding \usepackage{xpatch}
in the preamble) and then add the following to your preamble:
\xpatchcmd{\proof}{\hskip\labelsep}{\hskip5\labelsep}{}{}
If you don't have xpatch
installed, then add the following to your preamble (after \usepackage{amsthm}
)
\makeatletter
\renewenvironment{proof}[1][\proofname]{\par
\normalfont
\topsep6\p@\@plus6\p@ \trivlist
\item[\hskip5\labelsep\itshape
#1\@addpunct{.}]\ignorespaces
}{%
\qed\endtrivlist
}
\makeatother
-
The result is exactely what I wanted, but I'm working with
\documentclass[11pt]{article}
– Zweig42Mar 29, 2015 at 17:52 -
I dont't know, but he doesn't understand the xpatch package you used. Do we have to load it somewhere ?– Zweig42Mar 29, 2015 at 17:55
-
Thank you. But I've never loaded a package... Could you explain me what to do ? I've downloaded the file at ctan.org/pkg/xpatch– Zweig42Mar 29, 2015 at 18:04
-
-
1@HarishKumar -- an even easier mod is to adapt the definition of proof from
amsproc.cls
where it is already indented. that inserts the line\itemindent\normalparindent
between\trivlist
and\item
, and leaves\hskip\labelsep
unchanged. this also requires in the preamble, before redefiningproof
, insertion of a line\normalparindent\parindent
. (ams document classes avoid this problem by establishing\normalparindent
in the class file.) Mar 29, 2015 at 18:56
Another way to accomplish this request is to adapt the definition of proof
from amsproc.cls
where it is already indented.
That definition inserts the line \itemindent\normalparindent
between \trivlist
and \item
, and leaves \hskip\labelsep
unchanged.
This also requires in the preamble, before redefining proof
, insertion of a line \normalparindent\parindent
.
(AMS document classes avoid this problem by establishing \normalparindent
in the class file.)
\documentclass{...}
and ending with\end{document}
.