diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-18 22:04:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-18 22:04:25 +0000 |
commit | 7edd1b30f6d91c3f4961d8ceca5a9af64668db1b (patch) | |
tree | 3c631b8d49caab36f4b589405ec4766a0f46aa5a /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex | |
parent | 00be60da8df9f90d4ad3914ed813951c0639b409 (diff) |
tcolorbox (17dec13)
git-svn-id: svn://tug.org/texlive/trunk@32442 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex | 62 |
1 files changed, 54 insertions, 8 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex index cdd632fc08d..1b0036e7f5b 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex @@ -189,6 +189,12 @@ This \textbf{text} is written to a standardized file for later usage. \clearpage +\begin{marker} +It is not recommended to create a new sort of |tcblisting| environment with +one optional argument only. If there is just one argument, it should be made +mandatory to avoid content scanning problems. +\end{marker} + \begin{docCommand}{newtcblisting}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} Creates a new environment \meta{name} based on \refEnv{tcblisting}. Basically, |\newtcblisting| operates like |\newenvironment|. This means, @@ -241,6 +247,7 @@ This is my \end{mybox} \end{dispExample*} +\clearpage \inputpreamblelisting{C} \begin{dispExample*}{sbs,lefthand ratio=0.5} @@ -248,11 +255,10 @@ This is my This is my \LaTeX\ box. \end{mycbox} \end{dispExample*} - \end{docCommand} -\enlargethispage*{1cm} +%\enlargethispage*{1cm} \begin{docCommand}{renewtcblisting}{\oarg{init options}\marg{name}\oarg{number}\oarg{default}\marg{options}} Operates like \refCom{newtcblisting}, but based on |\renewenvironment| instead of |\newenvironment|. An existing environment is redefined. @@ -456,10 +462,6 @@ be used inside these macros. \end{docTcbKey} - - - - \begin{docTcbKey}{listing and text}{}{no value, initially set} Typesets the environment content as listing in the upper part and as compiled text in the lower part. @@ -470,6 +472,7 @@ This is a \LaTeX\ example. \end{dispExample} \end{docTcbKey} + \begin{docTcbKey}{text and listing}{}{no value} Typesets the environment content as compiled text in the upper part and as listing in the lower part. @@ -595,6 +598,34 @@ This is a \LaTeX\ example. \end{docTcbKey} +\clearpage +\begin{docTcbKey}{listing above text}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and as compiled text outside and below the box. + The outside text is treated as \emph{lower} part of the + |tcolorbox| and can be formatted with all lower part options. + The distance between box and text is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing above text} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{text above listing}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and as compiled text outside and above the box. + The outside text is treated as \emph{lower} part of the + |tcolorbox| and can be formatted with all lower part options. + The distance between box and text is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,text above listing} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + \clearpage \subsection{Creation of \LaTeX\ Tutorials}\label{sec:latextutorial} @@ -775,9 +806,24 @@ The following series of examples demonstrate the application of \begin{dispExample} +\begin{texexptitled}[center lower,text above listing] + {How to use options (6):\par The picture may also be put above + the listing box.}{options6} +\begin{tikzpicture} +\path[fill=yellow!50!white] (0,0) circle (11mm); +\path[fill=white] (0,0) circle (9mm); +\foreach \w/\c in {90/red,210/green,330/blue} +{\path[shading=ball,ball color=\c] + (\w:1cm) circle (7mm);} +\end{tikzpicture} +\end{texexptitled} +\end{dispExample} + + +\begin{dispExample} \begin{texexptitled}[beamer,center lower,text outside listing,lefthand width=3.5cm] - {How to use options (6):\par Our style is easily transformed into - a beamerish one.}{options6} + {How to use options (7):\par Our style is easily transformed into + a beamerish one.}{options7} \begin{tikzpicture} \path[fill=yellow!50!white] (0,0) circle (11mm); \path[fill=white] (0,0) circle (9mm); |