summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty55
1 files changed, 48 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
index b568a300ebc..f49848661fb 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
@@ -63,7 +63,7 @@
\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#2}}%
}% lwarp
}%
- \@tempa
+ \@tempa%
}
\newcommand{\LWR@haveamsthmname}{
@@ -90,21 +90,53 @@
\def\@begintheorem#1#2[#3]{%
\GetTitleString{#3}% lwarp
\let\@currentlabelname\GetTitleStringResult% lwarp
- \item[
+ \item[%
+ \LWR@newautopagelabel{page}%
\@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% lwarp
\@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% lwarp
\@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% lwarp
\thm@swap\swappedhead\thmhead{#1}{#2}{#3}%
- \the\thm@headpunct~
+ \the\thm@headpunct % space
\thmheadnl % possibly a newline.
\hskip\thm@headsep
- ]
+ ]%
\ignorespaces}
\def\@thm#1#2#3{%
\ifhmode\unskip\unskip\par\fi
\normalfont
\LWR@forcenewpage% lwarp
+ \LWR@printpendingfootnotes% lwarp
\BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
+ \renewcommand{\footnote}[1][]{%
+ \ifblank{##1}%
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark\@footnotetext
+ }%
+ {%
+ \begingroup
+ \csname c@\@mpfn\endcsname ##1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark\@footnotetext
+ }%
+ }%
+ \renewcommand{\footnotemark}[1][]{%
+ \ifblank{##1}%
+ {%
+ \stepcounter{footnote}%
+ \protected@xdef\@thefnmark{\thefootnote}%
+ \@footnotemark%
+ }%
+ {%
+ \begingroup%
+ \c@footnote ##1\relax%
+ \unrestored@protected@xdef\@thefnmark{\thefootnote}%
+ \endgroup%
+ \@footnotemark%
+ }%
+ }%
\trivlist
\let\thmheadnl\relax
\let\thm@swap\@gobble
@@ -121,13 +153,14 @@
\refstepcounter{#2}%
\def\@tempa{\@oparg{\@begintheorem{#3}{\csname the#2\endcsname}}[]}%
\fi
- \@tempa
+ \@tempa%
}
\AtBeginDocument{%
\def\cref@thmoptarg[#1]#2#3#4{%
\ifhmode\unskip\unskip\par\fi%
\normalfont%
\LWR@forcenewpage% lwarp
+ \LWR@printpendingfootnotes% lwarp
\BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
\trivlist%
\let\thmheadnl\relax%
@@ -149,7 +182,12 @@
}%
}% AtBeginDocument
-\def\@endtheorem{\endtrivlist\endBlockClass\@endpefalse }
+\def\@endtheorem{%
+ \endtrivlist%
+ \LWR@printpendingfootnotes% lwarp
+ \endBlockClass%
+ \@endpefalse%
+}
\AtBeginDocument{
\@ifundefined{LWR@orig@openbox}{
\LetLtxMacro\LWR@orig@openbox\openbox
@@ -168,8 +206,10 @@
}{}% @ifundefined
}% AtBeginDocument
\renewenvironment{proof}[1][\proofname]{\par
-\LWR@forcenewpage% lwarp
+ \LWR@forcenewpage% lwarp
+ \LWR@printpendingfootnotes% lwarp
\BlockClass{amsthmproof}% lwarp
+ \LWR@newautopagelabel{page}%
\pushQED{\qed}%
\normalfont \topsep6\p@\@plus6\p@\relax
\trivlist
@@ -177,6 +217,7 @@
\InlineClass{amsthmproofname}{#1\@addpunct{.}}]\ignorespaces% changes
}{%
\InlineClass{theoremendmark}{\popQED}\endtrivlist%
+ \LWR@printpendingfootnotes% lwarp
\endBlockClass% lwarp
\@endpefalse
}