summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-17 23:17:32 +0000
committerKarl Berry <karl@freefriends.org>2013-04-17 23:17:32 +0000
commit0c5f06400403c02946d916560fc5cea65e1abe4b (patch)
tree97a362e2e8566cd3ff4c84970d383ab4db17d2c9 /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
parent349bac64b70fa1b4e88f05d28d2373e43e601c6a (diff)
tcolorbox (17apr13)
git-svn-id: svn://tug.org/texlive/trunk@30004 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.tex147
1 files changed, 143 insertions, 4 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 21fd295e39d..2edcab150f2 100644
--- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex
@@ -56,11 +56,11 @@ and in compiled form.
Saves the environment content to a file which is named by the key value of
|listing file|. Later, this file can be loaded by
|\tcbinputlisting| or |\tcbuselistingtext| or |\tcbuselistinglisting|.
-\begin{dispExample}
+\begin{dispListing}
\begin{tcboutputlisting}
This \textbf{text} is written to a standardized file for later usage.
\end{tcboutputlisting}
-\end{dispExample}
+\end{dispListing}
\end{docEnvironment}
@@ -74,7 +74,7 @@ This \textbf{text} is written to a standardized file for later usage.
\end{dispExample}
\end{docCommand}
-
+\clearpage
\begin{docCommand}{tcbuselistingtext}{}
Loads text from a file named by the key value of |listing file|.
\begin{dispExample}
@@ -90,7 +90,7 @@ This \textbf{text} is written to a standardized file for later usage.
\end{dispExample}
\end{docCommand}
-
+\enlargethispage*{5mm}
\begin{docCommand}{tcbusetemplisting}{}
Typesets text as listing from a temporary file which was written by
\refEnv{tcbwritetemp}.
@@ -233,6 +233,59 @@ This is a \LaTeX\ example.
\clearpage
+\begin{docTcbKey}{listing side text}{}{no value}
+Typesets the environment content side by side as listing in the left (upper)
+part and as compiled text in the right (lower) part.
+\begin{dispExample}
+\begin{tcblisting}{colback=red!5!white,colframe=red!75!black,listing side text}
+This is a \LaTeX\ example.
+\end{tcblisting}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{text side listing}{}{no value}
+Typesets the environment content side by side as compiled text 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,text side listing}
+This is a \LaTeX\ example.
+\end{tcblisting}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{listing outside text}{}{no value}
+Typesets the environment content side by side as listing in a |tcolorbox|
+and as compiled text 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 text}
+This is a \LaTeX\ example.
+\end{tcblisting}
+\end{dispExample}
+\end{docTcbKey}
+
+
+\begin{docTcbKey}{text outside listing}{}{no value}
+Typesets the environment content side by side as listing in a |tcolorbox|
+and as compiled text 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,text outside listing}
+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.
@@ -361,6 +414,92 @@ part of the box can be used uncoupled also.
\end{dispExample}
+The following series of examples demonstrate the application of
+\refEnv{tcolorbox} options for diversification.
+
+\begin{dispExample}
+\begin{texexptitled}{How to use options (1):\par The basic example}{options1}
+\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}[center lower,enhanced,segmentation hidden,middle=0mm]
+ {How to use options (2):\par The text output is centered and the
+ segmentation line has vanished.}{options2}
+\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}[tikz lower,bicolor,colbacklower=white]
+ {How to use options (3):\par Here, the |tikzpicture| is totally hidden.
+ The |bicolor| skin highlights the output.}{options3}
+\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{texexptitled}
+\end{dispExample}
+
+\begin{dispExample}
+\begin{texexptitled}[center lower,listing side text,righthand width=3.5cm,
+ bicolor,colbacklower=white]
+ {How to use options (4):\par The |bicolor| skin also works with side
+ by side mode}{options4}
+\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}[center lower,listing outside text,righthand width=3.5cm]
+ {How to use options (5):\par Putting our picture outside is just
+ a matter of one word.}{options5}
+\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}
+\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}
+
+
+\clearpage
\subsection{Creation of \LaTeX\ Exercises}
In the following, a guideline is given for the creation of \LaTeX\ exercises
with solutions. These solutions are saved to disk for application at a place of