fix refproof bugs: correct restoring of counter values and claim style numberings in stacked proofs
Build branch master (c0e4705) from kesslermaximilian/LatexPackages
This commit is contained in:
parent
264898f2ae
commit
558b903005
2 changed files with 20 additions and 14 deletions
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"build_time": "",
|
||||
"source files": {
|
||||
"version": "v2.4.4-1-g47449c5",
|
||||
"commit": "47449c57cba8fb88e34a93f1427d697895039fdc",
|
||||
"version": "v2.4.4-2-gc0e4705",
|
||||
"commit": "c0e4705c6360fb42045b8826f7b0b810ee4be134",
|
||||
"dirty": false
|
||||
},
|
||||
"pytex": {
|
||||
|
@ -44,9 +44,9 @@
|
|||
{
|
||||
"name": "mkessler-refproof.sty",
|
||||
"source file": "refproof.pysty",
|
||||
"build time": "2022/01/09 19:21",
|
||||
"source version": "v2.4.4-1-g47449c5",
|
||||
"source commit hash": "47449c57cba8fb88e34a93f1427d697895039fdc",
|
||||
"build time": "2022/01/09 21:23",
|
||||
"source version": "v2.4.4-2-gc0e4705",
|
||||
"source commit hash": "c0e4705c6360fb42045b8826f7b0b810ee4be134",
|
||||
"pytex version": "v1.2.0-3-g5e077e7",
|
||||
"pytex commit hash": "5e077e77d88ec6b71ac0d39e21572fad5938b0c6",
|
||||
"dirty": false
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
%
|
||||
% Build details:
|
||||
% PyTeX version: v1.2.0-3-g5e077e7 (commit 5e077e7)
|
||||
% Source code version: v2.4.4-1-g47449c5 (commit 47449c5)
|
||||
% Source code version: v2.4.4-2-gc0e4705 (commit c0e4705)
|
||||
%
|
||||
% This LaTeX package is free software and distributed under the MIT License. You
|
||||
% may use it freely for your purposes. The latest version of the package can be
|
||||
|
@ -60,6 +60,7 @@
|
|||
\RequirePackage{xparse}
|
||||
\RequirePackage{refcount}
|
||||
\RequirePackage{translator}
|
||||
\RequirePackage{fifo-stack}
|
||||
|
||||
\usedictionary{translator-proof-dictionary}
|
||||
|
||||
|
@ -80,12 +81,12 @@
|
|||
|
||||
\newcounter{mkessler@refproof@proofdepth}
|
||||
\setcounter{mkessler@refproof@proofdepth}{0}
|
||||
\newcounter{mkessler@refproof@save@claim}
|
||||
\setcounter{mkessler@refproof@save@claim}{0}
|
||||
|
||||
\let\mkessler@refproof@saved@proof\proof
|
||||
\let\mkessler@refproof@saved@endproof\endproof
|
||||
|
||||
\FSCreate{mkessler@refproof@save@claim}{-1}
|
||||
|
||||
%%subproof environment - essentially copied proof environment from amsthm and modified its name + symbol
|
||||
\DeclareRobustCommand{\blackqed}{%
|
||||
\ifmmode \mathqed
|
||||
|
@ -126,8 +127,9 @@
|
|||
{
|
||||
\stepcounter{mkessler@refproof@proofdepth}
|
||||
%Save the current claim counter
|
||||
\setcounter{mkessler@refproof@save@claim}{\value{claim}}
|
||||
% Restore correct counter for claim
|
||||
\protected@edef\mkessler@refproof@dummy@expand{\arabic{claim}}
|
||||
\FSPush{mkessler@refproof@save@claim}{\mkessler@refproof@dummy@expand}
|
||||
% Restore correct counter for claims in this refproof
|
||||
\ifcsdef{themkessler@refproof@#2@save@claim}{
|
||||
\setcounter{claim}{\value{mkessler@refproof@#2@save@claim}}
|
||||
\def\mkessler@refproof@proofprefix{
|
||||
|
@ -149,6 +151,7 @@
|
|||
}
|
||||
}
|
||||
% Set up counter number printing as subindexed by numbering of the reference
|
||||
\let\mkessler@refproof@saved@theclaim\theclaim
|
||||
\def\theclaim{\getrefnumber{#2}.\arabic{claim}}
|
||||
% Now, start the actual proof
|
||||
\mkessler@refproof@saved@proof[%
|
||||
|
@ -161,8 +164,10 @@
|
|||
% Save current claim counter for later restoration
|
||||
\setcounter{mkessler@refproof@#2@save@claim}{\value{claim}}
|
||||
%Restore previous claim counter
|
||||
\setcounter{claim}{\value{mkessler@refproof@save@claim}}
|
||||
\setcounter{claim}{\FSTop{mkessler@refproof@save@claim}}
|
||||
\FSPop{mkessler@refproof@save@claim}
|
||||
\addtocounter{mkessler@refproof@proofdepth}{-1}
|
||||
\let\theclaim\mkessler@refproof@saved@theclaim
|
||||
}
|
||||
|
||||
\def\proofdepth{Depth:~\themkessler@refproof@proofdepth}
|
||||
|
@ -173,7 +178,8 @@
|
|||
{
|
||||
\stepcounter{mkessler@refproof@proofdepth}
|
||||
%Save the current claim counter
|
||||
\setcounter{mkessler@refproof@save@claim}{\value{claim}}
|
||||
\protected@edef\mkessler@refproof@dummy@expand{\arabic{claim}}
|
||||
\FSPush{mkessler@refproof@save@claim}{\mkessler@refproof@dummy@expand}
|
||||
\setcounter{claim}{0}
|
||||
\def\theclaim{\arabic{claim}}
|
||||
\ifnum\value{mkessler@refproof@proofdepth}>1%
|
||||
|
@ -199,8 +205,8 @@
|
|||
{
|
||||
\mkessler@refproof@saved@endproof
|
||||
%Restore previous claim counter
|
||||
\setcounter{claim}{\value{mkessler@refproof@save@claim}}
|
||||
\addtocounter{mkessler@refproof@proofdepth}{-1}
|
||||
\setcounter{claim}{\FSTop{mkessler@refproof@save@claim}}
|
||||
\FSPop{mkessler@refproof@save@claim}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue