summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-09-22 22:17:46 +0000
committerKarl Berry <karl@freefriends.org>2014-09-22 22:17:46 +0000
commitd618f80f8f62c896392904e75aefd221af6fa9e6 (patch)
tree28777aa698936b11b02d58431345e41e0d3c6655 /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
parent942f0cacc577ae897adcaf7f1705b0a864223002 (diff)
tcolorbox (22sep14)
git-svn-id: svn://tug.org/texlive/trunk@35232 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex50
1 files changed, 48 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
index c38f60f8d2c..ab92c631692 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.initoptions.tex
@@ -50,7 +50,7 @@ The real counter name is \texttt{\tcbcounter}.
\clearpage
\begin{newTcbKey}{use counter from}{=\meta{tcolorbox}}{no default, initially unset}
Here, a counter from another \meta{tcolorbox} is reused.
-Note that the setting for \refKey{/tcb/new/number format} and
+Note that the settings for \refKey{/tcb/new/number format} and
\refKey{/tcb/new/number within} are inherited and cannot be changed.
The counter value is referenced by \docAuxCommand{thetcbcounter}.
@@ -70,7 +70,7 @@ The real counter name is \texttt{\tcbcounter}.
\begin{newTcbKey}{use counter}{=\meta{counter}}{no default, initially unset}
-Here, an ordinary existing \LaTeX\ counter is used for numbering.
+Here, an ordinary existing \LaTeX\ \meta{counter} is used for numbering.
With \refKey{/tcb/new/number format} and
\refKey{/tcb/new/number within}, the appearance and behavior of the counter
can be changed. The counter value is referenced by \docAuxCommand{thetcbcounter}.
@@ -91,6 +91,15 @@ The real counter name is \texttt{\tcbcounter}.
\end{newTcbKey}
+\begin{newTcbKey}[][doc new=2014-09-19]{use counter*}{=\meta{counter}}{no default, initially unset}
+An existing \LaTeX\ \meta{counter} is used for numbering. In contrast to
+\refKey{/tcb/new/use counter}, the options \refKey{/tcb/new/number format} and
+\refKey{/tcb/new/number within} are ignored. Use this for counters which
+are already configured outside the |tcolorbox| package, e.\,g.\ the standard
+|figure| counter.
+\end{newTcbKey}
+
+
\begin{newTcbKey}{no counter}{}{no value, initially set}
The created boxes are not numbered. This is the default. The option may
be used to overrule a previous option.
@@ -182,9 +191,46 @@ With \texttt{varioref}:\\
\Vref*{myreference}, \vref*{myreference}.
\end{dispExample}
+\clearpage
+\begin{newTcbKey}[][doc new=2014-09-19]{blend into}{=\meta{name}}{style, no default, initially unset}
+Used to comfortably blend into an existing schema of naming and numbering for
+some selected cases. For example, a |tcolorbox| can be used to display
+and entitle an image pretending to be a standard |figure| environment.
+Here, \refKey{/tcb/title} is used instead of the standard |\caption|
+and \refKey{/tcb/list text} can be used instead of the optional parameter
+of the standard |\caption|.
+Feasible values for \meta{name} are:
+\begin{itemize}
+\item\docValue{figures}: blend into the standard |figure| environment.
+\item\docValue{tables}: blend into the standard |table| environment.
+\item\docValue{listings}: blend into the standard |lstlistings| environment
+ of the package |listings| \cite{heinz:2013a}.
+ \begin{marker}
+ Note that |blend into=listings| can only be used in the document content
+ or, preferably, inside a |\AtBeginDocument| clause! Using it without
+ |\AtBeginDocument| inside the preamble does not work since the |listings|
+ packages initializes its counter also inside |\AtBeginDocument|.
+ \end{marker}
+\end{itemize}
+\end{newTcbKey}
+
+\enlargethispage*{5cm}
+\begin{dispListing}
+\begin{figure}[htb]
+ \centering\includegraphics[height=4cm]{lichtspiel.jpg}
+ \caption{A standard figure}
+\end{figure}
+\newtcolorbox[blend into=figures]{myfigure}[2][]{float=htb,capture=hbox,
+ title={#2},every float=\centering,#1}
+
+\begin{myfigure}{A tcolorbox figure}
+ \includegraphics[height=4cm]{lichtspiel.jpg}
+\end{myfigure}
+\end{dispListing}
+{\tcbusetemp}
\clearpage