summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-01-05 22:57:58 +0000
committerKarl Berry <karl@freefriends.org>2014-01-05 22:57:58 +0000
commit1899ca043c36f94224898b8cad0f2cbaf633ab21 (patch)
tree27a96fd3c4f5dcc61bb010d4e4e597f95f2806a9 /Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex
parentc81e0a4eecfaa071e03d673821d5b93f957c70ca (diff)
cnltx (5jan14)
git-svn-id: svn://tug.org/texlive/trunk@32583 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex')
-rw-r--r--Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex130
1 files changed, 94 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex b/Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex
index e061be42bb3..9fbaff05a8a 100644
--- a/Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex
+++ b/Master/texmf-dist/doc/latex/cnltx/cnltx_en.tex
@@ -1,8 +1,8 @@
-% !arara: pdflatex: { shell: on }
-% arara: pdflatex
+% arara: pdflatex: { shell: on }
+% !arara: pdflatex
% arara: biber
-% arara: pdflatex
-% arara: pdflatex
+% !arara: pdflatex
+% !arara: pdflatex
% --------------------------------------------------------------------------
% the CNLTX bundle
%
@@ -13,7 +13,7 @@
% Web: https://github.com/cgnieder/cnltx/
% E-Mail: contact@mychemistry.eu
% --------------------------------------------------------------------------
-% Copyright 2013 Clemens Niederberger
+% Copyright 2013-2014 Clemens Niederberger
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -115,15 +115,11 @@
},
add-silent-cmds = {
@foo,
- ab,AB,
- at,
- carlisle,
- cd,
- circled,circlenumber,
- cnltx,
- foo,
- foothree,
+ ab,AB, at,
+ carlisle, cd, chead, circled,circlenumber, cnltx,
+ foo, foothree,
GetTranslation,
+ KOMAoptions,
lipsum,
minusone,multoffourrm,
nohyperpage,
@@ -877,6 +873,10 @@ Both environments can be influenced by options:
Code that is inserted between a source code and the corresponding output
when printed below each other. This option has no effect on the
\env{sourcecode} environment.
+ \keybool{outside}\Default{false}
+ \sinceversion{0.10}If \code{true} the output of an example is put outside
+ of the frame in the input stream. This can be useful if the example code
+ contains a floating environment for example.
\end{options}
The same example again, this time using \option{side-by-side} (which is the
@@ -901,6 +901,14 @@ customize it:
\keyval{frame-options}{\pkg{mdframed} options}{}
\Default{backgroundcolor=cnltxbg,linecolor=cnltx,roundcorner=5pt}
Overwrite the settings with new ones.
+ \keyval{add-local-frame}{\pkg{mdframed} options}
+ \sinceversion{0.10}Add \pkg{mdframed} options to the environment where the
+ option is used only. This is
+ basically \beginenv*\Marg{\env{mdframed}}\Oarg{style=cnltx,\meta{options}}.
+ \keyval{local-frame}{\pkg{mdframed} options}
+ \sinceversion{0.10}replace the default \pkg{mdframed} options to the
+ environment where the option is used only. This is
+ basically \beginenv*\Marg{\env{mdframed}}\oarg{options}.
\end{options}
The source code is formatted using the great \pkg{listings}
@@ -935,10 +943,16 @@ section~\vref{sec:listings-sourcecode}.
Overwrite existing options with new ones. This can be used to build an own
style from scratch. \emph{This redefines the \code{cnltx} \pkg{listings}
style which will affect all sourcecode environments!}
- \keyval{sourcecode-options}{\pkg{listings} options}
+ \keyval{add-sourcecode-options}{\pkg{listings} options}
\sinceversion{0.4}These options are added to the \pkg{listings} options of
the source code environments without redefing the main style. Hence it
- can be used to locally add options to a source code environment.
+ can be used to locally add options to a source code environment. This is
+ basically \cs*{lstset}\Marg{style=cnltx,\meta{options}}.
+ \keyval{sourcecode-options}{\pkg{listings} options}
+ \sinceversion{0.10}These options are added to the \pkg{listings} options
+ of the source code environments without redefing or using the main style.
+ Hence it can be used to locally add options to a source code environment.
+ This is basically \cs*{lstset}\marg{options}.
\keyval{add-envs}{list of environment names}\Default
Like \option{add-cmds} but for environment names.
\keyval{add-silent-envs}{list of environment names}
@@ -972,7 +986,7 @@ code file externally and input the compiled \PDF.
\end{example}
\end{sourcecode}
-This needs \code{shellescape} enabled. The default compilation program is
+This needs \code{shell-escape} enabled. The default compilation program is
\prg{pdflatex} which will compile the file two times. The process can be
customized with the following options:
@@ -992,6 +1006,8 @@ customized with the following options:
with \option{program}.
\keyval{file-ext}{extension}\Default{pdf}
The file extension of the included file of a compiled example.
+ \keybool{add-frame}\Default{true}
+ \sinceversion{0.10}If \code{true} every output page will get a frame.
\end{options}
The compiled document will be input with \cs*{includegraphics}, each page
@@ -1057,9 +1073,13 @@ have it as a floating figure. This is also possible by using the option
Set the standard floating parameters that are used if
\keyis-{float}{true}. The default is actually the expansion of
\cs*{fps@figure} and not directly \code{tbp}.
+ \keyval{float-env}{name}\Default{figure}
+ \sinceversion{0.10}The floating environment used when the option
+ \option{float} is used.
\keyval{caption}{text}\Default
\meta{text} will be used as caption. If left blank no caption will be
- typeset. Implicitly sets \keyis-{float}{true}.
+ typeset. If you want to add a \cs*{label} you can use it in this option.
+ Implicitly sets \keyis-{float}{true}.
\end{options}
Please note that \option{float} only has an effect if \keyis-{compile}{true}
has been set.
@@ -1783,7 +1803,7 @@ passing an option as class option.
Class option that preloads part of my custom preamble.
\end{options}
-Using the option will include the following code:
+Using the option will include the following code:\changedversion{0.10}
\begin{sourcecode}
\RequirePackage{ifxetex,ifluatex}
@@ -1839,7 +1859,10 @@ Using the option will include the following code:
\renewcommand*\partformat{%
\textcolor{cnltx}{\partname~\thepart\autodot}}
\deffootnote{2em}{1em}{\llap{\thefootnotemark. }}%
- \pagestyle{headings}
+ \RequirePackage{scrlayer-scrpage}
+ \chead{\rightmark}
+ \KOMAoptions{automark}
+ \pagestyle{scrheadings}
\setcapindent{1.5em}
\setkomafont{caption}{\cnltx@caption@font}
\setkomafont{captionlabel}{\cnltx@captionlabel@font}
@@ -2424,13 +2447,13 @@ the other packages and classes.
\end{commands}
\subsubsection{Programming Tools}
-
+\paragraph{Message Handling}
\begin{commands}
\command{cnltx\at create\at message}%
[\sarg\marg{prefix}\marg{package/class
name}\Marg{\choices{Error,Warning,WarningNoLine,Info}} \marg{detailed
error message}]
- \changedversion{0.7}Create error and warning massaging commands
+ \changedversion{0.7}Create error and warning messaging commands
\cs*{\meta{prefix}@\choices{error,warning,warningnoline,info}}\marg{message}.
The starred version creates messages for a class the un-starred version
messages for a package. All commands have one argument which takes the
@@ -2438,21 +2461,23 @@ the other packages and classes.
\command{cnltx\at create\at generic\at message}%
[\sarg\marg{prefix}\marg{package/class
name}\Marg{\choices{Error,Warning,WarningNoLine,Info}}]
- \sinceversion{0.7}Create error and warning massaging commands
+ \sinceversion{0.7}Create error and warning messaging commands
\cs*{\meta{prefix}@\choices{error,warning,warningnoline,info}}\marg{message}.
The starred version creates messages for a class the un-starred version
messages for a package. All commands have one argument which takes the
message \emph{except for the error command which gets two arguments}, the
first for the short version and the second for the detailed message.
\meta{prefix} will be all lowercase in the generated command.
- \expandable\command{cnltx\at par}
- Expands to \cs*{par}. Sometimes you need to smuggle a \cs*{par} in a
- short macro \ldots
+\end{commands}
+
+\paragraph{Conditionals}
+\begin{commands}
\expandable\command{iftest}[\marg{test directive}\marg{true}\marg{false}]
\sinceversion{0.7}Checks if \meta{test directive} is true and either
places \meta{true} or \meta{false} in the input stream. \meta{test
directive} should be a \TeX\ test like
- \cs*{ifx}\meta{token1}\meta{token2}.\\
+ \cs*{ifx}\meta{token1}\meta{token2}, \ie, demand an \cs*{else} and
+ \cs*{fi}.\\
This is a command in the spirit of \pkg{etoolbox}'s \cs*{ifbool} that does
the same for a boolean \meta{bool} defined with
\cs*{newif}\cs*{if\meta{bool}} or \cs*{newbool}\marg{bool}. It
@@ -2462,7 +2487,8 @@ the other packages and classes.
\sinceversion{0.7}Checks if \meta{test directive} is not true and either
places \meta{not true} or \meta{not false} in the input stream. Test
directive should be a \TeX\ test like
- \cs*{ifx}\meta{token1}\meta{token2}.\\
+ \cs*{ifx}\meta{token1}\meta{token2}, \ie, demand an \cs*{else} and
+ \cs*{fi}.\\
This is a command in the spirit of \pkg{etoolbox}'s \cs*{notbool} that does
the same for a boolean \meta{bool} defined with
\cs*{newif}\cs*{if\meta{bool}} or \cs*{newbool}\marg{bool}.
@@ -2490,6 +2516,34 @@ the other packages and classes.
\sinceversion{0.9}Checks if shellescape is enabled. It returns true if
\pkg{pdftexcmds}' \cs*{pdf@shellescape} has the value~\code{1}. This is a
wrapper for \verbcode+\iftest{\ifnum\pdf@shellescape=1 }+.
+ \command{cnltx\at if\at in}[\marg{tokenlist}\marg{search}\marg{true}\marg{false}]
+ Places \meta{true} in the input stream if \meta{search} is found in
+ \meta{tokenlist} and \meta{false} if it isn't.
+ \expandable\command{cnltx\at ifstrequal}[\marg{string1}\marg{string2}%
+ \marg{true}\marg{false}]
+ \sinceversion{0.10}Tests if \meta{string1} is equal to \meta{string2} and
+ either leaves \meta{true} or \meta{false} in the input stream. This test
+ doesn't take category codes into account.
+ \command{cnltx\at ifinlist}%
+ [\marg{item}\marg{listmacro}\marg{true}\marg{false}]
+ \sinceversion{0.10}A conditional for \pkg{etoolbox} lists similar to
+ \cs*{ifinlist} where braces in items are allowed. This wraps around the
+ proposal in \pkg{etoolbox}'s documentation to redefine \cs*{do} and loop
+ through the list.
+ \command{cnltx\at ifinlistcs}%
+ [\marg{item}\marg{listcsname}\marg{true}\marg{false}]
+ \sinceversion{0.10}A conditional for \pkg{etoolbox} lists similar to
+ \cs*{ifinlistcs} where braces in items are allowed. This wraps around the
+ proposal in \pkg{etoolbox}'s documentation to redefine \cs*{do} and loop
+ through the list.
+\end{commands}
+
+\paragraph{Expansion Tools}
+\begin{commands}
+ \command{expandtwice}[\marg{code}]
+ \sinceversion{0.10}Expands \meta{code} twice in an \cs*{edef}-like
+ context. This is a wrapper for\newline
+ \cs*{unexpanded}\cs*{expandafter}\cs*{expandafter}\cs*{expandafter}.
\command{cnltx\at expandargs}[\darg{specs}\meta{control sequence}]
\sinceversion{0.7}This is a \LaTeXe\ version of expl3's
\cs*{exp\_args:N}\meta{specs}. The command expands the arguments of
@@ -2503,11 +2557,10 @@ the other packages and classes.
\item \code{f} means braced group expanded with \cs*{romannumeral}, and
\item \code{x} means braced group expanded with \cs*{edef}.
\end{itemize}
- \expandable\command{cnltx\at stripbs}
- A shortcut for \verbcode+\expandafter\@gobble\string+.
- \command{cnltx\at if\at in}[\marg{tokenlist}\marg{search}\marg{true}\marg{false}]
- Places \meta{true} in the input stream if \meta{search} is found in
- \meta{tokenlist} and \meta{false} if it isn't.
+\end{commands}
+
+\paragraph{Token List Manipulation}
+\begin{commands}
\command{cnltx\at replace\at once}[\marg{cs}\marg{search}\marg{replace}]
Replaces the first occurence of \meta{search} in the first expansion of
\meta{cs} with \meta{replace}.
@@ -2532,6 +2585,15 @@ the other packages and classes.
\command{cnltx\at gremove\at all}[\marg{cs}\marg{search}]
\sinceversion{0.9}The same as \cs{cnltx\at remove\at all} but acts
globally.
+\end{commands}
+
+\paragraph{Miscellaneous}
+\begin{commands}
+ \expandable\command{cnltx\at par}
+ Expands to \cs*{par}. Sometimes you need to smuggle a \cs*{par} in a
+ short macro \ldots
+ \expandable\command{cnltx\at stripbs}
+ A shortcut for \verbcode+\expandafter\@gobble\string+.
\command{cnltxat}
Robust command that typesets `\at' with category code 11. An @ in command
names confuses the indexing of the command names. Either one uses another
@@ -2554,7 +2616,6 @@ the other packages and classes.
\end{commands}
\subsection{Defined by \cnltxdoc}
-
\begin{commands}
\command{cnltx\at doc\at error}[\marg{message}]
Issue an error message using \cs*{ClassError}\Marg{cnltx-doc}.
@@ -2581,7 +2642,6 @@ the other packages and classes.
\end{environments}
\subsection{Defined by \cnltxexample}
-
\begin{commands}
\command{cnltx\at example\at error}[\marg{message}]
Issue an error message using \cs*{PackageError}\Marg{cnltx-example}.
@@ -2632,7 +2692,6 @@ the other packages and classes.
\end{commands}
\subsection{Defined by \cnltxlistings}
-
\begin{commands}
\command{cnltx\at listings\at error}[\marg{message}]
Issue an error message using \cs*{PackageError}\Marg{cnltx-listings}.
@@ -2673,7 +2732,6 @@ the other packages and classes.
\end{options}
\subsection{Defined by \cnltxtools}
-
\begin{commands}
\command{cnltx\at tools\at error}[\marg{message}]
Issue an error message using \cs*{PackageError}\Marg{cnltx-tools}.