summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/cnltx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/cnltx
Initial commit
Diffstat (limited to 'macros/latex/contrib/cnltx')
-rw-r--r--macros/latex/contrib/cnltx/README35
-rw-r--r--macros/latex/contrib/cnltx/cnltx-base.sty894
-rw-r--r--macros/latex/contrib/cnltx/cnltx-doc.cls952
-rw-r--r--macros/latex/contrib/cnltx/cnltx-example.sty1044
-rw-r--r--macros/latex/contrib/cnltx/cnltx-listings.sty1962
-rw-r--r--macros/latex/contrib/cnltx/cnltx-names.sty177
-rw-r--r--macros/latex/contrib/cnltx/cnltx-tools.sty241
-rw-r--r--macros/latex/contrib/cnltx/cnltx-translations.sty128
-rw-r--r--macros/latex/contrib/cnltx/cnltx.bbx205
-rw-r--r--macros/latex/contrib/cnltx/cnltx.bib987
-rw-r--r--macros/latex/contrib/cnltx/cnltx.cbx48
-rw-r--r--macros/latex/contrib/cnltx/cnltx.dbx56
-rw-r--r--macros/latex/contrib/cnltx/cnltx.ist10
-rw-r--r--macros/latex/contrib/cnltx/cnltx.sty46
-rw-r--r--macros/latex/contrib/cnltx/cnltx_en.pdfbin0 -> 778786 bytes
-rw-r--r--macros/latex/contrib/cnltx/cnltx_en.tex2946
16 files changed, 9731 insertions, 0 deletions
diff --git a/macros/latex/contrib/cnltx/README b/macros/latex/contrib/cnltx/README
new file mode 100644
index 0000000000..aa4361964a
--- /dev/null
+++ b/macros/latex/contrib/cnltx/README
@@ -0,0 +1,35 @@
+--------------------------------------------------------------------------
+the CNLTX bundle v0.13 2015/08/17
+
+ LaTeX tools and documenting facilities
+
+--------------------------------------------------------------------------
+Clemens Niederberger
+Web: https://github.com/cgnieder/cnltx/
+E-Mail: contact@mychemistry.eu
+--------------------------------------------------------------------------
+Copyright 2013-2015 Clemens Niederberger
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Clemens Niederberger.
+--------------------------------------------------------------------------
+The cnltx bundle consists of the files
+ - cnltx-base.sty, cnltx-doc.cls, cnltx-example.sty, cnltx-listings.sty,
+ cnltx-names.sty, cnltx-tools.sty, cnltx-translations.sty, cnltx.sty,
+ - cnltx.ist, cnltx.bib, cnltx.bbx, cnltx.cbx, cnltx.dbx,
+ - cnltx_en.tex, cnltx_en.pdf,
+ - README
+--------------------------------------------------------------------------
+If you have any ideas, questions, suggestions or bugs to report, please
+feel free to contact me.
+--------------------------------------------------------------------------
+
diff --git a/macros/latex/contrib/cnltx/cnltx-base.sty b/macros/latex/contrib/cnltx/cnltx-base.sty
new file mode 100644
index 0000000000..d8c63223fd
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-base.sty
@@ -0,0 +1,894 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\def\cnltx@@date{2015/08/17}
+\def\cnltx@@version{v0.13}
+\def\cnltx@@info{LaTeX tools and documenting facilities (CN)}
+\ProvidesPackage{cnltx-base}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+\RequirePackage{pgfopts,etoolbox,ltxcmds,pdftexcmds}
+
+% --------------------------------------------------------------------------
+% error messaging
+
+% messages with a common detailed error message:
+% * : star: class, nostar: package
+% #1: prefix
+% #2: package/class name
+% #3: message type
+% #4: extended error message
+\newcommand*\cnltx@create@generic@message{%
+ \@ifstar
+ {\cnltx@create@generic@message@aux{Class}}
+ {\cnltx@create@generic@message@aux{Package}}%
+}
+
+% #1: Class|Package
+% #2: prefix
+% #3: package/class name
+% #4: message type
+% #5: extended error message
+\newcommand\cnltx@create@generic@message@aux[5]{%
+ \ifstrequal{#4}{Error}
+ {%
+ \lowercase{\csdef{#2@#4}}##1{%
+ \csuse{#1#4}{#3}{##1}{#5}}%
+ }{%
+ \lowercase{\csdef{#2@#4}}##1{%
+ \csuse{#1#4}{#3}{##1}}%
+ }}
+
+% messages where the detailed error message must be specified as second
+% argument:
+% * : star: class, nostar: package
+% #1: prefix
+% #2: package/class name
+% #3: message type
+\newcommand*\cnltx@create@message{%
+ \@ifstar
+ {\cnltx@create@message@aux{Class}}
+ {\cnltx@create@message@aux{Package}}%
+}
+
+% #1: Class|Package
+% #2: prefix
+% #3: package/class name
+% #4: message type
+\newcommand\cnltx@create@message@aux[4]{%
+ \ifstrequal{#4}{Error}
+ {%
+ \lowercase{\csdef{#2@#4}}##1##2{%
+ \csuse{#1#4}{#3}{##1}{##2}}%
+ }{%
+ \lowercase{\csdef{#2@#3}}##1{%
+ \csuse{#1#4}{#3}{##1}}%
+ }}
+
+% message handling for the cnltx bundle:
+\newcommand*\cnltx@error@message{%
+ For details have a look at the `cnltx' manual.}
+
+% * : star: class, nostar: package
+% #1: bundle module
+% #2: message type
+\newcommand*\cnltx@create@bundle@message{%
+ \@ifstar
+ {\cnltx@create@bundle@message@aux{Class}}
+ {\cnltx@create@bundle@message@aux{Package}}%
+}
+
+\newcommand\cnltx@create@bundle@message@aux[3]{%
+ \cnltx@create@generic@message@aux
+ {#1}
+ {cnltx@#2}
+ {cnltx-#2}
+ {#3}
+ {\cnltx@error@message}%
+}
+
+\cnltx@create@bundle@message{base}{Error}
+\cnltx@create@bundle@message{base}{Warning}
+\cnltx@create@bundle@message{base}{WarningNoLine}
+\cnltx@create@bundle@message{base}{Info}
+
+% --------------------------------------------------------------------------
+% modules
+\newrobustcmd*\cnltx@load@module[1]{\RequirePackage{cnltx-\trim@spaces{#1}}}
+\newrobustcmd*\cnltx@load@modules[1]{\forcsvlist{\cnltx@load@module}{#1}}
+
+\newrobustcmd*\cnltx@register@module[1]{%
+ \DeclareOption{#1}{\AtEndOfPackage{\cnltx@load@module{#1}}}%
+}
+
+% --------------------------------------------------------------------------
+% setup command
+\newrobustcmd\setcnltx[1]{\pgfqkeys{/cnltx}{#1}}
+
+\def\cnltx@par{\par}
+% --------------------------------------------------------------------------
+% scratch variables
+\newcounter{cnltx@tmpa}
+\newcounter{cnltx@tmpb}
+\newcounter{cnltx@tmpc}
+
+\newlength\cnltx@tmpa@length
+\newlength\cnltx@tmpb@length
+\newlength\cnltx@tmpc@length
+
+\newcommand*\cnltx@tmpa{}
+\newcommand*\cnltx@tmpb{}
+\newcommand*\cnltx@tmpc{}
+
+% --------------------------------------------------------------------------
+% catcode stuff:
+\DeclareListParser*{\cnltx@map@tokenlist}{}
+
+\newrobustcmd*\cnltx@save@catcodes[1]{%
+ \cnltx@map@tokenlist\cnltx@save@catcode{#1}%
+}
+\newrobustcmd*\cnltx@save@catcode[1]{%
+ \csedef{cnltx@catcode@#1}{\the\catcode`#1}%
+}
+
+\newrobustcmd*\cnltx@restore@catcodes[1]{%
+ \cnltx@map@tokenlist\cnltx@restore@catcode{#1}%
+}
+\newrobustcmd*\cnltx@restore@catcode[1]{%
+ \catcode`#1=\csname cnltx@catcode@#1\endcsname
+ \csundef{cnltx@catcode@#1}%
+}
+
+\newrobustcmd*\cnltx@set@catcodes[2]{%
+ \cnltx@map@tokenlist{\cnltx@set@catcode{#2}}{#1}%
+}
+\newrobustcmd*\cnltx@set@catcode[2]{%
+ \catcode`#1=#2\relax
+}
+
+\newrobustcmd*\cnltx@make@letter[1]{\cnltx@set@catcode{#1}{11}}
+\newrobustcmd*\cnltx@make@other[1]{\cnltx@set@catcode{#1}{12}}
+\newrobustcmd*\cnltx@make@active[1]{\cnltx@set@catcode{#1}{13}}
+
+% --------------------------------------------------------------------------
+% damit wir beim Definieren der vielen assoziierten Makros nichts
+% überschreiben:
+\newrobustcmd*\cnltx@robust@cs[1]{%
+ \expandafter\newrobustcmd\expandafter*\csname#1\endcsname
+}
+\newrobustcmd*\cnltx@new@cs[1]{%
+ \expandafter\newcommand\expandafter*\csname#1\endcsname
+}
+
+% --------------------------------------------------------------------------
+% who knows what they might be good for -- well, for indexing:
+\newrobustcmd*\cnltxat{@}
+\let\cnltxletterat\cnltxat
+\makeatother
+\newrobustcmd*\cnltxotherat{@}
+\makeatletter
+\newrobustcmd*\cnltxbang{!}
+\newrobustcmd*\cnltxequal{=}
+
+% --------------------------------------------------------------------------
+% generic conditionals
+% those two are in the spirit of etoolbox's \ifbool and \notbool and provide
+% the same functionalty as the `test' directive in `\ifboolexpr':
+\newcommand\iftest[1]{%
+ #1%
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+
+\newcommand\nottest[1]{%
+ #1%
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+
+\newcommand*\cnltx@ifcounter[1]{%
+ \ifboolexpe{
+ test {\ifcsdef{c@#1}} and
+ test {\ifcsdef{cl@#1}} and
+ test {\ifcsdef{p@#1}} and
+ test {\ifcsdef{the#1}}
+ }%
+}
+
+\newrobustcmd*\cnltx@ifsym[2]{\@ifnextchar#1{\@firstoftwo{#2}}}
+\newcommand*\cnltx@ifdash{\cnltx@ifsym{-}}
+\newcommand*\cnltx@ifbang{\cnltx@ifsym{!}}
+
+% test if shellescape is enabled:
+\newcommand*\cnltx@ifshellescape{%
+ \iftest{\ifnum\pdf@shellescape=1 }%
+}
+
+% an idea by Herbert Voß (http://tex.stackexchange.com/a/7183/5049):
+% make the test character an (hopefully extremely) unlikely % with
+% catcode!=14; let's make & a temporary comment char
+% save both catcodes just in case someone changed the defaults:
+\edef\cnltx@tmpa{
+ \catcode`\noexpand\%=\the\catcode`\%
+ \catcode`\noexpand\&=\the\catcode`\&
+}
+\catcode`\%=3
+\catcode`\&=14
+& the test:
+\newcommand*\cnltx@ifisnum[1]{&
+ \iftest{\if%\ifnum9<1#1%\else_\fi}&
+}
+\cnltx@tmpa
+
+% an idea by Enrico Gregorio (http://tex.stackexchange.com/a/34449/5049):
+\newcommand*\cnltx@truncdiv[2]{((#1-(#2-1)/2)/#2)}
+\newcommand*\cnltx@modulo@op[2]{(#1-\cnltx@truncdiv{#1}{#2}*#2)}
+\newcommand*\cnltx@modulo[2]{\number\numexpr\cnltx@modulo@op{#1}{#2}\relax}
+
+% ``\@ifnextchars''
+% list parser with no separator:
+\DeclareListParser*\cnltx@add@tokens{}
+
+% the list that holds the tokens to be checked:
+\def\cnltx@tokens@list{}
+
+% set the tokens list (the parser does not like blank lists):
+\newrobustcmd*\cnltx@set@tokens[1]{%
+ \def\cnltx@tokens@list{}%
+ \ifblank{#1}
+ {}
+ {\cnltx@add@tokens{\listadd\cnltx@tokens@list}{#1}}%
+}
+
+% check for token but leave it where it is:
+\newrobustcmd\cnltx@ifnextchars[3]{%
+ \cnltx@set@tokens{#1}%
+ \ltx@ifnextchar{ }
+ {\cnltx@ifnextchars@aux{#2}{#3}{}}
+ {\cnltx@ifnextchars@aux{#2}{#3}}%
+}
+
+\newrobustcmd\cnltx@ifnextchars@aux[3]{%
+ \ifblank{#3}{#2}{%
+ \ifinlist{#3}{\cnltx@tokens@list}
+ {#1}
+ {#2}%
+ }%
+ #3%
+}
+
+% test string equality, expandably:
+\newcommand\cnltx@ifstrequal[2]{%
+ \ifnum\pdf@strcmp{\unexpanded{#1}}{\unexpanded{#2}}=\z@
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+
+% a check for etoolbox's lists where items may contain braces:
+\newbool{cnltx@inlist}
+\newrobustcmd\cnltx@ifinlist@type[5]{%
+ \def\do##1{%
+ \boolfalse{cnltx@inlist}%
+ \ifstrequal{##1}{#2}
+ {\booltrue{cnltx@inlist}\listbreak}
+ {}%
+ }%
+ #1{#3}%
+ \ifbool{cnltx@inlist}
+ {#4}
+ {#5}%
+}
+\newrobustcmd*\cnltx@ifinlist{\cnltx@ifinlist@type\dolistloop}
+\newrobustcmd*\cnltx@ifinlistcs{\cnltx@ifinlist@type\dolistcsloop}
+
+% --------------------------------------------------------------------------
+% expansion helper
+% \cnltx@expandargs(<spec>)
+% this is heavily inspired by expl3's \exp_args:N<spec>; in fact the code
+% they use is very clever so it is basically just copied and renamed -- I'm
+% sorry for that but I couldn't've done better.
+\def\cnltx@expandargs@internal{}
+
+% auxiliary macros:
+\long\def\cnltx@getnext@braced#1#2#3{#2\cnltx@firstofone{#3{#1}}}
+\long\def\cnltx@getnext@unbraced#1#2#3{#2\cnltx@firstofone{#3#1}}
+\long\def\cnltx@firstofone#1{#1}
+
+% the argument macros:
+% n:
+\long\def\cnltx@braced@unexpanded#1\cnltx@firstofone#2#3{%
+ #1\cnltx@firstofone{#2{#3}}%
+}
+% N:
+\long\def\cnltx@unbraced@unexpanded#1\cnltx@firstofone#2#3{%
+ #1\cnltx@firstofone{#2#3}%
+}
+% c:
+\long\def\cnltx@braced@csname#1\cnltx@firstofone#2#3{%
+ \expandafter\cnltx@getnext@unbraced\csname#3\endcsname{#1}{#2}%
+}
+% o:
+\long\def\cnltx@braced@expanded@once#1\cnltx@firstofone#2#3{%
+ \expandafter\cnltx@getnext@braced\expandafter{#3}{#1}{#2}%
+}
+% f:
+\long\def\cnltx@braced@expanded@fully#1\cnltx@firstofone#2#3{%
+ \expandafter\cnltx@getnext@braced
+ \expandafter{\romannumeral-`0#3}{#1}{#2}%
+}
+% x:
+\protected\long\def\cnltx@braced@expanded@exhaustively#1\cnltx@firstofone#2#3{%
+ \edef\cnltx@expandargs@internal{{#3}}%
+ \expandafter\cnltx@getnext@braced\cnltx@expandargs@internal{#1}{#2}%
+}
+
+% the actual expansion helper macro:
+\protected\def\cnltx@expandargs(#1){%
+ \def\cnltx@expandargs@aux{#1\cnltx@firstofone}%
+ \cnltx@replace@all\cnltx@expandargs@aux{N}{\cnltx@unbraced@unexpanded}%
+ \cnltx@replace@all\cnltx@expandargs@aux{n}{\cnltx@braced@unexpanded}%
+ \cnltx@replace@all\cnltx@expandargs@aux{c}{\cnltx@braced@csname}%
+ \cnltx@replace@all\cnltx@expandargs@aux{o}{\cnltx@braced@expanded@once}%
+ \cnltx@replace@all\cnltx@expandargs@aux{f}{\cnltx@braced@expanded@fully}%
+ \cnltx@replace@all\cnltx@expandargs@aux{x}{\cnltx@braced@expanded@exhaustively}%
+ \cnltx@expandargs@aux
+}
+
+% \exp_args:Nx
+\newcommand\cnltx@fullexpand@arg{\cnltx@expandargs(x)}
+
+% \exp_args:Nxx
+\newcommand\cnltx@fullexpand@twoargs{\cnltx@expandargs(xx)}
+
+% \exp_args:NV
+\newcommand\cnltx@expand@arg{\cnltx@expandargs(o)}
+
+% expanding an environment argument or something:
+\newcommand\cnltx@fullexpand@afterarg{\cnltx@expandargs(nx)}
+
+\providecommand*\expandtwice
+ {\unexpanded\expandafter\expandafter\expandafter}
+
+% --------------------------------------------------------------------------
+% tokenlist manipulation
+\newcommand*\cnltx@stripbs{\expandafter\@gobble\string}
+
+% again we borrow an idea from expl3:
+% \cnltx@if@in{tokenlist}{search}{true}{false}
+\newrobustcmd\cnltx@if@in[2]{%
+ \def\cnltx@ifin@tmp##1#2{}%
+ \expandafter\ifblank\expandafter{\cnltx@ifin@tmp#1{}{}#2}
+ {\@secondoftwo}
+ {\@firstoftwo}%
+}
+
+% \cnltx@replace@once{macro}{search}{replace}
+% \cnltx@replace@all{macro}{search}{replace}
+\newrobustcmd*\cnltx@replace@once {\@@cnltx@replace\@@cnltx@replace@once\edef}
+\newrobustcmd*\cnltx@greplace@once{\@@cnltx@replace\@@cnltx@replace@once\xdef}
+\newrobustcmd*\cnltx@replace@all {\@@cnltx@replace\@@cnltx@replace@all \edef}
+\newrobustcmd*\cnltx@greplace@all {\@@cnltx@replace\@@cnltx@replace@all \xdef}
+
+\long\def\cnltx@remove@to@q@stop#1\q@stop{}
+
+\newrobustcmd\@@cnltx@replace[5]{%
+ \ifstrempty{#4}
+ {}
+ {%
+ \ifnum\iffalse{\fi`}=\z@\fi
+ \edef\cnltx@tmpa##1##2#4{%
+ ##2%
+ \noexpand\q@mark
+ \noexpand\cnltx@remove@to@q@stop
+ \unexpanded{\unexpanded{#5}}%
+ ##1%
+ }%
+ \ifnum`{=\z@}\fi
+ #2#3{\expandafter#1#3\q@mark#4\q@stop}%
+ }%
+}
+\long\def\@@cnltx@replace@aux#1\q@mark#2{\expandonce{#1}}
+\newcommand*\@@cnltx@replace@all{%
+ \expandafter\@@cnltx@replace@aux\cnltx@tmpa\@@cnltx@replace@all\@empty
+}
+\def\@@cnltx@replace@once{%
+ \expandafter\@@cnltx@replace@aux\cnltx@tmpa
+ {\@@cnltx@replace@once@end\@empty}\@empty
+}
+\long\def\@@cnltx@replace@once@end#1\q@mark#2\q@stop{\expandonce{#1}}
+
+% \cnltx@remove@once{macro}{search}
+% \cnltx@remove@all{macro}{search}
+\newrobustcmd\cnltx@remove@once[2]{\cnltx@replace@once#1{#2}{}}
+\newrobustcmd\cnltx@remove@all[2]{\cnltx@replace@all#1{#2}{}}
+
+% --------------------------------------------------------------------------
+% an equivalent of \newcommand where the macro with the optional argument
+% is expandable. For this to work the newly defined macro /needs/ to eat the
+% first following token!
+\def\cnltx@num@to@args#1{%
+ \ifnum#1>1
+ \cnltx@num@to@args@aux{2}{#1}{####}%
+ \fi
+}
+\def\cnltx@num@to@args@aux#1#2#3{%
+ \ifnum#1<\numexpr#2+1\relax
+ #3#1%
+ \expandafter\cnltx@num@to@args@aux
+ \expandafter{\number\numexpr#1+1}{#2}{#3}%
+ \fi
+}
+
+% \newexpandablecmd*<cs>[<num mand>][<default opt>]{<definition>}
+\newrobustcmd*\newexpandablecmd{%
+ \@star@or@long\cnltx@newexpcmd
+}
+\newrobustcmd*\renewexpandablecmd{%
+ \@star@or@long\cnltx@renewexpcmd
+}
+\newrobustcmd*\provideexpandablecmd{%
+ \@star@or@long\cnltx@provideexpcmd
+}
+
+\def\cnltx@dummy{}
+
+\newrobustcmd*\cnltx@provideexpcmd[1]{%
+ \ifdef{#1}
+ {\cnltx@renewexpcmd\cnltx@dummy}
+ {\cnltx@newexpcmd#1}%
+}
+
+\newrobustcmd*\cnltx@newexpcmd{%
+ \cnltx@new@expcmd
+}
+
+\newrobustcmd*\cnltx@renewexpcmd[1]{%
+ \ifdef{#1}
+ {%
+ \let\@ifdefinable\@rc@ifdefinable
+ \cnltx@newexpcmd#1%
+ }
+ {\@latex@error{\noexpand#1undefined}\@ehc}%
+}
+
+\def\cnltx@new@expcmd#1{%
+ \@ifnextchar[%]
+ {\cnltx@newexpcmd@i{#1}}
+ {\cnltx@newexpcmd@i{#1}[0]}%
+}
+\def\cnltx@newexpcmd@i#1[#2]{%
+ \@ifnextchar[%]
+ {\cnltx@newexpcmd@ii{#1}{#2}}
+ {\new@command#1[#2]}%
+}
+
+\def\cnltx@newexpcmd@ii#1#2[#3]{%
+ \edef\cnltx@newexpcmd@args{\cnltx@num@to@args{#2}}%
+ \expandafter\cnltx@defexpcmd\expandafter{\cnltx@newexpcmd@args}{#2}[#3]#1%
+}
+
+\long\def\cnltx@defexpcmd#1#2[#3]#4#5{%
+ \@ifdefinable#4{%
+ \long\def#4##1{%
+ \cnltxnewexpcmd@ifisopt
+ {#2}
+ {##1}
+ {\csuse{\@backslashchar\cnltx@stripbs#4}}
+ {#3}%
+ }%
+ }%
+ \l@ngrel@x\csdef{\@backslashchar\cnltx@stripbs#4}[##1]#1{#5}%
+}
+\newcommand\cnltxnewexpcmd@ifisopt[4]{%
+ \cnltxnewexpcmd@ifisopt@aux#2\q@marker[\q@marker
+ {#3#2}
+ {\iftest{\ifnum#1>1 }{#3[#4]{#2}}{#3[#4]#2}}%
+}
+\long\def\cnltxnewexpcmd@ifisopt@aux#1[#2\q@marker#3#{%
+ \ifstrempty{#1#2}%
+}
+
+% --------------------------------------------------------------------------
+% looking for trailing punctuation:
+%
+% list parser with no separator:
+\DeclareListParser*\cnltx@add@punctuation{}
+
+% the list that holds the punctuation marks:
+\def\cnltx@punctuation@list{}
+
+% set the punctuation list (the parser does not like blank lists):
+\newrobustcmd*\cnltx@set@punctuation[1]{%
+ \def\cnltx@punctuation@list{}%
+ \ifblank{#1}
+ {}
+ {\cnltx@add@punctuation{\listadd\cnltx@punctuation@list}{#1}}%
+}
+
+% set default list:
+\cnltx@set@punctuation{,.!?;:}
+
+\pgfkeys{
+ cnltx/.cd ,
+ set-trail-punct/.code = \cnltx@set@punctuation{#1}
+}
+
+% --------------------------------------------------------------------------
+% small helper if we gobbled \par:
+\newcommand*\cnltx@punctuation@ifpar{%
+ \iftest{\expandafter\ifx\cnltx@trailpunct\par}%
+}
+
+% --------------------------------------------------------------------------
+% per case list:
+\newrobustcmd*\cnltx@set@punctuation@default{%
+ \ifx\cnltx@punctuation@list\cnltx@tmp@punctuation
+ \else
+ \let\cnltx@punctuation@list\cnltx@tmp@punctuation
+ \fi
+}
+
+\newrobustcmd*\cnltx@set@punctuation@option[1]{%
+ \let\cnltx@tmp@punctuation\cnltx@punctuation@list
+ \ifblank{#1}{}{\cnltx@set@punctuation{#1}}%
+}
+
+% --------------------------------------------------------------------------
+% check for punctuation mark and gobble it if present:
+\newrobustcmd\cnltx@ifpunctuation@gobble[3][]{%
+ \cnltx@set@punctuation@option{#1}%
+ \ltx@ifnextchar{ }
+ {\cnltx@ifpunctuation@gobble@aux{#2}{#3}{ }}
+ {\cnltx@ifpunctuation@gobble@aux{#2}{#3}}%
+}
+
+\newrobustcmd\cnltx@ifpunctuation@gobble@aux[3]{%
+ \edef\cnltx@trailpunct{\unexpanded{#3}}%
+ \ifblank{#3}{#2}{%
+ \ifinlist{#3}{\cnltx@punctuation@list}
+ {#1}
+ {#2\cnltx@punctuation@ifpar{}{#3}}%
+ \cnltx@punctuation@ifpar{\par}{}%
+ }%
+ \cnltx@set@punctuation@default
+}
+
+% --------------------------------------------------------------------------
+% check for punctuation mark but leave it where it is:
+\newrobustcmd\cnltx@ifpunctuation@nogobble[3][]{%
+ \cnltx@set@punctuation@option{#1}%
+ \ltx@ifnextchar{ }
+ {\cnltx@ifpunctuation@nogobble@aux{#2}{#3}{}}
+ {\cnltx@ifpunctuation@nogobble@aux{#2}{#3}}%
+}
+
+\newrobustcmd\cnltx@ifpunctuation@nogobble@aux[3]{%
+ \ifblank{#3}{#2}{%
+ \ifinlist{#3}{\cnltx@punctuation@list}
+ {#1}
+ {#2}%
+ }%
+ \cnltx@set@punctuation@default
+ #3%
+}
+
+% --------------------------------------------------------------------------
+% the main command:
+\newrobustcmd\cnltx@ifpunctuation{%
+ \@ifstar
+ \cnltx@ifpunctuation@nogobble
+ \cnltx@ifpunctuation@gobble
+}
+
+% --------------------------------------------------------------------------
+% counter representation commands
+% error messages
+\newcommand*\cnltx@base@error@unknown@user@representation[1]{%
+ \cnltx@base@error{Unknown counter representation \string#1}}
+
+\newcommand*\cnltx@base@error@unknown@internal@representation[1]{%
+ \cnltx@base@error{Unknown internal counter representation #1}}
+
+\newcommand*\cnltx@base@error@already@user@representation[1]{%
+ \cnltx@base@error{Counter representation \string#1 already exists}}
+
+\newcommand*\cnltx@base@error@already@internal@representation[1]{%
+ \cnltx@base@error{Internal counter representation \expandonce{#1} already exists}}
+
+% --------------------------------------------------------------------------
+% conditionals
+% test for user commands like \arabic
+\newcommand*\cnltx@if@user@representation{\ifdef}
+
+% test for internal commands like \@arabic; we will assume they're /always/
+% the same as the corresponding user command but with a leading @:
+\newcommand*\cnltx@if@internal@representation[1]{%
+ \ifcsdef{@\cnltx@stripbs#1}%
+}
+
+% --------------------------------------------------------------------------
+% the main command
+\newrobustcmd*\cnltx@new@counter@representation[2]{%
+ \edef#1##1{%
+ \noexpand\expandafter
+ \expandonce{\csname @\cnltx@stripbs#1\endcsname}%
+ \noexpand\csname c@##1\noexpand\endcsname
+ }%
+ \csdef{@\cnltx@stripbs#1}##1{#2}%
+}
+
+% --------------------------------------------------------------------------
+% the user commands
+\newrobustcmd*\newcounterrepresentation[2]{%
+ \cnltx@if@user@representation{#1}
+ {\cnltx@base@error@already@user@representation{#1}}
+ {}%
+ \cnltx@if@internal@representation{#1}
+ {%
+ \cnltx@base@error@already@internal@representation
+ {\csname @\cnltx@stripbs#1\endcsname}%
+ }
+ {}%
+ \cnltx@new@counter@representation{#1}{#2}%
+}
+
+\newrobustcmd*\renewcounterrepresentation[2]{%
+ \cnltx@if@user@representation{#1}
+ {}
+ {\cnltx@base@error@unknown@user@representation{#1}}%
+ \cnltx@if@internal@representation{#1}
+ {}
+ {%
+ \cnltx@base@error@unknown@internal@representation
+ {\csname @\cnltx@stripbs#1\endcsname}%
+ }%
+ \cnltx@new@counter@representation{#1}{#2}%
+}
+
+\newrobustcmd*\providecounterrepresentation[2]{%
+ \cnltx@if@user@representation{#1}{}{%
+ \cnltx@if@internal@representation{#1}{}{%
+ \cnltx@new@counter@representation{#1}{#2}%
+ }%
+ }%
+}
+
+\newrobustcmd*\DeclareCounterRepresentation[2]{%
+ \cnltx@new@counter@representation{#1}{#2}%
+}
+
+% --------------------------------------------------------------------------
+% the following definitions are redundant, the LaTeX2e kernel provides them
+% already. They're provided as an overview:
+
+% \arabic:
+\providecounterrepresentation\arabic{\number#1}
+% \roman:
+\providecounterrepresentation\roman{\romannumeral#1}
+% \Roman:
+\providecounterrepresentation\Roman{%
+ \expandafter\@slowromancap\romannumeral#1@}
+%\alph:
+\providecounterrepresentation\alph{%
+ \ifcase#1%
+ \or a\or b\or c\or d\or e\or f%
+ \or g\or h\or i\or j\or k\or l%
+ \or m\or n\or o\or p\or q\or r%
+ \or s\or t\or u\or v\or w\or x%
+ \or y\or z%
+ \else
+ \@ctrerr
+ \fi
+}
+% \Alph:
+\providecounterrepresentation\Alph{%
+ \ifcase#1%
+ \or A\or B\or C\or D\or E\or F%
+ \or G\or H\or I\or J\or K\or L%
+ \or M\or N\or O\or P\or Q\or R%
+ \or S\or T\or U\or V\or W\or X%
+ \or Y\or Z%
+ \else
+ \@ctrerr
+ \fi
+}
+% \fnsymbol:
+% this is the definition of \fnsymbol in `latex.ltx'; a redefinition like in
+% `fixltx2e.sty' would be preferable but \TextOrMath is not defined per
+% default and we don't want to require `fixltx2e.sty'
+\providecounterrepresentation\fnsymbol{%
+ \ensuremath{%
+ \ifcase#1%
+ \or *%
+ \or \dagger
+ \or \ddagger
+ \or \mathsection
+ \or \mathparagraph
+ \or \|%
+ \or **%
+ \or \dagger\dagger
+ \or \ddagger\ddagger
+ \else
+ \@ctrerr
+ \fi
+ }%
+}
+
+% --------------------------------------------------------------------------
+% colors definitions:
+\RequirePackage{xcolor}
+\RequirePackage{trimspaces}
+
+\xdefinecolor{cnltxbrown}{rgb}{0.60,0.25,0.15}
+\xdefinecolor{cnltxblue}{rgb}{0.02,0.04,0.48}
+\xdefinecolor{cnltxred}{rgb}{0.65,0.04,0.07}
+\xdefinecolor{cnltxgreen}{rgb}{0.06,0.44,0.08}
+\xdefinecolor{cnltxgray}{gray}{0.5}
+\colorlet{cnltxyellow}{yellow!40!brown}
+\xdefinecolor{cnltxformalblue}{rgb}{0,0.2,0.6}
+\xdefinecolor{cnltxformalred}{rgb}{0.8,0.1,0.2}
+
+% set a color-scheme for the manual:
+\newrobustcmd\definecolorscheme{%
+ \cnltx@define@colorscheme
+}
+\newrobustcmd*\cnltx@define@colorscheme[2]{%
+ \csgdef{cnltx@color@scheme@#1}{}%
+ \forcsvlist{\cnltx@get@color{#1}}{#2}%
+}
+\newcommand*\cnltx@get@color[2]{\cnltx@get@color@aux{#1}#2\q@stop}
+\def\cnltx@get@color@aux#1#2=>#3\q@stop{%
+ \listcsgadd{cnltx@color@scheme@#1}{%
+ \colorlet{\trim@spaces{#2}}{\trim@spaces{#3}}%
+ }%
+}
+
+\newcommand*\cnltx@use@colorscheme[1]{%
+ \forlistcsloop{\@firstofone}{cnltx@color@scheme@#1}%
+}
+
+\pgfkeys{
+ cnltx/.cd,
+ color-scheme/.code = \cnltx@use@colorscheme{#1}
+}
+
+% predefined color-schemes:
+\definecolorscheme{default}{
+ cs => cnltxbrown ,
+ option => cnltxyellow ,
+ module => cnltxblue ,
+ comment => cnltxgray ,
+ beginend => red ,
+ env => black ,
+ argument => black ,
+ meta => black!80 ,
+ cnltx => cnltxred ,
+ cnltxbg => white ,
+ link => black!90 ,
+ versionnote => black!75 ,
+ bibentry => cnltxgreen ,
+ bibentryfield => black ,
+ expandable => red ,
+ unexpandable => black ,
+ makeidxkey => cnltxgreen ,
+ makeidxstring => black ,
+ math => cnltxgreen
+}
+
+\definecolorscheme{blue}{
+ cs => cnltxbrown ,
+ option => cnltxgreen ,
+ module => cnltxred ,
+ comment => cnltxgray ,
+ beginend => red ,
+ env => black ,
+ argument => black ,
+ meta => black!80 ,
+ cnltx => cnltxblue ,
+ cnltxbg => yellow!10 ,
+ link => cnltx ,
+ versionnote => black!75 ,
+ bibentry => cnltxyellow ,
+ bibentryfield => black ,
+ expandable => red ,
+ unexpandable => black ,
+ makeidxkey => cnltxyellow ,
+ makeidxstring => black ,
+ math => cnltxgreen
+}
+
+\definecolorscheme{formal}{
+ cs => black ,
+ option => cnltxformalblue ,
+ module => cnltxblue ,
+ comment => cnltxgray ,
+ beginend => red ,
+ env => black ,
+ argument => black ,
+ meta => black!80 ,
+ cnltx => cnltxformalblue ,
+ cnltxbg => white ,
+ link => black!90 ,
+ versionnote => black!75 ,
+ bibentry => black ,
+ bibentryfield => black ,
+ expandable => red ,
+ unexpandable => black ,
+ makeidxkey => black ,
+ makeidxstring => black ,
+ math => cnltxgreen
+}
+
+% set the default:
+\setcnltx{color-scheme=default}
+
+\endinput
+
+% --------------------------------------------------------------------------
+HISTORY:
+
+2013/09/08 v0.1 - first working version
+2013/09/10 v0.2 - added `cnltx-tools' to the bundle
+ - extended the messaging creation to class messages
+2013/09/12 v0.3 - added index style file `cnltx.ist'
+ - added color `module'
+ - added \cnltx@remove@once and \cnltx@remove@all
+ - added long versions of tokenlist manipulation macros
+2013/09/14 v0.4 - added \cnltx@fullexpand@afterarg
+ - new colors `bibentry' and `bibentryfield'
+2013/09/20 v0.5 - added colors `expandable' and `unexpandable'
+ - added \definecolorscheme
+2013/09/24 v0.6 - added \cnltx@ifisnum
+2013/09/30 v0.7 - added functionality to look for trailing punctuation
+ - added colors `makeidxkey' and `makeidxstring'
+ - added counter representation command facilities
+ - generalized expansion helpers (by copying expl3's
+ \exp_arg:N<spec> idea)
+ - \iftest and \nottest
+2013/10/21 v0.8 - \cnltx@ifnextchars
+2013/11/22 v0.9 - \cnltx@modulo
+ - scratch variables
+ - \cnltx@ifshellescape
+ - \cnltx@greplace@once, \cnltx@greplace@all,
+ \cnltx@gremove@once, \cnltx@gremove@all
+ - \cnltx@ifisnum now also returns <false> if the test
+ argument is `<num>!'
+2014/01/05 v0.10 - \expandtwice
+ - \cnltx@ifstrequal
+2014/03/11 v0.11 - \cnltx@save@catcode, \cnltx@save@catcodes,
+ \cnltx@set@catcode, \cnltx@set@catcodes,
+ \cnltx@restore@catcode, \cnltx@restore@catcodes
+ - \cnltx@make@letter, \cnltx@make@other, \cnltx@make@active
+ - \cnltx@load@module, \cnltx@load@modules
+2015/01/11 v0.12 - updating the bundle to CTAN
+ - more security for \cnltx@ifisnum
+2015/08/17 v0.13 - resolve long overdue issues with cnltx-doc
+
diff --git a/macros/latex/contrib/cnltx/cnltx-doc.cls b/macros/latex/contrib/cnltx/cnltx-doc.cls
new file mode 100644
index 0000000000..4d7339db32
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-doc.cls
@@ -0,0 +1,952 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesClass{cnltx-doc}[\cnltx@@date\space \cnltx@@version\space
+ \cnltx@@info]
+
+\cnltx@create@bundle@message*{doc}{Error}
+\cnltx@create@bundle@message*{doc}{Warning}
+\cnltx@create@bundle@message*{doc}{WarningNoLine}
+\cnltx@create@bundle@message*{doc}{Info}
+
+\newbool{cnltx@load@preamble}
+\newbool{cnltx@add@index}
+\newbool{cnltx@add@bib}
+\newbool{cnltx@load@fonts}
+\newbool{cnltx@microtype}
+\newbool{cnltx@layout}
+
+\booltrue{cnltx@layout}
+
+\newcommand*\cnltx@scrartcl@options{}
+\newcommand*\cnltx@babel@options{english}
+
+
+\pgfkeys{
+ cnltx-doc/.cd,
+ scrartcl/.code = \PassOptionsToClass{#1}{scrartcl} ,
+ load-preamble--/.is if = cnltx@load@preamble ,
+ load-fonts/.is if = cnltx@load@fonts ,
+ load-microtype/.is if = cnltx@microtype ,
+ load-preamble-/.code =
+ \booltrue{cnltx@load@preamble}
+ \booltrue{cnltx@microtype} ,
+ load-preamble/.code =
+ \booltrue{cnltx@load@preamble}
+ \booltrue{cnltx@load@fonts}
+ \booltrue{cnltx@microtype} ,
+ add-index/.is if = cnltx@add@index ,
+ add-bib/.is if = cnltx@add@bib ,
+ load-preamble+/.code =
+ \booltrue{cnltx@load@preamble}
+ \booltrue{cnltx@load@fonts}
+ \booltrue{cnltx@microtype}
+ \booltrue{cnltx@add@index}
+ \booltrue{cnltx@add@bib} ,
+ babel-options/.code = \def\cnltx@babel@options{#1} ,
+ adapt-layout/.is if = cnltx@layout ,
+ unknown/.code =
+ \edef\cnltx@scrartcl@options{\cnltx@scrartcl@options,\pgfkeyscurrentname}
+}
+
+\ProcessPgfOptions{/cnltx-doc}
+
+\LoadClass[\cnltx@scrartcl@options]{scrartcl}
+
+
+\newcommand*\cnltx@index@prologue{}
+\newbool{cnltx@index@prologue}
+\newlength\cnltx@index@space
+
+\newcommand*\cnltx@index@setup{othercode=\footnotesize,level=\addsec}
+\newcommand*\cnltx@makeindex@setup{columns=2,columnsep=1em}
+\newcommand*\cnltx@index@style{cnltx.ist}
+
+\pgfkeys{
+ cnltx/.cd,
+ index-prologue/.code =
+ \def\cnltx@index@prologue{#1}
+ \booltrue{cnltx@index@prologue} ,
+ index-space/.code = \setlength\cnltx@index@space{#1} ,
+ index-setup/.code = \def\cnltx@index@setup{#1} ,
+ makeindex-setup/.code = \def\cnltx@makeindex@setup{#1} ,
+ index-style/.code = \def\cnltx@index@style{#1}
+}
+
+
+\cnltx@load@modules{tools,names,example,listings,translations}
+
+\newcommand*\cnltx@caption@font{\normalfont\small\sffamily}
+\newcommand*\cnltx@captionlabel@font{\cnltx@caption@font\scshape}
+
+\pgfkeys{
+ cnltx/.cd,
+ caption-font/.code = \def\cnltx@caption@font{#1} ,
+ caption-label-font/.code = \def\cnltx@captionlabel@font{#1}
+}
+
+\ifbool{cnltx@load@preamble}{
+ \RequirePackage{ifxetex,ifluatex}
+ \ifbool{cnltx@load@fonts}
+ {
+ \ifboolexpr{not bool{xetex} and not bool{luatex}}
+ {\RequirePackage[T1]{fontenc}}
+ {\RequirePackage{fontspec}}
+ \RequirePackage[oldstyle]{libertine}
+ \RequirePackage{libertinehologopatch}
+ \RequirePackage[supstfm=libertinesups]{superiors}
+ % libertine does not have superior letters:
+ \def\@makefnmark{%
+ \hbox{%
+ \cnltx@ifisnum{\@thefnmark}
+ {\textsu{\hspace*{\superiors@spaced}\@thefnmark}}
+ {\@textsuperscript{\normalfont\@thefnmark}}%
+ }%
+ }
+ }
+ {}
+ \ifbool{cnltx@microtype}
+ {\RequirePackage{microtype}}
+ {}
+ \ifboolexpr
+ {
+ bool {cnltx@microtype} and
+ not test {\ifcsdef{MT@pr@set@@romansans}} and
+ not test {\ifcsdef{MT@ex@set@@romansans}} and
+ bool {cnltx@load@fonts}
+ }
+ {
+ \DeclareMicrotypeSet{romansans}{
+ encoding = {*},
+ family = {rm*,sf*}
+ }
+ }
+ {}
+ \ifboolexpr
+ {
+ bool {cnltx@microtype} and
+ not test {\ifcsdef{MT@tr@set@@scshape}} and
+ bool {cnltx@load@fonts}
+ }
+ {
+ \DeclareMicrotypeSet[tracking]{scshape}{
+ encoding = {*} ,
+ shape = {sc,scit,si}
+ }
+ }
+ {}
+ \ifboolexpr
+ {
+ not bool {xetex} and
+ bool {cnltx@load@fonts} and
+ bool {cnltx@microtype}
+ }
+ {
+ \microtypesetup{
+ tracking = scshape ,
+ protrusion = romansans ,
+ expansion = romansans
+ }
+ \DisableLigatures{ family = tt* }
+ }
+ {}
+ \ifbool{cnltx@load@fonts}
+ {
+ \ifboolexpr{not bool{xetex} and not bool{luatex}}
+ {\RequirePackage[scaled=.81]{beramono}}
+ {
+ \setmonofont[
+ Scale = MatchLowercase ,
+ Ligatures = {NoCommon,NoRequired,NoContextual}
+ ]{DejaVu Sans Mono}
+ }
+ \KOMAoptions{DIV=last}
+ \recalctypearea
+ }
+ {}
+ \RequirePackage{fnpct}
+ \expandafter\RequirePackage\expandafter[\cnltx@babel@options]{babel}
+ % \RequirePackage{babel}
+}{}
+
+\ifbool{cnltx@layout}{
+ \renewcommand*\sectionformat{%
+ \textcolor{cnltx}{\thesection\autodot}\enskip
+ }
+ \renewcommand*\subsectionformat{%
+ \textcolor{cnltx}{\thesubsection\autodot}\enskip
+ }
+ \renewcommand*\subsubsectionformat{%
+ \textcolor{cnltx}{\thesubsubsection\autodot}\enskip
+ }
+ \setkomafont{subsubsection}{\normalfont\normalsize\itshape}
+ \renewcommand*\partformat{%
+ \textcolor{cnltx}{\partname~\thepart\autodot}%
+ }
+ \renewcommand*\partformat{%
+ \textcolor{cnltx}{\partname~\thepart\autodot}}
+ \deffootnote{2em}{1em}{\llap{\thefootnotemark. }}%
+ \RequirePackage{scrlayer-scrpage}
+ \chead{\rightmark}
+ \KOMAoptions{automark}
+ \pagestyle{scrheadings}
+ \setcapindent{1.5em}
+ \setkomafont{caption}{\cnltx@caption@font}
+ \setkomafont{captionlabel}{\cnltx@captionlabel@font}
+}{}
+
+\ifbool{cnltx@add@bib}{
+ \RequirePackage[
+ backend=biber,
+ style=cnltx,
+ sortlocale=en_US,
+ indexing=cite]{biblatex}
+ \addbibresource{cnltx.bib}
+ \AtEndDocument{\printbibliography}
+}{}
+
+\ifbool{cnltx@add@index}{
+ \AtEndPreamble{%
+ \RequirePackage{imakeidx}
+ \expandafter\indexsetup\expandafter{\cnltx@index@setup}
+ \expandafter\makeindex\expandafter
+ [\cnltx@makeindex@setup,options={-s \cnltx@index@style}]
+ \AtEndDocument{%
+ \ifbool{cnltx@index@prologue}{%
+ \indexprologue
+ [\vspace{\cnltx@index@space}]
+ {\noindent\cnltx@index@prologue}
+ }{}%
+ \printindex
+ }%
+ }
+}{}
+
+\AtBeginDocument{%
+ \immediate\write\@auxout{%
+ \unexpanded{%
+ \ifx\texorpdfstring\@undefined^^J
+ \providecommand\texorpdfstring[2]{#1}^^J
+ \providecommand\pdfstringdefDisableCommands[1]{}^^J
+ \providecommand\nohyperpage[1]{#1}^^J
+ \fi
+ }%
+ }%
+}
+
+% --------------------------------------------------------------------------
+% license information:
+% define those differently:
+\newcommand*\lppl{\cnltx@acronym{LPPL}{lppl}}
+\newcommand*\LPPL{%
+ \LaTeX{} Project Public License%
+ \index{LPPL@{\cnltx@acronym@format lppl}}%
+}
+
+\newrobustcmd*\license{\@ifstar{\cnltx@license}{\cnltx@license\cnltx@par}}
+\newcommand\cnltx@license[1][maintained]{%
+ \GetTranslation{cnltx-license} ``#1.''%
+}
+
+% CTAN:
+\newcommand*\ctan{\cnltx@acronym{CTAN}{ctan}}
+\newcommand*\CTAN{%
+ Comprehensive \TeX\ Archive Network%
+ \index{CTAN@{\cnltx@acronym@format ctan}}%
+}
+
+% --------------------------------------------------------------------------
+% package information:
+\newrobustcmd*\cnltx@getfileinfo[2]{%
+ \def\cnltx@tmpa##1 ##2 ##3\relax##4\relax{%
+ \gdef\cnltx@package@date{##1}%
+ \gdef\cnltx@package@version{##2}%
+ \gdef\cnltx@package@info{##3}}%
+ \edef\cnltx@tmpb{\csname ver@#1.#2\endcsname}%
+ \expandafter\cnltx@tmpa\cnltx@tmpb\relax? ? \relax\relax}
+
+\newcommand*\cnltx@package@name{??}
+\newbool{cnltx@package@name}
+\newcommand*\cnltx@package@date{??}
+\newcommand*\cnltx@package@version{??}
+\newcommand*\cnltx@package@info{??}
+\newcommand*\cnltx@package@title{??}
+\newcommand*\cnltx@title@format{\bfseries\scshape}
+\newbool{cnltx@package@title}
+\newbool{cnltx@build@title}
+\newcommand*\cnltx@package@subtitle{??}
+\newbool{cnltx@package@subtitle}
+\newcommand*\cnltx@package@url{??}
+\newbool{cnltx@package@url}
+\newcommand*\cnltx@package@email{??}
+\newbool{cnltx@package@email}
+\newcommand*\cnltx@package@abstract{??}
+\newbool{cnltx@package@abstract}
+\newcommand*\cnltx@package@abstract@width{.75\linewidth}
+\newcommand*\cnltx@package@abstract@format{\setlength\parskip{.333\baselineskip}}
+
+\newrobustcmd*\cnltxpackagenameformat[1]{\textcolor{cnltx}{\textsc{#1}}}
+
+\newrobustcmd*\cnltx@newpackagename[2]{%
+ \newcommand*#1{\texorpdfstring{\cnltxpackagenameformat{#2}}{#2}}%
+}
+\newrobustcmd*\newpackagename{\cnltx@newpackagename}
+
+% --------------------------------------------------------------------------
+% authors:
+\newcommand*\cnltx@package@author@list{}
+\newcommand*\cnltx@package@author@pdflist{}
+\newrobustcmd*\cnltx@new@author[1]{%
+ \listadd\cnltx@package@author@list
+ {\cnltx@read@name{#1}}%
+ \listadd\cnltx@package@author@pdflist
+ {\cnltx@extract@name{#1}}%
+}
+
+% writing the names and email addresses:
+\newcommand*\cnltx@read@name[1]{%
+ \cnltx@read@name@aux#1[]\q@stop
+}
+\protected\def\cnltx@read@name@aux#1[#2]\q@stop{%
+ \cnltx@get@first@and@second@name#1 \q@stop
+ \ifblank{#2}{}
+ {\cnltx@write@author@email#2\q@stop}%
+}
+\def\cnltx@write@author@email#1][\q@stop{%
+ \ifblank{#1}{}
+ {\footnote{\email{#1}}}%
+}
+\protected\def\cnltx@get@first@and@second@name#1 #2\q@stop{%
+ \ifblank{#2}
+ {%
+ \name*{#1}%
+ \listgadd\cnltx@package@author@pdflist{#1}%
+ }
+ {%
+ \name*{#1 #2}%
+ \listgadd\cnltx@package@author@pdflist{#1 \trim@spaces{#2}}%
+ }%
+}
+
+% getting the names for the pdf properties:
+\newcommand*\cnltx@extract@name[1]{%
+ \cnltx@extract@name@aux#1[]\q@stop
+}
+\def\cnltx@extract@name@aux#1[#2]\q@stop{%
+ #1\ifblank{#2}{}{\cnltx@extract@name@aux@i#2\q@stop}, %
+}
+\def\cnltx@extract@name@aux@i#1][\q@stop{}
+
+\newrobustcmd*\cnltx@package@authors{%
+ \gdef\cnltx@author@sep{\gdef\cnltx@author@sep{\qquad}}%
+ \forlistloop{\cnltx@author@sep}\cnltx@package@author@list
+}
+
+
+% --------------------------------------------------------------------------
+% options:
+\pgfkeys{
+ cnltx/.cd,
+ package/.code =
+ \ifcsdef{#1}{}{\expandafter\newpackagename\csname#1\endcsname{#1}}
+ \gdef\cnltx@package@name{#1}
+ \@ifpackageloaded{#1}
+ {\cnltx@getfileinfo{#1}{sty}}
+ {\cnltx@doc@warning{Package `#1' is not loaded, yet!}}
+ \booltrue{cnltx@package@name}
+ \booltrue{cnltx@build@title} ,
+ class/.code =
+ \ifcsdef{#1}{}{\expandafter\newpackagename\csname#1\endcsname{#1}}
+ \gdef\cnltx@package@name{#1}
+ \@ifclassloaded{#1}
+ {\cnltx@getfileinfo{#1}{cls}}
+ {\cnltx@doc@warning{Class `#1' is not loaded, yet!}}
+ \booltrue{cnltx@package@name}
+ \booltrue{cnltx@build@title} ,
+ name/.code =
+ \ifcsdef{#1}{}{\expandafter\newpackagename\csname#1\endcsname{#1}}
+ \gdef\cnltx@package@name{#1}
+ \booltrue{cnltx@package@name}
+ \booltrue{cnltx@build@title} ,
+ title/.code =
+ \gdef\cnltx@package@title{#1}
+ \booltrue{cnltx@package@title} ,
+ title-format/.code =
+ \def\cnltx@title@format{#1} ,
+ build-title/.is if = cnltx@build@title ,
+ subtitle/.code =
+ \gdef\cnltx@package@subtitle{#1}
+ \booltrue{cnltx@package@subtitle} ,
+ authors/.code =
+ \gdef\cnltx@package@author@list{}
+ \forcsvlist{\cnltx@new@author}{#1} ,
+ date/.code = \gdef\cnltx@package@date{#1} ,
+ version/.code = \gdef\cnltx@package@version{#1} ,
+ info/.code = \gdef\cnltx@package@info{#1} ,
+ url/.code =
+ \gdef\cnltx@package@url{#1}
+ \booltrue{cnltx@package@url} ,
+ email/.code =
+ \gdef\cnltx@package@email{#1}
+ \booltrue{cnltx@package@email} ,
+ abstract/.code =
+ \gdef\cnltx@package@abstract{%
+ \parbox{\cnltx@package@abstract@width}{%
+ \cnltx@package@abstract@format
+ #1%
+ }%
+ }
+ \booltrue{cnltx@package@abstract} ,
+ abstract-width/.code =
+ \setlength\cnltx@package@abstract@width{#1} ,
+ abstract-format/.code =
+ \def\cnltx@package@abstract@format{#1}
+}
+% --------------------------------------------------------------------------
+% command descriptions:
+\newcommand*\cnltx@command{%
+ \@ifstar
+ {\cnltx@command@star}
+ {\cnltx@command@nostar}%
+}
+
+\newrobustcmd*\cnltx@command@star[1]{%
+ \@ifnextchar[
+ {\cnltx@command@star@opt{#1}}
+ {\cnltx@command@star@opt{#1}[]}%
+}
+
+\newrobustcmd*\cnltx@command@nostar[1]{%
+ \@ifnextchar[
+ {\cnltx@command@nostar@opt{#1}}
+ {\cnltx@command@nostar@opt{#1}[]}%
+}
+
+\def\cnltx@command@star@opt#1[#2]{%
+ \ifblank{#2}
+ {\item\cs*{#1}}
+ {\item\cs*{#1}#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+\def\cnltx@command@nostar@opt#1[#2]{%
+ \ifblank{#2}
+ {\item\cs{#1}}
+ {\item\cs{#1}#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+
+\newcommand\cnltx@checkdefault[1]{%
+ \@ifnextchar\Module
+ {}
+ {%
+ \@ifnextchar\Default
+ {}
+ {%
+ \@ifnextchar\default
+ {}
+ {#1}%
+ }%
+ }%
+}
+
+\newcommand*\cmltx@list@setup{%
+ \leftmargin=0pt
+ \labelwidth=2em
+ \labelsep=0pt
+ \itemindent=-1em
+}
+
+\pgfkeys{
+ cnltx/.cd,
+ list-setup/.code = \def\cmltx@list@setup{#1}
+}
+
+\newenvironment{cnltxlist}
+ {\list{}{\cmltx@list@setup}}
+ {\endlist}
+
+\newenvironment{commands}
+ {%
+ \let\command\cnltx@command
+ \cnltxlist
+ }
+ {\endcnltxlist}
+
+% --------------------------------------------------------------------------
+% option descriptions:
+\newcommand*\@cnltx@option@item[1]{%
+ \@ifstar
+ {\@cnltx@option@item@aux@star{#1}}
+ {\@cnltx@option@item@aux@nostar{#1}}%
+}
+
+\newcommand*\@cnltx@option@item@aux@star[1]{%
+ \cnltx@ifdash
+ {\@cnltx@option@item@aux{#1}*-}
+ {\@cnltx@option@item@aux{#1}*{}}%
+}
+\newcommand*\@cnltx@option@item@aux@nostar[1]{%
+ \cnltx@ifdash
+ {\@cnltx@option@item@aux{#1}{}-}
+ {\@cnltx@option@item@aux{#1}{}{}}%
+}
+
+\newrobustcmd*\@cnltx@option@item@aux[4]{%
+ \@ifnextchar\bgroup
+ {\@cnltx@option@two{#1#2#3}{#4}}
+ {\@cnltx@option@one{#1#2#3}{#4}}%
+}
+
+\newcommand*\@cnltx@option@one[2]{%
+ \item#1{#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+
+\newcommand*\@cnltx@option@two[3]{%
+ \item#1{#2}{#3}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+
+\newenvironment{options}
+ {%
+ \def\opt{\@cnltx@option@item\option}%
+ \def\keyval{\@cnltx@option@item\key}%
+ \def\keylit{\@cnltx@option@item\keyis}%
+ \def\keychoice{\@cnltx@option@item\choicekey}%
+ \def\keybool{\@cnltx@option@item\boolkey}%
+ \cnltxlist
+ }
+ {\endcnltxlist}
+
+% --------------------------------------------------------------------------
+% environment descriptions:
+\newcommand*\cnltx@environment{%
+ \@ifstar
+ {\cnltx@environment@star}
+ {\cnltx@environment@nostar}%
+}
+
+\newcommand*\cnltx@environment@star[1]{%
+ \@ifnextchar[
+ {\cnltx@environment@star@opt{#1}}
+ {\cnltx@environment@star@opt{#1}[]}%
+}
+
+\newcommand*\cnltx@environment@nostar[1]{%
+ \@ifnextchar[
+ {\cnltx@environment@nostar@opt{#1}}
+ {\cnltx@environment@nostar@opt{#1}[]}%
+}
+
+\def\cnltx@environment@star@opt#1[#2]{%
+ \ifblank{#2}
+ {\item\beginenv*\code{\{}\env*{#1}\code{\}}}
+ {\item\beginenv*\code{\{}\env*{#1}\code{\}}#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+\def\cnltx@environment@nostar@opt#1[#2]{%
+ \ifblank{#2}
+ {\item\beginenv*\code{\{}\env{#1}\code{\}}}
+ {\item\beginenv*\code{\{}\env{#1}\code{\}}#2}%
+ \cnltx@checkdefault{\hfill\newline}%
+}
+
+\newenvironment{environments}
+ {%
+ \let\environment\cnltx@environment
+ \cnltxlist
+ }
+ {\endcnltxlist}
+
+% --------------------------------------------------------------------------
+% default values:
+\newrobustcmd*\cnltx@Default[1]{%
+ \null\hfill
+ \@ifnextchar\bgroup
+ {\cnltx@Default@initial{#1}}
+ {%
+ \cnltx@ifbang
+ {\cnltx@Default@required{#1}}
+ {\cnltx@Default@empty{#1}}%
+ }%
+}
+
+\newcommand*\cnltx@Default@initial[2]{%
+ \llap{\GetTranslation{cnltx-default}: \code{#2}}%
+ \ifblank{#1}{\newline}{}%
+}
+
+\newcommand*\cnltx@Default@required[1]{%
+ \llap{(\GetTranslation{cnltx-required})}%
+ \ifblank{#1}{\newline}{}%
+}
+
+\newcommand*\cnltx@Default@empty[1]{%
+ \llap{(\GetTranslation{cnltx-empty})}%
+ \ifblank{#1}{\newline}{}%
+}
+
+\newrobustcmd*\Default{%
+ \@ifstar
+ {\cnltx@Default{*}}
+ {\cnltx@Default{}}%
+}
+
+\newrobustcmd*\expandable{\cnltx@expandable@ornot\cnltx@expandable}
+\newrobustcmd*\unexpandable{\cnltx@expandable@ornot\cnltx@unexpandable}
+\newrobustcmd*\expandablesymbol{\textcolor{expandable}{\expandablesign}}
+\newrobustcmd*\unexpandablesymbol{\textcolor{unexpandable}{\expandablesign}}
+
+\newrobustcmd*\cnltx@expandable@ornot[1]{%
+ \let\cnltx@item\item
+ \def\item{\cnltx@item#1\let\item\cnltx@item}%
+}
+\newrobustcmd\cnltx@expandable@note[1]{%
+ \begingroup
+ \reversemarginpar
+ \marginnote{\hfill#1\space}%
+ \endgroup
+}
+\newcommand*\cnltx@expandable{%
+ \cnltx@expandable@note{\expandablesymbol}%
+}
+\newcommand*\cnltx@unexpandable{%
+ \cnltx@expandable@note{\unexpandablesymbol}%
+}
+
+\newcommand*\expandablesign{\textasteriskcentered}
+
+\pgfkeys{
+ cnltx/.cd,
+ expandable-sign/.code = \def\expandablesign{#1}
+}
+
+\newrobustcmd*\visualizespaces{%
+ \begingroup
+ \obeyspaces
+ \begingroup\lccode`~=`\ %
+ \lowercase{\endgroup\let~}\visiblespace
+ \cnltx@visualizespaces@aux}
+\newrobustcmd\cnltx@visualizespaces@aux[1]{%
+ \edef\cnltx@x{#1}\scantokens\expandafter{\cnltx@x\noexpand}%
+ \endgroup
+}
+\newcommand*\visiblespace{\allowbreak\textvisiblespace\allowbreak}
+
+
+% --------------------------------------------------------------------------
+% modules:
+\newcommand*\cnltx@module@sep{\,>>\,}
+
+\pgfkeys{
+ cnltx/.cd,
+ module-sep/.code = \def\cnltx@module@sep{#1}
+}
+
+\newrobustcmd*\cnltx@module[1]{%
+ \cnltx@ifbang
+ {\cnltx@write@module{#1}{}}
+ {\cnltx@write@module{#1}{*}}%
+}
+\newcommand*\cnltx@write@module[3]{
+ \cnltx@module@text{#2}{#3}%
+ \ifblank{#1}{\cnltx@checkdefault{\hfill\newline}}{}%
+}
+\newcommand*\cnltx@module@text[2]{%
+ \begingroup
+ \reversemarginpar
+ \marginnote{\hfill\llap{\module#1{#2}}\cnltx@module@sep}%
+ \endgroup
+}
+
+\newrobustcmd*\Module{%
+ \@ifstar
+ {\cnltx@module{*}}
+ {\cnltx@module{}}%
+}
+
+% --------------------------------------------------------------------------
+% a environment for block quotes
+\newcommand*\cnltx@quote@author@format{\itshape}
+\newcommand*\cnltx@quote@format{\small\sffamily}
+
+\pgfkeys{
+ cnltx/.cd ,
+ quote-format/.code = \def\cnltx@quote@format{#1} ,
+ quote-author-format/.code = \def\cnltx@quote@author@format{#1}
+}
+
+\newenvironment{cnltxquote}[1][]
+ {%
+ \def\cnltx@quote@option{#1}%
+ \quote
+ \cnltx@quote@format
+ }
+ {%
+ \ifdefempty\cnltx@quote@option
+ {}
+ {%
+ \unskip\nobreak\hfil\penalty50
+ \hskip2em\hbox{}\nobreak\hfil
+ {\normalfont\cnltx@quote@author@format\cnltx@quote@option}%
+ \parfillskip0pt \finalhyphendemerits=0
+ \par
+ }%
+ \endquote
+ }
+
+% --------------------------------------------------------------------------
+% document title:
+\AfterPackage!{hyperref}{%
+ \newrobustcmd*\cnltx@tableofcontents{%
+ \begingroup
+ \let\tocbasic@listhead\@gobble
+ \tableofcontents
+ \endgroup
+ }%
+ \RequirePackage{multicol}
+ \AtBeginDocument{%
+ \ifbool{cnltx@build@title}{%
+ \ifbool{cnltx@package@name}
+ {\cnltx@title@information}
+ {%
+ \cnltx@doc@warning{%
+ No package/class name given. Hence I won't create an
+ automatic title%
+ }%
+ }%
+ }{}%
+ }%
+}
+
+\newrobustcmd*\cnltx@title@information{%
+ \thispagestyle{plain}
+ \begin{center}
+ \ifbool{cnltx@load@preamble}{}
+ {\renewcommand\thefootnote{\@fnsymbol\c@footnote}}%
+ \Huge
+ \scalebox{1.5}{%
+ \color{cnltx}%
+ \cnltx@title@format
+ \ifbool{cnltx@package@title}
+ {\cnltx@package@title}
+ {\cnltx@package@name}%
+ }%
+ \par\vskip.5cm\relax
+ \large
+ \ifbool{cnltx@package@subtitle}
+ {\cnltx@package@subtitle\par\vskip.5cm\relax}
+ {}%
+ \Large \cnltx@package@version \qquad \cnltx@package@date
+ \par\vskip.5cm\relax
+ \large
+ \cnltx@package@info
+ \par\vskip.5cm\relax
+ \large
+ \cnltx@package@authors
+ \normalsize
+ \ifbool{cnltx@package@url}
+ {%
+ \par\vskip.5cm\relax
+ \url{\cnltx@package@url}%
+ }{}%
+ \ifbool{cnltx@package@email}
+ {%
+ \par\vskip.5cm\relax
+ \email{\cnltx@package@email}%
+ }{}%
+ \ifbool{cnltx@package@abstract}
+ {%
+ \par\vskip.5cm\relax
+ \cnltx@package@abstract
+ }{}%
+ \end{center}
+ \begin{multicols}{2}[{%
+ \pdfbookmark[1]{\GetTranslation{cnltx-toc}}{toc}%
+ \section*{\GetTranslation{cnltx-toc}}
+ }]\cnltx@tableofcontents
+ \end{multicols}%
+}
+
+% --------------------------------------------------------------------------
+% versioning:
+\RequirePackage{marginnote,ragged2e}
+\newcommand*\versionnoteformat{\footnotesize\sffamily\RaggedRight}
+
+\pgfkeys{
+ cnltx/.cd,
+ version-note-format/.code = \renewcommand*\versionnoteformat{#1} ,
+}
+
+\newcommand\cnltx@version@note[1]{%
+ \@bsphack
+ \begingroup
+ \reversemarginpar
+ \marginnote
+ {%
+ \versionnoteformat
+ \textcolor{versionnote}{#1}%
+ }%
+ \endgroup
+ \@esphack
+}
+
+\newcommand*\cnltx@newnote{%
+ \@ifstar
+ {\cnltx@newnote@aux{*}}
+ {\cnltx@newnote@aux{}}%
+}
+\newrobustcmd\cnltx@newnote@aux[2]{%
+ \@ifnextchar[%]
+ {\cnltx@newnote@aux@i{#1}{#2}}
+ {\cnltx@newnote@aux@i{#1}{#2}[0]}%
+}
+\protected\def\cnltx@newnote@aux@i#1#2[#3]{%
+ \@ifnextchar[%]
+ {\cnltx@newnote@aux@ii{#1}{#2}{#3}}
+ {\cnltx@newnote@aux@iii{#1}{#2}{#3}}%
+}
+\protected\long\def\cnltx@newnote@aux@ii#1#2#3[#4]#5{%
+ \ifblank{#1}
+ {\newrobustcmd#2[#3][#4]{\cnltx@version@note{#5}}}
+ {\newrobustcmd*#2[#3][#4]{\cnltx@version@note{#5}}}%
+}
+\protected\long\def\cnltx@newnote@aux@iii#1#2#3#4{%
+ \ifblank{#1}
+ {\newrobustcmd#2[#3]{\cnltx@version@note{#4}}}
+ {\newrobustcmd*#2[#3]{\cnltx@version@note{#4}}}%
+}
+
+\newrobustcmd\newnote{\cnltx@newnote}
+
+\newnote*\sinceversion[1]{\GetTranslation{cnltx-introduced}~#1}
+\newnote*\changedversion[1]{\GetTranslation{cnltx-changed}~#1}
+
+% --------------------------------------------------------------------------
+% hyperlinks:
+\newrobustcmd*\CTANurl[2][macros/latex/contrib]{%
+ on \ctan\ as \cnltx@weblink@font{#2}: \url{http://mirrors.ctan.org/#1/#2/}%
+}
+
+\newcommand*\cnltx@weblink@font[1]{\texttt{#1}}
+
+\newrobustcmd*\email[1]{\cnltx@weblink@font{\href{mailto:#1}{#1}}}
+\newrobustcmd*\website[1]{\cnltx@weblink@font{\href{http://#1/}{#1}}}
+\newrobustcmd*\securewebsite[1]{\cnltx@weblink@font{\href{https://#1/}{#1}}}
+
+\newrobustcmd*\needpackage[2][macros/latex/contrib]{%
+ \pkg{#2}\footnote{\CTANurl[#1]{#2}}%
+}
+
+\newrobustcmd*\needclass[2][macros/latex/contrib]{%
+ \cls{#2}\footnote{\CTANurl[#1]{#2}}%
+}
+
+\AtEndPreamble{%
+ \RequirePackage{hyperref}%
+ \pdfstringdefDisableCommands{%
+ \def\cnltx@name[#1]#2{#1 #2, }%
+ \def\cnltxpackagenameformat#1{#1}%
+ }%
+ \hypersetup
+ {
+ colorlinks = true,
+ allcolors = link ,
+ plainpages = false,
+ bookmarksopen = true,
+ bookmarksopenlevel = 1,
+ bookmarksnumbered = true,
+ pdfauthor = {\forlistloop{}\cnltx@package@author@pdflist},
+ pdftitle =
+ {\cnltx@package@name\space\cnltx@package@version\space Manual},
+ pdfsubject = {\cnltx@package@info},
+ pdfstartview = FitH
+ }%
+}
+
+\endinput
+
+% --------------------------------------------------------------------------
+HISTORY:
+
+2013/09/08 v0.1 - first working version
+2013/09/10 v0.2 - added optional argument to \license
+ - \newname got moved to `cnltx-tools'
+ - added possibility for internationalization
+ - new macros \needpackage and \needclass
+ - option for formatting the document title
+2013/09/12 v0.3 - new class options `add-index', `load-preamble+' and
+ `scrartcl'
+ - new options `index-prologue' and `index-space'
+ - new file `cnltx.ist'
+ - added \Module
+ - added optional ! to the \Default command
+ - add safety net: provide necessary commands in the aux-file
+ if they're not defined at begin document
+2013/09/12 v0.3a - automatic preamble detects xelatex and lualatex and selects
+ the fonts accordingly
+2013/09/15 v0.4 - possiblity to add an email address for each author, written
+ as footnote; they get symbols if the `load-preamble'
+ options is not used
+ - fixed bug in index setup mechanism
+ - added biblatex entry type `package' and biblatex style
+ `cnltx'
+2013/09/20 v0.5 - new commands \expandable and \unexpandable
+ - new environment `cnltxquote', formatting via options
+ `quote-format' and `quote-author-format'
+ - changed scaling of `beramono' from `.83' to `.81' -- seems
+ a better fit in relation to Linux Libertine
+2013/09/24 v0.6 - workaround for footnotes in minipages => libertine does not
+ have superior letters
+ - new options `abstract-format' and `abstract-width'
+2013/09/30 v0.7 - added better microtype settings to the predefined preamble
+ - replaced \def's with \newcommand or \newrobustcmd
+2013/10/04 v0.7a - renamed \cnltx@package@name@format into
+ \cnltxpackagenameformat
+ - added \cnltxpackagenameformat to the disabled pdfstring
+ commands
+ - added possibility to define a opitonal argument with
+ \newnote
+2013/10/21 v0.8 - disable ligatures for teletype font
+ - extended preamble loading
+ * choice if fonts are loaded
+ * choice if microtype is loaded
+ - \visualizespaces and \visiblespace
+2014/01/23 v0.10 - adapt to KOMA-Script v3.12
+2014/03/11 v0.11 - change biblatex locale from en_EN to en_US
+ - fix bug: wrong boolean used for option `add-bib'
+ - some translations are now provided by the `tools' module
+ and by the `cnltx' bibliography style
+ - use \cnltx@load@modules
+ - new commands \email, \website, \securewebsite
+ - \expandablesymbol, \unexpandablesymbol
+
+
+% --------------------------------------------------------------------------
+TODO:
+
diff --git a/macros/latex/contrib/cnltx/cnltx-example.sty b/macros/latex/contrib/cnltx/cnltx-example.sty
new file mode 100644
index 0000000000..39d066602f
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-example.sty
@@ -0,0 +1,1044 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesPackage{cnltx-example}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+\cnltx@load@modules{listings,translations}
+
+\cnltx@create@bundle@message{example}{Error}
+\cnltx@create@bundle@message{example}{Warning}
+\cnltx@create@bundle@message{example}{WarningNoLine}
+\cnltx@create@bundle@message{example}{Info}
+
+% --------------------------------------------------------------------------
+\PassOptionsToPackage{framemethod=tikz}{mdframed}
+\RequirePackage{mdframed}
+\RequirePackage{idxcmds}
+\RequirePackage{textcomp}
+\RequirePackage{adjustbox}
+\RequirePackage{ifxetex}
+
+% --------------------------------------------------------------------------
+% \code
+\newrobustcmd*\code[1]{\begingroup\codefont#1\endgroup}
+\newcommand*\verbcode{\lstinline[style=cnltx-inline]}
+\newcommand*\codefont{\ttfamily}
+\pgfkeys{
+ cnltx/.cd,
+ code-font/.code = \def\codefont{#1} ,
+}
+
+% --------------------------------------------------------------------------
+% command descriptions:
+% \cs
+\newidxcmd\cs{\code{\textbackslash\textcolor{cs}{#1}}}
+
+% \env
+\newidxcmd\env{\code{\textcolor{env}{#1}}}[\ (\GetTranslation{cnltx-environment})]
+
+% \begin, \end
+\newidxcmd\beginend{\code{\textbackslash\textcolor{beginend}{#1}}}
+\def\beginenv{\@ifstar{\beginend*{begin}}{\beginend{begin}}}
+\def\endenv{\@ifstar{\beginend*{end}}{\beginend{end}}}
+
+% --------------------------------------------------------------------------
+% option descriptions:
+\def\cnltx@isvalue{%
+ \nobreak\hskip.3333em plus .1667em =\hskip.3333em plus .1667em }
+
+% \option
+\newidxcmd\option{\code{\textcolor{option}{#1}}}
+\newidxcmd\module{\code{\textcolor{module}{#1}}}
+
+\newrobustcmd*\key{\@ifstar{\cnltx@key@star}{\cnltx@key@nostar}}
+
+\newrobustcmd*\cnltx@key@star{%
+ \cnltx@ifdash
+ {\cnltx@key@aux*\meta}
+ {\cnltx@key@aux*\marg}%
+}
+\newrobustcmd*\cnltx@key@nostar{%
+ \cnltx@ifdash
+ {\cnltx@key@aux{}\meta}
+ {\cnltx@key@aux{}\marg}%
+}
+\newcommand*\cnltx@key@aux[4]{%
+ \code{\option#1{#3}\cnltx@isvalue#2{#4}}%
+}
+
+\newrobustcmd*\keyis{%
+ \@ifstar
+ {\cnltx@keyis*}
+ {\cnltx@keyis{}}%
+}
+\newrobustcmd*\cnltx@keyis[1]{%
+ \cnltx@ifdash
+ {\cnltx@key@aux{#1}\@firstofone}
+ {\cnltx@key@aux{#1}\Marg}%
+}
+
+
+% \DeclareListParser*\cnltx@choices{|}
+\newrobustcmd*\choices[1]{%
+ \def\cnltx@choice@sep{\def\cnltx@choice@sep{|\hskip\z@}}%
+ \forcsvlist{\cnltx@choice@sep\code}{#1}%
+}
+
+\RequirePackage[normalem]{ulem}
+\newrobustcmd*\default[1]{\uline{#1}}
+
+\pgfkeys{
+ cnltx/.cd,
+ default-value/.code = \def\default##1{#1{##1}}
+}
+
+\newrobustcmd*\choicekey{%
+ \@ifstar
+ {\cnltx@choicekey@star}
+ {\cnltx@choicekey@nostar}%
+}
+\def\cnltx@choicekey@star#1#2{%
+ \code{\option*{#1}\cnltx@isvalue\choices{#2}}}
+\def\cnltx@choicekey@nostar#1#2{%
+ \code{\option{#1}\cnltx@isvalue\choices{#2}}}
+
+\newcommand*\boolkey{%
+ \@ifstar
+ {\cnltx@boolkey@star}
+ {\cnltx@boolkey@nostar}%
+}
+
+\def\cnltx@boolkey@star#1{\choicekey*{#1}{\default{true},false}}
+\def\cnltx@boolkey@nostar#1{\choicekey{#1}{\default{true},false}}
+
+% --------------------------------------------------------------------------
+% argument descriptions:
+% \meta
+\newcommand*\meta[1]{%
+ $\langle$%
+ \textcolor{meta}{{\argumentformat#1}}%
+ $\rangle$%
+}
+
+% arguments:
+\newcommand*\argumentformat{\normalfont\itshape}
+
+\pgfkeys{
+ cnltx/.cd,
+ arg-format/.code = \renewcommand*\argumentformat{#1} ,
+}
+
+\newcommand*\newarg[4][\meta]{%
+ \newcommand*#2[1]{%
+ \code{\textcolor{argument}{%
+ #3\textnormal{\ifblank{##1}{}{#1{##1}}}#4}}%
+ }%
+}
+
+\newarg\marg{\{}{\}}
+\newarg[\code]\Marg{\{}{\}}
+\newarg\oarg{[}{]}
+\newarg[\code]\Oarg{[}{]}
+\newarg\darg{(}{)}
+\newarg[\code]\Darg{(}{)}
+\newcommand*\sarg{\textcolor{argument}{\code{*}}}
+\newcommand*\parg{\textcolor{argument}{\code{+}}}
+
+% --------------------------------------------------------------------------
+% source code examples:
+% format of the source code:
+\newcommand*\sourceformat{\codefont\small}
+% format of the iput example:
+\newcommand*\exampleformat{}
+
+\pgfkeys{
+ cnltx/.cd,
+ source-format/.code = \renewcommand*\sourceformat{#1} ,
+ expl-format/.code = \renewcommand*\exampleformat{#1} ,
+}
+
+% see http://tex.stackexchange.com/a/114580/5049 for reference on the `nolig'
+% trick, thanks to @egreg!
+
+\newrobustcmd\cnltx@treat@lst@index[2]{%
+ \newrobustcmd#1[1]{%
+ \begingroup
+ \let\lst@nolig\@empty
+ \def\cnltx@tmp@index{##1}%
+ \expandafter\cnltx@replace@all
+ \expandafter\cnltx@tmp@index
+ \expandafter{\cnltxotherat}{\cnltxat}%
+ \cnltx@replace@all\cnltx@tmp@index{@}{\cnltxat}%
+ \expandafter#2\expandafter{\cnltx@tmp@index}%
+ \endgroup
+ }%
+}
+
+\cnltx@treat@lst@index{\indexcs}{\csidx}
+\cnltx@treat@lst@index{\indexenv}{\envidx}
+
+% this command is undocumented and not used; it requires `cnltx-tools':
+\newcommand\cnltx@copyablespace{%
+ \cnltx@accsupp{00A0}{method=hex,unicode}{\ }%
+}
+
+\lst@RequireAspects{writefile}
+\providecommand*\MakePercentComment{\cnltx@set@catcode{\%}{14}}
+
+\def\cnltx@gobble{2}
+
+% listings style for source code:
+\def\cnltx@listings@style{
+ language = [AlLaTeX]TeX,
+ alsolanguage = [plain]TeX,
+ basicstyle = {\sourceformat},
+ numbers = left,
+ numberstyle = \tiny,
+ xleftmargin = 1em,
+ numbersep = .75em,
+ gobble = \cnltx@gobble ,
+ columns = fullflexible,
+ literate =
+ {ä}{{\"a}}{1}
+ {ö}{{\"o}}{1}
+ {ü}{{\"u}}{1}
+ {Ä}{{\"A}}{1}
+ {Ö}{{\"O}}{1}
+ {Ü}{{\"U}}{1}
+ {ß}{{\ss}}{1}
+ {`}{\`{}}{1}
+ {'}{\textquotesingle}{1} ,
+ breaklines = true,
+ keepspaces = true,
+ breakindent = 1em,
+ commentstyle = \color{comment},
+ keywordstyle = \color{cs},
+ deletetexcs =
+ {
+ a,o,u,A,O,U,
+ begin,
+ center,
+ description,document,
+ end,enumerate,
+ equation,eqnarray,
+ figure,flushleft,flushright,
+ itemize,list,
+ otherlanguage,
+ table,tabu,tabular
+ },
+ deletekeywords =
+ {
+ a,o,u,A,O,U,
+ begin,
+ center,
+ description,document,
+ end,enumerate,
+ equation,eqnarray,
+ figure,flushleft,flushright,
+ itemize,list,
+ otherlanguage,
+ table,tabu,tabular
+ },
+ % \begin, \end:
+ texcsstyle = [2]\color{beginend},
+ index = [2][texcs2],
+ indexstyle = [2]\@gobble,
+ moretexcs = [2]{begin,end},
+ % control sequences that'll be indexed:
+ texcsstyle = [3]\color{cs},
+ index = [3][texcs3],
+ indexstyle = [3]\indexcs,
+ % control sequences that won't be indexed:
+ texcsstyle = [4]\color{cs},
+ index = [4][texcs4],
+ indexstyle = [4]\@gobble,
+ % added environments that'll be indexed:
+ texcsstyle = [5]\color{env},
+ index = [5][texcs5],
+ indexstyle = [5]\indexenv,
+ % environments that won't be indexed:
+ texcsstyle = [6]\color{env},
+ index = [6][texcs6],
+ indexstyle = [6]\@gobble,
+ moredelim = *[s][\color{math}]{$}{$}
+}
+
+\def\cnltx@bibtex@listings@style{
+ language = BiBTeX,
+ basicstyle = {\sourceformat},
+ numbers = left,
+ numberstyle = \tiny,
+ xleftmargin = 1em,
+ numbersep = .75em,
+ gobble = \cnltx@gobble ,
+ columns = fullflexible,
+ literate =
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {ü}{{\"u}}1
+ {Ä}{{\"A}}1
+ {Ö}{{\"O}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1 ,
+ breaklines = true,
+ keepspaces = true,
+ breakindent = 1em,
+ commentstyle = \color{comment},
+ keywordstyle = \color{bibentry} ,
+ keywordstyle = [2]\color{bibentryfield}\itshape ,
+ showstringspaces = false ,
+}
+
+\def\cnltx@makeindex@listings@style{
+ language = makeindex,
+ basicstyle = {\sourceformat},
+ numbers = left,
+ numberstyle = \tiny,
+ xleftmargin = 1em,
+ numbersep = .75em,
+ gobble = \cnltx@gobble ,
+ columns = fullflexible,
+ literate =
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {ü}{{\"u}}1
+ {Ä}{{\"A}}1
+ {Ö}{{\"O}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1 ,
+ breaklines = true,
+ keepspaces = true,
+ breakindent = 1em,
+ commentstyle = \color{comment},
+ keywordstyle = \color{makeidxkey}\bfseries ,
+ stringstyle = \color{makeidxstring} ,
+ showstringspaces = false ,
+}
+
+\cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@listings@style}
+
+\cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx-bibtex}
+ {\expandonce\cnltx@bibtex@listings@style}
+
+\cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx-makeindex}
+ {\expandonce\cnltx@makeindex@listings@style}
+
+\lstdefinestyle
+ {cnltx-inline}
+ {
+ style=cnltx,
+ basicstyle = \codefont
+ }
+
+\def\cnltx@addcmds#1{%
+ \cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@listings@style,\unexpanded{moretexcs={[3]#1}}}%
+ \edef\cnltx@listings@style{%
+ \expandonce\cnltx@listings@style,\unexpanded{moretexcs={[3]#1}}%
+ }%
+}
+
+\def\cnltx@addsilentcmds#1{%
+ \cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@listings@style,\unexpanded{moretexcs={[4]#1}}}%
+ \edef\cnltx@listings@style{%
+ \expandonce\cnltx@listings@style,\unexpanded{moretexcs={[4]#1}}%
+ }%
+}
+
+\cnltx@expandargs(o)\cnltx@addsilentcmds{\cnltx@predefined@control@sequences}
+
+\def\cnltx@addenvs#1{%
+ \cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@listings@style,\unexpanded{moretexcs={[5]#1}}}%
+ \edef\cnltx@listings@style{%
+ \expandonce\cnltx@listings@style,\unexpanded{moretexcs={[5]#1}}%
+ }%
+}
+
+\def\cnltx@addsilentenvs#1{%
+ \cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@listings@style,\unexpanded{moretexcs={[6]#1}}}%
+ \edef\cnltx@listings@style{%
+ \expandonce\cnltx@listings@style,\unexpanded{moretexcs={[6]#1}}%
+ }%
+}
+
+\cnltx@expandargs(o)\cnltx@addsilentenvs{\cnltx@predefined@environments}
+
+\def\cnltx@addlistingsoptions#1{%
+ \cnltx@expandargs(nx)\lstdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@listings@style,\unexpanded{#1}}%
+ \edef\cnltx@listings@style{%
+ \expandonce\cnltx@listings@style,\unexpanded{#1}%
+ }%
+}
+
+\def\cnltx@local@listings@options{}
+\newbool{cnltx@local@sourcecode@overwrite}
+
+\pgfkeys{
+ cnltx/.cd,
+ gobble/.code = \def\cnltx@gobble{#1} ,
+ add-cmds/.code = \cnltx@addcmds{#1} ,
+ add-silent-cmds/.code = \cnltx@addsilentcmds{#1} ,
+ add-listings-options/.code = \cnltx@addlistingsoptions{#1} ,
+ listings-options/.code = \lstdefinestyle{cnltx}{#1} ,
+ add-envs/.code = \cnltx@addenvs{#1} ,
+ add-silent-envs/.code = \cnltx@addsilentenvs{#1} ,
+ add-sourcecode-options/.code =
+ \edef\cnltx@local@listings@options{\trim@spaces@noexp{#1}} ,
+ sourcecode-options/.code =
+ \booltrue{cnltx@local@sourcecode@overwrite}
+ \edef\cnltx@local@listings@options{\trim@spaces@noexp{#1}}
+}
+
+\def\cnltx@mdframed@options
+ {
+ backgroundcolor = cnltxbg ,
+ linecolor = cnltx ,
+ roundcorner = 5pt ,
+ skipabove = .5\baselineskip ,
+ skipbelow = .5\baselineskip
+ }
+\cnltx@expandargs(nx)\mdfdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@mdframed@options}
+
+\def\cnltx@addmdframedoptions#1{%
+ \cnltx@expandargs(nx)\mdfdefinestyle
+ {cnltx}
+ {\expandonce\cnltx@mdframed@options,\unexpanded{#1}}%
+}
+
+\def\cnltx@local@frame@options{}
+\newbool{cnltx@local@frame@overwrite}
+
+\newbool {cnltx@sidebyside}
+\newbool {cnltx@codeleft}
+\booltrue{cnltx@codeleft}
+\newbool {cnltx@codeonly}
+\newbool {cnltx@compile}
+\newbool {cnltx@float}
+\newbool {cnltx@pagelist}
+\newbool {cnltx@outside}% use this to allow floating material in the examples
+
+\newsavebox\cnltx@example@box
+
+\newlength\cnltx@sidebysidewidth
+\newlength\cnltx@before@skip
+\newlength\cnltx@after@skip
+
+\newcommand*\cnltx@examplesep{\hrulefill}
+\newcommand*\cnltx@pre@source@hook{}
+\newcommand*\cnltx@after@source@hook{}
+\newcommand*\cnltx@pre@example@hook{}
+\newcommand*\cnltx@after@example@hook{}
+\newcommand*\cnltx@image@max@height{.5\textheight}
+\newcommand*\cnltx@image@options{}
+\newcommand*\cnltx@example@fileext{pdf}
+\newcommand*\cnltx@float@type{figure}
+\newcommand*\cnltx@float@pos{}
+ \edef\cnltx@float@pos{[\csuse{fps@\cnltx@float@type}]}
+\newcommand*\cnltx@float@caption{}
+\newcommand*\cnltx@float@start{}
+\newcommand*\cnltx@init@float{%
+ \edef\cnltx@float@start{%
+ \noexpand\begin{\expandonce\cnltx@float@type}\expandonce\cnltx@float@pos}%
+}
+\cnltx@init@float
+
+\newcounter{cnltx@filenumber}
+\newcounter{cnltx@runs}
+\setcounter{cnltx@runs}{2}
+\newcounter{cnltx@pdfpages}
+\newcounter{cnltx@maxpages}
+\setcounter{cnltx@maxpages}{4}
+
+\pgfkeys{
+ cnltx/.cd,
+ side-by-side/.is if = cnltx@sidebyside ,
+ code-only/.is if = cnltx@codeonly ,
+ code-left/.is if = cnltx@codeleft ,
+ compile/.is if = cnltx@compile ,
+ code-sep/.code = \def\cnltx@examplesep{#1} ,
+ pre-code/.code = \def\cnltx@pre@source@hook{#1} ,
+ after-code/.code = \def\cnltx@after@source@hook{#1} ,
+ pre-output/.code = \def\cnltx@pre@example@hook{#1} ,
+ after-output/.code = \def\cnltx@after@example@hook{#1} ,
+ add-frame-options/.code = \cnltx@addmdframedoptions{#1} ,
+ frame-options/.code = \mdfdefinestyle{cnltx}{#1} ,
+ add-local-frame/.code = \def\cnltx@local@frame@options{#1} ,
+ local-frame/.code =
+ \booltrue{cnltx@local@frame@overwrite}
+ \def\cnltx@local@frame@options{#1} ,
+ gobble/.code = \def\cnltx@gobble{#1} ,
+ max-pages/.code = \setcounter{cnltx@maxpages}{#1} ,
+ max-height/.code = \def\cnltx@image@max@height{#1} ,
+ pages/.code =
+ \cnltx@get@page@list{#1}
+ \booltrue{cnltx@pagelist} ,
+ runs/.code = \setcounter{cnltx@runs}{#1} ,
+ program/.code = \def\cnltx@compilation@method{#1} ,
+ file-ext/.code = \def\cnltx@example@fileext{#1} ,
+ exe-with/.code = \def\cnltx@compilation@options{#1} ,
+ graphics/.code = \def\cnltx@image@options{#1} ,
+ float/.code =
+ \ifstrequal{#1}{true}
+ {%
+ \booltrue{cnltx@float}%
+ \edef\cnltx@float@pos{[\csuse{fps@\cnltx@float@type}]}%
+ }{%
+ \ifstrequal{#1}{false}
+ {\boolfalse{cnltx@float}}
+ {%
+ \booltrue{cnltx@float}%
+ \def\cnltx@float@pos{[#1]}%
+ }%
+ }
+ \cnltx@init@float ,
+ float/.default = true ,
+ float-env/.code = \def\cnltx@float@type{#1} ,
+ caption/.code =
+ \booltrue{cnltx@float}%
+ \renewcommand\cnltx@float@caption{#1} ,
+ float-pos/.code = \def\cnltx@float@pos{[#1]}\cnltx@init@float ,
+ outside/.is if = cnltx@outside ,
+ add-frame/.is choice ,
+ add-frame/true/.code = \def\cnltx@adjustbox@frame{frame} ,
+ add-frame/false/.code = \def\cnltx@adjustbox@frame{} ,
+ add-frame/.default = true ,
+ before-skip/.code = \setlength\cnltx@before@skip{#1} ,
+ after-skip/.code = \setlength\cnltx@after@skip{#1}
+}
+
+\setlength\cnltx@before@skip{\baselineskip}
+\setlength\cnltx@after@skip{\baselineskip}
+
+\newcommand*\cnltx@get@page@list[1]{%
+ \forcsvlist{\cnltx@read@page@list@item}{#1}%
+}
+\newcommand*\cnltx@read@page@list@item[1]{%
+ \cnltx@if@in{#1}{-}
+ {\cnltx@addrangeto@page@list#1\q@stop}
+ {\cnltx@addto@page@list{#1}}%
+}
+\newcommand*\cnltx@pagelist{}
+\newcommand*\cnltx@addto@page@list[1]{\listadd\cnltx@pagelist{#1}}
+\newcommand*\cnltx@addrangeto@page@list{}
+\def\cnltx@addrangeto@page@list#1-#2\q@stop{%
+ \setcounter{cnltx@tmpa}{#1}%
+ \setcounter{cnltx@tmpb}{#2}%
+ \whileboolexpr
+ { test {\ifnumgreater{\value{cnltx@tmpb}+1}{\value{cnltx@tmpa}}} }
+ {%
+ \listeadd\cnltx@pagelist{\arabic{cnltx@tmpa}}%
+ \stepcounter{cnltx@tmpa}%
+ }%
+}
+
+\newcommand*\cnltx@example@input[1]{%
+ \begingroup
+ \trivlist\item\relax
+ % what about those:
+ % \leftskip\@totalleftmargin
+ % \rightskip\z@skip
+ % \@topsep\z@
+ % \parskip\z@
+ % \partopsep\z@
+ % don't know why this is necessary but it is:
+ \catcode`\^^M=5\relax
+ \makeatother
+ \MakePercentComment
+ % want special formatting for the input example:
+ \exampleformat
+ % we're in a list so the first paragraph is not indented;
+ % let's make the input example be the second paragraph:
+ \if@minipage\else
+ \par\mbox{}\par\vskip-\baselineskip\relax
+ \fi
+ \input{#1}%
+ \endtrivlist
+ \endgroup
+}
+
+\newcommand*\cnltx@exe{\immediate\write18}
+\newcommand*\cnltx@program@pdflatex{pdflatex}
+\newcommand*\cnltx@program@lualatex{lualatex}
+\newcommand*\cnltx@program@xelatex {xelatex}
+\newcommand*\cnltx@program@arara {arara}
+\newcommand*\cnltx@compile[3]{%
+ \ifcsdef{cnltx@program@#1}
+ {%
+ \setcounter{cnltx@tmpa}{\value{cnltx@runs}}%
+ \whileboolexpr
+ { test {\ifnumgreater{\value{cnltx@tmpa}}{0}} }
+ {
+ \cnltx@exe{\csuse{cnltx@program@#1}\ifblank{#2}{}{ #2} #3}%
+ \addtocounter{cnltx@tmpa}{-1}%
+ }%
+ }
+ {\cnltx@example@error{Unknown compilation method `#1'}}%
+}
+\newcommand*\cnltx@compilation@method{pdflatex}
+\newcommand*\cnltx@compilation@options{}
+
+\newrobustcmd*\cnltx@get@pdfpages[1]{%
+ \begingroup
+ \ifxetex
+ \edef\cnltx@tmpa{\the\XeTeXpdfpagecount #1 }%
+ \setcounter{cnltx@pdfpages}{\cnltx@tmpa}%
+ \else
+ \sbox0{%
+ \includegraphics{#1}%
+ \setcounter{cnltx@pdfpages}{\pdflastximagepages}%
+ }%
+ \fi
+ \endgroup
+}
+
+\newrobustcmd*\cnltx@source@input@start[1]{%
+ \ifboolexpr{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {%
+ \adjustbox{
+ % discard,
+ trim= 0pt 0pt \linewidth{} 0pt,
+ valign=c,
+ gstore=\cnltx@example@box,
+ discard
+ }\bgroup
+ }
+ {\cnltx@pre@source@hook}%
+ \lst@BeginAlsoWriteFile{#1}%
+}
+
+\newrobustcmd*\cnltx@source@input@end{%
+ \lst@EndWriteFile
+ \ifboolexpr{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {\egroup}{\cnltx@after@source@hook}%
+}
+
+\newrobustcmd*\cnltx@example@start[1]{%
+ \pgfqkeys{/cnltx}{#1}%
+ \ifbool{cnltx@local@sourcecode@overwrite}
+ {%
+ \cnltx@expandargs(x)\lstset{
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {linewidth=\cnltx@sidebysidewidth,}{}%
+ moretexcs=[3], moretexcs=[5],
+ \expandonce\cnltx@local@listings@options
+ }%
+ }
+ {%
+ \cnltx@expandargs(x)\lstset{
+ style=cnltx,
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {linewidth=\cnltx@sidebysidewidth,}{}%
+ \expandonce\cnltx@local@listings@options
+ % no idea why this is necessary:
+ % \ifcsdef{lst@gtexcs3}{}{,moretexcs=[3]}%
+ }%
+ }%
+ \ifbool{cnltx@local@frame@overwrite}
+ {%
+ \cnltx@expandargs(nxx)%
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {%
+ \noexpand\mdframed[
+ \expandonce\cnltx@local@frame@options,
+ nobreak=true]
+ }
+ {%
+ \noexpand\mdframed[
+ \expandonce\cnltx@local@frame@options,
+ nobreak=false]
+ }%
+ }
+ {%
+ \cnltx@expandargs(nxx)%
+ \ifboolexpe{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {%
+ \noexpand\mdframed[
+ style=cnltx,
+ \expandonce\cnltx@local@frame@options,
+ nobreak=true]
+ }
+ {%
+ \noexpand\mdframed[
+ style=cnltx,
+ \expandonce\cnltx@local@frame@options,
+ nobreak=false]
+ }%
+ }%
+}
+
+\newcommand*\cnltx@adjustbox@frame{frame}
+
+% #1: filename
+% #2: number of pages
+% #3: current page
+\newrobustcmd*\cnltx@print@documentpage[3]{%
+ \cnltx@expandargs(x)\setlength\cnltx@tmpa@length{%
+ \strip@pt\dimexpr1pt/%
+ \ifnumgreater{#2}{\value{cnltx@maxpages}}
+ {\value{cnltx@maxpages}}
+ {#2}%
+ \relax \noexpand\linewidth
+ }%
+ \ifblank{#3}{}{%
+ \adjustbox{
+ \cnltx@adjustbox@frame,
+ max width = \cnltx@tmpa@length ,
+ max height = \cnltx@image@max@height
+ }{%
+ \ifnumgreater{#3}{\value{cnltx@pdfpages}}
+ {%
+ \cnltx@example@warning
+ {
+ The file `#1.\cnltx@example@fileext' has less than #3 pages,
+ namely \arabic{cnltx@pdfpages}%
+ }%
+ \parbox[b]{\cnltx@tmpa@length}{%
+ \raggedright
+ Page number #3 does not exist. \code{#1} only has
+ \arabic{cnltx@pdfpages} pages.%
+ }%
+ }
+ {%
+ \expandafter\includegraphics
+ \expandafter[\cnltx@image@options,page=#3]
+ {\jobname-cnltx-\arabic{cnltx@filenumber}.\cnltx@example@fileext}%
+ }%
+ }%
+ \ifboolexpr
+ {
+ test
+ {\ifnumgreater{#2}{\value{cnltx@maxpages}}}
+ and test
+ {
+ \ifnumequal
+ {\cnltx@modulo{#3}{\value{cnltx@maxpages}}}
+ {0}
+ }
+ }
+ {\newline}{}%
+ }%
+}
+
+\newrobustcmd*\cnltx@stepcounter@ifnotempty[2]{%
+ \ifblank{#2}{}{\stepcounter{#1}}%
+}
+
+\newrobustcmd*\cnltx@example@end[1]{%
+ \ifblank{#1}{\booltrue{cnltx@codeonly}}{}
+ \ifboolexpr
+ {
+ bool {cnltx@codeonly} or
+ bool {cnltx@compile} or
+ bool {cnltx@outside}
+ }
+ {}
+ {% direct input of code example
+ % \showthe\wd\cnltx@example@box
+ % \showthe\linewidth
+ \ifbool{cnltx@sidebyside}
+ {% side-by-side
+ \ifbool{cnltx@codeleft}
+ {% code on the left
+ \noindent
+ \minipage[c]{\cnltx@sidebysidewidth}%
+ \cnltx@pre@source@hook
+ \unhbox\cnltx@example@box
+ \cnltx@after@source@hook
+ \endminipage\hfill
+ \minipage[c]{\cnltx@sidebysidewidth}%
+ \cnltx@pre@example@hook
+ \cnltx@example@input{#1.code}%
+ \cnltx@after@example@hook
+ \endminipage
+ }
+ {% code on the right
+ \noindent
+ \minipage[c]{\cnltx@sidebysidewidth}%
+ \cnltx@pre@example@hook
+ \cnltx@example@input{#1.code}%
+ \cnltx@after@example@hook
+ \endminipage\hfill
+ \minipage[c]{\cnltx@sidebysidewidth}%
+ \cnltx@pre@source@hook
+ \unhbox\cnltx@example@box
+ \cnltx@after@source@hook
+ \endminipage
+ }%
+ }
+ {% example below
+ \par\noindent\cnltx@examplesep
+ \cnltx@pre@example@hook
+ \cnltx@example@input{#1.code}%
+ \cnltx@after@example@hook
+ }%
+ }%
+ \ifbool{cnltx@compile}
+ {% compile file and include document
+ \cnltx@ifshellescape
+ {%
+ \cnltx@example@info
+ {%
+ Compiling example `#1.tex' \arabic{cnltx@runs}
+ time\ifnum\value{cnltx@runs}>1s\fi\space with
+ \cnltx@compilation@method
+ }%
+ \cnltx@expandargs(oo)\cnltx@compile
+ {\cnltx@compilation@method}
+ {\cnltx@compilation@options}
+ {#1.tex}%
+ }
+ {%
+ \cnltx@example@warning
+ {`shell-escape' or `write18' not enabled -- I'm not compiling}%
+ }%
+ \IfFileExists{#1.\cnltx@example@fileext}
+ {%
+ \cnltx@get@pdfpages{#1.\cnltx@example@fileext}%
+ \setcounter{cnltx@tmpa}{1}%
+ \setcounter{cnltx@tmpb}{\value{cnltx@pdfpages}}%
+ \ifbool{cnltx@float}
+ {%
+ \endmdframed
+ \cnltx@float@start
+ }
+ {\par\noindent\cnltx@examplesep\par}%
+ \cnltx@pre@example@hook
+ \ifbool{cnltx@pagelist}
+ {%
+ \setcounter{cnltx@tmpa}{0}%
+ \forlistloop
+ {\cnltx@stepcounter@ifnotempty{cnltx@tmpa}}
+ \cnltx@pagelist
+ \ifnumgreater{\value{cnltx@tmpa}}{1}
+ {\noindent}
+ {\centering}%
+ \forlistloop
+ {\cnltx@print@documentpage{#1.\cnltx@example@fileext}{\value{cnltx@tmpa}}}
+ \cnltx@pagelist
+ }
+ {%
+ \ifnumequal{\value{cnltx@pdfpages}}{1}
+ {\centering}
+ {\noindent}%
+ \whileboolexpr
+ { test {\ifnumgreater{\value{cnltx@tmpb}}{0}} }
+ {%
+ \cnltx@print@documentpage
+ {#1.\cnltx@example@fileext}
+ {\value{cnltx@pdfpages}}
+ {\value{cnltx@tmpa}}%
+ \stepcounter{cnltx@tmpa}%
+ \setcounter{cnltx@tmpb}{\numexpr\value{cnltx@tmpb}-1\relax}%
+ }
+ }%
+ \ifbool{cnltx@float}
+ {%
+ \cnltx@after@example@hook
+ \ifdefvoid\cnltx@float@caption{}{\caption{\cnltx@float@caption}}%
+ \expandafter\end\expandafter{\cnltx@float@type}%
+ }
+ {%
+ \cnltx@after@example@hook
+ \endmdframed
+ \par
+ }%
+ }
+ {\endmdframed\par}%
+ }%
+ {%
+ \endmdframed\par
+ \ifbool{cnltx@outside}
+ {%
+ \cnltx@pre@example@hook
+ \cnltx@example@input{#1.code}%
+ \cnltx@after@example@hook
+ }
+ {}%
+ }%
+ \ignorespacesafterend
+}
+
+\def\cnltx@new@sourcecode@env#1#2{%
+ \lstnewenvironment{#2}[1][]
+ {%
+ \vskip\cnltx@before@skip
+ \setlength\cnltx@sidebysidewidth
+ {\dimexpr .45\columnwidth -\lst@xleftmargin -\lst@xrightmargin\relax}%
+ \ifboolexpr{ bool {cnltx@sidebyside} and not bool {cnltx@codeonly} }
+ {\cnltx@addlistingsoptions{linewidth=\cnltx@sidebysidewidth}}
+ {}%
+ \cnltx@example@start{##1,#1}%
+ \ifbool{cnltx@compile}{%
+ \stepcounter{cnltx@filenumber}%
+ \cnltx@source@input@start{\jobname-cnltx-\arabic{cnltx@filenumber}.tex}%
+ }{\cnltx@source@input@start{\jobname-cnltx.code}}%
+ }
+ {%
+ \cnltx@source@input@end
+ \ifbool{cnltx@compile}
+ {\cnltx@example@end{\jobname-cnltx-\arabic{cnltx@filenumber}}}
+ {\cnltx@example@end{\jobname-cnltx}}%
+ % see http://tex.stackexchange.com/a/136264/5049
+ % for the reasoning behind this:
+ \if@nobreak
+ \@nobreakfalse
+ \fi
+ \csname par\endcsname
+ \vskip\cnltx@after@skip
+ }%
+}
+\newrobustcmd\newsourcecodeenv[2][]{%
+ \cnltx@new@sourcecode@env{#1}{#2}%
+}
+
+\def\cnltx@input@sourcecode@file#1#2{%
+ \begingroup
+ \cnltx@example@start{#1}%
+ \lstinputlisting{#2}%
+ \cnltx@example@end{#2}%
+ \endgroup
+}
+
+\def\cnltx@new@input@source@file#1#2{%
+ \newcommand#2[2][]{\cnltx@input@sourcecode@file{#1,##1}{##2}}%
+}
+
+\newrobustcmd*\newinputsourcefilecmd[2][]{%
+ \cnltx@new@input@source@file{#1}{#2}%
+}
+
+\newsourcecodeenv{example}
+\newsourcecodeenv[side-by-side]{sidebyside}
+\newsourcecodeenv[code-only]{sourcecode}
+
+\newinputsourcefilecmd\inputexample
+\newinputsourcefilecmd[side-by-side]\inputsidebyside
+\newinputsourcefilecmd[code-only]\inputsourcecode
+
+\newrobustcmd*\implementation[2][]{%
+ \lstinputlisting[style=cnltx,#1]{#2}%
+}
+
+
+% --------------------------------------------------------------------------
+% packages and classes:
+\newcommand*\packageformat{\sffamily}
+\newcommand*\classformat{\sffamily}
+\newcommand*\bundleformat{\sffamily}
+
+\newidxcmd\pkg{{\packageformat#1}}[\ (\GetTranslation{cnltx-package})]
+\newidxcmd\cls{{\classformat#1}}[\ (\GetTranslation{cnltx-class})]
+\newidxcmd\bnd{{\bundleformat#1}}[\ (\GetTranslation{cnltx-bundle})]
+
+\pgfkeys{
+ cnltx/.cd,
+ pkg-format/.code = \renewcommand*\packageformat{#1} ,
+ cls-format/.code = \renewcommand*\classformat{#1}
+}
+
+% disable indexing commands in PDF strings:
+\AtBeginDocument{%
+ \providecommand\pdfstringdefDisableCommands[1]{}%
+ \pdfstringdefDisableCommands{%
+ \def\code#1{#1}%
+ \def\cs*#1{\textbackslash#1}%
+ \def\env*{}%
+ \def\option*{}%
+ \def\pkg*{}%
+ \def\cls*{}%
+ \def\bnd*{}%
+ \def\key*#1#2{#1 = #2}%
+ }%
+}
+
+\endinput
+
+% --------------------------------------------------------------------------
+HISTORY:
+
+2013/09/08 v0.1 - first working version
+2013/09/10 v0.2 - added \keyis
+ - lot's of improvements on the source code example
+ environments
+ - disable indexing commands in PDF strings
+ - added hooks to the source example environments
+ - added possibility for internationalization
+ - new macro \verbcode
+ - added optional argument to \newarg
+ - new macros \Marg, \Oarg, \Darg
+ - option for formatting the \default command
+2013/09/12 v0.3 - added \module
+ - added \newsourcecodeenv and \newinputsourcefilecmd
+ - added \inputexample, \inputsidebyside and \inputsourcecode
+ - renamed `example*' into `sidebyside'
+2013/09/15 v0.4 - new listings style `cnltx-bibtex'
+2013/09/20 v0.5 - new command \implementation
+ - fixed wrong indexing behaviour: keywords in the silent lists
+ are now correctly indexed if added with `add-cmds' or
+ `add-envs'
+2013/09/30 v0.7 - added listings style `cnltx-makeindex'
+2013/10/04 v0.7a - new command \cnltx@treat@lst@index
+ - changed \envidx in listings into \indexenv
+ - added \bnd for package bundles
+2013/11/22 v0.9 - new option `compile' that allows to compile source code
+ examples (which need to be complete, of course) with
+ pdflatex and include the documents afterwards
+ - new options `max-pages' that determines the maximum number
+ of pages before a line break if documents are included with
+ `compile'
+ - new option `graphics'
+ - new option `runs' that specifies the number of compilation
+ runs of the included example
+ - new options `program' and `exe-with'
+ - new option `float', `float-pos' and `caption'
+2014/01/05 v0.10 - sometimes there is a spurious `undefined control sequence
+ \lst@gtexcs3' error: added hack to fix this => find out
+ where this comes from!
+ - new option `add-frame' for `compile'd examples
+ - new command \parg for an optional + argument
+ - new option `outside' for non-`compiled' examples
+ - new option `float-env'
+2014/03/11 v0.11 - \cnltx@load@modules
+2014/04/09 v0.12 - improvements on the sidebyside examples
+TODO:
+
+
diff --git a/macros/latex/contrib/cnltx/cnltx-listings.sty b/macros/latex/contrib/cnltx/cnltx-listings.sty
new file mode 100644
index 0000000000..7db538a102
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-listings.sty
@@ -0,0 +1,1962 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesPackage{cnltx-listings}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+\cnltx@create@bundle@message{listings}{Error}
+\cnltx@create@bundle@message{listings}{Warning}
+\cnltx@create@bundle@message{listings}{WarningNoLine}
+\cnltx@create@bundle@message{listings}{Info}
+
+\RequirePackage{listings}
+
+% --------------------------------------------------------------------------
+% a listings language BibTeX:
+\lstdefinelanguage{BibTeX}{
+ % entry types:
+ morekeywords = {
+ % regular types:
+ @article,
+ @book,@mvbook,@inbook,@bookinbook,@suppbook,@booklet,
+ @collection,@mvcollection,@incollection,@suppcollection,
+ @manual,
+ @misc,
+ @online,
+ @patent,
+ @periodical,
+ @suppperiodical,
+ @proceedings,@mvproceedings,@inproceedings,
+ @reference,@mvreference,@inreference,
+ @report,
+ @set,
+ @thesis,
+ @unpublished,
+ @xdata,
+ @customa,@customb,@customc,@customd,@custome,@customf,
+ % type aliases:
+ @conference,
+ @electronic,
+ @mastersthesis,
+ @phdthesis,
+ @techreport,
+ @www,
+ % unsupported types:
+ @artwork,
+ @audiobibnote,
+ @commentary,
+ @image,
+ @jurisdiction,
+ @legislation,
+ @legal,
+ @letter,
+ @movie,
+ @music
+ @performance,
+ @review,
+ @software,
+ @standard,
+ @video,
+ % cnltx types:
+ @bundle,
+ @class,
+ @package,
+ } ,
+ % entry fields:
+ morekeywords = [2]{
+ % data fields:
+ abstract,
+ addendum,
+ afterword,
+ annotation,
+ annotator,
+ author,
+ authortype,
+ bookauthor,
+ bookpagination,
+ booksubtitle,
+ booktitle,
+ booktitleaddon,
+ chapter,
+ commentator,
+ date,
+ doi,
+ edition,
+ editor,editora,editorb,editorc,
+ editortype,
+ editoratype,editorbtype,editorctype,
+ eid,
+ entrysubtype,
+ eprint,
+ eprintclass,
+ eprinttype,
+ eventdate,
+ eventtitle,
+ eventtitleaddon,
+ file,
+ foreword,
+ holder,
+ howpublished,
+ indextitle,
+ institution,
+ introduction,
+ isan,
+ isbn,
+ ismn,
+ isrn,
+ issn,
+ issue,
+ issuesubtitle,
+ issuetitle,
+ iswc,
+ journalsubtitle,
+ journaltitle,
+ label,
+ language,
+ library,
+ location,
+ mainsubtitle,
+ maintitle,
+ maintitleaddon,
+ month,
+ nameaddon,
+ note,
+ number,
+ organization,
+ origdate,
+ origlanguage,
+ origlocation,
+ origpublisher,
+ origtitle,
+ pages,
+ pagetotal,
+ pagination,
+ part,
+ publisher,
+ pubstate,
+ reprinttitle,
+ series,
+ shortauthor,
+ shorteditor,
+ shorthand,
+ shorthandintro,
+ shortjournal,
+ shortseries,
+ shorttitle,
+ subtitle,
+ title,
+ titleaddon,
+ translator,
+ type,
+ url,
+ urldate,
+ venue,
+ version,
+ volume,
+ volumes,
+ year,
+ % special fields:
+ crossref,
+ entryset,
+ execute,
+ gender,
+ hyphenation,
+ ids,
+ indexsorttitle,
+ keywords,
+ options,
+ presort,
+ related,
+ relatedoptions,
+ relatedtype,
+ relatedstring,
+ sortkey,
+ sortname,
+ sortshorthand,
+ sorttitle,
+ sortyear,
+ xdata,
+ xref,
+ % custom fields:
+ namea,nameb,namec,
+ nameatype,namebtype,namectype,
+ lista,listb,listc,listd,liste,listf,
+ usera,userb,userc,userd,usere,userf,
+ verba,verbb,verbc,
+ % field aliases:
+ address,
+ annote,
+ archiveprefix,
+ journal,
+ key,
+ pdf,
+ primaryclass,
+ school,
+ % cnltx fields:
+ maintainer
+ } ,
+ morestring = [b]{"} ,
+ morecomment = [l]{\%} ,
+ sensitive = false
+}
+
+\lstdefinelanguage{makeindex}{
+ morekeywords = {
+ actual, % @
+ arg_open, % {
+ arg_close, % }
+ encap, % |
+ escape, % \\
+ keyword, % \\indexentry
+ level, % !
+ page_compositor, % -
+ quote, % "
+ range_open, % (
+ range_close, % )
+ preamble, % \\begin{theindex} \n
+ postamble, % \n\n \end{theindex} \n
+ setpage_prefix, % \n \\setcounter{page}{
+ setpage_suffix, % } \n
+ group_skip, % \n\n \\indexspace \n
+ headings_flag, % 0
+ heading_prefix, %
+ heading_suffix, %
+ symhead_positive, % Symbols
+ symhead_negative, % symbols
+ numhead_positive, % Numbers
+ numhead_negative, % numbers
+ item_0, % \n \\item
+ item_1, % \n \\subitem
+ item_2, % \n \\subsubitem
+ item_01, % \n \\subitem
+ item_x1, % \n \\subitem
+ item_12, % \n \\subsubitem
+ item_x2, % \n \\subsubitem
+ delim_0, % ,
+ delim_1, % ,
+ delim_2, % ,
+ delim_n, % ,
+ delim_r, % --
+ delim_t, %
+ suffix_2p, %
+ suffix_3p, %
+ suffix_mp, %
+ encap_prefix, % \\
+ encap_infix, % {
+ encap-suffix, % }
+ line_max, % 72
+ indent_space, % \t\t
+ indent_length % 16
+ } ,
+ morestring = [b]{"} ,
+ morecomment = [l]{\%} ,
+ sensitive = true
+}
+
+% --------------------------------------------------------------------------
+% command names `moretexcs' that are used as not-indexed texcs for the
+% listings style `cnltx':
+\def\cnltx@predefined@control@sequences{%
+ % symbols:
+ -,@,
+ % csnames beginning with @:
+ @alph,@Alph,@arabic,
+ @car,@cdr,@ctrerr,
+ @empty,
+ @firstofone,@firstoftwo,
+ @gobble,
+ @ifclassloaded,
+ @ifnextchar,
+ @ifpackageloaded,
+ @ifstar,
+ @makefnmark,
+ @nil,
+ @roman,@Roman,
+ @secondoftwo,
+ @slowromancap,
+ @textsuperscript,
+ @thefnmark,
+ % A:
+ a,AA,aa,
+ above,
+ abovedisplayshortskip,
+ abovedisplayskip,
+ abovewithdelims,
+ accent,
+ active,
+ acute,
+ addbibresource,
+ addcontentsline,
+ addpenalty,
+ addtocontents,
+ addtocounter,
+ addtolength,
+ addtokomafont,
+ addtoversion,
+ addvspace,
+ adjdemerits,
+ advance,
+ advancepageno,
+ ae,AE,
+ afterassignment,
+ AfterEndPreamble,
+ AfterEndDocument,
+ AfterEndEnvironment,
+ aftergroup,
+ AfterPreamble,
+ aleph,
+ allocationnumber,
+ allowbreak,
+ alph,Alph,
+ alpha,
+ amalg,
+ and,
+ angle,
+ approx,
+ appto,
+ apptocmd,
+ arabic,
+ arccos,
+ arcsin,
+ arctan,
+ arg,
+ arraycolsep,
+ arrayrulewidth,
+ arraystretch,
+ arrowvert,
+ Arrowvert,
+ ast,
+ asymp,
+ AtBeginDocument,
+ AtBeginDvi,
+ AtBeginEnvironment,
+ AtEndDocument,
+ AtEndEnvironment,
+ AtEndOfClass,
+ AtEndOfPackage,
+ AtEndPreamble,
+ atop,
+ atopwithdelims,
+ author,
+ author,
+ autodot,
+ % B
+ b,
+ backslash,
+ badness,
+ bar,
+ baselineskip,
+ baselinestretch,
+ batchmode,
+ BeforeBeginEnvironment,
+ begingroup,
+ beginsection,
+ belowdisplayshortskip,
+ belowdisplayskip,
+ beta,
+ bezier,
+ bf,
+ bffam,
+ bfseries,
+ bgroup,
+ bibcite,
+ bibdata,
+ bibitem,
+ bibliography,
+ bibliographystyle,
+ bibstyle,
+ big,
+ Big,
+ bigbreak,
+ bigcap,
+ bigcirc,
+ bigcup,
+ bigg,
+ Bigg,
+ biggl,
+ Biggl,
+ biggm,
+ Biggm,
+ biggr,
+ Biggr,
+ bigl,
+ Bigl,
+ bigm,
+ Bigm,
+ bigodot,
+ bigoplus,
+ bigotimes,
+ bigr,
+ Bigr,
+ bigskip,
+ bigskipamount,
+ bigsqcup,
+ bigtriangledown,
+ bigtriangleup,
+ biguplus,
+ bigvee,
+ bigwedge,
+ binoppenalty,
+ bmod,
+ boldmath,
+ boolfalse,booltrue,
+ bordermatrix,
+ bot,
+ botfigrule,
+ botmark,
+ bottomfraction,
+ bowtie,
+ Box,
+ box,
+ boxmaxdepth,
+ brace,
+ braceld,
+ bracelu,
+ bracerd,
+ braceru,
+ bracevert,
+ brack,
+ break,
+ breve,
+ brokenpenalty,
+ buildrel,
+ bullet,
+ bye,
+ % C
+ c,
+ cal,
+ cap,
+ caption,
+ cases,
+ catcode,
+ cb,
+ cdot,
+ cdotp,
+ cdots,
+ centering,
+ centerline,
+ chapter,
+ char,
+ chardef,
+ check,
+ CheckCommand,
+ chi,
+ choose,
+ circ,
+ circle,
+ citation,
+ cite,
+ ClassError,
+ ClassInfo,
+ ClassWarning,
+ ClassWarningNoLine,
+ cleaders,
+ cleardoublepage,
+ clearpage,
+ cleartabs,
+ cline,
+ closein,
+ closeout,
+ clubpenalty,
+ clubsuit,
+ colon,
+ color,
+ columns,
+ columnsep,
+ columnseprule,
+ columnwidth,
+ cong,
+ contentsline,
+ coprod,
+ copy,
+ copyright,
+ cos,
+ cosh,
+ cot,
+ coth,
+ count,
+ countdef,
+ cr,
+ crcr,
+ cref,
+ csappto,cseappto,csgappto,csxappto,
+ csc,
+ csdef,csedef,csgdef,csxdef,
+ csdimdef,csdimgdef,
+ csexpandonce,
+ csgluedef,csgluegdef,
+ cslet,csletcs,
+ csmudef,csmugdef,
+ csname,
+ csnumdef,csnumgdef,
+ cspreto,csepreto,csgpreto,csxpreto,
+ csshow,
+ csundef,
+ csuse,
+ cup,
+ CurrentOption,
+ % D
+ d,
+ dag,
+ dagger,
+ dashbox,
+ dashv,
+ date,
+ day,
+ dblfigrule,
+ dblfloatpagefraction,
+ dblfloatsep,
+ dbltextfloatsep,
+ dbltopfraction,
+ ddag,
+ ddagger,
+ ddot,
+ ddots,
+ deadcycles,
+ DeclareCharacterInheritance,
+ DeclareDictTranslation,
+ DeclareErrorFont,
+ DeclareFixedFont,
+ DeclareFontEncoding,
+ DeclareFontEncodingDefaults,
+ DeclareFontFamily,
+ DeclareFontShape,
+ DeclareFontSubstitution,
+ DeclareLanguage,
+ DeclareLanguageAlias,
+ DeclareLanguageDialect,
+ DeclareListParser,
+ DeclareMathAccent,
+ DeclareMathAlphabet,
+ DeclareMathAlphabet,
+ DeclareMathDelimiter,
+ DeclareMathRadical,
+ DeclareMathSizes,
+ DeclareMathSymbol,
+ DeclareMathVersion,
+ DeclareMicrotypeAlias,
+ DeclareMicrotypeBabelHook,
+ DeclareMicrotypeSet,
+ DeclareMicrotypeSetDefault,
+ DeclareMicrotypeVariants,
+ DeclareOldFontCommand,
+ DeclareOption,
+ DeclarePreloadSizes,
+ DeclareRobustCommand,
+ DeclareSizeFunction,
+ DeclareSymbolFont,
+ DeclareSymbolFontAlphabet,
+ DeclareTextAccent,
+ DeclareTextAccentDefault,
+ DeclareTextCommand,
+ DeclareTextCommandDefault,
+ DeclareTextComposite,
+ DeclareTextCompositeCommand,
+ DeclareTextFontCommand,
+ DeclareTextSymbol,
+ DeclareTextSymbolDefault,
+ DeclareTranslation,
+ DeclareTranslationFallback,
+ def,
+ defaulthyphenchar,
+ defaultscriptratio,
+ defaultscriptscriptratio,
+ defaultskewchar,
+ defcounter,
+ deffootnote,deffootnotemark,
+ definecolor,
+ deflength,
+ deg,
+ delcode,
+ delimiter,
+ delimiterfactor,
+ delimitershortfall,
+ delta,
+ Delta,
+ depth,
+ descriptionlabel,
+ det,
+ dh,DH,
+ Diamond,
+ diamond,
+ diamondsuit,
+ dim,
+ dimdef,dimgdef,
+ dimen,
+ dimendef,
+ dimexpr,
+ DisableLigatures,
+ discretionary,
+ displayindent,
+ displaylimits,
+ displaylines,
+ displaystyle,
+ displaywidowpenalty,
+ displaywidth,
+ div,
+ divide,
+ dj,DJ,
+ do,
+ documentclass,
+ documentstyle,
+ dospecials,
+ dosupereject,
+ dot,
+ doteq,
+ dotfill,
+ dots,
+ doublehyphendemerits,
+ doublerulesep,
+ downarrow,
+ Downarrow,
+ downbracefill,
+ dp,
+ % E
+ eappto,
+ edef,
+ egroup,
+ eject,
+ ell,
+ else,
+ em,
+ emergencystretch,
+ emph,
+ empty,
+ emptyset,
+ endcsname,
+ endgraf,
+ endgroup,
+ endinput,
+ endinsert,
+ enditemize,
+ endline,
+ endlinechar,
+ endlist,
+ endlrbox,
+ endmath,
+ endminipage,
+ endnote,
+ endpicture,
+ endsloppypar,
+ endtabbing,
+ endtabular,
+ endtrivlist,
+ endverbatim,
+ enlargethispage,
+ enskip,
+ enspace,
+ ensuremath,
+ epreto,
+ epsilon,
+ eqalign,
+ eqalignno,
+ eqno,
+ equiv,
+ errhelp,
+ errmessage,
+ errorcontextlines,
+ errorstopmode,
+ escapechar,
+ eta,
+ evensidemargin,
+ everycr,
+ everydisplay,
+ everyhbox,
+ everyjob,
+ everymath,
+ everypar,
+ everyvbox,
+ ExecuteOptions,
+ exhyphenpenalty,
+ exists,
+ exp,
+ expandafter,
+ expandonce,
+ extracolsep,
+ % F
+ fam,
+ fbox,
+ fboxrule,
+ fboxsep,
+ fi,
+ filbreak,
+ filecontents,
+ fill,
+ finalhypendemerits,
+ firstmark,
+ fiverm,
+ fivebf,
+ fivei,
+ fivesy,
+ flat,
+ floatingpenalty,
+ floatpagefraction,
+ floatsep,
+ flushbottom,
+ fmtname,
+ fmtversion,
+ fnsymbol,
+ folio,
+ font,
+ fontdimen,
+ fontencoding,
+ fontfamily,
+ fontname,
+ fontseries,
+ fontshape,
+ fontsize,
+ fontspec,
+ fontsubfuzz,
+ footins,
+ footline,
+ footnote,
+ footnotemark,
+ footnoterule,
+ footnotesep,
+ footnotesize,
+ footnotetext,
+ footskip,
+ forall,
+ forlistloop,
+ foreignlanguage,
+ frac,
+ frame,
+ framebox,
+ frenchspacing,
+ frown,
+ fussy,
+ futurelet,
+ % G
+ gamma,
+ Gamma,
+ gappto,
+ gcd,
+ ge,
+ GenericError,
+ GenericInfo,
+ GenericWarning,
+ geq,
+ gets,
+ GetTranslation,
+ GetTranslationFor,
+ gdef,
+ gg,
+ global,
+ globaldefs,
+ glossary,
+ gluedef,gluegdef,
+ goodbreak,
+ gpreto,
+ grave,
+ % H
+ H,
+ halign,
+ hang,
+ hangafter,
+ hangindent,
+ hat,
+ hbadness,
+ hbar,
+ hbox,
+ headheight,
+ headline,
+ headsep,
+ heartsuit,
+ height,
+ hfil,
+ hfill,
+ hfilneg,
+ hfuzz,
+ hglue,
+ hideskip,
+ hidewidth,
+ hline,
+ hoffset,
+ holdinginserts,
+ hom,
+ hookleftarrow,
+ hookrightarrow,
+ hphantom,
+ hrule,
+ hrulefill,
+ hsize,
+ hskip,
+ hskip,
+ hspace,
+ hss,
+ ht,
+ huge,
+ Huge,
+ hypersetup,
+ hyphenation,
+ hyphenchar,
+ hyphenpenalty,
+ % I
+ i,I,
+ ialign,
+ if,
+ ifblank,
+ ifbool,ifboolexpe,ifboolexpr,
+ ifcase,
+ ifcat,
+ ifcsdef,
+ ifcsname,
+ ifdim,
+ ifdef,
+ ifeof,
+ iff,
+ iffalse,
+ IfFileExists,
+ ifhbox,
+ ifhmode,
+ ifinlist,
+ ifinner,
+ ifmmode,
+ ifnum,
+ ifodd,
+ ifpatchable,
+ ifstr,
+ ifstrempty,
+ ifstrequal,
+ iftoggle,
+ iftrue,
+ ifvbox,
+ ifvmode,
+ ifvoid,
+ ifx,
+ ignorespaces,
+ ignorespacesafterend,
+ Im,
+ imath,
+ immediate,
+ in,
+ include,
+ includeonly,
+ indent,
+ inf,
+ infty,
+ indent,
+ index,
+ input,
+ InputIfFileExists,
+ inputlineno,
+ insert,
+ insertpenalties,
+ int,
+ interdisplaylinepenalty,
+ interfootnotelinepenalty,
+ interlinepenalty,
+ intextsep,
+ intop,
+ iota,
+ it,
+ item,
+ itemindent,
+ itemitem,
+ itemize,
+ itemsep,
+ iterate,
+ itfam,
+ itshape,
+ % J
+ j,
+ jmath,
+ jobname,
+ Join,
+ joinrel,
+ jot,
+ % K
+ k,
+ kappa,
+ ker,
+ kern,
+ kill,
+ KOMAoption,
+ KOMAoptions,
+ % L
+ l,L,
+ label,
+ labelsep,
+ labelwidth,
+ labelenumi,
+ labelenumii,
+ labelenumiii,
+ labelenumiv,
+ labelitemi,
+ labelitemii,
+ labelitemiii,
+ labelitemiv,
+ lambda,
+ Lambda,
+ land,
+ langle,
+ language,
+ large,
+ Large,
+ LARGE,
+ lastbox,
+ lastkern,
+ lastpenalty,
+ lastskip,
+ LaTeX,
+ LaTeXe,
+ lbrace,
+ lbrack,
+ lccode,
+ lceil,
+ ldotp,
+ ldots,
+ le,
+ leaders,
+ leadsto,
+ leavevmode,
+ left,
+ leftarrow,
+ Leftarrow,
+ leftarrowfill,
+ lefteqn,
+ leftharpoondown,
+ leftharpoonup,
+ lefthyphenmin,
+ leftline,
+ leftmargin,
+ leftmargini,
+ leftmarginii,
+ leftmarginiii,
+ leftmarginiv,
+ leftmarginv,
+ leftmarginvi,
+ leftmark,
+ leftskip,
+ leftrightarrow,
+ Leftrightarrow,
+ leq,
+ leqalignno,
+ leqno,
+ let,letcs,
+ lfloor,
+ limits,
+ linepenalty,
+ lineskip,
+ lineskiplimits,
+ lg,
+ lgroup,
+ lhd,
+ lhook,
+ lim,
+ liminf,
+ limsup,
+ line,
+ linebreak,
+ linespread,
+ linethickness,
+ linewidth,
+ list,
+ listadd,
+ listfiles,
+ listfiles,
+ listparindent,
+ ll,
+ llap,
+ lmoustache,
+ ln,
+ lnot,
+ LoadClassWithOptions,
+ LoadClass,
+ LoadDictionary,
+ LoadDictionaryFor,
+ LoadMicrotypeFile,
+ log,
+ long,
+ longleftarrow,
+ Longleftarrow,
+ longleftrightarrow,
+ Longleftrightarrow,
+ longmapsto,
+ longrightarrow,
+ loop,
+ looseness,
+ lor,
+ lower,
+ lowercase,
+ lq,
+ lslig,
+ lsstyle,
+ lstinline,
+ lstinputlisting,
+ lrbox,
+ ltx@ifnextchar,
+ LuaLaTeX,LuaTeX,
+ % M
+ mag,
+ magnification,
+ magstep,
+ magstephalf,
+ makeatletter,
+ makeatother,
+ makebox,
+ makefootline,
+ makeglossary,
+ makeheadline,
+ makeindex,
+ makelabel,
+ MakeLowercase,
+ maketitle,
+ MakeUppercase,
+ mapsto,
+ mapstochar,
+ marginpar,
+ marginparpush,
+ marginparsep,
+ marginparwidth,
+ mark,
+ markboth,
+ markright,
+ math,
+ mathaccent,
+ mathbf,
+ mathbin,
+ mathchar,
+ mathchardef,
+ mathchoice,
+ mathclose,
+ mathcode,
+ mathellipsis,
+ mathgroup,
+ mathhexbox,
+ mathinner,
+ mathit,
+ mathop,
+ mathopen,
+ mathord,
+ mathpalette,
+ mathparagraph,
+ mathpunct,
+ mathrel,
+ mathrm,
+ mathsection,
+ mathsf,
+ mathsterling,
+ mathstrut,
+ mathsurround,
+ mathtt,
+ mathunderscore,
+ mathversion,
+ matrix,
+ max,
+ maxdeadcycles,
+ maxdepth,
+ maxdimen,
+ mbox,
+ mdseries,
+ meaning,
+ medbreak,
+ medmuskip,
+ medskip,
+ medskipamount,
+ message,
+ MessageBreak,
+ mho,
+ microtypecontext,
+ microtypesetup,
+ mid,
+ midinsert,
+ min,
+ minipage,
+ mit,
+ mkern,
+ models,
+ month,
+ moveleft,
+ moveright,
+ mp,
+ mscount,
+ mskip,
+ mu,
+ mudef,mugdef,
+ multicolumn,
+ multiply,
+ multiput,
+ multispan,
+ muskip,
+ muskipdef,
+ % N
+ nabla,
+ narrower,
+ natural,
+ ne,
+ nearrow,
+ NeedsTeXFormat,
+ neg,
+ negthinspace,
+ neq,
+ newbox,
+ newbool,
+ newcommand,
+ newcount,
+ newcounter,
+ newdimen,
+ newenvironment,
+ newfam,
+ newfont,
+ newfontfamily,
+ newhelp,
+ newif,
+ newinsert,
+ newlabel,
+ newlanguage,
+ newlength,
+ newline,
+ newlinechar,
+ newmathalphabet,
+ newmuskip,
+ newpage,
+ newread,
+ newrobustcmd,
+ newsavebox,
+ newskip,
+ newtheorem,
+ newtoggle,
+ newtoks,
+ NewTranslation,
+ newwrite,
+ next,
+ ng,NG,
+ ni,
+ noalign,
+ noboundary,
+ nobreak,
+ nobreakspace,
+ nocite,
+ nocorr,
+ nocorrlist,
+ node,
+ noexpand,
+ nofiles,
+ noindent,
+ nointerlineskip,
+ nolimits,
+ nolinebreak,
+ nonfrenchspacing,
+ nonscript,
+ nonstopmode,
+ nonumber,
+ nopagebreak,
+ nopagenumbers,
+ normalbaselines,
+ normalbaselineskip,
+ normalbottom,
+ normalcolor,
+ normalfont,
+ normalmarginpar,
+ normallineskip,
+ normallineskiplimit,
+ normalsize,
+ notblank,
+ notbool,
+ nottoggle,
+ nopagebreak,
+ not,
+ notin,
+ nu,
+ null,
+ nulldelimiterspace,
+ nullfont,
+ number,
+ numberline,
+ numdef,numgdef,
+ numexpr,
+ nwarrow,
+ % O
+ o,O,
+ oalign,
+ obeycr,
+ obeylines,
+ obeyspaces,
+ oddsidemargin,
+ odot,
+ oe,OE,
+ of,
+ offinterlineskip,
+ oint,
+ ointop,
+ oldstyle,
+ oldstylenums,
+ omega,
+ Omega,
+ ominus,
+ omit,
+ onecolumn,
+ ooalign,
+ openin,
+ openout,
+ openup,
+ oplus,
+ OptionNotUsed,
+ or,
+ oslash,
+ otimes,
+ othersectionlevelsformat,
+ outer,
+ output,
+ outputpenalty,
+ oval,
+ over,
+ overbrace,
+ overfullrule,
+ overleftarrow,
+ overline,
+ overrightarrow,
+ overwithdelims,
+ owns,
+ % P
+ P,
+ PackageError,
+ PackageInfo,
+ PackageWarning,
+ PackageWarningNoLine,
+ pagebody,
+ pagebreak,
+ pagecontents,
+ pagedepth,
+ pagefilllstretch,
+ pagefillstretch,
+ pagefilstretch,
+ pagegoal,
+ pageinsert,
+ pageno,
+ pagenumbering,
+ pageref,
+ pageshrink,
+ pagestretch,
+ pagestyle,
+ pagetotal,
+ paperheight,
+ paperwidth,
+ par,
+ paragraph,
+ paragraphmark,
+ parallel,
+ parbox,
+ parfillskip,
+ parindent,
+ parsep,
+ parshape,
+ parskip,
+ part,
+ partformat,
+ partial,
+ partname,
+ partopsep,
+ PassOptionsToClass,PassOptionsToPackage,
+ patchcmd,
+ patterns,
+ pausing,
+ pdfLaTeX,
+ pdfstringdefDisableCommands,
+ pdfTeX,
+ penalty,
+ perp,
+ pgfkeys,
+ phantom,
+ phi,
+ Phi,
+ pi,
+ Pi,
+ picture,
+ plainoutput,
+ pm,
+ pmatrix,
+ pmod,
+ poptabs,
+ postdisplaypenalty,
+ pounds,
+ Pr,
+ prec,
+ preceq,
+ predisplaypenalty,
+ predisplaysize,
+ preloaded,
+ preto,
+ pretocmd,
+ pretolerance,
+ prevdepth,
+ prevgraf,
+ prime,
+ printacronyms,
+ printbibliography,
+ printendnotes,
+ printindex,
+ ProcessPgfOptions,
+ ProcessOptions,
+ proclaim,
+ prod,
+ propto,
+ protect,
+ protected,
+ protected@eappto,protected@xappto,
+ protected@edef,protected@xdef,
+ protected@epreto,protected@xpreto,
+ protected@cseappto,protected@csxappto,
+ protected@csedef,protected@csxdef,
+ protected@csepreto,protected@csxpreto,
+ protecting,
+ providebool,
+ providecommand,providerobustcmd,
+ ProvidesClass,
+ ProvideDictionaryFor,
+ ProvidesFile,
+ ProvidesPackage,
+ ProvideTextCommand,
+ providetoggle,
+ psi,
+ Psi,
+ pushtabs,
+ put,
+ % Q
+ qbezier,
+ qbeziermax,
+ qquad,
+ quad,
+ % R
+ r,
+ radical,
+ raggedbottom,
+ raggedleft,
+ RaggedLeft,
+ raggedright,
+ RaggedRight,
+ raise,
+ raisebox,
+ rangle,
+ rbrace,
+ rbrack,
+ rceil,
+ Re,
+ read,
+ recalctypearea,
+ ref,
+ refstepcounter,
+ relax,
+ relbar,
+ Relbar,
+ relpenalty,
+ removelastskip,
+ renewcommand,
+ renewenvironment,
+ renewrobustcmd,
+ RenewTranslation,
+ repeat,
+ RequirePackage,
+ RequirePackageWithOptions,
+ restorecr,
+ reversemarginpar,
+ rfloor,
+ rgroup,
+ rhd,
+ rho,
+ rhook,
+ right,
+ rightarrow,
+ Rightarrow,
+ rightarrowfill,
+ rightharpoondown,
+ rightharpoonup,
+ righthyphenmin,
+ rightleftharpoons,
+ rightline,
+ rightmargin,
+ rightmark,
+ rightskip,
+ rlap,
+ rm,
+ rmfamily,
+ rmoustache,
+ robustify,
+ roman,
+ Roman,
+ romannumeral,
+ root,
+ rootbox,
+ rq,
+ rule,
+ % S
+ S,
+ samepage,
+ SaveTranslation,
+ SaveTranslationFor,
+ sb,
+ sbox,
+ scriptfont,
+ scriptscriptfont,
+ scriptscriptstyle,
+ scriptsize,
+ scriptspace,
+ scriptstyle,
+ scrollmode,
+ scshape,
+ searrow,
+ sec,
+ secdef,
+ section,
+ sectionmark,
+ selectfont,
+ selectlanguage,
+ setbool,
+ setbox,
+ setcapindent,
+ setcounter,
+ SetExpansion,
+ SetExtraKerning,
+ SetExtraSpacing,
+ setfnpct,
+ setkomafont,
+ setlanguage,
+ setlength,
+ setmainfont,
+ setmainlanguage,
+ SetMathAlphabet,
+ setminus,
+ setmonofont,
+ setotherlanguage,
+ setotherlanguages,
+ SetProtrusion,
+ setsansfont,
+ SetSymbolFont,
+ settabs,
+ settodepth,
+ settoggle,
+ settoheight,
+ settowidth,
+ SetTracking,
+ sevenbf,
+ seveni,
+ sevensy,
+ sevenrm,
+ sfcode,
+ sffamily,
+ sharp,
+ shipout,
+ shorthandoff,
+ shorthandon,
+ shortstack,
+ show,
+ showbox,
+ showboxbreadth,
+ showboxdepth,
+ showhyphens,
+ showlists,
+ showoutput,
+ showoverfull,
+ showthe,
+ sidenote,
+ sigma,
+ Sigma,
+ sim,
+ simeq,
+ sin,
+ sinh,
+ skew,
+ skewchar,
+ skip,
+ skipdef,
+ sl,
+ slash,
+ slfam,
+ sloppy,
+ sloppypar,
+ slshape,
+ small,
+ smallbreak,
+ smallint,
+ smallskip,
+ smallskipamount,
+ smash,
+ smile,
+ sp,
+ space,
+ spacefactor,
+ spaceskip,
+ spadesuit,
+ span,
+ special,
+ splitbotmark,
+ splitfirstmark,
+ splitmaxdepth,
+ splittopskip,
+ sqcap,
+ sqcup,
+ sqrt,
+ sqsubset,
+ sqsubseteq,
+ sqsupset,
+ sqsupseteq,
+ ss,
+ SS,
+ stackrel,
+ star,
+ stepcounter,
+ stop,
+ stretch,
+ string,
+ strut,
+ strutbox,
+ subparagraph,
+ subparagraphmark,
+ subsection,
+ subsectionmark,
+ subset,
+ subseteq,
+ subsubsection,
+ subsubsectionmark,
+ succ,
+ succeq,
+ sum,
+ sup,
+ supereject,
+ suppressfloats,
+ supset,
+ supseteq,
+ surd,
+ swarrow,
+ symbol,
+ % T
+ t,
+ tabalign,
+ tabbing,
+ tabbingsep,
+ tabcolsep,
+ tableofcontents,
+ tabskip,
+ tabular,
+ tabularnewline,
+ tabs,
+ tabsdone,
+ tabsyet,
+ tan,
+ tanh,
+ tau,
+ tenbf,
+ tenex,
+ teni,
+ tenit,
+ tenrm,
+ tensl,
+ tensy,
+ tentt,
+ TeX,
+ test,
+ textasciicircum,
+ textasciitilde,
+ textasteriskcentered,
+ textbackslash,
+ textbar,
+ textbf,
+ textbraceleft,
+ textbraceright,
+ textbullet,
+ textcircled,
+ textcompwordmark,
+ textcolor,
+ textdagger,
+ textdaggerdbl,
+ textdollar,
+ textellipsis,
+ textemdash,
+ textemdash,
+ textenglish,
+ textexclamdown,
+ textexclamdown,
+ textfloatsep,
+ textfont,
+ textfraction,
+ textgreater,
+ textindent,
+ textit,
+ textheight,
+ textless,
+ textls,
+ textmicrotypecontext,
+ textmd,
+ textnormal,
+ textogonekcentered,
+ textparagraph,
+ textperiodcentered,
+ textquestiondown,
+ textquotedbl,
+ textquotedblleft,
+ textquotedblright,
+ textquoteleft,
+ textquoteright,
+ textregistered,
+ textrm,
+ textsc,
+ textsection,
+ textsf,
+ textsl,
+ textsterling,
+ textstyle,
+ textsuperscript,
+ textsection,
+ textsubscript,
+ textsuperscript,
+ textsterling,
+ TextSymbolUnavailable,
+ texttt,
+ texttrademark,
+ textunderscore,
+ textup,
+ textvisiblespace,
+ textwidth,
+ th,TH,
+ thanks,
+ the,
+ theendnotes,
+ theenumi,theenumii,theenumiii,theenumiv,
+ thefootnote,
+ thefootnotemark,
+ thempfn,
+ thempfn,
+ thempfootnote,
+ thepage,
+ thepart,
+ theta,
+ Theta,
+ thicklines,
+ thickmuskip,
+ thinlines,
+ thinmuskip,
+ thinspace,
+ thispagestyle,
+ tikz,
+ tilde,
+ time,
+ times,
+ tiny,
+ title,
+ to,
+ today
+ togglefalse,toggletrue,
+ toks,
+ toksdef,
+ tolerance,,
+ top,
+ topfigrule,
+ topfraction,
+ topglue,
+ topins,
+ topinsert,
+ topmargin,
+ topmark,
+ topsep,
+ topskip,
+ totalheight,
+ tracingall,
+ tracingcommands,
+ tracingfonts,
+ tracinglostchars,
+ tracingmacros,
+ tracingonline,
+ tracingoutput,
+ tracingpages,
+ tracingparagraphs,
+ tracingpatches,
+ tracingrestores,
+ tracingstats,
+ triangle,
+ triangleleft,
+ triangleright,
+ trivlist,
+ tt,
+ ttfam,
+ ttfamily,
+ ttraggedright,
+ two@digits,
+ twocolumn,
+ typein,
+ typeout,
+ % U
+ u,
+ uccode,
+ uchyph,
+ unboldmath,
+ undef,
+ underbar,
+ underbrace,
+ underline,
+ unhbox,
+ unhcopy,
+ unitlength,
+ unkern,
+ unlhd,
+ unpenalty,
+ unrhd,
+ unskip,
+ unvbox,
+ unvcopy,
+ uparrow,
+ Uparrow,
+ upbracefill,
+ updownarrow,
+ Updownarrow,
+ uplus,
+ uppercase,
+ upsilon,
+ Upsilon,
+ upshape,
+ usebox,
+ usecounter,
+ usefont,
+ UseMicrotypeSet,
+ usepackage,
+ UseTextAccent,UseTextSymbol,
+ upshape,
+ % V
+ v,
+ vadjust,
+ valign,
+ value,
+ varepsilon,
+ varphi,
+ varpi,
+ varrho,
+ varsigma,
+ vartheta,
+ vbadness,
+ vbox,
+ vcenter,
+ vdash,
+ vdots,
+ vec,
+ vector,
+ vee,
+ verb,
+ verbatim,
+ vert,
+ Vert,
+ vfil,
+ vfill,
+ vfilneg,
+ vfootnote,
+ vfuzz,
+ vglue,
+ vline,
+ voffset,
+ vphantom,
+ vrule,
+ vsize,
+ vskip,
+ vspace,
+ vsplit,
+ vss,
+ vtop,
+ % W
+ wd,
+ wedge,
+ widehat,
+ widetilde,
+ widowpenalty,
+ width,
+ wlog,
+ wp,
+ wr,
+ write,
+ % X
+ xappto,
+ xdef,
+ xdefinecolor,
+ XeLaTeX,
+ XeTeX,
+ xi,
+ Xi,
+ xleaders,
+ xpreto,
+ xspaceskip,
+ % Y
+ year,
+ % Z
+ zeta
+}
+
+% --------------------------------------------------------------------------
+% command names `morekeywords' that are used as not-indexed texcs for the
+% listings style `cnltx':
+\def\cnltx@predefined@environments{%
+ array,
+ center,
+ description,
+ displaymath,
+ document,
+ enumerate,
+ eqnarray,
+ equation,
+ figure,
+ flushleft,
+ flushright,
+ itemize,
+ labeling,
+ list,
+ longtable,
+ lrbox,
+ math,
+ minipage,
+ otherlanguage,
+ picture,
+ quote,quoting,
+ sloppypar,
+ tabbing,
+ table,
+ tabu,
+ tabular,
+ tabularx,
+ tabulary,
+ trivlist,
+ verbatim
+}
+
+% --------------------------------------------------------------------------
+% helper commands that print the list of additionally defined keywords and
+% texcs:
+\def\cnltx@print@list@sep{, }
+
+\pgfkeys{
+ cnltx/.cd,
+ list-sep/.code = \def\cnltx@print@list@sep{#1}
+}
+
+\newrobustcmd*\cnltx@write@list@entry[2]{%
+ #1*{#2}\def\cnltx@write@list@entry##1##2{\cnltx@print@list@sep ##1*{##2}}%
+}
+
+\newrobustcmd*\cnltx@write@list[2]{%
+ \cnltx@fullexpand@twoargs
+ \forcsvlist
+ {\noexpand\cnltx@write@list@entry\noexpand#2}
+ {\expandonce#1}%
+}
+
+\newrobustcmd*\listsilentcmds{%
+ \begingroup
+ \cnltx@write@list\cnltx@predefined@control@sequences\cs
+ \endgroup
+}
+\newrobustcmd*\listsilentenvs{%
+ \begingroup
+ \cnltx@write@list\cnltx@predefined@environments\env
+ \endgroup
+}
+
+
+% --------------------------------------------------------------------------
+% read bibfiles and get name and type of entries:
+\RequirePackage{catchfile}
+\DeclareListParser*{\cnltx@parse@bibfile}{@}
+
+\def\cnltx@bibfile@entries{}
+
+\long\def\cnltx@get@bibfile@entry#1{\ifblank{#1}{}{\cnltx@parse@bibfile@entry#1}}
+
+\long\def\cnltx@parse@bibfile@entry#1#{%
+ \cnltx@parse@bibfile@entry@aux{#1}%
+}
+
+\def\cnltx@parse@bibfile@entry@aux#1#2{%
+ \ifblank{#2}{}{%
+ \cnltx@parse@bibfile@entry@aux@i{#1}#2\q@stop
+ }%
+}
+\long\def\cnltx@parse@bibfile@entry@aux@i#1#2,#3\q@stop{%
+ \cnltx@ifinlist{{#1}{#2}}\cnltx@bibfile@entries{}
+ {\listadd\cnltx@bibfile@entries{{#1}{#2}}}%
+}
+
+\def\cnltx@read@bibfile@entry#1#2#3{#1#2#3}
+
+\def\cnltx@bibentry@key#1#2#3{%
+ #1{#3}\def\cnltx@bibentry@key##1##2##3{\cnltx@print@list@sep##1{##3}}}
+
+\def\cnltx@bibentry@type#1#2#3{%
+ #1{@#2}\def\cnltx@bibentry@type##1##2##3{\cnltx@print@list@sep##1{@##2}}}
+
+\def\cnltx@bibentry#1#2#3{%
+ #1{#3} (#1{@#2})%
+ \def\cnltx@bibentry##1##2##3{\cnltx@print@list@sep##1{##3} (##1{@##2})}%
+}
+
+% #1: cs with three args: first formats, second is the type of the entry, the
+% third is the name
+% #2: cs with one arg that formats whatever #1 prints, passed to #1
+% #3: filename
+\def\cnltx@read@bibfile#1#2#3{%
+ \def\cnltx@bibfile@entries{}%
+ \CatchFileDef\cnltx@tmpa{#3}{}%
+ \expandafter\cnltx@parse@bibfile
+ \expandafter\cnltx@get@bibfile@entry
+ \expandafter{\cnltx@tmpa}%
+ \forlistloop{\cnltx@read@bibfile@entry#1#2}\cnltx@bibfile@entries
+}
+
+\newrobustcmd*\listbibfilekeys[1]{%
+ \begingroup
+ \makeatletter
+ \cnltx@read@bibfile\cnltx@bibentry@key\code{#1}%
+ \endgroup
+}
+
+\newrobustcmd*\listbibfiletypes[1]{%
+ \begingroup
+ \makeatletter
+ \cnltx@read@bibfile\cnltx@bibentry@type\code{#1}%
+ \endgroup
+}
+
+\newrobustcmd*\listbibfileentries[1]{%
+ \begingroup
+ \makeatletter
+ \cnltx@read@bibfile\cnltx@bibentry\code{#1}%
+ \endgroup
+}
+
+\endinput
+
+% --------------------------------------------------------------------------
+HISTORY:
+
+2013/09/15 v0.4 - first published version
+2013/09/20 v0.5 - merged with `cnltx-csnames', added a number of command names
+2013/09/21 v0.6 - added loads of command names
+2013/09/30 v0.7 - added \listbibfilekeys, \listbibfiletypes and
+ \listbibfileentries
+ - added listings language `makeindex'
+2013/10/04 v0.7a - the \listbib... commands remove duplicate entries from the
+ list if they're equal both in entry type and cite key
+ - added drivers `@class' and `@bundle'
+2013/10/21 v0.8 - added missing comma in list of commands
+2013/10/21 v0.9 - added internal LaTeX commands and a number of `etoolbox'
+ macros
+2014/03/11 v0.11 - small bug fixes in \cnltx@predefined@control@sequences
+
diff --git a/macros/latex/contrib/cnltx/cnltx-names.sty b/macros/latex/contrib/cnltx/cnltx-names.sty
new file mode 100644
index 0000000000..d97c975c79
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-names.sty
@@ -0,0 +1,177 @@
+% a /very/ preliminary draft – don't use it
+\RequirePackage{cnltx-base}
+\ProvidesPackage{cnltx-names}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+% --------------------------------------------------------------------------
+\cnltx@create@bundle@message{names}{Error}
+\cnltx@create@bundle@message{names}{Warning}
+\cnltx@create@bundle@message{names}{WarningNoLine}
+\cnltx@create@bundle@message{names}{Info}
+
+% \newfirstformat\foo
+%
+% definiert
+% => \foo{bar} % als `benutzt' markieren, verwendet zuerst
+% % \foofirstformat , dann \fooformat
+% => \foo*{bar} % nicht als `benutzt' markieren, verwendet \fooformat
+% => \fooformat % kann später umdefiniert werden nach eigenem Geschmack
+% => \foofirstformat % kann später umdefiniert werden nach eigenem Geschmack
+% => \resetfoo % setzt alle \foo wieder (lokal) auf unbenutzt zurück
+\newrobustcmd*\newfirstformat[1]{%
+ \newrobustcmd*#1{%
+ \@ifstar
+ {\csuse{\cnltx@stripbs#1@star}}
+ {\csuse{\cnltx@stripbs#1@nostar}}%
+ }%
+ \cnltx@robust@cs{\cnltx@stripbs#1@nostar}[1]{%
+ \ifcsdef{\cnltx@stripbs#1@\detokenize{##1}}
+ {\csuse{\cnltx@stripbs#1format}{##1}}
+ {\csuse{\cnltx@stripbs#1firstformat}{##1}\csuse{define@\cnltx@stripbs#1}{##1}}%
+ }%
+ \cnltx@robust@cs{\cnltx@stripbs#1@star}[1]{\csuse{\cnltx@stripbs#1starformat}{##1}}%
+ \cnltx@new@cs{\cnltx@stripbs#1@used}{}%
+ \cnltx@robust@cs{define@\cnltx@stripbs#1}[1]{%
+ \csgdef{\cnltx@stripbs#1@\detokenize{##1}}{}%
+ \listcsgadd{\cnltx@stripbs#1@used}{##1}%
+ }%
+ \cnltx@robust@cs{undefine@\cnltx@stripbs#1}[1]{%
+ \csundef{\cnltx@stripbs#1@\detokenize{##1}}%
+ }%
+ \cnltx@robust@cs{reset\cnltx@stripbs#1}{%
+ \forlistcsloop{\csuse{undefine@\cnltx@stripbs#1}}{\cnltx@stripbs#1@used}%
+ \csdef{\cnltx@stripbs#1@used}{}%
+ }%
+ \cnltx@new@cs{\cnltx@stripbs#1firstformat}[1]{##1}%
+ \cnltx@new@cs{\cnltx@stripbs#1format}[1]{##1}%
+ \cnltx@new@cs{\cnltx@stripbs#1starformat}[1]{##1}%
+}
+
+% --------------------------------------------------------------------------
+
+\newcommand*\writename[1]{\cnltx@write@name#1 \q@stop}
+
+\newcommand*\cnltx@write@firstname[1]{#1}
+\newcommand*\cnltx@write@middlename[1]{\cnltx@initial{#1}}
+\newcommand*\cnltx@write@lastname[1]{\textsc{#1}}
+\newcommand*\cnltx@between@names{\,}
+
+\newcommand*\cnltx@initial[1]{\cnltx@initial@aux#1\q@stop}
+\def\cnltx@initial@aux#1#2\q@stop{#1.}
+
+\newcommand*\cnltx@name@idx[3]{%
+ \ifblank{#1}
+ {\index{#3@\cnltx@write@lastname{#3}}}
+ {\index{#3, #1@\cnltx@write@lastname{#3}, \cnltx@write@firstname{#1}}}%
+}
+
+% TODO: Index hinzufügen \newcommand*\cnltx@name@idx[2]{\index{#1@#2}}
+\newcommand*\cnltx@write@fullname[2]{%
+ \cnltx@write@firstname{#1}\cnltx@between@names
+ \cnltx@write@lastname{#2}%
+}
+
+\newcommand*\cnltx@write@fullmiddlename[3]{%
+ \cnltx@write@firstname{#1}\cnltx@between@names
+ \cnltx@write@middlename{#2}\cnltx@between@names
+ \cnltx@write@lastname{#3}%
+}
+\def\cnltx@write@fullmiddlename@aux#1#2#3 \q@stop{%
+ \cnltx@write@fullmiddlename{#1}{#2}{#3}%
+ \ifbool{cnltx@name@noidx}{}{%
+ \cnltx@name@idx{#1}{#2}{#3}%
+ }%
+}
+
+\def\cnltx@write@name#1 #2\q@stop{%
+ \ifblank{#2}
+ {%
+ \cnltx@write@lastname{#1}%
+ \ifbool{cnltx@name@noidx}{}
+ {\cnltx@name@idx{}{}{#1}}%
+ }
+ {\cnltx@write@completename{#1}#2\q@stop}%
+}
+% TODO: erweitern auf mehrere mittlere Namen:
+\def\cnltx@write@completename#1#2 #3\q@stop{%
+ \ifblank{#3}
+ {%
+ \cnltx@write@fullname{#1}{#2}%
+ \ifbool{cnltx@name@noidx}{}
+ {\cnltx@name@idx{#1}{}{#2}}%
+ }
+ {\cnltx@write@fullmiddlename@aux{#1}{#2}#3\q@stop}%
+}
+
+% name formats:
+\newrobustcmd*\defnameformat[4]{%
+ \cnltx@def@nameformat{#1}{#2}{#3}{#4}%
+}
+\newrobustcmd*\cnltx@def@nameformat[4]{%
+ \protected\csdef{cnltx@nameformat@#1}{%
+ \def\cnltx@write@firstname####1{#2}%
+ \def\cnltx@write@middlename####1{#3}%
+ \def\cnltx@write@lastname####1{#4}%
+ }%
+}
+
+\defnameformat{fullname}
+ {##1}
+ {##1}
+ {\textsc{##1}}
+\defnameformat{middledot}
+ {##1}
+ {\cnltx@initial{##1}}
+ {\textsc{##1}}
+\defnameformat{firstmiddledot}
+ {\cnltx@initial{##1}}
+ {\cnltx@initial{##1}}
+ {\textsc{##1}}
+\defnameformat{alldot}
+ {\cnltx@initial{##1}}
+ {\cnltx@initial{##1}}
+ {\cnltx@initial{##1}}
+\defnameformat{nomiddle}
+ {##1}
+ {\@gobble}
+ {\textsc{##1}}
+\defnameformat{nomiddledot}
+ {\cnltx@initial{##1}}
+ {\@gobble}
+ {\textsc{##1}}
+% \show\cnltx@nameformat@nomiddledot
+\defnameformat{onlylast}
+ {\@gobble}
+ {\@gobble}
+ {\textsc{##1}}
+
+% choose name format:
+\newrobustcmd*\writenameformat[1]{%
+ \csuse{cnltx@nameformat@#1}%
+}
+
+% --------------------------------------------------------------------------
+
+\newbool{cnltx@name@noidx}
+
+\newfirstformat\name
+\renewcommand*\namefirstformat[1]{\writename{#1}}
+\renewcommand*\nameformat[1]{{\writenameformat{nomiddle}\writename{#1}}}
+\renewcommand*\namestarformat[1]{%
+ \begingroup
+ \booltrue{cnltx@name@noidx}%
+ \namefirstformat{#1}%
+ \endgroup
+}
+
+\newrobustcmd*\cnltx@newname[2]{%
+ \newrobustcmd*#1{%
+ \@ifstar
+ {\name*{#2}}
+ {\name{#2}}%
+ }%
+}
+
+\newrobustcmd*\newname{\cnltx@newname}
+
+\endinput
+% --------------------------------------------------------------------------
diff --git a/macros/latex/contrib/cnltx/cnltx-tools.sty b/macros/latex/contrib/cnltx/cnltx-tools.sty
new file mode 100644
index 0000000000..3b53ee0ec4
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-tools.sty
@@ -0,0 +1,241 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesPackage{cnltx-tools}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+% --------------------------------------------------------------------------
+\cnltx@create@bundle@message{tools}{Error}
+\cnltx@create@bundle@message{tools}{Warning}
+\cnltx@create@bundle@message{tools}{WarningNoLine}
+\cnltx@create@bundle@message{tools}{Info}
+
+\cnltx@load@module{translations}
+
+% --------------------------------------------------------------------------
+% \newcommand*\cnltx@name@first[1]{#1}
+% \newcommand*\cnltx@name@last[1]{\textsc{#1}}
+% \newcommand*\cnltx@name@base[1]{#1}
+
+% \pgfkeys{
+% cnltx/.cd,
+% last-name-format/.code = \def\cnltx@name@last##1{#1} ,
+% first-name-format/.code = \def\cnltx@name@first##1{#1} ,
+% name-format/.code = \def\cnltx@name@base##1{#1}
+% }
+
+% \newcommand*\cnltx@name@idx[2]{\index{#1@#2}}
+% \newrobustcmd*\cnltx@name@star[2]{%
+% \ifblank{#1}
+% {\cnltx@name@base{\cnltx@name@last{#2}}}
+% {\cnltx@name@base{\cnltx@name@first{#1} \cnltx@name@last{#2}}}%
+% }
+% \newrobustcmd*\cnltx@name@nostar[2]{%
+% \ifblank{#1}
+% {%
+% \cnltx@name@base{\cnltx@name@last{#2}}%
+% \cnltx@name@idx{#2}{\cnltx@name@base{\cnltx@name@last{#2}}}%
+% }
+% {%
+% \cnltx@name@base{\cnltx@name@first{#1} \cnltx@name@last{#2}}%
+% \cnltx@name@idx{#2, #1}{%
+% \cnltx@name@base{\cnltx@name@last{#2}},
+% \cnltx@name@base{\cnltx@name@first{#1}}%
+% }%
+% }%
+% }
+% \newrobustcmd*\cnltx@name{\@ifstar{\cnltx@name@star}{\cnltx@name@nostar}}
+
+% \newrobustcmd*\cnltx@newname[3]{%
+% \csdef{\cnltx@stripbs#1@short}{%
+% \cnltx@name@base{\cnltx@name@last{#3}}%
+% \cnltx@name@idx{#3, #2}{%
+% \cnltx@name@base{\cnltx@name@last{#3}, \cnltx@name@first{#2}}%
+% }%
+% }%
+% \csdef{\cnltx@stripbs#1@long}{%
+% \cnltx@name@base{\cnltx@name@first{#2} \cnltx@name@last{#3}}%
+% \cnltx@name@idx{#3, #2}{%
+% \cnltx@name@base{\cnltx@name@last{#3}},
+% \cnltx@name@base{\cnltx@name@first{#2}}%
+% }%
+% }%
+% \newrobustcmd*#1{%
+% \@ifstar
+% {\csuse{\cnltx@stripbs#1@short}}
+% {\csuse{\cnltx@stripbs#1@long}}%
+% }%
+% }
+
+% \newrobustcmd*\newname{\cnltx@newname}
+
+% \newrobustcmd*\name{%
+% \@ifstar
+% {\@testopt{\cnltx@name@user*}{}}
+% {\@testopt{\cnltx@name@user{}}{}}%
+% }
+% \def\cnltx@name@user#1[#2]#3{\cnltx@name#1{#2}{#3}}
+
+
+% --------------------------------------------------------------------------
+\PassOptionsToPackage{space=true}{accsupp}
+\RequirePackage{accsupp}
+% #1: actual text
+% #2: other options
+% #3: TeX text
+\newrobustcmd\cnltx@accsupp[3]{%
+ \begingroup
+ \BeginAccSupp{ ActualText = #1 , #2 }%
+ #3%
+ \EndAccSupp{}%
+ \endgroup
+}
+
+\AtBeginDocument{%
+ \@ifpackageloaded{hyperref}
+ {}
+ {%
+ \providecommand\nohyperpage[1]{#1}%
+ \providecommand\texorpdfstring[2]{#1}%
+ }%
+}
+
+\def\cnltx@acronym@format{\scshape}
+
+\pgfkeys{
+ cnltx/.cd,
+ acronym-format/.code = \def\cnltx@acronym@format{#1}
+}
+
+\newcommand*\cnltx@acronym[2]{%
+ \ifblank{#1}
+ {%
+ \texorpdfstring
+ {%
+ \cnltx@accsupp{#2}{}{\cnltx@acronym@format#2}%
+ \index{#2@{\cnltx@acronym@format#2}}%
+ }
+ {#2}%
+ }
+ {%
+ \texorpdfstring
+ {%
+ \cnltx@accsupp{#1}{}{\cnltx@acronym@format#2}%
+ \index{#1@{\cnltx@acronym@format#2}}%
+ }
+ {#1}%
+ }%
+}
+
+\newcommand*\cnltxacronym{\cnltx@acronym}
+
+% --------------------------------------------------------------------------
+% abbreviations:
+
+% \def\cnltx@abbr@ifdot{\ltx@ifnextchar@nospace.}
+\protected\def\cnltx@abbr@dot#1{\cnltx@ifpunctuation*[.]{#1\@}{#1.\@}}
+
+% --------------------------------------------------------------------------
+% \defabbr
+\protected\def\cnltx@defabbr@dot#1#2{\def#1{\cnltx@abbr@dot{#2}}}
+\protected\def\cnltx@defabbr@nodot#1#2{\def#1{#2}}
+
+% \newabbr
+\protected\def\cnltx@newabbr@dot#1#2{%
+ \cnltx@ifdef#1{}{\protected\def#1{\cnltx@abbr@dot{#2}}}}
+
+\protected\def\cnltx@newabbr@nodot#1#2{%
+ \cnltx@ifdef#1{}{\protected\def#1{#2}}}
+
+% \renewabbr
+\protected\def\cnltx@renewabbr@dot#1#2{%
+ \cnltx@ifdef#1{\protected\def#1{\cnltx@abbr@dot{#2}}}{}}
+
+\protected\def\cnltx@renewabbr@nodot#1#2{%
+ \cnltx@ifdef#1{\protected\def#1{#2}}{}}
+
+\def\cnltx@ifdef#1{%
+ \ifcsname\expandafter\@gobble\string#1\endcsname
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+
+\newrobustcmd*\newabbr{%
+ \@ifstar{\cnltx@newabbr@nodot}{\cnltx@newabbr@dot}%
+}
+
+\newrobustcmd*\renewabbr{%
+ \@ifstar{\cnltx@renewabbr@nodot}{\cnltx@renewabbr@dot}%
+}
+
+\newrobustcmd*\defabbr{%
+ \@ifstar{\cnltx@defabbr@nodot}{\cnltx@defabbr@dot}%
+}
+
+% --------------------------------------------------------------------------
+\RequirePackage{translations}
+
+\newcommand*\cnltxlatin[1]{\textit{#1}}
+
+\newabbr\ie{\GetTranslation{cnltx-i.e.}}
+\newabbr\eg{\GetTranslation{cnltx-e.g.}}
+\newabbr\cf{\GetTranslation{cnltx-cf.}}
+\newabbr\etc{\GetTranslation{cnltx-etc.}}
+\newabbr\vs{\GetTranslation{cnltx-vs.}}
+
+\newabbr\zB{z.\,B}
+\newabbr\ZB{Z.\,B}
+\newabbr\usw{usw}
+\newabbr\usf{usf}
+\newabbr\uswusf{usw.\@\space usf}
+\newabbr\bzw{bzw}
+\newabbr\dsh{d.\,h}
+\newabbr\Dsh{D.\,h}
+\newabbr\vgl{vgl}
+\newabbr\Vgl{Vgl}
+
+\newcommand*\cnltxtimeformat[1]{\textsc{\,#1}}
+\newabbr\PM{\cnltxtimeformat{p.m}}
+\newabbr\AM{\cnltxtimeformat{a.m}}
+\newabbr\BC{\cnltxtimeformat{b.c}}
+\newabbr\AD{\cnltxtimeformat{a.d}}
+
+\endinput
+
+% --------------------------------------------------------------------------
+HISTORY:
+
+2013/09/10 v0.2 - first published version
+2013/09/30 v0.7 - added abbreviations
+2013/11/22 v0.9 - \bzw
+2014/03/11 v0.11 - bug fixes in the \newname definitions
+ - new command \name
+ - use \cnltx@load@module
+2014/??/?? v0.?? - \vs
+
diff --git a/macros/latex/contrib/cnltx/cnltx-translations.sty b/macros/latex/contrib/cnltx/cnltx-translations.sty
new file mode 100644
index 0000000000..53dc2d4ed4
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx-translations.sty
@@ -0,0 +1,128 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesPackage{cnltx-translations}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+% --------------------------------------------------------------------------
+\cnltx@create@bundle@message{translations}{Error}
+\cnltx@create@bundle@message{translations}{Warning}
+\cnltx@create@bundle@message{translations}{WarningNoLine}
+\cnltx@create@bundle@message{translations}{Info}
+
+% --------------------------------------------------------------------------
+\RequirePackage{translations}
+
+\DeclareTranslationFallback{cnltx-f.}{f.}
+\DeclareTranslation{English}{cnltx-f.}{f.}
+\DeclareTranslation{German}{cnltx-f.}{f.}
+
+\DeclareTranslationFallback{cnltx-ff.}{ff.}
+\DeclareTranslation{English}{cnltx-ff.}{ff.}
+\DeclareTranslation{German}{cnltx-ff.}{ff.}
+
+\DeclareTranslationFallback{cnltx-package}{package}
+\DeclareTranslation{English}{cnltx-package}{package}
+\DeclareTranslation{German}{cnltx-package}{Paket}
+
+\DeclareTranslationFallback{cnltx-environment}{environment}
+\DeclareTranslation{English}{cnltx-environment}{environment}
+\DeclareTranslation{German}{cnltx-environment}{Umgebung}
+
+\DeclareTranslationFallback{cnltx-class}{class}
+\DeclareTranslation{English}{cnltx-class}{class}
+\DeclareTranslation{German}{cnltx-class}{Klasse}
+
+\DeclareTranslationFallback{cnltx-bundle}{bundle}
+\DeclareTranslation{English}{cnltx-bundle}{bundle}
+\DeclareTranslation{German}{cnltx-bundle}{Bundle}
+
+\DeclareTranslationFallback{cnltx-default}{Default}
+\DeclareTranslation{English}{cnltx-default}{Default}
+\DeclareTranslation{German}{cnltx-default}{Voreinstellung}
+
+\DeclareTranslationFallback{cnltx-required}{required}
+\DeclareTranslation{English}{cnltx-required}{required}
+\DeclareTranslation{German}{cnltx-required}{erforderlich}
+
+\DeclareTranslationFallback{cnltx-empty}{initially empty}
+\DeclareTranslation{English}{cnltx-empty}{initially empty}
+\DeclareTranslation{German}{cnltx-empty}{zun\"achst leer}
+
+\DeclareTranslationFallback{cnltx-toc}{Table of Contents}
+\DeclareTranslation{English}{cnltx-toc}{Table of Contents}
+\DeclareTranslation{German}{cnltx-toc}{Inhaltsverzeichnis}
+
+\DeclareTranslationFallback{cnltx-license}{%
+ Permission is granted to copy, distribute and/or modify this software under
+ the terms of the \LPPL\ (\lppl), version 1.3 or later
+ (\url{http://www.latex-project.org/lppl.txt}). The software has the status%
+}
+\DeclareTranslation{English}{cnltx-license}{%
+ Permission is granted to copy, distribute and/or modify this software under
+ the terms of the \LPPL\ (\lppl), version 1.3 or later
+ (\url{http://www.latex-project.org/lppl.txt}). The software has the status%
+}
+\DeclareTranslation{German}{cnltx-license}{%
+ Es ist erlaubt, diese Software unter den Bedingungen der \LPPL\ (\lppl),
+ Version 1.3 oder sp\"ater, zu kopieren und zu verteilen
+ (\url{http://www.latex-project.org/lppl.txt}). Sie hat den Status%
+}
+
+\DeclareTranslationFallback{cnltx-introduced}{Introduced in version}
+\DeclareTranslation{English}{cnltx-introduced}{Introduced in version}
+\DeclareTranslation{German}{cnltx-introduced}{Eingef\"uhrt in Version}
+
+\DeclareTranslationFallback{cnltx-changed}{Changed in version}
+\DeclareTranslation{English}{cnltx-changed}{Changed in version}
+\DeclareTranslation{German}{cnltx-changed}{Ge\"andert in Version}
+
+\DeclareTranslationFallback{cnltx-i.e.}{\cnltxlatin{i.\,e}}
+\DeclareTranslation{English}{cnltx-i.e.}{\cnltxlatin{i.\,e}}
+\DeclareTranslation{German}{cnltx-i.e.}{d.\,h}
+
+\DeclareTranslationFallback{cnltx-e.g.}{\cnltxlatin{e.\,g}}
+\DeclareTranslation{English}{cnltx-e.g.}{\cnltxlatin{e.\,g}}
+\DeclareTranslation{German}{cnltx-e.g.}{z.\,B}
+
+\DeclareTranslationFallback{cnltx-cf.}{\cnltxlatin{cf}}
+\DeclareTranslation{English}{cnltx-cf.}{\cnltxlatin{cf}}
+\DeclareTranslation{German}{cnltx-cf.}{vgl}
+
+\DeclareTranslationFallback{cnltx-etc.}{\cnltxlatin{etc}}
+\DeclareTranslation{English}{cnltx-etc.}{\cnltxlatin{etc}}
+\DeclareTranslation{German}{cnltx-etc.}{etc}
+
+\DeclareTranslationFallback{cnltx-vs.}{\cnltxlatin{vs}}
+\DeclareTranslation{English}{cnltx-vs.}{\cnltxlatin{vs}}
+\DeclareTranslation{German}{cnltx-vs.}{vs}
+
+% --------------------------------------------------------------------------
+\endinput
+
+2014/03/11 v0.11 - first published version
+2014/??/?? v0.?? - {cnltx-vs.}
diff --git a/macros/latex/contrib/cnltx/cnltx.bbx b/macros/latex/contrib/cnltx/cnltx.bbx
new file mode 100644
index 0000000000..1fd4dc2b1b
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx.bbx
@@ -0,0 +1,205 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% 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
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesFile{cnltx.bbx}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+\cnltx@load@modules{example,tools,translations}
+
+\RequireBibliographyStyle{alphabetic}
+\ExecuteBibliographyOptions{block=ragged,useprefix=true}
+
+\DeclareBibliographyDriver{latex}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \usebibmacro{author}%
+ \usebibmacro{maintainer}%
+ \setunit{\labelnamepunct}\newblock
+ \usebibmacro{title+subtitle}%
+ \printfield{version}%
+ \setunit{\addcomma\addspace}%
+ \usebibmacro{date}%
+ \newunit\newblock
+ \usebibmacro{url+urldate}%
+ \newunit\newblock
+ \usebibmacro{finentry}%
+}
+\DeclareBibliographyAlias{package}{latex}
+\DeclareBibliographyAlias{class}{latex}
+\DeclareBibliographyAlias{bundle}{latex}
+
+\newbibmacro{title+subtitle}{%
+ \iffieldundef{title}{}{%
+ \printfield{title}%
+ \ifbibindex{\indexfield{title}}{}%
+ \setunit{\adddot\addspace}%
+ \iffieldundef{subtitle}{}{%
+ \printfield{subtitle}%
+ \setunit{\adddot\addspace}%
+ }%
+ }%
+}
+
+\newbibmacro*{maintainer}{%
+ \printtext{%
+ \ifnameundef{maintainer}
+ {}
+ {%
+ \addcomma\addspace
+ \ifnumgreater{\value{maintainer}}{1}
+ {\GetTranslation{cnltx-maintainers}}
+ {\GetTranslation{cnltx-maintainer}}%
+ \addcolon\addspace
+ \printnames{maintainer}%
+ }%
+ }%
+}
+
+\renewcommand*{\mkbibnamelast}[1]{\cnltx@write@lastname{#1}}
+\renewcommand*{\mkbibnamefirst}[1]{\cnltx@write@firstname{#1}}
+\renewcommand*{\mkbibnameprefix}[1]{\cnltx@write@lastname{#1}}
+
+\DeclareNameAlias[package]{maintainer}{default}
+\DeclareNameAlias[class]{maintainer}{default}
+\DeclareNameAlias[bundle]{maintainer}{default}
+
+\RequirePackage{translations}
+\DeclareTranslationFallback{cnltx-maintainer}{current maintainer}
+\DeclareTranslation{English}{cnltx-maintainer}{current maintainer}
+\DeclareTranslation{German}{cnltx-maintainer}{aktueller Maintainer}
+
+\DeclareTranslationFallback{cnltx-maintainers}{current maintainers}
+\DeclareTranslation{English}{cnltx-maintainers}{current maintainers}
+\DeclareTranslation{German}{cnltx-maintainers}{aktuelle Maintainer}
+
+\DeclareFieldFormat[package]{title}{\pkg*{#1}}
+\DeclareFieldFormat[class]{title}{\cls*{#1}}
+\DeclareFieldFormat[bundle]{title}{\bnd*{#1}}
+
+\DeclareIndexFieldFormat[package]{title}{%
+ \ifstrequal{#1}{\KOMAScript}
+ {\pkgidx[KOMA-Script]{\KOMAScript}}
+ {\pkgidx{#1}}%
+}
+\DeclareIndexFieldFormat[class]{title}{%
+ \ifstrequal{#1}{\KOMAScript}
+ {\clsidx[KOMA-Script]{\KOMAScript}}
+ {\clsidx{#1}}%
+}
+\DeclareIndexFieldFormat[bundle]{title}{%
+ \ifstrequal{#1}{\KOMAScript}
+ {\bndidx[KOMA-Script]{\KOMAScript}}
+ {\bndidx{#1}}%
+}
+
+\DeclareIndexFieldFormat[package]{indextitle}{%
+ \ifstrequal{#1}{\KOMAScript}
+ {\pkgidx[KOMA-Script]{\KOMAScript}}
+ {\pkgidx{#1}}%
+}
+\DeclareIndexFieldFormat[class]{indextitle}{%
+ \ifstrequal{#1}{\KOMAScript}
+ {\clsidx[KOMA-Script]{\KOMAScript}}
+ {\clsidx{#1}}%
+}
+\DeclareIndexFieldFormat[bundle]{indextitle}{%
+ \ifstrequal{#1}{\KOMAScript}
+ {\bndidx[KOMA-Script]{\KOMAScript}}
+ {\bndidx{#1}}%
+}
+
+\def\cnltx@onlyonefirstname#1\bibnamedelima#2\q@stop{#1}
+
+\DeclareIndexNameFormat{cnltx}{%
+ \cnltx@if@in{#3}{\bibnamedelima}
+ {%
+ \usebibmacro{index:entry}{\index}{%
+ \ifblank{#5}{}{#5 }%
+ \@firstofone#1%
+ \ifblank{#3}{}{, \cnltx@onlyonefirstname#3\q@stop}%
+ \actualoperator
+ \ifblank{#5}
+ {\cnltx@write@lastname{#1}}
+ {\cnltx@write@lastname{#5 #1}}%
+ \ifblank{#3}{}{, \cnltx@write@firstname{\cnltx@onlyonefirstname#3\q@stop}}%
+ }%
+ }
+ {%
+ \usebibmacro{index:entry}{\index}{%
+ \ifblank{#5}{}{#5 }%
+ \@firstofone#1%
+ \ifblank{#3}{}{, #3}%
+ \actualoperator
+ \ifblank{#5}
+ {\cnltx@write@lastname{#1}}
+ {\cnltx@write@lastname{#5 #1}}%
+ \ifblank{#3}{}{, \cnltx@write@firstname{#3}}%
+ }%
+ }%
+}
+
+\DeclareIndexNameAlias{labelname}{cnltx}
+\DeclareIndexNameAlias{author}{cnltx}
+\DeclareIndexNameAlias{maintainer}{cnltx}
+\DeclareIndexNameAlias{labelname}{cnltx}
+\DeclareIndexNameAlias{author}{cnltx}
+\DeclareIndexNameAlias{maintainer}{cnltx}
+\DeclareIndexNameAlias{labelname}{cnltx}
+\DeclareIndexNameAlias{author}{cnltx}
+\DeclareIndexNameAlias{maintainer}{cnltx}
+
+\DeclareFieldFormat[package]{subtitle}{\mkbibemph{#1}}
+\DeclareFieldFormat[class]{subtitle}{\mkbibemph{#1}}
+\DeclareFieldFormat[bundle]{subtitle}{\mkbibemph{#1}}
+
+\DeclareLabelname[package,class,bundle]{%
+ \field{shortauthor}
+ \field{author}
+ \field{maintainer}
+ \field{shorteditor}
+ \field{editor}
+ \field{translator}
+}
+
+\DeclareDriverSourcemap[datatype=bibtex]{
+ \map{
+ \step[fieldsource=info, fieldtarget=subtitle]
+ }
+}
+
+\endinput
+
+HISTORY:
+2013/09/14 v0.4 - first version added to the bundle
+2013/10/04 v0.7a - added drivers `@class' and `@bundle'
+2013/11/22 v0.9 - made independent from the `cnltx-doc' class
+2014/03/11 v0.11 - change name format so that names are printed according to
+ the format of the \newname commands from the `tools'
+ module;
+ this is going to need tests if it really is consistent
+ for different types of name formats (prefixes, affixes...)
+
diff --git a/macros/latex/contrib/cnltx/cnltx.bib b/macros/latex/contrib/cnltx/cnltx.bib
new file mode 100644
index 0000000000..d38858ab3d
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx.bib
@@ -0,0 +1,987 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% 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
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+@package{pkg:abbrevs,
+ title = {abbrevs},
+ author = {Matt Swift},
+ date = {2001-09-08},
+ version = {1.4},
+ url = {http://mirror.ctan.org/macros/latex/contrib/frankenstein/abbrevs/}
+}
+@package{pkg:accsupp,
+ title = {accsupp} ,
+ author = {Heiko Oberdiek} ,
+ date = {2010-01-16} ,
+ version = {0.3} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:acro,
+ title = {acro} ,
+ author = {Clemens Niederberger} ,
+ date = {2013-09-24} ,
+ version = {1.4b} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/acro/}
+}
+@package{pkg:acromake,
+ title = {acromake},
+ author = {Paul A. Thompson},
+ date = {1995-07-16},
+ version = {na},
+ url = {http://mirror.ctan.org/macros/latex/contrib/acromake/}
+}
+@package{pkg:acronym,
+ title = {acronym},
+ subtitle = {An Acronym Environment for \LaTeXe},
+ author = {Tobias Oetiker},
+ date = {2012-10-29},
+ version = {1.38},
+ url = {http://mirror.ctan.org/macros/latex/contrib/acronym/}
+}
+@package{pkg:acroterm,
+ title = {acroterm},
+ author = {Jakob Voss},
+ date = {2010-11-19},
+ version = {0.1},
+ url = {http://mirror.ctan.org/macros/latex/contrib/acroterm/}
+}
+@package{pkg:adjustbox,
+ title = {adjustbox},
+ author = {Martin Scharrer},
+ date = {2012-05-21},
+ version = {1.0},
+ url = {http://mirror.ctan.org/macros/latex/contrib/adjustbox/}
+}
+@package{pkg:amsmath,
+ title = {amsmath} ,
+ author = {{American Mathematical Society}} ,
+ sortname = {American Mathematical Society} ,
+ shorthand = {AMS} ,
+ date = {2002-02-25} ,
+ version = {2.0} ,
+ url = {http://mirror.ctan.org/macros/latex/required/amsmath/}
+}
+@package{pkg:amstext,
+ title = {amstext} ,
+ author = {Frank Mittelbach and Rainer Sch\"opf} ,
+ date = {2000-06-29} ,
+ version = {2.01} ,
+ url = {http://mirror.ctan.org/macros/latex/required/amstext/}
+}
+@package{pkg:answers,
+ title = {answers},
+ author = {Mike Piff},
+ maintainer = {Joseph Wright},
+ date = {2010-10-11},
+ version = {2.13},
+ url = {http://mirror.ctan.org/macros/latex/contrib/answers/}
+}
+@package{pkg:array,
+ title = {array},
+ author = {Frank Mittelbach and David Carlisle},
+ date = {2008-09-09},
+ version = {2.4c},
+ url = {http://mirror.ctan.org/macros/latex/required/tools/}
+}
+@package{pkg:asymptote,
+ title = {asymptote},
+ author = {Andy Hammerlindl and John Bowman and Tom Price},
+ date = {2013},
+ version = {2.23},
+ url = {http://mirror.ctan.org/graphics/asymptote/}
+}
+@package{pkg:babel,
+ title = {babel} ,
+ author = {Johannes Braams} ,
+ maintainer = {Javier Bezos} ,
+ date = {2013-05-16} ,
+ version = {3.9f} ,
+ url = {http://mirror.ctan.org/macros/latex/required/babel/}
+}
+@package{pkg:bm,
+ title = {bm} ,
+ author = {David Carlisle and Frank Mittelbach} ,
+ date = {2004-02-26} ,
+ version = {1.1c} ,
+ url = {http://mirror.ctan.org/macros/latex/required/bm/}
+}
+@package{pkg:biblatex,
+ title = {biblatex} ,
+ author = {Philipp Lehman} ,
+ maintainer = {Joseph Wright and Audrey Boruvka and Philip Kime} ,
+ date = {2013-07-14} ,
+ version = {2.7a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/biblatex/}
+}
+@package{pkg:bigfoot,
+ title = {bigfoot},
+ author = {David Kastrup},
+ date = {2006-07-15},
+ version = {1.25},
+ url = {http://mirror.ctan.org/macros/latex/contrib/bigfoot/}
+}
+@package{pkg:bohr,
+ title = {bohr} ,
+ author = {Clemens Niederberger} ,
+ date = {2015-06-16} ,
+ version = {1.0} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/bohr/}
+}
+@package{pkg:booktabs,
+ title = {booktabs} ,
+ author = {Simon Fear} ,
+ date = {2005-04-14} ,
+ version = {1.61803} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/booktabs/}
+}
+@package{pkg:bpchem,
+ title = {bpchem} ,
+ author = {Bj\o{}rn Pedersen} ,
+ date = {2004-11-25} ,
+ version = {1.06} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/bpchem/}
+}
+@package{pkg:catchfile,
+ title = {catchfile} ,
+ author = {Heiko Oberdiek} ,
+ date = {2011-03-01} ,
+ version = {1.6} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:chemcompounds,
+ title = {chemcompounds} ,
+ author = {Stefan Schenk} ,
+ date = {2006-12-01} ,
+ version = {1.1.3} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemcompounds/}
+}
+@package{pkg:chemcono,
+ title = {chemcono} ,
+ author = {Stefan Schulz} ,
+ date = {1999-09-09} ,
+ version = {1.3} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemcono/}
+}
+@package{pkg:chemfig,
+ title = {chemfig} ,
+ author = {Christian Tellechea} ,
+ date = {2013-11-28} ,
+ version = {1.0h} ,
+ url = {http://mirror.ctan.org/macros/generic/chemfig/}
+}
+@package{pkg:chemformula,
+ title = {chemformula} ,
+ author = {Clemens Niederberger} ,
+ date = {2015-06-30} ,
+ version = {4.11} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemformula/}
+}
+@package{pkg:chemgreek,
+ title = {chemgreek} ,
+ author = {Clemens Niederberger} ,
+ date = {2015-07-01} ,
+ version = {1.0a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemgreek/}
+}
+@package{pkg:chemmacros,
+ title = {chemmacros} ,
+ author = {Clemens Niederberger} ,
+ date = {2015-02-08} ,
+ version = {4.7} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemmacros/}
+}
+@package{pkg:chemnum,
+ title = {chemnum} ,
+ author = {Clemens Niederberger} ,
+ date = {2015-05-13} ,
+ version = {1.1a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemnum/}
+}
+@package{pkg:chemstyle,
+ title = {chemstyle} ,
+ author = {Joseph Wright} ,
+ date = {2013-07-03} ,
+ version = {2.0m} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chemstyle/}
+}
+@package{pkg:chngcntr,
+ title = {chngcntr} ,
+ author = {Peter Wilson} ,
+ maintainer = {Will Robertson} ,
+ date = {2009-09-02} ,
+ version = {1.0a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chngcntr/}
+}
+@bundle{bnd:cnltx,
+ title = {cnltx} ,
+ author = {Clemens Niederberger} ,
+ date = {2014-01-23} ,
+ version = {0.10a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/cnltx/}
+}
+@class{cls:cnpkgdoc,
+ title = {cnpkgdoc} ,
+ author = {Clemens Niederberger} ,
+ date = {2013-07-13} ,
+ version = {0.3a} ,
+ url = {https://bitbucket.org/cgnieder/cnpkgdoc/}
+}
+@package{pkg:cntformats,
+ title = {cntformats},
+ author = {Clemens Niederberger},
+ date = {2014-07-03},
+ version = {0.7},
+ url = {http://mirror.ctan.org/macros/latex/contrib/cntformats/}
+}
+@package{pkg:cprotect,
+ title = {cprotect},
+ author = {Bruno Le Floch},
+ date = {2011-01-27},
+ version = {1.0e},
+ url = {http://mirror.ctan.org/macros/latex/contrib/cprotect/}
+}
+@package{pkg:elements,
+ title = {elements},
+ author = {Clemens Niederberger},
+ version = {0.1},
+ date = {2015-06-14},
+ url = {http://mirror.ctan.org/macros/latex/contrib/elements/}
+}
+@package{pkg:endnotes,
+ title = {endnotes} ,
+ author = {John Lavagnino} ,
+ maintainer = {Robin Fairbairns} ,
+ date = {2003-01-15} ,
+ version = {NA} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/endnotes/}
+}
+@package{pkg:enotez,
+ title = {enotez},
+ author = {Clemens Niederberger},
+ version = {0.7b},
+ date = {2013-10-31},
+ url = {http://mirror.ctan.org/macros/latex/contrib/enotez/}
+}
+@package{pkg:enumitem,
+ title = {enumitem},
+ author = {Javier Bezos},
+ date = {2011-09-28},
+ version = {3.5.2},
+ url = {http://mirror.ctan.org/macros/latex/contrib/enumitem/}
+}
+@package{pkg:environ,
+ title = {environ},
+ author = {Will Robertson},
+ date = {2013-04-01},
+ version = {0.3},
+ url = {http://mirror.ctan.org/macros/latex/contrib/environ/}
+}
+@package{pkg:epic,
+ title = {epic},
+ author = {Sunil Podar},
+ date = {1986-07-14},
+ version = {1.2},
+ url = {http://mirror.ctan.org/macros/latex/contrib/epic/}
+}
+@package{pkg:eqexam,
+ title = {eqexam},
+ author = {D. P. Story},
+ date = {2011-09-01},
+ version = {3.0k},
+ url = {http://mirror.ctan.org/macros/latex/contrib/eqexam/}
+}
+@package{pkg:esami,
+ title = {esami},
+ author = {Grazia Messineo and Salvatore Vassallo},
+ date = {2013-03-08},
+ version = {1.0},
+ url = {http://mirror.ctan.org/macros/latex/contrib/esami/}
+}
+@package{pkg:etoolbox,
+ title = {etoolbox} ,
+ author = {Philipp Lehman} ,
+ maintainer = {Joseph Wright} ,
+ date = {2015-04-04} ,
+ version = {2.2} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/etoolbox/}
+}
+@class{cls:exam,
+ title = {exam},
+ author = {Philip Hirschhorn},
+ date = {2015-05-07},
+ version = {2.5},
+ url = {http://mirror.ctan.org/macros/latex/contrib/exam/}
+}
+@package{pkg:examdesign,
+ title = {examdesign},
+ author = {Jason Alexander},
+ date = {2001-03-26},
+ version = {1.1},
+ url = {http://mirror.ctan.org/macros/latex/contrib/examdesign/}
+}
+@package{pkg:exercise,
+ title = {exercise},
+ author = {Paul Pichaureau},
+ date = {2012-05-08},
+ version = {1.58},
+ url = {http://mirror.ctan.org/macros/latex/contrib/exercise/}
+}
+@bundle{bnd:exsheets,
+ title = {exsheets} ,
+ author = {Clemens Niederberger} ,
+ date = {2014-06-27} ,
+ version = {0.14} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/exsheets/}
+}
+@package{pkg:exsol,
+ title = {exsol},
+ author = {Walter Daems},
+ date = {2013-05-12},
+ version = {0.6},
+ url = {http://mirror.ctan.org/macros/latex/contrib/exsol/}
+}
+@package{pkg:fixfoot,
+ title = {fixfoot},
+ author = {Robin Fairbairns},
+ date = {2007-12-12},
+ version = {0.3a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/fixfoot/}
+}
+@package{pkg:fnpct,
+ title = {fnpct} ,
+ author = {Clemens Niederberger} ,
+ date = {2013-02-28} ,
+ version = {0.2j} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/fnpct/}
+}
+@package{pkg:fontenc,
+ title = {fontenc} ,
+ author = {{The \LaTeX\ team}} ,
+ sortname = {LaTeX team} ,
+ version = {1.99g} ,
+ date = {2005-09-27} ,
+ url = {http://mirror.ctan.org/macros/latex/unpacked/}
+}
+@package{pkg:fontspec,
+ title = {fontspec} ,
+ author = {Will Robertson and Khaled Hosny} ,
+ version = {2.3c} ,
+ date = {2013-05-20} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/fontspec/}
+}
+@package{pkg:footmisc,
+ title = {footmisc},
+ author = {Robin Fairbairns},
+ date = {2011-06-06},
+ version = {5.5b},
+ url = {http://mirror.ctan.org/macros/latex/contrib/footmisc/}
+}
+@package{pkg:footnote,
+ title = {footnote},
+ author = {Mark Wooding},
+ date = {1997-01-28},
+ version = {1.13},
+ url = {http://mirror.ctan.org/macros/latex/contrib/footnote/}
+}
+@package{pkg:fourier,
+ title = {fourier} ,
+ author = {Michel Bovani} ,
+ date = {2005-01-30} ,
+ version = {1.3} ,
+ url = {http://mirror.ctan.org/fonts/fourier-gut/}
+}
+@package{pkg:geometry,
+ title = {geometry} ,
+ author = {Hideo Umeki} ,
+ date = {2010-09-12} ,
+ version = {5.6} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/geometry/}
+}
+@package{pkg:ghsystem,
+ title = {ghsystem} ,
+ author = {Clemens Niederberger} ,
+ date = {2014-08-08} ,
+ version = {4.6} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/ghsystem/}
+}
+@package{pkg:glossaries,
+ title = {glossaries},
+ author = {Nicola L.C. Talbot},
+ date = {2013-04-21},
+ version = {3.05},
+ url = {http://mirror.ctan.org/macros/latex/contrib/glossaries/}
+}
+@package{pkg:graphicx,
+ title = {graphicx} ,
+ author = {David Carlisle} ,
+ date = {2005-11-14} ,
+ version = {1.0f} ,
+ url = {http://mirror.ctan.org/macros/latex/required/graphics/}
+}
+@bundle{bnd:greek-fontenc,
+ title = {greek-fontenc} ,
+ author = {G\"unter Milde} ,
+ date = {2013-12-01} ,
+ version = {0.11.1} ,
+ url = {http://mirror.ctan.org/language/greek/greek-fontenc/}
+}
+@package{pkg:hologo,
+ title = {hologo} ,
+ author = {Heiko Oberdiek} ,
+ date = {2012-04-26} ,
+ version = {1.10} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:hyperref,
+ title = {hyperref} ,
+ author = {Heiko Oberdiek and Sebastian Rahtz} ,
+ date = {2012-11-06} ,
+ version = {6.83m} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/hyperref/}
+}
+@package{pkg:idxcmds,
+ title = {idxcmds} ,
+ author = {Clemens Niederberger} ,
+ date = {2013-08-31} ,
+ version = {0.2b} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/idxcmds/}
+}
+@package{pkg:ifluatex,
+ title = {ifluatex} ,
+ author = {Heiko Oberdiek} ,
+ date = {2010-03-01} ,
+ version = {1.3} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:ifpdf,
+ title = {ifpdf} ,
+ author = {Heiko Oberdiek} ,
+ date = {2011-01-30} ,
+ version = {2.3} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:ifplatform,
+ title = {ifplatform} ,
+ author = {Johannes Gro\ss e and Will Robertson} ,
+ date = {2010-10-22} ,
+ version = {0.4} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/ifplatform/}
+}
+@package{pkg:ifxetex,
+ title = {ifxetex} ,
+ author = {Will Robertson} ,
+ date = {2010-09-12} ,
+ version = {0.6} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/ifxetex/}
+}
+@package{pkg:imakeidx,
+ title = {imakeidx} ,
+ author = {Enrico Gregorio} ,
+ date = {2013-07-11} ,
+ version = {1.3a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/imakeidx/}
+}
+@package{pkg:inputenc,
+ title = {inputenc} ,
+ author = {Alan Jeffrey and Frank Mittelbach} ,
+ date = {2008-03-30} ,
+ version = {1.1d} ,
+ url = {http://mirror.ctan.org/macros/latex/base/}
+}
+@bundle{bnd:koma-script,
+ title = {\KOMAScript} ,
+ sorttitle = {KOMA-Script} ,
+ indextitle = {\KOMAScript} ,
+ indexsorttitle = {KOMA-Script} ,
+ author = {Markus Kohm},
+ date = {2015-07-02} ,
+ version = {3.18} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/koma-script/}
+}
+@package{pkg:kpfonts,
+ title = {kpfonts} ,
+ author = {Christophe Caignaert} ,
+ aubtitle = {The Johannes Kepler Project} ,
+ date = {2010-08-20} ,
+ version = {3.31} ,
+ url = {http://mirror.ctan.org/fonts/kpfonts}
+}
+@bundle{bnd:l3experimental,
+ title = {l3experimental} ,
+ author = {{The \LaTeX3 Project Team}} ,
+ shorthand = {L3P} ,
+ sortname = {LaTeX3 Project Team} ,
+ version = {SVN 5630} ,
+ date = {2015-07-15} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/l3experimental/}
+}
+@bundle{bnd:l3kernel,
+ title = {l3kernel} ,
+ author = {{The \LaTeX3 Project Team}} ,
+ shorthand = {L3P} ,
+ sortname = {LaTeX3 Project Team} ,
+ version = {SVN 5630} ,
+ date = {2015-07-15} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/l3kernel/}
+}
+@bundle{bnd:l3packages,
+ title = {l3packages} ,
+ author = {{The \LaTeX3 Project Team}} ,
+ shorthand = {L3P} ,
+ sortname = {LaTeX3 Project Team} ,
+ version = {SVN 5530} ,
+ date = {2015-07-15} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/l3packages/}
+}
+@package{pkg:libertine,
+ title = {libertine} ,
+ author = {Bob Tennent} ,
+ date = {2013-09-02} ,
+ url = {http://mirror.ctan.org/fonts/libertine/}
+}
+@package{pkg:listings,
+ title = {listings} ,
+ author = {Carsten Heinz and Brooks Moses} ,
+ maintainer = {Jobst Hoffmann} ,
+ date = {2013-08-26} ,
+ version = {1.5b} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/listings/}
+}
+@package{pkg:longtable,
+ title = {longtable} ,
+ author = {David Carlisle} ,
+ date = {2004-02-01} ,
+ version = {4.11} ,
+ url = {http://mirror.ctan.org/macros/latex/required/tools/}
+}
+@package{pkg:lscape,
+ title = {lscape} ,
+ author = {David Carlisle} ,
+ date = {2000-10-22} ,
+ version = {3.01} ,
+ url = {http://mirror.ctan.org/macros/latex/required/graphics/}
+}
+@package{pkg:ltxcmds,
+ title = {ltxcmds},
+ author = {Heiko Oberdiek},
+ date = {2011-11-09},
+ version = {1.22},
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:manyfoot,
+ title = {manyfoot},
+ author = {Alexander I. Rozhenko},
+ date = {2005-09-11},
+ version = {1.10},
+ url = {http://mirror.ctan.org/macros/latex/contrib/manyfoot/}
+}
+@package{pkg:marginnote,
+ title = {marginnote} ,
+ author = {Markus Kohm} ,
+ date = {2012-03-29} ,
+ version = {1.1i} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/marginnote/}
+}
+@package{pkg:mathdesign,
+ title = {mathdesign} ,
+ author = {Paul Pichaureau} ,
+ date = {2013-08-29} ,
+ version = {2.31} ,
+ url = {http://mirror.ctan.org/fonts/mathdesign/}
+}
+@package{pkg:mathtools,
+ title = {mathtools} ,
+ author = {Lars Madsen and Will Robertson and Joseph Wright} ,
+ version = {1.13} ,
+ date = {2013-02-12} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/mh/}
+}
+@package{pkg:mdframed,
+ title = {mdframed} ,
+ author = {Marco Daniel} ,
+ date = {2013-07-01} ,
+ version = {1.9b} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/mdframed/}
+}
+@class{cls:memoir,
+ title = {memoir} ,
+ author = {Peter Wilson and Lars Madsen} ,
+ date = {2011-03-06} ,
+ version = {3.6j} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/memoir/}
+}
+@package{pkg:mfirstuc,
+ title = {mfirstuc},
+ author = {Nicola L.C. Talbot},
+ date = {2012-05-21},
+ version = {1.05},
+ url = {http://mirror.ctan.org/macros/latex/contrib/glossaries/}
+}
+@package{pkg:microtype,
+ title = {microtype} ,
+ author = {Robert Schlicht} ,
+ date = {2013-05-23} ,
+ version = {2.5a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/microtype/}
+}
+@package{pkg:multicol,
+ title = {multicol} ,
+ author = {Frank Mittelbach} ,
+ date = {2011-06-27} ,
+ version = {1.7a} ,
+ url = {http://mirror.ctan.org/macros/latex/required/tools/multicol/}
+}
+@package{pkg:multienum,
+ title = {multienum},
+ author = {Dennis Kletzing},
+ date = {2005-05-19},
+ version = {n.n.},
+ url = {http://mirror.ctan.org/macros/latex/contrib/multienum/}
+}
+@package{pkg:musixtex,
+ title = {musixtex},
+ author = {Daniel Taupin and Ross Mitchell and Andreas Egler},
+ version = {1.15},
+ date = {2011-04-01},
+ url = {http://mirror.ctan.org/macros/musixtex/}
+}
+@package{pkg:newtx,
+ title = {newtx} ,
+ author = {Michael Sharpe} ,
+ date = {2013-10-17} ,
+ version = {1.151} ,
+ url = {http://mirror.ctan.org/fonts/newtx/}
+}
+@package{pkg:nicefrac,
+ title = {nicefrac} ,
+ author = {Axel Reichert} ,
+ date = {1998-08-04} ,
+ version = {0.9b} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/units/}
+}
+@package{pkg:nomencl,
+ title = {nomencl},
+ subtitle = {A Package to Create a Nomenclature},
+ author = {Boris Veytsman and Bernd Schandl and Lee Netherton and C.V. Radhakrishnan},
+ date = {2005-09-22},
+ version = {4.2},
+ url = {http://mirror.ctan.org/macros/latex/contrib/nomencl/}
+}
+@package{pkg:parnotes,
+ title = {parnotes},
+ author = {Micheal Hughes},
+ date = {2012-03-01},
+ version = {1},
+ url = {http://mirror.ctan.org/macros/latex/contrib/parnotes/}
+}
+@package{pkg:pagenote,
+ title = {pagenote},
+ author = {Robert Wilson},
+ maintainer = {Will Robertson},
+ date = {2009-09-03},
+ version = {1.1a},
+ url = {http://mirror.ctan.org/macros/latex/contrib/pagenote/}
+}
+@package{pkg:pdftexcmds,
+ title = {pdftexcmds} ,
+ author = {Heiko Oberdiek} ,
+ date = {2011-11-29} ,
+ version = {0.20} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/}
+}
+@package{pkg:perpage,
+ title = {perpage},
+ author = {David Kastrup},
+ date = {2006-07-15},
+ version = {1.12},
+ url = {http://mirror.ctan.org/macros/latex/contrib/perpage/}
+}
+@package{pkg:pgf,
+ title = {TikZ/pgf} ,
+ author = {Till Tantau} ,
+ version = {3.0.0} ,
+ date = {2013-12-13} ,
+ url = {http://mirror.ctan.org/graphics/pgf/}
+}
+@package{pkg:pgfopts,
+ title = {pgfopts} ,
+ author = {Joseph Wright} ,
+ date = {2011-06-02} ,
+ version = {2.1} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/pgfopts/}
+}
+@package{pkg:pgfplots,
+ title = {pgfplots} ,
+ author = {Christian Feuers\"anger} ,
+ sortname = {Christian Feuersaenger} ,
+ date = {2013-10-04} ,
+ version = {1.9} ,
+ url = {http://mirror.ctan.org/graphics/pgf/contrib/pgfplots/}
+}
+@package{pkg:polyglossia,
+ title = {polyglossia} ,
+ author = {Fran\c{c}ois Charette} ,
+ sortname = {Francois Charette} ,
+ maintainer = {Arthur Reutenauer} ,
+ date = {2013-06-27} ,
+ version = {1.33.4} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/polyglossia/}
+}
+@package{pkg:probsoln,
+ title = {probsoln},
+ author = {Nicola L. C. Talbot},
+ date = {2012-08-23},
+ version = {3.04},
+ url = {http://mirror.ctan.org/macros/latex/contrib/probsoln/}
+}
+@package{pkg:psfrag,
+ title = {psfrag},
+ author = {Michael C. Grant and David Carlisle},
+ date = {1998-04-11},
+ version = {3},
+ url = {http://mirror.ctan.org/graphics/psfrag/}
+}
+@package{pkg:pstricks,
+ title = {pstricks},
+ author = {Timothy van Zandt and Dennis Girou and Herbert Vo\ss},
+ date = {2013},
+ version = {2.46},
+ url = {http://mirror.ctan.org/graphics/pstricks/}
+}
+@package{pkg:ragged2e,
+ title = {ragged2e} ,
+ author = {Martin Schr\"oder} ,
+ sortname = {Martin Schroeder} ,
+ date = {2009-05-21} ,
+ version = {2.1} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/ms/ragged2e/}
+}
+@package{pkg:realbookchords,
+ title = {realbookchords},
+ author = {Clemens Niederberger},
+ date = {2013-04-29},
+ version = {0.1},
+ url = {https://bitbucket.org/cgnieder/guitarchordschemes/}
+}
+@package{pkg:relsize,
+ title = {relsize} ,
+ author = {Donald Arseneau} ,
+ date = {2013-03-29} ,
+ version = {4.1} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/relsize}
+}
+@package{pkg:scrlfile,
+ title = {scrlfile} ,
+ author = {Markus Kohm} ,
+ date = {2012-06-15} ,
+ version = {3.12} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/koma-script/}
+}
+@package{pkg:sepfootnotes,
+ title = {sepfootnotes} ,
+ author = {Eduardo C. Louren\c{c}o de Lima} ,
+ date = {2013-01-17} ,
+ version = {0.2} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/sepfootnotes/}
+}
+@package{pkg:sidenotes,
+ title = {sidenotes},
+ author = {Andy Thomas and Oliver Schebaum},
+ date = {2012-11-09},
+ version = {0.92},
+ url = {http://mirror.ctan.org/macros/latex/contrib/sidenotes/}
+}
+@package{pkg:siunitx,
+ title = {siunitx} ,
+ author = {Joseph Wright} ,
+ version = {2.6h} ,
+ date = {2015-07-17} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/siunitx/}
+}
+@package{pkg:snotez,
+ title = {snotez},
+ author = {Clemens Niederberger},
+ version = {0.2},
+ date = {2013-04-04},
+ url = {http://mirror.ctan.org/macros/latex/contrib/snotez/}
+}
+@package{pkg:songbook,
+ title = {songbook},
+ author = {Christopher Rath},
+ version = {4.5},
+ date = {2010-04-30},
+ url = {http://mirror.ctan.org/macros/latex/contrib/songbook/}
+}
+@package{pkg:songs,
+ title = {songs},
+ author = {Kevin W. Hamlen},
+ version = {2.14},
+ date = {2012-03-17},
+ url = {http://mirror.ctan.org/macros/latex/contrib/songs/}
+}
+@package{pkg:splitidx,
+ title = {splitidx},
+ author = {Markus Kohm},
+ date = {2013-04-09},
+ version = {1.2a},
+ url = {http://mirror.ctan.org/macros/latex/contrib/splitidx/}
+}
+@package{pkg:superiors,
+ title = {superiors},
+ author = {Michael Sharpe},
+ date = {2012-08-13},
+ version = {1.02},
+ url = {http://mirror.ctan.org/macros/latex/contrib/superiors/}
+}
+@package{pkg:tasks,
+ title = {tasks},
+ author = {Clemens Niederberger},
+ date = {2014-07-03},
+ version = {0.10},
+ url = {http://mirror.ctan.org/macros/latex/contrib/tasks/}
+}
+@package{pkg:tablefootnote,
+ title = {tablefootnote},
+ author = {H.-Martin M\"unch},
+ date = {2012-01-14},
+ version = {1.0g},
+ url = {http://mirror.ctan.org/macros/latex/contrib/tablefootnote/}
+}
+@package{pkg:textcomp,
+ title = {textcomp} ,
+ author = {Sebastian Rahtz} ,
+ date = {1995-12-11} ,
+ version = {1.4} ,
+ url = {http://mirrors.ctan.org/obsolete/fonts/psfonts/ts1}
+}
+@package{pkg:textgreek,
+ title = {textgreek} ,
+ author = {Leonard Michlmayr} ,
+ date = {2011-10-09} ,
+ version = {0.7} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/textgreek/}
+}
+@package{pkg:tkz-base,
+ title = {tkz-base},
+ author = {Alain Matthes},
+ date = {2011-06-02},
+ version = {1.16},
+ url = {http://mirror.ctan.org/macros/latex/contrib/tkz/}
+}
+@package{pkg:tkz-euclide,
+ title = {tkz-euclide},
+ author = {Alain Matthes},
+ date = {2011-06-03},
+ version = {1.16c},
+ url = {http://mirror.ctan.org/macros/latex/contrib/tkz/}
+}
+@package{pkg:tkz-fct,
+ title = {tkz-fct},
+ author = {Alain Matthes},
+ date = {2011-06-02},
+ version = {1.16c},
+ url = {http://mirror.ctan.org/macros/latex/contrib/tkz/}
+}
+@package{pkg:translations,
+ title = {translations} ,
+ author = {Clemens Niederberger} ,
+ date = {2013-09-30} ,
+ version = {1.1a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/translations/}
+}
+@package{pkg:translator,
+ title = {translator} ,
+ author = {Till Tantau} ,
+ date = {2010-06-12} ,
+ version = {1.0} ,
+ url = {http://mirror.ctan.org/macros/contrib/beamer/base/translator/}
+}
+@package{pkg:trimspaces,
+ title = {trimspaces} ,
+ author = {Will Robertson} ,
+ date = {2009-09-17} ,
+ version = {1.1} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/trimspaces/}
+}
+@class{cls:tufte,
+ title = {tufte-latex},
+ author = {Kevin Godby and Bil Kleb and Bill Wood},
+ date = {2009-12-11},
+ version = {3.5.0},
+ url = {http://mirror.ctan.org/macros/latex/contrib/tufte-latex/}
+}
+@package{pkg:ulem,
+ title = {ulem} ,
+ author = {Donald Arseneau} ,
+ date = {2011-03-18} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/ulem/}
+}
+@package{pkg:upgreek,
+ title = {upgreek} ,
+ author = {Walter Schmidt} ,
+ date = {2003-02-12} ,
+ version = {2.0} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/was/}
+}
+@package{pkg:xcolor,
+ title = {xcolor} ,
+ author = {Uwe Kern} ,
+ date = {2007-01-21} ,
+ version = {2.11} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/xcolor/}
+}
+@package{pkg:xfrac,
+ title = {xfrac} ,
+ author = {{The \LaTeX3 Project Team}} ,
+ shorthand = {L3P} ,
+ sortname = {LaTeX3 Project Team} ,
+ date = {2014-05-04} ,
+ version = {4728} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/l3packages/}
+}
+@package{pkg:xpatch,
+ title = {xpatch} ,
+ author = {Enrico Gregorio} ,
+ date = {2012-10-02} ,
+ version = {0.3} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/xpatch/}
+}
+@package{pkg:xspace,
+ title = {xspace} ,
+ author = {David Carlisle and Morten H\o{}gholm} ,
+ sortname = {David Carlisle and Morten Hoegholm} ,
+ date = {2009-10-20} ,
+ version = {1.13} ,
+ url = {http://mirror.ctan.org/macros/latex/required/tools/}
+}
+@bundle{bnd:yafoot,
+ title = {yafoot},
+ author = {Hiroshi Nakashima},
+ date = {1999-07-14},
+ version = {1.0},
+ url = {http://mirror.ctan.org/macros/latex/contrib/yafoot/}
+}
+
diff --git a/macros/latex/contrib/cnltx/cnltx.cbx b/macros/latex/contrib/cnltx/cnltx.cbx
new file mode 100644
index 0000000000..1fd3158685
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx.cbx
@@ -0,0 +1,48 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% 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
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-example}
+\ProvidesFile{cnltx.cbx}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+\RequireCitationStyle{alphabetic}
+
+\renewbibmacro*{citeindex}{%
+ \ifciteindex
+ {%
+ \indexnames{labelname}%
+ \indexnames{maintainer}%
+ \indexfield{indextitle}%
+ }
+ {}%
+}
+
+
+\endinput
+
+HISTORY
+2013/01/14 v0.4 - first version added to the bundle
+2013/11/22 v0.9 - made independent from the `cnltx-doc' class
diff --git a/macros/latex/contrib/cnltx/cnltx.dbx b/macros/latex/contrib/cnltx/cnltx.dbx
new file mode 100644
index 0000000000..dacca354db
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx.dbx
@@ -0,0 +1,56 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% 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
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-example}
+\DeclareDatamodelFields[type=list, datatype=name]{maintainer}
+\DeclareDatamodelEntryfields[package,class,bundle]{
+ author,
+ maintainer,
+ info,
+ title,
+ day,
+ month,
+ year,
+ addendum,
+ language,
+ note,
+ subtitle,
+ titleaddon,
+ translator,
+ url,
+ urlday,
+ urlmonth,
+ urlyear,
+ version
+}
+
+\endinput
+
+HISTORY:
+2013/09/14 v0.4 - first version added to the bundle
+2013/10/04 v0.7a - added drivers `@class' and `@bundle'
+2013/11/22 v0.9 - made independent from the `cnltx-doc' class
diff --git a/macros/latex/contrib/cnltx/cnltx.ist b/macros/latex/contrib/cnltx/cnltx.ist
new file mode 100644
index 0000000000..cfd43feb57
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx.ist
@@ -0,0 +1,10 @@
+heading_prefix "{\\bfseries "
+heading_suffix "\\hfil}\\nopagebreak\n"
+headings_flag 1
+delim_0 "\\dotfill"
+delim_1 "\\dotfill"
+delim_2 "\\dotfill"
+delim_r "\\nohyperpage{\\textendash}"
+delim_t ""
+suffix_2p "\\nohyperpage{\\,\\GetTranslation{cnltx-f.}\\@}"
+suffix_3p "\\nohyperpage{\\,\\GetTranslation{cnltx-ff.}\\@}"
diff --git a/macros/latex/contrib/cnltx/cnltx.sty b/macros/latex/contrib/cnltx/cnltx.sty
new file mode 100644
index 0000000000..298ba37b74
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx.sty
@@ -0,0 +1,46 @@
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\RequirePackage{cnltx-base}
+\ProvidesPackage{cnltx}[\cnltx@@date\space \cnltx@@version\space \cnltx@@info]
+
+\cnltx@register@module{listings}
+\cnltx@register@module{example}
+\cnltx@register@module{names}
+\cnltx@register@module{tools}
+\cnltx@register@module{translations}
+
+\ProcessOptions*
+
+\endinput
+
+HISTORY:
+2013/11/22 v0.9 - first added to the bundle
+2014/03/11 v0.11 - use \cnltx@load@module
+2015/01/11 v0.12 - move definition of \cnltx@register@module in base module
+ - add `names' module
+
diff --git a/macros/latex/contrib/cnltx/cnltx_en.pdf b/macros/latex/contrib/cnltx/cnltx_en.pdf
new file mode 100644
index 0000000000..d25b68094a
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx_en.pdf
Binary files differ
diff --git a/macros/latex/contrib/cnltx/cnltx_en.tex b/macros/latex/contrib/cnltx/cnltx_en.tex
new file mode 100644
index 0000000000..867a808b61
--- /dev/null
+++ b/macros/latex/contrib/cnltx/cnltx_en.tex
@@ -0,0 +1,2946 @@
+% arara: pdflatex: { shell: on }
+% arara: pdflatex
+% arara: biber
+% arara: pdflatex
+% arara: pdflatex
+% --------------------------------------------------------------------------
+% the CNLTX bundle
+%
+% LaTeX source code and output
+%
+% --------------------------------------------------------------------------
+% Clemens Niederberger
+% Web: https://github.com/cgnieder/cnltx/
+% E-Mail: contact@mychemistry.eu
+% --------------------------------------------------------------------------
+% Copyright 2013-2015 Clemens Niederberger
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Clemens Niederberger.
+% --------------------------------------------------------------------------
+% If you have any ideas, questions, suggestions or bugs to report, please
+% feel free to contact me.
+% --------------------------------------------------------------------------
+\PassOptionsToPackage{ngerman,english}{babel}
+\documentclass[load-preamble+]{cnltx-doc}
+\usepackage[utf8]{inputenc}
+
+\usepackage{varioref}
+\usepackage{amsmath}
+\usepackage{array,booktabs}
+\usepackage{tikz}
+\usetikzlibrary{chains}
+
+\setcnltx{
+ name = cnltx ,
+ title = the cnltx bundle ,
+ version = \csname cnltx@@version\endcsname ,
+ date = \csname cnltx@@date\endcsname ,
+ subtitle = Documentation for \LaTeXe\ Packages or Classes ,
+ info = \LaTeX\ tools and documenting facilities the
+ \texorpdfstring{\textsc{cn}}{CN} way ,
+ authors = Clemens Niederberger ,
+ email = contact@mychemistry.eu ,
+ url = https://github.com/cgnieder/cnltx ,
+ abstract = {%
+ A versatile bundle of packages and classes for consistent formatting of
+ control sequences, package options, source code examples, and writing a
+ package manual (including an index containing the explained control
+ sequences, options, \ldots).\par
+ The bundle also provides several other small ideas of mine such as a
+ mechansim for providing abbreviations \etc. Not at least it provides a
+ number of programming tools.%
+ } ,
+ index-setup = { othercode=\footnotesize,level=\section},
+ add-cmds = {
+ % internal macros:
+ cnltx@babel@options,
+ cnltx@bibtex@listings@style,
+ cnltx@caption@font, cnltx@captionlabel@font,
+ cnltx@define@colorscheme,
+ cnltx@gobble,
+ cnltx@ifcounter,
+ cnltx@ifisnum,
+ cnltx@ifpunctuation,
+ cnltx@ifsym,
+ cnltx@listings@style, cnltx@load@module, cnltx@load@modules,
+ cnltx@make@active, cnltx@make@letter, cnltx@make@other,
+ cnltx@makeindex@listings@style,
+ cnltx@mdframed@options,
+ cnltx@restore@catcode, cnltx@restore@catcodes,
+ cnltx@save@catcode, cnltx@save@catcodes,
+ cnltx@set@catcode, cnltx@set@catcodes,
+ cnltx@scrartcl@options,
+ cnltx@trailpunct,
+ cnltx@treat@lst@index,
+ % official macros:
+ AD, AM, BC,
+ changedversion, cls, cnltxacronym, cnltxat, cnltxbang, cnltxequal, code,
+ codefont, command, cs, csidx, ctan, CTAN, CTANurl,
+ darg, DeclareCounterRepresentation, Default, default, definecolorscheme,
+ dsh,
+ eg, env, envidx, environment, expandable,
+ iftest, indexcs, inputexample, inputsidebyside, inputsourcecode,
+ key, keybool, keychoice, keyval,
+ lppl, LPPL,
+ marg, Marg, module, Module,
+ name, newabbr, newarg, newcounterrepresentation, newname, newnote,
+ newpackagename, newinputsourcefilecmd, newsourcecodeenv,
+ oarg, opt, option,
+ PM, pkg, providecounterrepresentation,
+ renewcounterrepresentation,
+ sarg, setcnltx, sinceversion, sourceformat,
+ unexpandable, usf, usw,
+ vgl, Vgl,
+ zB, ZB
+ },
+ add-silent-cmds = {
+ @foo,
+ ab,AB, at,
+ carlisle, cd, chead, circled,circlenumber, cnltx,
+ foo, foothree,
+ GetTranslation,
+ href,
+ KOMAoptions,
+ lipsum,
+ minusone,multoffourrm,
+ nohyperpage,
+ pdf@shellescape,
+ superiors@spaced,
+ textsu,
+ twodigits
+ } ,
+ add-envs = {
+ commands,
+ environments,
+ example,
+ options,
+ sidebyside,sourcecode
+ },
+ add-frame-options = {
+ innerleftmargin=2em
+ }
+}
+
+\defbibheading{bibliography}[\bibname]{\section{#1}}
+
+\makeatletter
+\newcommand*\cnltxhyphen{\texorpdfstring{\cnltx@hyphen}{-}}
+\newrobustcmd*\cnltx@hyphen{\penalty\@M-\hskip\z@skip}
+\makeatother
+
+\newpackagename\cnltxbase{cnltx\cnltxhyphen base}
+\newpackagename\cnltxcsnames{cnltx\cnltxhyphen csnames}
+\newpackagename\cnltxdoc{cnltx\cnltxhyphen doc}
+\newpackagename\cnltxexample{cnltx\cnltxhyphen example}
+\newpackagename\cnltxlistings{cnltx\cnltxhyphen listings}
+\newpackagename\cnltxtools{cnltx\cnltxhyphen tools}
+\newpackagename\cnltxtranslations{cnltx\cnltxhyphen translations}
+
+\newnote*\bypackage[1]{provided by \csname cnltx#1\endcsname}
+\newnote*\byclass{provided by \cnltxdoc}
+
+\newname\oberdiek{Heiko Oberdiek}
+\newname\egreg{Enrico Gregorio}
+\newname\heinz{Carsten Heinz}
+\newname\moses{Brooks Moses}
+\newname\hoffmann{Jobst Hoffmann}
+\newname\daniel{Marco Daniel}
+
+\usepackage{fixfoot}
+\DeclareFixedFootnote\oberdiekfn{\CTANurl{oberdiek}}
+
+\newcommand*\file[1]{\code{#1}}
+\newidxcmd\prg{\code{#1}}[ (program)]
+\newcommand*\latin[1]{\cnltxlatin{#1}}
+
+\newcommand*\PDF{\cnltxacronym{PDF}{pdf}}
+
+\newenvironment{colors}
+ {%
+ \def\colour##1{\item[]\code{\textcolor{##1}{##1}}\hfill\newline}%
+ \cnltxlist
+ }
+ {\endcnltxlist}
+
+\def\at{\cnltxat}
+\def\bang{\cnltxbang}
+\def\equal{\cnltxequal}
+
+\newcommand*\BibTeX{\texorpdfstring{\hologo{BibTeX}}{BibTeX}}
+
+\begin{document}
+
+\part{About The Bundle}
+
+\section{Background}
+
+The \cnltx\ bundle contains different packages and classes\footnote{Well,
+ \emph{one} class for the time being,}. I developed it as a successor of my
+class \cls{cnpkgdoc}~\cite{cls:cnpkgdoc} that I used until now for writing the
+documentation of my packages. The intention behind the new bundle is a
+cleaner interface and less unnecessary ballast, hence the separation into
+packages and classes. This is actually a bit of a contradiction: the document
+class \cnltxdoc\ loads \emph{all} packages of the bundle which makes it more
+feature-rich than \cls{cnpkgdoc} ever used to be. The bundle provides source
+code environments that also print the output and defines quite a lot of macros
+for formatting of control sequence names, package names, package options and
+so on.
+
+Part of the motivation is also that users have asked me how I created the
+manuals for my packages. Now I can refer to this bundle.
+
+Another reason for the splitting into separate packages is -- besides the
+advantage of easier maintenance -- is that I wanted to add programming tools
+that I often use into \cnltxbase\ which may allow me (and others) to use them
+for other packages, too, without having to define them each time. So it is
+quite likely that \cnltxbase\ will get extended in the future.
+
+The bundle provides \pkg{listings} style for \LaTeX\ code, bibliography
+database files and index style files. It provides a \pkg{biblatex} citation
+and bibliography style closely linked to \cnltxdoc. It provides a
+bibliography database file containing many \LaTeX\ packages. It
+provides\ldots\ Let's stop here. You see that the bundle provides a lot of
+different features which explains why this manual is more than 60~pages long.
+
+The most detailed documentation for the bundle is as always the source code of
+the \file{sty} and \file{cls} files but I'm trying to provide a documentation
+as comprehensive as possible. Reading the source files may show how things
+are implemented but the intended use only becomes clear when you read this
+manual.
+
+The bundle reflects the fact that I haven't started using literate
+programming, yet. I don't use \code{docstrip} and don't write \file{dtx}
+files but always write the \file{sty} or \code{cls} files directly. I write
+the manual always at the same time but as a separate file. While I'm entirely
+aware of the advantages of literate programming I never could bring myself to
+start to use it myself. As a consequence I have no idea if this bundle can be
+used for it or not.
+
+Source code formatting is done with the help of the powerful
+\pkg{listings} package~\cite{pkg:listings} by \heinz\ and later \moses, now
+maintained by \hoffmann. The only real drawback I have found with it is
+recognizing starred und un-starred versions of an environment as different
+keywords. This does not seem to be possible which is why indexing of such
+environments will lead to wrong page numbers.
+
+The fancy frames of the source code examples are realized with the
+\pkg{mdframed} package by \daniel~\cite{pkg:mdframed}, loaded with the option
+\keyis*-{framemethod}{tikz}.
+
+Besides all this I included some other ideas of mine in this bundle which are
+all provided by \cnltxtools. This includes a mechansim for defining clever
+abbreviations or macros that make it easy to index names the same way
+\pkg{biblatex} does.
+
+
+\section{Bundled Packages, Classes and Files}
+
+The \cnltx\ bundle currently bundles the following packages, classes and
+files:
+\begin{itemize}
+ \item \sinceversion{0.9}\cnltx\ -- a wrapper package for usage in documents.
+ It loads one or more of the following packages. See
+ section~\ref{sec:usage-bundle} for details on the usage. \\
+ \verbcode+\usepackage{cnltx}+
+ \item \cnltxbase\ -- a package that defines base macros for error-messaging,
+ expansion control, tokenlist manipulation and defining of expandable
+ macros. It also provides color definitions and defines a few color
+ schemes for the \cnltxdoc\ class. All other packages and classes of the
+ \cnltx\ bundle load this package. This package can be used
+ stand-alone. \\
+ \verbcode+\usepackage{cnltx-base}+\\
+ The packages commands are not described in the main part of this
+ documentation but only in section~\ref{sec:defined-cnltxbase}, \ie, in the
+ appendix.
+ \item \cnltxdoc\ -- a class for writing package manuals. Loads
+ \cnltxexample\ and \cnltxtools\ and implicitly all other files of the
+ bundle. \\
+ \verbcode+\documentclass{cnltx-doc}+
+ \item \cnltxexample\ -- a package that defines macros and environments for
+ describing control sequences and options and for including source code.
+ Loads \cnltxlistings. This package can be used stand-alone. \\
+ \verbcode+\usepackage{cnltx-example}+
+ \item \sinceversion{0.4}\cnltxlistings\ -- a package that defines the
+ listings language `BibTeX'. Also defines a list of highlighted control
+ sequence names and environment names, loaded by \cnltxexample. The
+ additional control sequence and environment names used to be defined in
+ \cnltxcsnames. That package got removed and its contents are now provided
+ by \cnltxlistings. This package can be used stand-alone. \\
+ \verbcode+\usepackage{cnltx-listings}+
+ \item \sinceversion{0.2}\cnltxtools\ -- a package that defines tools used by
+ \cnltxdoc\ that are unrelated to \LaTeX\ documentation \latin{per se}.
+ This package can be used stand-alone. \\
+ \verbcode+\usepackage{cnltx-tools}+
+ \item \sinceversion{0.11}\cnltxtranslations\ -- a package that provides
+ translations needed by the other modules. It makes no sense to use this
+ package standalone although it's possible.
+ \item \file{cnltx.ist} -- an index style file that is used when the option
+ \option{add-index} for \cnltxdoc\ is activated and the option
+ \option{index-style} is not used.
+ \item \sinceversion{0.4}\file{cnltx.bib} -- a bibliography file that
+ contains a small but growing number of package entries, see
+ section~\ref{sec:list-entr-bib}. Used by \cnltxdoc\ when the
+ \option{add-bib} is used.
+ \item \sinceversion{0.4}\file{cnltx.bbx}, \file{cnltx.cbx} and
+ \file{cnltx.dbx} -- files related to the \pkg{biblatex} style
+ \code{cnltx}. The \pkg{biblatex} style defined in those files is used
+ when the \option{add-bib} for \cnltxdoc\ is used.
+\end{itemize}
+
+\section{License and Requirements}\label{sec:license}
+\license
+
+The \cnltxbase\ package loads the following packages:
+\needpackage{pgfopts}~\cite{pkg:pgfopts},
+\needpackage{etoolbox}~\cite{pkg:etoolbox},
+\pkg{ltxcmds}\oberdiekfn~\cite{pkg:ltxcmds},
+\pkg{pdftexcmds}\oberdiekfn~\cite{pkg:pdftexcmds},
+\needpackage{trimspaces}~\cite{pkg:trimspaces} and
+\needpackage{xcolor}~\cite{pkg:xcolor}.
+
+The \cnltxdoc\ class loads the packages \cnltxbase, \cnltxexample,
+\cnltxtranslations, \needpackage{ulem}~\cite{pkg:ulem},
+\needpackage[macros/latex/required/tools]{multicol}~\cite{pkg:multicol},
+\needpackage[macros/latex/contrib/ms]{ragged2e}~\cite{pkg:ragged2e},
+\needpackage{marginnote}~\cite{pkg:marginnote} and
+\needpackage{hyperref}~\cite{pkg:hyperref}. It is a wrapper class for the
+\KOMAScript\ class
+\cls{scrartcl}\footnote{\CTANurl{koma-script}}~\cite{bnd:koma-script}. The
+class has the option \option{load-preamble} which when used will load
+additional packages, see section~\vref{sec:preamble} for details.
+
+The \cnltxexample\ package loads the packages: \cnltxbase, \cnltxlistings,
+\cnltxtools, \cnltxtranslations, \needpackage{mdframed}~\cite{pkg:mdframed},
+\needpackage{textcomp}~\cite{pkg:textcomp},
+\needpackage{idxcmds}~\cite{pkg:idxcmds},
+\needpackage{ifxetex}~\cite{pkg:ifxetex},
+\needpackage{adjustbox}~\cite{pkg:adjustbox}.
+
+The \cnltxlistings\ package loads the packages \cnltxbase,
+\needpackage{listings}~\cite{pkg:listings} and
+\needpackage{catchfile}~\cite{pkg:catchfile}.
+
+The \cnltxtools\ package loads the packages \cnltxbase, \cnltxtranslations and
+\pkg{accsupp}\oberdiekfn~\cite{pkg:accsupp}.
+
+\cnltxtranslations\ loads the \pkg{translations}
+package~\cite{pkg:translations}.
+
+All other packages that are loaded are loaded by the mentioned packages and
+not directly by any of the packages or classes of the \cnltx\ bundle. Like
+all of my packages \cnltx\ implicitly relies on an up to date \TeX\
+distribution.
+
+\section{Usage of the Bundle}\label{sec:usage-bundle}
+The intended use of this bundle is three-fold:
+\begin{itemize}
+ \item The main use-case is documenting my own \LaTeX\ packages. This is
+ done with
+ \begin{sourcecode}[gobble=6]
+ \documentclass{cnltx-doc}
+ \end{sourcecode}
+ and actually loads most if not all of the bundle.
+ \item The module \cnltxbase\ is also intended as a programming tools package
+ that will be used in other packages eventually. For example it is used by
+ the \pkg{cntformats} package from the \bnd{exsheets}
+ bundle~\cite{bnd:exsheets}.
+ \item In case parts of this bundle prove useful to be used in a document the
+ recommended way is to add
+ \begin{sourcecode}[gobble=6]
+ \usepackage{cnltx}
+ \end{sourcecode}
+ to the preamble which will load the \cnltxbase\ module. Other needed
+ modules can be given as package option by using the name part after the
+ dash as option.
+ \begin{sourcecode}[gobble=6]
+ \usepackage[example]{cnltx}
+ \end{sourcecode}
+ would load \cnltxexample.
+ \item Parts of the bundle -- especially \cnltxbase\ -- may prove useful in
+ other packages. The loading the packages directly as indicated in
+ section~\ref{sec:license} seems the best way. After loading \cnltxbase\
+ the other modules can also be loaded with \verbcode+\cnltx@load@module+,
+ see section~\ref{sec:related-bundle} for details.
+\end{itemize}
+
+\part{Details of Available Commands, Environments and Options}
+
+\section{Options and Setup}
+The \cnltx\ bundle has a large number of options. The \cnltxdoc\ class only
+knows a few options (described in section~\vref{sec:class:options}) as
+\emph{class} options, though. All other options regardless if they're defined
+by a package or a class can and should be set with the setup command:
+\begin{commands}
+ \command{setcnltx}[\marg{options}]
+ Setup command for the \cnltx\ bundle. This command is provided by
+ \cnltxbase.
+\end{commands}
+The source code environments defined by the \cnltxexample\ package also have
+optional arguments that can be used to set the options for the environment
+locally.
+
+\section{Available Commands}
+\subsection{Description of Macros, Environments and Options}\label{sec:cmds:macros}
+
+The commands described in this section all are provided by the \cnltxexample\
+package\bypackage{example}. They all are related to the typesetting of
+provided macros, options and the like.
+
+\begin{commands}
+ \command{code}[\marg{arg}]
+ Formatting of source code. This is \emph{no} verbatim command. Used
+ internally in the following commands.
+ \command{verbcode}[\meta{char}\meta{code}\meta{char}]
+ \sinceversion{0.2}A verbatim command that uses the same formatting as the
+ source code example environments, \cf\ section~\ref{sec:usage:examples}.
+ This is a wrapper for \cs*{lstinline} which loads the corresponding
+ style.
+ \command{cs}[\sarg\marg{name}]
+ Format the control sequence \meta{name}, \cs{cs}\Marg{name}:
+ \cs*{name}. Adds a corresponding index entry. The starred form does not
+ add an index entry.
+ \command{csidx}[\marg{name}]
+ Adds an index entry but does not typeset the control sequence
+ \meta{name}.
+ \command{env}[\sarg\marg{name}]
+ Format the environment \meta{name}, \cs{env}\Marg{name}:
+ \env*{name}. Adds a corresponding index entry with a hint that the entry
+ refers to an environment. The starred form does not add an index entry.
+ \command{envidx}[\marg{name}]
+ Adds an index entry but does not typeset the environment \meta{name}.
+ \command{meta}[\marg{meta}]
+ Description of an argument, \cs{meta}\Marg{meta}: \meta{meta}.
+ \command{marg}[\marg{arg}]
+ A mandatory argument. \meta{arg} is formatted with \cs{meta} if it is not
+ blank, \cs{marg}\Marg{arg}: \marg{arg}.
+ \command{Marg}[\marg{arg}]
+ \sinceversion{0.2}A mandatory argument. \meta{arg} is formatted with
+ \cs{code} if it is not blank, \cs{Marg}\Marg{arg}: \Marg{arg}.
+ \command{oarg}[\marg{arg}]
+ An optional argument. \meta{arg} is formatted with \cs{meta} if it is not
+ blank, \cs{oarg}\Marg{arg}: \oarg{arg}.
+ \command{Oarg}[\marg{arg}]
+ \sinceversion{0.2}An optional argument. \meta{arg} is formatted with
+ \cs{code} if it is not blank, \cs{Oarg}\Marg{arg}: \Oarg{arg}.
+ \command{darg}[\marg{arg}]
+ An argument with parentheses as delimiters. \meta{arg} is formatted with
+ \cs{meta} if it is not blank, \cs{darg}\Marg{arg}: \darg{arg}.
+ \command{Darg}[\marg{arg}]
+ \sinceversion{0.2}An argument with parentheses as delimiters. \meta{arg}
+ is formatted with \cs{code} if it is not blank, \cs{Darg}\Marg{arg}:
+ \Darg{arg}.
+ \command{sarg}
+ An optional star argument, \cs{sarg}: \sarg.
+ \command{newarg}[\oarg{arg formatting}\marg{cs}\marg{left delim}\marg{right delim}]%
+ \Default{\cs{meta}}
+ \changedversion{0.2}Command used to define the argument commands:
+ \verbcode+\newarg\marg{\{}{\}}+. The optional argument determines how the
+ argument of the new command will be formatted. This is done with
+ \cs{meta} per default. \cs{Marg} is defined
+ \verbcode+\newarg[\code]\Marg{\{}{\}}+.
+ \command{option}[\sarg\marg{name}]
+ An option \meta{name}, \cs{option}\Marg{name}: \option{name}. Adds a
+ corresponding index entry. The starred form does not add an index entry.
+ \command{optionidx}[\marg{name}]
+ Adds an index entry but does not typeset the option \meta{name}.
+ \command{module}[\sarg\marg{name}]
+ A module \meta{name}, \cs{module}\Marg{name}: \module{name}. Adds a
+ corresponding index entry. The starred form does not add an index entry.
+ In some of my packages I like to organize options by grouping them in
+ different classes that I call ``modules''. This command refers to those
+ modules.
+ \command{moduleidx}[\sarg\marg{name}]
+ Adds an index entry but does not typeset the option \meta{name}.
+ \command{key}[\sarg\code{-}\marg{name}\marg{value}]
+ A key \meta{name} with value \meta{value}, the optional star prevents an
+ index entry, the optional \code{-} strips the braces around \meta{value};
+ \cs{key}\Marg{key}\Marg{value}: \key{key}{value};
+ \cs{key}\code{-}\Marg{key}\Marg{value}: \key-{key}{value}
+ \command{keyis}[\sarg\code{-}\marg{name}\marg{value}]
+ \sinceversion{0.2}A key \meta{name} set to value \meta{value}, the
+ optional star prevents an index entry, the optional \code{-} strips the
+ braces around \code{value}; \cs{key}\Marg{keyis}\Marg{value}:
+ \keyis{key}{value}.
+ \command{choices}[\marg{clist of choices}]
+ A list of choices, \cs{choices}\Marg{one,two,three}:
+ \choices{one,two,three}
+ \command{choicekey}[\marg{name}\marg{clist of choices}]
+ A key \meta{name} with a list of possible values,
+ \cs{choicekey}\Marg{key}\Marg{one,two,three}:
+ \choicekey{key}{one,two,three}
+ \command{boolkey}[\marg{name}]
+ A boolean key \meta{name} with choices \code{true} and \code{false},
+ \cs{boolkey}\Marg{key}: \boolkey{key}
+ \command{default}[\marg{value}]
+ Markup for a default choice,
+ \cs{choices}\Marg{one,\cs{default}\Marg{two},three}:
+ \choices{one,\default{two},three}
+\end{commands}
+
+
+\subsection{Versioning Commands, Licensing and Related Stuff}\label{sec:cmds:versioning}
+
+The commands described in this section are provided by the \cnltx\
+class\byclass\ except where indicated differently. These commands are related
+to information about the legal stuff of a package and where to find it on th
+world wide web.
+
+\begin{commands}
+ \command{sinceversion}[\marg{version}]
+ \sinceversion{0.0}Gives a sidenote like the one on the left.
+ \command{changedversion}[\marg{version}]
+ \changedversion{0.0}Gives a sidenote like the one on the left.
+ \command{newnote}[\sarg\marg{cs}\oarg{num}\oarg{optional}\marg{definition}]
+ Defines a note like \cs{sinceversion}. The syntax of the command is the
+ same as the one of \cs*{newcommand}. \cs{sinceversion} was defined as
+ follows:\\
+ \verbcode+\newnote*\sinceversion[1]{Introduced in version~#1}+\\
+ or actually like this:\\
+ \verbcode+\newnote*\sinceversion[1]{\GetTranslation{cnltx-introduced}~#1}+
+ \command{newpackagename}[\marg{cs}\marg{name}]
+ Define a comand \meta{cs} that prints \meta{name} formatted like \cnltx,
+ \ie\ in small caps and colored with the color \code{cnltx} (see
+ section~\ref{sec:actual-used-color}).
+ \command{lppl}
+ Typesets ``\lppl'' and adds a corresponding index entry.
+ \command{LPPL}
+ Typesets ``\LPPL'' and adds the same index entry as \cs{lppl}.
+ \command{license}[\sarg\oarg{maintenance status}]\Default{maintained}
+ \changedversion{0.2}Typesets `\license*'. The un-starred variant adds a
+ \cs*{par}.
+ \command{ctan}
+ Typesets ``\ctan'' and adds a corresponding index entry.
+ \command{CTAN}
+ Typesets ``\CTAN'' and adds the same index entry as \cs{ctan}.
+ \command{pkg}[\sarg\marg{package}]
+ \bypackage{example}Format the package name \meta{package} and add an
+ index entry. The starred variant adds nothing to the index.
+ \command{pkgidx}[\marg{package}]
+ \bypackage{example}Add an index entry for the package \meta{package}.
+ \command{cls}[\sarg\marg{class}]
+ \bypackage{example}Format the class name \meta{class} and add an index
+ entry. The starred variant adds nothing to the index.
+ \command{clsidx}[\marg{class}]
+ \bypackage{example}Add an index entry for the class \meta{class}.
+ \command{CTANurl}[\oarg{directory}\marg{name}]
+ Writes a \ctan\ link like the ones in section~\vref{sec:license} in the
+ footnotes. The predefined directory is \code{macros/latex/contrib}. The
+ link address will be:\par
+ \code{http://mirrors.ctan.org/\meta{directory}/\meta{name}/}.
+ \command{email}[\marg{email address}]
+ \sinceversion{0.11}A wrapper for \verbcode+\href{mailto:#1}{#1}+.
+ \command{website}[\marg{web address}]
+ \sinceversion{0.11}A wrapper for \verbcode+\href{http://#1/}{#1}+.
+ \command{securewebsite}[\marg{web address}]
+ \sinceversion{0.11}A wrapper for \verbcode+\href{https://#1/}{#1}+.
+ \command{needpackage}[\oarg{directory}\marg{name}]
+ \sinceversion{0.2}A wrapper for
+ \verbcode+\pkg{#2}\footnote{\CTANurl[#1]{#2}}+
+ \command{needclass}[\oarg{directory}\marg{name}]
+ \sinceversion{0.2}A wrapper for
+ \verbcode+\cls{#2}\footnote{\CTANurl[#1]{#2}}+
+\end{commands}
+
+\begin{example}
+ \newpackagename{\foothree}{foo-3}%
+ now \foothree\ looks like \cnltx.
+\end{example}
+
+\subsection{Input Source Code Files}
+Similar to the environments described in section~\vref{sec:envs:sourcecode}
+\cnltxexample\ provides a few commands for inputting source code files,
+formatting and printing the source code and inputting the file directly.
+\begin{commands}
+ \command{inputexample}[\oarg{options}\marg{file name}]
+ The equivalent of the \env{example} environment, see
+ section~\vref{sec:envs:sourcecode}.
+ \command{inputsidebyside}[\oarg{options}\marg{file name}]
+ The equivalent of the \env{sidebyside} environment, see
+ section~\vref{sec:envs:sourcecode}.
+ \command{inputsourcecode}[\oarg{options}\marg{file name}]
+ The equivalent of the \env{sourcecode} environment, see
+ section~\vref{sec:envs:sourcecode}.
+ \command{implementation}[\oarg{options}\marg{file name}]
+ \sinceversion{0.5}A wrapper for
+ \verbcode+\lstinputlisting[style=cnltx,#1]{#2}+
+\end{commands}
+
+It is possible to define further commands like this:
+\begin{commands}
+ \command{newinputsourcefilecmd}[\oarg{option}\marg{control sequence}]
+ Defines \meta{control sequence} as a new source code input command where
+ \meta{options} are preset.
+\end{commands}
+
+The existing commands have been defined like this:
+\begin{sourcecode}
+ \newinputsourcefilecmd\inputexample
+ \newinputsourcefilecmd[side-by-side]\inputsidebyside
+ \newinputsourcefilecmd[code-only]\inputsourcecode
+\end{sourcecode}
+
+\section{Available Environments}\label{sec:envs}
+\subsection{Description Environments}\label{sec:envs:description}
+\cnltxdoc\ defines some description environments used to describe macros,
+environments or options.
+
+\begin{environments}
+ \environment{commands}
+ A description-like environment for describing commands. While this
+ environment is a list internally and thus recognizes \cs*{item} own
+ commands are used to describe macros. They are explained in
+ section~\vref{sec:usage:commands}.
+ \environment{options}
+ A description-like environment for describing options. While this
+ environment is a list internally and thus recognizes \cs*{item} own
+ commands are used to describe options. They are explained in
+ section~\vref{sec:usage:options}.
+ \environment{environments}
+ A description-like environment for describing environments. While this
+ environment is a list internally and thus recognizes \cs*{item} own
+ commands are used to describe environments. They are explained in
+ section~\vref{sec:usage:environments}.
+\end{environments}
+
+These environments are lists all using the same internal \cs*{list}. The
+setup of this list can be changed via an option:
+
+\begin{options}
+ \keyval{list-setup}{definitions}{}
+ \Default{\cs*{leftmargin}=0pt \cs*{labelwidth}=2em \cs*{labelsep}=0pt
+ \cs*{itemindent}=-1em }
+ The setup of the \cs*{list} used by the \env{commands}, \env{options} and
+ \env{environments} environments.
+\end{options}
+
+\subsection{Source Code Environments}\label{sec:envs:sourcecode}
+\cnltxexample\ defines the following environments that are used to display
+source code and possibly the output of the source code, too.
+
+\begin{environments}
+ \environment{example}[\oarg{options}]
+ This environment is a formatted verbatim environment that also inputs the
+ output of the inputted code. This environment is described in
+ section~\vref{sec:usage:examples}.
+ \environment{sidebyside}[\oarg{options}]
+ This environment is a formatted verbatim environment that also inputs the
+ output of the inputted code. Source and output are printed side-by-side.
+ This environment is described in section~\vref{sec:usage:examples}.
+ \environment{sourcecode}[\oarg{options}]
+ This environment is a formatted verbatim environment. This environment is
+ described in section~\vref{sec:usage:examples}.
+\end{environments}
+
+\sinceversion{0.2}In each of these environments certain hooks are provided
+that can be used to add definitions you like:
+\begin{options}
+ \keyval{pre-code}{definitions}
+ \meta{definitions} are placed before the source code is inserted.
+ \keyval{after-code}{definitions}
+ \meta{definitions} are placed after the source code is inserted.
+ \keyval{pre-output}{definitions}
+ \meta{definitions} are placed before the output of the source code is
+ inserted.
+ \keyval{after-output}{definitions}
+ \meta{definitions} are placed after the output of the source code is
+ inserted.
+\end{options}
+
+It is possible to define further environments like this:
+\begin{commands}
+ \command{newsourcecodeenv}[\oarg{option}\marg{name}]
+ Defines \meta{name} as a new source code environment where
+ \meta{options} are preset.
+\end{commands}
+
+The existing environments have been defined like this:
+\begin{sourcecode}
+ \newsourcecodeenv{example}
+ \newsourcecodeenv[side-by-side]{sidebyside}
+ \newsourcecodeenv[code-only]{sourcecode}
+\end{sourcecode}
+
+\section{Usage of the Various Functions}
+\subsection{Command Descriptions}\label{sec:usage:commands}
+Inside of the environment \env{commands} that was introduced in
+section~\vref{sec:envs:description} items are input via the following command:
+\begin{commands}
+ \command{command}[\sarg\marg{name}\oarg{stuff after}]
+ This macro formats a control sequence with \cs{cs} and puts a line break
+ after it. The optional argument allows printing things directly after the
+ command name and can thus be used for adding arguments. The star prevents
+ the creation of an index entry.
+ \command{Default}[\sarg\code{!}\marg{code}]
+ \changedversion{0.3}This command can be placed after \cs{command} or
+ \cs{opt} in order to give a default definition of a macro or a default
+ value of an option. The definition will then be placed on the same line
+ flush right. The star prevents the insertion of \cs*{newline} after it.
+ The optional bang adds the information that an option is mandatory, \ie\
+ has to be set.
+ \command{expandable}
+ \sinceversion{0.5}Adds the symbol \expandablesymbol\ to the left of a
+ command in the margin to indicate that the command is expandable. This
+ command should be used \emph{immediately} before \cs{command}.
+ \command{unexpandable}
+ \sinceversion{0.5}Adds the symbol \unexpandablesymbol\ to the left of a
+ command in the margin to indicate that the command is not expandable.
+ This command should be used \emph{immediately} before \cs{command}.
+ \command{expandablesign}\Default{\cs*{textasteriskcentered}}
+ \sinceversion{0.5}The macro that holds the sign used by \cs{expandable}
+ and \cs{unexpandable}.
+ \command{expandablesymbol}
+ \sinceversion{0.11}The symbol \expandablesymbol, \ie, \cs{expandablesign}
+ formatted with the color \code{expandable}.
+ \command{unexpandablesymbol}
+ \sinceversion{0.11}The symbol \unexpandablesymbol, \ie,
+ \cs{expandablesign} formatted with the color \code{unexpandable}.
+\end{commands}
+
+\begin{example}
+ \begin{commands}
+ \command{cs}
+ This is about foo bar baz.
+ \command{cs}[\marg{arg}]
+ This one has an argument.
+ \command{cs}[\sarg\oarg{option}]
+ This has a star variant and an optional argument.
+ \command{cs}\Default{foo bar}
+ This one has the default replacement text \code{foo bar}
+ \expandable\command{cs}
+ This macro is expandable.
+ \end{commands}
+\end{example}
+
+The \cs{expandablesign} can of course be redefined to something else you like
+better. For the sake of completeness there is an option that does exactly
+this:
+\begin{options}
+ \keyval{expandable-sign}{definition}\Default{\cs*{textasteriskcentered}}
+ \sinceversion{0.5}Redefines \cs{expandablesign} to \meta{definition}.
+\end{options}
+
+\subsection{Option Descriptions}\label{sec:usage:options}
+The \env{options} environment knows a few more commands to meet all the
+different kinds of options.
+\begin{commands}
+ \command{opt}[\sarg]
+ An option. The star prevents an index entry.
+ \command{keyval}[\sarg\code{-}\marg{key}\marg{value}]
+ A key/value option. The optional star prevents an index entry. The
+ optional \code{-} strips the braces around \meta{value}, see the example
+ below.
+ \command{keychoice}[\sarg\marg{key}\marg{list of choices}]
+ A key/value option where the value is one of a list of choices. The star
+ prevents an index entry.
+ \command{keybool}[\sarg\marg{name}]
+ A boolean key, that ist a choice key with choices \code{true} and
+ \code{false}. The star prevents an index entry.
+ \command{Default}[\sarg\code{!}\marg{code}]
+ \changedversion{0.3}This command can be placed after \cs{command} or
+ \cs{opt} (or any of the other commands for adding an option to the
+ \env{options} list) in order to give a default definition of a macro or a
+ default value of an option. The definition will then be placed on the
+ same line flush right. The star prevents the insertion of \cs*{newline}
+ after it. The optional bang adds the information that an option is
+ mandatory, \ie, it has to be set.
+ \command{Module}[\sarg\code{!}\marg{name}]
+ \sinceversion{0.3}This command can be placed after \cs{option} but before
+ \cs{Default} in order to determine the module the option belongs to. It
+ will be written in the left margin next to the option name. The star
+ prevents the insertion of \cs*{newline} after it. The optional bang
+ \emph{adds} an index entry for the module. This is somehow inconsistent
+ with many of the other commands where an optional star \emph{prevents} an
+ index entry but it fits to the functionality of \cs{Default} which is why
+ this syntax was chosen.
+\end{commands}
+
+The following demonstrates how the commands would be used to create option
+descriptions:
+\begin{sourcecode}
+ \begin{options}
+ \opt{foo}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \opt*{foo}\Default{bar}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \opt{foo}\Module{bar}
+ This option belongs to \module*{bar}. Let's add a few more words so
+ that the line gets filled and we can see how the output actually
+ looks.
+ \opt{foo}\Module{bar}\Default{baz}
+ This option belongs to \module*{bar}. Let's add a few more words so
+ that the line gets filled and we can see how the output actually
+ looks.
+ \keyval{foo}{bar}\Default
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keyval{foo}{bar}\Default!
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keyval*{foo}{bar}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keyval-{foo}{bar}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keychoice{foo}{one,two,three}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keybool{foo}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \end{options}
+\end{sourcecode}
+
+The code above gives the following output:
+\begin{options}
+ \opt{foo}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \opt*{foo}\Default{bar}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \opt{foo}\Module{bar}
+ This option belongs to the module \module{bar}. Let's add a few more
+ words so that the line gets filled and we can see how the output actually
+ looks.
+ \opt{foo}\Module{bar}\Default{baz}
+ This option belongs to the module \module{bar}. Let's add a few more
+ words so that the line gets filled and we can see how the output actually
+ looks.
+ \keyval{foo}{bar}\Default
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keyval{foo}{bar}\Default!
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keyval*{foo}{bar}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keyval-{foo}{bar}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keychoice{foo}{one,two,three}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+ \keybool{foo}
+ This makes stuff. Let's add a few more words so that the line gets
+ filled and we can see how the output actually looks.
+\end{options}
+
+\subsection{Environment Descriptions}\label{sec:usage:environments}
+Environment descriptions are made -- unsurprisingly -- with the
+\env{environments} environment. It knows the command \cs{environment}:
+
+\begin{commands}
+ \command{environment}[\sarg\marg{name}\oarg{stuff after}]
+ This macro prints the environment name and puts a line break
+ after it. The optional argument allows printing things directly after the
+ environment name and can thus be used for adding arguments.
+\end{commands}
+
+\begin{example}
+ \begin{environments}
+ \environment*{foobar}[\oarg{options}]
+ This is environment \env*{foobar}. The star prevents it from being
+ added to the index.
+ \end{environments}
+\end{example}
+
+\subsection{Code Examples}\label{sec:usage:examples}
+Code examples can be included through the \env{example} environment or the
+\env{sourcecode} environment. The \env{sourcecode} only shows the piece of
+\LaTeX code while the \env{example} environment also shows the output of the
+\LaTeX\ code.
+\begin{sourcecode}
+ \begin{example}
+ a \LaTeX\ code example
+ \end{example}
+\end{sourcecode}
+This example would give:
+
+\begin{example}
+ a \LaTeX\ code example
+\end{example}
+
+Both environments can be influenced by options:
+\begin{options}
+ \keybool{code-only}\Default{false}
+ Only typeset the code as code but don't include it afterwards. The
+ code box above is an example for the usage of this option. This option
+ has no effect on the \env{sourcecode} environment: is is already set for
+ this environment.
+ \keybool{side-by-side}\Default{false}
+ Typeset source and output side by side. The code is input on the left and
+ the output on the right. Side by side examples are typeset in
+ \env*{minipage} environments with all consequences that come with them
+ (think of \cs*{parindent}, page breaks \ldots). Since a \code{minipage}
+ cannot be broken across pages the surrounding \pkg{mdframed} frame gets
+ the option \keyis*-{nobreak}{true}. This option has no effect on the
+ \env{sourcecode} environment.
+ \keybool{code-left}\Default{true}
+ If \code{true} and the option \option{side-by-side} is chosen the source
+ code is printed on the right side else on the left. This option has no
+ effect on the \env{sourcecode} environment.
+ \keyval{code-sep}{definition}\Default{\cs*{hrulefill}}
+ 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
+same as using the \env{sidebyside} environment):
+
+\begin{example}[side-by-side]
+ a \LaTeX\ code example
+\end{example}
+
+\option{side-by-side} and \keyis-{code-left}{false}:
+
+\begin{example}[side-by-side,code-left=false]
+ a \LaTeX\ code example
+\end{example}
+
+The frame around the examples is done by the
+\pkg{mdframed} package~\cite{pkg:mdframed}. It is of course possible to
+customize it:
+\begin{options}
+ \keyval{add-frame-options}{\pkg{mdframed} options}\Default
+ Add options to the predefined settings.
+ \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}
+package~\cite{pkg:listings} by \heinz, \moses, and \hoffmann. Similar options
+exist to adapt \pkg{listings}' options that are used for formatting the source
+code. The predefined style has many options that will not be mentioned here.
+If you're interested you can find them in \file{cnltx-example.sty} or in
+section~\vref{sec:listings-sourcecode}.
+\begin{options}
+ \keyval-{gobble}{integer}\Default{2}
+ The number of initial characters that is gobbled from each line.
+ \keyval{add-cmds}{list of csnames}\Default
+ A list of control sequence names that should be recognized as a command
+ sequence in the source code examples and should be formatted accordingly.
+ The control sequence names in this list will also get an index entry when
+ they're used in the source example. This is done internally via
+ \cs{csidx}. The option should be used to add the new commands that are
+ defined by the package for which you are writing the manual for.
+ \keyval{add-silent-cmds}{list of csnames}
+ A list of control sequence names that should be recognized as a command
+ sequence in the source code examples and should be formatted accordingly.
+ The control sequence names in this list will \emph{not} get an index entry
+ when they're used in the source example. There already is quite a large
+ but far from comprehensive list of silent commands but many are still
+ missing. This option allows you to extend the list on a per document
+ basis.
+ \keyval{add-listings-options}{\pkg{listings} options}\Default
+ Additional options for the \pkg{listings}~\cite{pkg:listings}
+ environments. \emph{This redefines the \code{cnltx} \pkg{listings} style
+ which will affect all sourcecode environments!}
+ \keyval{listings-options}{\pkg{listings} options}
+ 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{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. 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}
+ Like \option{add-silent-cmds} but for environment names.
+\end{options}
+
+\subsection{Compile Source Examples}\label{sec:comp-source-exampl}
+\subsubsection{The Compliation Process}\label{sec:compliation-process}
+When you input an example like
+\begin{sourcecode}
+ \begin{example}
+ \documentclass{article}
+ \begin{document}
+ foo
+ \end{document}
+ \end{example}
+\end{sourcecode}
+you'll get an error since the code is input as is and you'll end up with
+\cs*{documentclass} after \verbcode=\begin{document}=. There's a way out,
+though.
+
+\cnltxexample\sinceversion{0.9} provides the possibility to compile the source
+code file externally and input the compiled \PDF.
+
+\begin{sourcecode}
+ \begin{example}[compile]
+ \documentclass{article}
+ \begin{document}
+ foo
+ \end{document}
+ \end{example}
+\end{sourcecode}
+
+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:
+
+\begin{options}
+ \keybool{compile}\Default{false}
+ Compile the source code file. Although this option can be set globally it
+ really shouldn't be! It's best to give this option explicitly to the
+ source code environment whose body should be compiled. If enabled
+ globally \emph{all} examples would be compiled and most likely lead to
+ various errors since most examples won't be complete \LaTeX\ documents.
+ \keychoice{program}{pdflatex,lualatex,xelatex,arara}\Default{pdflatex}
+ The program to compile the source file.
+ \keyval{runs}{number}\Default{2}
+ The number of compilations.
+ \keyval{exe-with}{options}\Default
+ Command line options that can be given to the compilation program chosen
+ 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
+separately. Since the pages of the document are most likely as large as the
+ones from the main document itself they are scaled down. This is best
+demonstrated with an example. The following input
+\begin{sourcecode}
+ \begin{example}[compile]
+ \documentclass[a5paper]{scrartcl}
+ \usepackage{showframe,lipsum}
+ \author{Clemens Niederberger}
+ \title{A Test File}
+ \begin{document}
+ \maketitle
+ \tableofcontents
+ \section{A Section Title}
+ \lipsum[1-10]
+ \end{document}
+ \end{example}
+\end{sourcecode}
+will lead to this output:
+
+\begin{example}[compile]
+ \documentclass[a5paper]{scrartcl}
+ \usepackage{showframe,lipsum}
+ \author{Clemens Niederberger}
+ \title{A Test File}
+ \begin{document}
+ \maketitle
+ \tableofcontents
+ \section{A Section Title}
+ \lipsum[1-10]
+ \end{document}
+\end{example}
+
+The pages get scaled according to two parameters:
+\begin{options}
+ \keyval{max-pages}{number}\Default{4}
+ The maximum number of pages in a row. The width of the pages is scaled to
+ $\text{\cs*{linewidth}}/n$ where $n$ is either the number of pages $p$ of
+ the compiled document or \meta{number} if $p>\text{\meta{number}}$.
+ \keyval{max-height}{dimension}\Default{.5\cs*{textheight}}
+ The maximum height of a page.
+\end{options}
+
+There's another possibility to influence the appearance of the output:
+\begin{options}
+ \keyval{graphics}{options}\Default
+ \meta{options} are passed to \cs*{includegraphics} for every page that is
+ input.
+\end{options}
+
+\subsubsection{Floating Output}\label{sec:floating-output}
+Since the output can become a quite large figure it might be preferable to
+have it as a floating figure. This is also possible by using the option
+\option{float}.
+\begin{options}
+ \keychoice{float}{\default{true},false,\meta{float
+ parameters}}\Default{false}
+ Choose if the output should be placed in a \env*{figure} of it's own. You
+ can also use this option to specify the floating parameters for the float.
+ \keyval{float-pos}{float parameters}\Default{tbp}
+ 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. 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.
+
+\subsubsection{Selective Output}\label{sec:selective-output}
+Sometimes it may be preferable not to include all pages of a compiled document
+but only specific pages. This is possible with the following option.
+
+\begin{options}
+ \keyval{pages}{specifications}
+ Select the included pages. \meta{specification} is a comma-separated list
+ of page numbers and page ranges, \eg, \code{1,3,4} or
+ \code{1,3-5}. \code{1,3-5} is the same as \code{1,3,4,5}. If the list
+ includes page numbers larger than the maximum number of pages the \PDF\
+ has a warnung message will be issued and a replacement text will occur in
+ the output where the page would have been.
+\end{options}
+
+The input
+\begin{sourcecode}
+ \begin{example}[compile,pages=1]
+ \documentclass[a5paper]{scrartcl}
+ \usepackage{showframe,lipsum}
+ \author{Clemens Niederberger}
+ \title{A Test File}
+ \begin{document}
+ \maketitle
+ \tableofcontents
+ \section{A Section Title}
+ \lipsum[1-10]
+ \end{document}
+ \end{example}
+\end{sourcecode}
+will lead to this output:
+
+\begin{example}[compile,pages=1]
+ \documentclass[a5paper]{scrartcl}
+ \usepackage{showframe,lipsum}
+ \author{Clemens Niederberger}
+ \title{A Test File}
+ \begin{document}
+ \maketitle
+ \tableofcontents
+ \section{A Section Title}
+ \lipsum[1-10]
+ \end{document}
+\end{example}
+
+Together with the \option{graphics} option this can be used to output a part
+of a page. The following source
+
+\begin{sourcecode}
+ \begin{example}[compile,pages=1,graphics={trim={0pt 12cm 0pt 0pt},clip}]
+ \documentclass[a5paper]{scrartcl}
+ \usepackage{showframe,lipsum}
+ \author{Clemens Niederberger}
+ \title{A Test File}
+ \begin{document}
+ \maketitle
+ \tableofcontents
+ \section{A Section Title}
+ \lipsum[1-10]
+ \end{document}
+ \end{example}
+\end{sourcecode}
+will give this output:
+
+\begin{example}[compile,pages=1,graphics={trim={0pt 12cm 0pt 0pt},clip}]
+ \documentclass[a5paper]{scrartcl}
+ \usepackage{showframe,lipsum}
+ \author{Clemens Niederberger}
+ \title{A Test File}
+ \begin{document}
+ \maketitle
+ \tableofcontents
+ \section{A Section Title}
+ \lipsum[1-10]
+ \end{document}
+\end{example}
+
+\subsection{Example File}
+Let's say you're documenting a package called \code{mypackage} that provides
+the command \cs*{mycommand} and the environment \env*{myenv}. The basic
+manual setup could then look something like this:
+
+\begin{sourcecode}
+ \documentclass[load-preamble]{cnltx-doc}
+ \usepackage[T1]{fontenc}
+ \usepackage[utf8]{inputenc}
+ \usepackage{mypackage}
+ \setcnltx{
+ package = mypackage ,
+ authors = John Doe ,
+ email = john@doe.com ,
+ add-cmds = {mycommand} ,
+ add-envs = {myenv}
+ }
+ \begin{document}
+ ...
+ \end{document}
+\end{sourcecode}
+
+\subsection{Additional Functionality Provided by \cnltxbase}
+The \cnltxbase\ package's main purpose is to provide programming facilities.
+Most of its macros are listed in section~\ref{sec:defined-cnltxbase}.
+However, I like to explain some of its features in a bit more detail.
+
+\subsubsection{Looking for Trailing Punctuation}
+The command \cs{cnltx\at ifpunctuation} is is a conditional that detects if a
+punctuaction mark follows and acts depending on it. What counts as a
+punctuation mark can be set by the user.
+
+\begin{commands}
+ \command{cnltx\at ifpunctuation}[\sarg\oarg{punctuation
+ marks}\marg{true}\marg{false}\meta{trailing punctuation}]
+ The starred version does not gobble the trailing punctuation while the
+ unstarred does. That's why in the unstarred version you can also use
+ \cs{cnltx\at trailpunct} to access the gobbled punctuation mark. The
+ optional argument sets the punctuation marks that should be considered for
+ this use only.
+\end{commands}
+\begin{options}
+ \keyval{set-trail-punct}{punctuation marks}\Default{,.!?;:}
+ Sets the default list of punctuation marks that should be checked if the
+ optional argument of \cs{cnltx\at ifpunctuation} is not used.
+\end{options}
+
+The usage is probably self-explaining:
+\begin{example}
+ \makeatletter
+ \cnltx@ifpunctuation{(test\cnltx@trailpunct)}{(test)}!\par
+ \cnltx@ifpunctuation[.]{(test\cnltx@trailpunct)}{(test)}!\par
+ a punctuation mark \cnltx@ifpunctuation*{follows}{doesn't follow}!\par
+ a full stop \cnltx@ifpunctuation*[.]{follows}{doesn't follow}!
+\end{example}
+
+If the non-starred variant has gobbled a \cs*{par} the \cs*{par} is placed
+back:
+
+\begin{example}
+ \makeatletter
+ \def\test{\cnltx@ifpunctuation{(test\cnltx@trailpunct)}{(test)}}%
+ \makeatother
+ \test
+
+ \test.
+
+ \test{} .
+\end{example}
+
+\subsubsection{Counter Representation Commands}\label{sec:count-repr-comm}
+\minisec{Background}
+
+A counter representation command like \cs*{arabic}\Marg{section} always is a
+command that calls an associated internal command (\cs*{@arabic} in the case
+of our example) that acts on the count associated with the counter:
+\begin{sourcecode}
+ \def\arabic#1{\expandafter\@arabic\csname c@#1\endcsname}
+ \def\@arabic#1{\number #1}
+\end{sourcecode}
+The command \cs*{arabic}\marg{counter} builds a command sequence
+\cs*{c@\meta{counter}} from its argument \meta{counter}. It then calls the
+internal command \cs*{@arabic} that takes this command sequence as an
+argument. The command sequence \cs*{c@\meta{counter}} is the count (in the
+\TeX\ sense) that is associated with the counter \meta{counter}, \ie, it holds
+the actual number. The command \cs*{@arabic} now simply typesets the integer
+value of the count.
+
+The same holds for every counter representation command. The principle always
+is as follows:
+\begin{sourcecode}
+ \def\foo#1{\expandafter\@foo\csname c@#1\endcsname}
+ \def\@foo#1{do something with #1 (where #1 is a count)}
+\end{sourcecode}
+This means in order to get a new counter representation command you actually
+need to define \emph{two} macros.
+
+\cnltxbase\ defines an interface that allows to define both commands at once
+without having to think about \cs*{expandafter}, associated counts, internal
+command names and so on. The only thing left to do is choosing a name for the
+counter representation and providing a valid definition of what should happen
+with the (integer) value of the counter.
+
+\minisec{New Commands}
+
+\begin{commands}
+ \command{DeclareCounterRepresentation}[\marg{command}\marg{definition}]
+ Declares a new counter representation command and its internal equivalent.
+ In the \meta{definition} \code{\#1} is used to refer to the counter
+ \emph{number}, that is, the value of \cs*{c@\meta{counter}}. This command
+ will silently overwrite any existing definition.
+ \command{newcounterrepresentation}[\marg{command}\marg{definition}]
+ Defines a new counter representation command and its internal equivalent.
+ In the \meta{definition} \code{\#1} is used to refer to the counter
+ \emph{number}, that is, the value of \cs*{c@\meta{counter}}. This command
+ will issue an error if either the user command or the internal command
+ (\cf\ \cs*{arabic} and \cs*{@arabic}) already exist.
+ \command{providecounterrepresentation}[\marg{command}\marg{definition}]
+ Provides a new counter representation command and its internal equivalent.
+ In the \meta{definition} \code{\#1} is used to refer to the counter
+ \emph{number}, that is, the value of \cs*{c@\meta{counter}}. This command
+ will define the commands only if neither the user command nor the internal
+ command (\cf\ \cs*{arabic} and \cs*{@arabic}) already exist and will do
+ nothing if either of them exist.
+ \command{renewcounterrepresentation}[\marg{command}\marg{definition}]
+ Redefines an existing counter representation command and its internal
+ equivalent. In the \meta{definition} \code{\#1} is used to refer to the
+ counter \emph{number}, that is, the value of \cs*{c@\meta{counter}}. This
+ command will issue an error if neither the user command nor the internal
+ command (\cf\ \cs*{arabic} and \cs*{@arabic}) already exist.
+\end{commands}
+
+Let's take a look at what is actually defined by these commands:
+\begin{example}
+ \makeatletter\ttfamily
+ before:\par
+ \meaning\arabic\par
+ \meaning\@arabic
+
+ \renewcounterrepresentation\arabic{\the\numexpr#1\relax}%
+ after:\par
+ \meaning\arabic\par
+ \meaning\@arabic
+\end{example}
+
+As you can see nothing bad happens. The commands are only a convenient
+interface. Let's take a look at some more realistic examples. The above
+redefinition was only a demonstration. For example you may want to have a
+representation which calculates the displayed value from the counter value?
+
+\begin{example}
+ \newcounterrepresentation\minusone{\the\numexpr#1-1\relax}%
+ \newcounterrepresentation\multoffourrm{\romannumeral\numexpr(4*#1)-4\relax}%
+ % \newrobustcmd is provided by the `etoolbox' package
+ \newrobustcmd*\circlenumber[1]{%
+ \tikz[baseline]\node[anchor=base,draw,shape=circle]{\number#1};}%
+ \newcounterrepresentation\circled{\circlenumber{#1}}%
+ \makeatletter
+ \newcounterrepresentation\twodigits{\two@digits{#1}}%
+ \makeatother
+ \newcounter{test}%
+ \setcounter{test}{9}
+
+ \minusone{test}\par
+ \multoffourrm{test}\par
+ \circled{test}\par
+ \twodigits{test}
+\end{example}
+
+\subsubsection{Expandable Document Commands}
+The commands presented in this section are highly experimental. \emph{Use them
+ \emph{only} if you really have to!}
+\begin{commands}
+ \command{newexpandablecmd}[\sarg\marg{cs}\oarg{num args}\oarg{default
+ opt}\marg{definition}]
+ \sinceversion{0.7}This command has the same syntax as \cs*{newcommand}.
+ The difference is that if \meta{cs} is defined with an optional argument
+ it is still fully expandable. This comes with a cost: in order to still
+ being able to check for the optional argument it needs to see a following
+ token as argument. If it is used without optional argument and has no
+ mandatory arguments it may be necessary to add a trailing \cs*{empty} or
+ something. There's another drawback: a command \cs*{test} thus defined
+ cannot distinguish between \verbcode+\test[]+ and \verbcode+\test{[}]+ and
+ will misinterpret the second as a present optional argument.
+
+ My recommendation is to never use this for defining a user
+ command.\footnote{I can see the contradiction here: if a command is no
+ user command there is no need for an optional argument.} Use it in code
+ you can control and only if you have to.
+
+ If you define a command \emph{without} optional argument this command
+ falls back to \cs*{newcommand}.
+ \command{renewexpandablecmd}[\sarg\marg{cs}\oarg{num args}\oarg{default
+ opt}\marg{definition}]
+ \sinceversion{0.7}The equivalent of \cs*{renewcommand}. See description of
+ \cs{newexpandablecmd} for further details.
+ \command{provideexpandablecmd}[\sarg\marg{cs}\oarg{num args}\oarg{default
+ opt}\marg{definition}]
+ \sinceversion{0.7}The equivalent of \cs*{providecommand}. See description
+ of \cs{newexpandablecmd} for further details.
+\end{commands}
+
+\subsection{Additional Functionality Provided by \cnltxtools}
+\subsubsection{Commands for Defining Different Document Macros}
+\label{sec:prov-defin-comm}
+
+The \cnltxtools\ package defines some additional macros which provide useful
+functionality also in contexts \emph{not} documenting a \LaTeX\ package.
+
+\begin{commands}
+ \command{newname}[\marg{cs}\Marg{\meta{first name} \meta{last name}}]
+ Defines \meta{cs}\changedversion{0.12} to write out the full name and add
+ an index entry sorted by the last name. Also defines a starred variant of
+ \meta{cs} that only writes the last name but still adds the full index
+ entry.
+ \command{name}[\sarg\Marg{\meta{first name} \meta{last name}}]
+ \changedversion{0.12}Typesets a name according to the same specs as the
+ names defined with \cs{newname}. Also adds the name to the index. The
+ starred version only writes the name but doesn't add the name to the
+ index. Index entries either have the form \meta{last name} or
+ \code{\meta{last name}, \meta{first name}} depending on the usage of the
+ optional argument. It's safer to define a dedicated macro with
+ \cs{newname} to get consistent index entries.
+ \command{cnltxacronym}[\marg{pdf and sort string}\marg{acronym}]
+ Typesets \meta{acronym} with small caps and uses \meta{pdf and sort
+ string} as \PDF\ string and for sorting the index entry that is added.
+ This command was used to define \cs{lppl} and \cs{ctan}. \emph{This is
+ not intended as a replacement for packages like
+ \pkg*{acro}~\cite{pkg:acro} or \pkg*{glossaries}~\cite{pkg:glossaries}!}
+ In fact it is a ``poor man's'' solution that allows me not to require one
+ of those packages.
+ \command{newabbr}[\sarg\marg{control sequence}\marg{definition}]
+ Defines the abbreviation \meta{control sequence} with the definition
+ \meta{definition}. The star argument prevents that a dot is added at the
+ end of the definition. An error is raised if \meta{control sequence}
+ already exists.
+ \command{renewabbr}[\sarg\marg{control sequence}\marg{definition}]
+ Redefines the abbreviation \meta{control sequence} with the definition
+ \meta{definition}. The star argument prevents that a dot is added at the
+ end of the definition. An error is raised if \meta{control sequence} does
+ not exist already.
+ \command{defabbr}[\sarg\marg{control sequence}\marg{definition}]
+ Defines or overwrites the abbreviation \meta{control sequence} with the
+ definition \meta{definition}. The star argument prevents that a dot is
+ added at the end of the definition.
+ \command{cnltxtimeformat}[\marg{abbreviation}]\Default{\cs*{textsc}\Marg{\cs*{,}\#1}}
+ Used in some predefined abbreviations.
+ \command{cnltxlatin}[\marg{abbreviation}]\Default{\cs*{textit}\Marg{\#1}}
+ Used in some localization strings.
+\end{commands}
+
+\begin{options}
+ \keyval{acronym-format}{definition}\Default{\cs*{scshape}}
+ Formatting of the acronyms as typeset with \cs{cnltxacronym}.
+ \keyval{name-format}{formatting commands}\Default{\#1}
+ The formatting of names created with \cs{newname} or typeset with
+ \cs{name}. Names typeset through the bibliography style \code{cnltx} are
+ also formatted according to this option. \meta{formatting commands}
+ should contain \code{\#1} for the actual name.
+ \keyval{last-name-format}{formatting commands}\Default{\cs*{textsc}\Marg{\#1}}
+ The formatting of the last names created with \cs{newname} or typeset with
+ \cs{name}. Names typeset through the bibliography style \code{cnltx} are
+ also formatted according to this option. \meta{formatting commands}
+ should contain \code{\#1} for the actual name.
+ \keyval{first-name-format}{formatting commands}\Default{\#1}
+ The formatting of first names created with \cs{newname} or typeset with
+ \cs{name}. Names typeset through the bibliography style \code{cnltx} are
+ also formatted according to this option. \meta{formatting commands}
+ should contain \code{\#1} for the actual name.
+\end{options}
+
+A short example of the usage of \cs{newname} and \cs{cnltxacronym}:
+\begin{example}
+ \newname\carlisle{David Carlisle}%
+ \carlisle\ is a well-known member of the \LaTeX\ community. \carlisle* is
+ the author of many packages such as \pkg*{longtable}. Take a look in the
+ index where you'll find \carlisle* mentioned.
+
+ \lppl\ is defined as \cnltxacronym{LPPL}{lppl}.
+\end{example}
+
+\subsubsection{Defining Abbreviations}\label{sec:defin-abbr}
+In section~\ref{sec:prov-defin-comm} when describing \cs{newabbr} and similar
+commands I said \enquote{The star argument prevents that a dot is added at the
+ end of the definition}. We should clarify what that means. Many
+abbreviations end with a dot. Some don't which explains the starred form of
+the commands. But why add a dot automatically in the first place? The
+reasoning is two-fold:
+\begin{itemize}
+ \item Suppose you add the dot explicitly in the definition but forget one or
+ two times that you did -- you'll end up with abbreviations followed by
+ \emph{two} dots! Macros defined with \cnltxtools\ recognize a
+ following dot and will not print a second one in those cases.
+ \item In a document where \cs*{nonfrenchspacing} is active the space after a
+ dot in the middle of a sentence should be shorter than the one after the
+ full stop ending a sentence. \TeX\ automatically interprets a dot
+ following a small letter as the end of a sentence and a dot after a
+ capital letter as a dot after an abbreviation inside of a sentence.
+ Usually you solve this by adding \cs*{@} in the appropriate places:
+ \verbcode+e.\,g.\@+ for a intra-sentence space and \verbcode+NSA\@.+ for
+ a inter-sentence space. The dot added by \cnltxtools\ always will be
+ followed by an intra-sentence space. If you add a dot explicitly it will
+ be your responsibility. Per default it will then act like a dot after a
+ small letter.
+\end{itemize}
+
+Let's see some example:
+\begin{example}[side-by-side]
+ \ttfamily% <= this will amplify the visual effect of \nonfrenchspacing
+ \newabbr\ab{a.b}%
+ \newabbr\AB{A.B}%
+ \newabbr*\cd{cd}%
+ \ab\ and some words\par
+ \ab. and some words\par
+ \AB\ and some words\par
+ \AB. and some words\par
+ \cd\ and some words
+\end{example}
+
+Beware: \cnltxtools\ will only leave the dot out if one follows directly in
+the input! That means that spaces are not ignored. However, of course \TeX\
+ignores spaces after macro names so usually this won't be an issue. If you
+define an abbreviation with a macro name consisting of one non-letter where
+spaces are not ignored you have to keep this fact in mind, though.
+
+\subsubsection{Predefined Abbreviations}
+\cnltxtools\ already provides a bunch of abbreviations defined with its
+\cs{newabbr} command.
+
+\minisec{Abbreviations that allow Localization}\label{sec:abbr-that-allow}
+
+\cnltxtools\ defines a few abbreviations that are sensitive to \pkg{babel}
+settings. Currently only translations for English and German are provided and
+the definition falls back to the English version if you're using a language
+other than those. It is possible to add further localization strings quite
+easily, see section~\ref{sec:language-support}.
+
+\begin{commands}
+ \command{ie}
+ Prints \enquote{\ie} or \enquote{\foreignlanguage{ngerman}{\ie}}
+ \command{eg}
+ Prints \enquote{\eg} or \enquote{\foreignlanguage{ngerman}{\eg}}
+ \command{etc}
+ Prints \enquote{\etc} or \enquote{\foreignlanguage{ngerman}{\etc}}
+ \command{cf}
+ Prints \enquote{\cf} or \enquote{\foreignlanguage{ngerman}{\cf}}
+\end{commands}
+
+All of these macros add a final dot followed by \cs*{@} \emph{except} if a dot
+\emph{directly} follows the macro.
+
+\begin{example}[side-by-side]
+ \eg\ and some following text\par
+ \eg, and some following text\par
+ \eg. and some following text\par
+ \selectlanguage{ngerman}
+ \eg\ and some following text\par
+ \eg, and some following text\par
+ \eg. and some following text
+\end{example}
+
+\minisec{German Abbreviations}\label{sec:german-abbreviations}
+
+The following abbreviations are not sensitive to localization and are only of
+use in a German text. Although they're defined: \emph{please} do not use
+abbreviations at the start of a sentence!
+\begin{commands}
+ \command{dsh}
+ Prints \enquote{\dsh}
+ \command{Dsh}
+ Prints \enquote{\Dsh}
+ \command{usf}
+ Prints \enquote{\usf}
+ \command{usw}
+ Prints \enquote{\usw}
+ \command{uswusf}
+ Prints \enquote{\uswusf}
+ \command{zB}
+ Prints \enquote{\zB}
+ \command{ZB}
+ Prints \enquote{\ZB}
+ \command{vgl}
+ Prints \enquote{\vgl}
+ \command{Vgl}
+ Prints \enquote{\Vgl}
+\end{commands}
+
+These macros behave the same as the ones described in
+section~\vref{sec:abbr-that-allow}.
+
+\begin{example}[side-by-side]
+ \dsh\ und weiterer Text\par
+ \dsh. und weiterer Text\par
+ \usw\ und weiterer Text\par
+ \usw. und weiterer Text\par
+ \usf\ und weiterer Text\par
+ \usf. und weiterer Text\par
+ \zB\ und weiterer Text\par
+ \zB. und weiterer Text
+\end{example}
+
+\minisec{Time related Abbreviations}\label{sec:time-relat-abbr}
+
+The abbreviations presented in this section differ from the others in that
+they're formatted by the command \cs{cnltxtimeformat}\marg{}, see
+section~\vref{sec:prov-defin-comm}.
+\begin{commands}
+ \command{AM}
+ Prints \enquote{\AM}
+ \command{PM}
+ Prints \enquote{\PM}
+ \command{AD}
+ Prints \enquote{\AD}
+ \command{BC}
+ Prints \enquote{\BC}
+\end{commands}
+
+In their current definition these abbreviations are meant to be used
+\emph{directly} after the time of day or the date, respectively.
+
+\begin{example}[side-by-side]
+ She left for work before 6\AM, but
+ did not arrive until 12\PM. The
+ interval 5\BC--5\AD\ is one year
+ shorter than the interval
+ 95\AD--105\AD.
+\end{example}
+
+\section{Formatting Possibilities}\label{sec:cmds:formatting}
+
+One of the goals I wanted to achieve with this package is a consistent look
+and an easy interface for customization. No font choice and no color choice
+is fixed. In this section ways to change the formatting are shown.
+
+The formatting of the different commands provided by \cnltx\ and various other
+properties can be changed in two ways: either by redefining the internal
+commands that are used for the formatting or by setting a corresponding
+option. Both variants are described in the next subsections.
+
+How the colors should be changed is described in section~\vref{sec:colors}.
+
+\subsection{Formatting by Redefining Hooks}
+
+You can change the formatting by redefining the following commands. They're
+all defined by the \cnltxexample\ package except where indicated differently.
+
+\begin{commands}
+ \command{codefont}\Default{\cs*{ttfamily}}
+ This command is used for all formatting of source code.
+ \command{sourceformat}\Default{\cs{codefont}\cs*{small}}
+ Formatting of the listings.
+ \command{exampleformat}\Default
+ Special formatting of the output of a listing.
+ \command{versionnoteformat}\Default{\cs*{footnotesize}\cs*{sffamily}\cs*{RaggedRight}}
+ \byclass Formatting of the notes introduced in section~\vref{sec:cmds:versioning}.
+ \command{packageformat}\Default{\cs*{sffamily}}
+ The formatting of package names.
+ \command{classformat}\Default{\cs*{sffamily}}
+ The formatting of class names.
+ \command{argumentformat}\Default{\cs*{normalfont}\cs*{itshape}}
+ The formatting of \cs{meta}\marg{meta}.
+\end{commands}
+
+\begin{example}
+ \renewcommand*\codefont{\sffamily\bfseries}
+ \code{foo} and \cs*{bar}, option \option{baz}
+\end{example}
+
+\subsection{Formatting by Setting Options}
+
+You can change the formatting of by setting the following options. They're all
+defined by the \cnltxexample\ package except where indicated differently.
+
+\begin{options}
+ \keyval{title-format}{definition}\Default{\cs*{bfseries}\cs*{scshape}}
+ \sinceversion{0.2}Formatting of the document title.
+ \keyval{abstract-width}{dimension}\Default{.75\cs*{linewidth}}
+ \sinceversion{0.6}The width of the \cs*{parbox} the abstract as set with
+ the \option{abstract} option is placed in.
+ \keyval{abstract-format}{definition}%
+ \Default{\cs*{setlength}\cs*{parskip}\Marg{.333\cs*{baselineskip}}}
+ \sinceversion{0.6}Code that is placed in the parbox the abstract is placed
+ in \emph{before} the abstract text.
+ \keyval{caption-font}{definition}%
+ \Default{\cs*{normalfont}\cs*{small}\cs*{sffamily}}
+ This option only has any effect if you use the option
+ \option{load-preamble}, see section~\vref{sec:preamble} for details on the
+ option.
+ \keyval{caption-label-font}{definition}%
+ \Default{\cs*{normalfont}\cs*{small}\cs*{sffamily}\cs*{scshape}}
+ This option only has any effect if you use the option
+ \option{load-preamble}, see section~\vref{sec:preamble} for details on the
+ option.
+ \keyval{code-font}{definition}\Default{\cs*{ttfamily}}
+ Used for all formatting of source code.
+ \keyval{source-format}{definition}\Default{\cs{codefont}\cs*{small}}
+ Formatting of the listings.
+ \keyval{expl-format}{definition}\Default
+ Special formatting of the output of a listing.
+ \keyval{module-sep}{definition}\Default{\cs*{,}>{}>\cs*{,}}
+ \byclass Change the separator between module name and corresponding option
+ name.
+ \keyval{version-note-format}{definition}%
+ \Default{\cs*{footnotesize}\cs*{sffamily}\cs*{RaggedRight}}
+ \byclass Formatting of the notes introduced in
+ section~\vref{sec:cmds:versioning}.
+ \keyval{pkg-format}{definition}\Default{\cs*{sffamily}}
+ The formatting of package names.
+ \keyval{cls-format}{definition}\Default{\cs*{sffamily}}
+ The formatting of class names.
+ \keyval{arg-format}{definition}\Default{\cs*{normalfont}\cs*{itshape}}
+ The formatting of \cs{meta}\marg{meta}.
+ \keyval{default-format}{code}\Default{\cs*{uline}}
+ \sinceversion{0.2}The formatting of \cs{default}'s argument.
+ \meta{code}'s last macro should take one argument.
+\end{options}
+
+\begin{example}
+ \setcnltx{code-font=\sffamily\itshape}
+ \code{foo} and \cs*{bar}, option \option{baz}
+\end{example}
+
+\section{Commands, Options and Further Settings Directly Related to the \cnltxdoc\ Class}
+
+\subsection{Using Class Options}\label{sec:class:options}
+The \cnltxdoc\ class only knows a few options:
+\begin{options}
+ \keybool{load-preamble}\Default{false}
+ See section~\vref{sec:preamble} for details.
+ \keybool{load-preamble+}\Default{false}
+ See section~\vref{sec:predefined-indexing} for details.
+ \keybool{add-index}\Default{false}
+ See section~\vref{sec:predefined-indexing} for details.
+ \keybool{adapt-layout}\Default{true}
+ \sinceversion{0.13}If set to true \cnltxdoc\ will make some changes to the
+ section and part formats, it will redefine the footnote format, set the
+ header and footer and adapt the caption format.
+ \keyval{babel-options}{options}\Default{english}
+ Options given to the \needpackage[macros/latex/required]{babel} package.
+ This option only has an effect if \keyis-{load-preamble}{true}.
+ \keyval{scrartcl}{options}\Default
+ \changedversion{0.13}Options that are passed to the underlying class
+ \cls{scrartcl}. Can be used to pass options to \cls{scrartcl} when
+ \option{load-preamble} is used. Not really necessary since unknown
+ options are passed to \cls{scrartcl}, anyway.
+\end{options}
+
+
+\subsection{Information on the Described Package or Class}\label{sec:inform-descr-pack}
+A manual for a package or a class needs some information on the described
+package like the package name, the version number, the date and so on. This
+information is given with the following options. They are used to build the
+title page of the manual.
+\begin{options}
+ \keyval{package}{package}
+ The name of the package that is described. Either this option or
+ \option{class} or \option{name} should always be given. This command also
+ defines a command sequence from the package name that formats the package
+ name with color and small caps like \cnltx.
+ \keyval{class}{class}
+ The name of the class that is described. Either this option or
+ \option{package} or \option{name} should always be given. This command
+ also defines a command sequence from the class name that formats the class
+ name with color and small caps like \cnltx.
+ \keyval{name}{name}
+ The name of the class/package that is described. Either this option or
+ \option{package} or \option{class} should always be given. This command
+ also defines a command sequence from the class name that formats the class
+ name with color and small caps like \cnltx.
+ \keyval{authors}{author list}
+ \changedversion{0.4}Comma separated list of package/class authors. After
+ each author name you can add an email address by writing it in square
+ brackets: \verbcode+Some Name[some@name.com]+. Email addresses specified
+ this way get written as a footnote. At least one author should always be
+ given.
+ \keyval{version}{version number}
+ Version number of the package/class. \cnltx\ tries to extract the
+ information from the given \option{package} or \option{class}. This
+ option can be used to set it explicitly.
+ \keyval{date}{date}
+ Date of the package/class. \cnltx\ tries to extract the
+ information from the given \option{package} or \option{class}. This
+ option can be used to set it explicitly.
+ \keyval{info}{package/class info}
+ Information about the package/class. \cnltx\ tries to extract the
+ information from the given \option{package} or \option{class}. This
+ option can be used to set it explicitly.
+ \keyval{subtitle}{subtitle}
+ A subtitle, printed below the package/class name.
+ \keyval{url}{url}
+ The homepage of the package.
+ \keyval{email}{email}
+ A contact email address.
+ \keyval{abstract}{abstract}
+ An abstract of the package/class/manual. This is text typeset in a box of
+ \code{.75\cs*{linewidth}}. Actually it does not have to be text but could
+ be an image or whatever you like.
+\end{options}
+
+\subsection{Building of the Manuals Title Page}
+If either the \option{package} or \option{class} has been given an automatic
+title page is built using the gathered information. Figure~\vref{fig:titlepage}
+roughly sketches which informations is used and how the different elements are
+arranged on the title page. The page style of the title page is
+\code{plain}. Additionally a table of contents is automatically built that
+is set in two columns. The automatic building of the title page can be
+prevented by explicitly setting the following option:
+
+\begin{options}
+ \keybool{build-title}
+ The default state depends on other options given like \option{package}.
+ However, setting this option to \code{false} \emph{after} any of the
+ options described in section~\vref{sec:inform-descr-pack} will prevent the
+ building of a title page and allows you to design your own.
+\end{options}
+
+\begin{figure}[htb]
+ \centering
+ \begin{tikzpicture}[
+ start chain=going below,
+ node distance=1em,
+ every node/.style={draw,align=center}
+ ]
+ \node[on chain] {package name formatted with \cs{titleformat} and scaled
+ to 1.5 of its size} ;
+ \node[on chain] {subtitle} ;
+ \node[on chain,draw=none]
+ {\tikz\draw (0,0) node[draw] {version} ++(4,0) node[draw] {date} ;} ;
+ \node[on chain] {package information} ;
+ \node[on chain] {author names (formatted according to specifications for
+ names as defined with \cs{newname})} ;
+ \node[on chain] {url when specified via the \option{url} option} ;
+ \node[on chain] {email address when specified via the \option{email} option} ;
+ \node[on chain] {abstract when specified via the \option{abstract} option} ;
+ \end{tikzpicture}
+ \caption{Schematic sketch of the title page.}
+ \label{fig:titlepage}
+\end{figure}
+
+\subsection{A Quotation Environment}
+
+\cnltxdoc\sinceversion{0.5} provides a quotation environment:
+\begin{environments}
+ \environment{cnltxquote}[\oarg{author/reference}]
+ A quotation environment.
+\end{environments}
+
+The environment sets the body indented on both sides as it simply uses a
+\env*{quote} environment internally. The contents of the optional argument is
+set flush right after the environment's body. The formatting is controlled by
+two options:
+
+\begin{options}
+ \keyval{quote-format}{definition}\Default{\cs*{small}\cs*{sffamily}}
+ The formatting of the environment's body.
+ \keyval{quote-author-format}{definition}\Default{\cs*{itshape}}
+\end{options}
+
+\begin{example}
+ \begin{cnltxquote}[Douglas Adams, The Restaurant at the End of the Universe]
+ ``The first ten million years were the worst,'' said Marvin, ``and the
+ second ten million years, they were the worst too. The third ten million
+ years I didn't enjoy at all. After that I went into a bit of a decline.''
+ \end{cnltxquote}
+\end{example}
+
+\subsection{Predefined Preamble}\label{sec:preamble}
+It is possible to load a part of my standard preamble automatically by
+passing an option as class option.
+\begin{options}
+ \opt{load-preamble}
+ Class option that preloads part of my custom preamble.
+\end{options}
+
+Using the option will include the following code:\changedversion{0.13}
+
+\begin{sourcecode}
+ \RequirePackage{ifxetex,ifluatex}
+ \ifbool{cnltx@load@fonts}
+ {
+ \ifboolexpr{not bool{xetex} and not bool{luatex}}
+ {\RequirePackage[T1]{fontenc}}
+ {\RequirePackage{fontspec}}
+ \RequirePackage[oldstyle]{libertine}
+ \RequirePackage{libertinehologopatch}
+ \RequirePackage[supstfm=libertinesups]{superiors}
+ % libertine does not have superior letters:
+ \def\@makefnmark{%
+ \hbox{%
+ \cnltx@ifisnum{\@thefnmark}
+ {\textsu{\hspace*{\superiors@spaced}\@thefnmark}}
+ {\@textsuperscript{\normalfont\@thefnmark}}%
+ }%
+ }
+ }
+ {}
+ \ifbool{cnltx@microtype}
+ {\RequirePackage{microtype}}
+ {}
+ \ifboolexpr
+ {
+ bool {cnltx@microtype} and
+ not test {\ifcsdef{MT@pr@set@@romansans}} and
+ not test {\ifcsdef{MT@ex@set@@romansans}} and
+ bool {cnltx@load@fonts}
+ }
+ {
+ \DeclareMicrotypeSet{romansans}{
+ encoding = {*},
+ family = {rm*,sf*}
+ }
+ }
+ {}
+ \ifboolexpr
+ {
+ bool {cnltx@microtype} and
+ not test {\ifcsdef{MT@tr@set@@scshape}} and
+ bool {cnltx@load@fonts}
+ }
+ {
+ \DeclareMicrotypeSet[tracking]{scshape}{
+ encoding = {*} ,
+ shape = {sc,scit,si}
+ }
+ }
+ {}
+ \ifboolexpr
+ {
+ not bool {xetex} and
+ bool {cnltx@load@fonts} and
+ bool {cnltx@microtype}
+ }
+ {
+ \microtypesetup{
+ tracking = scshape ,
+ protrusion = romansans ,
+ expansion = romansans
+ }
+ \DisableLigatures{ family = tt* }
+ }
+ {}
+ \ifbool{cnltx@load@fonts}
+ {
+ \ifboolexpr{not bool{xetex} and not bool{luatex}}
+ {\RequirePackage[scaled=.81]{beramono}}
+ {
+ \setmonofont[
+ Scale = MatchLowercase ,
+ Ligatures = {NoCommon,NoRequired,NoContextual}
+ ]{DejaVu Sans Mono}
+ }
+ \KOMAoptions{DIV=last}
+ \recalctypearea
+ }
+ {}
+ \RequirePackage{fnpct}
+ \expandafter\RequirePackage\expandafter[\cnltx@babel@options]{babel}
+\end{sourcecode}
+
+The effect of this preamble is demonstrated by the document you're reading at
+this moment.
+
+\begin{options}
+ \keybool{load-preamble-}\Default{false}
+ This option has the same effect as adding using \option{load-preamble} but
+ without making any font decisions.
+\end{options}
+
+Another option affects the layout of the document:
+\begin{options}
+ \keybool{adapt-layout}\Default{true}
+ \sinceversion{0.13}If set to true \cnltxdoc\ will make some changes to the
+ section and part formats, it will redefine the footnote format, set the
+ header and footer and adapt the caption format.
+\end{options}
+
+Using the option will include the following code:
+
+\begin{sourcecode}
+ \renewcommand*\sectionformat{%
+ \textcolor{cnltx}{\thesection\autodot}\enskip
+ }
+ \renewcommand*\subsectionformat{%
+ \textcolor{cnltx}{\thesubsection\autodot}\enskip
+ }
+ \renewcommand*\subsubsectionformat{%
+ \textcolor{cnltx}{\thesubsubsection\autodot}\enskip
+ }
+ \setkomafont{subsubsection}{\normalfont\normalsize\itshape}
+ \renewcommand*\partformat{%
+ \textcolor{cnltx}{\partname~\thepart\autodot}%
+ }
+ \renewcommand*\partformat{%
+ \textcolor{cnltx}{\partname~\thepart\autodot}}
+ \deffootnote{2em}{1em}{\llap{\thefootnotemark. }}%
+ \RequirePackage{scrlayer-scrpage}
+ \chead{\rightmark}
+ \KOMAoptions{automark}
+ \pagestyle{scrheadings}
+ \setcapindent{1.5em}
+ \setkomafont{caption}{\cnltx@caption@font}
+ \setkomafont{captionlabel}{\cnltx@captionlabel@font}
+\end{sourcecode}
+
+\subsection{Predefined Indexing}\label{sec:predefined-indexing}
+\cnltxdoc\ allows the automated creation of an index. This is done with the
+help of the \pkg{imakeidx} package by \egreg~\cite{pkg:imakeidx}. To use this
+feature you have two class options. They cannot be set with \cs{setcnltx} but
+must be given as class options.
+
+\begin{options}
+ \keybool{add-index}\Default{false}
+ Enables the automatic creation of an index at the end of the document.
+ \keybool{load-preamble+}\Default{false}
+ This option has the same effect as adding the options
+ \option{load-preamble}, \option{add-index} and \option{add-bib}.
+\end{options}
+
+Enabling the feature
+\begin{itemize}
+ \item loads the \needpackage{imakeidx} package,
+ \item uses a given style file for the index that can be specified with the
+ \option{index-style} option,
+ \item sets a certain setup for the index that can be specified with the
+ \option{index-setup} option and
+ \item adds an index at the end of the document.
+\end{itemize}
+
+The following options are available to customize the appearance of the index:
+\begin{options}
+ \keyval{index-prologue}{text}
+ Adds \meta{text} as index prologue between heading and the actual index.
+ \keyval{index-space}{dimension}\Default{0pt}
+ The vertical space between index prologue and index.
+ \keyval{index-setup}{options}%
+ \Default{othercode=\cs*{footnotesize},level=\cs*{addsec}}
+ The options that are passed to \pkg{imakeidx}'s \cs*{indexsetup} command.
+ \keyval{makeindex-setup}{options}\Default{columns=2,columnsep=1em}
+ The options that are passed to the \cs*{makeindex} command.
+ \keyval{index-style}{style file}\Default{cnltx.ist}
+ The style file that is used for formatting the index.
+\end{options}
+
+The index style file \file{cnltx.ist} contains the following lines:
+\inputsourcecode[sourcecode-options={style=cnltx-makeindex}]{cnltx.ist}
+
+The feature is demonstrated by this document which does not contain a single
+control sequence containing the string \code{index}!
+
+\subsection{Bibliography with \pkg*{biblatex}}
+\subsubsection{Bibliography Entry Types \code{package}, \code{class} and
+ \code{bundle} for \pkg*{biblatex}}
+\label{sec:listings:bibtex-language}
+
+\cnltxdoc\sinceversion{0.4} defines the bibliograpy entry types
+\code{package}, \code{class} and \code{bundle} when
+\pkg{biblatex}~\cite{pkg:biblatex} is used. This allows specifying \LaTeX\
+packages in \file{bib} files:
+
+\begin{sourcecode}[sourcecode-options={style=cnltx-bibtex}]
+ @package{pkg:chngcntr,
+ title = {chngcntr} ,
+ author = {Peter Wilson} ,
+ maintainer = {Will Robertson} ,
+ date = {2009-09-02} ,
+ version = {1.0a} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/chngcntr/}
+ }
+ @class{cls:exam,
+ title = {exam},
+ author = {Philip Hirschhorn},
+ date = {2015-05-07},
+ version = {2.5},
+ url = {http://mirror.ctan.org/macros/latex/contrib/exam/}
+ }
+ @bundle{bnd:koma-script,
+ title = {\KOMAScript} ,
+ sorttitle = {KOMA-Script} ,
+ indextitle = {\KOMAScript} ,
+ indexsorttitle = {KOMA-Script} ,
+ author = {Markus Kohm},
+ date = {2015-07-02} ,
+ version = {3.18} ,
+ url = {http://mirror.ctan.org/macros/latex/contrib/koma-script/}
+ }
+\end{sourcecode}
+
+As you can see also an entry field \code{maintainer} is defined. For this to
+work you have to use the \pkg{biblatex} bibliography style \code{cnltx}. This
+style basically is a clone of the style \code{alphabetic} but defines the
+necessary additions for the \code{package}, \code{class} and \code{bundle}
+entry types and the \code{maintainer} entry field.
+
+Along with the bibliography style a citation style \code{cnltx} is provided,
+again a clone of the \code{alphabetic} style. The only addition it makes is
+that indexing of maintainer names is enabled if \pkg{biblatex}'s
+\code{indexing} option is used. The styles load \cnltxexample\ as it relies
+on definitions made by it.
+
+This document uses the following call of \pkg{biblatex}:
+\begin{sourcecode}
+ \usepackage[
+ backend=biber,
+ style=cnltx,
+ sortlocale=en_US,
+ indexing=cite,
+ useprefix]{biblatex}
+ \addbibresource{cnltx.bib}
+\end{sourcecode}
+Actually it let's \cnltxdoc\ do it, see section~\ref{sec:autom-bibl} for
+details.
+
+Just for the sake of the example I am going to cite the \pkg*{chngcntr}
+package now~\cite{pkg:chngcntr} so you can see both the bibliography entry and
+the indexed names of package, author and maintainer in the appendix.
+
+\subsubsection{Automatic Bibliography}\label{sec:autom-bibl}
+
+\cnltxdoc\ allows the automated creation of a bibliography.
+
+\begin{options}
+ \keybool{add-bib}\Default{false}
+ Enables the automatic creation of a bibliography at the end of the
+ document.
+ \keybool{load-preamble+}\Default{false}
+ This option has the same effect as adding the options
+ \option{load-preamble}, \option{add-index} and \option{add-bib}.
+\end{options}
+
+What this options does is including the following code:
+\begin{sourcecode}
+ \RequirePackage[
+ backend=biber,
+ style=cnltx,
+ sortlocale=en_US,
+ indexing=cite,
+ useprefix]{biblatex}
+ \addbibresource{cnltx.bib}
+ \AtEndDocument{\printbibliography}
+\end{sourcecode}
+
+As you can see there's also a bibliography database file \file{cnltx.bib} that
+provides a yet small but growing number of package entries.
+
+\section{Predefined \pkg*{listings} and \pkg*{mdframed} Styles}
+\subsection{\pkg*{mdframed}}
+
+The source code environments (see section~\vref{sec:usage:examples}) all get a
+frame with the help of the \pkg{mdframed}~\cite{pkg:mdframed} package. For
+this a custom style is defined called \code{cnltx}. The options
+\option{frame-options} and \option{add-frame-options} mentioned in
+section~\vref{sec:usage:examples} manipulate this style. It is predefined
+with these values:
+
+\begin{sourcecode}
+ \def\cnltx@mdframed@options{
+ backgroundcolor = cnltxbg ,
+ linecolor = cnltx ,
+ roundcorner = 5pt
+ }
+\end{sourcecode}
+
+\subsection{\pkg*{listings}}
+\subsubsection{\LaTeX\ Sourcecode}\label{sec:listings-sourcecode}
+
+The code of the source code environments (see
+section~\vref{sec:usage:examples}) is formatted with the help of the
+\pkg{listings} package~\cite{pkg:listings}. A \pkg{listings} style is defined
+called \code{cnltx}. The options \option{add-cmds}, \option{add-silent-cmds},
+\option{add-envs}, \option{add-silent-envs}, \option{listings-options} and
+\option{add-listings-options} manipulate this style. It is predefined by
+\cnltxexample\ as follows:
+
+\begin{sourcecode}
+ \def\cnltx@listings@style{
+ language = [AlLaTeX]TeX,
+ alsolanguage = [plain]TeX,
+ basicstyle = {\sourceformat},
+ numbers = left,
+ numberstyle = \tiny,
+ xleftmargin = 1em,
+ numbersep = .75em,
+ gobble = \cnltx@gobble ,
+ columns = fullflexible,
+ literate =
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {ü}{{\"u}}1
+ {Ä}{{\"A}}1
+ {Ö}{{\"O}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1 ,
+ breaklines = true,
+ keepspaces = true,
+ breakindent = 1em,
+ commentstyle = \color{comment},
+ keywordstyle = \color{cs},
+ deletetexcs =
+ {
+ a,o,u,A,O,U,
+ begin,
+ center,
+ description,document,
+ end,enumerate,
+ figure,flushleft,flushright,
+ itemize,list,
+ otherlanguage,
+ table,tabu,tabular
+ },
+ deletekeywords =
+ {
+ a,o,u,A,O,U,
+ begin,
+ center,
+ description,document,
+ end,enumerate,
+ figure,flushleft,flushright,
+ itemize,list,
+ otherlanguage,
+ table,tabu,tabular
+ },
+ % \begin, \end:
+ texcsstyle = [2]\color{beginend},
+ index = [2][texcs2],
+ indexstyle = [2]\@gobble,
+ moretexcs = [2]{begin,end},
+ % added environments that'll be indexed:
+ texcsstyle = [3]\color{env},
+ index = [3][texcs3],
+ indexstyle = [3]\envidx,
+ % environments that won't be indexed:
+ texcsstyle = [4]\color{env},
+ index = [4][texcs4],
+ indexstyle = [4]\@gobble,
+ % control sequences that'll be indexed:
+ texcsstyle = [5]\color{cs},
+ index = [5][texcs5],
+ indexstyle = [5]\indexcs,
+ % control sequences that won't be indexed:
+ texcsstyle = [6]\color{cs},
+ index = [6][texcs6],
+ indexstyle = [6]\@gobble
+ }
+\end{sourcecode}
+
+\subsubsection{\BibTeX\ Entries}
+The \cnltxlistings\ package defines\sinceversion{0.4} a \pkg{listings}
+language \code{BibTeX} that contains a huge number of bibentry types and
+bibentry field types, have a look at
+section~\vref{sec:listings:bibtex-language}. \cnltxexample\ defines a
+\pkg{listings} style for formatting them called \code{cnltx-bibtex}:
+
+\begin{sourcecode}
+ \def\cnltx@bibtex@listings@style{
+ language = BiBTeX,
+ basicstyle = {\sourceformat},
+ numbers = left,
+ numberstyle = \tiny,
+ xleftmargin = 1em,
+ numbersep = .5em,
+ gobble = \cnltx@gobble ,
+ columns = fullflexible,
+ literate =
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {ü}{{\"u}}1
+ {Ä}{{\"A}}1
+ {Ö}{{\"O}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1 ,
+ breaklines = true,
+ keepspaces = true,
+ breakindent = 1em,
+ commentstyle = \color{comment},
+ keywordstyle = \color{bibentry} ,
+ keywordstyle = [2]\color{bibentryfield}\itshape ,
+ showstringspaces = false ,
+ }
+\end{sourcecode}
+
+\subsubsection{\code{makeindex} Style Files}
+\cnltxlistings\ defines\sinceversion{0.7} a \pkg{listings} language
+\code{makeindex} that contains the keywords used in \code{makeindex} style
+files. \cnltxexample\ defines a \pkg{listings} style for formatting them
+called \code{cnltx-makeindex}:
+
+\begin{sourcecode}
+ \def\cnltx@makeindex@listings@style{
+ language = makeindex,
+ basicstyle = {\sourceformat},
+ numbers = left,
+ numberstyle = \tiny,
+ xleftmargin = 1em,
+ numbersep = .75em,
+ gobble = \cnltx@gobble ,
+ columns = fullflexible,
+ literate =
+ {ä}{{\"a}}1
+ {ö}{{\"o}}1
+ {ü}{{\"u}}1
+ {Ä}{{\"A}}1
+ {Ö}{{\"O}}1
+ {Ü}{{\"U}}1
+ {ß}{{\ss}}1 ,
+ breaklines = true,
+ keepspaces = true,
+ breakindent = 1em,
+ commentstyle = \color{comment},
+ keywordstyle = \color{makeidxkey}\bfseries ,
+ stringstyle = \color{makeidxstring} ,
+ showstringspaces = false
+ }
+\end{sourcecode}
+
+\section{\PDF\ Strings and \pkg*{hyperref}}
+
+Since the formatting and indexing commands \cs{cs}, \cs{env}, \cs{option},
+\cs{pkg}, \cs{cls} and \cs{key} are robust they are ignored in \PDF\
+strings. For this reason you should \emph{only use the starred variants} in
+places where \PDF\ bookmarks are built from such as section titles when you
+use \pkg{hyperref}~\cite{pkg:hyperref}. Since \cnltxdoc\ loads \pkg{hyperref}
+this means you should do so, too, when you use \cnltxdoc. This is important
+for two reasons:
+\begin{enumerate}
+ \item Indexing in strings that get written to the table of contents does
+ noch make much sense, anyway, so the starred versions should be used in
+ section titles even if you don't use \pkg{hyperref}.
+ \item When \pkg{hyperref} is loaded the mentioned commands are disabled in
+ \PDF\ strings in a way that \emph{expects} them to be followed by a star.
+ This means leaving the star out will result in \code{doesn't match its
+ definition} errors.
+\end{enumerate}
+
+\section{Predefined Colors and Color-Schemes}\label{sec:colors}
+\subsection{Explicitly Defined Colors}\label{sec:expl-defin-colors}
+
+The \cnltxbase\ package defines a number of colors:
+\begin{colors}
+ \colour{cnltxbrown}
+ Per default used for the control sequences.
+ \colour{cnltxblue}
+ Per default used for module names.
+ \colour{cnltxred}
+ Per default used as base color in various places.
+ \colour{cnltxgreen}
+ Unused per default.
+ \colour{cnltxgray}
+ Per default used for formatting comments.
+ \colour{cnltxyellow}
+ Per default used for option names.
+ \colour{cnltxformalblue}
+ Unused per default.
+ \colour{cnltxformalred}
+ Unused per default.
+\end{colors}
+
+\subsection{Actual Used Color Names and Color Schemes}\label{sec:actual-used-color}
+
+The colors defined in section~\vref{sec:expl-defin-colors} are not directly
+used with those names. Instead colors are used whose names describe their
+function rather than the color. For this the color names are mapped to actual
+colors and saved as a coloring scheme. There are currently three predefined
+color schemes whose definitions are given below. Those definitions also show
+the actually used color names. They are defined via the following command:
+
+\begin{commands}
+ \command{definecolorscheme}[\marg{name}\marg{color assignments}]
+ \sinceversion{0.5}Defines the color scheme \meta{name}. When used all
+ assignments will be actually carried out with \pkg{xcolor}'s
+ \cs*{colorlet} command. How to input \meta{color assignments} will be
+ immediately clear from the examples below.
+\end{commands}
+
+To activate a color scheme for a document it is simply selected through an
+option:
+\begin{options}
+ \keyval{color-scheme}{color scheme name}\Default{default}
+ Activate a color scheme previously defined with \cs{definecolorscheme}.
+\end{options}
+
+The `default' color scheme is defined as follows:
+\begin{sourcecode}
+ \definecolorscheme{default}{
+ cs => cnltxbrown , % command sequences
+ option => cnltxyellow ,% options
+ module => cnltxblue , % modules
+ comment => cnltxgray , % comments
+ beginend => red , % \begin and \end
+ env => black , % environment names
+ argument => black , % argument delimiters
+ meta => black!80 , % arguments of \meta
+ cnltx => cnltxred , % base color
+ cnltxbg => white , % source code box background
+ link => black!90 , % hyperlinks
+ versionnote => black!75 % versioning notes text
+ bibentry => cnltxgreen , % BibTeX entry types
+ bibentryfield => black, % BibTeX entry fields
+ expandable => red , % the color used in \expandable
+ unexpandable => black , % the color used in \unexpandable
+ makeidxkey => cnltxgreen , % used for keywords in the cnltx-makeindex
+ % style
+ makeidxstring => black % used for strings in the cnltx-makeindex
+ % style
+ }
+\end{sourcecode}
+
+The `blue' color scheme is defined this way:
+\begin{sourcecode}
+ \definecolorscheme{blue}{
+ cs => cnltxbrown ,
+ option => cnltxgreen ,
+ module => cnltxred ,
+ comment => cnltxgray ,
+ beginend => red ,
+ env => black ,
+ argument => black ,
+ meta => black!80 ,
+ cnltx => cnltxblue ,
+ cnltxbg => yellow!10 ,
+ link => cnltx ,
+ versionnote => black!75
+ bibentry => cnltxyellow ,
+ bibentryfield => black ,
+ expandable => red ,
+ unexpandable => black ,
+ makeidxkey => cnltxyellow ,
+ makeidxstring => black
+ }
+\end{sourcecode}
+
+Finally the `formal' color scheme is defined like this:
+\begin{sourcecode}
+ \definecolorscheme{formal}{
+ cs => black ,
+ option => cnltxformalblue ,
+ module => cnltxblue ,
+ comment => cnltxgray ,
+ beginend => red ,
+ env => black ,
+ argument => black ,
+ meta => black!80 ,
+ cnltx => cnltxformalblue ,
+ cnltxbg => white ,
+ link => black!90 ,
+ versionnote => black!75 ,
+ bibentry => black ,
+ bibentryfield => black ,
+ expandable => red ,
+ unexpandable => black ,
+ makeidxkey => black ,
+ makeidxstring => black
+ }
+\end{sourcecode}
+
+\section{Language Support}\label{sec:language-support}
+\noindent\sinceversion{0.2}The \cnltxdoc, the \cnltxexample\ and the
+\cnltxtools\ package as well as the \code{cnltx.ist} index style and the
+\code{cnltx} \pkg{biblatex} style all rely on the \pkg{translations}
+package~\cite{pkg:translations} for providing some document language dependent
+strings\footnote{Actually they depend on \cnltxtranslations\ which in turn
+ loads \pkg{translations}.}. Currently only translations for English and
+German are provided. Others can be added and the existing ones changed with
+the following commands provided by the \pkg{translations} package:
+
+\begin{commands}
+ \command{DeclareTranslation}[\marg{language}\marg{keyword}\marg{translation}]
+ Define or redefine translations for the string identified by the
+ \textsc{id} \meta{keyword}.
+ \command{RenewTranslation}[\marg{language}\marg{keyword}\marg{translation}]
+ Renew translations for the string identified by the \textsc{id}
+ \meta{keyword}.
+\end{commands}
+
+The strings defined by \cnltx\ are listed in
+table~\vref{tab:language:strings}. They are used in indexing strings and in
+different parts of the document.
+
+\begin{table}
+ \centering\renewcommand\arraystretch{1.3}
+ \caption{Overview over available internationalization key words.}
+ \label{tab:language:strings}
+ \begin{tabular}{
+ l
+ >{\ttfamily}l
+ >{\RaggedRight}p{.25\linewidth}
+ >{\RaggedRight}p{.25\linewidth}
+ }
+ \toprule
+ Package/Class & key word & English version & German version\\
+ \midrule
+ \cnltxexample & cnltx-package &
+ \GetTranslation{cnltx-package} &
+ \GetTranslationFor{German}{cnltx-package} \\
+ \cnltxexample & cnltx-class &
+ \GetTranslation{cnltx-class} &
+ \GetTranslationFor{German}{cnltx-class} \\
+ \cnltxexample & cnltx-bundle &
+ \GetTranslation{cnltx-bundle} &
+ \GetTranslationFor{German}{cnltx-bundle} \\
+ \cnltxexample & cnltx-environment &
+ \GetTranslation{cnltx-environment} &
+ \GetTranslationFor{German}{cnltx-environment} \\
+ \cnltxdoc & cnltx-default &
+ \GetTranslation{cnltx-default} &
+ \GetTranslationFor{German}{cnltx-default} \\
+ \cnltxdoc & cnltx-empty &
+ \GetTranslation{cnltx-empty} &
+ \GetTranslationFor{German}{cnltx-empty} \\
+ \cnltxdoc & cnltx-required &
+ \GetTranslation{cnltx-required} &
+ \GetTranslationFor{German}{cnltx-required} \\
+ \cnltxdoc & cnltx-toc &
+ \GetTranslation{cnltx-toc} &
+ \GetTranslationFor{German}{cnltx-toc} \\
+ \cnltxdoc & cnltx-license &
+ \GetTranslation{cnltx-license} &
+ \GetTranslationFor{German}{cnltx-license}\\
+ \cnltxdoc & cnltx-introduced &
+ \GetTranslation{cnltx-introduced} &
+ \GetTranslationFor{German}{cnltx-introduced} \\
+ \cnltxdoc & cnltx-changed &
+ \GetTranslation{cnltx-changed} &
+ \GetTranslationFor{German}{cnltx-changed} \\
+ \cnltxdoc & cnltx-f. &
+ \GetTranslation{cnltx-f.} &
+ \GetTranslationFor{German}{cnltx-f.} \\
+ \cnltxdoc & cnltx-ff. &
+ \GetTranslation{cnltx-ff.} &
+ \GetTranslationFor{German}{cnltx-ff.} \\
+ \cnltxdoc & cnltx-maintainer &
+ \GetTranslation{cnltx-maintainer} &
+ \GetTranslationFor{German}{cnltx-maintainer} \\
+ \cnltxdoc & cnltx-maintainers &
+ \GetTranslation{cnltx-maintainers} &
+ \GetTranslationFor{German}{cnltx-maintainers} \\
+ \cnltxtools & cnltx-i.e. &
+ \GetTranslation{cnltx-i.e.} &
+ \GetTranslationFor{German}{cnltx-i.e.} \\
+ \cnltxtools & cnltx-e.g. &
+ \GetTranslation{cnltx-e.g.} &
+ \GetTranslationFor{German}{cnltx-e.g.} \\
+ \cnltxtools & cnltx-cf. &
+ \GetTranslation{cnltx-cf.} &
+ \GetTranslationFor{German}{cnltx-cf.} \\
+ \cnltxtools & cnltx-etc. &
+ \GetTranslation{cnltx-etc.} &
+ \GetTranslationFor{German}{cnltx-etc.} \\
+ \bottomrule
+ \end{tabular}
+\end{table}
+
+\part{Appendix}
+\appendix
+
+\section{Internal Helper Commands}
+
+The commands in this section are only described for the sake of completeness.
+They are not meant to be used in a document. Some of them might be useful in
+\LaTeX\ programming, though. Expandable commands are marked with
+\textcolor{expandable}{\expandablesign}.
+
+\subsection{Defined by \cnltxbase}\label{sec:defined-cnltxbase}
+
+Especially \cnltxbase\ defines some useful helper macros that are also used by
+the other packages and classes.
+
+\subsubsection{Related to the Bundle}\label{sec:related-bundle}
+
+\begin{commands}
+ \expandable\command{cnltx\at\at date}
+ The creation date of the current version of the bundle.
+ \expandable\command{cnltx\at\at version}
+ The version number of the bundle.
+ \expandable\command{cnltx\at\at info}
+ The short description of the bundle.
+ \command{cnltx\at create\at bundle\at message}%
+ [\sarg\marg{module}\Marg{\choices{Error,Warning,WarningNoLine,Info}}]
+ \sinceversion{0.7}Create suiting error and warning messaging commands
+ for the module \meta{module} of the \cnltx\ bundle. The starred version
+ creates messages for a class the un-starred version messages for a
+ package.
+ \command{cnltx\at base\at error}[\marg{message}]
+ Issue an error message using \cs*{PackageError}\Marg{cnltx-base}.
+ \command{cnltx\at base\at warning}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarning}\Marg{cnltx-base}.
+ \command{cnltx\at base\at warningnoline}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarningNoLine}\Marg{cnltx-base}.
+ \command{cnltx\at base\at info}[\marg{message}]
+ Issue a message using \cs*{PackageInfo}\Marg{cnltx-base}.
+ \command{cnltx\at define\at colorscheme}[\marg{name}\marg{scheme definition}]
+ Command that can be used to define a color scheme.
+ \command{cnltx\at load\at module}[\marg{\cnltx\ module}]
+ \sinceversion{0.11}Loads the package \code{cnltx-\meta{\cnltx\
+ module}.sty}.
+ \command{cnltx\at load\at modules}[\marg{\cnltx\ modules}]
+ \sinceversion{0.11}Maps the comma separated list \meta{\cnltx\ modules} to
+ \cs{cnltx\at load\at module}, leading and trailing spaces are trimmed.
+\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 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. \meta{prefix} will be all lowercase in the generated command.
+ \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 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.
+\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}, \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
+ corresponds to \pkg{etoolbox}'s \code{test} directive for its
+ \cs*{ifboolexpr}.
+ \expandable\command{nottest}[\marg{test directive}\marg{not true}\marg{not false}]
+ \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}, \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}.
+ \expandable\command{cnltx\at ifcounter}[\marg{counter}\marg{true}%
+ \marg{false}]
+ \sinceversion{0.11}Checks if \meta{counter} is a counter, \ie, if the
+ control sequence names \cs*{c@\meta{counter}}, \cs*{cl@\meta{counter}},
+ \cs*{p@\meta{counter}} \emph{and} \cs*{the\meta{counter}} exist and either
+ leaves \meta{true} or \meta{false} in the input stream.
+ \command{cnltx\at ifnextchars}[\marg{list of
+ tokens}\marg{true}\marg{false}\meta{trailing token}]
+ \sinceversion{0.8}Tests if \meta{trailing token} is any of those in
+ \meta{list of tokens} and either places \meta{true} or \meta{false} in the
+ input stream without removing \meta{trailing token}.
+ \command{cnltx\at ifsym}[\marg{token}\marg{true}\marg{false}]
+ A generic version of \LaTeX's \cs*{@ifstar} that checks if \meta{token}
+ follows in the input stream. If yes it is removed and \meta{true} is
+ placed in the input stream else \meta{false}.
+ \command{cnltx\at ifdash}[\marg{true}\marg{false}]
+ A wrapper for \verbcode+\cnltx@ifsym{-}+.
+ \command{cnltx\at ifbang}[\marg{true}\marg{false}]
+ \sinceversion{0.3}A wrapper for \verbcode+\cnltx@ifsym{!}+.
+ \expandable\command{cnltx\at ifisnum}[\marg{token list}\marg{true}\marg{false}]
+ \sinceversion{0.6}Checks if \meta{token list} is an integer zero or
+ greater and leaves \meta{true} in the input stream if it is and
+ \meta{false} if it isn't. There is one hopefully extremely unlikely case
+ where the test fails: when \meta{token list} starts with
+ ``\code{\meta{integer}\%}'' where \code{\%} has a category code different
+ than 9 (ignored) or 14 (comment).
+ \expandable\command{cnltx\at ifshellescape}[\marg{true}\marg{false}]
+ \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
+ \meta{control sequence} according to \meta{specs}. In \meta{specs}
+ \begin{itemize}
+ \item \code{N} means unexpanded token,
+ \item \code{n} means unexpanded braced group,
+ \item \code{c} means braced group converted into a control sequence
+ name,
+ \item \code{o} means braced group expanded once,
+ \item \code{f} means braced group expanded with \cs*{romannumeral}, and
+ \item \code{x} means braced group expanded with \cs*{edef}.
+ \end{itemize}
+\end{commands}
+
+\paragraph{Category Code Stuff}
+\begin{commands}
+ \command{cnltx\at save\at catcode}[\marg{token}]
+ \sinceversion{0.11}Saves the current category code of \meta{token}.
+ \command{cnltx\at restore\at catcode}[\marg{token}]
+ \sinceversion{0.11}Restores the category code of \meta{token} as
+ previously saved with \cs{cnltx\at save\at catcode}.
+ \command{cnltx\at set\at catcode}[\marg{token}\marg{catcode}]
+ \sinceversion{0.11}Sets the category code of \meta{token} to
+ \meta{catcode}. This is a wrapper for \newline
+ \code{\cs*{catcode}`\meta{token}=\meta{catcode}\cs*{relax}}.
+ \command{cnltx\at save\at catcodes}[\marg{tokenlist}]
+ \sinceversion{0.11}Maps \cs{cnltx\at save\at catcode} to all tokens in
+ \meta{tokenlist}.
+ \command{cnltx\at restore\at catcodes}[\marg{tokenlist}]
+ \sinceversion{0.11}Maps \cs{cnltx\at restore\at catcode} to all tokens in
+ \meta{tokenlist}.
+ \command{cnltx\at set\at catcodes}[\marg{tokenlist}\marg{catcode}]
+ \sinceversion{0.11}Maps \cs{cnltx\at set\at catcode} to all tokens in
+ \meta{tokenlist}, \ie, all tokens get category code \meta{catcode}.
+ \command{cnltx\at make\at letter}[\marg{token}]
+ \sinceversion{0.11}A wrapper for \cs{cnltx\at set\at
+ catcode}\marg{token}\Marg{11}.
+ \command{cnltx\at make\at other}[\marg{token}]
+ \sinceversion{0.11}A wrapper for \cs{cnltx\at set\at
+ catcode}\marg{token}\Marg{12}.
+ \command{cnltx\at make\at active}[\marg{token}]
+ \sinceversion{0.11}A wrapper for \cs{cnltx\at set\at
+ catcode}\marg{token}\Marg{13}.
+\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}.
+ \command{cnltx\at greplace\at once}[\marg{cs}\marg{search}\marg{replace}]
+ \sinceversion{0.9}The same as \cs{cnltx\at replace\at once} but acts
+ globally.
+ \command{cnltx\at replace\at all}[\marg{cs}\marg{search}\marg{replace}]
+ Replaces all occurences of \meta{search} in the first expansion of
+ \meta{cs} with \meta{replace}.
+ \command{cnltx\at greplace\at all}[\marg{cs}\marg{search}\marg{replace}]
+ \sinceversion{0.9}The same as \cs{cnltx\at replace\at all} but acts
+ globally.
+ \command{cnltx\at remove\at once}[\marg{cs}\marg{search}]
+ \sinceversion{0.3}Removes the first occurence of \meta{search} in the
+ first expansion of \meta{cs}.
+ \command{cnltx\at gremove\at once}[\marg{cs}\marg{search}]
+ \sinceversion{0.9}The same as \cs{cnltx\at remove\at once} but acts
+ globally.
+ \command{cnltx\at remove\at all}[\marg{cs}\marg{search}]
+ \sinceversion{0.3}Removes all occurences of \meta{search} in the first
+ expansion of \meta{cs}.
+ \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
+ symbol for makeindex's ``actual'' recognition and also tells
+ \pkg{idxcmds}~\cite{pkg:idxcmds} about it or one uses \cs{cnltxat} in
+ \cs{cs} and friends. For the sake of convenience you can define a command
+ like \cs*{at} that expands to it\footnote{This is important. If you
+ \cs*{let} it to \cs{cnltxat} index entries may be sorted differently!
+ Remember: \cs{cnltxat} is robust.}. In order not to overwrite any such
+ existing macro it is not defined by \cnltxexample. This document for
+ example defines \verbcode+\def\at{\cnltxat}+.
+ \command{cnltxletterat}
+ An alias of \cs{cnltxat}.
+ \command{cnltxotherat}
+ The same as \cs{cnltxat} but with a `\at' with category code 12.
+ \command{cnltxbang}
+ The same as \cs{cnltxotherat} except that it contains a `\bang'.
+ \command{cnltxequal}
+ The same as \cs{cnltxotherat} except that it contains a `\equal'.
+\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}.
+ \command{cnltx\at doc\at warning}[\marg{message}]
+ Issue a warning message using \cs*{ClassWarning}\Marg{cnltx-doc}.
+ \command{cnltx\at doc\at warningnoline}[\marg{message}]
+ Issue a warning message using \cs*{ClassWarningNoLine}\Marg{cnltx-doc}.
+ \command{cnltx\at doc\at info}[\marg{message}]
+ Issue a message using \cs*{ClassInfo}\Marg{cnltx-doc}.
+ \command{cnltx\at getfileinfo}[\marg{file name}\marg{file extension}]
+ Extract the date, version and background information for a package or a
+ class and defines \cs{cnltx\at package\at date}, \cs{cnltx\at package\at
+ version} and \cs{cnltx\at package\at info} to contain the extracted
+ data.
+ \command{cnltx\at version\at note}[\marg{note}]
+ Command that is used for the versioning notes interally. Sets
+ \cs*{reversemarginpar} and then writes the note \meta{note} to the margin
+ with corresponding formatting.
+\end{commands}
+\begin{environments}
+ \environment{cnltxlist}
+ The list environment that is used by the environments \env{commands},
+ \env{options} and \env{environments}.
+\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}.
+ \command{cnltx\at example\at warning}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarning}\Marg{cnltx-example}.
+ \command{cnltx\at example\at warningnoline}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarningNoLine}\Marg{cnltx-example}.
+ \command{cnltx\at example\at info}[\marg{message}]
+ Issue a message using \cs*{PackageInfo}\Marg{cnltx-example}.
+ \command{cnltx\at isvalue}
+ Used in definitions of the key/value option typesetting commands. Inserts
+ a \code{=} with some stretchable space around and a legal break-point
+ after it.
+ \command{indexcs}
+ Version of \cs{csidx} that takes care of a \cs*{textcompwordmark} inserted
+ by listings. Also replaces all occurences of @ with category code 11 or 12
+ with \cs{cnltxat}. Used to index commands in the \env{sourcecode} and
+ \env{example} environments that have been added with \option{add-cmds}.
+ \command{indexenv}
+ \sinceversion{0.7a}Version of \cs{envidx} that takes care of a
+ \cs*{textcompwordmark} inserted by listings. Also replaces all occurences
+ of @ with category code 11 or 12 with \cs{cnltxat}. Used to index
+ environments in the \env{sourcecode} and \env{example} environments that
+ have been added with \option{add-envs}.
+ \command{cnltx\at treat\at lst\at index}[\marg{new index cs}\marg{internal
+ index cs}]
+ \sinceversion{0.7a}This command was used to define \cs{indexcs} and
+ \cs{indexenv}:\\
+ \verbcode+\cnltx@treat@lst@index{\indexcs}{\csidx}+
+ \command{MakePercentComment}
+ Sets the category code of \code{\%} to 14.
+ \command{cnltx\at copyablespace}
+ Prints a space that is also copyable. Uses the \pkg{accsupp} package by
+ \oberdiek~\cite{pkg:accsupp}.
+ \command{cnltx\at mdframed\at options}
+ Predefined option list for the \pkg{mdframed}~\cite{pkg:mdframed} style
+ \code{cnltx}.
+ \command{cnltx\at listings\at style}
+ Predefined option list for the \pkg{listings}~\cite{pkg:listings} style
+ \code{cnltx}.
+\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}.
+ \command{cnltx\at listings\at warning}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarning}\Marg{cnltx-listings}.
+ \command{cnltx\at listings\at warningnoline}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarningNoLine}\Marg{cnltx-listings}.
+ \command{cnltx\at listings\at info}[\marg{message}]
+ Issue a message using \cs*{PackageInfo}\Marg{cnltx-listings}.
+ \command{cnltx\at predefined\at control\at sequences}
+ A comma-separated list of predefined `silent' control sequence names.
+ \command{cnltx\at predefined\at environments}
+ A comma-separated list of predefined `silent' environment names.
+ \command{listsilentcmds}
+ Prints all known control sequence names formatted and separated with the
+ separator set with \option{list-sep}. Requires \cnltxexample.
+ \command{listsilentenvs}
+ Prints all known environment names formatted and separated with the
+ separator set with \option{list-sep}. Requires \cnltxexample.
+ \command{listbibfilekeys}[\marg{file name}]
+ \sinceversion{0.7}Prints all cite keys contained in the bibliography file
+ \meta{file name} formatted with \cs{code} and separated with the
+ separator set with \option{list-sep}. Requires \cnltxexample.
+ \command{listbibfiletypes}[\marg{file name}]
+ \sinceversion{0.7}Prints all citation types contained in the bibliography
+ file \meta{file name} formatted with \cs{code} and separated with the
+ separator set with \option{list-sep}. Requires \cnltxexample.
+ \command{listbibfileentries}[\marg{file name}]
+ \sinceversion{0.7}Prints all cite keys contained in the bibliography file
+ \meta{file name} formatted with \cs{code} and gives their respective
+ entry types, separated with the separator set with \option{list-sep}.
+ Requires \cnltxexample.
+\end{commands}
+\begin{options}
+ \keyval{list-sep}{separator}\Default{,\cs*{space}}
+ Sets the separator for \cnltxlistings' commands listing the different
+ commands \etc.
+\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}.
+ \command{cnltx\at tools\at warning}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarning}\Marg{cnltx-tools}.
+ \command{cnltx\at tools\at warningnoline}[\marg{message}]
+ Issue a warning message using \cs*{PackageWarningNoLine}\Marg{cnltx-tools}.
+ \command{cnltx\at tools\at info}[\marg{message}]
+ Issue a message using \cs*{PackageInfo}\Marg{cnltx-tools}.
+ \command{cnltx\at accsupp}[\marg{actual text}\marg{additional
+ options}\marg{\TeX\ text}]
+ A wrapper for package \pkg{accsupp}'s\newline
+ \cs*{BeginAccSupp}\Marg{ActualText = \meta{actual text}}\meta{\TeX\ text}%
+ \cs*{EndAccSupp}\marg{}.
+\end{commands}
+
+\section{List of Known \LaTeX\ Control Sequences}\label{sec:known:csnames}
+
+Below all \emph{predefined} control sequence names are listed that are treated
+as ``silent'' names by \cnltx, that is, those defined by \cnltxlistings.
+
+\begin{multicols}{3}\small
+ \RaggedRight\listsilentcmds
+\end{multicols}
+
+\section{List of Known \LaTeX\ Environments}\label{sec:known:environments}
+
+Below all \emph{predefined} environment names are listed that are treated as
+``silent'' names by \cnltx, that is, those defined by \cnltxlistings.
+
+\begin{multicols}{3}\small
+ \RaggedRight\listsilentenvs
+\end{multicols}
+
+\section{List of Entries in \code{cnltx.bib}}\label{sec:list-entr-bib}
+Most entries in \code{cnltx.bib} are entries of the \code{@package} type.
+The cite keys that the file currently contains are listed below. This list is
+very likely to be extended significantly in the future.
+
+\setcnltx{list-sep={,\par}}
+\begin{multicols}{3}\small
+ \RaggedRight\listbibfileentries{cnltx.bib}
+\end{multicols}
+
+\end{document}