summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/thmtools/source/thmdef-mdframed.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/thmtools/source/thmdef-mdframed.dtx')
-rw-r--r--macros/latex/contrib/thmtools/source/thmdef-mdframed.dtx35
1 files changed, 35 insertions, 0 deletions
diff --git a/macros/latex/contrib/thmtools/source/thmdef-mdframed.dtx b/macros/latex/contrib/thmtools/source/thmdef-mdframed.dtx
new file mode 100644
index 0000000000..85c5d9bd2d
--- /dev/null
+++ b/macros/latex/contrib/thmtools/source/thmdef-mdframed.dtx
@@ -0,0 +1,35 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2010-2014 by Ulrich M. Schwarz
+% Copyright (C) 2019 by Frank Mittelbach
+% Copyright (C) 2020- by Yukai Chou
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, version 1.3c.
+% The license can be obtained from
+% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%
+%\fi
+%
+%\iffalse (hide this from DocInput)
+%<*mdframed>
+%\fi
+%
+% Mostly, this key wraps the theorem in a |mdframed| environment.
+% The parameters are set by treating the value we are given as
+% a new key-val list, see below.
+%
+% \begin{macrocode}
+\define@key{thmdef}{mdframed}[{}]{%
+ \thmt@trytwice{}{%
+ \RequirePackage{mdframed}%
+ \RequirePackage{thm-patch}%
+ \addtotheorempreheadhook[\thmt@envname]{%
+ \begin{mdframed}[#1]}%
+ \addtotheorempostfoothook[\thmt@envname]{\end{mdframed}}%
+ }%
+}
+% \end{macrocode}
+%\iffalse (hide this from DocInput)
+%</mdframed>
+%\fi