summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ltxdockit
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/ltxdockit')
-rw-r--r--Master/texmf-dist/tex/latex/ltxdockit/btxdockit.sty86
-rw-r--r--Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cfg73
-rw-r--r--Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cls129
-rw-r--r--Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.def34
-rw-r--r--Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.sty501
5 files changed, 823 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ltxdockit/btxdockit.sty b/Master/texmf-dist/tex/latex/ltxdockit/btxdockit.sty
new file mode 100644
index 00000000000..53305c0099c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ltxdockit/btxdockit.sty
@@ -0,0 +1,86 @@
+% $Id: btxdockit.sty,v 1.1 2008/10/12 19:50:56 lehman stable $
+%
+% Copyright (c) 2008 Philipp Lehman.
+%
+% Permission is granted to copy, distribute and/or modify this
+% software under the terms of the LaTeX Project Public License
+% (LPPL), version 1.3.
+%
+% The LPPL maintenance status of this software is
+% 'author-maintained'.
+%
+% This software is provided 'as is', without warranty of any kind,
+% either expressed or implied, including, but not limited to, the
+% implied warranties of merchantability and fitness for a
+% particular purpose.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{btxdockit}[2008/10/12 v1.1 bibtex documentation kit]
+\RequirePackage{etoolbox}
+\RequirePackage{ltxdockit}
+
+% environments
+
+\newenvironment*{fieldlist}
+ {\ltd@pdfinit
+ \list{}{%
+ \setlength{\labelwidth}{\marglistwidth}%
+ \setlength{\labelsep}{\marglistsep}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{\hss\marglistfont##1}}%
+ \def\fielditem##1##2{%
+ \item[##1]%
+ \ltd@pdfbookmark{##1}{##1}%
+ field (##2)\par\nobreak
+ \vspace{\itemsep}}%
+ \def\listitem##1##2{%
+ \item[##1]%
+ \ltd@pdfbookmark{##1}{##1}%
+ list (##2)\par\nobreak
+ \vspace{\itemsep}}}
+ {\endlist
+ \ltd@pdfrestore}
+
+\newenvironment*{typelist}
+ {\ltd@pdfinit
+ \list{}{%
+ \setlength{\labelwidth}{\marglistwidth}%
+ \setlength{\labelsep}{\marglistsep}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{\hss\marglistfont##1}}%
+ \def\typeitem##1{%
+ \item[{##1}]%
+ \ltd@pdfbookmark{##1}{##1}}%
+ \def\reqitem{%
+ \par\begingroup\itemsep0.5\itemsep\item
+ Required fields: \btd@fieldloop}
+ \def\optitem{%
+ \par\begingroup\itemsep0.5\itemsep\item
+ Optional fields: \btd@fieldloop}}
+ {\endlist
+ \ltd@pdfrestore}
+
+\def\btd@fieldloop#1{%
+ \interlinepenalty\@M\raggedright
+ \def\@tempa{\def\@tempa{, }}
+ \def\do##1{\@tempa\bibfield{##1}}%
+ \docsvlist{#1}%
+ \par\endgroup}
+
+% verbatim
+
+\lstdefinestyle{bibtex}{%
+ moredelim=[is][\spotcolor]{<<}{>>}}
+
+% markup
+
+\newrobustcmd*{\bibfield}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\bibtype}[1]{\mbox{\verbatimfont @#1}}
+
+\ifpdf
+ \pdfstringdefDisableCommands{%
+ \def\bibfield#1{'#1'}%
+ \def\bibtype#1{@#1}}
+\fi
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cfg b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cfg
new file mode 100644
index 00000000000..d7df9098ffe
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cfg
@@ -0,0 +1,73 @@
+% $Id: ltxdockit.cfg,v 1.1 2008/10/12 19:50:56 lehman stable $
+
+\ProvidesFile{ltxdockit.cfg}[2008/10/12 v1.1 ltxdockit configuration (DFSG-free)]
+\RequirePackage{lmodern}
+
+\catcode`\"=\active
+\AtEndPreamble{%
+ \@ifpackageloaded{babel}
+ {\iflanguage{american}
+ {\expandafter\initiate@active@char\expandafter{\string"}%
+ \declare@shorthand{american}{"=}{\penalty\@M-\hskip\z@skip}%
+ \addto\extrasamerican{\languageshorthands{american}\bbl@activate{"}}%
+ \addto\noextrasamerican{\bbl@deactivate{"}}}
+ {}}
+ {}}
+\catcode`\"=12
+
+\newcommand*{\tex}{TeX\xspace}
+\newcommand*{\etex}{\mbox{e-TeX}\xspace}
+\newcommand*{\latex}{La\kern-0.07em TeX\xspace}
+\newcommand*{\bibtex}{Bib\kern-0.07em TeX\xspace}
+\newcommand*{\lppl}{\latex Project Public License\xspace}
+\newcommand*{\pdf}{\acr{PDF}\xspace}
+\newcommand*{\ie}{i.\,e.,\xspace}
+\newcommand*{\eg}{e.\,g.,\xspace}
+
+\pdfstringdefDisableCommands{%
+ \def\tex{TeX\xspace}%
+ \def\etex{e-TeX\xspace}%
+ \def\latex{LaTeX\xspace}%
+ \def\bibtex{BibTeX\xspace}%
+ \def\lppl{LaTeX Project Public License\xspace}%
+ \def\pdf{PDF\xspace}%
+ \def\ie{i.e.,\xspace}%
+ \def\eg{e.g.,\xspace}%
+}
+
+% tables
+
+\newcommand*{\tablesetup}{%
+ \let\verbatim@font\displayverbfont
+ \footnotesize}
+
+% layout
+
+\setcounter{totalnumber}{1}
+\setcounter{secnumdepth}{3}
+\setcounter{tocdepth}{2}
+\AtBeginToc{\setcounter{tocdepth}{2}}
+\AtEndToc{\setcounter{tocdepth}{5}}
+\addtolength{\oddsidemargin}{1cm}
+\setlength{\columnsep}{2em}
+\setlength{\multicolsep}{0pt}
+\clubpenalty6000\relax
+\widowpenalty\@M
+
+\renewcommand*{\labelenumi}{\theenumi.}
+\renewcommand*{\labelenumii}{\theenumii)}
+
+\renewcommand*{\verbatimfont}{\ttfamily}
+\renewcommand*{\displayverbfont}{\ttfamily}
+\renewcommand*{\marglistfont}{\spotcolor\sffamily\small}
+\renewcommand*{\optionlistfont}{\spotcolor\sffamily\displayverbfont}
+\renewcommand*{\ltxsyntaxfont}{\ttfamily}
+\renewcommand*{\ltxsyntaxlabelfont}{\spotcolor\displayverbfont}
+\renewcommand*{\changelogfont}{\normalfont}
+\renewcommand*{\changeloglabelfont}{\spotcolor\sffamily\bfseries}
+
+% no-ops
+
+\providecommand{\textln}[1]{#1}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cls b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cls
new file mode 100644
index 00000000000..af3892b51d7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.cls
@@ -0,0 +1,129 @@
+% $Id: ltxdockit.cls,v 1.1 2008/10/12 19:50:56 lehman stable $
+%
+% Copyright (c) 2008 Philipp Lehman.
+%
+% Permission is granted to copy, distribute and/or modify this
+% software under the terms of the LaTeX Project Public License
+% (LPPL), version 1.3.
+%
+% The LPPL maintenance status of this software is
+% 'author-maintained'.
+%
+% This software is provided 'as is', without warranty of any kind,
+% either expressed or implied, including, but not limited to, the
+% implied warranties of merchantability and fitness for a
+% particular purpose.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{ltxdockit}[2008/10/12 v1.1 latex documentation kit]
+\input{ltxdockit.def}
+
+\RequirePackage{etoolbox}
+\RequirePackage{multicol}
+\RequirePackage{keyval}
+\RequirePackage[T1]{fontenc}
+\RequirePackage{textcomp}
+\RequirePackage{ltxdockit}
+\RequirePackage{hyperref}
+\RequirePackage[all]{hypcap}
+
+\newrobustcmd*{\fnurl}{\hyper@normalise\ltd@fnurl}
+\def\ltd@fnurl#1{\footnote{\hyper@linkurl{\Hurl{#1}}{#1}}}
+
+\newrobustcmd*{\email}{\hyper@normalise\ltd@email}
+\def\ltd@email#1{\href{mailto:#1}{#1}}
+
+\hypersetup{%
+ linkcolor=spot,
+ urlcolor=spot,
+ bookmarksnumbered=false,
+ bookmarksopen=false,
+ colorlinks=true}
+
+% title
+
+\providecommand*{\titlepage}{}
+\providecommand*{\titlefont}{}
+\renewcommand*{\titlepage}[1]{\setkeys{ltd@ttp}{#1}}
+\renewcommand*{\titlefont}{\bfseries}
+\define@key{ltd@ttp}{title}{\def\ltd@title@title{#1}}
+\define@key{ltd@ttp}{subtitle}{\def\ltd@title@subtitle{#1}}
+\define@key{ltd@ttp}{url}{\def\ltd@title@url{#1}}
+\define@key{ltd@ttp}{author}{\def\ltd@title@author{#1}}
+\define@key{ltd@ttp}{email}{\def\ltd@title@email{#1}}
+\define@key{ltd@ttp}{revision}{\def\ltd@title@revision{#1}}
+\define@key{ltd@ttp}{date}{\def\ltd@title@date{#1}}
+
+\newcommand*{\printtitlepage}{%
+ \begingroup
+ \centering\titlefont
+ \begingroup\LARGE
+ \ifundef\ltd@title@url
+ {\ltd@title@title}
+ {\href{\ltd@title@url}{\ltd@title@title}}%
+ \par
+ \endgroup
+ \vspace{0.25\baselineskip}
+ \begingroup\large
+ \ltd@title@subtitle\par
+ \endgroup
+ \vspace{0.25\baselineskip}
+ \begin{multicols}{2}
+ \raggedleft
+ \ltd@title@author\par
+ \expandafter\email\expandafter{\ltd@title@email}\par
+ \raggedright
+ Version \ltd@title@revision\par\ltd@title@date
+ \end{multicols}
+ \endgroup}
+
+% rcs tags
+
+\providecommand*{\rcsfile}{[rcsfile]}
+\providecommand*{\rcsrevision}{[revision]}
+\providecommand*{\rcsdate}{[date]}
+\providecommand*{\rcstime}{[time]}
+\providecommand*{\rcsstate}{[state]}
+\providecommand*{\rcsauthor}{[author]}
+\providecommand*{\rcslocker}{[unlocked]}
+\providecommand*{\rcstoday}{\today}
+
+\providecommand*{\rcsid}[1]{%
+ \ifblank{#1}{}{\ltd@rcsid@i#1}}
+\def\ltd@rcsid@i$Id#1${%
+ \ifblank{#1}{}{\ltd@rcsid@ii#1&}}
+\def\ltd@rcsid@ii#1#2&{%
+ \ifblank{#1}{}{\ltd@rcsid@iii#2&}}
+\def\ltd@rcsid@iii#1 #2 #3 #4&{%
+ \write\@auxout{%
+ \detokenize{\gdef\rcsfile{#2}}^^J%
+ \detokenize{\gdef\rcsrevision{#3}}}%
+ \ltd@rcsid@iv#4&}
+\def\ltd@rcsid@iv#1/#2/#3 #4:#5:#6 #7&{%
+ \write\@auxout{%
+ \detokenize{\gdef\rcsdate{#1/#2/#3}}^^J%
+ \detokenize{\gdef\rcstime{#4:#5:#6}}^^J%
+ \detokenize{\ltd@setdate{#1}{#2}{#3}{#4}{#5}}}%
+ \ltd@rcsid@v#7&}
+\def\ltd@rcsid@v#1 #2 #3&{%
+ \write\@auxout{%
+ \detokenize{\gdef\rcsauthor{#1}}^^J%
+ \detokenize{\gdef\rcsstate{#2}}}%
+ \ifblank{#3}{}{\ltd@rcsid@vi#3&}}
+\def\ltd@rcsid@vi#1 &{%
+ \write\@auxout{%
+ \detokenize{\gdef\rcslocker{#1}}}}
+
+\def\ltd@setdate#1#2#3#4#5{%
+ \global\year=#1
+ \global\month=#2
+ \global\day=#3
+ \global\time=#4
+ \global\multiply\time by 60
+ \global\advance\time by #5}
+
+% config file
+
+\InputIfFileExists{ltxdockit.cfg}{}{}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.def b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.def
new file mode 100644
index 00000000000..16670ea0c45
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.def
@@ -0,0 +1,34 @@
+% $Id: ltxdockit.def,v 1.1 2008/10/12 19:50:56 lehman stable $
+
+\ProvidesFile{ltxdockit.def}[2008/10/12 v1.1 ltxdockit pre-configuration (DFSG-free)]
+\RequirePackage{etoolbox}
+
+\PassOptionsToClass{11pt,a4paper,DIV9,liststotoc,listsleft}{scrartcl}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrartcl}}
+\ProcessOptions*
+\LoadClass{scrartcl}
+
+% patches
+
+\newcommand*{\AtBeginToc}{\g@addto@macro\@begintochook}
+\newcommand*{\AtEndToc}{\g@addto@macro\@endtochook}
+\newcommand*{\@begintochook}{}
+\newcommand*{\@endtochook}{}
+\@onlypreamble\AtBeginToc
+\@onlypreamble\AtEndToc
+\newcommand*{\AtBeginLot}{\g@addto@macro\@beginlothook}
+\newcommand*{\AtEndLot}{\g@addto@macro\@endlothook}
+\newcommand*{\@beginlothook}{}
+\newcommand*{\@endlothook}{}
+\@onlypreamble\AtBeginLot
+\@onlypreamble\AtEndLot
+
+\pretocmd\@starttoc{\csuse{@begin#1hook}}{}{}
+\apptocmd\@starttoc{\csuse{@end#1hook}}{}{}
+
+\AtBeginToc{\multicolsep\z@\begin{multicols}{2}}
+\AtEndToc{\end{multicols}}
+\AtBeginLot{\multicolsep\z@\begin{multicols}{2}}
+\AtEndLot{\end{multicols}}
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.sty b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.sty
new file mode 100644
index 00000000000..11ea12c6189
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ltxdockit/ltxdockit.sty
@@ -0,0 +1,501 @@
+% $Id: ltxdockit.sty,v 1.1 2008/10/12 19:50:56 lehman stable $
+%
+% Copyright (c) 2008 Philipp Lehman.
+%
+% Permission is granted to copy, distribute and/or modify this
+% software under the terms of the LaTeX Project Public License
+% (LPPL), version 1.3.
+%
+% The LPPL maintenance status of this software is
+% 'author-maintained'.
+%
+% This software is provided 'as is', without warranty of any kind,
+% either expressed or implied, including, but not limited to, the
+% implied warranties of merchantability and fitness for a
+% particular purpose.
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{ltxdockit}[2008/10/12 v1.1 latex documentation kit]
+\RequirePackage{etoolbox}
+\RequirePackage{listings}
+\RequirePackage{color}
+\RequirePackage{xspace}
+\RequirePackage{ifpdf}
+\RequirePackage{hyperref}
+
+\newcount\ltd@tempcnta
+\newdimen\ltd@tempdima
+\newlength{\marglistwidth}
+\newlength{\marglistsep}
+\newif\ifpdfbookmarks
+
+\AtEndPreamble{%
+ \setlength{\marglistwidth}{\oddsidemargin}%
+ \addtolength{\marglistwidth}{1in}%
+ \setlength{\marglistwidth}{0.85\marglistwidth}%
+ \setlength{\marglistsep}{10pt}}
+
+\newcommand*{\marglistfont}{\bfseries}
+\newcommand*{\optionlistfont}{\bfseries}
+\newcommand*{\ltxsyntaxfont}{\ttfamily}
+\newcommand*{\ltxsyntaxlabelfont}{\bfseries}
+\newcommand*{\changelogfont}{\normalfont}
+\newcommand*{\changeloglabelfont}{\bfseries}
+\newcommand*{\verbatimfont}{\ttfamily}
+\newcommand*{\displayverbfont}{\ttfamily}
+\renewcommand*{\verbatim@font}{\verbatimfont}
+
+\definecolor{spot}{rgb}{0,0.2,0.6}
+\definecolor{boxframe}{gray}{0.8}
+\definecolor{boxfill}{rgb}{0.95,0.95,0.99}
+\newcommand*{\defaultcolor}{\color{black}}
+\newcommand*{\spotcolor}{\color{spot}}
+
+% markup
+
+\newrobustcmd*{\cs}[1]{\mbox{\verbatimfont\textbackslash#1}}
+\newrobustcmd*{\cmd}{\@ifstar\ltd@scmd\ltd@cmd}
+\def\ltd@cmd#1{\mbox{\verbatimfont\textbackslash#1}}
+\begingroup
+\catcode`\ =\active%
+\gdef\ltd@scmd#1{\mbox{\verbatimfont%
+\catcode`\ =\active\let \textvisiblespace%
+\textbackslash\scantokens{#1\relax}}}%
+\endgroup
+\newrobustcmd*{\env}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\len}[1]{\mbox{\verbatimfont\textbackslash#1}}
+\newrobustcmd*{\cnt}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\prm}[1]{%
+ \mbox{%
+ \ensuremath\langle
+ \normalfont\textit{#1}%
+ \ensuremath\rangle}}
+\newrobustcmd*{\mprm}[1]{%
+ \mbox{%
+ {\verbatimfont\{}%
+ \prm{#1}%
+ {\verbatimfont\}}}}
+\newrobustcmd*{\oprm}[1]{%
+ \mbox{%
+ {\verbatimfont[}%
+ \prm{#1}%
+ {\verbatimfont]}}}
+\newrobustcmd*{\opt}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\kvopt}[2]{{%
+ \verbatimfont#1\penalty\@M
+ \hskip 0em plus 0.15em\relax
+ =\penalty\hyphenpenalty
+ \hskip 0em plus 0.15em\relax #2}}
+
+\newrobustcmd*{\file}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\sty}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\bin}[1]{\mbox{\verbatimfont#1}}
+\newrobustcmd*{\acr}[1]{%
+ \ifx\f@family\rmdefault
+ \textsc{\MakeLowercase{#1}}%
+ \else
+ #1%
+ \fi}
+\csdef{*}{\textasteriskcentered}
+\newrobustcmd*{\keyval}{%
+ \begingroup\verbatimfont
+ \prm{key}=\penalty\hyphenpenalty
+ \prm{value}\endgroup
+ \xspace}
+
+\ifpdf
+ \pdfbookmarkstrue
+ \pdfstringdefDisableCommands{%
+ \def\cs#1{\textbackslash#1}%
+ \def\cmd#1{\textbackslash#1}%
+ \def\env#1{'#1'}%
+ \def\len#1{\textbackslash#1}%
+ \def\cnt#1{'#1'}%
+ \def\prm#1{'#1'}%
+ \def\mprm#1{\{#1\}}%
+ \def\oprm#1{[#1]}%
+ \def\opt#1{'#1'}%
+ \def\kvopt#1#2{'#1'='#2'}%
+ \def\keyval{'key'='value'}%
+ \let\file\@firstofone
+ \let\sty\@firstofone
+ \let\bin\@firstofone
+ \let\acr\@firstofone}%
+ \def\ltd@pdfinit{%
+ \ifpdfbookmarks
+ \let\ltd@pdflast\Hy@currentbookmarklevel
+ \numdef\ltd@pdflevel{\Hy@currentbookmarklevel+1}
+ \fi}
+ \def\ltd@pdfrestore{%
+ \ifpdfbookmarks
+ \global\let\Hy@currentbookmarklevel\ltd@pdflast
+ \fi}
+ \def\ltd@pdfbookmark#1#2{%
+ \ifpdfbookmarks
+ \def\ltd@pdfanchor{%
+ \the\c@part\ifundef\c@chapter{}{\the\c@chapter}%
+ \the\c@section\the\c@subsection\the\c@subsubsection
+ \the\c@paragraph\the\c@subparagraph:\detokenize{#1}}%
+ \pdfbookmark[\ltd@pdflevel]{#2}{\ltd@pdfanchor}
+ \fi}
+\else
+ \pdfbookmarksfalse
+ \let\ltd@pdfinit\relax
+ \let\ltd@pdfrestore\relax
+ \let\ltd@pdfbookmark\@gobbletwo
+\fi
+
+\newenvironment*{marglist}
+ {\list{}{%
+ \setlength{\labelwidth}{\marglistwidth}%
+ \setlength{\labelsep}{\marglistsep}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{\hss\marglistfont##1}}}
+ {\endlist}
+
+% syntax
+
+\newenvironment*{ltxsyntax}
+ {\ltd@pdfinit
+ \list{}{%
+ \setlength{\labelwidth}{\marglistwidth}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{%
+ \hss\ltxsyntaxfont\ltxsyntaxlabelfont##1}}%
+ \let\csitem\ltd@csitem
+ \let\cmditem\ltd@cmditem
+ \let\envitem\ltd@envitem
+ \let\lenitem\ltd@csitem
+ \let\boolitem\ltd@boolitem
+ \let\cntitem\ltd@item
+ \let\optitem\ltd@item}
+ {\endlist
+ \ltd@pdfrestore}
+
+\def\ltd@itemsave{%
+ \ltd@tempcnta\@itempenalty
+ \ltd@tempdima\itemsep
+ \@itempenalty\@M}
+\def\ltd@itemrest{%
+ \@itempenalty\ltd@tempcnta
+ \itemsep\ltd@tempdima}
+
+\def\ltd@syntaxsetup{%
+ \@makeother\[%
+ \@makeother\]%
+ \@makeother\<%
+ \@makeother\>%
+ \@makeother\|}%
+
+\def\ltd@itembreak{%
+ \ltd@goodbreak
+ \let\ltd@goodbreak\goodbreak}
+\let\ltd@goodbreak\relax
+
+\def\ltd@item{%
+ \@ifstar
+ {\boolfalse{@tempswa}\ltd@item@i}
+ {\booltrue{@tempswa}\ltd@item@i}}
+\def\ltd@item@i#1{%
+ \ifbool{@tempswa}
+ {\ltd@item@ii{#1\hspace\marglistsep}{#1}}
+ {\ltd@item@ii{#1\hspace\marglistsep}{}}}
+\def\ltd@item@ii#1#2{%
+ \ltd@itemsave
+ \ifhmode
+ \itemsep\z@
+ \else
+ \ltd@itembreak
+ \fi
+ \item[#1]%
+ \ltd@itemrest
+ \ifblank{#2}{}{\ltd@pdfbookmark{#2}{#1}}}
+
+\def\ltd@csitem{%
+ \@ifstar
+ {\boolfalse{@tempswa}\ltd@csitem@i}
+ {\booltrue{@tempswa}\ltd@csitem@i}}
+\def\ltd@csitem@i#1{%
+ \ifbool{@tempswa}
+ {\ltd@item@ii{\textbackslash#1\hspace\marglistsep}{#1}}
+ {\ltd@item@ii{\textbackslash#1\hspace\marglistsep}{}}}
+
+\def\ltd@boolitem#1{%
+ \ltd@item@ii{\textbackslash#1true\hspace\marglistsep}{}%
+ \leavevmode\vspace{-\parsep}%
+ \ltd@item@ii{\textbackslash#1false\hspace\marglistsep}{}%
+ \leavevmode\vspace{\numexpr-2\baselineskip}}
+
+\def\ltd@cmditem{%
+ \@ifstar
+ {\boolfalse{@tempswa}\ltd@cmditem@i}
+ {\booltrue{@tempswa}\ltd@cmditem@i}}
+\def\ltd@cmditem@i#1{%
+ \ifbool{@tempswa}
+ {\ltd@cmditem@ii{\textbackslash#1}{#1}}
+ {\ltd@cmditem@ii{\textbackslash#1}{}}}
+\def\ltd@cmditem@ii#1#2{%
+ \ltd@itemsave
+ \ifhmode
+ \itemsep-\topsep
+ \else
+ \ltd@itembreak
+ \fi
+ \item[#1]%
+ \ltd@itemrest
+ \ifblank{#2}{}{\ltd@pdfbookmark{#2}{#1}}%
+ \begingroup
+ \ltd@syntaxsetup
+ \ltxsyntaxfont
+ \let\@tempa\@empty
+ \ltd@parseargs}
+
+\def\ltd@envitem#1{%
+ \ltd@itembreak
+ \item[\textbackslash begin]\{{\ltxsyntaxfont\ltxsyntaxlabelfont#1}\}%
+ \ltd@pdfbookmark{#1}{#1}%
+ \begingroup
+ \ltd@syntaxsetup
+ \ltxsyntaxfont
+ \def\@tempa{%
+ \ltd@itemsave
+ \itemsep\z@
+ \item[\textbackslash end]\{{\ltxsyntaxfont\ltxsyntaxlabelfont#1}\}%
+ \ltd@itemrest}%
+ \ltd@parseargs}
+
+\def\ltd@parseargs{%
+ \futurelet\@let@token\ltd@parseargs@space}
+\def\ltd@parseargs@space{%
+ \ifx\@let@token\@sptoken
+ \expandafter\ltd@gobblespace
+ \else
+ \expandafter\ltd@parseargs@i
+ \fi}
+\def\ltd@parseargs@i{%
+ \ifx\@let@token\\%
+ \expandafter\ltd@printarg@i
+ \else
+ \expandafter\ltd@parseargs@ii
+ \fi}
+\def\ltd@parseargs@ii{%
+ \ifx\@let@token*%
+ \expandafter\ltd@printarg@ii
+ \else
+ \expandafter\ltd@parseargs@iii
+ \fi}
+\def\ltd@parseargs@iii{%
+ \ifx\@let@token[%]
+ \expandafter\ltd@printarg@iii
+ \else
+ \expandafter\ltd@parseargs@iv
+ \fi}
+\def\ltd@parseargs@iv{%
+ \ifx\@let@token(%)
+ \expandafter\ltd@printarg@iv
+ \else
+ \expandafter\ltd@parseargs@v
+ \fi}
+\def\ltd@parseargs@v{%
+ \ifx\@let@token<%>
+ \expandafter\ltd@printarg@v
+ \else
+ \expandafter\ltd@parseargs@vi
+ \fi}
+\def\ltd@parseargs@vi{%
+ \ifx\@let@token|%
+ \expandafter\ltd@printarg@vi
+ \else
+ \expandafter\ltd@parseargs@vii
+ \fi}
+\def\ltd@parseargs@vii{%
+ \ifx\@let@token\bgroup
+ \expandafter\ltd@printarg@vii
+ \else
+ \expandafter\ltd@parseargs@end
+ \fi}
+\def\ltd@parseargs@end{%
+ \@tempa\endgroup
+ \nobreak\vspace*{\itemsep}}
+
+\def\ltd@printarg@i#1{\%\nobreak\par\ltd@parseargs}
+\def\ltd@printarg@ii#1{{\ltxsyntaxfont\ltxsyntaxlabelfont#1}\ltd@parseargs}
+\def\ltd@printarg@iii[#1]{[\prm{#1}]\ltd@parseargs}
+\def\ltd@printarg@iv(#1){(\prm{#1})\ltd@parseargs}
+\def\ltd@printarg@v<#1>{\prm{#1}\ltd@parseargs}
+\def\ltd@printarg@vi|#1|{#1\ltd@parseargs}
+\def\ltd@printarg@vii#1{\{\prm{#1}\}\ltd@parseargs}
+\csdef{ltd@gobblespace} {\ltd@parseargs}
+
+% options
+
+\newenvironment*{optionlist}
+ {\ltd@pdfinit
+ \list{}{%
+ \setlength{\labelwidth}{\marglistwidth}%
+ \setlength{\labelsep}{\z@}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{\hss\optionlistfont##1}}%
+ \ltd@optionlist}
+ {\endlist
+ \ltd@pdfrestore}
+
+\newenvironment*{optionlist*}
+ {\ltd@pdfinit
+ \list{}{%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{\hss\optionlistfont##1}}%
+ \ltd@optionlist
+ \def\legitem##1{\item[##1]\item\relax}}
+ {\endlist
+ \ltd@pdfrestore}
+
+\def\ltd@optionlist{%
+ \newcommand*{\optitem}[3][]{%
+ \ifblank{##1}
+ {\ltd@option{##2}{##3}{}}
+ {\ltd@option{##2}{##3}{\ltd@textverb{##1}}}}%
+ \newcommand*{\valitem}[3][]{%
+ \ifblank{##1}
+ {\ltd@option{##2}{\prm{##3}}{}}
+ {\ltd@option{##2}{\prm{##3}}{\ltd@textverb{##1}}}}%
+ \newcommand*{\boolitem}[2][]{%
+ \ifblank{##1}
+ {\ltd@option{##2}{\ltd@textverb{true},
+ \ltd@textverb{false}}{}}
+ {\ltd@option{##2}{\ltd@textverb{true},
+ \ltd@textverb{false}}{\ltd@textverb{##1}}}}%
+ \newcommand*{\intitem}[2][]{%
+ \ifblank{##1}
+ {\ltd@option{##2}{\prm{integer}}{}}
+ {\ltd@option{##2}{\prm{integer}}{\ltd@textverb{##1}}}}%
+ \newcommand*{\legitem}[1]{%
+ \item[##1\hspace{\marglistsep}]%
+ \ltd@pdfbookmark{##1}{##1}}%
+ \def\ltd@textverb##1{{\displayverbfont##1}}%
+ \def\ltd@option##1##2##3{%
+ \item[##1]%
+ \ltd@pdfbookmark{##1}{##1}%
+ \ltd@textverb{=}{##2}%
+ \ifblank{##3}{}{\hfill default: ##3}%
+ \par\nobreak\vspace{\itemsep}}}
+
+\newenvironment*{valuelist}
+ {\list{}{%
+ \setlength{\labelwidth}{5em}%
+ \setlength{\labelsep}{0.5em}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{0pt}%
+ \renewcommand*{\makelabel}[1]{\displayverbfont##1\hss}}}
+ {\endlist}
+
+\newenvironment*{valuelist*}
+ {\list{}{%
+ \setlength{\labelwidth}{0pt}%
+ \setlength{\labelsep}{0pt}%
+ \setlength{\leftmargin}{0pt}%
+ \renewcommand*{\makelabel}[1]{\hss\optionlistfont##1}%
+ \let\@@item\item
+ \def\item[##1]{%
+ \@itempenalty-\@highpenalty
+ \@@item[##1]%
+ \@itempenalty\@M
+ \@@item\relax}}}
+ {\endlist}
+
+\newenvironment*{argumentlist}[1]
+ {\list{}{%
+ \settowidth{\labelwidth}{\displayverbfont#1}%
+ \setlength{\labelsep}{1em}%
+ \setlength{\leftmargin}{\labelwidth}%
+ \addtolength{\leftmargin}{\labelsep}%
+ \setlength{\itemsep}{0pt}%
+ \renewcommand*{\makelabel}[1]{\displayverbfont##1\hss}}}
+ {\endlist}
+
+% changelog
+
+\newenvironment*{changelog}
+ {\ltd@pdfinit
+ \list{}{%
+ \setlength{\leftmargin}{0pt}%
+ \setlength{\itemsep}{0pt}%
+ \renewcommand*{\makelabel}[1]{##1\hss}%
+ \raggedright\changelogfont}%
+ \def\release##1##2{%
+ \@release{##1}{##2}%
+ \list{}{%
+ \setlength{\leftmargin}{1.5em}%
+ \setlength{\itemindent}{-1.5em}%
+ \setlength{\itemsep}{0pt}}%
+ \samepage
+ \begingroup
+ \def\item{\endgroup\item\@itempenalty\z@}}%
+ \def\endrelease{\endlist}%
+ \def\@release##1##2{%
+ \begingroup
+ \changeloglabelfont
+ \item\relax
+ \ltd@pdfbookmark{##1}{##1 (##2)}%
+ ##1\quad##2\par\nobreak
+ \endgroup}
+ \def\see##1{%
+ \leaders\hbox{$\m@th\mkern4.5mu\hbox{.}\mkern4.5mu$}%
+ \hfill\makebox[2.75em][l]{\ref{##1}}}}
+ {\endlist
+ \ltd@pdfrestore}
+
+% verbatim
+
+\newlength{\lstenvsep}
+\setlength{\lstenvsep}{\partopsep}
+\addtolength{\lstenvsep}{\topsep}
+
+\lstset{%
+ aboveskip=\lstenvsep,
+ belowskip=\lstenvsep,
+ basicstyle=\displayverbfont\small,
+ commentstyle=\itshape,
+ keywordstyle=\spotcolor,
+ emphstyle=\spotcolor,
+ numbers=none,
+ basewidth=0.5em,
+ fontadjust=true,
+ flexiblecolumns=true,
+ keepspaces=false}
+
+\lstdefinestyle{plain}{%
+ escapechar={\#}}
+\lstdefinestyle{highlight}{%
+ moredelim=[is][\spotcolor]{<<}{>>}}
+\lstdefinestyle{latex}{%
+ alsoletter={\\},
+ moredelim=[is][\spotcolor]{<<}{>>}}
+\lstdefinestyle{ifthen}{%
+ alsoletter={\\},
+ keywords={\\and,\\or,\\not,\\AND,\\OR,\\NOT},
+ otherkeywords={=,<,>,\\(,\\)}}
+
+\lstnewenvironment{ltxcode}[1][]
+ {\lstset{style=latex,#1}}
+ {}
+
+\lstnewenvironment{ltxexample}[1][]
+ {\lstset{%
+ aboveskip=1.5\lstenvsep,
+ xleftmargin=3pt,
+ xrightmargin=3pt,
+ frame=single,
+ backgroundcolor=\color{boxfill},
+ fillcolor=\color{white},
+ rulecolor=\color{boxframe},
+ framesep=2.5pt,
+ framerule=0.5pt,
+ style=latex,#1}}
+ {}
+
+\endinput