[Tex/LaTex] Indent the word “Proof” in environment proof of amsthm

amsthmindentation

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?

Best Answer

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}

enter image description here

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