In this question I asked to achieve a local equation numbering for equations which appear only inside proofs and to have a global counter for equations outside of proofs. I prefer the style where equations inside proofs are numbered with a star, i.e. (1*),(2*) or (3*a) and so on. This can be managed in the following way:
%
% Local equation numbering inside proofs
%
\newcounter{equationstore}
\AtBeginEnvironment{proof}{\setcounter{equationstore}{\value{equation}}
\setcounter{equation}{0}\renewcommand{\theequation}{\arabic{equation}${}^\ast$}}
\AtEndEnvironment{proof}{\setcounter{equation}{\value{equationstore}}}
As you can see there exist two equation counter. Before entering the proof environment, the global counter is stored, then switched to another local counter, which starts from zero for each proof environment. After exiting the proof environment the global equation counter is loaded.
I would like to know if it is possible to show only those equations inside proofs which one refers to inside a proof. Equations inside proofs will be only referenced from the same proof. A solution should respect that I use hyperref
. cleveref
is NO longer necessary for me.
mathtools
'showonlyrefs
(seemathtools
documentation), but AFAIK this change is global. Have you got a MWE to spare please?showonlyrefs
option of themathtools
package is seriously incompatible withcleveref
. :-(