5

I'm using thmtools. When I use the thmbox keyword in a theorem environment definition, all the proofs start with "Proof Proof: ".

MWE:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}

\declaretheoremstyle[
    thmbox=S,
]{thmsty}
\declaretheorem[style=thmsty]{thm}

\begin{document}
    \begin{thm}
        There are infinitely many prime numbers.
    \end{thm}
    \begin{proof}
        Exercise for the reader
    \end{proof}
\end{document}

This is the result:

proof proof

If I remove thmbox=S from the style definition, the problem is fixed:

proof

EDIT: I read in thmbox documentation that it redefines the proof environment. How can I prevent that? Adding \usepackage{thmbox} at the top solves the problem of "Proof" being written twice. However, the style still isn't like before.

6

Yes, it's a bug in thmtools, as far as I can see. However, the proof environment, as defined by thmbox, is not really what I'd like to use. You can reinstate the one by amsthm in the following way.

\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{letltxmacro}

\LetLtxMacro\amsproof\proof
\LetLtxMacro\amsendproof\endproof

\usepackage{thmtools}
\usepackage{xcolor}

\AtBeginDocument{%
  \LetLtxMacro\proof\amsproof
  \LetLtxMacro\endproof\amsendproof
}

\declaretheoremstyle[
    thmbox=S,
]{thmsty}
\declaretheorem[style=thmsty]{thm}

\begin{document}

\begin{thm}
There are infinitely many prime numbers.
\end{thm}

\begin{proof}
Exercise for the reader
\end{proof}

\end{document}

enter image description here

  • Many thanks! I had almost solved the problem by copying the definition of the proof environment from amsclass.dtx, and using \renewenvironment. However it still wasn't working properly as for some reason the "Proof" word wasn't italicized. This solution is better. – rubik Apr 19 '16 at 17:52
  • @egreg: Nice to see this. As a hack I used \begin{proof}[\empty], which gives the desired output. But using the amsthm version of the proof environment is much nicer. – crixstox Apr 19 '16 at 18:02
0

This hack also works. Just type in preamble:

\renewcommand{\proof}{type whatever you want}

Example:

\renewcommand{\proof}{\textit{Proof.}}


\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}

\usepackage{thmtools}
\usepackage{xcolor}

\declaretheorem[name=Theorem,thmbox=L]{thm}

\renewcommand{\proof}{\textit{Proof.}}


\begin{document}

\begin{thm}
There are infinitely many prime numbers.
\end{thm}

\begin{proof}
Exercise for the reader
\end{proof}

\end{document}
  • 2
    Welcome! I'm afraid this is not a good idea. This hack ignores whatever else the proof environment does. Indeed, it ignores the fact that it is an environment at all. – cfr Apr 24 '16 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.