0% found this document useful (0 votes)
146 views1 page

Theorems

The library defines a command to create new theorem environments using tcolorbox. The \newtcbtheorem command defines a new theorem-like environment with a given name, display name, and options. It numbers the theorems and can set prefixes. Examples show how to define and use a new "My Theorem" environment which numbers theorems within sections and styles them with green color options.

Uploaded by

jimusos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
146 views1 page

Theorems

The library defines a command to create new theorem environments using tcolorbox. The \newtcbtheorem command defines a new theorem-like environment with a given name, display name, and options. It numbers the theorems and can set prefixes. Examples show how to define and use a new "My Theorem" environment which numbers theorems within sections and styles them with green color options.

Uploaded by

jimusos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

16 Library theorems

LIB
The library is loaded by a package option or inside the preamble by:

\tcbuselibrary{theorems}

This also loads the package amsmath.

16.1 Macros of the Library


U 2016-06-22 \newtcbtheorem[hinit optionsi]{hnamei}{hdisplay namei}{hoptionsi}{hprefixi}
Creates new environments hnamei and hnamei* based on tcolorbox to frame a (math-
ematical) theorem. The hdisplay namei is used in the title line with a number, e. g.
Theorem 5.1. The hoptionsi are given to the underlying tcolorbox to control the appear-
ance. The hinit optionsi allow setting up automatic numbering, see Section 5 on page 101.
The new environment hnamei takes one optional and two mandatory parameters. The op-
tional parameter supplements the options and should be used only in rare cases. The first
mandatory parameter is the title text for the theorem and is also set as /tcb/nameref P. 95
identifier. The second mandatory parameter is a hmarkeri. The theorem is automati-
cally labeled with hprefixihseparatorihmarkeri where hseparatori is predefined as :, see
/tcb/label separator P. 335 .
The new environment hnamei* takes one optional and one mandatory parameter and rep-
resents an unnumbered variant of the environment hnamei. This variant is not labeled and
not listed in lists of theorems.
Definition in the preamble:
\newtcbtheorem[number within=section]{mytheo}{My Theorem}%
{colback=green!5,colframe=green!35!black,fonttitle=\bfseries}{th}

\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}

My Theorem 16.1: This is my title

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 16.1 and is given on page
328.

\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}

My Theorem 16.2: This is my title

The label parameter can be left empty without LATEX error. Or you may use an own label
to reference Theorem 16.2.

328

You might also like