I would like to be able to globally showing and hiding proofs on a document, and be able to use macros to open and close the proof environments. Here is my current MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{amsthm}
\newif\ifshowproof
\newcommand{\bp}{\ifshowproof\begin{proof}}
\newcommand{\ep}{\end{proof}}
\showprooffalse
\begin{document}
Goodbye.
\bp
Hello.
\ep\fi
Test.
\end{document}
As explored here: newcommand does not work with \fi, I cannot simply add \fi to the definition of \ep, however, I would like to have a "catch-all" macro so to say, that is, ideally something that would execute as \end{proof}\fi. Is there an easy way to do this?
