%% The LaTeX package tcolorbox - version 2.61 (2014/01/10) %% tcbtheorems.code.tex: Code for theorems in colorboxes %% %% ------------------------------------------------------------------------------------------- %% Copyright (c) 2006-2014 by Prof. Dr. Dr. Thomas F. Sturm %% ------------------------------------------------------------------------------------------- %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license or (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `author-maintained'. %% %% This work consists of all files listed in README %% %\makeatletter \tcb@set@library@version{2.61} \RequirePackage{amsmath} \def\tcb@hack@amsmath{\tcb@hack@currenvir\vskip-\abovedisplayskip} \def\tcb@theo@title#1#2#3{% \ifdefempty{#2}{\setbox\z@=\hbox{#1}}{\setbox\z@=\hbox{#1~#2}}% \def\temp@a{#3}% \ifx\temp@a\@empty\relax% \unhbox\z@% \else% \setbox\z@=\hbox{\unhbox\z@\kvtcb@separatorsign\ }% \hangindent\wd\z@% \hangafter=1% \mbox{\unhbox\z@}#3% \fi% } \def\tcb@theo@listentry#1#2#3{% \def\kvtcb@listentry{\protect\numberline{#2}#3}% } \def\tcb@theo@label#1#2{% \def\temp@a{#2}% \ifx\temp@a\@empty% \else% \tcbset{label={#1:#2}}% \fi% } \tcbset{ theorem/.style args={#1#2#3#4}{% step and label={#2}{#4},% title={\letcs\tcb@temp{the#2}\tcb@theo@title{#1}{\tcb@temp}{#3}}},% math upper/.style={before upper=$\displaystyle,after upper=$},% math lower/.style={before lower=$\displaystyle,after lower=$},% math/.style={math upper,math lower},% ams equation upper/.style={before upper=\tcb@hack@currenvir\equation,after upper=\endequation},% ams equation lower/.style={before lower=\tcb@hack@currenvir\equation,after lower=\endequation},% ams equation/.style={ams equation upper,ams equation lower},% ams equation* upper/.style={before upper=\tcb@hack@currenvir\csname equation*\endcsname,after upper=\endequation},% ams equation* lower/.style={before lower=\tcb@hack@currenvir\csname equation*\endcsname,after lower=\endequation},% ams equation*/.style={ams equation* upper,ams equation* lower},% ams align upper/.style={before upper=\tcb@hack@amsmath\align,after upper=\endalign},% ams align lower/.style={before lower=\tcb@hack@amsmath\align,after lower=\endalign},% ams align/.style={ams align upper,ams align lower},% ams align* upper/.style={before upper=\tcb@hack@amsmath\csname align*\endcsname,after upper=\endalign},% ams align* lower/.style={before lower=\tcb@hack@amsmath\csname align*\endcsname,after lower=\endalign},% ams align*/.style={ams align* upper,ams align* lower},% ams gather upper/.style={before upper=\tcb@hack@amsmath\gather,after upper=\endgather},% ams gather lower/.style={before lower=\tcb@hack@amsmath\gather,after lower=\endgather},% ams gather/.style={ams gather upper,ams gather lower},% ams gather* upper/.style={before upper=\tcb@hack@amsmath\csname gather*\endcsname,after upper=\endgather},% ams gather* lower/.style={before lower=\tcb@hack@amsmath\csname gather*\endcsname,after lower=\endgather},% ams gather*/.style={ams gather* upper,ams gather* lower},% ams nodisplayskip upper/.style={before upper=\vskip-\abovedisplayskip},% ams nodisplayskip lower/.style={before lower=\vskip-\abovedisplayskip},% ams nodisplayskip/.style={ams nodisplayskip upper,ams nodisplayskip lower},% highlight math style/.style={highlight math/.style={notitle,nophantom,#1}},% separator sign/.store in=\kvtcb@separatorsign,% separator sign colon/.style={separator sign={:}},% separator sign dash/.style={separator sign={\ --}},% } \newcommand{\new@tcbtheorem}[5][]{% \@@newtcolorbox[auto counter,#1]{#2}[3][]{#4,% title={\tcb@theo@title{#3}{\thetcbcounter}{##2}},% list entry={\protect\numberline{\thetcbcounter}##2},% code={\tcb@theo@label{#5}{##3}},% ##1}% \@@newtcolorbox[#1,no counter,list inside=]{#2*}[2][]{#4,% title={\tcb@theo@title{#3}{\@empty}{##2}},% ##1}% } \def\newtcbtheorem{\let\@@newtcolorbox\newtcolorbox% \new@tcbtheorem} \def\renewtcbtheorem{\let\@@newtcolorbox\renewtcolorbox% \new@tcbtheorem} \newcommand{\tcbmaketheorem}[5]{% \newtcolorbox{#1}[3][]{#3,theorem={#2}{#4}{##2}{#5:##3},##1}% } \newtcbox{\tcboxmath}[1][]{nobeforeafter,math upper,tcbox raise base,#1} \newtcbox{\tcbhighmath}[1][]{highlight math,nobeforeafter,math upper,tcbox raise base,#1} \tcbset{% reset@theorems/.style={% highlight math style={colframe=red,colback=yellow!25!white},% separator sign colon,% }, initialize@reset=reset@theorems, }