diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-21 23:12:36 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-21 23:12:36 +0000 |
commit | 2277d4f5877c4b465f623028c370c2eaf269d879 (patch) | |
tree | f90981da53ebaa83fc786c8c519096dd71e8cc7c /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex | |
parent | 53cb3d4681fd05c641a0fbbcaa92f8ff62c3b573 (diff) |
tcolorbox (21feb14)
git-svn-id: svn://tug.org/texlive/trunk@33022 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 | 105 |
1 files changed, 104 insertions, 1 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 08c6309378b..6627745ba61 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex @@ -508,7 +508,7 @@ This is a \LaTeX\ example. \begin{docTcbKey}{comment}{=\meta{text}}{no default, initially empty} Records a comment with \meta{text} as content. The comment is displayed - only in conjunction with \refKey{/tcb/listing and comment} + e.\,g.\ in conjunction with \refKey{/tcb/listing and comment} and \refKey{/tcb/comment and listing}. \begin{dispExample} \begin{tcblisting}{comment={This comment is really only a comment}, @@ -519,6 +519,19 @@ This is a \textbf{tcolorbox}. \end{docTcbKey} +\begin{docTcbKey}{image comment}{=\marg{options}\marg{filename}}{style, no default, initially unset} + Uses an image denoted by \meta{filename} as \textit{comment} for the listing. + The image is included by the standard |\includegraphics| macro with + given \meta{options}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side comment, + image comment={width=2.5cm}{example-image-a.pdf},center lower} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + +\clearpage \begin{docTcbKey}{listing and comment}{}{no value} Typesets the environment content as listing in the upper part and a given comment in the lower part. @@ -599,6 +612,64 @@ This is a \LaTeX\ example. \clearpage +\begin{docTcbKey}{listing side comment}{}{no value} +Typesets the environment content side by side as listing in the left (upper) +part and a given comment in the right (lower) part. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side comment, + righthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{comment side listing}{}{no value} +Typesets the environment content side by side with a given comment in the left (upper) +part and as listing in the right (lower) part. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment side listing, + lefthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\enlargethispage*{2cm} +\begin{docTcbKey}{listing outside comment}{}{no value} +Typesets the environment content side by side as listing in a |tcolorbox| +and a given comment outside the box in the right part of the page. +Nevertheless, the outside text is treated as \emph{lower} part of the +|tcolorbox| and can be formatted with all lower part options. +The space partitioning is done with the side by side options from +Section \ref{subsec:sidebyside}, see page \pageref{subsec:sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing outside comment, + righthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{comment outside listing}{}{no value} +Typesets the environment content side by side as listing in a |tcolorbox| +and a given comment outside the box in the left part of the page. +Nevertheless, the outside text is treated as \emph{lower} part of the +|tcolorbox| and can be formatted with all lower part options. +The space partitioning is done with the side by side options from +Section \ref{subsec:sidebyside}, see page \pageref{subsec:sidebyside}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment outside listing, + lefthand width=1.5cm,image comment={width=1.5cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\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. @@ -628,6 +699,38 @@ This is a \LaTeX\ example. \clearpage +\begin{docTcbKey}{listing above comment}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and a given comment 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 comment is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing above comment, + center lower,image comment={width=3cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{comment above listing}{}{no value} + Typesets the environment content as listing in a |tcolorbox| + and a given comment 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 comment is controlled by \refKey{/tcb/middle}. +\begin{dispExample} +\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,comment above listing, + center lower,image comment={width=3cm}{example-image-a.pdf}} +This is a \LaTeX\ example. +\end{tcblisting} +\end{dispExample} +\end{docTcbKey} + + + +\clearpage \subsection{Creation of \LaTeX\ Tutorials}\label{sec:latextutorial} The following source code gives a guideline for the creation of \LaTeX\ tutorials. In the next section, a framework for \LaTeX\ exercises is described. |