diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty | 47 |
1 files changed, 30 insertions, 17 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..27e2398db3e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsthm.sty @@ -19,10 +19,13 @@ \@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.% } @@ -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 |