1

This question is related to How to change the word "Proof" in the proof environment?. I would like that the proofs in my document begin with "Proof. ---", instead of the standard "Proof." by default. But if I try to modify this setting, whatever solution I tried, I also get an extra line break at the end of the proof (and the \qed is placed on the extra blank line).

Here is a MWE:

\documentclass[a4paper,11pt]{article}
\usepackage[french]{babel}
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{amsthm}
\usepackage{enumitem}

\newtheorem{theo}{Theorem}[section]
\renewenvironment{proof}{{\noindent \itshape Proof. ---}}{\qed}

\begin{document}

\begin{theo}
  My theorem.
\end{theo}

\begin{proof} In two steps:
  \begin{enumerate}[label=(\roman*)]
  \item The first step
  \item The second step
  \qedhere
  \end{enumerate}
\end{proof}

\end{document}

As you can see in this MWE, the "Proof. ---" is correctly set, but I get an extra new line. I tried some solutions (found on SE) to remove the extra new line, but it seems that none of them is compatible with the "renaming" of proof environment. How can I do both?

Thanks!

1 Answers1

2

A solution: using the xpatch package to modify only the \@addpunct instruction. This is working:

\documentclass[a4paper,11pt]{article}
\usepackage[french]{babel}
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc} 
\usepackage{amsthm}
\usepackage{enumitem}
\usepackage{xpatch}

\makeatletter \xpatchcmd\proof{@addpunct{.}}{@addpunct{.} ---}{}{} \makeatother

\newtheorem{theo}{Theorem}[section]

\begin{document}

\begin{theo} My theorem. \end{theo}

\begin{proof} In two steps: \begin{enumerate}[label=(\roman*)] \item The first step \item The second step \qedhere \end{enumerate} \end{proof}

\end{document}

egreg
  • 1,121,712