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.sty51
1 files changed, 32 insertions, 19 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
index c562cac1480..b568a300ebc 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty
@@ -19,17 +19,20 @@
\@ifpackageloaded{mdframed}{
\PackageError{lwarp}
- {Package mdframed must be loaded after package amsthm}
{%
- Move \detokenize{\usepackage}{amsthm} before
- \detokenize{\usepackage}{mdframed}.\MessageBreak
+ Package mdframed must be loaded after package amsthm.\MessageBreak
+ Enter 'H' for solutions%
+ }
+ {%
+ Move ``\protect\usepackage{amsthm}'' before
+ ``\protect\usepackage{mdframed}''.\MessageBreak
Package amsthm may be loaded by something else,\MessageBreak
which must also be moved before mdframed.%
}
}
-{}
+{\relax}
+\RequirePackage{amsmath}
\LWR@ProvidesPackagePass{amsthm}[2017/10/31]
-
\newcommand{\LWR@newtheoremstyle}{plain}
\renewcommand{\theoremstyle}[1]{%
@@ -56,31 +59,41 @@
\else % numbered theorem, need to check for optional arg
\def\@tempa{\@oparg{\@ynthm{#2}}[]}%
\fi
- \AtBeginEnvironment{#2}{\edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#2}}}% lwarp
+ \AtBeginEnvironment{#2}{%
+ \edef\LWR@thisthmstyle{\@nameuse{LWR@thmstyle#2}}%
+ }% lwarp
}%
\@tempa
}
\newcommand{\LWR@haveamsthmname}{
-\renewcommand{\thmname}[1]{\InlineClass{amsthmname\LWR@thisthmstyle}{##1}}
+ \renewcommand{\thmname}[1]{%
+ \InlineClass{amsthmname\LWR@thisthmstyle}{##1}%
+ }
}
\newcommand{\LWR@haveamsthmnumber}{
-\renewcommand{\thmnumber}[1]{\InlineClass{amsthmnumber\LWR@thisthmstyle}{##1}}
+ \renewcommand{\thmnumber}[1]{%
+ \InlineClass{amsthmnumber\LWR@thisthmstyle}{##1}%
+ }
}
\newcommand{\LWR@haveamsthmnote}{
-\renewcommand{\thmnote}[1]{\InlineClass{amsthmnote\LWR@thisthmstyle}{##1}}
+ \renewcommand{\thmnote}[1]{%
+ \InlineClass{amsthmnote\LWR@thisthmstyle}{##1}%
+ }
}
\LWR@haveamsthmname
\LWR@haveamsthmnumber
\LWR@haveamsthmnote
\def\@begintheorem#1#2[#3]{%
+ \GetTitleString{#3}% lwarp
+ \let\@currentlabelname\GetTitleStringResult% lwarp
\item[
- \@ifempty{#1}{\let\thmname\@gobble}{\LWR@haveamsthmname}% lwarp
- \@ifempty{#2}{\let\thmnumber\@gobble}{\LWR@haveamsthmnumber}% lwarp
- \@ifempty{#3}{\let\thmnote\@gobble}{\LWR@haveamsthmnote}% lwarp
+ \@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~
\thmheadnl % possibly a newline.
@@ -90,8 +103,8 @@
\def\@thm#1#2#3{%
\ifhmode\unskip\unskip\par\fi
\normalfont
- \LWR@forcenewpage% lwarp
- \BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
+ \LWR@forcenewpage% lwarp
+ \BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
\trivlist
\let\thmheadnl\relax
\let\thm@swap\@gobble
@@ -114,8 +127,8 @@
\def\cref@thmoptarg[#1]#2#3#4{%
\ifhmode\unskip\unskip\par\fi%
\normalfont%
- \LWR@forcenewpage% lwarp
- \BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
+ \LWR@forcenewpage% lwarp
+ \BlockClass{amsthmbody\LWR@thisthmstyle}% lwarp
\trivlist%
\let\thmheadnl\relax%
\let\thm@swap\@gobble%
@@ -148,9 +161,9 @@
\def\Box{\text{\HTMLunicode{25A1}}}% UTF-8 white box
\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\openbox\LWR@orig@openbox%
-\LetLtxMacro\blacksquare\LWR@orig@blacksquare%
-\LetLtxMacro\Box\LWR@orig@Box%
+ \LetLtxMacro\openbox\LWR@orig@openbox%
+ \LetLtxMacro\blacksquare\LWR@orig@blacksquare%
+ \LetLtxMacro\Box\LWR@orig@Box%
}% appto
}{}% @ifundefined
}% AtBeginDocument