diff options
author | Norbert Preining <norbert@preining.info> | 2020-07-17 03:02:31 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2020-07-17 03:02:31 +0000 |
commit | 4ea983e3d411ade406c09b30ece9139457516b6f (patch) | |
tree | 02acddfa7ad11d5bf9449468eb9d9b3cd1f33bc3 /macros/latex/contrib/thmtools/thmdef-thmbox.dtx | |
parent | 545097774851316dfcb923ebf87501026949a9b4 (diff) |
CTAN sync 202007170302
Diffstat (limited to 'macros/latex/contrib/thmtools/thmdef-thmbox.dtx')
-rw-r--r-- | macros/latex/contrib/thmtools/thmdef-thmbox.dtx | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/macros/latex/contrib/thmtools/thmdef-thmbox.dtx b/macros/latex/contrib/thmtools/thmdef-thmbox.dtx new file mode 100644 index 0000000000..ea22cbae97 --- /dev/null +++ b/macros/latex/contrib/thmtools/thmdef-thmbox.dtx @@ -0,0 +1,36 @@ +% \iffalse meta-comment +% +% Copyright (C) 2010 by Ulrich M. Schwarz +% See file COPYING for more details. +%\fi +% +%\iffalse (hide this from DocInput) +%<*thmbox> +%\fi +% The thmbox package does something else: instead of having a separate +% environment, we have to use a command different from +% \lstinline|\newtheorem| to get the boxed style. Fortunately, +% \thmtools stores the command as \lstinline|\thmt@theoremdefiner|, so we +% can modify it. (One of the perks if extension writer and framework writer +% are the same person.) So, in contrast to the previous example, this time +% we need to do something before the actual \lstinline|\newtheorem| is +% called. +% \begin{macrocode} +\define@key{thmdef}{thmbox}[L]{% + \thmt@trytwice{% + \let\oldproof=\proof + \let\oldendproof=\endproof + \let\oldexample=\example + \let\oldendexample=\endexample + \RequirePackage[nothm]{thmbox} + \let\proof=\oldproof + \let\endproof=\oldendproof + \let\example=\oldexample + \let\endexample=\oldendexample + \def\thmt@theoremdefiner{\newboxtheorem[#1]}% + }{}% +}% +% \end{macrocode} +%\iffalse (hide this from DocInput) +%</thmbox> +%\fi |