summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-15 22:46:30 +0000
committerKarl Berry <karl@freefriends.org>2013-07-15 22:46:30 +0000
commitb927b3c4405faf2fc0c1a8b34e07cc7c5dd5b5e8 (patch)
tree3f0b50cbbf4621a283f566948a7f04fe91237876 /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
parentbaf92cd2b6a50c9aaf590f0c88a71532f72667dd (diff)
tcolorbox (15jul13)
git-svn-id: svn://tug.org/texlive/trunk@31204 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex28
1 files changed, 26 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
index b2a06f43b6c..95c117a5059 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.coremacros.tex
@@ -65,6 +65,8 @@ Here, you see the lower part of the box.
\clearpage
\begin{docCommand}{tcbset}{\marg{options}}
Sets options for every following \refEnv{tcolorbox} inside the current \TeX\ group.
+ By default, this does not apply to nested boxes, see
+ Section \ref{subsec:everybox} from page \pageref{subsec:everybox}.\par
For example, the colors of the boxes may be defined for the whole document by this:
\begin{dispListing}
\tcbset{colback=red!5!white,colframe=red!75!black}
@@ -101,7 +103,7 @@ Text \tcbox[tcbox raise base]{Hello World}\hfill
\end{docCommand}
\clearpage
-\begin{docCommand}{newtcolorbox}{\marg{name}\oarg{number}\oarg{default}\marg{options}}
+\begin{docCommand}{newtcolorbox}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}}
Creates a new environment \meta{name} based on \refEnv{tcolorbox}.
Basically, |\newtcolorbox| operates like |\newenvironment|. This means,
the new environment \meta{name} optionally takes \meta{number} arguments, where
@@ -109,6 +111,8 @@ Text \tcbox[tcbox raise base]{Hello World}\hfill
The \meta{options} are given to the underlying |tcolorbox|.
Note that \refKey{/tcb/savedelimiter} is set to the given \meta{name}
automatically.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
\begin{dispExample*}{sbs,lefthand ratio=0.6}
\newtcolorbox{mybox}{colback=red!5!white,
colframe=red!75!black}
@@ -138,15 +142,27 @@ This is my own box with a mandatory title
and options.
\end{mybox}
\end{dispExample*}
+
+\inputpreamblelisting{A}
+
+\begin{dispExample*}{sbs,lefthand ratio=0.6}
+\begin{pabox}[colback=yellow]{Hello there}
+This is my own box with a mandatory
+numbered title and options.
+\end{pabox}
+\end{dispExample*}
\end{docCommand}
-\begin{docCommand}{newtcbox}{\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}}
+\clearpage
+\begin{docCommand}{newtcbox}{\oarg{init options}\marg{\texttt{\textbackslash}name}\oarg{number}\oarg{default}\marg{options}}
Creates a new macro \meta{\texttt{\textbackslash}name} based on \refCom{tcbox}.
Basically, |\newtcbox| operates like |\newcommand|.
The new macro \meta{\texttt{\textbackslash}name} optionally takes \meta{number}$+1$ arguments, where
\meta{default} is the default value for the optional first argument.
The \meta{options} are given to the underlying |tcbox|.
+ The \meta{init options} allow to set up automatic numbering,
+ see Section \ref{sec:initkeys} from page \pageref{sec:initkeys}.
\begin{dispExample*}{sbs,lefthand ratio=0.6}
\newtcbox{\mybox}{colback=red!5!white,
colframe=red!75!black}
@@ -170,6 +186,14 @@ and options.
\mybox[colback=yellow]{Hello there}%
{This is my own box.}
\end{dispExample*}
+
+\inputpreamblelisting{B}
+
+\begin{dispExample*}{sbs,lefthand ratio=0.6}
+\pbbox[colback=yellow]{Hello there}%
+ {This is my own box.}
+\end{dispExample*}
+
\end{docCommand}