summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex305
1 files changed, 288 insertions, 17 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
index 4f6a9277ddf..4a26f16905d 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
@@ -73,7 +73,7 @@ This also loads the package |amsmath|.
\begin{docCommand}{tcbmaketheorem}{\marg{name}\marg{display name}\marg{options}\marg{counter}\marg{prefix}}
-\begin{marker}
+\smallskip\begin{marker}
\refCom{newtcbtheorem} supersedes this macro.
\end{marker}
\begin{deprecated}
@@ -132,6 +132,47 @@ This also loads the package |amsmath|.
\int x^2 ~\text{d}x &= \frac13 x^3 + c.
\end{tcolorbox}
\end{dispExample}
+
+\clearpage
+\refCom{tcbhighmath} can be used in symbiosis with the |empheq| package
+which allows to specify own boxing commands to mark multiline formulas.
+
+\begin{dispExample}
+% \usepackage{empheq}
+\begin{empheq}[box=\tcbhighmath]{align}
+a&=\sin(z)\\
+E&=mc^2 + \int_a^b x\, dx
+\end{empheq}
+
+\tcbset{highlight math style={enhanced,
+ colframe=red!60!black,colback=yellow!50!white,arc=4pt,boxrule=1pt,
+ drop fuzzy shadow}}
+
+\begin{empheq}[box=\tcbhighmath]{align}
+a&=\sin(z)\\
+E&=mc^2 + \int_a^b x\, dx
+\end{empheq}
+\end{dispExample}
+
+Besides \refCom{tcbhighmath}, one can easily define an independent new box
+based on \refCom{tcbox} which acts like \refCom{tcbhighmath}:
+
+\begin{dispExample}
+% \usepackage{empheq}
+\newtcbox{\otherbox}[1][]{nobeforeafter,math upper,tcbox raise base,
+ enhanced,frame hidden,boxrule=0pt,interior style={top color=green!10!white,
+ bottom color=green!10!white,middle color=green!50!yellow},
+ fuzzy halo=1pt with green,#1}
+
+\begin{empheq}[box=\otherbox]{align}
+a&=\sin(z)\\
+E&=mc^2 + \int_a^b x\, dx
+\end{empheq}
+
+\begin{equation}
+\tcbhighmath{E} = \otherbox{mc^2}
+\end{equation}
+\end{dispExample}
\end{docCommand}
@@ -139,7 +180,7 @@ This also loads the package |amsmath|.
\subsection{Option Keys of the Library}
-\begin{docTcbKey}{separator sign}{=\meta{sign}}{no default, initial |:|}
+\begin{docTcbKey}{separator sign}{=\meta{sign}}{no default, initially |:|}
The given \meta{sign} is used inside the title text of a theorem
as separater between display name combined with number and
the specific title text. It is omitted, if there is no specific title text.
@@ -171,6 +212,134 @@ My theorem text.
\end{dispExample}
\end{docTcbKey}
+\begin{docTcbKey}{separator sign none}{}{style, no value}
+Sets \refKey{/tcb/separator sign} to empty.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ separator sign none}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}{description delimiters}{=\meta{left}\meta{right}}{no default, initially empty}
+ The given \meta{left} and \meta{right} delimiter signs are used to frame
+ the descriptive title text of a theorem.
+
+\begin{dispExample}
+% \usepackage{amssymb}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ description delimiters={\flqq}{\frqq}}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{description delimiters parenthesis}{}{style, no value}
+Sets \refKey{/tcb/description delimiters} to |(| and |)|.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ description delimiters parenthesis}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{description delimiters none}{}{style, no value, initially set}
+Sets \refKey{/tcb/description delimiters} to the default empty texts.
+\end{docTcbKey}
+
+
+
+\begin{docTcbKey}{terminator sign}{=\meta{sign}}{no default, initially empty}
+ The given \meta{sign} is used as terminator at the end of the title text of a theorem.
+
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ terminator sign={.}}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}{terminator sign colon}{}{style, no value, initially set}
+Sets \refKey{/tcb/terminator sign} to the colon |:| sign.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ separator sign dash,terminator sign colon}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+\begin{docTcbKey}{terminator sign dash}{}{style, no value}
+Sets \refKey{/tcb/terminator sign} to an en-dash sign.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ terminator sign dash}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+\begin{docTcbKey}{terminator sign none}{}{style, no value}
+Sets \refKey{/tcb/terminator sign} to the default empty text.
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{theorem name and number}{}{style, no value, initially set}
+Prints theorem name followed by theorem number inside the title.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ theorem name and number}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+\clearpage
+\begin{docTcbKey}{theorem number and name}{}{style, no value}
+Prints theorem number followed by theorem name inside the title.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ theorem number and name}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
+\begin{docTcbKey}{theorem name}{}{style, no value}
+Prints theorem name without number inside the title.
+\begin{dispExample}
+\newtcbtheorem[use counter from=mytheo]{sometheorem}{Theorem}%
+ {colback=white,colframe=red!50!black,fonttitle=\bfseries,
+ theorem name,enhanced,watermark text={\thetcbcounter}}{theo}
+\begin{sometheorem}{My example}{}
+My theorem text.
+\end{sometheorem}
+\end{dispExample}
+\end{docTcbKey}
+
\begin{docTcbKey}{theorem}{=\marg{display name}\marg{counter}\marg{title}\marg{marker}}{no default}
This key is internally used by \refCom{tcbmaketheorem}, but can be used
@@ -426,6 +595,116 @@ New colored mathematical environments are easily created using
see \refKey{/tcb/before upper app}.
\end{marker}
+
+\clearpage
+\begin{docTcbKey}{theorem style}{=\meta{name}}{no default, initially |standard|}
+Applies a predefined style \meta{name} to the theorem environment. Some of
+the feasible \meta{name} values resemble style names from the packages |theorem|
+and |ntheorem| to give convenient access to known patterns.
+\begin{marker}
+The styles alter \refKey{/tcb/separator sign}, \refKey{/tcb/description delimiters},
+\refKey{/tcb/terminator sign}, and more. Therefore, one should apply such
+keys \emph{after} a theorem style.
+\end{marker}
+
+For the following examples, we use:
+\inputpreamblelisting{J}
+
+The predefined styles are:
+\begin{itemize}
+%
+\item\docValue{standard}: This is the initial value.
+\begin{dispExample}
+\begin{theorem}[theorem style=standard]{standard}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{change standard}
+\begin{dispExample}
+\begin{theorem}[theorem style=change standard]{change standard}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{plain}
+\begin{dispExample}
+\begin{theorem}[theorem style=plain]{plain}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\clearpage
+\item\docValue{break}
+\begin{dispExample}
+\begin{theorem}[theorem style=break]{break}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{plain apart}
+\begin{dispExample}
+\begin{theorem}[theorem style=plain apart]{plain apart}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{change}
+\begin{dispExample}
+\begin{theorem}[theorem style=change]{change}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{change break}
+\begin{dispExample}
+\begin{theorem}[theorem style=change break]{change break}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{change apart}
+\begin{dispExample}
+\begin{theorem}[theorem style=change apart]{change apart}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\clearpage
+\item\docValue{margin}
+\begin{dispExample}
+\begin{theorem}[theorem style=margin,left=10mm]{margin}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\begin{theorem}[theorem style=margin,left=10mm,oversize]{margin}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{margin break}
+\begin{dispExample}
+\begin{theorem}[theorem style=margin break,left=10mm]{margin break}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\begin{theorem}[theorem style=margin break,left=10mm,oversize]{margin break}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\item\docValue{margin apart}
+\begin{dispExample}
+\begin{theorem}[theorem style=margin apart,left=10mm]{margin apart}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\begin{theorem}[theorem style=margin apart,left=10mm,oversize]{margin apart}{}
+This is my theorem. \begin{equation*} a^2 + b^2 = c^2. \end{equation*}
+\end{theorem}
+\end{dispExample}
+%
+\end{itemize}
+\end{docTcbKey}
+
+
%
\clearpage
\subsection{Examples for Definitions and Theorems}
@@ -506,7 +785,7 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip
% \usepackage{cleveref}
% \tcbuselibrary{skins}
\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}%
- {label type=theorem,enhanced,frame hidden,
+ {theorem style=plain apart,label type=theorem,enhanced,frame hidden,
boxrule=2mm,titlerule=0mm,toptitle=1mm,bottomtitle=1mm,
fonttitle=\bfseries\large,fontupper=\normalsize,
coltitle=green!35!black,colbacktitle=green!15!white,
@@ -543,7 +822,7 @@ Here, using |\Vref| resulting in \Vref{theo:meanvaluetheorem} is more interestin
\begin{dispExample}
% \tcbuselibrary{skins}
\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}%
- {enhanced,arc=0mm,outer arc=0mm,
+ {theorem style=change apart,enhanced,arc=0mm,outer arc=0mm,
boxrule=0mm,toprule=1mm,bottomrule=1mm,left=1mm,right=1mm,
titlerule=0mm,toptitle=0mm,bottomtitle=1mm,top=0mm,
colframe=red!50!black,colback=red!5!white,coltitle=red!50!black,
@@ -579,22 +858,14 @@ You need more attention for your theorems? Here, you are \ldots
\end{Theorem}
\end{dispExample}
-
-Using \refCom{newtcbtheorem} is a convenient way to generate a new
-theorem type. On the other hand, it enforces to use a titled |tcolorbox|.
-If you prefer to have an embedded title, you may create a new theorem
-type with the more flexible \refCom{newtcolorbox} macro:
+Let's try a more conservative approach:
\begin{dispExample}
% \tcbuselibrary{skins}
-\newtcolorbox[use counter from=Definition]{YetAnotherTheorem}[3][%
- enhanced,colframe=blue!50!black,colback=yellow!20!white,
- drop fuzzy shadow=blue!50!black!50!white,boxrule=0.4pt,
- fontupper=\itshape]{%
- before upper={\textcolor{red!50!black}{\upshape\bfseries
- Theorem~\thetcbcounter\ (#2)}\quad},
- list entry={\protect\numberline{\thetcbcounter}#2},%
- label={theo:#3},#1}
+\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}%
+ {theorem style=plain,enhanced,colframe=blue!50!black,colback=yellow!20!white,
+ coltitle=red!50!black,fonttitle=\upshape\bfseries,fontupper=\itshape,
+ drop fuzzy shadow=blue!50!black!50!white,boxrule=0.4pt}{theo}
\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n3}%
Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und