diff options
author | Karl Berry <karl@freefriends.org> | 2014-03-18 22:07:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-03-18 22:07:07 +0000 |
commit | 1ae7c2b9cce883c37a23327ae611d51921b8a1b6 (patch) | |
tree | 30c54ccafd5c22eb8062943c723a3e5156ab3c61 /Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex | |
parent | d834f9da1e08f7fab4ec7359c5aaf2d42c63b1fc (diff) |
tcolorbox (18mar14)
git-svn-id: svn://tug.org/texlive/trunk@33222 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 | 42 |
1 files changed, 39 insertions, 3 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 6627745ba61..041e9281896 100644 --- a/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex +++ b/Master/texmf-dist/doc/latex/tcolorbox/tcolorbox.doc.listings.tex @@ -367,8 +367,44 @@ Note that listings outside \refEnv{tcblisting} and Typically, a user is not expected to use this key at all. \end{docTcbKey} +\begin{docTcbKey}{every listing line}{=\meta{text}}{no default, initially unset/empty} +Inserts some \meta{text} to the begin of every line of a listing. +Note that this a hack of the |listings| package code. This may become unusable +or superfluous in the future. +\begin{dispExample} +\newtcblisting{commandshell}{colback=black,colupper=white,colframe=yellow!75!black, + listing only,listing options={style=tcblatex,language=sh}, + every listing line={\textcolor{red}{\small\ttfamily\bfseries root \$> }}} + +\begin{commandshell} +ls -al +cd /usr/lib +\end{commandshell} +\end{dispExample} +\end{docTcbKey} + + +\begin{docTcbKey}{every listing line*}{=\meta{text}}{no default, initially unset/empty} +Identical to \refKey{/tcb/every listing line} plus additional enlargement +of \refKey{/tcb/rightupper} by the width of \meta{text}. Therefore, this +option has to be used after the geometry settings are done. +This option is intended to be used in conjunction with \refKey{/tcb/hbox}. + +\begin{dispExample} +\newtcblisting{commandshell}{colback=black,colupper=white,colframe=yellow!75!black, + listing only,listing options={style=tcblatex,language=sh},hbox, + every listing line*={\textcolor{red}{\small\ttfamily\bfseries root \$> }}} + +\begin{commandshell} +ls -al +cd /usr/lib +\end{commandshell} +\end{dispExample} +\end{docTcbKey} + See further options in \Vref{sec:commonlistingkeys}. +\clearpage \subsection{Option Keys of the \mylib{listingsutf8} Library} The \mylib{listingsutf8} library is an extension of the \mylib{listings} library, so @@ -384,7 +420,7 @@ all options from \Vref{sec:speclistingkeys} are applicable. See further options in \Vref{sec:commonlistingkeys}. - +\clearpage \subsection{Option Keys of the \mylib{minted} Library} \begin{docTcbKey}{minted language}{=\meta{programming language}}{no default, initially |latex|} @@ -403,7 +439,7 @@ public class HelloWorld { \end{dispExample} \end{docTcbKey} -\clearpage + \begin{docTcbKey}{minted options}{=\meta{key list}}{no default, initially |tabsize=2,fontsize=\textbackslash small|} Sets the options from the package |minted| \cite{rudolph:2011a} which are used during typesetting of the listing. @@ -427,7 +463,7 @@ public class HelloWorld { \end{dispExample} \end{docTcbKey} - +\clearpage \begin{docTcbKey}{minted style}{=\meta{style}}{no default, initially unset} Sets a \meta{style} known to |Pygments| \cite{pygments:2013}. This is independent from \refKey{/tcb/minted options}. Note that styles are always |