summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-09 16:31:58 +0000
committerKarl Berry <karl@freefriends.org>2013-04-09 16:31:58 +0000
commitd6730e96b1acc94ef3a26f9079e57099be823dff (patch)
tree2bc872d6369d464c590c9a071de5274beca219c7 /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex
parent92897266fb13289d7ef1da636a65bd9c444864f3 (diff)
tcolorbox (9apr13)
git-svn-id: svn://tug.org/texlive/trunk@29788 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex')
-rw-r--r--Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex57
1 files changed, 57 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex
new file mode 100644
index 00000000000..03494e42e1e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.verbatim.tex
@@ -0,0 +1,57 @@
+% !TeX root = tcolorbox.tex
+% include file of tcolorbox.tex (manual of the LaTeX package tcolorbox)
+\clearpage
+\section{Saving and Loading of Verbatim Texts}
+The following macros are slightly modified versions of the original macros
+from the known packages |moreverb| and |verbatim|.
+They are used implicitly inside of a |tcolorbox| environment,
+but they can be used outside also.
+\enlargethispage*{1.5cm}
+
+\begin{docEnvironment}{tcbverbatimwrite}{\marg{file name}}
+ Saves the \meta{environment content} to a file named by \meta{file name}.
+ \TeX\ macros inside the environment are not expanded.
+\begin{dispExample}
+\begin{tcbverbatimwrite}{\jobname_verbexp.tex}
+ This text is saved \textit{as is}.
+\end{tcbverbatimwrite}
+
+Now, we are using the file:\par
+\input{\jobname_verbexp.tex}
+\end{dispExample}
+
+This environment may be used inside an own environment. Note, that inside
+the environment definition |\tcbverbatimwrite| has to be used instead of
+|\begin{tcbverbatimwrite}| and |\endtcbverbatimwrite| instead of |\end{tcbverbatimwrite}|.
+\begin{dispExample}
+\newenvironment{myverbatim}{%
+ \begingroup\tcbverbatimwrite{\jobname_myverb.tex}}%
+ {\endtcbverbatimwrite\endgroup}
+
+\begin{myverbatim}
+ This is the text which is saved by my own environment.
+\end{myverbatim}
+
+Now, we are using the file:\par
+\input{\jobname_myverb.tex}
+\end{dispExample}
+\end{docEnvironment}
+
+\begin{docEnvironment}{tcbwritetemp}{}
+ Has the same function as \refEnv{tcbverbatimwrite}, but uses the key value
+ of |tempfile| for the file name.
+\begin{dispExample}
+\begin{tcbwritetemp}
+ This text is saved \textit{as is}.
+\end{tcbwritetemp}
+
+Now, we are using the file:\par
+\tcbusetemp
+\end{dispExample}
+\end{docEnvironment}
+
+
+\begin{docCommand}{tcbusetemp}{}
+ Loads the current temporary file which was saved by \refEnv{tcbwritetemp}.
+\end{docCommand}
+