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.tex119
1 files changed, 83 insertions, 36 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 236d3eb4ff3..8766b6d1eff 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.theorems.tex
@@ -10,32 +10,69 @@ This also loads the package |amsmath|.
\subsection{Macros of the Library}
-\begin{docCommand}{tcbmaketheorem}{\marg{name}\marg{display name}\marg{options}\marg{counter}\marg{prefix}}
+
+\begin{docCommand}{newtcbtheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{prefix}}
Creates a new environment \meta{name} based on |tcolorbox| to frame a
(mathematical) theorem. The \meta{display name} is used in the title line
with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}.
The \meta{options} are given to the underlying |tcolorbox| to control
the appearance.
- The \meta{counter} is used for automatic numbering.
+ %The \meta{counter} is used for automatic numbering.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\par
The new environment \meta{name} takes one optional and two mandatory
parameters. The optional parameter supplements the options and should be
used only in rare cases.
The first mandatory parameter is the title text for the theorem and
the second mandatory parameter is a \meta{marker}. The theorem is
automatically labeled with \meta{prefix}|:|\meta{marker}.
+
+\enlargethispage*{20mm}
+\inputpreamblelisting{F}
+\begin{dispExample}
+\begin{mytheo}{This is my title}{theoexample}
+ This is the text of the theorem. The counter is automatically assigned and,
+ in this example, prefixed with the section number. This theorem is numbered with
+ \ref{th:theoexample} and is given on page \pageref{th:theoexample}.
+\end{mytheo}
+\end{dispExample}
+
\begin{dispExample}
-\tcbmaketheorem{theo}{My Theorem}{colback=green!5,colframe=green!35!black,
- fonttitle=\bfseries}{texercise}{th}
-
-\begin{theo}{This is my title}{theoexample}
- This is the text of the theorem. As can be seen, the counter \texttt{texercise}
- is reused. The theorem is numbered with \ref{th:theoexample} and is
- given on page \pageref{th:theoexample}.
-\end{theo}
+\begin{mytheo}[label=myownlabel]{This is my title}{}
+ The label parameter can be left empty without \LaTeX\ error.
+ Or you may use an own label to reference Theorem \ref{myownlabel}.
+\end{mytheo}
+\end{dispExample}
+
+\begin{dispExample}
+\begin{mytheo}{}{}
+ The title can also be left empty without problem. Note that the ':'
+ vanished magically.
+\end{mytheo}
\end{dispExample}
\end{docCommand}
+\clearpage
+\begin{deprecated}
+\begin{docCommand}{tcbmaketheorem}{\oarg{init options}\marg{name}\marg{display name}\marg{options}\marg{counter}\marg{prefix}}
+ Creates a new environment \meta{name} based on |tcolorbox| to frame a
+ (mathematical) theorem. The \meta{display name} is used in the title line
+ with a number, e.\,g. \mbox{\flqq Theorem 5.1\frqq}.
+ The \meta{options} are given to the underlying |tcolorbox| to control
+ the appearance.
+ The \meta{counter} is used for automatic numbering.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.\par
+ The new environment \meta{name} takes one optional and two mandatory
+ parameters. The optional parameter supplements the options and should be
+ used only in rare cases.
+ The first mandatory parameter is the title text for the theorem and
+ the second mandatory parameter is a \meta{marker}. The theorem is
+ automatically labeled with \meta{prefix}|:|\meta{marker}.
+\end{docCommand}
+\end{deprecated}
+
\begin{docCommand}{tcboxmath}{\oarg{options}\marg{mathematical box content}}
Creates a \refEnv{tcolorbox} which is fitted to the width of the given
\meta{mathematical box content}. This box is intended to be applied as
@@ -54,6 +91,7 @@ This also loads the package |amsmath|.
\end{docCommand}
\clearpage
+
\begin{docCommand}{tcbhighmath}{\oarg{options}\marg{mathematical box content}}
This is a special case of the \refCom{tcboxmath} macro which uses
the style \refKey{/tcb/highlight math}.
@@ -63,7 +101,7 @@ This also loads the package |amsmath|.
\begin{dispExample}
\tcbset{myformula/.style={colback=yellow!10!white,colframe=red!50!black,
- highlight math style={reset,colback=LightBlue!50!white,colframe=Navy}}}
+ highlight math style={colback=LightBlue!50!white,colframe=Navy}}}
\begin{align}
\tcbhighmath{\sum\limits_{n=1}^{\infty} \frac{1}{n}} &= \infty.\\
@@ -330,31 +368,13 @@ the colored boxes. It is assumed that theorems and corollaries should be
identically colored.
All following environments are numbered with a common counter, but this
can be changed easily. Here, the counter output is supplemented by
-the section number.
+the subsection number.
-\begin{dispListing}
-%\newcounter{mytheorem}[section] % preamble
-\def\themytheorem{\thesection.\arabic{mytheorem}}
-
-\tcbset{
- defstyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
- arc=0mm, colback=blue!5!white,colframe=blue!75!black},
- theostyle/.style={fonttitle=\bfseries\upshape, fontupper=\slshape,
- colback=red!10!white,colframe=red!75!black},
-}
-\end{dispListing}
-\tcbusetemp
+\inputpreamblelisting{G}
-By \refCom{tcbmaketheorem}, commonly numbered theorem environments are
+By \refCom{newtcbtheorem}, commonly numbered theorem environments are
created now. |defstyle| and |theostyle| are used for the appearance.
-\begin{dispListing}
-\tcbmaketheorem{Definition}{Definition}{defstyle}{mytheorem}{def}
-\tcbmaketheorem{Theorem}{Theorem}{theostyle}{mytheorem}{theo}
-\tcbmaketheorem{Corollary}{Corollary}{theostyle}{mytheorem}{cor}
-\end{dispListing}
-\tcbusetemp
-
Now, everything is prepared for the following examples.
\begin{dispExample}
@@ -414,12 +434,13 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip
\begin{dispExample}
% \tcbuselibrary{skins}
-\tcbmaketheorem{YetAnotherTheorem}{Theorem}{enhanced,frame hidden,
+\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{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,
colback=green!50!yellow!15!white,borderline={1pt}{0pt}{green!25!blue},
- }{mytheorem}{theo}
+ }{theo}
\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n}%
Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und
@@ -434,14 +455,15 @@ referenced with the marker \texttt{cor:nullstellen}.\bigskip
\begin{dispExample}
% \tcbuselibrary{skins}
-\tcbmaketheorem{YetAnotherTheorem}{Theorem}{enhanced,arc=0mm,outer arc=0mm,
+\newtcbtheorem[use counter from=Definition]{YetAnotherTheorem}{Theorem}%
+ {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,
title style={top color=yellow!50!white,bottom color=red!5!white,
middle color=yellow!50!white},
fonttitle=\bfseries\sffamily\normalsize,fontupper=\normalsize\itshape,
- }{mytheorem}{theo}
+ }{theo}
\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n}%
Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und
@@ -470,5 +492,30 @@ You need more attention for your theorems? Here, you are \ldots
\end{Theorem}
\end{dispExample}
+\clearpage
+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:
+\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={\numberline{\thetcbcounter}#2},%
+ label={theo:#3},#1}
+
+\begin{YetAnotherTheorem}{Mittelwertsatz f\"{u}r $n$ Variable}{mittelwertsatz_n}%
+ Es sei $n\in\mathbb{N}$, $D\subseteq\mathbb{R}^n$ eine offene Menge und
+ $f\in C^{1}(D,\mathbb{R})$. Dann gibt es auf jeder Strecke
+ $[x_0,x]\subset D$ einen Punkt $\xi\in[x_0,x]$, so dass gilt
+ \begin{equation*}
+ f(x)-f(x_0) = \operatorname{grad} f(\xi)^{\top}(x-x_0)
+ \end{equation*}
+\end{YetAnotherTheorem}
+\end{dispExample}