summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tex/.texmf/tex/latex/misc/environ.sty145
-rw-r--r--tex/.texmf/tex/latex/misc/filecontents.sty99
-rw-r--r--tex/.texmf/tex/latex/misc/gmRCS.sty68
-rw-r--r--tex/.texmf/tex/latex/misc/gmampulex.sty215
-rw-r--r--tex/.texmf/tex/latex/misc/gmbase.sty3050
-rw-r--r--tex/.texmf/tex/latex/misc/gmcommand.sty2432
-rw-r--r--tex/.texmf/tex/latex/misc/gmdoc.sty4312
-rw-r--r--tex/.texmf/tex/latex/misc/gmenvir.sty143
-rw-r--r--tex/.texmf/tex/latex/misc/gmlogos.sty232
-rw-r--r--tex/.texmf/tex/latex/misc/gmmeta.sty292
-rw-r--r--tex/.texmf/tex/latex/misc/gmmw.sty363
-rw-r--r--tex/.texmf/tex/latex/misc/gmnotonlypream.sty88
-rw-r--r--tex/.texmf/tex/latex/misc/gmparts.sty165
-rw-r--r--tex/.texmf/tex/latex/misc/gmrelsize.sty80
-rw-r--r--tex/.texmf/tex/latex/misc/gmtypos.sty2099
-rw-r--r--tex/.texmf/tex/latex/misc/gmurl.sty301
-rw-r--r--tex/.texmf/tex/latex/misc/gmutils.sty136
-rw-r--r--tex/.texmf/tex/latex/misc/pstool.sty650
-rw-r--r--tex/.texmf/tex/latex/misc/pstool.tex1184
-rw-r--r--tex/.texmf/tex/latex/misc/soul.sty898
-rw-r--r--tex/.texmf/tex/latex/misc/tcolorbox.sty2130
-rw-r--r--tex/.texmf/tex/latex/misc/titlesec.sty1350
-rw-r--r--tex/.texmf/tex/latex/misc/todonotes.sty474
-rw-r--r--tex/.texmf/tex/latex/misc/trimspaces.sty58
24 files changed, 20964 insertions, 0 deletions
diff --git a/tex/.texmf/tex/latex/misc/environ.sty b/tex/.texmf/tex/latex/misc/environ.sty
new file mode 100644
index 0000000..8cf854b
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/environ.sty
@@ -0,0 +1,145 @@
+%%
+%% This is file `environ.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% environ.dtx (with options: `package')
+%%
+%% __________________________________
+%% Copyright (C) 2007 Will Robertson
+%%
+%% License information appended.
+%%
+%% ^^A Test that \RenewEnvironment works correctly:
+\ProvidesPackage{environ}[2014/05/04 v0.3 A new way to define environments]
+\RequirePackage{trimspaces}
+\def\environbodyname#1{\def\env@BODY{#1}}
+\environbodyname\BODY
+\def\environfinalcode#1{%
+ \def\env@finalcode{#1}}
+\environfinalcode{\ignorespacesafterend}
+\def\longdef@c#1{%
+ \expandafter\long\expandafter\def\csname#1\endcsname}
+\unless\ifdefined\collect@body
+ \newtoks\@envbody
+ \def\collect@body#1{%
+ \@envbody{\expandafter#1\expandafter{\the\@envbody}}%
+ \edef\process@envbody{\the\@envbody\noexpand\end{\@currenvir}}%
+ \@envbody={}%
+ \def\begin@stack{b}%
+ \begingroup
+ \expandafter\let\csname\@currenvir\endcsname\collect@@body
+ \edef\process@envbody{%
+ \expandafter\noexpand\csname\@currenvir\endcsname}%
+ \process@envbody
+ }
+ \def\push@begins#1\begin#2{%
+ \ifx\end#2\else
+ b\expandafter\push@begins
+ \fi}
+ \def\addto@envbody#1{%
+ \global\@envbody\expandafter{\the\@envbody#1}}
+ \def\collect@@body#1\end#2{%
+ \edef\begin@stack{%
+ \push@begins#1\begin\end \expandafter\@gobble\begin@stack}%
+ \ifx\@empty\begin@stack
+ \endgroup
+ \@checkend{#2}%
+ \addto@envbody{#1}%
+ \else
+ \addto@envbody{#1\end{#2}}%
+ \fi
+ \process@envbody}
+\fi
+\long\def\Collect@Body#1{%
+ \@envbody{\expandafter#1\expandafter{\the\@envbody}}%
+ \edef\process@envbody{\the\@envbody\noexpand\end{\@currenvir}}%
+ \@envbody={}%
+ \def\begin@stack{b}%
+ \begingroup
+ \expandafter\let\csname\@currenvir\endcsname\Collect@@Body
+ \edef\process@envbody{%
+ \expandafter\noexpand\csname\@currenvir\endcsname}%
+ \process@envbody
+}
+\long\def\Push@Begins#1\begin#2{%
+ \ifx\end#2\else
+ b\expandafter\Push@Begins
+ \fi}
+\long\def\Addto@Envbody#1{%
+ \global\@envbody\expandafter{\the\@envbody#1}}
+\long\def\Collect@@Body#1\end#2{%
+ \edef\begin@stack{%
+ \Push@Begins#1\begin\end\expandafter\@gobble\begin@stack}%
+ \ifx\@empty\begin@stack
+ \endgroup
+ \@checkend{#2}%
+ \Addto@Envbody{#1}%
+ \else
+ \Addto@Envbody{#1\end{#2}}%
+ \fi
+ \process@envbody}
+\def\NewEnviron{%
+ \let\env@newenvironment\newenvironment
+ \env@NewEnviron}
+\def\RenewEnviron{%
+ \let\env@newenvironment\renewenvironment
+ \env@NewEnviron}
+\def\env@NewEnviron#1{%
+ \@ifnextchar[
+ {\env@new@i{#1}}
+ {\env@new@iii{#1}{}}}
+\def\env@new@i#1[#2]{%
+ \@ifnextchar[
+ {\env@new@ii{#1}[#2]}
+ {\env@new@iii{#1}{[#2]}}}
+\def\env@new@ii#1[#2][#3]{%
+ \env@new@iii{#1}{[#2][#3]}}
+\long\def\env@new@iii#1#2#3{%
+ \@temptokena={\env@new{#1}{#2}{#3}}%
+ \@ifnextchar[{%
+ \the\@temptokena
+ }{%
+ \expandafter\the\expandafter
+ \@temptokena\expandafter[\env@finalcode]%
+ }}
+\long\def\env@new#1#2#3[#4]{%
+ \longdef@c{env@#1@BODY\expandafter}\expandafter{\env@BODY}%
+ \env@newenvironment{#1}{%
+ \expandafter\Collect@Body\csname env@#1@parse\endcsname
+ }{#4}%
+ \longdef@c{env@#1@parse}##1{%
+ \csname env@#1@save@env\endcsname##1\env@nil
+ \csname env@#1@process\endcsname##1\env@nil}%
+ \expandafter\let\csname env@#1@save@env\endcsname\relax
+ \expandafter\let\csname env@#1@process\endcsname\relax
+ \expandafter\newcommand
+ \csname env@#1@save@env\endcsname#2{%
+ \expandafter\expandafter\expandafter
+ \env@save\csname env@#1@BODY\endcsname}%
+ \expandafter\newcommand
+ \csname env@#1@process\endcsname#2{#3\env@ignore}%
+}
+\long\def\env@save#1#2\env@nil{%
+ \edef#1{%
+ \unexpanded\expandafter
+ \expandafter\expandafter{\trim@spaces{#2}}}}
+\long\def\env@ignore#1\env@nil{}
+%%
+%% Copyright (C) 2007-2014 by Will Robertson <wspr81@gmail.com>
+%%
+%% Distributable under the LaTeX Project Public License,
+%% version 1.3c or higher (your choice). The latest version of
+%% this license is at: http://www.latex-project.org/lppl.txt
+%%
+%% This work is "maintained" (as per LPPL maintenance status)
+%% by Will Robertson.
+%%
+%% This work consists of the file environ.dtx
+%% and the derived files environ.pdf,
+%% environ.sty, and
+%% environ.ins.
+%%
+%%
+%% End of file `environ.sty'.
diff --git a/tex/.texmf/tex/latex/misc/filecontents.sty b/tex/.texmf/tex/latex/misc/filecontents.sty
new file mode 100644
index 0000000..191f19e
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/filecontents.sty
@@ -0,0 +1,99 @@
+%%
+%% This is file `filecontents.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% filecontents.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2011 Scott Pakin <scott+fc@pakin.org>
+%% -------------------------------------------------------
+%%
+%% This package may be distributed and/or modified under the conditions
+%% of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+%% version 2008/05/04 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{filecontents}
+ [2011/10/08 v1.3 Create an external file from within a LaTeX document]
+\begingroup%
+\catcode`\*=11 %
+\catcode`\^^M\active%
+\catcode`\^^L\active\let^^L\relax%
+\catcode`\^^I\active%
+\gdef\filec@ntents#1{%
+ \openin\@inputcheck#1 %
+ \ifeof\@inputcheck%
+ \@latex@warning@no@line%
+ {Writing file `\@currdir#1'}%
+ \else %
+ \@latex@warning@no@line%
+ {Overwriting file `\@currdir#1'}%
+ \fi %
+ \closein\@inputcheck %
+ \chardef\reserved@c15 %
+ \ch@ck7\reserved@c\write%
+ \immediate\openout\reserved@c#1\relax%
+ \if@tempswa%
+ \immediate\write\reserved@c{%
+ \@percentchar\@percentchar\space%
+ \expandafter\@gobble\string\LaTeX2e file `#1'^^J%
+ \@percentchar\@percentchar\space generated by the %
+ `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+ \@percentchar\@percentchar\space from source `\jobname' on %
+ \number\year/\two@digits\month/\two@digits\day.^^J%
+ \@percentchar\@percentchar}%
+ \fi%
+ \let\do\@makeother\dospecials%
+ \count0=128\relax %
+ \loop %
+ \catcode\count0=11\relax %
+ \advance\count0 by 1\relax %
+ \ifnum\count0<256 %
+ \repeat %
+ \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+ \edef\reserved@b{%
+ \def\noexpand\reserved@b%
+ ####1\E####2\E####3\relax}%
+ \reserved@b{%
+ \ifx\relax##3\relax%
+ \immediate\write\reserved@c{##1}%
+ \else%
+ \edef^^M{\noexpand\end{\@currenvir}}%
+ \ifx\relax##1\relax%
+ \else%
+ \@latex@warning{Writing text `##1' before %
+ \string\end{\@currenvir}\MessageBreak as last line of #1}%
+ \immediate\write\reserved@c{##1}%
+ \fi%
+ \ifx\relax##2\relax%
+ \else%
+ \@latex@warning{%
+ Ignoring text `##2' after \string\end{\@currenvir}}%
+ \fi%
+ \fi%
+ ^^M}%
+ \catcode`\^^L\active%
+ \let\L\@undefined%
+ \def^^L{\@ifundefined L^^J^^J^^J}%
+ \catcode`\^^I\active%
+ \let\I\@undefined%
+ \def^^I{\@ifundefined I\space\space}%
+ \catcode`\^^M\active%
+ \edef^^M##1^^M{%
+ \noexpand\reserved@b##1\E\E\relax}}%
+\endgroup%
+\def\fc@no@preamblecmds#1\do\filecontents#2\do\filec@ntents#3\relax{%
+ \gdef\@preamblecmds{#1#3}}
+\expandafter\fc@no@preamblecmds\@preamblecmds\relax
+\endinput
+%%
+%% End of file `filecontents.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmRCS.sty b/tex/.texmf/tex/latex/misc/gmRCS.sty
new file mode 100644
index 0000000..1ecabf4
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmRCS.sty
@@ -0,0 +1,68 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmRCS.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `RCS')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmRCS}
+ [2011/10/12 v0.996 (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+
+\def\ParseRCSVersion$Id%
+: #1.#2,v #3 #4 #5 #6 #7${%
+ \def\RCSFileName{#1}%
+ \def\RCSFileExt{#2}%
+ \def\RCSFile{#1.#2}%
+ \def\RCSVersion{#3}%
+ \def\RCSDate{#4}%
+ \def\RCSTime{#5}%
+ \def\RCSAuthor{#6}%
+}
+
+
+\def\defRCSeDatum
+#1% datum name
+#2% datum definition (basically |#|number)
+{%
+ \@namedef{eRCS#1}$Id%
+ : ##1.##2,v ##3 ##4 ##5 ##6 ##7${#2}%
+}
+
+\defRCSeDatum{File}{#1.#2} % |\eRCSFile|
+\defRCSeDatum{Version}{#3}% |\eRCSVersion|
+\defRCSeDatum{Date}{#4}% |\eRCSVDate|
+\defRCSeDatum{Time}{#5}% |\eRCSVTime|
+\defRCSeDatum{Author}{#6}% |\eRCSVAuthor|
+
+\endinput
+%%
+%% End of file `gmRCS.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmampulex.sty b/tex/.texmf/tex/latex/misc/gmampulex.sty
new file mode 100644
index 0000000..9ae5448
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmampulex.sty
@@ -0,0 +1,215 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmampulex.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `ampulex')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmampulex}
+ [2011/10/12 v0.996 Ampulex Compressa-like modifier of macros (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage{gmcommand}
+
+\DeclareCommand\ampulexlet\long
+{Q{\outer\long\global\protected}{} % (1) (optional) prefix\:(es);
+ % allowed is any sequence of them in any order, just like for the
+ % original \TeX's \incmd\def.
+ T{\def\edef\gdef\xdef\pdef}{\def} % (2) (optional) kind of definition; if
+ % not specified, \incmd\def\ will be used.
+ m % (3) macro to be let to,
+ m % (4) macro to provide the definition,
+ O{} % (5) \cs{def}'s parameters string; empty by default,
+ O{} % (6) definition body's parameters to be taken in a~one-step
+ % expansion of the redefined macro; empty by default; the
+ % undelimited parameters should be double-braced here.
+ m % (7) start token(s),
+ m % (8) end token(s)
+ m % (9) the replacement of |#7|, |#8| and whatever between them.
+}{%^^B
+ % \changes{v0.93}{2008/08/29}{added}
+ % \changes{v0.94}{2008/09/07}{made \pk{xparse}-ish and
+ % \cs{ampulexset} removed}
+ % \chgs{2008/12/7 v0.98 first argument (the prefix) made of the
+ % \env{Q} type}
+ % For the example of usage see \ref{ampulexset}. \HideDef
+ %
+ \long\def\gmu@ampulexlet@resa
+ ##1#7% we put |#7| as a delimiter
+ ##2#8% we put |#8| as a delimiter
+ ##3\gmu@AmpulexDelimiter{%
+ % We use a special (undefined) \CS |\gmu@AmpulexDelimiter| as
+ % the final delimiter because standard \LaTeX's |\@nil| isn't
+ % probably a good idea since we
+ % want to ampulex deep \LaTeX's macros and other |\gmu@›…|
+ % macros too.
+ \gmu@ifempty{##3}%
+ }%
+ % Now |\gmu@ampulexlet@resa| is redefined to produce an open |\gmu@ifempty|
+ % depending on whether the start and end token(s) are found in the
+ % meaning of \inverb|#4|.
+ %
+ % Before we proceed, we deal with a difficulty with a special case
+ % when |#6| is “|#1|”, which occurs because of stripping braces of a
+ % single-brace argument.
+ \gmu@ifutokens{#6}{##1}%
+ {\def\ampulex@Args{{%
+ ####1}}%
+ }%
+ {\edef\ampulex@Args{\@nx\unexpanded{%
+ \unexpanded{#6}}}}%
+ \long \def\gmu@ampulexlet@resc##1{%
+ \@xa\@xa\@xa\@xa \@xa\@xa\@xa\gmu@ampulexlet@resa
+ \@xa\@xa\@xa#4%
+ \ampulex@Args
+ ##1% this parameter will be substituted with |#7#8| in
+ % line~\ref{resc1} and with emptiness in line~\ref{resc2}.
+ \gmu@AmpulexDelimiter
+ }%
+ %
+ \gmu@ampulexlet@resc{#7#8}%\label{resc1} % ^^V \gmu@ampulexlet@resb
+ % We've just applied the checker and it produces an open
+ % |\gmu@ifempty{⁄<some tokens>}|
+ % if the delimiters are found in the meaning of |#4|
+ % so, if \<some tokens> are none, we issue a warning
+ {%
+ \PackageWarning{gmampulex}{%
+ \@nx#4 doesn't contain tokens
+ \detokenize{#7} nor \detokenize{#8}. You better check if this is
+ what you want to redefine.^^J%
+ \@nx#4 is^^J%
+ \meaning#4^^J%
+ }}%
+ % and we proceed if they are really some
+ {%
+ % We define a~temporary
+ % macro with the parameters delimited with the `start' and `end' parameters
+ % of \incs{ampulexdef}. It has to stand a double |\edef|.
+ \edef\gmu@ampulexlet@resa{%
+ \long\def\@nx\gmu@ampulexlet@resa
+ ####1\unexpanded{#7}%
+ ####2\unexpanded{#8}%
+ ####3\@nx\gmu@AmpulexDelimiter{%
+ \@nx\unexpanded{####1}%
+ % we drop the part between the |#7| and |#8| delimiters
+ % (including delimiters)
+ \unexpanded{\unexpanded{#9}}% we replace the part of the
+ % redefined macro's meaning with the replacement text.
+ \@nx\unexpanded{####3}%
+ }% of inner |\gmu@ampulexlet@resa|
+ }% of outer |\gmu@ampulexlet@resa|
+ \gmu@ampulexlet@resa
+ % Now |\gmu@ampulexlet@resa| carries the modifier of |#4|'s
+ % definition.
+ %
+ %
+\unless\ifx\czat#4%
+ \edef\gmu@ampulexlet@resb{% double definition for double hashes of expanded
+ % |\unexpanded{#1›…}|
+ #1#2%
+ \@nx#3\unexpanded{#5}{%
+ \gmu@ampulexlet@resc{}%\label{resc2}
+ % Here we are sure the tokens sequences
+ % |#7| and |#8| are in the one-level expansion of |#4| so we don't pass them
+ % as sentinels (which \ac{BTW} would totally spoil the redefinition, what it
+ % did indeed 2010/6/23).
+ }% of |#3|'s definition body
+ }% of inner |\gmu@ampulexlet@resb|
+ \gmu@ampulexlet@resb
+\else
+ \gmu@ifxany#2{\gdef\xdef}{\global}{}%
+ #1\edef#3#5{\gmu@ampulexlet@resc{}}%\label{resc2}
+\fi
+ }% of if the delimiters were found in the meaning.
+}% of |\ampulexlet|
+
+\DeclareCommand\ampulexdef\long{%
+ % \chgs{2010/04/22 v0.994 rewritten not to use the arguments 7–9
+ % explicitly not to wrap them in a temporary macros, and to accept
+ % single hashes (instead of quadruple) in arguments 5 and 6. The
+ % temporary macros renamed
+ % to \cmd\gmu@reserveda and \cmd\gmu@reservedb. The body moved to
+ % \cmd\ampulexlet with adding another \CS argument to let let a
+ % macro not necessarily redefine it itself and this command made a
+ % particular case of that new one}
+#1 Q{\outer\long\global\protected}{} % (1) as |\ampulexlet|
+#2 T{\def\edef\gdef\xdef\pdef}{\def} % (2) ad |\ampulexlet|
+#3 m % (3) macro to be redefined,
+#4 O{} % (4) as |\ampulexlet|'s |#5|, i.e., \cs{def}'s parameters string; empty by default,
+#5 O{} % (5) as |\ampulexlet|'s |#6|, i.e., definition body's
+ % parameters to be taken in a~one-step expansion of the redefined
+ % macro; empty by default; the undelimited parameters should be
+ % double-braced here (but not doubled).
+#6 m % (6) start token(s),
+#7 m % (7) end token(s),
+#8 m % (8) the replacement
+}{%
+ \DCUse\ampulexlet{#1}{#2}{#3}{#3}{#4}{#5}{#6}{#7}{#8}%
+}
+
+
+
+\def\gmu@ENumLoop#1#2{% this is a~fully expandable loop generating |#2|${}-{}$|#1|
+ % space tokens (cf. The % \eTeX\ Manual p.~9).
+ \ifnum#1<#2 %
+ \gmu@tempa
+ \@xa\gmu@ENumLoop
+ \@xa{\number\numexpr#1+1\@xa}%
+ \@xa{\number#2\@xa}%
+ \fi}% of |\gmu@hashes|.
+
+\long\def\defENumLoop
+#1% the loop macro's name
+#2% the replacement of |\gmu@tempa|
+{%
+ \ampulexlet#1\gmu@ENumLoop
+ [##1##2][{##1}{##2}]%
+ \gmu@tempa\@xa{#2\@xa}%
+ %
+ \ampulexdef#1%
+ [##1##2][{##1}{##2}]%
+ \gmu@ENumLoop\@xa{#1\@xa}%
+}
+
+\edef\GenericInfoToTerminal{%
+ \unexpanded{%
+ \@XA{\ampulexlet\protected\long\GenericInfo}\csname
+ GenericInfo \endcsname[#1#2][{#1}{#2}]%
+ \write\m@ne % we replace the token between these with:
+ {\write\ifnum\tracingonline>\z@ \@unused\else\m@ne\fi}%
+ }%
+}
+
+\ampulexdef\@starttoc[#1][#1]\makeatletter\@input{\makeatletter\NamedInput}
+
+
+\endinput
+%%
+%% End of file `gmampulex.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmbase.sty b/tex/.texmf/tex/latex/misc/gmbase.sty
new file mode 100644
index 0000000..23bd9eb
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmbase.sty
@@ -0,0 +1,3050 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmbase.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `base')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmbase}
+ [2011/10/12 v0.996 some low-level macros (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage {expl3, xparse} % because it's used anyway: by
+
+\ifx\XeTeXversion\relax
+ \let\XeTeXversion\@undefined% If someone earlier used
+\fi
+
+\ifdefined\XeTeXversion
+\XeTeXinputencoding utf-8 % we use Unicode dashes later in this file.
+\fi% and if we are not in \XeTeX, we skip them thanks to \XeTeX-test.
+
+\unless\ifdefined\strcmp
+ \let\strcmp\pdfstrcmp
+\fi
+
+\let\@xa\expandafter
+\let\@nx\noexpand
+
+\def\@xanx{\@xa\@nx}
+
+\long\def\@xadef#1{\@xa\def\@xa#1\@xa}
+
+\long\def\@csn#1{\csname #1\endcsname}
+
+\long\def\Name#1#2{\@xa#1\csname #2\endcsname}
+
+\long\def\@xau#1{\unexpanded\@xa{#1}}
+
+\def\gmu@firstandspace#1{#1 }
+
+\long\def\strip@bslash#1{%
+ \gmu@ifempty{#1}{}{%
+ \gmu@if {cat}{\@nx~\@nx#1}% this is specially for an active
+ % backslash (have you ever met it?). Thanks to this special case
+ % the inner macro declared for an active |\| by |\DeclareCommand|
+ % is |\\\| not |\\csname\endcsname\|.
+ {\string#1}% if |#1| is active
+ {%
+ \@xa\@xa\@xa\ifnum\@xa\@xa\@xa\escapechar
+ \@xa\@xa\@xa=\@xa\@xa\@xa`\@xa\gmu@firstandspace
+ \string#1\@xa\@gobble
+ \else\@xa\@firstofone \fi
+ {\string#1}%
+ }% if |#1| is not active
+ }% of if |#1| not empty
+}
+
+\long\def\bslash@or@ac#1{%
+ \ifcat\@nx~\@nx#1%
+ \else
+ \bslash
+ \fi
+ \strip@bslash{#1}%
+}
+
+\long\def\@xanxcs #1{%
+ \ifcat\@nx~\@nx#1%
+ \@nx#1%
+ \else
+ \@xa\@nx\csname #1\endcsname
+ \fi
+}
+
+\long\def\@xanxcssimple #1{%
+ \@xa\@nx\csname #1\endcsname
+}
+
+\long\def\@xaucs#1{%
+ \unexpanded\@xa\@xa\@xa{\csname #1\endcsname}%
+}
+
+\long\def\@xanxtri#1{%
+ \ifcat\@nx~\@nx#1%
+ \@nx#1%
+ \else
+ \@xa\@nx\csname \strip@bslash{#1}\endcsname
+ \fi
+}
+
+\def\pdef{\protected\def}
+
+\def\lpdef{\long\protected\def}
+\let\pldef\lpdef
+
+\long\def\gmu@ifdefinable
+#1% a \CS
+{%
+ \ifx #1\@undefined
+ \@xa \@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+ {\@firstoftwo}%
+ {\ifx #1\relax
+ \@xa\@firstoftwo
+ \else
+ \@xa \@secondoftwo
+ \fi
+ }%
+}
+
+\def\pedef{\protected\edef}
+
+\def\pxdef{\protected\xdef}
+
+\long\def\gobble#1{}
+\let\@gobble\gobble
+\let\gobbletwo\@gobbletwo % it's a \LaTeX's |\long| macro (in File d:
+
+\long\def\@gobbleeight#1#2#3#4#5#6#7#8{}
+
+\long\pdef\provide#1{%\changes{v0.93}{2008/08/30}{added}
+ \ifdefined#1% \UnDef
+ \ifx\relax#1\afterfifi{\def#1}%
+ \else\afterfifi{\gmu@gobdef}% \UnDef
+ \fi
+ \else\afterfi{\def#1}%
+ \fi}
+
+\long\def\gmu@gobdef#1#{% \UnDef
+ \def\gmu@tempa{}% it's a~junk |\def|-assignment
+ % to absorb possible prefixes.
+ \@gobble
+}
+
+\def\pprovide{\protected\provide}
+
+\long\def\@nameedef#1#2{% \changes{v0.93}{2008/08/30}{added}
+ \@xa\edef\csname#1\endcsname{#2}}
+
+
+\pdef\gmu@DefSymbol#1{%
+ \unless\ifdefined#1%
+ \def#1{#1}%
+ \fi
+}
+
+\newcommand\newdef % sort of newcommand that accepts prefixes.
+[1]%
+{%
+ \gmu@ifdefinable #1%
+ {\pdef #1}
+ {%
+ \PackageError {gmbase} {\@nx#1 already defined.}{}%
+ \gmu@gobdef
+ }%
+}
+
+\protected\newdef \pnew {%
+ \protected\newdef
+}
+
+
+\long\def\gmu@if #1#2{%
+ \csname if#1\endcsname #2%
+ \@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi
+}
+
+\long\def\gmu@notif#1#2{%
+ \gmu@if {#1}{#2}%
+ \@secondoftwo\@firstoftwo
+}
+
+\def\gmu@ifsw #1{\gmu@if {#1}{}}
+\def\gmu@notsw #1{\gmu@notif {#1}{}}
+
+\def \gmu@ifincsname
+{%
+ \ifincsname
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+\long\def\gmu@unless #1#2{%
+ \@xa\unless \csname if#1\endcsname #2%
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+
+\lpdef\@iwru@EC#1#2#3{%
+ \@iwrum{#1»{#2}« »#3«}%
+ \gmu@passbraced{#1{#2}}{#3}%
+}
+
+\long\def\gmu@generalCASE
+#1% Testing macro (|\gmu@if| etc.
+#2% |#1| of the testing macro
+#3% |#2| of the testing macro
+#4% |#3| of the testing macro (what if test satisfied)\\
+{%
+ #1{#2}{#3}%
+ {%
+ \gmu@EatCases{#4}}{}%
+}
+
+\long\def\gmu@EatCases
+#1%
+#2\gmu@ESAC
+{#1}
+
+\let\gmu@lastCASE\gmu@EatCases
+
+\def\gmu@CASE {\gmu@generalCASE \gmu@if }
+\def\gmu@CASEnot {\gmu@generalCASE \gmu@notif }
+\def\gmu@CASExany {\gmu@generalCASE \gmu@ifxany }
+\def\gmu@CASExnone {\gmu@generalCASE \gmu@ifxnone }
+
+\long\def\gmu@reserved@firstofmany#1#2\gmu&nil{#1}
+
+\long\def\ifsingletoken#1{% ^^V \gmu &nil % such a strange delimiter to
+ % make it work both in letter and
+ % other |@| scopes etc.\ (|&| seems to
+ % me recatcoded rather seldom)
+ \ifnum \strcmp{\unexpanded{#1}}%
+ {\@xau{\gmu@reserved@firstofmany #1\blekotnizza@ \di \broccoli
+ \gmu&nil}%
+ }% of right text of |\strcmp|
+ =\z@
+}
+
+\long\def\gmu@predetokstring #1{%
+ \gmu@if {num}
+ {%
+ % After a couple of hours of debug I reached the proper test which
+ % is given below. The goal is to (expandably!) check whether |#1|
+ % is braced and/or begins with a blank space. In any of those
+ % cases we don't hit it('s first token) with |\string|.
+ %
+ % |\@firstofone| strips outermost pair of braces if any and
+ % gobbles the lading blank(s) if any so the detokenised strings
+ % will differ.
+ \strcmp
+ {\detokenize{#1x}}%
+ {\detokenize\@xa{\@firstofone #1x}}=\z@
+ }% of test
+ {\@xa{\string#1}}
+ {{#1}}%
+}
+
+
+\long\def\ifstrings#1#2{%
+ \ifnum\strcmp
+ {\detokenize\gmu@predetokstring{#1x}}%
+ {\detokenize\gmu@predetokstring{#2x}}=\z@
+}
+
+
+\long\def\ifstribs#1#2{%
+ \ifnum\strcmp{\strip@bslash{#1}}{\strip@bslash{#2}}=\z@
+}
+
+
+\long\def\ifStrX#1#2{%
+ \gmu@CASEnot {x}{#1#2}%
+ {\iffalse}% if tokens are x-unequal, all is clear.
+ %
+ \gmu@CASEnot x {\@undefined#1}
+ {\iftrue}%
+ %
+ % some (i.e.\ \emph{both}) tokens are-x |\@undefined| or |\relax|,
+ % then
+ \gmu@CASE {strings}{#1#2}%
+ {\iftrue}%
+ %
+ \gmu@lastCASE
+ {\iffalse}%
+ \gmu@ESAC
+}
+
+\long\def\firstofone#1{#1}
+
+\long\def\bracefirstofone#1{{#1}}
+
+\long\pdef\scantwo#1#2{
+ \begingroup\endlinechar\m@ne
+ \@xa\endgroup\scantokens{#1#2}%
+}
+
+\long\def\@firstofthree#1#2#3{#1}
+\long\def\@secondofthree#1#2#3{#2}
+\long\def\@thirdofthree#1#2#3{#3}
+\long\def\@twoofthree#1#2#3{#1#2}
+\long\def\@secondoffive#1#2#3#4#5{#2}
+
+\long\def\@firstofmany#1#2\@nil{#1}
+
+\long\def\@secondofmany#1#2#3\@nil{#2}
+
+\long\def\@allbutfirstof#1#2\@nil{#2}
+
+
+\long\def\@firstthensecond #1#2{#1#2} % Note this macro strips braces
+ % if present.
+\long\def\@secondthenfirst #1#2{#2#1} % Note as above.
+
+
+
+\def\longafterfi{%
+ \long\def\afterfi##1##2\fi{\fi##1}}
+\longafterfi
+\long\def\afterfifi#1#2\fi#3\fi{\fi\fi#1}
+\long\def\afteriffifi#1#2\fi#3\fi{\fi#1}
+
+\long\def\afterififfififi#1#2\fi#3\fi#4\fi{\fi#1}
+\long\def\afteriffififi#1#2\fi#3\fi#4\fi{\fi\fi#1}
+\long\def\afterfififi#1#2\fi#3\fi#4\fi{\fi\fi\fi#1}
+
+
+\long\def\foone#1{\begingroup#1\relax\egfirstofone}
+\long\def\egfirstofone#1{\endgroup#1}
+
+\def\fooatletter{\foone\makeatletter}
+
+\newcommand*\@emptify[1]{\let#1=\@empty}
+\gmu@ifdefinable\emptify{\let\emptify\@emptify}
+
+\newcommand*\g@emptify{\global\@emptify}
+\gmu@ifdefinable\gemptify{\let\gemptify\g@emptify}
+
+\newcommand\@relaxen[1]{\let#1=\relax}
+\gmu@ifdefinable\relaxen{\let\relaxen\@relaxen}
+
+\newcommand*\g@relaxen{\global\@relaxen}
+\gmu@ifdefinable\grelaxen{\let\grelaxen\g@relaxen}
+
+\long\def\gmu@ifempty#1{%\
+ \ifnum\strcmp{\detokenize{#1}}{}=\z@
+ \@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi
+}
+
+\long\pdef\@ifnonempty#1#2#3{\gmu@ifempty{#1}{#3}{#2}}
+
+
+
+\long\def\gmu@ifexempty #1{%
+ \ifnum \strcmp{#1}{}=\z@
+ \@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi
+}
+
+\long\pdef\IfAmong
+#1% the token(s) whose presence we check,
+\among % delimiter of |#1|
+#2% the list of tokens in which we search |#1|,
+{%\label{IfAmong}
+ % \chgs{2008/12/05 v0.98 split from \cs{IfAmong}}
+ %
+ \long\def\gmu@among@##1#1##2\gmu@among@{%
+ \gmu@ifempty{##2}\@secondoftwo\@firstoftwo}%
+ \gmu@among@#2#1\gmu@among@
+}
+
+\newif\ifgmu@ifquant
+
+\long\pdef\gmu@ifxany
+#1% a single token to be |\ifx| ed with each of |#2|
+#2% counterpart to the above—a sequence of tokens to check |#1|
+{%
+ \gmu@ifempty{#2}{\@secondoftwo}{%
+ % we wrap the iteration over |#2|'s tokens in |\gmu@ifempty| because
+ % we expect many empty |#2|'s in |\DeclareCommand|'s |\loop|
+ % arguments (such as |Q| and |U|)
+ \gmu@ifquantfalse
+ \let\gmu@ifxa@aasiter\@@gmu@ifxa@aasiter
+ %
+ \edef\gmu@ifxa@aas{% edef and unexpanded to protect agains
+ % |#|\cat6 token(s) in |#1|.
+ \unexpanded{%
+ \ifx #1\gmu@ifxa@token
+ \gmu@ifquanttrue
+ \let\gmu@ifxa@aas\gmu@ifxa@drainer
+ \else
+ \ifx \gmu@ifxa@Limit\gmu@ifxa@token
+ \emptify \gmu@ifxa@aasiter
+ \fi
+ \fi
+ \gmu@ifxa@aasiter
+ }%of |\unexpanded|
+ }% of |\gmu@ifxa@aas|
+ %
+ \gmu@ifxa@aasiter #2\gmu@ifa@PreLimit\gmu@ifxa@Limit
+ \gmu@if {gmu@ifquant}{}%
+ }% of if |#2| nonempty
+}
+
+\def\gmu@ifxa@drainer{%
+ \ifx\gmu@ifxa@Limit\gmu@ifxa@token
+ \emptify\gmu@ifxa@aasiter
+ \fi
+ \gmu@ifxa@aasiter
+}
+
+\gmu@DefSymbol \gmu@ifa@PreLimit
+\gmu@DefSymbol \gmu@ifxa@Limit
+
+\def\@@gmu@ifxa@aasiter{%
+ \afterassignment\gmu@ifxa@aas
+ \let\gmu@ifxa@token= }% thanks to this space it'll look also at
+
+\long\pdef\gmu@ifxnone
+#1% token to be checked against
+#2% list of tokens to \emph{not} find |#1| at
+{%
+ \gmu@ifxany{#1}{#2}\@secondoftwo\@firstoftwo
+}
+
+
+\long\def\gmu@foreach#1\gmu@foreach@delim#2{%
+ %
+ \long\def\gmu@forer##1{%
+ \gmu@if {strings} {\gmu@foreach@delim {##1}}%
+ {}% if we've met the delimiter, we stop.
+ {% otherwise we wrap |#1| in a macro to make it available to |#2|
+ \edefU\gmu@forarg{##1}%
+ #2% we execute |#2| and probably continue iteration (unless the
+ % loop isn't broken with the next macro).
+ \gmu@forer
+ }%
+ }% of forer.
+ \gmu@forer#1\gmu@foreach@delim
+}
+
+\long\def\gmu@foreach@break
+#1\gmu@foreach@delim{}
+
+\long\def\gmu@ifsXXany
+#1% kind of test (|strings| or |stribs| so far)
+#2% token to be checked against |#3|
+#3% the list of tokens to be iterated over\\
+{%
+ \gmu@ifsXXany@{#1}{#2}#3\gmu@ifsXXany@end
+ \@firstoftwo\@secondoftwo
+}
+
+\long\def\gmu@ifsXXany@
+#1% kind of test
+#2% left side of comparison
+#3% right side of comparison
+{%
+ \gmu@if {#1}{#2#3}%
+ \gmu@ifsXXany@found
+ {% else
+ \gmu@if {#1}{#3\gmu@ifsXXany@end}%
+ \@secondoftwo
+ {\gmu@ifsXXany@{#1}{#2}}% if we didn't meet the sentinel, we iterate
+ }%
+}
+
+\long\def\gmu@ifsXXany@found
+#1\gmu@ifsXXany@end
+{\@firstoftwo}
+
+\def\gmu@ifstrany{\gmu@ifsXXany {strings}}
+
+\def\gmu@ifsbany{\gmu@ifsXXany {stribs}}
+
+\def\gmu@ifStrXany{\gmu@ifsXXany {StrX}}
+
+\long\def\gmu@ifstrnone#1#2#3#4{%
+ \gmu@ifstrany{#1}{#2}{#4}{#3}%
+}
+
+\long\def\gmu@ifsbnone#1#2#3#4{%
+ \gmu@ifsbany{#1}{#2}{#4}{#3}%
+}
+
+\long\def\gmu@ifStrXnone#1#2#3#4{%
+ \gmu@ifStrXany{#1}{#2}{#4}{#3}%
+}
+
+\lpdef\gmu@CASEstrany {\gmu@generalCASE \gmu@ifstrany }
+
+\lpdef\gmu@CASEstrnone {\gmu@generalCASE \gmu@ifstrnone }
+
+\lpdef\gmu@CASEsbany {\gmu@generalCASE \gmu@ifsbany }
+
+\lpdef\gmu@CASEsbnone {\gmu@generalCASE \gmu@ifsbnone }
+
+
+\newtoks\degroup@toks
+
+\long\pdef\gmu@degroup
+#1% text to be degrouped
+{\degroup@toks={}%
+ \gmu@degroup@iter#1\gmu@degroup@end
+}
+
+\long\def\gmu@degroup@afterlet{%
+ \gmu@if x{\degroup@lettoken\bgroup}%
+ {\degroup@drainanditer}%
+ {\gmu@if x{\degroup@lettoken\egroup}%
+ {\degroup@drainanditer}%
+ {\degroup@addanditer}%
+ }%
+}
+
+\def\gmu@degroup@iter{%
+ \futurelet\degroup@lettoken\gmu@degroup@afterlet}
+
+\def\degroup@drainanditer{%
+ \afterassignment\gmu@degroup@iter
+ \let\gmu@drain=
+}
+
+\def\degroup@addanditer{%
+ \gmu@if x{\degroup@lettoken\gmu@letspace}%
+ {\addtotoks\degroup@toks{ }%
+ \degroup@drainanditer
+ }{%
+ \degroup@addanditer@i
+ }%
+}
+
+\long\def\degroup@addanditer@i
+#1{%
+ \gmu@if {strings}{#1\gmu@degroup@end}%
+ {}% we've reached the end of iteration
+ {% it's sth.\ to add
+ \addtotoks\degroup@toks{#1}%
+ \gmu@degroup@iter
+ }%
+}
+
+\pdef\IfIntersect
+{\gmu@ifintersect \gmu@ifxany}
+
+\lpdef\gmu@ifintersect
+#1% an iterating test (|\gmu@ifxany|, |\gmu@ifstrany| or
+#2% one list to match
+#3% another list to match
+{%
+ \let\IfIntersect@next\@secondoftwo
+ \gmu@foreach #2\gmu@foreach@delim{%
+ \@xa #1\gmu@forarg{#3}%
+ {\let\IfIntersect@next\@firstoftwo
+ \gmu@foreach@break
+ }{}%
+ }% of |\gmu@foreach|'s |#2|.
+ \IfIntersect@next
+}
+
+\pdef\gmu@ifstrintersect
+{\gmu@ifintersect\gmu@ifstrany}
+
+\pdef\gmu@ifsbintersect
+{\gmu@ifintersect\gmu@ifsbany}
+
+
+\newtoks\@XAtoks
+
+\long\pdef\@XA#1{%
+ \@XAtoks={#1}%
+ \@xa\the\@xa\@XAtoks}
+
+\long\pdef\@ifinmeaning#1\of#2{% \
+ % \begin{enumargs}
+ % \item the token(s) whose presence we check,
+ % \item the macro in whose meaning we search |#1| (the first token of
+ % this argument is expanded one level with |\expandafter|),
+ % \item the `if found' stuff,
+ % \item the `if not found' stuff.
+ % \end{enumargs}
+ %
+ % \chgs{2007/11/06 v0.98 (in \pk{gmdoc}) made more elegant:
+ % \cs{if} changed to \cs{ifx} made four parameters and not expanding
+ % to an open \cs{if›(true⁄|false›)}. % ^^A |
+ % Also renamed from \cs{@ifismember}}
+ % \chgs{2008/12/05 v0.98 moved here from \pk{gmdoc} and rewritten,
+ % including split to \cs{IfAmong} because the latter is needed in
+ % \cs{DeclareCommand}}
+ %
+ \@XA{\IfAmong#1\among}\@xa{#2}}
+
+\gmu@DefSymbol\defNoHash
+\gmu@DefSymbol\defHashy
+\gmu@DefSymbol\boolean
+
+\def\gmu@geteschar{%
+ % A macro that edefines detokenised char of the charcode |\escapechar|
+ \edef\gmu@xiieschar{%
+ \gmu@CASE {num} {\escapechar <\z@}
+ {}%
+ %
+ \gmu@CASE {num}{\escapechar <32 }
+ {\@xa \@firstofmany \string \blekotnizza\@nil}% not firstthreeofmany!!!!
+ %
+ \gmu@CASE {num} {\escapechar=32 }
+ { }% space cannot be “first of…”.
+ \gmu@lastCASE
+ {\@xa \@firstofmany \string \blekotnizza \@nil}%
+ \gmu@ESAC
+ }%
+}
+
+\long\def\gmu@IfBooleanMacro#1{%
+ \gmu@ifedetokens{\meaning#1}{macro:->true}%
+ {\@firstoftwo}%
+ {\gmu@ifedetokens{\meaning#1}{macro:->false}%
+ {\@firstoftwo}%
+ {\@secondoftwo}%
+ }%
+}
+
+\pdef\IfIs
+#1% a \CS
+#2% |\dimen|, |\long|, |\toks|, |\skip|, |\count|, |\dimexpr|,
+ % |\numexpr|, |\glueexpr|, |\newif| for |\iffalse| and |\iftrue|,
+ % |\if| or |\conditional| for any Boolean test/switch, |\def| for a
+ % macro.
+ %
+ % This test tells us in particular what kind of assignment may be
+ % applied to |#1|. Therefore it turns true for |#1| being e.g.\ primitive
+ % \TeX's skip registers and |#2|==|\skip|.
+{%
+ \@tempswafalse
+ %
+ \gmu@CASE x{\defNoHash#2}%
+ {% case “def no hash” (hashless macro)
+ \@tempswatrue
+ \edef\gmu@IfIs@resa{%
+ \pdef\@nx\gmu@IfIs@resa
+ ####1\detokenize{macro:->}%
+ ####2\@nx\@nil{\@ifnonempty{####2}}%
+ % And we prepare applying thus defined macro to |#1|:
+ \unexpanded{\@xa\gmu@IfIs@resa\meaning#1}%
+ \detokenize{macro:->}\@nx\@nil
+ }% of |\edef|
+ }% of case hasless macro (“def no hash”)
+ %
+ % if not hashless
+ \gmu@CASE x {\defHashy#2}%
+ {%
+ % case hashy macro
+ \@tempswatrue
+ \edef\gmu@IfIs@resa{%
+ \pdef\@nx\gmu@IfIs@resa
+ ####1\detokenize{macro:}####2\xiihash1####3->%
+ ####4\@nx\@nil{\@ifnonempty{####4}}%
+ % And we prepare applying thus defined macro to |#1|:
+ \unexpanded{\@xa\gmu@IfIs@resa\meaning#1}%
+ \detokenize{macro:}\xiihash1->\@nx\@nil
+ }% of |\edef|
+ }% of case hashy macro
+ %
+ \gmu@CASE x {#2\boolean}
+ {% case Boolean
+ \@tempswatrue
+ \def\gmu@IfIs@resa{\gmu@IfBooleanMacro#1}%
+ %
+ }% of case Boolean
+ %
+ \gmu@CASEstrany #2{\dimexpr \numexpr \glueexpr }%
+ {% case \eTeX\ expression
+ \@tempswatrue
+ \def\gmu@IfIs@resa{% if should be a macro expanding to
+ % expression contents
+ \IfIsExpression #1#2}%
+ }% of case expression
+ %
+ % The subsequent part of this huge test refers to |\meaning|s. We
+ % want to make it robust to possible (although rather seldom)
+ % changes of |\escapechar|. Therefore define an aux macro that
+ % expands to detokenised escape char.
+ %
+ % Assume that letters, icluding »e«, will not be used as the escape
+ % char:
+ \gmu@geteschar
+ %
+ % Now |\gmu@xiieschar| carries the detokenised escape char (is empty
+ % if |\escapechar|${}<0$).
+ %
+ %
+ \gmu@CASE x {\dimen#2}%
+ {% Case dimen. Let's check if it's special (inner \TeX's)
+ % or normal.
+ \gmu@ifxany#1{\prevdepth \pagegoal \pagetotal \pagestretch
+ \pagefilstretch \pagefillstretch \pagefilllstretch
+ \pageshrink \pagedepth
+ \hfuzz \vfuzz \overfullrule \emergencystretch \hsize \vsize
+ \maxdepth \splitmaxdepth \boxmaxdepth \lineskiplimit
+ \delimitershortfall \nulldelimiterspace \scriptspace
+ \mathsurround \predisplaysize \displaywidth
+ \displayindent \parindent \hangindent \hoffset \voffset
+ }%
+ {\@tempswatrue\let\gmu@IfIs@resa\@firstoftwo}%
+ {% subcase normal dimen
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty {\gmu@xiieschar}%
+ {%
+ \pdef\gmu@IfIs@resa####1####2####3####4####5####6\@nil{%
+ \gmu@if {}
+ {1%
+ \if d####1\else0\fi
+ \if i####2\else0\fi
+ \if m####3\else0\fi
+ \if e####4\else0\fi
+ \if n####5\else0\fi
+ 1}%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …if eschar negative
+ {%
+ \pdef\gmu@IfIs@resa####1####2####3####4####5####6####7\@nil{%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar ####1\else0\fi
+ \if d####2\else0\fi
+ \if i####3\else0\fi
+ \if m####4\else0\fi
+ \if e####5\else0\fi
+ \if n####6\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of if special dimen or not
+ }% of case dimen
+ %
+ \gmu@CASE x {\count#2}%
+ {% case count
+ \gmu@ifxany#1{\spacefactor \prevgraf \deadcycles
+ \insertpenalties
+ \pretolerance \tolerance \hbadness \vbadness \linepenalty
+ \hyphenpenalty \exhyphenpenalty \binoppenalty \relpenalty
+ \clubpenalty \widowpenalty \displaywidowpenalty
+ \brokenpenalty \predisplaypenalty \postdisplaypenalty
+ \interlinepenalty \floatingpenalty \outputpenalty
+ \doublehyphendemerits \finalhyphendemerits \adjdemerits
+ \looseness \pausing \holdinginserts \tracingonline
+ \tracingmacros \tracingstats \tracingparagraphs
+ \tracingpages \tracingoutput \tracinglostchars
+ \tracingcommands \tracingrestores \language \uchyph
+ \lefthyphenmin \righthyphenmin \globaldefs
+ \defaulthyphenchar \defaultskewchar \escapechar \endlinechar
+ \newlinechar \maxdeadcycles \hangafter \fam \mag
+ \delimiterfactor \time \day \month \year \showboxbreadth
+ \showboxdepth \errorcontextlines
+ \lastlinefit
+ }%
+ {% if special count register then:
+ \@tempswatrue\let\gmu@IfIs@resa\@firstoftwo}%
+ {%
+ % if normal count register then
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty \gmu@xiieschar
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5####6\@nil{%
+ \gmu@if {} {1%
+ \if c####1\else0\fi
+ \if o####2\else0\fi
+ \if u####3\else0\fi
+ \if n####4\else0\fi
+ \if t####5\else0\fi
+ 1%
+ }% of test
+ }% of inner |\gmu@IfIs@resa|…
+ }% … when eschar is negative
+ %
+ {% eschar not empty (nonnegative)
+ \pdef\gmu@IfIs@resa####1####2####3####4####5####6####7\@nil{%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar####1\else0\fi
+ \if c####2\else0\fi
+ \if o####3\else0\fi
+ \if u####4\else0\fi
+ \if n####5\else0\fi
+ \if t####6\else0\fi
+ 1%
+ }% of test
+ }% of inner |\gmu@IfIs@resa|…
+ }% … when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of if normal count register
+ }% of case count
+ %
+ \gmu@CASE x {\skip#2}%
+ {% case skip
+ \gmu@ifxany#1{%
+ \baselineskip \lineskip \parskip \abovedisplayskip
+ \abovedisplayshortskip \belowdisplayskip
+ \belowdisplayshortskip \leftskip \rightskip \topskip
+ \splittopskip \tabskip \spaceskip \xspaceskip \parfillskip
+ }%
+ {% if special skip
+ \@tempswatrue\let\gmu@IfIs@resa\@firstoftwo}%
+ {% not special skip
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty \gmu@xiieschar
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5\@nil{%
+ \gmu@if {} {1%
+ \if s####1\else0\fi
+ \if k####2\else0\fi
+ \if i####3\else0\fi
+ \if p####4\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ %
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5####6\@nil{%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar ####1\else0\fi
+ \if s####2\else0\fi
+ \if k####3\else0\fi
+ \if i####4\else0\fi
+ \if p####5\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of if skip but not special
+ }% of case skip
+ %
+ \gmu@CASE x {\toks#2}
+ {% case toks
+ \gmu@ifxany#1{%
+ \output \everypar \everymath \everydisplay \everyhbox
+ \everyvbox \everyjob \everycr \errhelp \everyeof}%
+ {% subcase special toks
+ \@tempswatrue\let\gmu@IfIs@resa\@firstoftwo}%
+ {% subcase normal toks
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty \gmu@xiieschar
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5\@nil{%
+ \gmu@if {} {1%
+ \if t####1\else0\fi
+ \if o####2\else0\fi
+ \if k####3\else0\fi
+ \if s####4\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar negative
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5####6\@nil{%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar ####1\else0\fi
+ \if t####2\else0\fi
+ \if o####3\else0\fi
+ \if k####4\else0\fi
+ \if s####5\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of if toks but not special
+ }% of case toks
+ %
+ \gmu@CASE x {\long#2}%
+ % if a macro is |\long|, then these detokens open its meaning
+ % despite of possible |\outer|.
+ {% case long macro
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty \gmu@xiieschar
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5\@nil{%
+ \gmu@if {} {1%
+ \if l####1\else0\fi
+ \if o####2\else0\fi
+ \if n####3\else0\fi
+ \if g####4\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar negative
+ {\pdef\gmu@IfIs@resa####1####2####3####4####5####6\@nil{%
+ \gmu@if {} {1%
+ \ifnum \gmu@xiieschar ####1\else0\fi
+ \if l####2\else0\fi
+ \if o####3\else0\fi
+ \if n####4\else0\fi
+ \if g####5\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of case |\long|
+ % Note that we also can put here a test whether the meaning
+ % begins with |macro| which would mean that a macro is
+ % short.
+ \gmu@CASE x {\newif#2}%
+ {% case |\newif| (Boolean switch)
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty \gmu@xiieschar
+ {\pdef\gmu@IfIs@resa####1####2####3%
+ ####4####5####6####7####8\@nil{%
+ \gmu@unless {} {0% lazy disjunction
+ \gmu@if {} {1% lazy conjunction
+ \if i####1\else0\fi
+ \if f####2\else0\fi
+ \if f####3\else0\fi
+ \if a####4\else0\fi
+ \if l####5\else0\fi
+ \if s####6\else0\fi
+ \if e####7\else0\fi
+ 1%
+ }%
+ {}{0}%
+ \gmu@if {} {1% lazy conjunction
+ \if i####1\else0\fi
+ \if f####2\else0\fi
+ \if t####3\else0\fi
+ \if r####4\else0\fi
+ \if u####5\else0\fi
+ \if e####6\else0\fi
+ \if \relax####7\else0\fi
+ 1%
+ }%
+ {}{0}%
+ 0%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ %
+ {\pdef\gmu@IfIs@resa####1####2####3%
+ ####4####5####6####7####8####9\@nil{%
+ \gmu@unless {} {0%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar ####1\else0\fi
+ \if i####2\else0\fi
+ \if f####3\else0\fi
+ \if f####4\else0\fi
+ \if a####5\else0\fi
+ \if l####6\else0\fi
+ \if s####7\else0\fi
+ \if e####8\else0\fi
+ 1%
+ }%
+ {}{0}%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar ####1\else0\fi
+ \if i####2\else0\fi
+ \if f####3\else0\fi
+ \if t####4\else0\fi
+ \if r####5\else0\fi
+ \if u####6\else0\fi
+ \if e####7\else0\fi
+ \if \relax####8\else0\fi
+ 1%
+ }%
+ {}{0}%
+ 0%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of case |\newif| (Boolean switch)
+ %
+ \gmu@CASE {x\@xa\@xa} {\csname if\endcsname#2}%
+ {% case |\if| test
+ \def\gmu@IfIs@resa{%
+ \gmu@ifexempty \gmu@xiieschar
+ {\pdef\gmu@IfIs@resa####1####2####3\@nil{%
+ \gmu@if {} {1%
+ \if i####1\else0\fi
+ \if f####2\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar negative
+ %
+ {\pdef\gmu@IfIs@resa####1####2####3####4\@nil{%
+ \gmu@if {} {1%
+ \if \gmu@xiieschar ####1\else0\fi
+ \if i####2\else0\fi
+ \if f####3\else0\fi
+ 1%
+ }%
+ }% of inner |\gmu@IfIs@resa|…
+ }% …when eschar nonnegative
+ }% of outer |\gmu@IfIs@resa|
+ }% of case |\if|
+ %
+ \gmu@lastCASE %^^A >>>>> ??????
+ {false}{}{}%
+ \gmu@ESAC
+ % For the cases 1–$n$ we just launch their auxiliary macro:
+ \if@tempswa
+ \@xa\gmu@IfIs@resa
+ \else
+ %
+ % For the other cases their auxiliary macro defines “inner |@resa|”
+ % (protected) which perform the test on the meaning of |#1|.
+ \gmu@IfIs@resa
+ %
+ % now (new) |\gmu@IfIs@resa| it's defined as delimited
+ % with |#2| and |\@nil| (if |#1| may be one of kinds checked letter
+ % by letter).
+ %
+ \edef\gmu@IfIs@resb{%
+ \gmu@IfIs@resa\meaning#1%
+ \relax\relax\relax\relax\relax\relax\relax\relax %to provide
+ % something for gobbling tests.
+ \@xa\detokenize\@xa{\string#2}\@nx\@nil}%
+ \@xa\gmu@IfIs@resb
+ \fi
+}% of |\IfIs|
+
+\unless\ifdefined\@tempskipa\newskip\@tempskipa\fi
+\unless\ifdefined\@tempmuskipa\newmuskip\@tempmuskipa\fi
+
+\long\def\IfIsExpression
+#1% the stuff to be examined
+#2% |\dimexpr|, |\glueexpr|, |\numexpr| or |\muexpr|
+{%
+ \ifx#2\numexpr\let\next\@tempcnta\fi
+ \ifx#2\glueexpr\let\next\@tempskipa\fi
+ \ifx#2\dimexpr\let\next\@tempdima\fi
+ \ifx#2\muexpr\let\next\@tempmuskipa\fi
+ \afterassignment\gmu@testtopenalty
+ \next=#2#1\penalty
+}
+
+\def\gmu@testtopenalty#1\penalty{%
+ \gmu@ifempty{#1}}
+
+\pdef\newgif#1{%
+ {\escapechar\m@ne
+ \global\let#1\iffalse
+ \@gif#1\iftrue
+ \@gif#1\iffalse
+ }}
+\def\@gif#1#2{%
+ \protected\@xa\gdef\csname\@xa\@gobbletwo\string#1%
+ g% the letter $g$ for `|\global|'.
+ \@xa\@gobbletwo\string#2\endcsname
+ {\global\let#1#2}}
+
+\pdef\newif#1{% We not only make \incs{newif}
+ % \incs{protected} but also make it to define \cs{protected}
+ % assignments so that premature expansion doesn't affect
+ % \inverb|\if…\fi| nesting.
+ % \changes{v0.92}{2008/08/09}{added redefinition so that now
+ % switches defined with it are \cs{protected} so they won't expand to
+ % a~further expanding or unbalanced \cs{iftrue/false} in an \cs{edef}}
+ \count@\escapechar \escapechar\m@ne
+ \let#1\iffalse
+ \@if#1\iftrue
+ \@if#1\iffalse
+ \escapechar\count@}
+
+\def\@if#1#2{%
+ \protected \@xa\def\csname\@xa\@gobbletwo\string#1%
+ \@xa\@gobbletwo\string#2\endcsname
+ {\let#1#2}}
+
+\pdef\hidden@iffalse{\iffalse}
+\pdef\hidden@iftrue{\iftrue}
+
+
+\pdef\grefstepcounter#1{%
+ {\let\protected@edef=\protected@xdef\refstepcounter{#1}}}
+
+\pdef\hgrefstepcounter#1{%
+ \ifhmode\leavevmode\fi\grefstepcounter{#1}}
+
+
+\pdef\hunskip{\ifhmode\unskip\fi}
+
+
+\def\glet{\global\let}
+
+
+\lpdef\addtomacro
+#1% macro (has to be parameterless)
+#2% stuff to be added
+{\edef #1{\@xau #1\unexpanded{#2}}}
+
+\pdef\gaddtomacro{\global\addtomacro}
+
+\long\def\prependtomacro#1#2{% \changes{v0.94}{2008/09/15}{order of
+ % arguments reversed}
+ \edef#1{\unexpanded{#2}\@xa\unexpanded\@xa{#1}}}
+
+\lpdef\addtotoks#1#2{%
+ #1=\@xa{\the#1#2}}
+
+\newtoks\gmu@prependtoks@aux
+
+\lpdef\gmu@prependtotoks@ambig
+#1% scope
+#2% toks register
+#3% text of prependement
+{%
+ \iffalse {\fi % hack to balance braces in definition
+ \@XA{%
+ #1#2=\bgroup#3%
+ }% during execution, this brace closes the |\@XA|'s argument…
+ \the#2}% and this one closes the text opened by |\bgroup|, i.e.,
+}
+
+\lpdef\prependtotoks
+#1% toks register
+#2% text to be prepended
+{\gmu@prependtotoks@ambig {}{#1}{#2}}%
+
+\lpdef\gprependtotoks
+#1% toks register
+#2% text to be prepended
+{\gmu@prependtotoks@ambig \global{#1}{#2}}%
+
+\long\def\addto@forlist
+#1% a comma-separated list
+#2% the element(s) added
+{\ifx#1\@empty
+ \@xa\@gobble
+ \else\@xa\@firstofone
+ \fi
+ {\addtomacro#1{,}}%
+ \addtomacro#1{#2}%
+}
+
+\lpdef\eaddtomacro
+#1% a macro
+#2% stuff to be added (will be fully expanded)
+{\edef#1{\@xau#1#2}}
+
+\long\def\gmu@ifundefined #1{% not |\protected| because expandable.
+ % \changes{v0.94}{2008/9/12}{added. All \cs{@ifundefined}s used by
+ % me changed to this}
+ % \changes{v0.94}{2008/10/03}{made robust to unbalanced \cs{if}s and
+ % \cs{fi}s the same way as \LaTeX's \cs{@ifundefined} (after a~heavy
+ % debug :-)}
+ %
+ \gmu@CASEnot {csname} {#1\endcsname}% defined…
+ {\@firstoftwo}%
+ %
+ \gmu@CASE {x\@xa\@xa} {\csname #1\endcsname\relax}% but only as |\relax|---then
+ % 2nd argument.
+ {\@firstoftwo}%
+ \gmu@lastCASE
+ {\@secondoftwo}%
+ \gmu@ESAC
+}
+
+\long\def\gmu@ifdefined #1#2#3{%
+ \gmu@ifundefined {#1}{#3}{#2}}
+
+
+\long\def \gmu@ifCSdefined#1{%
+ \gmu@CASEnot {defined} {#1}
+ {\@secondoftwo}%
+ %
+ \gmu@CASE x {\relax #1}
+ {\@secondoftwo}%
+ %
+ \gmu@EatCases
+ {\@firstoftwo}%
+ \gmu@ESAC
+}
+
+\long\def\CSNameIf
+#1% the name to check and probably execute
+{%
+ \ifcsname #1\endcsname
+ \@xa\@twoofthree
+ \else\@xa\@thirdofthree
+ \fi
+ {\csname #1\endcsname}%
+}
+
+\foone{\catcode`\_=8 }
+{\let\subs=_}
+
+\foone{\catcode`\^=7 }
+{\let\sups=^}
+
+\foone{\@makeother\_}
+{\def\xiiunder{_}}
+
+\let\all@unders\xiiunder
+\foone{\catcode`\_=8 }
+{\addtomacro\all@unders{_}}
+\foone{\catcode`\_=11 }
+{\addtomacro\all@unders{_}}
+\foone{\catcode`\_=13 }
+{\addtomacro\all@unders{_}}
+
+\foone{\@makeother\^^M}{\def\xiiM{
+ }}% \chgs{2010/03/16 v0.992 added}
+
+\def\all@stars{*}
+\foone{\catcode`\*=11 }
+{\addtomacro\all@stars{*}}
+\foone{\catcode`\*=13 }
+{\addtomacro\all@stars{*}}
+
+\def\all@spaces{ }
+\foone{\@makeother\ }{%
+\addtomacro\all@spaces{ }%
+}
+\foone{\obeyspaces}{%
+\addtomacro\all@spaces{ }%
+}
+
+\foone\obeylines{%
+ \def\two@Ms{
+ }}
+\foone{\@makeother\^^M}{%
+ \addtomacro\two@Ms{
+ }}
+
+\edef\spaces@and@Ms{\@xau{\all@spaces}\@xau{\two@Ms}}
+
+\ifdefined\XeTeXversion
+ \chardef\_="005F
+\fi
+
+\foone{\@makeother\`}%
+{\def\backquote{`}}
+
+\foone{\catcode`\[=1 \@makeother\{
+ \catcode`\]=2 \@makeother\}}%
+[%
+ \def\xiilbrace[{]%
+ \def\xiirbrace[}]%
+]% of |\firstofone|
+
+
+\foone{\catcode`\_=\active}
+{%
+ \pdef\smartunder{%
+ \catcode`\_=\active
+ \def_{%
+ \ifincsname\xiiunder
+ \else
+ \ifmmode\subs
+ \else\xiiunder %
+ \fi
+ \fi}}}% We define it as \inverb|\_| not just as
+\foone{\catcode`\!=0
+ \@makeother\\}
+{!newcommand*!xiibackslash{\}}
+
+\let\bslash=\xiibackslash
+
+\foone{\@makeother\%}
+{\def\xiipercent{%}}
+
+\foone{\@makeother\&}%
+{\def\xiiand{&}}
+
+\foone{\@makeother\ }%
+{\def\xiispace{ }}
+
+\foone{\@makeother\#}%
+{\def\xiihash{#}}
+
+
+\AtBeginDocument{%
+ \ifdefined\xxt@visiblespace
+ \let\visiblespace\xxt@visiblespace
+ \def\xxt@visiblespace@fallback{{%
+ \fontspec{Latin Modern Mono}\textvisiblespace}}%
+ \else
+ \let\visiblespace\xiispace
+ \fi}
+
+\foone\obeyspaces{\def\gmu@activespace{ }}
+
+\foone\obeylines{\def\activeM{^^M}}
+
+\pdef\makeblanksignored{%
+ \catcode`\^^M=9\relax
+ \catcode`\^^I=9\relax
+ \catcode`\ =9\relax}
+
+\pdef\fooblanksignored{%
+ \foone{\makeblanksignored}%
+}
+
+
+\long\pdef\edefU#1#2{%
+ \edef#1{\unexpanded{#2}}%
+}
+
+\long\pdef\xdefU#1#2{%
+ \xdef#1{\unexpanded{#2}}%
+}
+
+\long\pdef\@ifnextcat#1#2#3{%
+ \edefU\reserved@d{#1}%
+ \edefU\reserved@a{#2}%
+ \edefU\reserved@b{#3}%
+ \futurelet\@let@token\@ifncat}
+
+\def\@ifncat{%
+ \ifx\@let@token\@sptoken
+ \let\reserved@c\@xifncat
+ \else
+ \ifcat\reserved@d\@nx\@let@token
+ \let\reserved@c\reserved@a
+ \else
+ \let\reserved@c\reserved@b
+ \fi
+ \fi
+ \reserved@c}
+
+{\def\:{\let\@sptoken= } \global\: % this makes |\@sptoken| a space token.
+
+ % \DefIndex\@xifncat
+\def\:{\@xifncat} \@xa\gdef\: {\futurelet\@let@token\@ifncat}}
+\pdef\spifletter{\@ifnextcat a{\space}{}}
+
+\long\pdef\@ifnextif#1#2#3{%
+ \def\reserved@d{#1}%
+ \def\reserved@a{#2}%
+ \def\reserved@b{#3}%
+ \futurelet\@let@token\@ifnif}
+
+\def\@ifnif{%
+ \ifx\@let@token\@sptoken
+ \let\reserved@c\@xifnif
+ \else
+ \if\reserved@d\@nx\@let@token
+ \let\reserved@c\reserved@a
+ \else % |#1| of |\@ifnextif| is not |\if|-equivalent the future
+ % token. But this may be because the future token is active
+ % so it \emph{would} be |\if|-equivalent if not passed
+ % through |\futurelet|. Let's manage this case.
+ \begingroup
+ \edef\gmu@tempa{%
+ \lccode`\@nx~=`\reserved@d
+ }\gmu@tempa
+ \lowercase{\endgroup
+ \ifx~}\@let@token
+ \let\reserved@c\reserved@a
+ \else
+ \let\reserved@c\reserved@b
+ \fi
+ \fi
+ \fi
+ \reserved@c}
+
+{\def\:{\let\@sptoken= } \: % this makes |\@sptoken| a space token.
+\def\:{\@xifnif} \@xa\gdef\: {\futurelet\@let@token\@ifnif}}
+
+\long\pdef\@ifnextac#1#2{%
+ \@ifnextnotgroup
+ {\gmu@ifnac{#1}{#2}}%
+ {#2}}
+
+\long\def\gmu@ifnac#1#2#3{%
+ \ifcat\@nx~\@nx#3%
+ \@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi{#1#3}{#2#3}}
+
+
+
+\pdef\gmu@lowstar{%
+ \iffontchar\font"22C6 \char"22C6 \else\gmu@lowstarfake\fi
+}% we could define it to
+
+
+\def\gmu@tempa{*}
+\foone{\catcode`\*=\active}
+{\def\gmu@tempb{*}% it's defined in line \ref{active star}
+ % to make |*| defined (when it was undefined,
+ % \incmd\newcommand's \incs{gm@ifstar} test turned
+ % true, the next undefined token was gobbled and raised an error).
+ \let*=\gmu@lowstar}
+
+\edef\gmu@tempa{%
+ \long\pdef\@nx\gmu@ifstar##1##2{% \chgs{2008/12/16 v0.98 renamed from
+ % \cs{@ifstar} since something
+ % redefines \cs{@ifstar}}
+ \@nx\@ifnextif\gmu@tempa%
+ {\@nx\@firstoftwo{##1}}% it's a bit hacky but O.K.: if the
+ % condition is not satisfied, the following brace is taken
+ {%
+ \@nx\@ifnextchar\@xa\@nx\gmu@tempb
+ {\@nx\@firstoftwo{##1}}% and again, if the condition is not
+ % satisfied, the second brace is taken.
+ {##2}%
+ }% of if not |*|\cat 12
+ }% of |\gmu@ifstar|.
+}\gmu@tempa
+
+
+\long\pdef\@ifnextnotgroup#1#2{% \chgs{2008/12/11 v0.98 extracted from
+ % \cs{@ifnextac}} This macro checks whether the next token is able
+ % to be picked or is it a~braced list of tokens or is it a~group
+ % closer so there's no token to be picked.
+ \@ifnextcat\bgroup{#2}{%
+ \@ifnextcat\egroup{#2}% \chgs{2008/12/11 v0.98 added test for
+ % \cmd\egroup}
+ {#1}}}
+
+\long\pdef\@ifnextgroup#1#2{% Note this macro turns true both before
+ % a~group opener and before a~group closer.
+ \@ifnextnotgroup{#2}{#1}}
+
+\pdef\ignoreactiveM{%
+ \@ifnextgroup{}{\gmu@checkM}%
+}
+
+\foone\obeylines{% we know it's a~single token since we use this macro
+ % only in \incmd\@ifnextgroup's ‘else’.
+ \long\pdef\gmu@checkM#1{%
+ \ifx
+ #1\@xa\ignoreactiveM%
+ \else\@xa#1\fi %
+ }%
+}
+
+\let\gmu@reserveda\*%
+\def\*{%
+ \let\*\gmu@reserveda
+ \let\gmu@letspace= }%
+\* %
+
+
+\lpdef\gmu@peep@next #1{%
+ \let\@def@token\@undefined
+ \edefU\gmu@peepnext@inner {%
+ \gmu@CASE x {\@let@token\gmu@letspace}%
+ {\@ifnextchar\par
+ {#1}
+ {\let\@let@token= \gmu@letspace % note |=| and blank space
+ \@XA{#1}\space
+ }%
+ }% of if |\futurelet| detected a blank space
+ %
+ \gmu@CASE {AnyClause} % if any of the conditions below:
+ {{ x {\@let@token\@undefined}
+ x {\@let@token\relax}}} % it's arg of disjunction
+ {\gmu@peep@hash{#1}}%
+ %
+ \gmu@lastCASE
+ {#1}%
+ \gmu@ESAC
+ }%
+ \futurelet\@let@token\gmu@peepnext@inner
+}
+
+\lpdef\gmu@peep@hash
+#1% stuff that probably tests |#2| somehow
+#2% a single token, which we are sure is undefined or |\relax| (and
+{%
+ \def\@def@token{#2}%
+ #1%
+ #2%
+}
+
+\lpdef\gmu@ifpeeped
+#1% kind of comparison
+#2% stuff to compare
+{%
+ \gmu@if {defined} {\@def@token}
+ {\@XA{\gmu@if {#1}}\@xa{\@def@token #2}}
+ {\gmu@if {#1} {\@let@token #2}}%
+}
+
+\long\pdef\@ifnextspace
+#1% if yes
+#2% if not
+{%
+ \gmu@peep@next
+ {\gmu@if x {\@let@token\gmu@letspace}{#1}{#2}}%
+}
+
+\long\pdef\@ifnextcharRS
+#1% a single token (will be |\ifx|ed)
+#2% what if yes
+#3% what if not
+{%
+ \gmu@peep@next
+ {\gmu@if {defined} {\@def@token}
+ {\@XA{\gmu@if {StrX}}\@xa {\@def@token #1}}% of the special “null”
+ % case
+ %
+ {\gmu@if x {\@let@token #1}}%
+ {#2}{#3}%
+ }% of |\gmu@peep@next|
+}
+
+\long\pdef\@ifnextanyRS
+#1% list of tokens (any balanced text, will be |\let| token after token
+#2% what if next is one of listed |#1|
+#3% what if not
+{\gmu@peep@next
+ {\gmu@if {defined} {\@def@token}
+ {\@xa \gmu@ifStrXany \@def@token }
+ % otherwise we are next to a defined and not |\relax| token so
+ {\gmu@ifxany {\@let@token}}%
+ {#1}{#2}{#3}%
+ }% of peep
+}
+
+
+\long\def\gmu@ifnextStrXany
+#1% outer macro's tested list of tokens
+#2% “if found” branch
+#3% “if not found” branch
+{\gmu@notif {AnyClause}
+ {{ x {\@let@token\@undefined} x {\@let@token\relax}}}%
+ {#2}%
+ %
+ % Some (i.e.\ \emph{both}) |\@undefined| or |\relax|, then we
+ % compare strings
+ {\gmu@futureifany {#2}{#3}{#1}}%
+}
+
+\long\def\gmu@futureifany
+#1% what if \OK
+#2% what if not \OK
+#3% list of tokens
+#4% token ot be checked against |#3| (and put back on the input) Note
+{\gmu@ifstrany #4 {#3}{#1}{#2}#4}
+
+\long\pdef\@ifnextanyIS
+#1% list of tokens (any balanced text, will be |\let| token after token
+#2% what if next is one of listed in |#1|
+#3% what if not
+{%
+ \edefU\gmu@ifna@afterlet{%
+ \gmu@if x{\@let@token\gmu@letspace}%
+ {% if next is blank space, we drop it and retry:
+ \edefU\gmu@ifna@resa{\@ifnextanyIS{#1}{#2}{#3}}%
+ \afterassignment\gmu@ifna@resa
+ \let\gmu@drain=
+ }%
+ {% else we perform |\gmu@ifnextanyIS|
+ \gmu@ifxany{\@let@token}{#1}{%
+ \gmu@ifnextStrXany {#1}{#2}{#3}%
+ }%
+ {#3}%
+ }%
+ }% of the after-let macro
+ \futurelet\@let@token\gmu@ifna@afterlet
+}% of |\@ifnextanyIS|
+
+\long\pdef\@ifnextnoneRS
+#1% list of tokens (any balanced text, will be |\let| token after token
+#2% what if next is one of listed |#1|
+#3% what if not
+{%
+ \@ifnextanyRS{#1}{#3}{#2}%
+}
+
+\long\pdef\@ifnextgroupRS #1#2{%
+ \gmu@peep@next
+ {\gmu@if x{\@let@token\bgroup}{#1}%
+ {\gmu@if x{\@let@token\egroup}{#1}{#2}}%
+ }%
+}
+
+\long\pdef\@ifnextnotgroupRS#1#2{%
+ \@ifnextgroupRS{#2}{#1}}
+
+
+
+\foone\obeylines{%
+ \long\pdef\@ifnextMac#1#2{%
+ \@ifnextchar^^M{#1}{#2}}}
+
+\long\def\xiistring#1{%
+ \if\@nx#1\xiispace
+ \xiispace
+ \else
+ \afterfi{\string#1}% to make the same error as bare |\string|
+ % would cause in case of empty \inhash1.
+ \fi}
+
+\def\@xiispaces#1 #2\@nil{%
+ #1%
+ \ifx\@xiispaces#2\@xiispaces
+ \else
+ \xiispace
+ \afterfi{\@xiispaces#2\@nil}%
+ \fi}
+
+\long\pdef\xiiEdetoke
+#1% a scratch \CS
+#2% stuff to be fully expanded and turned to catcode 12 including
+ % spaces.
+{%
+ \edef#1{#2}%
+ \edef#1{%
+ \@xa\@xa\@xa\@xiispaces
+ \@xa\detokenize\@xa{#1} \@nil}%
+}
+
+\long\def\@ifEUnextchar#1#2#3{%
+ % ‘if Edefed Unexpanded next char’
+ \let\reserved@d=#1%
+ \edefU\reserved@a{#2}%
+ \edefU\reserved@b{#3}%
+ \futurelet\@let@token\@ifnch}
+
+\newcommand\gmu@storespecials[1][]{% we provide a~possibility of
+ % adding stuff. For usage see line \ref{@storespecials}.
+ \def\do##1{\catcode`\@nx##1=\the\catcode`##1\relax}%
+ \edef\gmu@restorespecials{%
+ \dospecials\do\^^M}#1}
+
+\pdef\gmu@septify{% restoring the standard catcodes of specials. The
+ % name is the opposite of `sanitize' ^^A(
+ % :-)\,. It restores also the original catcode of \inverb|^^M|.
+ \def\do{\relax\catcode`}%
+ \do\ 10\do\\0\do\{1\do\}2\do\$3\do\&4%
+ \do\#6\do\^7\do\_8\do\%14\do\~13\do\^^M5\relax
+ %\nostanza |%% \let\do\@makeother|\\
+ % |%% \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\relax|\nostanza
+}
+
+\newif\ifgmu@SMglobal
+
+\pdef\SMglobal{\gmu@SMglobaltrue}
+
+\def\MakePrivateLetters{\makeatletter}
+
+\pdef\StoreMacro{%
+ \begingroup\MakePrivateLetters
+ \gmu@ifstar\egStore@MacroSt\egStore@Macro}
+
+\lpdef\egStore@Macro#1{\endgroup\Store@Macro{#1}}
+\lpdef\egStore@MacroSt#1{\endgroup\Store@MacroSt{#1}}
+
+\pdef\StoreMacro@nocat
+{%
+ \gmu@ifstar \Store@MacroSt \Store@Macro
+}
+
+\def\gmu@storeprefix{/gmu/store}
+
+\lpdef\Store@Macro#1{%
+ \escapechar92
+ \ifgmu@SMglobal\afterfi\global\fi
+ \@xa\let\csname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname#1%
+ \global\gmu@SMglobalfalse
+}
+
+\lpdef\Store@MacroSt#1{%
+ \edef\gmu@smtempa{%
+ \ifgmu@SMglobal\@xa\global\fi
+ \let\@xa\@nx\csname\gmu@storeprefix/\bslash@or@ac{#1}\@xa\endcsname%\label{SMbslash}
+ % we add backslash because to ensure compatibility between
+ % \incs{(Re)StoreMacro} and \incs{(Re)StoreMacro*}, that is. to allow
+ % writing e.g. \inverb|\StoreMacro\kitten| and then
+ % \inverb|\RestoreMacro*{kitten}| to restore the meaning of
+ % \incs{kitten}.\ilrr
+ \ifcsname #1\endcsname % \chgs[\StoreMacro]{2010/04/16 v0.993
+ % fixed asymmetry with the unstarred version: till today the
+ % unstarred version for an undefined \CS undefine the storage \CS
+ % and the starred version made it \cmd\relax. Now both undefine}
+ % If the argument \CS is undefined, we undefine the storage macro too.
+ \@xa\@nx\csname#1\endcsname
+ \else\@nx\@undefined
+ \fi
+ \global\gmu@SMglobalfalse}%% we wish the globality to be just
+ % once.\par
+ \gmu@smtempa
+}
+
+
+\lpdef\StoreMacros{\begingroup\MakePrivateLetters\egStore@Macros}
+
+\lpdef\egStore@Macros#1{\endgroup
+ \Store@Macros{#1}%
+}
+
+\lpdef\Store@Macros #1{%
+ \gmu@setsetSMglobal
+ \let\gml@StoreCS\Store@Macro
+ \gml@storemacros#1.}
+
+\def\gmu@setsetSMglobal{%
+ \ifgmu@SMglobal
+ \let\gmu@setSMglobal\gmu@SMglobaltrue
+ \else
+ \let\gmu@setSMglobal\gmu@SMglobalfalse
+ \fi}
+
+\lpdef\gml@storemacros#1{%
+ \def\gmu@storemacros@resa{\@nx#1}% My \TeX\ Guru's trick to deal with |\fi|
+ % and such, i.e., to hide |#1| from \TeX\ when it is processing a~test's
+ % branch without expanding.
+ \if\gmu@storemacros@resa.% a~dot finishes storing.
+ \global\gmu@SMglobalfalse
+ \else
+ \if\gmu@storemacros@resa,% The list this macro is put before may
+ % contain commas and that's O.K., we just continue the work.
+ \afterfifi\gml@storemacros
+ \else% what is else this shall be stored.
+ \gml@StoreCS{#1}% we use a~particular \CS to may |\let| it both to
+ % the storing macro as above and to the restoring one as
+ % \gmiflink[letRestore]{below}.
+ \afterfifi{\gmu@setSMglobal\gml@storemacros}%
+ \fi
+ \fi
+}
+
+\lpdef\RestoreMacro{%
+ \begingroup\MakePrivateLetters\gmu@ifstar\egRestore@MacroSt\egRestore@Macro}
+
+\lpdef\egRestore@Macro#1{\endgroup\Restore@Macro{#1}}
+\lpdef\egRestore@MacroSt#1{\endgroup\Restore@MacroSt{#1}}
+
+\lpdef\Restore@Macro#1{%
+ \escapechar92
+ \gmu@ifstored#1{%
+ \ifgmu@SMglobal\afterfi\global\fi
+ \@xa\let\@xa#1\csname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname
+ \global\gmu@SMglobalfalse}%
+ {\unless\ifgmu@quiet
+ \PackageWarning{gmutils}{\@nx#1 is not stored, I do nothing with
+ it}%
+ \fi
+ }%
+}
+
+\long\def\gmu@ifstored#1#2#3{%
+ \gmu@ifundefined{\gmu@storeprefix/%
+ \bslash@or@ac{#1}}{#3}{#2}%
+}
+
+\lpdef\gmu@storeifnotyet#1{%
+ \gmu@if {} {\relax\@nx#1}% we check if it's a~\CS
+ {\gmu@ifstored{#1}{}{\StoreMacro@nocat#1}}%
+ {}%
+}
+
+\lpdef\Restore@MacroSt#1{%
+ \gmu@ifundefined{\gmu@storeprefix/\bslash@or@ac{#1}}%
+ {\unless\ifgmu@quiet
+ \PackageWarning{gmutils}{\bslash#1 is not stored. I~do nothing}%
+ \fi}%
+ {\edef\gmu@smtempa{%
+ \ifgmu@SMglobal\global\fi
+ \@nx\let\@xa\@nx\csname#1\endcsname
+ \@xa\@nx\csname\gmu@storeprefix/\bslash@or@ac{#1}\endcsname}% cf. the commentary
+ % in line \ref{SMbslash}.
+ \gmu@smtempa}%
+ \global\gmu@SMglobalfalse
+}
+
+\lpdef\RestoreMacros{%
+ \begingroup\MakePrivateLetters
+ \egRestore@Macros}
+
+\lpdef\egRestore@Macros#1{\endgroup
+ \Restore@Macros{#1}%
+}
+
+\lpdef\Restore@Macros #1{%
+ \gmu@setsetSMglobal
+ \let\gml@StoreCS\Restore@Macro% \gmhypertarget[letRestore]{we}
+ % direct the core \CS towards restoring and call the same iterating
+ % macro as in line \ref{InnerStore}.
+ \gml@storemacros#1.}
+
+\pdef\ResetMacro{% restore possibly to |\@undefined|
+ % \chgs{2010/04/16 v0.993 added}
+ \begingroup\MakePrivateLetters\gmu@ifstar\egReset@MacroSt\egReset@Macro}
+
+\lpdef\egReset@Macro#1{\endgroup\Reset@Macro{#1}}
+\lpdef\egReset@MacroSt#1{\endgroup\Reset@MacroSt{#1}}
+
+\lpdef\Reset@Macro#1{%
+ \escapechar92
+ \ifgmu@SMglobal\@xa\global\fi
+ \ifcsname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname
+ \@xa\let\@xa#1\csname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname
+ \else
+ \let#1\@undefined
+ \fi
+ \global\gmu@SMglobalfalse
+}%
+
+\lpdef\Reset@MacroSt#1{%
+ \ifcsname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname
+ \ifgmu@SMglobal\@xa\global\fi
+ \@xa\let\csname#1\@xa\endcsname
+ \csname\gmu@storeprefix/\bslash@or@ac{#1}\endcsname % cf. the commentary
+ % in line \ref{SMbslash}.
+ \else
+ \@xa\let\csname#1\endcsname\@undefined
+ \fi
+ \global\gmu@SMglobalfalse
+}
+
+\lpdef\ResetMacros{\begingroup\MakePrivateLetters\Reset@Macros}
+
+\lpdef\Reset@Macros#1{\endgroup
+ \gmu@setsetSMglobal
+ \let\gml@StoreCS\Reset@Macro% \gmhypertarget[letReset]{we}
+ % direct the core \CS towards restoring and call the same iterating
+ % macro as in line \ref{InnerStore}.
+ \gml@storemacros#1.}
+
+\pdef\StoredMacro{\begingroup\MakePrivateLetters\Stored@Macro}
+\lpdef\Stored@Macro#1{\endgroup\Restore@Macro#1#1}
+
+\long\def\storedcsname#1{%% \changes{v0.88}{2008/08/03}{added}
+ \ifcsname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname
+ \afterfi{%
+ \csname \gmu@storeprefix/\bslash@or@ac{#1}\endcsname}%
+ \else \@xa \@undefined
+ \fi
+}
+
+\pdef\StoreEnvironment#1{% \label{StoreEnvironment}
+ \Store@MacroSt{#1}\Store@MacroSt{end#1}}
+
+\pdef\RestoreEnvironment#1{%
+ \Restore@MacroSt{#1}\Restore@MacroSt{end#1}}
+
+\pdef\StoringAndRelaxingDo{%
+ \gmu@SMdo@setscope
+ \long\def\do##1{%
+ \gmu@SMdo@scope
+ \@xa\let\csname \gmu@storeprefix/\bslash@or@ac{##1}\endcsname##1%
+ \gmu@SMdo@scope\let##1\relax}}
+
+\pdef\gmu@SMdo@setscope{%
+ \ifgmu@SMglobal\let\gmu@SMdo@scope\global
+ \else\let\gmu@SMdo@scope\relax
+ \fi
+ \global\gmu@SMglobalfalse
+}
+
+\lpdef\RestoringDo{%
+ \gmu@SMdo@setscope
+ \long\def\do##1{%
+ \gmu@SMdo@scope
+ \@xa\let\@xa##1\csname
+ \gmu@storeprefix/\bslash@or@ac{##1}\endcsname}%
+}
+
+\pdef\gmu@MakeScopePrefix
+#1% \CS to be let |\global| or |\relax|
+#2% a sequence of tokens
+{%
+ \let#1\relax
+ \gmu@ifxany{\global}{#2}%
+ {\let#1\global}{}%
+}
+
+\lpdef\gmu@namelet
+#1% scope prefix (to be honest, \emph{any} sequence of tokens that may
+ % be passed as an argument: |\gmu@ifxany| will parse it)
+#2% left side of the assignment
+#3% right side of the assignment
+{%
+ \gmu@MakeScopePrefix\gmu@namelet@scpref{#1}%
+ \gmu@if {csname} {#3\endcsname}%
+ {%
+ \@xa\gmu@namelet@scpref\@xa\let\csname#2\@xa\endcsname
+ \csname#3\endcsname}%
+ {%
+ \@xa\gmu@namelet@scpref
+ \@xa\let\csname#2\endcsname\@undefined}%
+}
+
+\pdef\n@melet{\gmu@namelet\relax}
+
+\pdef\gn@melet{\gmu@namelet\global}
+
+\long\pdef\tri@let
+#1% scope prefix(es)
+#2% left side
+#3% right side of the assignment
+{%
+ \gmu@MakeScopePrefix\gmu@tri@let@scpref{#1}%
+ \ifcat\@nx~\@nx#2%
+ \def\next{\gmu@tri@let@scpref\let#2}%
+ \else \edef\next{\gmu@tri@let@scpref\let\@xanxtri{#2}}%
+ \fi
+ \ifcat\@nx~\@nx#3%
+ \next#3%
+ \else
+ \edef\next{%
+ \@xau\next
+ \ifcsname \strip@bslash{#3}\endcsname
+ \@xanxtri{#3}%
+ \else\@nx\@undefined
+ \fi
+ }% of next's edef
+ \next
+ \fi
+}%
+
+\long\pdef\envirlet#1#2{% for |\let|ting environments.
+ \n@melet{#1}{#2}%
+ \n@melet{end#1}{end#2}%
+}
+
+\long\pdef\glenvirlet#1#2{% for |\let|ting environments.
+ \gn@melet{#1}{#2}%
+ \gn@melet{end#1}{end#2}%
+}
+
+
+
+\def\@ifXeTeX{% two-argument command
+ \ifdefined\XeTeXversion
+ \unless\ifx\XeTeXversion\relax\afterfifi\@firstoftwo\else\afterfifi\@secondoftwo\fi
+ \else\afterfi\@secondoftwo\fi
+}
+
+
+\newif\ifgmuXeTeX
+\@ifXeTeX{\gmuXeTeXtrue}{}%
+
+
+\@ifXeTeX{%
+ \pdef\textbullet{% \changes{v0.94}{2008/10/3}{the \XeTeX\
+ % version enriched with \cs{iffontchar} due to lack of bullets
+ % with the default settings reported by Morten H\o{}gholm and Edd Barrett}
+ \iffontchar\font"2022 \char"2022 \else\ensuremath{\bullet}\fi}%
+ %
+ \pprovide\glyphname#1{% \changes{v0.96}{2008/11/12}{moved here from
+ % my private document class}
+ \XeTeXglyph \numexpr\XeTeXglyphindex "#1"\relax\relax}% since
+ % \XeTeX\ … \incs{numexpr} is redundant.
+}
+{\def\textbullet{\ensuremath{\bullet}}}
+
+\def\if@XeTeX {\@ifXeTeX {\iftrue}{\iffalse}}
+
+
+\long\def\detoken@xa#1{\detokenize\@xa{#1}}
+
+ \long\def\all@other#1{\@xa\gmu@gobmacro\meaning#1}
+
+ % The |\gmu@gobmacro| macro above is applied to gobble the |\meaning|'s
+ % beginning, |long macro:->| all `other' that is.
+ % \Define\gmu@gobmacro
+ \edef\gmu@tempa{%
+ \def\@nx\gmu@gobmacro##1\@xa\@gobble\string\macro:##2->{}}
+ \gmu@tempa
+
+
+\def\gmshowlists{%
+ \tracingonline=1
+ \showboxdepth=1 \showboxbreadth=1000000 \showlists}
+
+\def\gmshowbox{%
+ \tracingonline=1
+ \showboxdepth=10000 \showboxbreadth=10000 \showbox}
+
+\def\gmtracingoutput{%
+ \tracingoutput\@ne
+ \tracingonline=\@ne
+ \showboxdepth=1
+ \showboxbreadth=1000000
+}
+
+\newif\ifgmu@debug@msgs
+
+\def\gmtron{%
+ \tracingonline=\@M
+ \tracingmacros=\@M
+ \tracingassigns=\@M
+ \tracingcommands=\@m
+ \gmu@debug@msgstrue
+ \let\let\let
+}
+
+\def\gmtroff{%
+ \tracingonline=\m@ne
+ \tracingmacros\m@ne
+ \tracingassigns=\m@ne
+ \tracingcommands=\m@ne
+ \tracingoutput=\m@ne
+ \gmu@debug@msgsfalse
+ \let\let\let
+}
+
+\newcommand\nameshow[1]{%
+ \ifcsname #1\endcsname
+ \@xa\show\csname#1\endcsname
+ \else \show\@undefined
+ \fi}
+
+\newcommand\nameshowthe[1]{%
+ \ifcsname #1\endcsname
+ \@xa\showthe\csname#1\endcsname
+ \else \showthe\@undefined
+ \fi}
+
+\newcommand\namemeaning[1]{%
+ \ifcsname #1\endcsname
+ \@xa\typeout{\@xa\meaning\csname#1\endcsname}%
+ \show\relax
+ \else \typeout{\meaning\@undefined}\show\relax
+ \fi}
+
+\def\secondclass{%
+ \newif\ifSecondClass
+ \SecondClasstrue
+ \@fileswithoptions\@clsextension}%|[outeroff,gmeometric]{gmdocc}|%
+
+\AtBeginDocument{%
+ \unless\ifdefined\@parindent
+ \newskip\@parindent
+ \@parindent=\parindent
+ \fi
+}
+
+\def\balsmiley#1 {}% to balance parentheses and brackets in
+ % smileys. \balsmiley( ;-) \inverb|\balsmiley( ;-)|
+
+\long\def\scantnoline#1{% ‘rescan tokens without adding line at the end’
+ {\endlinechar\m@ne\scantokens{#1}}}
+
+\pdef\getprevdepth{% to pass last depth through a group (e.g. |\end{envir.}|)
+ \endgraf
+ \xdef\setprevdepth{\prevdepth=\the\prevdepth\relax}%
+}
+
+\pdef\getprevdepthlocal{%
+ \endgraf
+ \edef\setprevdepth{\prevdepth=\the\prevdepth\relax}%
+}
+
+\def\StoreCatM{%
+ \protected\edef\RestoreCatM{%
+ \catcode`\@nx\^^M=\the\catcode`\^^M\relax}%
+}
+
+\pdef\RestoreCatM{\PackageE{gmutils}{first store the catcode of
+ ^\empty^\empty M with \string\StoreCatM.}%
+}
+
+
+\RequirePackage{graphicx}
+
+\pdef\resizegraphics#1#2#3{% % \changes{v0.94}{2008/10/4}{\cs{includegraphics}
+ % works well in \XeTeX\ so I~remove the complicated version
+ % with \cs{XeTeXpicfile}}
+ % 2009/11/17 works bad with a file whose name contains spaces so I
+ % return \cmd\XeTeXpicfile
+ \resizebox{#1}{#2}{%
+ \edef\gmu@tempa{\@nx\csname XeTeX\@nx\@ifendswithpdf{%
+ \@xa\string\csname#3\endcsname}{pdf}{pic}file\@nx\endcsname}%
+ \gmu@tempa "#3"\relax}}
+
+\edef\gmu@tempa{%
+ \def\@nx\@ifendswithpdf##1{%
+ \unexpanded{%
+ \ifnum
+ \if\relax\gmu@pdfdetector}##1%
+ \detokenize{pdf}\unexpanded{\relax0\else1\fi}% we expand to 1 if
+ % \inhash1 ends with lowercase ‘pdf’ of cat. 12
+ \unexpanded{\if\relax\gmu@PDFdetector}##1%
+ \detokenize{PDF}\unexpanded{\relax0\else1\fi}% we expand to 1 if
+ % \inhash1 ends with uppercase ‘PDF’ of cat. 12
+ >0
+ \unexpanded{\@xa\@firstoftwo\else\@xa\@secondoftwo\fi}%
+ }% of |\@ifendswithpdf|
+ %
+ % \stanza
+ %
+ \def\@nx\gmu@pdfdetector##1\detokenize{pdf}{}%
+ \def\@nx\gmu@PDFdetector##1\detokenize{PDF}{}%
+}\gmu@tempa
+
+
+\def\lastcentered{%
+ \lastlinefit\z@
+ \parindent0sp\relax
+ \leftskip\dimexpr1\leftskip\relax plus 1fil\relax
+ \rightskip\dimexpr1\rightskip\relax plus -1fil\relax
+ \parfillskip0sp plus 2fil\relax
+}
+
+\def\endlastcentered{\par\@endpetrue}
+
+\def\firstcentered{%
+ \lastlinefit\z@
+ \parfillskip 0sp\relax
+ \rightskip0sp plus 1fil\relax
+ \leftskip0sp plus -1fil\relax
+ \parindent 0sp
+ \addtotoks\everypar{\hskip0sp plus 2fil\relax}%
+}
+
+\let\endfirstcentered\endlastcentered
+
+\def\gmu@measurewd#1{% \label{@measurewd}
+ \edef\gmu@tempa{\the\fontcharwd\font`#1}%
+ \settowidth{\@tempdimb}{% to preserve kerning
+ \char`#1\char`#1\char`#1\char`#1\char`#1\char`#1%
+ \char`#1\char`#1\char`#1\char`#1\char`#1\char`#1%
+ \char`#1\char`#1\char`#1\char`#1\char`#1\char`#1%
+ \char`#1\char`#1\char`#1}%
+ \edef\gmu@tempb{\the\dimexpr(\@tempdimb-\gmu@tempa)/20}%
+}
+
+\def\@xa@three#1#2{% reverses expansion of three tokens, two given as
+ % arguments. (third may be |{|^^A }
+ % )
+ \@xa\@xa\@xa \@xa\@xa\@xa \@xa #1%
+ \@xa\@xa\@xa #2%
+ \@xa }
+
+\def\@xa@four#1#2#3{% reverses expansion of four tokens, three given as
+ % arguments. (fourth may be |{|^^A }
+ % )
+ \@xa\@xa\@xa\@xa \@xa\@xa \@xa
+ \@xa\@xa\@xa\@xa \@xa\@xa\@xa\@xa #1%
+ \@xa\@xa\@xa\@xa \@xa\@xa \@xa #2
+ \@xa\@xa\@xa #3%
+ \@xa }
+
+
+\long\pdef\@ifenvir#1{%\label{@ifenvir}\
+ % \begin{enumargs}
+ % \mand enquired environment name which will be confronted with
+ % \incs{@currenvir}
+ % \mand what if true (if the names are
+ % equivalent\qfootnote{The names are checked whether they produce
+ % the same \cmd\csname. They don't have to have the same
+ % catcodes.})
+ % \mand what if false
+ % \end{enumargs}
+ %
+ % \changes{v0.92}{2008/08/07}{added}
+ % \chgs{2010/06/02 v0.993 made \cmd\protected after an error at work}
+ \gmu@ifedetokens{\@currenvir}{#1}%
+}
+
+\pdef\@ifjobname#1{\gmu@ifedetokens{\jobname}{#1}}
+
+\long\def\gmu@ifstrcmp
+#1% wrapper for left side of comparison
+#2% wrapper for right side of comparison
+#3% left side of comparison (list of tokens)
+#4% right —”—
+{%
+ \ifnum\strcmp{#1{#3}}{#2{#4}}=\z@
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+\def\gmu@ifdetokens
+{%
+ \gmu@ifstrcmp\detokenize\detokenize
+}% of |\gmu@ifdetokens|
+
+\def\gmu@ifutokens
+{%
+ \gmu@ifstrcmp\unexpanded\unexpanded
+}
+
+\def\gmu@ifedetokens{%
+ \gmu@ifstrcmp \@firstofone \@firstofone
+}
+
+\@XA{\pdef\gmu@pifdetokens}\@xa{\gmu@ifdetokens}
+
+\@XA{\pdef\gmu@pifutokens}\@xa{\gmu@ifutokens}
+
+\@XA{\pdef\gmu@pifedetokens}\@xa{\gmu@ifedetokens}
+
+ % \chgs{2009/04/21 v0.99 moved to a~separate macro from
+ % \cmd\@ifenvir\ and made symmetric to both arguments}
+ % \chgs{2008/12/01 v0.98 rewritten not to make entries in the hash
+ % table, thanks to \cmd\detokenize\ and made robust to open \cs{if}s
+ % in the arguments thanks to substitution of explicit parameters
+ % with \cmd\@firstoftwo\ and \cmd\@secondoftwo}
+
+
+
+\def\gmu@HHashes#1#2{% this is a~fully expandable loop analogous to
+ % that of The % \eTeX\ Manual p.~9.
+ \ifnum#1<#2 %
+ ################\number#1
+ \expandafter\gmu@HHashes
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi}% of |\gmu@HHashes|.
+
+\def\gmu@Hashes#1#2{% this is a~fully expandable loop analogous to
+ % that of The % \eTeX\ Manual p.~9.
+ % expanding in an |\edef| to |####›1›…####⁄<h.$2-1$>| (quadruple hashes' sequence)
+ \ifnum#1<#2 %
+ ########\number#1
+ \expandafter\gmu@HHashes
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi}% of |\gmu@hashes|.
+
+\def\gmu@hashes#1#2{% this is a loop analogous to
+ \ifnum#1<#2%
+ ####\number#1
+ \expandafter\gmu@hashes
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi
+}% of |\gmu@hashes|.
+
+\def\gmu@HHashesbraced#1#2{%
+ \ifnum#1<#2%
+ {################\number#1}%
+ \expandafter\gmu@HHashesbraced
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi}% of |\gmu@hashesbraced|.
+
+\def\gmu@Hashesbraced#1#2{%
+ \ifnum#1<#2%
+ {########\number#1}%
+ \expandafter\gmu@HHashesbraced
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi}% of |\gmu@hashesbraced|.
+
+\def\gmu@hashesbraced#1#2{%
+ \ifnum#1<#2%
+ {####\number#1}%
+ \expandafter\gmu@hashesbraced
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi
+}% of |\gmu@hashesbraced|.
+
+\def\gmu@hashesOut#1#2{%
+ \ifnum#1<#2%
+ \space\space\space\space
+ »\@nx\unexpanded{####\number#1}«%
+ \expandafter\gmu@hashesOut
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi
+}% of |\gmu@hashesbraced|.
+
+\def\gmu@hashesOutU#1#2{%
+ \ifnum#1<#2%
+ \space\space\space\space
+ »\@nx\unexpanded{####\number#1}«%
+ \expandafter\gmu@hashesOut
+ \expandafter{\number\numexpr#1+1\expandafter}%
+ \expandafter{\number#2\expandafter}%
+ \fi
+}% of |\gmu@hashesbraced|.
+
+\@tempcnta=1
+\@whilenum\@tempcnta<11\do{% 2010/4/15
+ \@nameedef{gmu@hashes@\the\numexpr\@tempcnta-1\relax}%
+ {\gmu@hashes1\@tempcnta}%
+ %
+ \@nameedef{gmu@Hashes@\the\numexpr\@tempcnta-1\relax}%
+ {\gmu@Hashes1\@tempcnta}%
+ %
+ \@nameedef{gmu@HHashes@\the\numexpr\@tempcnta-1\relax}%
+ {\gmu@HHashes1\@tempcnta}%
+ %
+ \@nameedef{gmu@hashesbraced@\the\numexpr\@tempcnta-1\relax}%
+ {\gmu@hashesbraced1\@tempcnta}%
+ %
+ \@nameedef{gmu@Hashesbraced@\the\numexpr\@tempcnta-1\relax}%
+ {\gmu@Hashesbraced1\@tempcnta}%
+ % %
+ \@nameedef{gmu@HHashesbraced@\the\numexpr\@tempcnta-1\relax}%
+ {\gmu@HHashesbraced1\@tempcnta}%
+ %
+ \edef\gmu@eloops@resa{%
+ \long\def\@xanxcs{% ^^A >>>>>> printhashes
+ gmu@TOhashes@\romannumeral\numexpr\@tempcnta-1\relax}%
+ \gmu@hashes1\@tempcnta{%
+ \@nx\TypeOut{%
+ \gmu@hashesOut % ^^A2
+ 1 \@tempcnta}%
+ }% of |\gmu@TOhashes@viii| etc.
+ %
+ }% of temporary macro
+ %
+ \gmu@eloops@resa
+ % Generates nine pairs of macros |\gmu@TOhashes@i|,
+ % |\gmu@TOUhashes@i|, |\gmu@TOhashes@ii|, |\gmu@TOUhashes@ii|
+ % etc. that print (type out) their arguments on the terminal,
+ % ^^A expanded or \textbf Unexpanded.
+ % unexpanded
+ %
+ \advance\@tempcnta\@ne
+}% of |\@whilenum|
+
+\foone{\catcode`\ \active}%
+{\newcommand*\gmobeyspaces{\let \ \catcode`\ \active}}
+
+\newcommand*\nohy{\leavevmode\kern0sp\relax}
+\newcommand*\yeshy{\leavevmode\penalty\@M\hskip\z@skip}
+
+\long\pdef\gmu@EdefCurrnames#1{%
+ \xiiEdetoke\gmu@EdefCurrnames@resa{#1}%
+ \@xa \gmu@EdefCurrnames@ \gmu@EdefCurrnames@resa.tex.\@nil
+ % if no extension is present, |tex| is assumed. This couple of
+ % macros won't work well for files with dots in their names.
+}
+
+\pdef\gmu@EdefCurrnames@ #1.#2.#3\@nil{%
+ \def\@currname{#1}%
+ \def\@currext{#2}%
+}
+
+\def\NamedInput@prepare#1{% we wrap in a macro to use also in |\DocInput|
+ \@pushfilename
+ \gmu@EdefCurrnames {#1}%
+}
+
+\let\NamedInput@finish=\@popfilename
+
+\pdef\NamedInput#1{% useful e.g.~in error handling
+ \NamedInput@prepare {#1}%
+ \@@input #1\relax
+ \NamedInput@finish
+}
+
+\def\gmu@ifdim
+#1% dimen specification
+#2% comparison
+#3% dimen specification
+{%
+ \ifnum0\ifx#2≤1\fi\ifx#2≥1\fi\ifx#2≠1\fi=\@ne
+ \afterfi\unless
+ \fi
+ \ifdim#1\ifx#2≤>\fi\ifx#2≥<\fi\ifx#2≠=\fi
+ \ifx#2>>\fi\ifx#2<<\fi\ifx#2==\fi
+ \dimexpr(#3)*1\relax% parentheses are for closing all possible
+ % \eTeX pressions not to gobble that |\relax|
+ % by them but only by the outermost |\dimexpr|
+ % to avoid premature expansion of the
+ % following |\expandafter|. (2010/6/14)
+ \@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi
+}
+
+\def\gmu@ifskip
+#1% glue specification
+#2% comparison for natural part
+#3% comparison for stretch part
+#4% comparison for shrink part
+#5% glue specification
+{\ifnum
+ 0\gmu@ifdim{1\glueexpr#1}#2{1\glueexpr#5}10%
+ \gmu@ifdim{\gluestretch\glueexpr#1}#3{\gluestretch\glueexpr#5}10%
+ \gmu@ifdim{\glueshrink\glueexpr#1}#4{\glueshrink\glueexpr#5}10=111
+ \@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi
+}% of |\gmu@ifskip|.
+
+\def\gmu@ifbox
+#1% a box register number (e.g.~|\copy\z@|)
+#2% comparison for heights
+#3% comparison for depths
+#4% comparison for widths
+#5% a box register number
+{%
+ \gmu@ifskip
+ {\glueexpr (\ht#1 plus \dp#1 minus\wd#1 )*1\relax}%
+ #2#3#4%
+ {\glueexpr (\ht#5 plus \dp#5 minus\wd#5 )*1\relax}%
+}
+
+\def\greater@dim#1#2{%
+ \ifdim\dimexpr#1>\dimexpr(#2)*1\relax
+ #1%
+ \else #2%
+ \fi
+}
+
+\long\pdef\gmu@removeelement
+#1% element to be removed
+#2% macro carrying a comma-separated list
+#3% \CS to carry removed element.
+{%
+ \let#3\@undefined%
+ \def\gmu@removeelement@resa##1,#1,##2\@nil{%
+ \gmu@ifempty{##2}%
+ {\edefU#2{##1}}%
+ {\edefU#2{##1,##2}%
+ \def#3{#1}%
+ \@xa\gmu@removeelement@resa#2\@nil
+ }%
+ % If |##2| is not empty, then we know |#1| was in the list so we
+ % have to remove its copy from the end of the list.
+ }% of |\gmu@removeelement@resa|
+ \@xa\gmu@removeelement@resa\@xa,#2,#1,\@nil
+ % We gobble the beginning comma
+ \@xa\@xa\@xa\ifx\@xa\@firstofmany#2\relax\@nil,%
+ \edef#2{\unexpanded
+ \@xa\@xa\@xa{\@xa\@gobble#2}}%
+ \fi
+}
+
+\long\def\@nxcsn#1{%
+ \@xa\@nx\csname #1\endcsname}
+
+
+\def\@listbegvskipping{%
+ \@topsepadd=\topsep
+ \ifvmode
+ \advance\@topsepadd by\partopsep
+ \fi
+ \par
+ \addvspace\@topsepadd
+}
+
+
+\def\foolc#1#2{%
+ \begingroup\lccode`#1=`#2\relax
+ \lcfirstofone
+}
+
+\long\def\lcfirstofone#1{%
+ \lowercase{\endgroup#1}%
+}
+
+\long\def\PackageWarning#1#2{%
+ \GenericWarning{%
+ (#1)\@spaces\@spaces\@spaces\@spaces
+ }{%
+ Package #1 Warning: #2%
+ }%
+}
+
+\long\def\TypeOut#1{%
+ \edef\TO@resa{#1}%
+ \edef\TO@resa{\@xa\detokenize\@xa{\TO@resa}}%
+ \typeout{\TO@resa}}
+
+\long\def\ShowOut#1{%
+ \TypeOut{#1}%
+ \show\TO@resa
+}
+
+\long\pdef\incsdef
+#1% a CS or active char
+#2% parameters string
+#3% definition's body
+{%
+ \def#1#2{\gmu@ifincsname {\string#1}{#3}}%
+}
+
+
+\gmu@DefSymbol\gmu@CountTokens@end
+\newcount\c@gmu@TokensCount
+
+\lpdef\gmu@CountTokens
+#1% the tokens to be counted.
+{%
+ \c@gmu@TokensCount=\m@ne
+ \let\gmu@CountToken@token\@undefined
+ \gmu@CountToken@iter
+ #1\gmu@CountTokens@end
+}
+
+\def\gmu@CountToken@iter{%
+ \gmu@if x{\gmu@CountToken@token\gmu@CountTokens@end}%
+ {}% we've reached the end of iteration
+ {%
+ % We increase the counter and throw the iterator after next assignment
+ \advance\c@gmu@TokensCount\@ne
+ \afterassignment\gmu@CountToken@iter
+ \let\gmu@CountToken@token=
+ }%
+}%
+
+
+\long\def\gmu@passbraced
+#1% the stuff to be put before |#2|
+#2% the stuff we check and pass unbraced if single or braced otherwise
+{%
+ \gmu@CountTokens{#2}%
+ \gmu@if {num}{\c@gmu@TokensCount=\@ne}%
+ {\gmu@if x{#2 }% if |#2| is single token of blank space then we
+ % don't consider it single since it can't be an
+ % argument to a macro if without braces.
+ \@secondoftwo\@firstoftwo
+ }%
+ \@secondoftwo
+ {#1#2}{#1{{#2}}}%
+}% of |\gmu@passbraced|
+
+\long\def\gmu@passbracedNotSp
+#1% the stuff to be put before |#2|
+#2% the stuff we check and pass unbraced if single or braced otherwise
+{%
+ \gmu@CountTokens{#2}%
+ \gmu@if {num}{\c@gmu@TokensCount=\@ne}%
+ {#1{#2}}%
+ {#1{{#2}}}%
+}% of |\gmu@passbracedNotSp|
+
+\long\def\MeaningOrUnex#1{%
+ \gmu@if {singletoken}{{#1}}%
+ {\meaning#1}{\unexpanded{#1}}%
+}
+
+\pldef\@iwru#1{%
+ %
+ % as simple as possible not to put much output on the terminal if
+ % tracing is on.
+ %
+ \immediate \write \@unused {l.\the\inputlineno:\space #1}%
+}
+
+\pldef\@iwruJ{\@iwru{^^J}}
+
+\pldef\@iwrum#1{%
+ \@iwru{»\unexpanded{#1}« is »\MeaningOrUnex{#1}«}%
+}
+
+\pldef\@iwruU #1{\@iwru{\unexpanded{#1}}}
+
+\pldef\@iwruif#1{%
+ \gmu@if {gmu@debug@msgs}{}
+ {\@iwru{#1}}{}%
+}
+
+\long\pdef\IgnInfo
+#1% package name
+#2% description
+#3% stuff we announce as ignored
+{%
+ \PackageInfo{#1}{Item »\unexpanded{#3}« (\MeaningOrUnex{#3}) ignored^^J%
+ #2}%
+}
+
+\pldef\@iwma{%
+ % (Added 2010/10/19)
+ %
+ % Note it takes a \emph{text} not an argument.
+ \immediate \write \@mainaux
+}
+
+\def\stepnummacro
+#1% a macro that expands to some numerical stuff
+#2%
+{\edef#1{\the\numexpr #1+#2}}
+
+\def\boolstobin
+#1% a sequence of Boolean switches' names without »if«
+{%
+ \numexpr \boolstobin@iter 0 #1 {}\gmu@delim %
+}
+
+\def\boolstobin@iter
+#1% expression so far
+#2% the name of current switch (without »if«)
+#3% tail of switches
+\gmu@delim
+{%
+ \gmu@ifempty{#3}%
+ {#1\relax}% |\relax| to close the num expression
+ {\boolstobin@iter
+ {(#1)*2+\csname if#2\endcsname 1\else 0\fi}%
+ #3\gmu@delim
+ }%
+}
+
+\long\def\condstobin
+#1% a sequence of conditionals' names without »if« followed by the condition
+{%
+ \numexpr \condstobin@iter 0 #1 {}{}\gmu@delim %
+}
+
+\long\def\condstobin@iter
+#1% expression so far
+#2% the name of current conditional (without »if«)
+#3% the condition for |#2|
+#4% tail of switches
+\gmu@delim
+{%
+ \gmu@ifempty{#3}%
+ {#1\relax}% |\relax| to close the num expression
+ {\condstobin@iter
+ {(#1)*2+\csname if#2\endcsname #31\else 0\fi}%
+ #4\gmu@delim
+ }%
+}
+
+
+\long\def\gmu@ifQUANT@iter
+#1% the (binary) value that terminates calculation: 0 for AND and 1
+ % for OR (it has to be a single token due to |\expandafter| in line
+ % \ref{@xa-in-QUANT})
+#2% the (binary) value so far;
+#3% the name of current conditional (without »if«)
+#4% the condition for |#2|
+#5% tail of condition(al)s
+\gmu@delim
+{%
+ \gmu@ifempty{#5}%
+ {#2}%
+ {% or else we check whether |#2| is terminating
+ \gmu@if {num}{#2=#1 }% with a space
+ {#1}%
+ {\@xa\gmu@ifQUANT@iter \@xa #1% \label{@xa-in-QUANT}
+ \the\numexpr %^^V 1 * % |\numexpr| is used here to get the full
+ % expansion in one step. No need of superposing with identity.
+ (\gmu@if {#3}{#4 } {1} {0}) +\z@\relax
+ #5\gmu@delim
+ }%
+ }%
+}% of |\gmu@ifQUANT@iter|.
+
+\long\def \ifAnyClause
+#1{%
+ \ifnum
+ \gmu@ifQUANT@iter
+ 1% for the Existential Quantifier 1 terminates calculation (\emph{an(y)}
+ % example has just been found)
+ 0% To make any calculation sense we assume 0 at the beginning
+ % (i.e., “we haven't found an example yet”)
+ #1
+ {false}{} {false} {}% the sentinel(s)
+ \gmu@delim % the delimiter
+ =\@ne % right side of |\Ѻifnum|
+}
+
+\long\def\gmu@OR
+#1% as above\\
+{%
+ \ifAnyClause {#1}%
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+\long\def\ifAllClauses
+#1% a sequence of pairs \arg{conditionals' name without »if«}{the
+{%
+ \ifnum
+ \gmu@ifQUANT@iter
+ 0% for the General Quantifier 0 terminates calculation (when a
+ % counter-example has just been found)
+ 1% To make any calculation sense we assume 1 at the beginning
+ #1
+ {true}{} {true} {}% the sentinel(s)
+ \gmu@delim % the delimiter
+ =\@ne % right side of |\Ѻifnum|
+}
+
+\long\def\gmu@AND
+#1%
+{%
+ \ifAllClauses {#1}%
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+\long\def\sName #1#2 {\@xa#1\csname #2\endcsname}
+
+\long\def\sdName #1#2 {\@xa#1\csname \detokenize{#2}\endcsname}
+
+\long\def\dName #1#2{\@xa #1\csname \detokenize{#2}\endcsname}
+
+\long\def\@sN #1 {\csname #1\endcsname}
+\long\def\@sdN #1 {\csname \detokenize{#1}\endcsname}
+
+
+\pdef\clap #1{\hbox to \z@{\hss #1\hss}}
+
+\pdef\hsizecline #1{\hbox to\hsize{\hss #1\hss}}
+
+\long\def\gmu@extreme
+#1% kind of test (|num| or |dim|)
+#2% inequality sign: |<| for minimum, |>| for maximum.
+#3% left side of comparison
+#4% right side of comparison
+{%
+ \gmu@if {x\@xa\@xa}{\@firstofmany#4\@nil\relax} % this complicated test is to
+ % allow arguments beginning with some \incs{if⁄<…>} as in
+ % \incs{possvfil} e.g.
+ {#3}%
+ {%
+ \gmu@if {#1} {\csname #1expr\endcsname#3\relax
+ #2\csname #1expr\endcsname #4\relax }
+ {\gmu@extreme {#1}#2{#3}}%
+ {\gmu@extreme {#1}#2{#4}}%
+ }%
+}% of |\gmu@extreme|
+
+\def\gmu@maxnum{\gmu@extreme {num}>}
+\def\gmu@minnum{\gmu@extreme {num}<}
+
+\def\gmu@maxdim{\gmu@extreme {dim}>}
+\def\gmu@mindim{\gmu@extreme {dim}<}
+
+\pdef\gmu@fitto
+#1% scope (nothing, |\relax| or |\global|.
+#2% left side of the assignment (must be a dimen able to be ”passive”)
+#3% the comparison (if |#2#3#4| then reassign |#2|)
+#4% right side of the assignment---any correct text for |\dimexpr|.
+{%
+ \gmu@if {dim}{#2#3\dimexpr (#4)+\z@\relax\relax}%
+ {#1#2=\dimexpr (#4)+\z@\relax}%
+ {}%
+}
+
+\pdef\gmu@g@enlargeto
+#1% |#2| of the above
+#2% |#4| of the above
+{\gmu@fitto\global{#1}<{#2}}
+
+\pdef\discre#1#2#3{\leavevmode\kern\z@
+ \discretionary{#1}{#2}{#3}\penalty\@M\hskip\z@skip}
+
+\pdef\discret#1{\discre{#1}{#1}{#1}}
+
+\pdef\gmu@flexhyphen{%
+ \discre{% before break
+ \ifnum\hyphenchar\font>\z@
+ \char\hyphenchar\font
+ \fi
+ }% end of before break
+ {}%after break
+ {}% without break
+}
+
+\def\:{%
+ \ifmmode\afterfi{\mskip\medmuskip}%
+ \else\afterfi{\discre{\null}{}{}}% \incs{null} to get
+ % \incs{hyphenpenalty} not \incs{exhyphenpenalty}.
+ \fi
+}
+
+\lpdef\hboxreflected#1{%
+ \hbox{%
+ \reflectbox{#1}%
+ }%
+}
+
+\pdef\gmu@ifSystemX{% the ‘If file exists” test is \emph{NOT}
+ % expandable since it involves opening some
+ % streams. Therefore we define this macro as protected.
+ \IfFileExists{/etc/passwd}%
+}
+
+\def\hrule@zero{\hrule height\z@ width\z@ depth\z@}
+\def\vrule@zero{\vrule height\z@ width\z@ depth\z@}
+
+\def\do#1#2{% (2010/10/11)
+ \Name \def{gmu@iflast#1}{%
+ \ifnum #2=\lastnodetype
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+ }%
+}
+
+\do {glue}{11} \do{skip}{11}
+\do{kern}{12}
+\do {penalty}{13}
+
+\def\gmu@dimratio
+#1% numerator dim(en/expr)
+#2% denominator dim(en/expr)
+{\strip@pt
+ \dimexpr 1pt *
+ \numexpr\dimexpr (#1)*1\relax\relax /
+ \numexpr \dimexpr (#2)*1\relax \relax
+ \relax
+}
+
+\def\MakeFalseIfDefined #1{%
+ \ifcsname if#1\endcsname
+ \csn{#1false}%
+ \fi
+}
+
+\def\MakeTrueIfDefined #1{%
+ \ifcsname if#1\endcsname
+ \csn{#1true}%
+ \fi
+}
+
+\def\gmu@pageremain{\dimexpr
+ \ifdim\pagegoal=\maxdimen \textheight \else \pagegoal \fi
+ -\pagetotal
+ \relax
+}
+
+\def\gmu@GobbleMinus #1{\if-#1\else#1\fi}
+
+\def\gmu@absExpr
+#1% \eTeX's expression primitive, num or dim so far (2010/12/17, 11.46)
+#2% expression of respective kind
+{%
+ \@xa\gmu@GobbleMinus\the #1#2\endexpr
+}
+
+\def\gmu@absdim {\gmu@absExpr \dimexpr }
+\def\gmu@absnum {\gmu@absExpr \numexpr }
+
+\pdef\gmu@SetPagegoal #1{%
+ \gmu@if {dim} {\pagegoal=\maxdimen}%
+ {}% in this case we do nothing, as explained above
+ {\pagegoal = \dimexpr (#1)\relax}%
+}
+
+\pdef\gmu@SetPagegoalGlobal #1{%
+ \gmu@if {dim} {\pagegoal=\maxdimen}%
+ {}% in this case we do nothing, as explained above
+ {\global\pagegoal = \dimexpr (#1)\relax}%
+}
+
+\pdef\gmu@AdvancePagegoal #1{% the arg.\ should be a proper stuff for
+ % a sub-dimexpr (i.a., no spurious |\relax|es are allowed).
+ \gmu@SetPagegoal {\pagegoal +#1}%
+}
+
+\def\pagegoalortextheight{% as in the name:
+ \dimexpr
+ \ifdim \pagegoal=\maxdimen
+ \textheight
+ \else \pagegoal
+ \fi
+ \relax
+}
+
+\def\gmu@totalht #1{% the arg.\ should be a~box register.
+ \dimexpr \ht #1+\dp#1\relax
+}
+
+\def\vbadness@M {%
+ \unless\ifnum\vbadness=\@M
+ \edef\gmu@VeryBadBadness {\the\vbadness }%
+ \vbadness\@M
+ \fi
+}
+
+\def\vbadness@Restore {%
+ \ifdefined \gmu@VeryBadBadness
+ \vbadness \gmu@VeryBadBadness \relax
+ \else
+ \PackageError{gmbase}{You try to gm-restore \vbadness\space where
+ it is not gm-stored}{}%
+ \fi
+}
+
+\relaxen\endexpr
+
+\relaxen\endrule
+
+\def\gmu@ifpageodd {%
+ \ifodd \c@page
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+
+\gmu@DefSymbol\gmu@Fake
+
+\def\gmu@FakeLoaded
+#1% extension
+#2% name
+{\ifcsname ver@#2.#1\endcsname
+ \@xa\ifx\csname ver@#2.#1\endcsname \relax
+ \@xa\@xa\@xa \@firstofone
+ \else
+ \@xa\@xa\@xa \@gobble
+ \fi
+ \else
+ \@xa\@firstofone
+ \fi
+ {\Name\def {ver@#2.#1}{\gmu@Fake }}%
+}
+
+\def\gmu@FakeUnloaded
+#1% extension
+#2% name
+{\ifcsname ver@#2.#1\endcsname
+ \@xa\ifx\csname ver@#2.#1\endcsname\gmu@Fake
+ \Name\let {ver@#2.#1}\@undefined
+ \fi
+ \fi
+}
+
+\pdef\LoadPackagePolski {%
+ \gmu@FakeLoaded \@pkgextension {inputenc}%
+ \RequirePackage {polski}%
+ \gmu@FakeUnloaded \@pkgextension {inputenc}%
+}
+
+\def\hrule@zero{\hrule height\z@ width\z@ depth\z@}
+
+
+\pdef \protected@nil {}
+\let\protected@empty\protected@nil
+
+\ifgmuXeTeX
+
+ % 2011/02/03, 12.53 definitions of the macros for combinig
+
+ \def\gmu@nobound
+ #1% a~char
+ #2% bound number
+ {%
+ \gmu@unless {}
+ {0%
+ \gmu@if {num}{#2=\@ne }{0}{}%
+ \gmu@if {num}{#2=13 } {0}{}%
+ 1}
+ {}
+ {%
+ \leavevmode
+ \kern -\glyphbound #1 1%
+ }%
+ #1%
+ \gmu@unless {}
+ {0%
+ \gmu@if {num}{#2=\thr@@ }{0}{}%
+ \gmu@if {num}{#2=13 }{0}{}%
+ 1}
+ {}
+ {%
+ \kern -\glyphbound #1 3%
+ }%
+ }
+
+ \def\glyphbound
+ #1% char (name)
+ #2% number of the bound
+ {%
+ \XeTeXglyphbounds #2 \XeTeXglyphindex "#1"
+ }
+
+ \def\gmu@halfcomb
+ #1% the “basic” char
+ #2% the accent char
+ #3% emergency [\pk{fontspec}] font spec
+ {%
+ #1\kern-\gmu@halfwd #1%
+ \clap{%
+ \gmu@unless {fontchar}{\font `#2 }
+ {#3}{}%
+ #2}%
+ \kern\gmu@halfwd #1%
+ }
+
+ \def\gmu@halfwd#1{0,45\fontcharwd\font`#1 }
+
+ \def\gmu@llapcomb
+ #1% the “basic” char
+ #2% the accent char
+ #3% emergency [\pk{fontspec}] font spec
+ {%
+ \gmu@nobound #13%
+ \llap{%
+ \gmu@unless {fontchar}{\font `#2 }
+ {#3}{}%
+ #2}%
+ \kern \XeTeXglyphbounds 3 \XeTeXglyphindex "#1"
+ }
+
+\fi % of if \XeTeX
+
+\pdef\@rmfromreset
+#1% counter to be freed, e.g., |figure|,
+#2% counter from whose power we free |#1|, e.g., |chapter|.
+{%
+ {%
+ \def\@elt ##1{%
+ \gmu@ifdetokens{#1}{##1}%
+ {}% then we remove the element, otherwise
+ {\@nx\@elt {##1}}%
+ }%
+ %
+ \Name\xdef{cl@#2}{\csname cl@#2\endcsname}%
+ }%
+}
+
+
+\long\def \gmu@iflist {%
+ % |#1| (implicit) what if in a list environment
+ % |#2| (implicit) what if not in a list env.
+ \ifnum \@listdepth>\z@
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+\foone {\@makeother \^^I }{%
+ \def\xiitab{^^I}%
+}
+
+\foone {\catcode 9=\active } {%
+ % Totally perverse, but seems to be useful with DocStrip.
+ \def\gmu@maketabtab {%
+ \def ^^I{\xiitab}%
+ }%
+}
+
+
+\endinput
+%%
+%% End of file `gmbase.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmcommand.sty b/tex/.texmf/tex/latex/misc/gmcommand.sty
new file mode 100644
index 0000000..f83fc8a
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmcommand.sty
@@ -0,0 +1,2432 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmcommand.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `command')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmcommand}
+ [2011/10/12 v0.996 definition of \string \DeclareCommand \string &al. based on the ancient xparse (pre-expl3) (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage{gmbase} % we require the low-level macros.
+
+\unless\ifcsname ifgmu@quiet\endcsname
+\Name\newif {ifgmu@quiet}% % it has to be at least (at highest) in
+ % \CH{2010/09/06 v0.993 moved here from
+ % % \pk{gmutils.sty} (a bug fix)}
+\fi
+
+
+\unless\ifdefined\@temptokenb
+\newtoks\@temptokenb
+\fi
+
+\newif\if@dc@alllong@ % for an option of all arguments long (it's
+ % stronger than |GroteLang| defined later (the
+ % latter is |\let| it).
+\newif\if@dc@quiet@ % for suppressing the message of using of
+
+\newif\ifDCMessages % a~global switch to suppress the message about
+
+\newtoks\@dc@arguments % the register for storing parsed
+ % |\\command {#1}›…{⁄<n>}|.
+
+\newcount\c@dc@catchernum
+\newcount\c@dc@argnum
+
+\newif\if@dc@ignore@
+\newif\if@dc@GroteNegere@ % for “gross” ignoring
+\newif\if@dc@GroteLang@ % for “gross” longness
+
+\newif\if@dc@long@
+
+\newif\if@dc@BareSpace@
+
+
+\def\@dc@long@letter{%
+\if@dc@long@ P\fi
+}
+
+\newif\if@dc@xadefault
+
+\def\@nx@xa{\@nx\@xa}
+\def\@xa@nx{\@xa\@nx}
+\def\@xa@xa{\@xa\@xa}
+
+\newif\if@dc@xadefault@i@
+\newif\if@dc@xadefault@ii@
+\newif\if@dc@xaeacher@
+
+\def\@dc@falsify@xadefaults{%
+ \@dc@xadefaultfalse
+ \@dc@xadefault@i@false
+ \@dc@xadefault@ii@false
+}
+
+\lpdef\DeclareCommand#1#2#3{% ^^B It's the draft version just
+ % ^^B~to declare the true one, which is defined in line
+ % \ref{DC:final}.
+ %
+ % \begin{enumargs}
+ % \item command to be defined,
+ % \item arguments specification,
+ % \item definition body.
+ % \end{enumargs}
+ % \chgs[\DeclareCommand]{2008/12/05 v0.98 added the \env{S}/\env{T}
+ % spec parsing, the
+ % \env{s} spec parsing rewritten to be a~shorthand for
+ % \env{S\{*\}}, unused code removed}
+ % \chgs{2010/04/15 v0.993 implemented the \cmd\SameAs feature}
+ %
+ %
+ %
+\@dc@alllong@true
+ \@dc@ResetParseAuxilia
+ %
+ \@dc@ParseNextSpecifier #2%
+ \@dc@buckstopshere% it's the sentinel of parsing. Doesn't have to be
+ % defined since the test performs a strings comparison.
+ \protected\edef#1{%
+ \@nx\@dc@ {\the\toks@}%
+ \@xanxcs{\@dc@InnerName{#1}}%
+ \@nx #1%
+ }%
+ \edef\gmu@DeclareCommand@resa{%
+ \long\def\@xanxcs{\@dc@InnerName{#1}}%
+ \@xau\@dc@innerhashes{%
+ \unexpanded{#3}}%
+ }% of resa
+ \gmu@DeclareCommand@resa
+}% of the ‘draft’ |\DeclareCommand|.
+
+\long\def\@dc@
+ #1% the argument catchers in a~pair of braces (their arguments
+ % may contain \incmd\par\ so the macro is long).
+ #2% |\\thecommand\|
+ #3% |\thecommand|
+ {%
+ \ifx\protect\@typeset@protect
+ \@xa\@firstofone
+ \else
+ \protect#3\@xa\@gobble
+ \fi
+ {\@dc@arguments{#2}#1\the\@dc@arguments}%
+}
+
+\newtoks \@dc@ParsedSpecs
+
+\def\@dc@ResetParseAuxilia{%
+ %
+ \@dc@ParsedSpecs={}%
+ %
+ \c@dc@catchernum\z@ % the count of catchers
+ \c@dc@argnum\z@ % the count of arguments (inner arity) (it may be
+ % smaller than the above if we ignore some arguments)
+ %
+ \toks@{}% in this register we will store the created sequence of
+ % argument catchers.
+ %
+ % And for the |M⁄m| specifiers:
+ \@dc@Mmode@false
+ %
+ \emptify\@dc@innerhashes % in this macro we will store the sequence of
+ % \inverb|#1#2…|.
+ %
+ \@dc@GroteNegere@false
+ \let\if@dc@GroteLang@\if@dc@alllong@
+}
+
+\newif \if@dc@Mmode@
+\def\@dc@Ms@num {\z@}%
+
+\def\@dc@Ms@init{%
+ \@dc@Mmode@true
+ \def\@dc@Ms@num {\z@}%
+ \edef\@dc@Ms@initial@listate{%
+ \@dc@Ms@listate
+ }% of edef
+}
+
+\def\@dc@Ms@listate{%
+ \boolstobin{{@dc@long@}{@dc@ignore@}}%
+}
+
+\def\@dc@Ms@shipout {%
+ \gmu@if {num} {\@dc@Ms@num>\z@}%
+ {\@xa\dc@addtoParsed@\@xa{\@dc@Ms@num}%
+ \def\@dc@Ms@num{\z@}%
+ \@dc@Mmode@false
+ }%
+ {}%
+}
+
+\def\@dc@ResetStepAuxilia {%
+ % We set the local ignorance switch to its “gross” value
+ \let\if@dc@ignore@ =\if@dc@GroteNegere@
+ \let\if@dc@long@ = \if@dc@GroteLang@
+ % and reset the expandaftering switches
+ \@dc@falsify@xadefaults
+ \@dc@BareSpace@false
+}
+
+\def\@dc@argtypes{%
+ =\gobblespace \loop \lostwax \SameAs \Scope
+ AaBbCcDdGgKkMmOo%
+ QqSs*TtUuWw%
+ \drs
+}
+
+\def\@dc@drses{\drs} % decimal respecting space
+
+\@ifXeTeX
+{\addtomacro\@dc@argtypes{ďĎŤťǓǔÔô}%
+ \addtomacro\@dc@drses{ďĎ}%
+}
+{}
+
+\def\@dc@ParseSpecifier #1{% The main inner macro parsing argument
+ \gmu@CASE {stribs}{{#1}\@dc@buckstopshere}%
+ {%
+ \@dc@Ms@shipout
+ \edef\@dc@innerhashes {%
+ \gmu@hashes 1{\numexpr\c@dc@argnum +\@ne}%
+ }%
+ }%
+ \gmu@CASE {stribs}{{#1}>}%
+ {%
+ \grab@prefix }%
+ \@XA{%
+ \gmu@CASEsbnone{#1}}\@xa{%
+ \@dc@argtypes
+ }%
+ {\IgnInfo{gmcommand}{while parsing arg specifiers}{#1}%
+ \@dc@ParseNextSpecifier }%
+ \gmu@CASE {stribs}{{#1}\SameAs}%
+ {\@dc@SameAs}%
+ \gmu@ifsbnone {#1}{Mm}%
+ {\@dc@Ms@shipout }%
+ {}%
+ \gmu@if {@dc@Mmode@}{}%
+ {}%
+ {%
+ \gmu@ifsbany{#1}{=\gobblespace}{\@dc@ignore@true}{}%
+ \gmu@ifsw {@dc@BareSpace@}%
+ {\@dc@addtoparsed@BareSpace }
+ {}%
+ %
+ %
+ \gmu@ifsw {@dc@long@}%
+ {\@dc@addtospecs@bare{>P}}
+ {}%
+ %
+ \gmu@ifsw {@dc@ignore@}%
+ {\@dc@addtoparsed@Ignore }%
+ {}%
+ %
+ \@dc@addtospecs@bare {#1}%
+ %
+ \@xa\addtotoks\@xa\toks@\@xa{%
+ \csname ArgumentCatcher@\@dc@long@letter
+ \strip@bslash{#1}%
+ \endcsname
+ }% of toks' text.
+ \advance\c@dc@catchernum\@ne
+ }% of if not |M|-mode
+ \gmu@notif {@dc@ignore@}{}%
+ {\@dc@addinnerhash }% \label{@dc@addinnerhash}
+ {}% (empty “not-else” branch of ignoring)
+ \gmu@CASEsbany {#1}{Mm}%
+ {\@dc@process@ms}%
+ \gmu@CASEsbany {#1}{Kk}%
+ {\@dc@define@K}%
+ \gmu@CASEsbany {#1}{\gobblespace}%
+ {\@dc@ParseNextSpecifier}%
+ \gmu@CASEsbany{#1}{=\Scope AaBbCcDdOoSs*}%
+ {\grab@optparam{#1}}%
+ \@XA{\gmu@CASEsbany{#1}}\@xa{\@dc@drses}%
+ {\grab@optparam{#1}}%
+ \gmu@CASEsbany{#1}{UuǓǔWw\lostwax}%
+ {\@dc@grab@Loop #1}% putting the specifier's letter as |#1| for the
+ % grabber suppresses adding it to the parsed specifiers' list.
+ \gmu@lastCASE
+ {%
+ \grab@twoparams{#1}}%
+ \gmu@ESAC
+ %
+}% of |\@dc@ParseSpecifier|
+
+\def\@dc@addtoparsed@Ignore{%
+ \addtotoks\toks@{\@dc@ignorearg}%
+ \@dc@addtospecs@bare{>i}%
+}
+
+\def\@dc@addinnerhash{%
+ \advance\c@dc@argnum\@ne
+}
+
+\def\@dc@addtoparsed@BareSpace{%
+ \addtotoks\toks@{\@dc@BareSpaceArg }%
+ \@dc@addtospecs@bare{>\BareSpace }%
+}
+
+\def\@dc@process@ms{%
+ \gmu@if {@dc@Mmode@}{}%
+ {\gmu@if {num}{\@dc@Ms@initial@listate=\@dc@Ms@listate}%
+ {\@dc@process@ms@grabnum }% of if the state has'nt been changed
+ {\@dc@Ms@shipout
+ % Remember however that we've increased number of arguments so now we
+ % set it back:
+ \advance\c@dc@argnum\m@ne
+ \@dc@ParseSpecifier m%
+ }% of if the state has been changed
+ }% of if |M|-mode
+ {\@dc@Ms@init
+ \@dc@process@ms@grabnum
+ }% of not if |M|-mode.
+}% of \@dc@process@ms
+
+\def \@dc@process@ms@grabnum {%
+ \@ifnextanyIS {\bgroup \@ne \tw@ \thr@@ 123456789}%
+ {%
+ \@dc@process@ms@fin}%
+ {%
+ \@dc@process@ms@fin \@ne}%
+}
+
+\def \@dc@process@ms@fin #1{%
+ \edef\@dc@processms@hash {\the\numexpr#1}%
+ \edef\@dc@processms@left {\the\numexpr 9-\c@dc@argnum+\@ne}%
+ %
+ \gmu@AND {%
+ {num} {\@dc@processms@hash >\z@}
+ {num} {\@dc@processms@hash <\numexpr
+ \@dc@processms@left+1 \relax }%
+ }%
+ {\stepnummacro \@dc@Ms@num \@dc@processms@hash
+ \edef\@dc@hashgoal {%
+ \the\numexpr\c@dc@argnum +%
+ \@dc@processms@hash-1}% minus 1 because one
+ \@whilenum \c@dc@argnum<\@dc@hashgoal \do{%
+ \@dc@addinnerhash
+ }%
+ %
+ \@dc@ParseNextSpecifier
+ }% of if all conds.\ satisfied
+ {% some of the conds.\ not satisfied
+ \PackageError{gmcommand}{%
+ The argument to the M or m specifier, if any, has to be ^^J%
+ a number between 1 and \@dc@processms@left ^^J%
+ (there is/are \the\c@dc@argnum\space arg(s) declared
+ already).^^J%
+ I ignore this m/M.}%
+ {}%
+ \gmu@passbraced \@dc@ParseNextSpecifier {#1}%
+ }%
+}% of |\@dc@process@ms|
+
+\def\@dc@ParseNextSpecifier{%
+ \@dc@ResetStepAuxilia
+ \@dc@ParseSpecifier
+}
+
+\lpdef\@dc@AddAndParse#1{%
+ \dc@addtoParsed@{#1}%
+ \@dc@falsify@xadefaults
+ \@dc@ParseNextSpecifier
+}
+
+
+\def\grab@optparam #1{% arg specifier
+ \@ifnextchar\bgroup{\@dc@AddAndParse}%
+ {%
+ \edef\@dc@tempa{%
+ \gmu@if {csname}%
+ {@dc@optparam@deft@\strip@bslash{#1}\endcsname}%
+ {\@xaucs {@dc@optparam@deft@\strip@bslash{#1}}}%
+ {\@nx \NoValue}%
+ }%
+ \@xa\@dc@AddAndParse\@xa{\@dc@tempa}%
+ }%
+}
+
+
+\long\def\@dc@DeclareDefault #1#2{%
+ \uppercase{%
+ \Name\edefU{\strip@bslash{\@dc@optparam@deft@}\strip@bslash{#1}}{#2}}%
+ %
+ \lowercase{%
+ \Name\edefU{@dc@optparam@deft@\strip@bslash{#1}}{#2}}%
+}
+
+\@dc@DeclareDefault D{0}
+\@dc@DeclareDefault d{0}
+
+\@ifXeTeX {%
+ \@dc@DeclareDefault Ď{0}%
+}
+{}
+
+\@xa\@dc@DeclareDefault \@xa\Scope\@xa{\all@stars}
+
+\@dc@DeclareDefault = {\@tempcnta}
+
+
+\@dc@DeclareDefault Q {\NoValue}
+
+\@ifXeTeX {%
+ \@dc@DeclareDefault Ô{\NoValue}%
+}
+{}
+
+\@dc@DeclareDefault U {\NoValue}
+
+\long\def\@dc@maybe@expandafter #1{%
+ \gmu@if {@dc@xadefault}{}%
+ {\gmu@ifutokens{#1}{\NoValue}%
+ {\@secondoftwo}{\@firstoftwo}%
+ }% if we are to expandafter |#1|.
+ {\@secondoftwo}% if we don't expandafter |#1|
+}
+
+\long\def\dc@addtotoks@ #1{%
+ \@dc@maybe@expandafter {#1}%
+ %
+ {\toks@\@xa\@xa\@xa{\@xa\the\@xa\toks@\@xa{#1}}}%
+ {\toks@\@xa{\the\toks@{#1}}}%
+}
+
+\long\def\@dc@addtospecs #1{%
+ \@dc@maybe@expandafter {#1}%
+ {\@xa \addtotoks \@xa\@dc@ParsedSpecs\@xa{\@xa{#1}}%
+ }%
+ {\addtotoks\@dc@ParsedSpecs{{#1}}}%
+}
+
+\long\def\dc@addtoParsed@ #1{%
+ \dc@addtotoks@{#1}%
+ \@dc@addtospecs{#1}%
+}
+
+\long\def\@dc@addtospecs@bare #1{%
+ \addtotoks\@dc@ParsedSpecs{#1}%
+}
+
+\long\def\@dc@addtotoks@bare #1{%
+ \addtotoks\toks@ {#1}%
+}
+
+\long\def\@dc@addtoParsed@bare #1{%
+ \@dc@addtotoks@bare {#1}%
+ \@dc@addtospecs@bare {#1}%
+}
+
+\long\def\grab@twoparams
+#1% the specifier
+#2% first parameter, which is mandatory
+{% default default (when default is absent)
+ \if@dc@xadefault@i@\@dc@xadefaulttrue\fi
+ \dc@addtoParsed@{#2}%
+ \if@dc@xadefault@ii@
+ \@dc@falsify@xadefaults\@dc@xadefaulttrue
+ \fi
+ \grab@optparam{#1}%
+}
+
+\long\def\@dc@addargum#1{%
+ \addtotoks\@dc@arguments{#1}%
+\@iwruif {@@@@@@ @dc@arguments: »\the\@dc@arguments«}%
+}
+
+\Store@Macro\@dc@addargum
+
+\pdef\@dc@ignorearg{%
+ \long\def\@dc@addargum##1{%
+ \Restore@Macro\@dc@addargum}%
+}
+
+\StoreMacro@nocat\gmu@passbraced
+
+\pdef\@dc@BareSpaceArg{%
+ \let \gmu@passbraced \gmu@passbracedNotSp
+ \def\@dc@addargum {%
+ \Restore@Macro\@dc@addargum
+ \Restore@Macro\gmu@passbraced
+ \@dc@addargum
+ }%
+}
+
+
+\def\grab@prefix@CASE{% just a shorthand
+ \@xa\gmu@CASEsbany\gmu@forarg
+}
+
+\long\def\grab@prefix #1{%
+ %% \CH{2010/07/26 v0.993 made for-eaching to make it behave as
+ %% expected, i.e.\ that latter settings prævalent over the former}
+ %
+ \gmu@foreach#1\gmu@foreach@delim {%
+ %
+ \grab@prefix@CASE
+ {\long!lL\par Pp}%
+ {\@dc@long@true}%
+ %
+ \grab@prefix@CASE
+ {Ii}%
+ {\@dc@ignore@true}%
+ %
+ \grab@prefix@CASE
+ {\@xa\expandafter}%
+ {\@dc@xadefaulttrue}%
+ %
+ \grab@prefix@CASE
+ {\@xa \@xa@nx \@xa@xa \expandafter \@xanx \xanx \xaxa}%
+ {\@dc@xadefault@i@true}%
+ %
+ \grab@prefix@CASE
+ {\@xa \@nx@xa \@xa@xa \expandafter \@nxxa \nxxa}%
+ {\@dc@xadefault@ii@true}%
+ %
+ \grab@prefix@CASE
+ {\@xaeacher \xaeacher \xaEacher \xaE }%
+ {\@dc@xadefault@ii@true}%
+ %
+ \grab@prefix@CASE
+ {\GroteNegere \GrossIgnore \GroteN \GrossI}
+ {\@dc@GroteNegere@true
+ \@dc@ignore@true}%
+ %
+ \grab@prefix@CASE
+ {\GroteNegereStop\GrossIgnoreStop
+ \GroteNStop\GrossIStop}
+ {\@dc@GroteNegere@false
+ \@dc@ignore@false}%
+ %
+ \grab@prefix@CASE
+ {\GroteLang\GrossLong\GroteL\GrossL}
+ {\@dc@GroteLang@true
+ \@dc@long@true}%
+ %
+ \grab@prefix@CASE
+ {\GroteLangStop\GrossLangStop
+ \GroteLStop\GrossLStop}%
+ {%
+ \let\if@dc@GroteLang@=\if@dc@alllong@
+ \let\if@dc@long@=\if@dc@alllong@
+ }%
+ %
+ \grab@prefix@CASE
+ {\BareSpace}
+ {\@dc@BareSpace@true}
+ %
+ %
+ \gmu@EatCases
+ {\IgnInfo{gmcommand}{while parsing arg specifiers}{#1}}%
+ \gmu@ESAC
+ %
+ }% of for each
+ \@dc@ParseSpecifier %
+}% of |\grab@prefix|
+
+\long\def\dc@DefParseNext#1{%
+ % This is to allow hashes in the defaults.
+ \edefU\@dc@parse@next{#1}%
+}
+
+\def\@dc@Alias
+#1% |\lowercase| or |\firstofone|
+#2% left side of the assignment
+#3% right side of the assignment
+#4% |Lower| or empty
+{%
+ \gmu@if {csname}%
+ {ArgumentCatcher@\strip@bslash #3\endcsname}%
+ {#1{%
+ \@xa\let\csname\strip@bslash\ArgumentCatcher@
+ \strip@bslash #2\@xa\endcsname}%
+ \csname ArgumentCatcher@\strip@bslash #3\endcsname
+ }{\PackageError{gmutils/gmcommand}{%
+ You're trying to #4Alias the »\unexpanded{#3}« catcher^^J%
+ but it is not defined!}{}%
+ }%
+}
+
+\def\@dc@LowerAliases #1{%
+ % To provide lowercase aliases of the catchers:
+ \@dc@Alias \lowercase {#1}{#1}{Lower}%
+ \@dc@Alias \lowercase {\P#1}{\P#1}{Lower}% we provide »P« as a \CS
+ % to avoid lowercase'ing it.
+}
+
+\def\@dc@AliasCatcher
+#1% left side of the assignment
+#2% right side of the assignment
+{%
+ \@dc@Alias \firstofone {#1}{#2}{}%
+}
+
+\def\@dc@AliasPLower
+#1% specifier to alias
+{\@dc@AliasCatcher {P#1}{#1}%
+ \@dc@LowerAliases{#1}%
+}
+
+\long\def\ArgumentCatcher@B
+#1% default value
+#2% tail of args catchers.
+\@dc@arguments % delimiter
+{%
+ \@ifnextcat\bgroup
+ {\dc@DefParseNext{#2}\ArgumentCatcher@m@i }%
+ {\@dc@addargum {{#1}}#2\@dc@arguments }%
+}
+
+\long\def\ArgumentCatcher@PB
+#1% default value
+#2% tail of args catchers.
+\@dc@arguments % delimiter
+{\@ifnextcat\bgroup
+ {\dc@DefParseNext{#2}\ArgumentCatcher@Pm@i }%
+ {\@dc@addargum {{#1}}#2\@dc@arguments }%
+}
+
+\@dc@LowerAliases B
+
+\long\def\ArgumentCatcher@T@ % parsing of a~single \textbf Token
+ % continued:
+#1% kind of test (|strings| or |StrX| so far (2010/12/28, 7.24))
+#2% the list to search |#4| on,
+#3% the default value,
+#4% the tail of args parsers,
+#5% the token we search in |#1| (it's an unbraced
+{%
+ #1 #5{#2}%
+ {\@dc@addargum {{#5}}#4\@dc@arguments}%
+ {\@dc@addargum {{#3}}#4\@dc@arguments#5}%
+}
+
+\long\def\ArgumentCatcher@T % parsing of a~ single \textbf Token. It's
+#1% the list we search optional token on,
+#2% the default value,
+#3% the tail of args parser.
+\@dc@arguments{%
+ \@ifnextnotgroup
+ % \label{dc@S:bgroup}
+ {\ArgumentCatcher@T@ \gmu@ifStrXany {#1}{#2}{#3}}%
+ {\@dc@addargum {{#2}}#3\@dc@arguments}% if we parse an
+ % opening or closing brace, then we are sure it's not any expected
+ % Single.
+}
+
+\@dc@AliasPLower T
+
+\long\def\ArgumentCatcher@Ť #1#2#3% as in |›…@T|
+{% one-token catcher that respects space.
+ \ArgumentCatcher@Loop
+ {StrX}{\any}{#1}{\any}{}{1}{#2}{% empty eacher
+ }{#3}%
+}
+
+\@dc@AliasPLower Ť
+
+
+\edef\ArgumentCatcher@S
+#1% default value
+{%
+ \@nx\ArgumentCatcher@T {\@xa\@nx\all@stars}{#1}}% the |s| arg spec is
+
+\@dc@AliasPLower S
+\@dc@AliasCatcher * S
+
+\newif\if@debugacro@
+
+\long\def\ArgumentCatcher@Loop %^^A >>>>>>>loop
+#1% kind of test (|StrX| or |str| or anything else for what
+#2% “sign” of match for iteration: |\any| or |\none|
+#3% list of tokens |\@let@token| will be matched against with |#1|
+#4% test for “drainers” (allowed values as for |#1|)
+#5% list of “drainers”: if |\@let@token| satisfies the |#3| test,
+#6% upper bound of number of items (may be empty or negative to turn
+#7% default value (if empty sequence is parsed), |\NoValue| by default.
+#8% an “eacher”—stuff to be put before each token/text added to the
+#9% the tail of args parser
+\@dc@arguments % delimiter
+{%
+ \dc@DefParseNext{#9}%
+ \emptify\@dc@seQuence
+ \c@dc@Loop@bound=\numexpr(\gmu@ifempty{#6}{-1}{#6})*1\relax
+ \gmu@if {num}{\c@dc@Loop@bound<\z@}%
+ {\c@dc@Loop@bound=-\c@dc@Loop@bound
+ \let\@dc@Loop@countby\z@
+ }%
+ {\let\@dc@Loop@countby\m@ne}%
+ %
+ \gmu@ifempty{#3}%
+ {\gmu@if {strings}{\none #2}%
+ {\@dc@Loop@iteralltrue}% it's an additional switch for better
+ % performance in a special case: when we wish
+ % only count the items and iterate over anything
+ {%
+ \Store@Macro\ArgumentCatcher@Loop@defcheck
+ \def\ArgumentCatcher@Loop@defcheck{%
+ \Restore@Macro\ArgumentCatcher@Loop@defcheck
+ \ArgumentCatcher@Loop@shipout}%
+ }% of if |#2| str-is |\any|
+ }% of if |#3| empty
+ {\@dc@Loop@iterallfalse}% when |#2| nonempty, we \emph{have} to
+ % perform matching. \rrthis
+ %
+ \gmu@ifempty{#5}%
+ {\gmu@if {strings} {\none #4}%
+ {\@dc@Loop@addallfalse\@dc@Loop@drainalltrue}%
+ {\@dc@Loop@addalltrue\@dc@Loop@drainallfalse}%
+ }% of if |#5| empty
+ {\@dc@Loop@addallfalse\@dc@Loop@drainallfalse}% when |#4| nonempty,
+ % we \emph{have} to perform matching. \rrthis
+ %
+ \edef\ArgumentCatcher@Loop@afterpeep{%
+ \gmu@if {@dc@Loop@iterall}{}%
+ {\firstoftwo}%
+ {\unexpanded{%
+ \@dc@Loop@test
+ {#1}#2{#3}% if the next token StrX-is/is not on |#2|,
+ % then… \label{h1.@let@token.h2}
+ }% of |\unexpanded|
+ }% of if we don't iterate over all (of preparation of iteration test)
+ {\gmu@if {@dc@Loop@addall}{}%
+ {\@nx \ArgumentCatcher@Loop@add}%
+ {\gmu@if {@dc@Loop@drainall}{}%
+ {\@nx \ArgumentCatcher@Loop@drain}%
+ {\unexpanded{%
+ \@dc@Loop@test
+ {#1}#4{#5}% if the next token satisfies |#4|-direction StrX/str
+ % match against |#5|, then we discard it,
+ % otherwise we add it.
+ \ArgumentCatcher@Loop@drain
+ \ArgumentCatcher@Loop@add
+ }% of |\unexpanded|
+ }% of not drain all
+ }% of if not add all
+ }%
+ {\gmu@if {@dc@Loop@iterall}{}%
+ {}%
+ {\@nx \ArgumentCatcher@Loop@shipout}%
+ }%
+ \unexpanded{{#7}{#8}}%
+ }% of |\ArgumentCatcher@Loop@afterpeep|
+ %
+ \ArgumentCatcher@Loop@defcheck {#7}{#8}%
+ \ArgumentCatcher@Loop@check
+}% of |\ArgumentCatcher@Loop|
+
+\newcount\c@dc@Loop@bound
+
+\newif\if@dc@Loop@iterall
+\newif\if@dc@Loop@addall
+\newif\if@dc@Loop@drainall
+
+\long\def\@dc@Loop@test
+#1% kind of test (|StrX| or |str| so far (2010/12/28, 7.51))
+#2% |\any| or |\none|
+#3% list of tokens to match against
+#4% what if \OK
+#5% what if not \OK.
+{% remember we are in the argument of |\gmu@peep@next| so we are after
+ % peep.
+ \gmu@if {defined}{\@def@token}
+ {\csname gmu@if#1\strip@bslash #2\@xa\endcsname
+ \@def@token }%
+ {\csname
+ gmu@if%
+ \gmu@ifdetokens {#1}{str}%
+ {NX}%
+ {x}%
+ \strip@bslash #2%
+ \endcsname
+ \@let@token }%
+ {#3}{#4}{#5}%
+}
+
+\@dc@AliasCatcher {PLoop} {Loop}
+
+\long\def\ArgumentCatcher@Loop@defcheck
+#1% default,
+#2% “eacher”
+{%
+ \edefU\ArgumentCatcher@Loop@check{%
+ \gmu@if {num}{\c@dc@Loop@bound>\z@}
+ {\advance \c@dc@Loop@bound \@dc@Loop@countby
+ \gmu@peep@next
+ \ArgumentCatcher@Loop@afterpeep }
+ {\ArgumentCatcher@Loop@shipout {#1}{#2}}% of if num bound reached
+ }% of |\ArgumentCatcher@Loop@check|
+}% of |\ArgumentCatcher@Loop@defcheck|
+
+\lpdef\@dc@Loop@CareOfSpace
+#1% a macro with all the arguments except last
+{\gmu@ifpeeped x \gmu@letspace
+ {\edef\@dc@Loop@careofspace@aas{%
+ \unexpanded{#1{ }}%
+ }% edef unexpanded to allow |#| tokens in |#1|
+ \afterassignment\@dc@Loop@careofspace@aas
+ \let\gmu@drain= }% after |=| is a space.
+ {#1}% next not space, so just |#1| and let it process the next token
+ % its way.
+}
+
+\StoreMacro@nocat\@dc@Loop@CareOfSpace
+
+\lpdef\@dc@Loop@CareOfSpace@NoBraces
+#1% a macro with all the arguments except last
+{%
+\gmu@ifpeeped x \gmu@letspace
+ {\edef\@dc@Loop@careofspace@aas{%
+ \unexpanded{#1 }% note the space
+ }% edef unexpanded to allow |#| tokens in |#1|
+ \afterassignment\@dc@Loop@careofspace@aas
+ \let\gmu@drain= }% after |=| is a space.
+ {#1}% next not space, so just |#1| and let it process the next token
+ % its way.
+}
+
+
+\lpdef\@dc@Loop@CareOfSpaceAndGroup
+#1% as in the previous macro
+{\@iwruif {Care of both: @let@token: »\meaning\@let@token«}%
+ \@dc@Loop@CareOfSpace{%
+ \gmu@passbraced{#1}%
+ }%
+}% of “take care of both”
+
+\long\def\ArgumentCatcher@Loop@add
+#1% default
+#2% eacher
+{\@dc@Loop@CareOfSpaceAndGroup
+ {\ArgumentCatcher@Loop@add@{#2}}%
+}
+
+\long\def\ArgumentCatcher@Loop@add@
+#1% eacher
+#2% token/text to be added
+{\addtomacro\@dc@seQuence{#1#2}%
+ \@iwruif {@@@@@@ Q-add: »\the\@dc@arguments«}%
+ \ArgumentCatcher@Loop@check
+}% of |\ArgumentCatcher@Loop@add@|
+
+\long\def\ArgumentCatcher@Loop@drain
+#1% default
+#2% eacher
+{%
+ \@iwruif{@@@@@@ Q-drain: »\the\@dc@arguments«}%
+ \@dc@Loop@CareOfSpaceAndGroup
+ {\@xa\ArgumentCatcher@Loop@check\@gobble}%
+}
+
+\long\def\ArgumentCatcher@Loop@shipout
+#1% default
+#2% eacher
+{%
+ \gmu@if x{\@dc@seQuence\@empty}%
+ {\def\@dc@seQuence{#1}%
+ \gmu@if x{\@dc@seQuence\@empty}%
+ {}{\prependtomacro\@dc@seQuence{#2}}%
+ }%
+ {}% if |\@dc@seQuence| is nonempty, we don't modify it.
+ \@xa\@dc@addargum\@xa{\@xa{\@dc@seQuence}}%
+ \@iwruif {@@@@@@ Q-finish: »\the\@dc@arguments«}%
+ \@dc@parse@next\@dc@arguments
+}% of |\ArgumentCatcher@Loop@shipout|
+
+\long\def\ArgumentCatcher@Q
+#1% list
+#2% default (|\NoValue| by default, as in previous versions).
+{%
+ \ArgumentCatcher@Loop
+ {StrX}%
+ \any
+ { #1}% note the space before |#1|—settheory sum of |#1| and drainers.
+ \any
+ { }% we ignore spaces—it's a legacy setting, maybe we'll optionise
+ % it in the future
+ \m@ne % we allow any number of tokens
+ {#2}% default, by default |\NoValue|, as defined in line \ref{Q-arg deft.}
+ {}% empty eacher
+}%
+
+\@dc@AliasPLower Q
+
+\@ifXeTeX {%
+ \long\def\ArgumentCatcher@Ô
+ #1% list
+ #2% default (|\NoValue| by default, as in previous versions).
+ {%
+ \@dc@BareSpaceArg
+ \ArgumentCatcher@Loop
+ {str}%
+ \any
+ { #1}% note the space before |#1|—settheory sum of |#1| and drainers.
+ \any
+ { }% we ignore spaces—it's a legacy setting, maybe we'll optionise
+ % it in the future
+ \m@ne % we allow any number of tokens
+ {#2}% default, by default |\NoValue|, as defined in line \ref{Q-arg deft.}
+ {}% empty eacher
+ }%
+
+ \@dc@AliasPLower Ô
+
+}{}% of if \XeTeX
+
+\def\ArgumentCatcher@D{% decimal argument (useful for dates e.g.)
+ \ArgumentCatcher@Q
+ {-+0123456789}%
+ % the default value will be delivered by the defaults' catcher
+}
+
+\@dc@AliasPLower D
+
+\@ifXeTeX
+{%
+ \def\ArgumentCatcher@Ď
+ #1% default value, 0 by default
+ {% decimal argument
+ \ArgumentCatcher@Loop
+ {StrX}%
+ \any
+ {-+0123456789}%
+ \any
+ {}%
+ \m@ne
+ {#1}%
+ {}%
+ }%
+
+\@dc@AliasPLower Ď
+
+}{}% of if \XeTeX
+
+\def\ArgumentCatcher@U {%
+ \ArgumentCatcher@Loop {StrX}%
+}
+
+\@dc@AliasPLower U
+
+\@dc@AliasCatcher W {U}
+
+\@dc@AliasPLower W
+
+\@dc@AliasCatcher {lostwax} U % ^^A Catcher@lostwax
+
+\long\def\ArgumentCatcher@item
+#1% “sign” of matching
+#2% list to match against
+#3% default value
+#4% eacher (which in this case will be applied to \emph{the} (one)
+{%
+ \ArgumentCatcher@Loop
+ {StrX}%
+ #1%
+ {#2}%
+ \none {}% we add all that matches
+ 1 % at most one item
+ {#3}%
+ {#4}%
+}
+
+\if@XeTeX
+
+ \def\ArgumentCatcher@Ǔ{%
+ \@dc@BareSpaceArg
+ \ArgumentCatcher@Loop {StrX}%
+ }
+
+ \@dc@AliasPLower Ǔ
+
+\fi
+
+
+\long\def\ArgumentCatcher@genM
+#1% the letter »P« (for long catcher) or nothing (for the short version)
+#2% number of undelimited parametrs to catch (arabic)
+#3% tail of parsers
+\@dc@arguments{%
+ \dc@DefParseNext{#3}%
+ \csname ArgumentCatcher@#1m@%
+ \romannumeral#2%
+ \endcsname
+}
+
+
+\def\ArgumentCatcher@M{\ArgumentCatcher@genM {}}
+\def\ArgumentCatcher@PM{\ArgumentCatcher@genM P}
+
+\@dc@AliasCatcher {m} {M}
+\@dc@AliasCatcher {Pm} {PM}
+
+\@dc@AliasCatcher {ms} {M}
+\@dc@AliasCatcher {Pms} {PM}
+
+\@tempcnta=\@ne
+\@whilenum\@tempcnta<9\do{%
+ %
+ \edef\gmu@tempa{%
+ %
+ % The short catchers of mandatories:
+ \def\@xanxcs{%
+ ArgumentCatcher@m@\romannumeral\@tempcnta}%
+ \gmu@hashes1{\numexpr\@tempcnta+1}%
+ {\@nx\@dc@addargum{%
+ \gmu@hashesbraced 1{\numexpr\@tempcnta+1}}%
+ \@nx\@dc@parse@next\@nx\@dc@arguments
+ }% of \incs{ArgumentCatcher@m@\<rom.num>}.
+ %
+ % And the long ones:
+ \long \def\@xanxcs{%
+ ArgumentCatcher@Pm@\romannumeral\@tempcnta}%
+ \gmu@hashes1{\numexpr\@tempcnta+1}%
+ {\@nx\@dc@addargum{%
+ \gmu@hashesbraced 1{\numexpr\@tempcnta+1}}%
+ \@nx\@dc@parse@next\@nx\@dc@arguments
+ }% of \incs{ArgumentCatcher@Pm@\<rom.num>}.
+ %
+ }% of |\edef|.
+ \gmu@tempa
+ \advance\@tempcnta1\relax
+}% of the loop.
+
+\if 1 1
+\@tempcnta\@ne
+\@whilenum\@tempcnta<9\do{%
+ \typeout{\bslash ArgumentCatcher@m@\romannumeral\@tempcnta: ^^J%
+ \Name\meaning{ArgumentCatcher@m@\romannumeral\@tempcnta}^^J}%
+ \typeout{\bslash ArgumentCatcher@Pm@\romannumeral\@tempcnta : ^^J%
+ \Name\meaning
+ {ArgumentCatcher@Pm@\romannumeral\@tempcnta}^^J^^J^^J%
+ }%
+ \advance\@tempcnta\@ne
+}
+
+\fi
+
+\def\ArgumentCatcher@m@ix
+#1#2#3#4#5#6#7#8#9{%
+ \@dc@addargum{%
+ {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}%
+ \the \@dc@arguments
+}
+
+\long\def\ArgumentCatcher@Pm@ix
+#1#2#3#4#5#6#7#8#9{%
+ \@dc@addargum{%
+ {#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}{#9}}%
+ \the \@dc@arguments
+}
+
+\long\def\ArgumentCatcher@K % a~Knuthian delimited or undelimited
+#1% the particular Knuthian macro
+#2% the tail of args parser.
+\@dc@arguments % tail delimiter
+{\dc@DefParseNext{#2}#1}
+
+\@dc@AliasPLower K
+
+\long\def\gmu@twostring#1#2{\string#1\string#2}
+
+\long\def\ArgumentCatcher@G@longorshort
+#1% longness prefix (|\long| or nothing)
+#2% left and right delimiters
+#3% default value
+#4% the tail of args parser.
+\@dc@arguments % tail delimiter
+{%
+ \edef\@dc@Gname{ArgumentCatcher@G\gmu@twostring#2}%
+ \gmu@if {csname}{\@dc@Gname \endcsname}%
+ {}%
+ {#1\Name\def{\@dc@Gname \@xa}%
+ \@dc@Gparams#2{\@dc@addargum{{##2}}##1\@dc@arguments}%
+ }%
+ \@xa\@ifEUnextchar\@firstoftwo#2%
+ {\def\dc@parse@next{#4}% we hide possible |\par|s.
+ \csname \@dc@Gname \endcsname\dc@parse@next}%
+ {\@dc@addargum{{#3}}#4\@dc@arguments}%
+}
+
+\long\def\@dc@Gparams#1#2{##1#1##2#2}
+
+\lpdef\ArgumentCatcher@G % short general catcher
+#1% left and right delimiters
+#2% default value
+{\ArgumentCatcher@G@longorshort{}{#1}{#2}}
+
+\lpdef\ArgumentCatcher@PG % long general catcher
+#1% left and right delimiter
+#2% default value
+{\ArgumentCatcher@G@longorshort{\long}{#1}{#2}}
+
+\def\@dc@DefAsGeneral
+#1% specifier
+#2% delimiters
+{\Name\lpdef{ArgumentCatcher@\strip@bslash{#1}}%
+ ##1% default value
+ {\ArgumentCatcher@G{#2}{##1}}%
+ \Name\lpdef{ArgumentCatcher@P\strip@bslash{#1}}%
+ ##1% default value
+ {\ArgumentCatcher@PG{#2}{##1}}% »P« was missing. Fixed 2011/03/22, 16.14.
+ %
+ \gmu@if {cat}{a\@nx#1}%
+ {\@dc@LowerAliases #1}{}%
+}
+
+\@dc@DefAsGeneral A{<>}
+
+\@dc@DefAsGeneral O{[]}
+
+
+\def\DCnocoordinate{\@dc@DefAsGeneral C{()}}
+\DCnocoordinate
+
+\edefU\DCcoordinate{%
+ %
+ \long\def\ArgumentCatcher@C
+ #1% default value
+ #2% tail of parsers
+ \@dc@arguments % tail's delimiter
+ {%
+ \@ifEUnextchar(%^^A)
+ {\dc@DefParseNext{#2}\ArgumentCatcher@c@}%
+ {\@dc@addargum{{#1}}#2\@dc@arguments}%
+ }%
+ %
+ \let\ArgumentCatcher@c\ArgumentCatcher@C
+ \let\ArgumentCatcher@Pc\ArgumentCatcher@PC
+ %
+ \long\def\ArgumentCatcher@PC#1#2\@dc@arguments{%
+ \@ifEUnextchar(%^^A)
+ {\dc@DefParseNext{#2}\ArgumentCatcher@Pc@}%
+ {\@dc@addargum{{#1}}#2\@dc@arguments}%
+ }%
+ %
+ \def\ArgumentCatcher@c@(#1){%
+ \gmu@ifxany,{#1}%
+ {\@xa\@dc@addargum\@dc@commasep#1\@dc@commasep}%
+ {\@dc@addargum{{#1}}}\@dc@parse@next\@dc@arguments
+ }%
+ % \stanza
+ \def\@dc@commasep#1,#2\@dc@commasep{{{{#1}{#2}}}}%
+ % \stanza
+ \long\def\ArgumentCatcher@Pc@(#1){%
+ \gmu@ifxany,{#1}%
+ {\@xa\@dc@addargum\@dc@commasep#1\@dc@commasep}%
+ {\@dc@addargum{{#1}}}\@dc@parse@next\@dc@arguments
+ }%
+}
+
+
+\def\@dc@Scope@shipout#1{%
+ \ifx\@dc@seQuence\@empty\def\@dc@seQuence{#1}\fi
+ \@xa \gmu@ifxany\@xa \global\@xa{\@dc@seQuence}%
+ {\@dc@addargum{{\global}}}%
+ {\@dc@addargum{{\relax}}}%
+ \@dc@parse@next\@dc@arguments
+}
+
+\def\ArgumentCatcher@Scope
+#1% the separator(s)
+{\let\@dc@seQuence@shipout@@\@dc@seQuence@shipout
+ \let\@dc@seQuence@shipout\@dc@Scope@shipout
+ \ArgumentCatcher@Q{\global\relax}{\relax}%
+ \let\@dc@seQuence@shipout\@dc@seQuence@shipout@@
+ \@dc@ignorearg
+ \ArgumentCatcher@T{#1}{\NoValue}%
+}
+
+\@dc@AliasCatcher {PScope} \Scope
+
+
+\long\def\gmuIfNoValueTF#1{% % \chgs{2008/12/1 v0.98 the \pk{xparse} tests for
+ % the presence of value redefined and much simplified (43 \CS'es
+ % less). Moreover, they are now fully expandable: \cmd\gmuIfNoValueTF,
+ % \cmd\gmuIfNoValueT, \cmd\gmuIfNoValueF, \cmd\gmuIfValueTF, \cmd\gmuIfValueT,
+ % \cmd\gmuIfValueF}
+ %
+ % \chgs{2010/05/27 v0.993 bug fix: order of \cmd\NoValue and
+ % \cs{@firstofmany} reversed after a catastrophal |{11}{11}| argument}
+ \@xa\ifx\@xa\NoValue\@firstofmany#1\@empty\@nil \afterfi\@firstoftwo
+ \else\afterfi\@secondoftwo
+ \fi}
+
+\long\def\gmuIfNoValueT#1#2{\gmuIfNoValueTF{#1}{#2}\@empty}
+
+\long\def\gmuIfNoValueF#1#2{\gmuIfNoValueTF{#1}\@empty{#2}}
+
+\long\def\gmuIfValueTF#1#2#3{\gmuIfNoValueTF{#1}{#3}{#2}}
+
+\long\def\gmuPutIfValue#1{\gmuIfValueT{#1}{#1}}
+
+\let\gmuIfValueT\gmuIfNoValueF
+
+\let\gmuIfValueF\gmuIfNoValueT
+
+\long\pdef\IfLong#1{%\
+ % \begin{enumargs}
+ % \item the argument to check for |\par|,
+ % \item what if |\par| found,
+ % \item what if |\par| not found.
+ % \end{enumargs}
+ %
+ \edef\gmu@IfLong@resa{\detokenize{#1}}%
+ \edef\gmu@IfLong@resa{%
+ \IfAmong\string\par\@nx\among{\gmu@IfLong@resa}}%
+ \gmu@IfLong@resa}
+
+
+\long\@namedef{ArgumentCatcher@=}%
+#1% register used in the assignment
+#2% the tail of args parser.
+\@dc@arguments{%
+ \dc@DefParseNext{%
+ \@dc@addargum\NoValue % to make ignoring mechanism work
+ #2\@dc@arguments}%
+ \afterassignment\@dc@parse@next
+ #1}% optional space and |=| is left at user's discretion. In fact,
+
+\n@melet{ArgumentCatcher@P=}{ArgumentCatcher@=}
+
+
+\long\def\ArgumentCatcher@gobblespace
+{\ArgumentCatcher@T {\dc@gobblespace@dummy}{\NoValue}}
+
+\let\ArgumentCatcher@Pgobblespace\ArgumentCatcher@gobblespace
+
+\def\dc@gobblespace@dummy{\dc@gobblespace@dummy}
+
+\let\gobblespace\dc@gobblespace@dummy
+
+
+\errorcontextlines=100
+
+\long\def\@dc@InnerName#1{%
+ \bslash@or@ac{#1}%
+ \bslash
+}%
+
+\long\def\@dc@InnerEndName #1{% version for the end-macros of environments
+ \bslash end\strip@bslash{#1}%
+}%
+
+%% \CH{2010/07/26 v0.993 This strikingly simple idea of storing the
+%% specifiers' sequence in a macro came to my head only after some
+%% three years of developing \cmd\DeclareCommand}
+\long\edef\@dc@SpecsArName#1{%
+ Specs \string& arity of
+ \@nx\bslash@or@ac{#1}%
+}%
+
+\pdef\@dc@messages {%
+ \gmu@notif {@dc@quiet@}{}%
+ {%
+ \gmu@if {DCMessages}{}%
+ {\PackageInfo{gmcommand}{^^J%
+ Parsing arguments for \dc@innername^^J%
+ [specified as:
+ \unexpanded
+ \@xa\@xa\@xa \@xa\@xa\@xa \@xa{%
+ \@xa\@xa\@xa\@secondofmany
+ %
+ % not |\@secondofthree| because first use of this definition is for
+ % |\DeclareCommand| not having its specifiers' carrier.
+ %
+ \csname \@dc@specsname\endcsname {}{}\@nil }%
+ \space ]^^J%
+ [in file: \@currname.\@currext\space ]}% of info message
+ }% of if \ac DC messages
+ {}% of if not |DCMessages|
+ }% of if not |@dc@quiet@|
+ {}% of if not not |@dc@quiet@|
+}% of |\@dc@messages|
+
+
+\edefU\@dc@DCbody {%
+{% \label{DC:final} %
+ % \chgs{2008/12/05 v0.98 added the \cs{@bsphack}---\cs{@esphack} option}
+ % \chgs{2008/12/07 v0.98 added the \env{Q\arg{tokens}} argument type
+ % (a~word over the alphabet \<tokens>)}
+ \edef\dc@innername {\@dc@InnerName #1}% we'll use it in |K|-type arg.\ catcher and
+ \edef\@dc@specsname {\@dc@SpecsArName{#1}}%
+ \gmu@ifCSdefined {#1}%
+ {\gmu@if{DCMessages}{}%
+ {\PackageWarning{gmcommand}{%
+ ^^J%
+ Redefining command \dc@innername\space
+ with \string\DeclareCommand}%
+ }%
+ {}%
+ }%
+ {\gmu@if {DCMessages}{}%
+ {\PackageInfo{gmcommand}{^^J%
+ \string\DeclareCommand-ing \dc@innername\space (new)^^J}%
+ }%
+ {}%
+ }%
+ \@dc@alllong@false
+ \@dc@quiet@false
+ %
+ \emptify\@dc@Specs@tempa
+ %
+ \gmu@ifsbintersect{#2}{\long!lL}{%
+ \addtomacro\@dc@Specs@tempa{\long}%
+ \@dc@alllong@true}%
+ {}%
+ %
+ \gmu@ifsbintersect{#2}{.qQ\quiet}{%
+ \addtomacro\@dc@Specs@tempa{\quiet}%
+ \@dc@quiet@true}%
+ {}%
+ %
+ \gmu@ifsbintersect{#2}{iIwW\sphack}%
+ {% if `invisibility' is specified: \UnDef
+ \addtomacro\@dc@Specs@tempa{\sphack}%
+ \def\@dc@bsphack@{\@nx\@bsphack}% \UnDef
+ \def\@dc@esphack@{\@nx\@esphack}%
+ }%
+ {\emptify\@dc@bsphack@
+ \emptify\@dc@esphack@}% if `invisibility' is not specified.
+ %
+ \gmu@ifsbany\envhack{#2}%
+ {% but if we define an environment:
+ \addtomacro\@dc@Specs@tempa{\envhack}%
+ \emptify\@dc@bsphack@
+ \emptify\@dc@esphack@
+ \edef\@dc@setThrowArgs{%
+ \dc@ThrowArgs{\string#1}}% if our command is used
+ }%
+ {% and if we don't define an environment:
+ \emptify\@dc@setThrowArgs
+ }%
+ %
+ \relaxen\@dc@global@
+ \relaxen\@dc@outer@
+ %
+ \gmu@ifsbany\outer{#2}%
+ {\addtomacro\@dc@Specs@tempa{\outer}%
+ \let\@dc@outer@\outer}%
+ {}%
+ %
+ \gmu@ifsbany\global{#2}{%
+ \addtomacro\@dc@Specs@tempa {\IAmDeclaredGlobally}%
+ \let\@dc@global@\global}%
+ {}%
+ %
+ \@xa\Name \@xa\edefU
+ \@xa\@dc@specsname
+ \@xa{\@xa{\@dc@Specs@tempa}}%
+ \@dc@ResetParseAuxilia
+ %
+ \@dc@ParseNextSpecifier #3%
+ \@dc@buckstopshere % it's the sentinel of parsing. Since the test
+ %
+ \@xa \Name \@xa \addtomacro \@xa \@dc@specsname
+ \@xa {\@xa{\the\@dc@ParsedSpecs}}%
+ %
+ \@xa\Name\@xa\addtomacro\@xa\@dc@specsname
+ \@xa{\@xa{\the \c@dc@argnum}}%
+ %
+ \@dc@outer@\@dc@global@ % possibly the prefixes,
+%%%%%
+%%%%%% Here comes the definition of the coating macro, named the
+%%%%%% same as the command:
+ \protected\edef#1{% always |\protected| \balsmiley( ;-)
+ \@dc@bsphack@ % perhaps |\@bsphack|
+ %
+ \@dc@messages
+ %
+ \@nx\@dc@{\the\toks@}% in the braces appear the argument catchers.
+ \@xanxcs{\dc@innername}%
+ \ifx\@dc@outer@\outer
+ \@xanxcs{\@xa\gobble\string#1 }% note the blank
+ \else \@nx #1%
+ \fi
+ }% of main coating macro's |\edef|. \UnDef
+ %
+ \edef\gmu@DeclareCommand@resa{%
+ \@dc@global@ % perhaps |\global|
+ \long\def\@xanxcs{\@dc@InnerName{#1}}% for a~command
+ \@xau\@dc@innerhashes % it's |#1#2#3…|
+ {% the body of the inner ‘|\\⁄<name>\|’ macro:
+ \@dc@setThrowArgs
+ \unexpanded{#4}%
+ \@dc@esphack@}%
+ }% of |\edef|.
+ \gmu@DeclareCommand@resa
+}% of |\DeclareCommand|'s body.
+}
+
+\def\@dc@DCprefixQlist{\global\protected\outer\long
+ \relax % for the somewhat perverse case when |\@dc@global| may be
+ !lL.qQiIwW\sphack\envhack}
+
+\long\def\ShowCommand #1{%
+ \@iwruJ
+ \@iwru{»\string#1« is »\meaning#1«}%
+ \@iwruJ
+ \@iwru{»\Name\string{\@dc@InnerName{#1}}« is
+ »\Name\meaning{\@dc@InnerName{#1}}«}%
+ \@iwruJ
+ \@iwru{»\Name\string{\@dc@SpecsArName{#1}}« is
+ »\Name\meaning{\@dc@SpecsArName{#1}}«}%
+ \@iwruJ
+ \show\show
+}
+
+\@XA{\DeclareCommand\DeclareCommand % This is the final version by now.\
+{
+ #1 >Pm % command to be defined (may be even \incs{par} if you
+ #2 >\@xa Q{\@dc@DCprefixQlist}{} %\
+ #3 >Pm % arguments specification (may contain \incmd\par),
+ #4 >Pm % the definition body; may contain nearly anything including
+}}\@dc@DCbody
+
+
+\@XA{\DeclareCommand \DeclareCommand \long
+ {m >\@xa Q{\@dc@DCprefixQlist}{} mm}}%
+\@dc@DCbody
+
+
+\long\def\dc@EAName#1{% Env.\ arguments' toks' name
+ \if\bslash#1\else#1\fi's_args}
+
+\pdef\dc@ThrowArgs#1{%
+ \gmu@if{csname}{\dc@EAName{#1}\endcsname}
+ {}% if it's defined, we do nothing (we assume it's defined by us and
+ % is toks register.)
+ {% else we define it as a new toks
+ % \label{'s args}
+ \@xa\newtoks\csname\dc@EAName{#1}\endcsname
+ }%
+ \csname\dc@EAName{#1}\endcsname=%
+ \@xa\@xa\@xa{\@xa\@gobble\the\@dc@arguments}%
+}%
+
+
+\def\@dc@K@defaultrepl{##1}
+
+\DeclareCommand\@dc@define@K \long {mb}{% \label{K@parse}
+ % First we add the particular \CS to the toks register:\nostanza
+ \edef\gmu@tempa{%
+ \unexpanded{\toks@\@xa}%
+ {\@nx\the\toks@{%
+ \@xanxcs{\dc@innername @K\the\c@dc@catchernum}%
+ }%
+ }%
+ % here we add to the parsers toks list a \CS\ named
+ % |\⁄<our command>@K⁄<num. of catcher>| (the particular Knuthian catcher)
+ }\gmu@tempa
+ % and define this macro: \nostanza
+ \edef\gmu@tempa{%
+ % And now we define that particular Knuthian catcher.
+ \def\@xanxcs{\dc@innername @K\the\c@dc@catchernum}%
+ \gmu@if {@dc@xadefault@i@}{}%
+ {\@xau{#1}}%
+ {\unexpanded{#1}}%
+ {%
+ \@nx\@dc@addargum{{%
+ \gmuIfValueTF{#2}{%
+ \gmu@if{@dc@xadefault@ii@}{}%
+ {\@xau{#2}}%
+ {\unexpanded{#2}}%
+ }{\@xau{\@dc@K@defaultrepl}}%
+ }}% we add the Knuthian
+ % replacement to the toks register as \inhash n.
+ \@nx \@dc@parse@next \@dc@arguments
+ }% and continue parsing.
+ }% of |\edef|. Now we execute this temporary macro, which means we \incmd\def|\⁄<command>@K⁄<n>|
+ \@dc@global@ % set properly before |\@dc@ParseNextSpecifier #3⁄<buck>|.
+ \if P\@dc@long@letter\relax\long\fi
+ \gmu@tempa
+ %
+ \@dc@addtospecs {#1}%
+ %
+ \gmuIfValueTF{#2}{%
+ \gmu@if{@dc@xadefault@ii@}{}%
+ {\@xa\@dc@addtospecs\@xa{#2}}%
+ {\@dc@addtospecs{#2}}%
+ }
+ {\@xa\@dc@addtospecs\@xa{\@dc@K@defaultrepl}}%
+ %
+ % Now we clean up and continue construction of arguments parser. \nostanza
+ \@dc@ParseNextSpecifier
+}% of |\@dc@define@K|
+
+\DeclareCommand\@dc@grab@Loop \long {%
+ #1 T{\any \none Uu\U \u Ǔǔ\Ǔ \ǔ Ww\W \w \lostwax} % the “sign” of matching for adding; use of
+ % the letters suppresses adding them to the
+ % parsed specifiers' list, which is crucial for
+ % |\SameAs| copying of specifiers: the “until” and “while” loops
+ % don't shift their arguments.
+ %
+ #2 >Pm % list of tokens to match for/against iteration
+ %
+ >i T{\drain \drop \Drain \Drop \lost \Lost}
+ #3 T{\any \none }{\any} % the “sign” of matching for draining
+ %
+ #4 b{} % list of drainers, empty by default
+ %
+ >i T{\count \ubound}
+ #5 D{\m@ne} % upper bound of iterations
+ %
+ >i T{\default \Default}
+ #6 b % default value (|\NoValue| by default)
+ %
+ #7 T{\eacher \Eacher \defEacher} % default is |\NoValue| and that's no
+ % harm since we test if |#7| == |\defEacher|.
+ #8 B{} % eacher, empty by default
+}{%
+ %
+ \@dc@process@matchsign {#1} {##1}%
+ %
+ \dc@addtoParsed@{#2}%
+ %
+ \gmu@if {strings}{\lostwax#1}%
+ {\gmu@if {@dc@xadefault}{}%
+ {\@xa\edefU\@xa\@dc@LostWaxList\@xa{#2}}%
+ {\edefU\@dc@LostWaxList{#2}}%
+ }%
+ {}%
+ %
+ \@dc@process@matchsign {#3} {##3}%
+ %
+ \dc@addtoParsed@{#4}%
+ %
+ \@xa \@dc@addtospecs@bare \@xa{\the\numexpr #5}%
+ \@dc@addtotoks@bare{{#5}}% to ignore possible expandafter.
+ %
+ \dc@addtoParsed@ {#6}%
+ %
+ \gmu@if {strings}{\defEacher#7}
+ {%
+ \Name\def{\dc@innername/defdEacher/\the\c@dc@argnum}%
+ ##1{#8}%
+ %
+ \Name \dc@addtoParsed@
+ {\dc@innername/defdEacher/\the\c@dc@argnum}%
+ }
+ {\gmu@if {@dc@xaeacher@}{}
+ {\@dc@xadefaulttrue}{\@dc@xadefaultfalse}%
+ \dc@addtoParsed@ {#8}%
+ }%
+ %
+ \gmu@if {strings}{\lostwax#1}
+ {\grab@LostWax}
+ {\@dc@ParseNextSpecifier}%
+}
+
+\DeclareCommand\grab@LostWax {
+ >iT{\lost \Lost}
+ #1 b{\lostwax@NoVal}
+ >iT {\count \ubound}
+ #2 D{1}
+ >iT{\endlost \EndLost}
+}{%
+ % We build an ignored “while” catcher.
+ %
+ \def\@dc@LostWaxA{>iw}%
+ %
+ \gmu@ifdetokens {\lostwax@NoVal}{#1}
+ {%
+ % if no particular value of the “lost wax” is provided, we assume
+ % the same as the “until” delimiter(s).
+ %
+ \prependtomacro\@dc@LostWaxA{>\@xa}%
+ \addtomacro\@dc@LostWaxA{\@dc@LostWaxList}%
+ }%
+ %
+ % Otherwise first we check whether “lost wax” provided has nonempty
+ % intersection with the “until” delimiters.
+ {%
+ \@xa\gmu@ifstrintersect
+ \@xa{\@dc@LostWaxList}{#1}
+ {\addtomacro\@dc@LostWaxA{{#1}}}%
+ {\PackageError{gmutils/gmcommand}{^^J%
+ You try to declare a "Lost Wax" catcher^^J%
+ with the "Lost" list disjoint with the "Until" list.^^J%
+ I assume sum of them}%
+ {}%
+ %
+ \@xa \addtomacro\@xa\@dc@LostWaxA
+ \@xa{\@xa{\@dc@LostWaxList #1}}%
+ }%
+ }%
+ %
+ \addtomacro\@dc@LostWaxA{ \count #2 \relax}%
+ %
+ \@xa\@dc@ParseNextSpecifier \@dc@LostWaxA
+}% of |\grab@LostWax|.
+
+\def\@dc@process@matchsign
+#1% the argument
+#2% its numeral in human language (for the error message)
+{%
+ \gmu@CASE {strings} {{#1}\any }
+ {\@dc@addtoParsed@bare {\any }}%
+ %
+ \gmu@CASEsbany {#1} {Ww}
+ {\@dc@addtotoks@bare {\any}}%
+ %
+ \gmu@CASE {strings} {{#1}\none}
+ {\@dc@addtoParsed@bare {\none }}%
+ %
+ \gmu@CASEsbany {#1} {UuǓǔ\lostwax }
+ {\@dc@addtotoks@bare {\none }}%
+ %
+ \gmu@lastCASE
+ {\PackageError{gmcommand}{%
+ You *have* to declare »\string\any« or »\string\none« ^^J%
+ as the #2 argument for the »\string\loop« catcher}{}%
+ }%
+ \gmu@ESAC
+}
+
+\long\pdef\UnDeclareCommand#1{%
+ \let#1\@undefined
+ \ifcsname\@dc@InnerName{#1}\endcsname
+ \n@melet{\@dc@InnerName{#1}}{@undefined}%
+ \fi
+ \ifcsname\@dc@SpecsArName{#1}\endcsname
+ \n@melet{\@dc@SpecsArName{#1}}{@undefined}%
+ \fi
+}
+
+
+\edef\gmu@tempa{%
+ \def\@nx\gmu@ifHashless@##1%
+ \detokenize{macro:}##2->##3\@nx\@nil}%
+\gmu@tempa
+{\gmu@if {}{\gmu@ifempty{#2}{1}{0}\gmu@ifempty{#3}{2}{1}}}
+
+\long\edef\gmu@ifHashlessMacro
+#1% a \CS, name or active char
+{%
+ \edef\@nx\gmu@WHL@arg{\@nx\@xanxtri{#1}}%
+ \unexpanded{\@xa\@xa\@xa\gmu@ifHashless@
+ \@xa\meaning\gmu@WHL@arg}%
+ \relax % to ensure that |#3| of |\gmu@ifHashless@| is nonempty
+ % if match for the delimiters is found earlier
+ \detokenize{macro:***->}\@nx\@nil % the sentinels
+}
+
+\long\def\gmu@ifDeclared#1{%
+ % \begin{enumargs}
+ % \item a \CS or csname or an active char,
+ % \item true branch,
+ % \item false branch %
+ % \end{enumargs}
+ \let\gmu@ifDe@next\@secondoftwo
+ %
+ %
+ \gmu@CASEnot {csname} {\@dc@SpecsArName{#1}\endcsname}%
+ {}%
+ %
+ \gmu@CASEnot {csname}{\@dc@InnerName{#1}\endcsname}%
+ {}%
+ %
+ \gmu@EatCases
+ {\gmu@ifHashlessMacro{#1}%
+ {\edef\gmu@ifDe@resa{%
+ \@nx\gmu@ifxany\@xanxcs{\@dc@InnerName{#1}}%
+ {\unexpanded\@xa\@xa\@xa{\gmu@WHL@arg}}%
+ % Above: to get the contents of the outer macro we use the macro
+ % carrying conversion of possible name into a \CS and expand
+ % it twice. Then we freeze it with |\unexpanded|.
+ {\let\@nx\gmu@ifDe@next\@nx\@firstoftwo}% if the inner macro
+ % is present in the
+ % contents of |#1|, we take the first implicit argument
+ {}% otherwise we do nothing (taking the second implicit is
+ % already set)
+ }% of edef
+ \gmu@ifDe@resa
+ }% of if a hashless macro
+ {}% of if not a hasless macro
+ }%
+ %
+ \gmu@ESAC
+ \gmu@ifDe@next
+}% of |\gmu@ifDeclared|
+
+\long\def\@dc@SameAs#1{%
+ \gmu@ifDeclared {#1}%
+ {%
+ \@xa\@xa\@xa \@xa\@xa\@xa \@xa
+ \@dc@ParseNextSpecifier
+ \@xa\@xa\@xa \@secondofthree
+ \csname \@dc@SpecsArName{#1}\endcsname
+ }%
+ {%
+ \PackageError{gmcommand}{%
+ Command \@nx#1 ^^J%
+ is not declared with \DeclareCommand. ^^J%
+ I can't repeat its parameters in current command declaration}%
+ {}%
+ }%
+}% of |\@dc@SameAs|
+
+\DeclareCommand\DCUse{
+ #1 >Pm % the command
+}{% ^^A with star we automatically pass the
+ \gmu@ifDeclared{#1}%
+ {%
+ \@dc@arguments\@xa{\@xa
+ \csname \@dc@InnerName{#1}\endcsname
+ }%
+ %
+ \csname ArgumentCatcher@Pm@\romannumeral
+ \@xa \@xa \@xa \@thirdofthree
+ \csname \@dc@SpecsArName{#1}\endcsname % of arity carrier
+ \endcsname % of the catcher
+ }%
+ {\DC@EndNotDeclaredErr{#1}}%
+}%
+
+\pdef \DC@EndNotDeclaredErr #1{%
+ \PackageError{gmcommand}{%
+ Command \bslash end\strip@bslash{#1} ^^J%
+ is not declared with \DeclareCommand. ^^J%
+ Therefore I can't use its DC-inner macro (because of its nonexistence).^^J}%
+ {}%
+}
+
+\DeclareCommand\DCUseEnd{
+ #1 >Pm % the command (without “end”)
+}{%
+ \gmu@ifDeclared{end\strip@bslash{#1}}%
+ {%
+ \@dc@arguments\@xa{\@xa
+ \csname \@dc@InnerEndName{#1}\endcsname
+ }%
+ %
+ \csname ArgumentCatcher@Pm@\romannumeral
+ \@xa \@xa \@xa \@thirdofthree
+ \csname \@dc@SpecsArName{#1}\endcsname % of arity carrier
+ \endcsname % of the catcher
+ }%
+ {\DC@EndNotDeclaredErr{#1}}%
+}%
+
+
+\DeclareCommand\DeclareEnvironment \long
+{
+ #1--#4 \SameAs \DeclareCommand
+ % We repeat the specifiers, but the role of |#4| is slightly
+ % different here: here it's the |\begin| part definition.
+ %
+ #5 m % the end definition; it \emph{can} contain any
+ % \inverb|#|\<n>---the arguments of the environment are passed
+ % to it, too.
+}{%
+ \def\gmu@DeclareEnvironment@resa{\envhack}% we add the information we define an
+ % environment.
+ \gmuIfValueT{#2}%
+ {\addtomacro\gmu@DeclareEnvironment@resa{#2}}% we pass all the ‘prefixes’ to
+ % \incs{Decl\+are\+Comm\+and}
+ % \stanza
+ \@xa\DeclareCommand\csname#1\@xa\endcsname
+ \gmu@DeclareEnvironment@resa{#3}{#4}%
+ %
+ %\nostanza Now the begin definition is done. Let's get down to the
+ %end definition. \nostanza
+ %
+ \let\@dc@env@endglobal=\@dc@global@ % note this \CS was for sure redefined by the last
+ % \incs{Decl\+are\+Com\+m\+and} (and by nothing else) and that's
+ % exactly what we want.
+ \edef\gmu@DeclareEnvironment@resb{%
+ \@nx\@xa
+ \@xanxcs{\bslash end#1}%
+ \@nx\the
+ \@xanxcs{\dc@EAName{#1}}%
+ }% of |\edef|. It reuslts in
+ % \[|\@xa \\end⁄<name> \the\\⁄<name>'s_args|\]
+ % which does not collide with the inner macro of the |\end›…|
+ % command, since the latter is |\\end›…\|.
+\gmu@if{csname}{\dc@EAName{#1}\endcsname}{\gmu@namelet\global{\dc@EAName{#1}}{@undefined}}{}%
+ \edef\gmu@DeclareEnvironment@resa{% \UnDef
+ \@dc@global@\long\def % the inner end macro is always \incmd\long\
+ % and perhaps defined \incmd\global ly.
+ \@xanxcs{\bslash end#1}%
+ \@xau\@dc@innerhashes % it's |#1#2#3›…|---the inner end macro takes the
+ % same number of parameters as the begin macro.
+ {% the definition body
+ \unexpanded{#5}}%
+ }% of |\edef›…@resa|.
+ \gmu@DeclareEnvironment@resa
+ \edef\gmu@DeclareEnvironment@resc{%
+ \DeclareCommand\@xanxcs{end#1}%
+ \@dc@env@endglobal
+ {}% no parameters
+ {\@xau {\gmu@DeclareEnvironment@resb
+ \@ignoretrue}%
+ }%
+ }%
+ \gmu@DeclareEnvironment@resc
+ %
+ %
+}% of |\DeclareEnvironment|
+
+\DeclareCommand\NewCommand
+{\SameAs\DeclareCommand}
+{%
+ \gmu@ifCSdefined {#1}
+ {\DCUse\DeclareCommand#1{#2}{#3}{#4}}%
+ {\PackageError{gmcommand}%
+ {Command \@nx#1 already defined \on@line!}%
+ {}%
+ }%
+}
+
+\DeclareCommand\RenewCommand
+{\SameAs\DeclareCommand}
+{%
+ \gmu@ifCSdefined {#1}
+ {\DCUse\DeclareCommand#1{#2}{#3}{#4}}%
+ {\PackageError{gmcommand}%
+ {Command \@nx#1 not yet defined \on@line!}%
+ {}%
+ }%
+}
+
+\DeclareCommand\ProvideCommand
+{\SameAs\DeclareCommand}
+{%
+ \gmu@ifCSdefined {#1}
+ {}
+ {\DCUse\DeclareCommand#1{#2}{#3}{#4}}%
+}
+
+\DeclareCommand\NewEnvironment
+{\SameAs\DeclareEnvironment}
+{%
+ \gmu@ifdefined{#1}
+ {\DCUse\DeclareEnvironment{#1}{#2}{#3}{#4}{#5}}%
+ {\PackageError{gmcommand}
+ {Environment #1 already defined \on@line!}{}%
+ }%
+}
+
+\DeclareCommand\RenewEnvironment
+{\SameAs\DeclareEnvironment}
+{%
+ \gmu@ifdefined {#1}
+ {\DCUse\DeclareEnvironment{#1}{#2}{#3}{#4}{#5}}%
+ {\PackageError{gmcommand}
+ {Environment #1 not yet defined \on@line!}{}%
+ }%
+}
+
+
+\DeclareCommand\XeTeXthree{o}{% \
+ % \changes{v0.90}{2008/8/4}{adjusted
+ % to the redefinition of
+ % \cs{verb} in \pk{xlxtra} 2008/07/29}
+ \@ifXeTeX{%
+ \gmuIfValueT{#1}{\PassOptionsToPackage{#1}{fontspec}}%
+ \@ifpackageloaded{gmverb}%
+ {%
+ \Store@Macro\verb
+ \StoreEnvironment{verbatim}%
+ \StoreEnvironment{verbatim*}%
+ }{}%
+ \RequirePackage{xltxtra}% since v 0.4 (2008/07/29) this package
+ % redefines |\verb| and \env{verbatim*},
+ % and quite elegantly provides an option
+ % to suppress the redefinitions, but
+ % unfortunately that option excludes also
+ % a~nice definition of |\xxt@visiblespace|
+ % which I~fancy.
+ \@ifpackageloaded{gmverb}%
+ {%
+ \Restore@Macro\verb
+ \RestoreEnvironment{verbatim}%
+ \RestoreEnvironment{verbatim*}%
+ }{}%
+ %
+ \AtBeginDocument{%
+ \@ifpackageloaded{gmlogos}{%
+ \Restore@Macro\LaTeX\Restore@MacroSt{LaTeX }% my version of the
+ % \LaTeX\ logo has been stored just
+ % after defining, in line \ref{SMLaTeX}. \ilrr
+ \Restore@Macro\eTeX}%
+ {}%
+ }%
+ % \stanza
+ \pdef\adddefaultfontfeatures##1{%
+ \addtomacro\zf@default@options{#1,}}
+ }% of |\@ifXeTeX|'s first argument,
+ {}% |\@ifXeTeX|'s second argument,
+}% of |\XeTeXthree|'s body.
+
+\DeclareCommand\setspaceskip{%
+ A{1}% optional factor for all three components
+ O{\fontdimen2\font}%
+ >is
+ O{\fontdimen3\font}%
+ >is
+ O{\fontdimen4\font}}
+{\spaceskip=\glueexpr\dimexpr#2*#1\relax plus\dimexpr #3*#1\relax
+ minus\dimexpr#4*#1\relax\relax}
+
+\pdef\unsetspaceskip{%
+ \spaceskip=\z@skip
+}
+
+\def\makestarlow{%
+ \begingroup\lccode`\~=`\*\lowercase{%% \Define**
+ \endgroup\def~{\gmu@lowstar}}% 2009/10/19 |\let| changed to
+ % \inverb|\def| to allow redefinitions of \incmd\gmu@lowstar.
+ \catcode`\*=\active
+ \defLowStarFake
+}
+
+\DeclareCommand\defLowStarFake{%
+ Q{+-0123456789,.}{0,5}% fraction of fontchar depth of the star glyph
+}%
+{%
+ \def\gmu@lowstarfake{%
+ \leavevmode\vbox{\hbox{*}\kern#1\fontchardp\font`*}%
+ }%
+}
+
+\def\gmu@lowstarfake{*} % useful for next command where normal star is
+
+\DeclareCommand\enoughpage{%
+ #1 D{\NoValue} % (optional short version (number of
+ % |\baselineskip|s)) Before 2010/9/10 the default
+ % value was the |D|-default, i.e., 0, which lead to
+ % improper working of this command.
+ #2 B{2\baselineskip}% (2) optional (formerly mandatory) long version of
+ % required room on a page
+ >is
+ #3 >PB{} % (3) what if the room is enough
+ >is
+ #4 >PB{\newpage} % (4) what if there's to little room on a page
+}{%
+ % \chgs{2009/03/18 v0.98 made \eTeX-ish}
+ % \chgs{2009/05/25 v0.98 made ifthenelse-like with ‘then’ and ‘else’
+ % optional default \<nothing> and \cmd\newpage resp.}
+ % \chgs{2009/10/21 v0.98 \cmd\par\ removed since to let it be used
+ % for \cmd\pagebreak\ inside a paragraph}
+ \gmu@if {num}
+ {\numexpr
+ \ifdim
+ % if the space left is less than we wish then 1, otherwise 0.
+ \gmu@pageremain
+ <%
+ \dimexpr
+ (\gmuIfValueTF{#1}{#1\baselineskip}{#2})*1%
+ \endexpr
+ %
+ % \CH{2010/06/28 v0.993 I added |(›…)*1| to assure that |\relax|
+ % really delimits the dimexpr}
+ %
+ 1\else 0%
+ \fi
+ *%
+ \ifdim \gmu@pageremain >-1sp
+ 1% if the room left on current page is nonnegative,
+ % then we indeed are on current page so “enough” and
+ % “not enough” does make sense: Enough is enough.
+ \else 0% otherwise we are on next page (or further) and assume
+ % there is enough room for our purpose.
+ \fi
+ *%
+ \ifdim \pagegoal <\maxdimen
+ 1 % if there are some boxes on current page, so checking room
+ % does make sense.
+ \else 0% otherwise (no boxes on current page) assume there's
+ % enough room
+ \fi
+ >\z@
+ }% of condition
+ {\typeout{@@@@@ not enough page \on@line}%
+ #4%
+ }%
+ {#3}%
+}
+
+\long\def\gmu@LC@LetInners
+#1% scope prefix (|\global| or |\relax|
+#2% left side
+#3% right side of the assignment
+{%
+ \edef\gmu@LC@InnerLeft{\@dc@InnerName{#2}}%
+ \edef\gmu@LC@InnerRight{\@dc@InnerName{#3}}%
+ %
+ \gmu@namelet{#1}{\gmu@LC@InnerLeft}{\gmu@LC@InnerRight}%
+ \edef\gmu@LC@InnerLeft{\@dc@SpecsArName{#2}}%
+ \edef\gmu@LC@InnerRight{\@dc@SpecsArName{#3}}%
+ %
+ \gmu@namelet{#1}{\gmu@LC@InnerLeft}{\gmu@LC@InnerRight}%
+}
+
+\long\def\gmu@CL@PrepareArg
+#1% left/right
+#2% |\@xa| or |\edef|, maybe sth.\ more in the future
+#3% a \CS, text of a name or an active char
+{%
+ \Name\let{gmu@CL@#1}\@undefined
+ \ifx\@xa#2\Name\edef{gmu@CL@#1}{\@xau{#3}}\fi
+ \ifx\edef#2\Name\edef{gmu@CL@#1}{#3}\fi
+ \unless\ifcsname gmu@CL@#1\endcsname
+ \Name\edef{gmu@CL@#1}{%
+ \gmu@if{cat}{\@nx~\@nx#3}%
+ {\@nx#3}{\strip@bslash{#3}}%
+ }%
+ \fi
+}
+
+\DeclareCommand\CommandLet \long {%
+ \Scope % (1)
+ T{\@xa\edef} % (2) whether left side should be |\expandaftered|
+ m % (3) left side of assignment
+ >iT{=} % pro forma
+ T{\@xa\edef} % (4) whether right side should be |\expandaftered|
+ m % (5) right side of the asssignment
+}{%
+ %
+ \gmu@CL@PrepareArg{left}#2{#3}%
+ \gmu@CL@PrepareArg{right}#4{#5}%
+ %
+ \@xa\gmu@ifDeclared\@xa{\gmu@CL@right}{%
+ \edef\gmu@LC@resa{%
+ \DeclareCommand %
+ \@xa\@xanxtri\@xa{\gmu@CL@left}%
+ #1% scope prefix
+ {\@nx\SameAs\@xa\@xanxtri\@xa{\gmu@CL@right}}% args. spec
+ {}% the body of the command will be |\let| via letting inners.
+ }%
+ %
+ \gmu@LC@resa
+ \@XA{\@xa\gmu@LC@LetInners\@xa#1%
+ \@xa{\gmu@CL@left}}\@xa{\gmu@CL@right}%
+ }% of if Declared
+ {% if not Declared, we just |\let|:
+\if\@nx#3ѥ\typeout{@@@@@ »\@xa\@dc@InnerName\@xa{\gmu@CL@right}« is not
+ Declared?: \Name\meaning{\@xa\@dc@InnerName\@xa{\gmu@CL@right}}%
+}%
+\show\NotDeclared
+\fi
+ \@XA{\@xa\tri@let\@xa#1%
+ \@xa{\gmu@CL@left}}\@xa{\gmu@CL@right}%
+ }%
+}
+
+\DeclareCommand\envirlet \long{\Scope mm}{% for |\let|ting environments.
+ \CommandLet #1{#2}{#3}%
+ \CommandLet #1{end#2}{end#3}%
+}
+
+\DeclareCommand\@fornum{%
+ m% (1) initial (least) num. value
+ m% (2) limit (last iterated over) num. value
+ O{1}% (3) step of iteration
+ m% (4) body of the loop
+}%
+{\edef\gmu@fornum@min{\the\numexpr #1}%
+ \edef\gmu@fornum@lim{\the\numexpr #2}%
+ \let\gmu@fornum@curr\gmu@fornum@min
+ \@whilenum\gmu@fornum@curr<\gmu@fornum@lim
+ \do{#4%
+ \edef\gmu@fornum@curr{%
+ \the\numexpr\gmu@fornum@curr+#3}%
+ }% of |\@whilenum|'s body.
+}% of |\@fornum|.
+
+\pdef\StoreCommand{%
+ \begingroup
+ %\label{SC begr}
+ \MakePrivateLetters
+ \@StoreCommand
+}
+
+\long\def\gmu@SC@StorageName
+#1% a \CS, name or active char
+#2% group level
+{%
+ \gmu@storeprefix/%
+ \ifnum\numexpr#2>-1 \the\numexpr(#2)*1\relax\fi
+ \bslash@or@ac {#1}%
+}%
+
+\def\gmu@SC@setgrouplevel
+#1% |+›⁄|-⁄|\NoValue|
+#2% a decimal number
+{\edef\gmu@SC@grouplevel{%
+ \the\numexpr
+ \gmuIfValueTF{#1}%
+ {\currentgrouplevel#1#2+1}{#2}%
+ }% of the grouplevel-carrying macro
+}
+
+\DeclareCommand\@StoreCommand
+{%
+ #1 T{+-}% grouplevel shift indicator
+ #2 d % group level or shift (the latter relative to the current g.l.)
+ #3 >Pm% name or \CS
+}{%
+ \endgroup %we close the group opened in line \ref{SC begr}.
+ \gmu@SC@setgrouplevel{#1}{#2}%
+ %
+ \edef\gmu@SC@resa{%
+ \gmu@SC@StorageName{#3}{\gmu@SC@grouplevel}}%
+ %
+ \let\gmu@SC@scope\relax
+ \ifnum\gmu@SC@grouplevel>\currentgrouplevel
+ \let\gmu@SC@scope\global
+ \fi
+ \@xa\CommandLet\@xa\gmu@SC@scope\@xa{\gmu@SC@resa}{#3}%
+}
+
+\pdef\StoreEnvironment{%
+ \begingroup
+ \MakePrivateLetters
+ \@StoreEnvironment
+}
+
+\def\@StoreEnvironment#1{%
+ \@StoreCommand{#1}%
+ \begingroup
+ \@StoreCommand{end#1}%
+}
+
+\pdef\RestoreEnvironment{%
+ \begingroup
+ \MakePrivateLetters
+ \@RestoreEnvironment
+}
+
+\def\@RestoreEnvironment#1{%
+ \endgroup
+ \RestoreCommand{#1}%
+ \RestoreCommand{end#1}%
+}
+
+\pdef\UseStored{%
+ \begingroup
+ \MakePrivateLetters
+ \@UseStored}
+
+
+\DeclareCommand\@UseStored \long{%
+ #1 T{+-}% (1) indicator of grouplevel shift (in distiction from an absolute
+ % group level)
+ #2 d % (2) optional grouplevel or shift (0 by default)
+ #3 O{\@gobble}% (3) stuff to be put before the |#4| \CS, e.g., an
+ #4 m % (4) a \CS or csname to be taken from the storage liquid
+}{% \chgs{2010/06/23 v0.993 added}
+ \endgroup
+ \gmu@SC@setgrouplevel{#1}{#2}%
+ \edef\gmu@SC@grouplevel{%
+ \the\numexpr\gmu@SC@grouplevel+1}% for the first turn of loop
+ %
+ \loop
+ \edef\gmu@SC@grouplevel{%
+ % we decrease the group level number
+ \the\numexpr\gmu@SC@grouplevel-1}%
+ %
+ \edef\gmu@SC@currname{%
+ % define the cs' storage name for that level
+ \gmu@SC@StorageName{#4}{\gmu@SC@grouplevel}}%
+ \ifnum
+ % and check the conjunction of conditions: the group level is >=-1…
+ \unless\ifnum\gmu@SC@grouplevel<-1 1\else 0\fi
+ % and the csname remains not defined.
+ \unless\ifcsname \gmu@SC@currname \endcsname 1\else 0\fi
+ =11
+ \repeat
+ \gmu@if{csname}{\gmu@SC@currname\endcsname}%
+ {%
+ % ^^A \s how\ExecutingTrueBranch
+ \@XA{#3{#4}}\csname \gmu@SC@currname\endcsname}% first
+ {%
+ % ^^A \s how\ExecutingFalseBranch
+ #3{#4}\@undefined}% second
+}% of |\@UseStored|
+
+\DeclareCommand\RestoreCommand{\Scope d}{%
+ \UseStored #2[\CommandLet #1*]%
+}
+
+
+\newbox\gmu@smashbox
+
+\DeclareCommand\set@smashbox{%
+ \Scope
+ T{hv}{h}
+}{#1\setbox\gmu@smashbox =\csname #2box\endcsname }%
+
+\def\smash@box{\smash{\box\gmu@smashbox}}
+
+
+\newbox\gmu@boxA
+\newbox\gmu@boxB
+\newdimen\gmu@dima
+\newdimen\gmu@dimb
+
+\DeclareCommand\gmu@extremebox {
+ #1 m % a dimen register (will be assigned the extr.\ value) or a
+ % \CS (will be defined as |\the| extreme value)
+ #2 T {\min\max}{\max} % kind of extreme
+ #3 T {\wd\ht\dp\totalheight}{\wd} % dimension to compare, the last two for total |\ht|+|\dp|.
+ #4 \lostwax {\global\relax} \eacher{\gmu@dimextreme@step} \lost{\relax}
+ #5 T{\global}{} % scope of assignment
+}{%
+ \gmu@if x {\max#2}
+ {\gmu@dimb=-\maxdimen
+ \def\gmu@dimextreme@comp{<}%
+ }
+ {\gmu@dimb=\maxdimen
+ \def\gmu@dimextreme@comp{>}%
+ }%
+ %
+ \long \def\gmu@dimextreme@step ##1{%
+ \setbox\gmu@boxA=\hbox{##1}%
+ %
+ \gmu@dima= \gmu@if x {\totalheight#3}
+ {\dimexpr \ht\gmu@boxA +\dp\gmu@boxA\relax}
+ {#3\gmu@boxA}%
+ \relax
+ %
+ \gmu@if {dim}
+ {\gmu@dimb\gmu@dimextreme@comp \gmu@dima }
+ {\gmu@if {dim} {\gmu@dima>\z@}
+ {\gmu@dimb=\gmu@dima }
+ {}%
+ }
+ {}%
+ %
+ }%
+ %
+ #4%
+ \IfIs #1\dimen
+ {#5#1=\gmu@dimb}
+ {#5\edef #1{\the\gmu@dimb }}%
+}%
+
+\pdef\gmu@getht
+#1% box register
+#2% dimen (or glue) register to assign the (substitute) height to
+{%
+ \setbox\gmu@boxA=\copy#1\relax
+ \ifvbox\gmu@boxA
+ \vbadness@M
+ \setbox\gmu@boxB=\vsplit\gmu@boxA to \maxdimen
+ \vbadness@Restore
+ %
+ % chcemy rzeczywiście pomierzyć, a nie być może odrzucić odstępy,
+ % kerny i grzywny.
+ \setbox\gmu@boxB=\vbox{\splitdiscards }%
+ \ifdim \ht\gmu@boxB >\z@
+ \setbox \gmu@boxA=\vbox{
+ \unvbox\gmu@boxB
+ \unvbox\gmu@boxA
+ }%
+ \fi
+ \else
+ \setbox\gmu@boxA=\box\voidb@x
+ \fi
+ %
+ \ifvoid\gmu@boxA
+ #2=\ht#1\relax
+ \else
+ #2=\maxdimen
+ \fi
+}% of |\gmu@getht|
+
+
+
+\DeclareCommand\enlargefsize{
+ #1 m % enlargement (dim(expr)) for font size
+ #2 b % enlargement (dim(expr)) for baselineskip (if absent, |#1| is used)
+}{\edef\gmu@tempa{%
+ \@nx\fontsize{\the\dimexpr\f@size pt+#1}%
+ {\the\dimexpr 1\baselineskip+ \gmuIfValueTF{#2}{#2}{#1}}%
+ }\gmu@tempa\selectfont
+}
+
+\DeclareCommand\scalefsize {
+ #1 m % scale for font size
+ #2 b % scale for baselineskip (if absent, |#1| is used)
+ \gobblespace
+}{\edef\gmu@tempa{%
+ \@nx\fontsize{\the\dimexpr #1\dimexpr\f@size pt\relax}%
+ {\the\dimexpr \gmuIfValueTF{#2}{#2}{#1}\baselineskip}%
+ }\gmu@tempa\selectfont
+}
+
+\let\gmu@discretionaryhyphen\- % for the cases when we don't redefine
+ % \incs\- but use \incs\UrlFix
+
+\DeclareCommand\bihyphen{
+ O{*} % token that'll make the discretionary hyphen |\-| allow other break-points
+}{%
+ \DeclareCommand\gmu@discretionaryhyphen{%
+ T{#1}%
+ G{&&}%
+ a
+ }{%
+ \gmuIfValueT{##2}{%
+ \gmu@ifempty{##2}{}{%
+ \def\gmu@bihyphen@char{##2}}%
+ }%
+ \gmuIfValueT{##3}{%
+ \gmu@ifempty{##3}{}{%
+ \def\gmu@bihyphen@corr{##3}}%
+ }%
+ %
+ % Depending on |#1| we allow (if present, then we take |\discre|)
+ % hyphenation of the word's before- and
+ % after-parts or forbid it (if absent, then we take
+ % |\discretionary|).
+ \gmuIfValueTF{##1}\discre\discretionary
+ {% before break
+ \gmuIfValueTF{##2}
+ {%
+ \gmu@ifempty{##2}{\gmu@bihyphen@char}{##2}%
+ }%
+ {%
+ \ifnum\hyphenchar\font>\z@
+ \char\hyphenchar\font
+ \fi}%
+ }% end of before break
+ {%after break
+ \gmuIfValueT{##3}{%
+ \gmu@ifempty{##3}{\gmu@bihyphen@corr}{##3}%
+ }%
+ }%
+ {% without break
+ }% almost as in \TB: unlike \TB, we allow hyphenchars
+ % $\ge255$ as we are \XeTeX.
+ }% of |\DeclareCommand\-|
+ \gmu@storeifnotyet\-% original |\-| is a~\TeX's
+ % primitive, therefore we should store it.
+ \CommandLet\-\gmu@discretionaryhyphen
+ \CommandLet\@dischyph\gmu@discretionaryhyphen % to override
+ % \pk{framed.sty}
+ \pdef\gmu@flexhyphen{\gmu@discretionaryhyphen#1\relax}%
+}% of |\bihyphen|
+
+\relaxen\gmu@bihyphen@corr
+
+\@ifXeTeX{%
+ \DeclareCommand\gmshowlists {
+ >iT{\depth}
+ Ď{1}%
+ >iT{\breadth}
+ Ď{10000000}
+ }%
+}{% not in \XeTeX\ we use legacy |D| arg.\ specifiers:
+ \DeclareCommand\gmshowlists {
+ >iT{\depth}
+ D{1}%
+ >iT{\breadth}
+ D{10000000}
+ }%
+}
+{\tracingonline=\@ne
+ \showboxdepth=#1\relax % how many levels of
+ % box nesting should be shown
+ \showboxbreadth=#2\relax % after how many elements »etc.« will be put
+ \showlists
+}
+
+\DeclareCommand\gmtracingoutput {
+ \SameAs\gmshowlists
+}
+{\tracingonline=\@ne
+ \tracingoutput=\@ne
+ \showboxdepth=#1\relax % how many levels of
+ % box nesting should be shown
+ \showboxbreadth=#2\relax % after how many elements »etc.« will be put
+}
+
+
+\newcount\c@FiBreakPenalty
+
+\DeclareCommand \AllowFiBreak {%
+ % The defaults are as in DEK's |\filbreak|.
+ Q{l}{l}
+ = {\c@FiBreakPenalty }
+}
+{%
+ \penalty\@M
+ \csname vfi#1\endcsname
+ \penalty \c@FiBreakPenalty
+ \csname vfi#1neg\endcsname
+}
+
+
+\DeclareCommand \IgnorePars {m Q{\par}} {#1}
+
+\DeclareCommand\putpenalty {=}
+{%
+ \gmu@iflastglue
+ {\@tempskipa=\lastskip
+ \mode@skip -\@tempskipa
+ \penalty \@tempcnta
+ \mode@skip \@tempskipa
+ }%
+ {\gmu@iflastkern
+ {\@temdima=\lastkern
+ \kern-\@temdima
+ \penalty \@tempcnta
+ \kern \@temdima
+ }
+ {%
+ \penalty\@tempcnta
+ }%
+ }%
+}
+
+\newskip \gmu@TrashSkip
+
+\pdef \mode@skip {%
+ \ifvmode \vskip
+ \else
+ \ifhmode \hskip
+ \else
+ \ifmmode \mskip
+ \else
+ \gmu@TrashSkip
+ \fi
+ \fi
+ \fi
+}
+
+
+\endinput
+%%
+%% End of file `gmcommand.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmdoc.sty b/tex/.texmf/tex/latex/misc/gmdoc.sty
new file mode 100644
index 0000000..a5bc976
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmdoc.sty
@@ -0,0 +1,4312 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.298 2011/02/02 18:35:58 natror Exp natror $
+%% This is file “gmdoc.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmdoc/gmdoc.gmd (with options: `doc')
+%%
+%%
+%% Copyright © 2006, 2007, 2008, 2009, 2010
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For the documentation please refer to the file(s)
+%% gmdoc.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{gmdoc}
+ [2010/09/25 v0.993 a documenting package (GM)]
+
+
+%%
+%% ^^A(
+%% \chschange{v0.98j}{2006/10/19}{4372}
+%% \chschange{v0.98j}{06/10/19}{4372}
+%% \begin{macrocode}
+%%\end{macrocode}
+%% \skiplines we skip the driver
+%%\endskiplines
+
+\ifnum\catcode`\@=12
+
+\errorcontextlines=100
+
+\documentclass[countalllines, codespacesgrey, outeroff, debug, mwrep,
+pagella, trebuchet, cursor, fontspec=quiet]{gmdocc}
+
+\verbLongDashes
+
+\DoNotIndex{\gmu@tempa \gmu@tempb \gmu@tempc \gmu@tempd \gmu@tempe \gmu@tempf}
+
+\twocoltoc
+\title{The \pk{gmdoc} Package\\ i.e., \pk{gmdoc.sty} and
+ \pk{gmdocc.cls}}
+\author{Grzegorz `Natror' Murzynowski}
+\date{\ifcase\month\relax\or January\or February\or March\or April\or May\or
+ June\or July\or August\or September\or October\or November\or
+ December\fi\ \the\year}
+
+\begin{document}
+
+\emptify\udigits % because orig. def. raises an error `\cs{@secondoftwo} has
+ % an extra \}'
+\maketitle
+
+\setcounter{page}{2}% \pk{hyperref} cries if it sees two pages
+\tableofcontents
+\DoIndex\maketitle
+
+\SelfInclude
+\DocInclude{gmdocc}
+
+\skipgmlonely[\stanza The remarks about installation and compiling
+ of the documentation are analogous to those in the chapter
+ \pk{gmdoc.sty} and therefore omitted.\stanza]
+\DocInclude{gmutils}
+\DocInclude{gmiflink}
+\DocInclude{gmverb}
+\DocInclude{gmoldcomm}
+\typeout{%
+ Produce change log with^^J%
+ makeindex -r -s gmglo.ist -o \jobname.gls \jobname.glo^^J
+ (gmglo.ist should be put into some texmf/makeindex directory.)^^J}
+\PrintChanges
+\typeout{%
+ Produce index with^^J%
+ makeindex -r \jobname^^J}
+ \PrintIndex
+
+\afterfi{%
+\end{document}
+ makeindex -r gmdoc
+ makeindex -r -s gmglo.ist -o gmdocDoc.gls gmdocDoc.glo
+
+
+}\fi% of |\ifnum\catcode`\@=12|, of the driver that is.
+
+\catcode`\^^C=9\relax
+\RequirePackage{gmutils}[2008/08/30]% includes redefinition of
+\RequirePackage{xkeyval}% we need key-vals later, but maybe we'll make
+
+\newif\if@linesnotnum
+
+\DeclareOption{linesnotnum}{\@linesnotnumtrue}
+
+
+\newif\if@uresetlinecount
+
+\DeclareOption{uresetlinecount}{\@uresetlinecounttrue}
+
+
+\newif\if@countalllines
+\newif\if@printalllinenos
+
+\DeclareOption{countalllines}{% to use the \incs{inputlineno}
+ % primitive and print real line numbers % in a~file.
+ \@countalllinestrue
+ \@printalllinenosfalse}
+
+\DeclareOption{countalllines*}{%
+ \@countalllinestrue
+ \@printalllinenostrue}
+
+
+\newif\if@noindex
+
+\DeclareOption{noindex}{\@noindextrue}
+
+\newif\if@pageindex
+
+\DeclareOption{pageindex}{\@pageindextrue}
+
+
+\newif\if@indexallmacros
+
+\DeclareOption{indexallmacros}{\@indexallmacrostrue}
+
+
+\@ifundefined{if@marginparsused}{\newif\if@marginparsused}{}
+
+\@ifclassloaded{article}{\@marginparsusedtrue}{}
+
+\@ifclassloaded{report}{\@marginparsusedtrue}{}
+
+\@ifclassloaded{book}{\@marginparsusedtrue}{}
+\DeclareOption{withmarginpar}{\@marginparsusedtrue}
+
+\DeclareOption{nomarginpar}{\@marginparsusedfalse}
+
+\DeclareOption{codespacesblank}{%
+ \AtEndOfPackage{% to allow \inverb|codespacesgrey, codespacesblank|
+ \AtBeginDocument{\CodeSpacesBlank}}}
+
+\DeclareOption{codespacesgrey}{%
+ % \changes{v0.99l}{2008/08/06}{added due to Will Robertson's
+ % suggestion}
+ \AtEndOfPackage{% to put the declaration into the begin-document
+ % hook after definition of \incs{visiblespace}.
+ \AtBeginDocument{\CodeSpacesGrey}}}
+
+\ProcessOptions
+
+\RequirePackage{gmutils}[2008/08/08]
+
+\RequirePackage{xcolor}
+\definecolor{deepblue}{rgb}{0,0,.85}
+
+
+
+\@ifpackageloaded{hyperref}{\hypersetup{colorlinks=true,
+ linkcolor=deepblue, urlcolor=blue, filecolor=blue}}{%
+ \RequirePackage[colorlinks=true, linkcolor=deepblue, urlcolor=blue,
+ filecolor=blue, pdfstartview=FitH, pdfview=FitBH,
+ pdfpagemode=UseNone]{hyperref}}
+
+
+\RequirePackage{gmiflink}
+\RequirePackage{gmverb}[2010/08/12]
+
+\Store@Macros{\@verbatim\verb}
+
+\if@noindex
+ \AtBeginDocument{\gag@index}% for the latter macro see line
+ % \ref{gag@index}.
+\else
+ \RequirePackage{makeidx}\makeindex
+\fi
+
+\def\CodeDelim{\@bsphack\gmu@ifstar\Code@Delim@St\Code@Delim}
+
+\def\Code@Delim@St#1{%
+ {\escapechar\m@ne
+ \@xa\gdef\@xa\code@delim\@xa{\string#1}}%
+ \@esphack}
+
+\def\Code@Delim#1{\VerbHyphen{#1}\Code@Delim@St{#1}}
+
+\CodeDelim\%
+
+\pdef\narrationmark{{\codett\verbhyphen}{\normalfont\enspace}\ignorespaces}
+
+
+\newtoks\gmd@preverypar
+
+\newcommand*\settexcodehangi{%
+ \hangindent=\verbatimhangindent \hangafter=\@ne}% we'll use
+\@ifdefinable\@@settexcodehangi{\let\@@settexcodehangi=\settexcodehangi}
+
+
+\newlength\TextIndent
+\newlength\CodeIndent
+\CodeIndent=1,5em\relax
+\@ifundefined{stanzaskip}{\newlength\stanzaskip}{}
+\stanzaskip=\medskipamount
+ %^^A \advance\stanzaskip by-.25\medskipamount% to preserve the stretch- and
+ %^^A % shrinkability.\par
+\newskip\CodeTopsep
+\newskip\MacroTopsep
+
+\def\UniformSkips{%\label{UniformSkips}
+ % \Define\CodeTopsep \Define\MacroTopsep
+ \CodeTopsep=\stanzaskip
+ \MacroTopsep=\stanzaskip
+ \abovedisplayskip=\stanzaskip
+ %\nostanza \leftskip0sp \gmdnoindent
+ % |%% \abovedisplayshortskip|
+ % remains untouched as it is 0.0\,pt plus 3.0\,pt by default.
+ % \nostanza
+ \belowdisplayskip=\stanzaskip
+ \belowdisplayshortskip=.5\stanzaskip% due to DEK's idea of making the
+ % short below display skip half of the normal.
+ \advance\belowdisplayshortskip by\smallskipamount
+ \advance\belowdisplayshortskip by-1\smallskipamount% We advance
+ % \incs{be\+low\+dis\+play\+short\+skip} forth and back to
+ % give it the \incs{small\+skip\+am\+ount}'s shrink- and
+ % stretchability components.
+ \topsep=\stanzaskip
+ \partopsep=\z@
+}
+\UniformSkips
+\AtBeginDocument{\UniformSkips}
+
+\newcommand*\NonUniformSkips{\@relaxen\UniformSkips}
+\newcommand*\chunkskip{%
+ \par\addvspace{%
+ \glueexpr\MacroTopsep
+ \if@codeskipput-\CodeTopsep\fi
+ \relax
+}\@codeskipputgtrue}
+
+\pdef\stanza{%
+ \par\addvspace{%
+ \glueexpr\stanzaskip
+ \if@codeskipput-\CodeTopsep\fi
+ \relax}\@codeskipputgtrue}
+
+\newcommand*\nostanza{% \changes{v0.99n}{2008/08/21}{added adding
+ % negative skip if in vmode and \cs{par}}
+ \par
+ \if@codeskipput\unless\if@nostanza\vskip-\CodeTopsep\relax\fi\fi
+ \@codeskipputgtrue\@nostanzagtrue
+ \@afternarrgfalse\@aftercodegtrue}% In the `code
+\newgif\if@newline
+\newgif\if@dsdir
+
+
+\begingroup\catcode`\^^M=\active%
+\firstofone{\endgroup%
+ \newcommand*{\DocInput}[1]{\begingroup%
+ % \changes{v0.98}{06/09/05}{\cs{@makeother\protect\bslash_} added}
+ % \DefIndex\gmd@inputname
+ \edef\gmd@inputname{#1}% we'll use it in some notifications.
+ %
+ \NamedInput@prepare{#1}% to make this input “named”, as with |\NamedInput|.
+ %
+ % \DefIndex\gmd@currentlabel@before
+ \let\gmd@currentlabel@before=\@currentlabel% we store it because
+ % we'll do |\xdef|s of |\@currentlabel| to make proper references
+ % to the line numbers so we want to restore current
+ % |\@currentlabel| after our group.\
+ % \CodeUsgIndex\clubpenalty \CodeUsgIndex\widowpenalty
+ \gmd@setclubpenalty% we wrapped the assignment of |\clubpenalty|
+ % in a~macro because we'll repeat it twice more.
+ \@clubpenalty\clubpenalty \widowpenalty=3333 % Most paragraphs of the code will be
+ % one-line most probably and many of the narration, too.\par\
+ % \changes[\DocInput]{v0.95}{06/08/15}{\cs{club-}
+ % and \cs{widowpenalty} set both to 3333}
+ %\CodeUsgIndex\tolerance
+ \tolerance=1000 % as in \docfm.
+ % ^^A \catcode`\^^M=\active% redundant with line 2304
+ % \CodeUsgIndex\code@delim
+ \@xa\@makeother\csname\code@delim\endcsname%
+ % \CodeUsgIndex\gmd@resetlinecount
+ \gmd@resetlinecount% due to the option |uresetlinecount|
+ % we reset the line number counter or do nothing.
+ % \Define*{^^M}
+ \QueerEOL% \changes{v0.99m}{2008/08/09}{there was
+ % \cs{let}\hathat{M} but \cs{QueerEOL} is better: it also
+ % redefines \cs{}\hathat M} It has to be before the
+ % begin-input-hook to allow change by that hook.
+ % \CodeUsgIndex\@beginputhook
+ \@beginputhook% my first use of it is to redefine |\maketitle|
+ % just at this point not globally. \CodeUsgIndex\everypar
+ \everypar=\@xa{\@xa\@codetonarrskip\the\everypar}%
+ % \Define\gmd@guardedinput
+ \edef\gmd@guardedinput{%
+ \@nx\@@input #1\relax% |\@nx| is
+ % |\noexpand|, see \pk{gmutils}.\DoNotIndex\@nx
+ % \incs{@@input} is the
+ % true \TeX's \incs{input}. \CodeUsgIndex\EOFMark
+ \gmd@iihook% cf.\ line \ref{iihook}
+ \@nx\EOFMark% to pretty finish the input, see
+ % line~\ref{eofMark}.\CodeUsgIndex\code@delim
+ \@nx\CodeDelim\@xanxcs{\code@delim}% to
+ % ensure the code delimiter is the same as at the beginning of
+ % input.
+ % \changes[\DocInput]{v0.99c}{2007/03/02}{added ensuring the
+ % code delimiter to be the same at the end as at the beginning}
+ \@nx^^M\code@delim%
+ % \label{guardians}
+ }% we add guardians after
+ % |\input|ing a~file; somehow an error occurred without them.
+ \catcode`\%=9 % for \docfm -compatibility.\label{ignorePercent}
+ \setcounter{CheckSum}{0}% we initialise the counter for the number
+ % of the escape chars (the assignment is |\global|).
+ \everyeof{\relax}% |\@nx| moved not to spoil input of toc e.g.
+ \@xa\@xa\@xa^^M\gmd@guardedinput%\label{eeeEOL}
+ \par%
+ % \CodeUsgIndex\@endinputhook
+ \@endinputhook% It's a~hook to let postpone
+ % some stuff till the end of input. We use it e.g.\ for the
+ % \docfm-(not)likeliness notifications.
+ \glet\@currentlabel=\gmd@currentlabel@before% we restore
+ % value from before this group. In a~very special case this could
+ % cause unexpected behaviour of cross-refs, but anyway we acted
+ % globally and so acts \pk{hyperref}.
+ %
+ \NamedInput@finish% to clean up after a “named” input, as with |\NamedInput|.
+ %
+ \endgroup%
+ }% end of |\Doc@Input|'s definition.
+}% end of |\firstofone|'s argument.
+
+
+\pdef\gmd@textEOL{ % a~space just like in normal
+ % \TeX. We put it first to % cooperate with \inverb|\^^M|'s
+ % |\expandafter\ignorespaces|. It's % no % problem since a~space
+ % | |${}_{10}$ doesn't drive \TeX\ out of % the vmode.
+ \ifhmode\@afternarrgtrue\@codeskipputgfalse\fi% being in
+ % the horizontal mode means we've just typeset some narration so we
+ % turn the respective switches: the one bringing the message `we are
+ % after narration' to True (|@afternarr|) and the `we have put the
+ % code-narration glue' to False (|@codeskipput|). Since we are in
+ % a~verbatim group and the information should be brought outside it,
+ % we switch the switches globally (the letter |g| in both).
+ \@newlinegtrue% to |\refstep| the lines' counter at the proper
+ % point.
+ \@dsdirgtrue% to handle the \ds\ directives.
+ \@xa\@trimandstore\the\everypar\@trimandstore%we store the
+ % previous value of |\everypar| register to restore it at
+ % a~proper point. See line \ref{@trimandstore} for the details.
+ \begingroup%^^A ##### maybe we prefer to restore the genuine |\par|
+ % ^^A~before the group?
+ \gmd@setclubpenalty% Most paragraphs will be
+ % one-line most probably. Since some sectioning commands may change
+ % \incs{clubpenalty}, we set it again here and also after this
+ % group.
+ \aftergroup\gmd@setclubpenalty%
+ \let\par\@@par% inside the verbatim group we wish |\par| to be genuine.
+ % \CodeUsgIndex\ttverbatim
+ \let\verbatimfont\codett %
+ \ttverbatim% it applies the code-layer font (|\tt| by default) and makes specials
+ % other or |\active|-and-breakable.
+ % to turn verbatim specials off in
+ % \incmd\scanverb s.
+ \gmd@DoTeXCodeSpace%
+ \@makeother\|% because |\ttverbatim| doesn't do that.
+ \MakePrivateLetters% see line \ref{MPL}.\par
+ \@xa\@makeother\code@delim% we are
+ % almost sure the code comment char is among the chars having
+ % been \catother ed already. For `almost' see the
+ % \gmiflink[IndexInput]{\cs{IndexInput}} macro's definition.\par
+ % So, we've opened a~verbatim group and want to peek at the next
+ % character. If it's |%|, then we just continue narration, else we
+ % process the leading spaces supposed there are any and, if after
+ % them is a~|%|, we just continue the commentary as in the
+ % previous case or else we typeset the \TeX\ code.
+ \texcode@hook% we add some special stuff, e.g.\ in \pk{gmdocc.cls} we
+ % make star low.
+ \@xa\@ifnextcharRS\@xa{\code@delim}{%\label{ifContNarr}
+ % \CodeUsgIndex\gmd@continuenarration
+ \gmd@continuenarration}{% \CodeUsgIndex\gmd@dolspaces
+ \gmd@dolspaces% it will launch |\gmd@typesettexcode|.
+ }% end of |\@ifnextcharRS|'s else.
+}% end of |\gmd@textEOL|'s definition.
+
+\emptify\texcode@hook
+
+\def\gmd@setclubpenalty{\clubpenalty=3333 }
+
+\def\AtEndInput{\g@addto@macro\@endinputhook}
+\def\@endinputhook{}
+\def\AtBegInput{\g@addto@macro\@beginputhook}
+\def\@beginputhook{}
+
+\emptify\gmd@iihook
+
+\AtBegInput{\let\gmd@@toc\tableofcontents
+ \def\tableofcontents{% \label{straighttoc}
+ \@ifQueerEOL
+ {\StraightEOL\gmd@@toc\QueerEOL}%
+ {\gmd@@toc}%
+ }%
+}
+
+
+\def\@ifEOLactive{%\
+ % \begin{enumargs}
+ % \item what if end of line is active,
+ % \item what if not.
+ % \end{enumargs}
+ \ifnum\catcode`\^^M=\active \@xa\@firstoftwo\else\@xa\@secondoftwo\fi}
+
+\foone\obeylines{%
+ \def\@ifQueerEOL{%\
+ % \begin{enumargs}
+ % \item what if line end is ‘queer’,
+ % \item what if not ‘queer’.
+ % \end{enumargs}
+ % \changes{v0.98a}{06/09/06}{added}
+ \@ifEOLactive{%
+ \ifx^^M\gmd@textEOL\@xa\@firstoftwo\else\@xa\@secondoftwo\fi}%
+ {\@secondoftwo}}% of \cs{@ifQueerEOL}
+}% of \cs{foone}
+
+\pdef\qfootnote{%
+ \@ifQueerEOL
+ {\begingroup\StraightEOL\qfootnote@}%
+ {\footnote}}
+
+\DeclareCommand\qfootnote@{o>Lm}{%
+ \endgroup % yes, we close the group: the arguments are already
+ % parsed and passed to this macro.
+ \edef\gmu@tempa{%
+ \@nx\footnote \IfValueT{#1}{[#1]}}%
+ \gmu@tempa{#2}%
+}
+
+\pdef\qemph{%
+ \@ifQueerEOL
+ {\begingroup\StraightEOL\qemph@}%
+ {\emph}}
+
+\pdef\qemph@#1{\endgroup\emph{#1}}
+
+\@emptify\gmd@ABIOnce
+\AtEndOfPackage{\AtBegInput\gmd@ABIOnce}
+
+\long\def\AtBegInputOnce#1{%
+ \gaddtomacro\gmd@ABIOnce{\g@emptify\gmd@ABIOnce#1}}
+
+
+\def\EOFMark{\<eof>}
+\begin{obeyspaces}%
+\gdef\CodeSpacesVisible{%
+\def\gmd@DoTeXCodeSpace{%
+\obeyspaces\let =\breakablevisspace}}%
+\gdef\CodeSpacesBlank{%
+\let\gmd@DoTeXCodeSpace\gmobeyspaces%
+\let\gmd@texcodespace=\ }% the latter |\let| is for the |\if›…|s.
+\gdef\CodeSpacesSmall{%
+\def\gmd@DoTeXCodeSpace{%
+\obeyspaces\def {\,\hskip\z@}}%
+\def\gmd@texcodespace{\,\hskip\z@}}%
+\end{obeyspaces}
+
+\def\CodeSpacesGrey{%
+ % \changes{v0.99l}{2008/08/06}{added due to Will Robertson's
+ % suggestion}
+ \CodeSpacesVisible
+ \VisSpacesGrey% defined in \pk{gmverb}
+}%
+
+
+\CodeSpacesVisible
+
+\def\gmd@continuenarration{%
+ \endgroup
+ \gmd@cpnarrline% see \gmiflink[countnarr]{below}.
+ \@xa\@trimandstore\the\everypar\@trimandstore
+ \everypar=\@xa{\@xa\@codetonarrskip\the\everypar}%
+ \@xa\gmd@checkifEOL\@gobble}
+
+\if@countalllines
+
+ \def\gmd@countnarrline@{%
+ \gmd@grefstep{codelinenum}\@newlinegfalse
+ \everypar=\@xa{%
+ \@xa\@codetonarrskip\the\gmd@preverypar}%^^A
+ % the \cs{hy\+p\+er\+lab\+el\+@\+li\+ne} macro puts
+ % a~hypertarget in a~|\raise| i.e., drives \TeX\ into the
+ % horizontal mode so |\everypar| shall be issued. Therefore we
+ % should restore it.
+ }% of \cs{gmd@countnarrline@}
+
+ \def\gmd@grefstep#1{% instead of diligent redefining all possible
+ % commands and environments we just assign the current value of
+ % the respective \TeX's primitive to the \env{codelinenum}
+ % counter. Note we decrease it by $-1$ to get the proper value
+ % for the next line. (Well, I~don't quite know why, but it
+ % works.) %^^A~we'll step its value by 1 because it will be put
+ % ^^Aat the beginning of the \emph{next} line.
+ \ifnum\value{#1}<\inputlineno
+ \csname c@#1\endcsname\numexpr\inputlineno-1\relax
+ \ifvmode\leavevmode\fi% this line is added 2008/08/10 after an
+ % ^^A(
+ % all-night debuggery ;-) that showed that at one point
+ % \incs{gmd@grefstep} was called in vmode which caused adding
+ % \incs{penalty 10000} to the main vertical list and thus
+ % forbidding page break during entire \inenv{oldmc}.
+ \grefstepcounter{#1}%
+ \fi}% We wrap stepping the counter in an \incs{ifnum} to avoid
+ % repetition of the same ref-value (what would result in the
+ % ``multiply defined labels'' warning).\par\
+ % The
+ % \cs{grefstepcounter} macro, defined in \pk{gmverb}, is
+ % a~global
+ % version of \cs{ref\-step\-count\-er}, observing the redefinition
+ % made
+ % to \incs{refstepcounter} by \pk{hyperref}.
+
+ \if@printalllinenos% Note that checking this switch makes only
+ % sense when |countalllines| is true.
+ \def\gmd@cpnarrline{% count and print narration line
+ \if@newline
+ \gmd@countnarrline@
+ \hyperlabel@line
+ {\LineNumFont\thecodelinenum}\,\ignorespaces}%
+ \fi}
+ \else% not |printalllinenos|
+ \emptify\gmd@cpnarrline
+ \fi
+
+\def\gmd@ctallsetup{% In the \inenv{oldmc} environments and with the
+ % \incs{FileInfo} declaration (when % \inenv{countalllines} option
+ % is in force) the % code is gobbled as an argument of a~macro and
+ % % then processed at one place (at the end of % \inenv{oldmc}
+ % % e.g.) so if we used % \incs{inputlineno}, we would have got all
+ % % the % lines with the same number. But we only set the counter
+ % % not \incs{refstep} it to avoid putting a~hypertarget.
+ \setcounter{codelinenum}{\inputlineno}% it's global.
+ \let\gmd@grefstep\hgrefstepcounter}
+
+\else% not |countalllines| (and therefore we won't print the narration
+ % lines' numbers either)
+ \@emptify\gmd@cpnarrline
+ \let\gmd@grefstep\hgrefstepcounter% \label{let grefstep} if we don't
+ % want to count all the lines, we only \incs{ref}-increase the
+ % counter in the code layer.
+ \emptify\gmd@ctallsetup
+\fi% of |\if@countalllines|
+
+\def\skiplines{\bgroup
+ \let\do\@makeother \dospecials % not \incs{@sanitize} because the
+ % latter doesn't recatcode braces and we want all to be quieten.\ilrr
+ \gmd@skiplines}
+
+ \edef\gmu@tempa{%
+ \long\def\@nx\gmd@skiplines##1\bslash endskiplines{\egroup}}
+ \gmu@tempa
+
+\foone\obeylines{% \DefIndex\gmd@typesettexcode
+ \def\gmd@typesettexcode{%
+ \gmd@parfixclosingspace% it's to eat a~space closing the
+ % paragraph, see \gmiflink[closingspace]{below}. It contains
+ % |\par|.
+ %
+ % ^^A\special{color push gray 0.2645}%
+ % A~verbatim group has already been opened by \cs{ttverb\+at\+im} and
+ % additional \cs{cat\-code}.
+ \everypar={\@@settexcodehangi}% At first attempt we thought
+ % of giving the user a~|\toks| list to insert at the beginning of
+ % every code line, but what for?
+ % \Define*{^^M}^^A
+ \def^^M{% \TeX\ code \acro{EOL}
+ \@newlinegtrue% to |\refstep| the counter in proper place.
+ \@dsdirgtrue% to handle the \ds\ directives.
+ \global\gmd@closingspacewd=\z@% \label{noclosingspace}we
+ % don't wish to eat a~closing space after a~codeline, because
+ % there isn't any and a~negative rigid |\hskip| added to
+ % |\parfillskip| would produce a~blank line.
+ \ifhmode\par\@codeskipputgfalse\else%
+ \if@codeskipput%
+ \else\addvspace{\stanzaskip}\@codeskipputgtrue%
+ \fi% if we've just met a~blank (code) line, we insert
+ % a~|\stanzaskip| glue.
+ % \label{codeskip}
+ \fi%
+ \prevhmodegfalse% we want to know later that now we are in the
+ % vmode.
+ % ^^A\special{color push gray 0.2666}%
+ \@ifnextcharRS{\gmd@texcodespace}{%
+ \@dsdirgfalse\gmd@dolspaces}{\gmd@charbychar}%
+ }% end of |^^M|'s definition.\label{debug!2}
+ % \DefIndex\gmd@texcodeEOL
+ \let\gmd@texcodeEOL=^^M% for further checks inside |\gmd@charbychar|.
+ \raggedright\leftskip=\CodeIndent%
+ \if@aftercode%
+ \gmd@nocodeskip1{iaC}%
+ \else%
+ \if@afternarr%
+ % ^^A~\def^^C{\showthe\hyphenpenalty\showthe\rightskip}
+ \if@codeskipput\else%
+ \gmd@codeskip1\@aftercodegfalse%
+ \fi% \label{codeskip3}
+ \else\gmd@nocodeskip1{naN}%
+ \fi%
+ \fi% if now we are
+ % switching from the narration into the code, we insert a~proper
+ % vertical space.
+ \@aftercodegtrue\@afternarrgfalse%
+ %^^A\special{color push gray 0.2682}% before that penalty
+ \ifdim\gmd@ldspaceswd>\z@% and here the leading spaces.
+ \leavevmode\@dsdirgfalse%
+ \if@newline\gmd@grefstep{codelinenum}\@newlinegfalse%
+ \fi%
+ \printlinenumber% if we don't want the lines to be numbered,
+ % the respective option \incs{let}s this \CS to \incs{relax}.
+ \hyperlabel@line%
+ %^^A\special{color push gray 0.2689}% seems O.K.
+ \mark@envir% index and/or marginize an environment if there is
+ % some to be done so, see line \ref{mark@envir}.
+ \hskip\gmd@ldspaceswd%
+ \advance\hangindent by\gmd@ldspaceswd%
+ \xdef\settexcodehangi{%
+ \@nx\hangindent=\the\hangindent% and also set the
+ % hanging indent setting for the same line comment case. \acro{BTW}.,
+ % this |%| or rather lack of it costed me five hours of
+ % debugging and rewriting. Active line ends require extreme
+ % caution.
+ \@nx\hangafter=1\space}%^^A~\@nx\relax
+ \else%
+ \glet\settexcodehangi=\@@settexcodehangi%\\
+ %|%| |\printlinenumber| here produced line numbers for blank lines
+ % which is what we don't want.
+ \fi% of |\ifdim|
+ \gmd@ldspaceswd=\z@%
+ \prevhmodegfalse% we have done |\par| so we are not in the
+ % hmode.
+ \@aftercodegtrue% we want to know later that now we are
+ % typesetting a~codeline.
+ \if@ilgroup\aftergroup\egroup\@ilgroupfalse\fi% when we are in the in-line
+ % comment group (for ragged right or justified), we want
+ % to \label{inline.egroup.2}
+ % close it. But if we did it
+ % here, we would close the verbatim group for the code. But we set
+ % the switch false not to repeat \inverb|\aftergroup\egroup|.
+ % ^^A\special{color push gray 0.2712}% before that penalty
+ \gmd@charbychar% we'll eat the code char by char to scan all the
+ % macros and thus to deal properly with the case |\%| in which the
+ % |%| will be scanned and won't
+ % launch closing of the verbatim group.
+ }% of |\gmd@typesettexcode|.
+}% of |\foone\obeylines|.
+\newlength\gmd@spacewd% to store the width of a~(leading)
+\newlength\gmd@ldspaceswd% to store total length of gobbled leading
+ %spaces.
+
+\let\gmd@texcodespace=\breakablevisspace
+
+\def\gmd@dolspaces{%
+ \ifx\gmd@texcodespace\@let@token
+ \@dsdirgfalse
+ \afterfi{\settowidth{\gmd@spacewd}{\visiblespace}%
+ \gmd@ldspaceswd=\z@
+ \gmd@eatlspace}%
+ \else\afterfi{% about this smart macro and other of its family see
+ % \pk{gmutils} sec.\,3.
+ % ^^A \special{color push gray 0.2748}% debug of \penalty10000
+ % ^^A~2008/08/10 was far
+ % ^^A \ifnum\inputlineno>1016 \ifnum\inputlineno<1050 \show\par\fi\fi
+ % ^^A~O.K.
+ \if@afternarr\if@aftercode
+ \ifilrr\bgroup \gmd@setilrr\fi
+ \fi\fi
+ \par% possibly after narration
+ \if@afternarr\if@aftercode
+ \ifilrr\egroup\fi
+ \fi\fi
+ \gmd@typesettexcode}%
+ \fi}
+
+
+\def\gmd@eatlspace#1{%
+ \ifx\gmd@texcodespace#1%
+ \advance\gmd@ldspaceswd by\gmd@spacewd% we don't
+ % \incs{advance} it \incs{global}ly because the current group may be closed
+ % iff we meet \inverb|%| and then we'll won't indent the line anyway.\ilrr
+ \afteriffifi\gmd@eatlspace
+ \else
+ \if\code@delim\@nx#1%
+ \gmd@ldspaceswd=\z@
+ \afterfifi{\gmd@continuenarration\narrationmark}%\label{ContNarr2}
+ % \changes{v0.99n}{2008/08/30}{\cs{afterfifi} added---a~bug fix}
+ \else \afterfifi{\gmd@typesettexcode#1}%
+ \fi
+ \fi}%
+
+
+\newgif\ifprevhmode
+
+
+\def\gmd@charbychar#1{%
+ \ifhmode\prevhmodegtrue
+ \else\prevhmodegfalse
+ % ^^A~\special{color push gray 0.2789}%
+ \fi
+ \if\code@delim\@nx#1%
+ \def\next{% occurs when next a~\cs{hskip4.875pt} is to be put
+ % ^^A\special{color push gray 0.2791}% O.K.
+ \gmd@percenthack% to typeset |%| if a~comment
+ % continues the~codeline.
+ \endgroup%
+ \gmd@checkifEOLmixd}% to see if next is |^^M| and then do |\par|.
+ \else% i.e., we've not met the code delimiter
+ \ifx\relax#1\def\next{%
+ % ^^A\special{color push gray 0.2798}%
+ \endgroup}% special case of end of file thanks to |\everyeof|.
+ \else
+ \if\code@escape@char\@nx#1%
+ \@dsdirgfalse% yes, just here not before the whole |\if| because
+ % then we would discard checking for \ds\ directives doable by
+ % the active |%| at the `old macrocode' setting.
+ \def\next{%
+ \gmd@counttheline#1\scan@macro}%
+ \else
+ \def\next{%
+ \gmd@EOLorcharbychar#1}%
+ \fi
+ \fi
+ \fi\next}
+
+\def\debug@special#1{%
+ \ifhmode\special{color push gray 0.#1}%
+ \else\special{color push gray 0.#1000}\fi}
+
+\def\gmd@EOLorcharbychar#1{%
+ %^^A \debug@special{2829}%
+ \ifx\gmd@texcodeEOL#1%
+ \if@newline
+ % ^^A\special{color push gray 0.281600}% no occurrence
+ % ^^A \if@countalllines\global\advance\c@codelinenum by\@ne obsolete
+ % ^^A\fi
+ \@newlinegfalse
+ \fi
+ \afterfi{#1}%\label{printhashone1}here we print |#1|.
+ \else% i.e., |#1| is \emph{not} a~(very active) line end,
+ \afterfi
+ {%^^A \debug@special{2839}% this occurs frequently
+\gmd@counttheline#1\gmd@charbychar}% \label{printhashone2}or here
+ % we print |#1|. Here we would also possibly mark an environment
+ % but there's no need of it because declaring an environment to
+ % be marked requires a~bit of commentary and here we are after
+ % a~code |^^M| with no commentary.
+ \fi}
+
+\def\gmd@counttheline{%
+ \ifvmode
+ \if@newline
+ \leavevmode
+ %^^A \debug@special{2851}%
+ \gmd@grefstep{codelinenum}\@newlinegfalse
+ \hyperlabel@line
+ \fi
+ %^^A\debug@special{2853}%
+ \printlinenumber
+ % ^^A\debug@special{2855}%
+ \mark@envir
+ \else% not vmode
+ \if@newline
+ % ^^A\special{color push gray 0.2842}% didn't occur
+ \gmd@grefstep{codelinenum}\@newlinegfalse
+ \hyperlabel@line
+ \fi
+ \fi}
+
+
+\def\gmd@percenthack{%%
+ \ifprevhmode\aftergroup\narrationmark% We add a~space after |%|,
+ % because I~think it looks better. It's done |\aftergroup| to make
+ % the spaces possible after the |%| not to be
+ % typeset.
+ % \changes{v0.99n}{2008/08/21}{\cs{space} replaced with a~tilde to
+ % forbid a~line break before an in-line comment}
+ \else\aftergroup\gmd@dsNarrChecker% remember that
+ % \cs{gmd\-@\-pre\-cent\-hack} is only called when we've the code
+ % delimiter and soon we'll close the verbatim group and right after
+ % |\endgroup| there waits |\gmd@checkifEOLmixd|.
+ \fi}
+
+
+\newif\ifgmd@dsVerb
+
+\foone{\obeylines}%
+{%
+ \def\gmd@dsVerbChecker%
+ #1% stuff for checking normal directive
+ #2% line contents
+ ^^M{%%
+\typeout{verb checker l.\the\inputlineno}%
+ \ifnum\strcmp{\detokenize{#2}}{\gmd@dsVerbDelim}=\z@%
+ \global\gmd@dsVerbfalse%
+ \def\gmd@modulehashone{%
+ \ModuleVerbClose{\gmd@dsVerbDelim}%
+ \global\emptify\gmd@dsVerbDelim%
+ \@afternarrgfalse\@aftercodegtrue%
+ \@codeskipputgfalse %
+ }%
+ \@xa\@firstoftwo%
+ \else \@xa\@secondoftwo %
+ \fi%
+ {\gmd@textEOL\gmd@modulehashone^^M}%
+ {\begingroup%
+ \endlinechar=\m@ne %
+ \@XA{%
+ \endgroup#1}\scantokens{#2}^^M% note that |\scantokens| adds
+ % char |\endlinechar| which we assure to be |^^M|
+ }%
+ }% of |\gmd@dsVerbChecker|
+}% of |\obeylines|
+
+\def\gmd@dsChecker#1{%
+ \@dsdirgfalse
+ \ifgmd@dsVerb
+ \@xa\@firstofone
+ \else
+ \@xa\@secondoftwo
+ \fi
+ {\gmd@dsVerbChecker}%
+ {#1}%
+}% of |\gmd@dsChecker|
+
+\def\gmd@dsNarrChecker#1{%%
+ \gmd@dsChecker
+ {\@ifnextcharRS<{%
+ \@xa\gmd@docstripdirective\@gobble}{#1}}%
+}% of |\gmd@dsNarrChecker|
+
+
+\def\gmd@checkifEOL{%
+ \gmd@cpnarrline
+ \everypar=\@xa{\@xa\@codetonarrskip% we add the
+ % macro that'll insert a~vertical space if we leave the code and
+ % enter the narration.
+ \the\gmd@preverypar}%
+ \@ifnextcharRS{\gmd@textEOL}{%
+ %^^A\@ifnextMac{%^^A}
+ \@dsdirgfalse
+ \par\ignorespaces}{%
+ \gmd@narrcheckifds}}%
+
+\def\gmd@narrcheckifds{%^^A\typeout{narr if ds \on@line}%
+ \gmd@dsNarrChecker{\ignorespaces}}
+
+
+\def\gmd@checkifEOLmixd{%
+ \gmd@cpnarrline
+ \everypar=\@xa{\@xa\@codetonarrskip\the\gmd@preverypar}%
+ %
+ % \label{longlinethatshouldbebroken}
+ \@afternarrgfalse\@aftercodegtrue
+ \ifhmode\@codeskipputgfalse\fi
+ \@ifnextcharRS{\gmd@textEOL}{%
+ %^^A\@ifnextMac{%^^A}
+ {\raggedright\gmd@endpe\par}% without \incs{raggedright} this
+ % \incs{par}
+ % would be justified which is not appropriate for a~long codeline
+ % that should be broken, e.g., \ref{longlinethatshouldbebroken}.
+ \prevhmodegfalse
+ \gmd@endpe\ignorespaces}{%
+ % If a~codeline ends with |%|
+ % (|prevhmode|${}=={}$True) first |\gmd@endpe| sets the parameters
+ % at the \TeX\ code values and |\par| closes a~paragraph and the
+ % latter |\gmd@endpe| sets the parameters at the narration values.
+ % In the other case both |\gmd@endpe|s do the same
+ % and |\par| between them does nothing.
+ % \DefIndex\par
+ \def\par{% the narration \cs{par}.
+ \ifhmode% (I~added this |\ifhmode| as a~result of a~heavy
+ % debug.)
+ \if@afternarr\if@aftercode
+ \unless\if@ilgroup\bgroup\@ilgrouptrue\fi
+ \ifilrr\gmd@setilrr\fi
+ \fi\fi
+ \@@par
+ \if@afternarr
+ \if@aftercode
+ \if@ilgroup\egroup\fi% \label{inline.egroup.1}if we are both after code
+ % and after narration it means we are after an in-line
+ % comment. Then we probably end a~group opened in line
+ % \ref{inline.bgroup}
+ \if@codeskipput\else\gmd@codeskip2\@aftercodegfalse\fi
+ %\label{codeskip4}
+ \else\gmd@nocodeskip2{naC}%
+ \fi
+ \else\gmd@nocodeskip2{naN}%
+ \fi
+ \prevhmodegfalse\gmd@endpe% when taken out of |\ifhmode|, this
+ % line caused some codeline numbers were typeset with
+ % |\leftskip|${}=0$.
+ \everypar=\@xa{%
+ \@xa\@codetonarrskip\the\gmd@preverypar}%
+ \let\par\@@par%
+ \fi}% of \cs{par}.
+ \gmd@endpe\ignorespaces}}
+
+
+\def\gmd@endpe{%
+ \ifprevhmode
+ \settexcodehangi%\unskip ndent
+ \leftskip=\CodeIndent
+ \else
+ \leftskip=\TextIndent
+ \hangindent=\z@
+ \everypar=\@xa{%
+ \@xa\@codetonarrskip\the\gmd@preverypar}%
+ \fi}
+
+\newif\ifilrr
+
+\def\ilrr{%\changes{v0.99n}{2008/08/21}{added}
+ \if@aftercode
+ \unless\if@ilgroup\bgroup\@ilgrouptrue\fi% \label{inline.bgroup} If we are
+ % `aftercode', then we are in an in-line comment. Then we open
+ % a~group to be able to declare e.g.\ \cs{raggedright} for that
+ % comment only. This group is closed in line \ref{inline.egroup.1}
+ % or \ref{inline.egroup.2}.
+ \ilrrtrue
+ \fi}
+
+\newif\if@ilgroup
+
+\def\gmd@setilrr{\rightskip0ptplus\textwidth}
+
+\def\ilju{% when in-line comments are ragged right in general but we
+ % want just this one to be justified.
+ \if@aftercode
+ \unless\if@ilgroup\bgroup\@ilgrouptrue\fi
+ \ilrrfalse
+ \fi}
+
+\def\verbcodecorr{%\changes{v0.99n}{2008/08/21}{added}
+ % a~correction of vertical spaces between a~\env{verbatim} and
+ % code. We put also a~\cs{par} to allow parindent in the next
+ % commentary.
+ \vskip-\lastskip\vskip-4\CodeTopsep\vskip3\CodeTopsep\par}
+
+\if@uresetlinecount% with |uresetlinecount| option\dots
+ \@relaxen\gmd@resetlinecount% \dots\ we turn
+ % resetting the counter by \cs{Doc\+In\+put} off\dots
+ \newcommand*\resetlinecountwith[1]{%
+ \newcounter{codelinenum}[#1]}% \dots\ and provide a~new
+ % declaration of the counter.
+\else% With the option turned off\dots
+ \newcounter{DocInputsCount}%
+ \newcounter{codelinenum}[DocInputsCount]% \dots\ we declare the
+ % |\DocInput|s' number counter and the codeline counter
+ % to be reset with stepping of it.
+ % \changes[\c@DocInputsCount]{v0.98c}{06/9/8}{added for fixing
+ % duplication of \pk{hyperref} labels in the case of a~multiple
+ % \cs{DocInput}}
+ \newcommand*\gmd@resetlinecount{\stepcounter{DocInputsCount}}% \dots
+ % and let the |\DocInput| increment the |\DocInput|s number count
+ % and thus reset the codeline count. It's for unique naming of the
+ % \pk{hyperref} labels.
+\fi
+
+\newcommand*\printlinenumber{%
+ \leavevmode\llap{\rlap{\LineNumFont$\phantom{999}$\llap{\thecodelinenum}}%
+ \hskip\leftskip}}
+
+\def\LineNumFont{\normalfont\tiny}
+
+\if@linesnotnum\@relaxen\printlinenumber\fi
+
+\newcommand*\hyperlabel@line{%
+ \if@pageindex% It's good to be able to switch it any time not just
+ % define it once according to the value of the switch set by the
+ % option.
+ \else
+ \raisebox{2ex}[1ex][\z@]{\gmhypertarget[clnum.%
+ \HLPrefix\arabic{codelinenum}]{}}%
+ \fi}
+
+\newcommand*\gmd@codeskip[1]{%
+ \@@par\addvspace\CodeTopsep
+ \@codeskipputgtrue\@nostanzagfalse}
+
+\newgif\if@codeskipput
+
+\newgif\if@nostanza
+
+\newcommand*\gmd@nocodeskip[2]{}
+
+\if1 1
+ \renewcommand*\gmd@codeskip[1]{%
+ \hbox{\rule{1cm}{3pt} #1!!!}}
+ \renewcommand*\gmd@nocodeskip[2]{%
+ \hbox{\rule{1cm}{0.5pt} #1: #2 }}
+\fi
+
+\newgif\if@aftercode
+\newgif\if@afternarr
+
+\def\@codetonarrskip{%
+ \if@codeskipput\else
+ \if@afternarr\gmd@nocodeskip4{iaN}\else
+ \if@aftercode
+ % We are at the beginning of |\everypar|, i.e., \TeX\ has just entered
+ % the hmode and put the |\parindent| box. Let's remove it then.
+ {\setbox0=\lastbox}%
+ % Now we can put the vertical space and state we are not `aftercode'.
+ \gmd@codeskip4%
+ % \label{codeskip5}
+ \else\gmd@nocodeskip4{naC}%
+ \fi
+ \fi
+ \fi
+ \leftskip\TextIndent% this line is a~patch against
+ % a~bug-or-feature that in certain cases the narration |\leftskip|
+ % is left equal the code leftskip. (It happens when there are
+ % subsequent code lines after an in-line comment not ended with
+ % an explicit |\par|.) Before v0.99n it was just after line \ref{codeskip5}.
+ \@aftercodegfalse\@nostanzagtrue
+ % \changes{v0.99o}{2008/09/04}{a~bug fix: added \cs{@nostanzagtrue}}
+}
+
+\long\def\@trimandstore#1\@trimandstore{%
+ \def\@trimandstore@hash{#1}%
+ \ifx\@trimandstore@hash\@empty% we check if |#1| is
+ % nonempty. The \incs{if} \inverb*|\relax#1\relax| trick is not
+ % recommended here because using it we couldn't avoid expanding |#1|
+ % if it'd be expandable.
+ \gmd@preverypar={}%
+ \else
+ \afterfi{\@xa\@trimandstore@ne\the\everypar\@trimandstore}%
+ \fi}
+
+\long\def\@trimandstore@ne#1#2\@trimandstore{%\label{@trimandstore}
+ \def\trimmed@everypar{#2}%
+ \ifx\@codetonarrskip#1%
+ \gmd@preverypar=\@xa{\trimmed@everypar}%
+ \else
+ \gmd@preverypar=\@xa{\the\everypar}%
+ \fi}
+\catcode`\^^B=\active% note we re|\catcode| \<char2> globally, for the
+\catcode`\^^V=\active % the same for |^^V|.
+\catcode`\^^U=\active % and for |^^U|.
+\foone{\obeylines}%% \Define*{^^B}
+{\pdef\QueerCharTwo{%
+ \protected\def^^B##1^^M{%
+ %^^A\@newlinegtrue\gmd@countnarrline
+ \ifhmode\unskip\space\ignorespaces\fi}}% It shouldn't be \incs{ } not to
+ % drive \TeX\ into hmode.
+ %
+ % \Define*{^^V}
+ % \Define*{^^U}
+ % The |^^V| char is intended to mark parts of code commented out
+ % which are to be typeset verbatim. Lines are begun with narration
+ % marks (\%'s by default) and the narration-verbatim-typewriter font
+ % is used.
+ %
+ % The |^^U| char is intended for the lines commented out which are
+ % to be typeset as almost-invisible (second-class). They are marked
+ % with the narration mark as with |^^V| and a special font setting
+ % is used, which is a gray colour by default (in addition to the narration-verbatim-typewriter).
+ %
+ \pdef\gmd@UVdefs {%
+ \def\gmd@UV@percent{\global\let\verb@balance@group\@empty %
+ % ^^V \hyphenchar\font=\gmv@storedhyphenchar % it works back
+ % for the current paragraph so destroys our special hyphenchar.
+ \egroup\endgroup %
+ }% of |\gmd@UV@percent|
+ %
+ \@xa\def\@xa\verb@egroup@UV\@xa{%
+ \gmd@UV@percent ^^M%
+ }% of |\verb@egroup@UV|.
+ %
+ \addtomacro\gmd@UV@percent{\narrationmark}%
+ %
+ \pdef\gmd@QueerUV ##1{%
+ \scantokens\@xa{\code@delim %
+ \fooatletter{\@ifQueerEOL\@gobble}{}%
+ }% of |\scantokens|
+ %
+ \par%
+ {\codett\verbhyphen}\narrationmark %
+ \begingroup %
+ \catcode`\^^M=\active %
+ %
+ \let\verb@egroup=\verb@egroup@UV %
+ \verb^^M%
+ %
+ ##1% nothing in |^^V| case and a gray setting in the |^^U| case.
+ %
+ \begingroup %
+ \@xa\lccode\@xa`\@xa~\@xa`\code@delim%
+ \lowercase{\endgroup\let~\gmd@UV@percent }%
+ \@xa\catcode\@xa`\code@delim\active %
+ }% of |\gmd@QueerUV|
+ }% of |\gmd@UVdefs|
+ %
+ %
+ \pdef\QueerU {%
+ \unless\ifdefined\gmd@QueerU%
+ %
+ \gmd@UVdefs %
+ \pdef\gmd@QueerU {\gmd@QueerUV {\QueerUFont }}%
+ \let^^U\gmd@QueerU%
+ \catcode`\^^U=\active%
+ \fi %
+ }% of |\QueerU|
+ %
+ \pdef\QueerV {%
+ \unless\ifdefined\gmd@QueerV %
+ %
+ \gmd@UVdefs %
+ \pdef\gmd@QueerV {\gmd@QueerUV {}}%
+ \let^^V\gmd@QueerV%
+ \catcode`\^^V=\active%
+ \fi %
+ }% of |\QueerV|
+ %
+}% of |\foone|
+
+\QueerCharTwo
+\QueerV
+\QueerU
+\def\QueerUFont{\color{black!35}}
+
+\AtBegInput{\@ifEOLactive{\catcode`\^^B\active}{}\QueerCharTwo}% \label{QCh2}
+\catcode`\^^A=\active% note we re|\catcode| \<char1> globally, for the
+\foone\obeylines{%%\DefIndex\QueerCharOne \Define*{^^A}
+ \def\QueerCharOne{%
+ \def^^A{%^^A no need to write \incs{gmd@countnarrline} because
+ % ^^A \inverb|^^M| will contain it if \inenv{countalllines} is in force.
+ \bgroup\let\do\@makeother\dospecials\gmd@gobbleuntilM}}%
+ \def\gmd@gobbleuntilM#1^^M{\egroup\ignorespaces^^M}%
+}
+
+\QueerCharOne
+
+\AtBegInput{\@ifEOLactive{\catcode`\^^A\active}\QueerCharOne}% see note
+
+\def\StraightEOL{%\label{StraightEOL}
+ \catcode`\^^M=5
+ \catcode`\^^A=14
+ \catcode`\^^B=14
+ \def\^^M{\ }}
+
+
+\foone\obeylines{%
+ \def\QueerEOL{%\label{QueerEOL}
+ \catcode`\^^M=\active%
+ \let^^M\gmd@textEOL%
+ \catcode`\^^A=\active%
+ \catcode`\^^B=\active% I~only re|\catcode| \<char1> and \<char2>
+ % hoping no one but me is \emph{that} perverse to make them
+ % |\active| and (re)define. (Let me know if I'm wrong at this point.)
+ \let\^^M=\gmd@bslashEOL}%
+}
+
+
+\def\gmd@parfixclosingspace{{%
+ \advance\parfillskip by-\gmd@closingspacewd
+ \if@aftercode\ifilrr \gmd@setilrr \fi\fi
+ \par}%
+ \if@ilgroup\aftergroup\egroup\@ilgroupfalse\fi% we are in the
+ % verbatim group so we
+ % close the in-line comment group after it if the closing is not yet set.
+}
+\newskip\gmd@closingspacewd
+\newcommand*\gmd@setclosingspacewd{%
+ \global\gmd@closingspacewd=\fontdimen2\font%
+ plus\fontdimen3\font minus\fontdimen4\font\relax}
+
+\foone\obeylines{%\DefIndex*{\^^M}
+ \if 1 1%
+ \protected\def\gmd@bslashEOL{\ \@xa\ignorespaces^^M}%
+ }% of \cs{foone}. Note we interlace here \incs{if} with a~group.
+\else%
+ \protected\def\gmd@bslashEOL{%
+ \ifhmode\unskip\fi\ \ignorespaces}
+ %^^A~\if@countalllines\@newlinegtrue\gmd@cpnarrline\fi%
+ \fi
+
+\gaddtomacro\@verbatim{\leftskip=\CodeIndent}
+
+\AtBegInput{\long\def\check@percent#1{%
+ \gmd@cpnarrline% to count the verbatim lines and possibly print
+ % their numbers. This macro is used only by the verbatim end of line.
+ \@xa\ifx\code@delim#1\else\afterfi{#1}\fi}}
+\def\AddtoPrivateOthers#1{%
+ \@xa\def\@xa\doprivateothers\@xa{%
+ \doprivateothers\do#1}}%
+
+
+\begingroup
+\obeylines% \DefIndex\gm@verb@eol
+\AtBegInput{\def\gm@verb@eol{\obeylines%
+ \def^^M{\verb@egroup\@latex@error{%
+ \@nx\verb ended by end of line}%
+ \@ifEOLactive{^^M}{\@ehc}}}}%
+\endgroup
+
+
+\def\verbatimfont{\narrativett}
+\def\codett{\tt}
+
+\pdef\texttt#1{{\narrativett#1}}
+
+
+\VerbatimPitch
+
+\def\ResultsIn{results in:}
+
+\DeclareEnvironment{verbatim@p}{}
+{\begingroup
+ \verbatim
+}
+{\endverbatim
+ \endgroup
+ \ResultsIn
+ \[\parbox{0,85\textwidth}{%
+ \newlinechar=\endlinechar
+ \StraightEOL
+ \scantokens\@xa{\VerbatimContents}%
+ }% of parbox
+ \]%
+}
+
+
+
+
+
+\edef\actualchar{\string @}
+\edef\quotechar{\string "}
+\edef\encapchar{\xiiclub}
+\edef\levelchar{\string !}
+\def\CodeEscapeChar#1{%
+ \begingroup
+ \escapechar\m@ne
+ \xdef\code@escape@char{\string#1}%
+ \endgroup}
+\CodeEscapeChar\\
+
+\@ifundefined{MakePrivateLetters}{%\label{MPL}
+ \def\MakePrivateLetters{\makeatletter\catcode`\*=11 }}{}
+\def\MakePrivateOthers{\let\do=\@makeother \doprivateothers}
+\def\doprivateothers{\do\ \do\^}
+
+
+\foone\obeylines{%
+ \def\scan@macro#1{%
+ \ifx#1^^M\@xa#1\else\afterfi{\scan@macro@#1}\fi%
+ }% of |\scan@macro|,
+}% of |\foone|.
+
+\def\scan@macro@#1{% we are sure to scan at least one token which is
+ % not the line end and
+ % therefore we define this macro as one-parameter.\par
+ \step@checksum% \label{checksumUse}(see line \ref{checksum} for
+ % details),\par
+ % Then, unlike in \docfm , we do \emph{not} check if the scanning is
+ % allowed, because here it's always allowed and required.\par
+ % Of course, I~can imagine horrible perversities, but I~don't think
+ % they should really be taken into account. Giving the letter |a|
+ % |\catcode| other than \catletter\ surely would be one of those
+ % perversities. Therefore I~feel safe to take the character |a| as
+ % a~benchmark letter.
+ \ifcat a\@nx#1%
+ \quote@char#1%
+ \xdef\macro@iname{\gmd@maybequote#1}% global for symmetry with
+ % line \ref{x474}.
+ \xdef\macro@pname{\string#1}%\label{stringing0} we'll print entire
+ % name of the macro later.\par
+ % We |\string| it here and in the lines \ref{stringing1} and
+ % \ref{stringing2} to be sure it is whole \catother\ for easy
+ % testing for special index entry formats, see line
+ % \ref{pnametestDef} etc. Here we are sure the result of |\string|
+ % is \catother\ since its argument is \catletter.
+ \afterfi{\@ifnextcat{a}{\gmd@finishifstar#1}{\finish@macroscan}}%
+ \else% |#1| is not a~letter, so we have just scanned a~one-char
+ % \CS.\par
+ % Another reasonable |\catcode|s assumption seems to be that the
+ % digits are \catother. Then we don't have to
+ % type (|%|)|\expandafter\@gobble\string\a|. We do the |\uccode|
+ % trick to be sure that the char we write as the macro's name is
+ % \catother.
+ {\uccode`9=`#1%
+ \uppercase{\xdef\macro@iname{9}}%\label{x474}
+ }%
+ \quote@char#1%
+ \xdef\macro@iname{\gmd@maybequote\macro@iname}%
+ \xdef\macro@pname{\xiistring#1}%\label{stringing1}
+ \afterfi \finish@macroscan
+ \fi}% of |\scan@macro@|.
+\def\continue@macroscan#1{%
+ \quote@char#1%
+ \xdef\macro@iname{\macro@iname \gmd@maybequote#1}%
+ \xdef\macro@pname{\macro@pname \string#1}%\label{stringing2} we know
+ % \inverb*|#1| to be \catletter, so
+ % we don't need \incs{xiistring}.
+ \@ifnextcat{a}{\gmd@finishifstar#1}{\finish@macroscan}%
+}
+
+\def\gmd@finishifstar#1{%
+ \if*\@nx#1\afterfi\finish@macroscan% note we protect |#1| against
+ % expansion. In \pk{gmdoc} verbatim scopes some chars are active
+ % (e.g.\ \inverb|\|\,).
+ \else\afterfi\continue@macroscan
+ \fi}
+
+
+\def\quote@char#1{{\uccode`9=`#1% at first I~took digit 1 for this
+ % |\uccode|ing but then |#1| meant |#|\<\#1> in |\uppercase|'s
+ % argument, of course.
+ \uppercase{% \DefIndex\gmd@maybequote
+ \@ifinmeaning 9\of \indexcontrols
+ {\glet\gmd@maybequote\quotechar}%
+ {\g@emptify\gmd@maybequote}%
+ }%
+ }}
+
+
+\AtBeginDocument{\xdef\indexcontrols{%
+ \bslash\levelchar\encapchar\actualchar\quotechar}}
+
+\newif\ifgmd@glosscs% we use this switch to keep the information
+
+\newcommand*\finish@macroscan{%\label{506}\par
+ % First we check if the current \CS is not just being defined. The
+ % switch may be set true in line \ref{519}
+ \ifgmd@adef@cshook% if so, we throw it into marginpar and index as
+ % a~def entry\dots
+ \gmu@ifundefined{gmd/iexcl/\macro@pname\space}{% \dots\ if it's not excluded
+ % from indexing.
+ \@xa\Code@MarginizeMacro\@xa{\macro@pname}%
+ \@xa\@defentryze\@xa{\macro@pname}{1}}{}%% here we declare the kind of
+ % index entry and define |\last@defmark| used by \cs{changes}
+ \global\gmd@adef@cshookfalse% we falsify the hook that was set
+ % true just for this \CS.
+ \fi
+ % We have the \CS's name for indexing in |\macro@iname| and
+ % for print in |\macro@pname|. So we index it. We do it a~bit
+ % counter-crank way because we wish to use more general indexing
+ % macro.
+ \if\verbatimchar\macro@pname% \label{3039}it's important that |\verbatimchar|
+ % comes before the macro's name: when it was reverse, the |\tt| \CS
+ % turned this test true and left the |\verbatimchar| what resulted
+ % with `|\+tt|' typeset. Note that this test should turn true iff
+ % the scanned macro name shows to be the default
+ % |\verb|'s delimiter. In such a~case we give
+ % |\verb| another delimiter, namely |$|: ^^A$
+ \def\im@firstpar{[$%^^A$
+ ]}%
+ \else\def\im@firstpar{}%
+ \fi
+ \@xa \index@macro\im@firstpar\macro@iname\macro@pname
+ % \label{3049}
+ \maybe@marginpar\macro@pname
+ \if\xiispace\macro@pname\relax\gmd@texcodespace
+ \else
+ {\noverbatimspecials\Restore@Macro\verb
+ \@xa\scanverb\@xa{\macro@pname}}% we typeset scanned \CS.
+ \fi
+ % \changes[\finish@macroscan]{v0.99n}{2008/09/30}{the case of
+ % \cs{\vs} taken care of}
+ \let\next\gmd@charbychar
+ \gmd@detectors% \label{519} for automatic detection of
+ % definitions. Defined and
+ % explained in the next section. It redefines
+ % |\next| if detects a~definition command and thus
+ % sets the switch of line \ref{506} true.
+ \next
+ % \label{next 3690}
+}
+
+\def\maybe@marginpar#1{%
+ \gmu@ifundefined{gmd/2marpar/\@xa\detokenize\@xa{#1}}{}{%
+ \edef\gmu@tempa{%
+ \unexpanded{\Text@Marginize*}%
+ {\bslash\@xa\unexpanded\@xa{#1}}% ^^A
+ }\gmu@tempa
+ % ^^A % |\expandafter|s
+ % ^^A % \possfil because the |\Text@Marginize| command applies |\string| to its
+ % ^^A % argument.
+ % \incs{macro@pname}, which will be the only possible
+ % argument to
+ % \incs{may\+be\+@mar\+g\+in\+par},
+ % contains the macro's name
+ % without the escape char so we added it here.
+ \@xa\g@relaxen
+ \csname gmd/2marpar/\@xa\detokenize\@xa{#1}\endcsname% we reset the switch.
+ }}
+
+\outer\def\DeclareDefining{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar
+ {\gdef\gmd@adef@defaulttype{text}\Declare@Dfng}%
+ {\gdef\gmd@adef@defaulttype{cs}\Declare@Dfng}%
+}
+
+\newcommand*\Declare@Dfng[2][]{%
+ \endgroup
+ \Declare@Dfng@inner{#1}{#2}%
+ \ifgmd@adef@star% this switch may be set false in first
+ % \incs{Declare@Dfng@inner} (it's the |star| key).
+ \Declare@Dfng@inner{#1}{#2*}% The catcode of |*| doesn't matter since
+ % it's in
+ % \incs{csname\+…\+\bslash end\+cs\+na\+me}
+ % everywhere.
+ \fi}
+
+\def\Declare@Dfng@inner#1#2{%
+ \edef\gmd@resa{%
+ \@nx\setkeys[gmd]{adef}{type=\gmd@adef@defaulttype}}%
+ \gmd@resa
+ {\escapechar\m@ne
+ \xdef\gmd@adef@currdef{\string#2}%
+ % ^^A~\typeout{@@@ gmd@adef@currdef:::\gmd@adef@currdef::::}%
+ }%
+ \gmd@adef@setkeysdefault
+ \setkeys[gmd]{adef}{#1}%
+ \@xa\@ifinmeaning
+ \csname gmd@detect@\gmd@adef@currdef\endcsname
+ % \label{550}
+ \of\gmd@detectors{}{%
+ \@xa\gaddtomacro\@xa\gmd@detectors\@xa{%
+ \csname gmd@detect@\gmd@adef@currdef\endcsname}}% we add a~\CS\\
+ % |%| |\gmd@detect@|\<def name> (a~\textbf{detector}) to the
+ % meaning of the \textbf{detectors' carrier}. And we define it to
+ % detect the \inverb|#2| command.
+ \@xa\xdef\csname gmd@detectname@\gmd@adef@currdef\endcsname{%
+ \gmd@adef@currdef}%
+ \edef\gmu@tempa{% this |\edef| is to expand |\gmd@adef@TYPE|.
+ \global\@nx\@namedef{gmd@detect@\gmd@adef@currdef}{%
+ \@nx\ifx
+ \@xanxcs{gmd@detectname@\gmd@adef@currdef}%
+ \@nx\macro@pname
+ \@nx\n@melet{next}{gmd@adef@\gmd@adef@TYPE}%
+ \@nx\n@melet{gmd@adef@currdef}{gmd@detectname@\gmd@adef@currdef}%
+ \@nx\fi}}%
+ \gmu@tempa
+ \SMglobal\Store@MacroSt {gmd@detect@\gmd@adef@currdef}% we store the \CS to
+ % allow its temporary discarding later.
+}
+
+\def\gmd@adef@setkeysdefault{%
+ \setkeys[gmd]{adef}{star,prefix,KVpref}}
+
+\define@boolkey[gmd]{adef}{star}[true]{}
+
+\define@key[gmd]{adef}{prefix}[]{%
+ \edef\gmd@resa{%
+ \def\@xanxcs{gmd@adef@prefix@\gmd@adef@currdef }{%
+ #1}}%
+ \gmd@resa}
+
+\def\gmd@KVprefdefault{KV}% in a~separate macro because we'll need
+ % it in \cs{ifx}.
+
+\define@key[gmd]{adef}{KVpref}[\gmd@KVprefdefault]{%
+ \edef\gmd@resa{#1}%
+ \ifx\gmd@resa\gmd@KVprefdefault
+ \else
+ \@namedef{gmd@adef@KVprefixset@\gmd@adef@currdef}{1}%
+ \gmd@adef@setKV% whenever the |KVpref|fix is set (not default), the
+ % declared command is assumed to be \pk{keyval}ish.
+ \fi
+ \edef\gmd@resa{#1}% because |\gmd@adef@setKV| redefined it.
+ \edef\gmd@resa{%
+ \def\@xanxcs{gmd@adef@KVpref@\gmd@adef@currdef}{%
+ \ifx\gmd@resa\empty
+ \else#1@\fi}}% as in \pk{xkeyval}, if the \acro{KV} prefix is not
+ % empty, we add \inverb|@| to it.
+ \gmd@resa}
+
+\define@key[gmd]{adef}{KVfam}[]{%
+ \edef\gmd@resa{#1}%
+ \@namedef{gmd@adef@KVfamset@\gmd@adef@currdef}{1}%
+ \edef\gmd@resa{%
+ \def\@xanxcs{gmd@adef@KVfam@\gmd@adef@currdef}{%
+ \ifx\gmd@resa\empty
+ \else#1@\fi}}%
+ \gmd@resa
+ \gmd@adef@setKV}% whenever the |KVfam|ily is set, the declared command is
+ % assumed to be \pk{keyval}ish.
+
+\define@choicekey[gmd]{adef}{type}
+ [\gmd@adef@typevals\gmd@adef@typenr]
+ {% the list of possible types of defining commands
+ def,
+ newcommand,
+ cs,% equivalent to the two above, covers all the cases of defining
+ % a~\CS, including the \PlainTeX\ \inverb|\new›…| and
+ % \LaTeX\ |\newlength|.
+ newenvironment,
+ text,% equivalent to the one above, covers all the commands defining
+ % its first mandatory argument that should be text,
+ % \inverb|\DeclareOption| e.g.
+ define@key,% special case of more arguments important; covers the
+ % \pk{xkeyval} defining commands.
+ dk,% a~shorthand for the one above.
+ DeclareOptionX,% another case of special arguments configuration,
+ % covers the \pk{xkeyval} homonym.
+ dox,% a~shorthand for the one above.
+ kvo% one of option defining commands of the \pk{kvoptions} package
+ % by Heiko Oberdiek (a~package available o~\acro{CTAN} in the
+ % \pk{oberdiek} bundle).
+ }
+ {% In fact we collapse all the types just to four so far:
+ \ifcase\gmd@adef@typenr% if |def|
+ \gmd@adef@settype{cs}{0}%
+ \or% when |newcommand|
+ \gmd@adef@settype{cs}{0}%
+ \or% when |cs|
+ \gmd@adef@settype{cs}{0}%
+ \or% when |newenvironment|
+ \gmd@adef@settype{text}{0}%
+ \or% when |text|
+ \gmd@adef@settype{text}{0}%
+ \or% when |define@key|
+ \gmd@adef@settype{dk}{1}%
+ \or% when |dk|
+ \gmd@adef@settype{dk}{1}%
+ \or% when |DeclareOptionX|
+ \gmd@adef@settype{dox}{1}%
+ \or% when |dox|
+ \gmd@adef@settype{dox}{1}%
+ \or% when |kvo|
+ \gmd@adef@settype{text}{1}%% The \pk{kvoptions} option
+ %% definitions take first mandatory
+ % argument as the option name and they define a~\pk{keyval} key
+ % whose macro's name begins with the prefix/family, either default or
+ % explicitly declared. The \pk{kvoptions} prefix/family is
+ % supported in \pk{gmdoc} with \inverb|[KVpref=, KVfam=|\<family>|]|.
+ \fi}
+
+\def\gmd@adef@settype#1#2{%
+ \def\gmd@adef@TYPE{#1}%
+ \ifnum1=#2 % now we define (or not) a~quasi-switch that fires for
+ % the \pk{keyval}ish definition commands.
+ \gmd@adef@setKV
+ \fi}
+
+\def\gmd@adef@setKV{%
+ \edef\gmd@resa{%
+ \def\@xanxcs{gmd@adef@KV@\gmd@adef@currdef}{1}%
+ }%
+ \gmd@resa}
+
+\emptify\gmd@detectors
+
+\newif\ifgmd@adef@cshook
+
+\def\gmd@adef@cs{\global\gmd@adef@cshooktrue\gmd@charbychar}
+
+
+\def\gmd@adef@text{\gdef\gmd@lbracecase{1}\gmd@charbychar}
+
+\foone{%
+ \catcode`\[\active
+ % ^^A>\]
+ \catcode`\<\active}
+{%\par
+ % The detector of \pk{xkeyval} |\define@›«[…]»key|:
+ \def\gmd@adef@dk{%
+ \let[\gmd@adef@scanKVpref
+ \catcode`\[\active
+ % ^^A\]]
+ \gdef\gmd@lbracecase{2}%
+ \gmd@adef@dfKVpref\gmd@KVprefdefault% We set the default value of
+ % the \pk{xkeyval} prefix. Each time again because an assignment
+ % in \inverb|\gmd@adef@dfKVpref| is global.\ilrr
+ \gmd@adef@checklbracket}
+
+ % The detector of \pk{xkeyval} |\DeclareOptionX|:
+ \def\gmd@adef@dox{%
+ \let[\gmd@adef@scanKVpref
+ \let<\gmd@adef@scanDOXfam
+ \catcode`[\active
+ % ^^A]]
+ \catcode`<\active
+ \gdef\gmd@lbracecase{1}%
+ \gmd@adef@dfKVpref\gmd@KVprefdefault% We set the default values of
+ % the \pk{xkeyval} prefix\dots
+ \edef\gmd@adef@fam{\gmd@inputname}% \dots\ and family.
+ \gmd@adef@dofam
+ % \label{defDOXfam}
+ \gmd@adef@checkDOXopts}%
+}
+
+\def\gmd@adef@checklbracket{%
+ \@ifnextchar[%^^A]
+ \gmd@adef@scanKVpref\gmd@charbychar}% note that
+
+\def\gmd@adef@checkDOXopts{%
+ \@ifnextchar[\gmd@adef@scanKVpref%^^A]
+ {\@ifnextchar<\gmd@adef@scanDOXfam\gmd@charbychar}}
+
+\def\gmd@adef@scanKVpref#1#2]{%
+ \gmd@adef@dfKVpref{#2}%
+ [#2]\gmd@charbychar}
+
+\def\gmd@adef@dfKVpref#1{%
+ \ifnum1=0\csname gmd@adef@KVprefixset@\gmd@adef@currdef\endcsname
+ \relax
+ \else
+ \edef\gmu@resa{%
+ \gdef\@xa\@nx
+ \csname gmd@adef@KVpref@\gmd@adef@currdef\endcsname{%
+ \ifx\relax#1\relax
+ \else#1@%
+ \fi}}%
+ \gmu@resa
+ \fi}
+
+\def\gmd@adef@scanDOXfam{%
+ \ifnum12=\catcode`\>\relax
+ \let\next\gmd@adef@scanfamoth
+ \else
+ \ifnum13=\catcode`\>\relax
+ \let\next\gmd@adef@scanfamact
+ \else
+ \PackageError{gmdoc}{> neither `other' nor `active'! Make it
+ `other' with \bslash AddtoPrivateOthers\bslash\>.}{}%
+ \fi
+ \fi
+ \next}
+
+\def\gmd@adef@scanfamoth#1>{%
+ \edef\gmd@adef@fam{\@gobble#1}% there is always
+ % \cs{gmd@charbychar} first.
+ \gmd@adef@dofam
+ <\gmd@adef@fam>%
+ \gmd@charbychar}
+
+\foone{\catcode`\>\active}
+ {\def\gmd@adef@scanfamact#1>{%
+ \edef\gmd@adef@fam{\@gobble#1}% there is always
+ % \cs{gmd@charbychar} first.
+ \gmd@adef@dofam
+ <\gmd@adef@fam>%
+ \gmd@charbychar}%
+ }
+
+\def\gm@lbracehook{%
+ \ifcase\gmd@lbracecase\relax
+ \or% when 1
+ \afterfi{%
+ \gdef\gmd@lbracecase{0}%
+ \gmd@adef@scanname}%
+ \or% when 2---the first mandatory argument of two (|\define@›«[…]»key|)
+ \afterfi{%
+ \gdef\gmd@lbracecase{3}%
+ \gmd@adef@scanDKfam}%
+ \or% when 3---the second mandatory argument of two (the key name).
+ \afterfi{%
+ \gdef\gmd@lbracecase{0}%
+ \gmd@adef@scanname}%
+ \fi}
+
+\def\gmd@lbracecase{0}% we initialise the hook caser.
+
+
+\foone{\catcode`\[1 \catcode`\]2 \catcode`\}12 }
+ [% Note that till line \ref{738} the square brackets are grouping
+ % and the right brace is `other'. ^^A{
+ \def\gmd@adef@scanDKfam#1}[%^^A{
+ \edef\gmd@adef@fam[\@gobble#1]% there is always
+ % \cs{gmd@charbychar} first.
+ \gmd@adef@dofam
+ \gmd@adef@fam}%
+ \gmd@charbychar]
+
+ % ^^A{
+ \def\gmd@adef@scanname#1}[%^^A{
+ \@makeother\[%^^A\]
+ \@makeother\<%
+ % The scanned name begins with |\gmd@charbychar|, we have to be
+ % careful.
+ \gmd@adef@deftext[#1]%
+ \@gobble#1}%
+ \gmd@charbychar]
+ ]
+
+\def\gmd@adef@dofam{%
+ \ifnum1=0\csname gmd@adef@KVfamset@\gmd@adef@currdef\endcsname
+ \relax% a~family declared with |\DeclareDefining| overrides the
+ % one currently scanned.
+ \else
+ \edef\gmu@resa{%
+ \gdef\@xa\@nx
+ \csname gmd@adef@KVfam@\gmd@adef@currdef\endcsname
+ {\ifx\gmd@adef@fam\empty
+ \else\gmd@adef@fam @%
+ \fi}}%
+ \gmu@resa
+ \fi}
+
+\def\gmd@adef@deftext#1{%
+ \@xa\def\@xa\macro@pname\@xa{\@gobble#1}%% we gobble |\gmd@charbychar|, cf. above.
+ \edef\macro@pname{\@xa\detokenize\@xa{\macro@pname} }% note the
+ % space at the end.
+ \edef\macro@pname{\@xa\@xiispaces\macro@pname\@nil}%
+ \@xa\Text@Marginize\@xa{\macro@pname}%
+ \gmd@adef@indextext
+ \edef\gmd@adef@altindex{%
+ \csname gmd@adef@prefix@\gmd@adef@currdef \endcsname}%
+ %\hskip-\parindent and we add the \pk{xkeyval} header if we are in \pk{xkeyval}
+ % definition.
+ \ifnum1=0\csname gmd@adef@KV@\gmd@adef@currdef \endcsname\relax% The\\ \CS
+ % \inverb|\gmd@adef@KV@|\<def. command> is defined |{1}| (so \cs{ifnum}
+ % gets |1=01\relax|---\hskip0sptrue) iff \<def. command> is a~\pk{keyval}
+ % definition. In that case we check for the \inverb|KVpref|ix and
+ % \inverb|KVfam|ily. (Otherwise |\gmd@adef@KV@|\<def. command> is undefined
+ % so \cs{ifnum} gets |1=0\relax|---false.)\ilrr
+ \edef\gmd@adef@altindex{%
+ \gmd@adef@altindex
+ \csname gmd@adef@KVpref@\gmd@adef@currdef \endcsname}%
+ \edef\gmd@adef@altindex{%
+ \gmd@adef@altindex
+ \csname gmd@adef@KVfam@\gmd@adef@currdef \endcsname}%
+ \fi
+ \ifx\gmd@adef@altindex\empty
+ \else% we make another index entry of the definiendum with prefix/KVheader.
+ \edef\macro@pname{\gmd@adef@altindex\macro@pname}%
+ \gmd@adef@indextext
+ \fi}
+
+\def\gmd@adef@indextext{%
+ \@xa\@defentryze\@xa{\macro@pname}{0}% declare the definiendum has to
+ % have a~definition entry and should appear
+ % without backslash in the changes history.
+ \gmd@doindexingtext% redefine |\do| to an indexing macro.
+ \@xa\do\@xa{\macro@pname}}
+
+
+
+
+\DeclareDefining[star=false]\def
+\DeclareDefining[star=false]\pdef% it's a~\pk{gmutils}' shorthand for \inverb|\protected\def|.
+\DeclareDefining[star=false]\provide% a~\pk{gmutils}' conditional \incs{def}.
+\DeclareDefining[star=false]\pprovide% a~\pk{gmutils}' conditional \incs{pdef}.
+
+
+\def\UnDef{{% \changes{v0.99n}{2008/08/30}{a~bug fixed:
+ % \cs{gmd@charbychar} appended to \cs{next}---without it
+ % a~subsequent in-line comment was typeset verbatim}
+ % \UnDef
+ \gmd@adef@selfrestore\def
+ }}
+
+\def\UnPdef{{\gmd@adef@selfrestore\pdef}}
+
+\Store@Macro\UnDef% because the `hiding' commands relax it.
+
+\def\HideDef{% \changes{v0.99n}{2008/08/30}{added the starred version
+ % that calls \cs{UnDef}}
+ \gmu@ifstar\UnDef{\HideDefining\def\relaxen\UnDef}}
+
+\def\ResumeDef{%
+ \ResumeDefining\def
+ \Restore@Macro\UnDef}
+
+\DeclareDefining[star=false]\newcount
+\DeclareDefining[star=false]\newdimen
+\DeclareDefining[star=false]\newskip
+\DeclareDefining[star=false]\newif
+\DeclareDefining[star=false]\newtoks
+\DeclareDefining[star=false]\newbox
+\DeclareDefining[star=false]\newread
+\DeclareDefining[star=false]\newwrite
+\DeclareDefining[star=false]\newlength
+\DeclareDefining[star=false]\DeclareDocumentCommand
+\DeclareDefining[star=false]\DeclareCommand
+
+\DeclareDefining\newcommand
+\DeclareDefining\renewcommand
+\DeclareDefining\providecommand
+\DeclareDefining\DeclareRobustCommand
+\DeclareDefining\DeclareTextCommand
+\DeclareDefining\DeclareTextCommandDefault
+
+\DeclareDefining*\newenvironment
+\DeclareDefining*\renewenvironment
+\DeclareDefining*[star=false]\DeclareOption
+
+
+\DeclareDefining*[prefix=\bslash c@]\newcounter% \label{newcounter}
+
+\DeclareDefining[type=dk, prefix=\bslash]\define@key
+\DeclareDefining[type=dk, prefix=\bslash if]\define@boolkey% the
+ % alternate index entry will be
+ % \cs{if}\<KVpref>|@|\<KVfam>|@|\<key name>
+\DeclareDefining[type=dk, prefix=\bslash]\define@choicekey
+
+\DeclareDefining[type=dox, prefix=\bslash]\DeclareOptionX% the
+\newcommand*\DeclareDOXHead[2][\gmd@KVprefdefault]{%
+ \csname DeclareDefining\endcsname
+ [type=dox, prefix=\bslash, KVpref=#1, KVfam=#2]% \HideDefining\DeclareOptionX
+ \DeclareOptionX
+}
+
+\iffalse
+\DeclareOptionX[Berg]<Lulu>{EvelynLear}{}
+\DeclareOptionX<AntonW>{ChneOelze}
+\fi
+\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareStringOption
+\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareBoolOption
+\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareComplementaryOption
+\DeclareDefining[type=kvo, prefix=\bslash, KVpref=]\DeclareVoidOption
+
+\def\DeclareKVOFam#1{%
+ \def\do##1{%
+ \csname DeclareDefining\endcsname
+ [type=kvo, prefix=\bslash, KVpref=, KVfam=#1]##1}%
+ \do\DeclareStringOption
+ \do\DeclareBoolOption
+ \do\DeclareComplementaryOption
+ \do\DeclareVoidOption
+}
+
+
+\def\HideAllDefining{%
+ \ifnum0=0\csname gmd@adef@allstored\endcsname
+ \SMglobal\Store@Macro\gmd@detectors
+ \global\@namedef{gmd@adef@allstored}{1}%
+ \fi
+ \global\emptify\gmd@detectors}% we make the carrier |\empty| not |\relax| to
+ % be able to declare new defining command in
+ % the scope of |\HideAll›…|
+
+\def\ResumeAllDefining{%
+ \ifnum1=0\csname gmd@adef@allstored\endcsname\relax
+ \SMglobal\Restore@Macro\gmd@detectors
+ \SMglobal\Restore@Macro\UnDef
+ \global\@namedef{gmd@adef@allstored}{0}%
+ \fi}
+
+\def\HideDefining{\begingroup
+ % \changes{v0.99n}{2008/08/30}{Added the starred version that hides
+ % the defining command only once}
+ \MakePrivateLetters
+ \gmu@ifstar\Hide@DfngOnce\Hide@Dfng}
+
+\def\Hide@Dfng#1{%%\UnDef
+ \escapechar\m@ne
+ \gn@melet{gmd@detect@\string#1}{relax}%
+ \gn@melet{gmd@detect@\string#1*}{relax}%
+ \ifx\def#1\global\relaxen\UnDef\fi
+ \endgroup}
+
+\def\Hide@DfngOnce#1{%%\UnDef
+ \gmd@adef@selfrestore#1%
+ \endgroup}
+
+\def\gmd@adef@selfrestore#1{%
+ \@ifundefined{gmd@detect@\strip@bslash{#1}}{%
+ \SMglobal\@xa\Store@Macro
+ \csname gmd@detect@\strip@bslash{#1}\endcsname}{}%
+ % ^^A\typeout{:::::::::::::::gmd@detect@\string#1:::::::::::::}%
+ \global\@nameedef{gmd@detect@\strip@bslash{#1}}{%
+ \@nx\gmu@if x%
+ {\@xanxcs{gmd@detectname@\strip@bslash{#1}}%
+ \@nx\macro@pname}% we compare the detect(ed) name with
+ % |\macro@pname|.
+ %
+ {\def\@nx\next{% this \incs{next} will be executed in line
+ % % \ref{next 3690}.
+ \SMglobal\Restore@Macro % they both are \incs{protected}.
+ \@xanxcs{gmd@detect@\string#1}%
+ \@nx\gmd@charbychar}%^^A we define
+ % ^^A \inverb|\next| not restore the macro here just in case of
+ % ^^A multiple declaration of |\def| (in that case there would
+ % ^^A~be
+ % ^^A multiple occurrences of the macro to be restored in the
+ % ^^A~carrier
+ % ^^A \inverb|\gmd@detectors| and we wish
+ % ^^A all of them not to fire this one time) That's probably too
+ % ^^A much care since there's the test in line \ref{550}.
+ \@nx}%
+ {}% or do nothing if the \CS' names are unequal.
+ }% of \cs{@nameedef}.
+}% of \cs{gmd@adef@selfrestore}.
+
+\def\ResumeDefining{\begingroup
+ \MakePrivateLetters
+ \gmd@ResumeDfng}
+
+\def\gmd@ResumeDfng#1{%
+ \escapechar\m@ne
+ \SMglobal\Restore@MacroSt{gmd@detect@\string#1}%
+ \SMglobal\Restore@MacroSt{gmd@detect@\string#1*}%
+ \endgroup}
+
+\newcommand*\index@macro[3][\verbatimchar]{{%
+ \gmu@ifundefined{gmd/iexcl/\@xa\detokenize\@xa{#3 }}%\label{iexcltest}
+ {% |#3| is not excluded from index
+ % ^^A\typeout{@@@ :::\@xa\string\csname gmd/iexcl/\@xa\detokenize\@xa{#3 }\endcsname::::}%
+ \gmu@ifundefined{gmd/defentry/\@xa\detokenize\@xa{#3 }}% \label{pnametestDef}
+ {% |#3| is not def entry
+ \gmu@ifundefined{gmd/usgentry/\@xa\detokenize\@xa{#3 }}%\label{pnametestUsg}
+ {% |#3| is not usg.\ entry
+ \edef\kind@fentry{\CommonEntryCmd}}%\label{CECmd}
+ {% |#3| is usg.\ entry
+ \def\kind@fentry{UsgEntry}%
+ \un@usgentryze{#3}}%\label{usgentryrs}
+ }%
+ {% |#3| is def entry
+ \def\kind@fentry{DefEntry}%
+ \un@defentryze{#3}%\label{defentryrs}
+ }% of |gmd/defentry/| test's `else'
+ \if@pageindex\@pageinclindexfalse\fi% should it be here or
+ % there? Definitely here because we'll wish to switch the switch
+ % with a~declaration.
+ \if@pageinclindex
+ \edef\gmu@tempa{gmdindexpagecs{\HLPrefix}{\kind@fentry}{\EntryPrefix}}%
+ \else
+ \edef\gmu@tempa{gmdindexrefcs{\HLPrefix}{\kind@fentry}{\EntryPrefix}}%
+ \fi
+ \edef\gmu@tempa{\IndexPrefix#2\actualchar%
+ \quotechar\bslash verb*#1\quoted@eschar#2#1% The last macro in
+ % this line usually means the first two, but in some cases
+ % it's redefined to be empty (when we use |\index@macro| to
+ % index not a~\CS).
+ \encapchar\gmu@tempa}%
+ \@xa\special@index\@xa{\gmu@tempa}% We give the
+ % indexing macro the argument expanded so that \pk{hyperref} may
+ % see the explicit encap-char in order not to add its own
+ % encapsulation of \verb+|hyperpage+ when the (default)
+ % |hyperindex=true|\TextCommonIndex*{hyperindex} option is in
+ % force. (After this setting the |\edef|s in the above may be
+ % changed to |\def|s.)
+ % \changes[\index@macro]{v0.98f}{06/9/30}{explicit MakeIndex
+ % controls changed to corresponding macros. Therefore
+ % \cs[]{hyperindex} option of \pk{hyperref} didn't see the
+ % encapsulation and added its own. So I~expanded the
+ % argument of the very indexing macro}
+ }{}% closing of |gmd/iexcl/| test.
+ }}
+
+\def\un@defentryze#1{%
+ \ifcsname gmd/defentry/\@xa\detokenize\@xa{#1 }\endcsname
+ \@xa\g@relaxen\csname gmd/defentry/\@xa\detokenize\@xa{#1 }\endcsname
+ \fi
+ \ifx\gmd@detectors\empty
+ \g@relaxen\last@defmark
+ \fi}% the last macro (assuming \cs{fi} is not a~macro :-)
+ % is only used by \cs{changes}. If we are in the scope of automatic
+ % detection of definitions, we want to be able not to use \inverb|\Define|
+ % but write |\changes| after a~definition and get proper entry. Note
+ % that in case of automatic detection of definitions
+ % |\last@defmark|'s value keeps until the next definition.
+
+\def\un@usgentryze#1{%
+ \ifcsname gmd/usgentry/\@xa\detokenize\@xa{#1 }\endcsname
+ \@xa\g@relaxen\csname gmd/usgentry/\@xa\detokenize\@xa{#1 }\endcsname
+ \fi}
+
+\@emptify\EntryPrefix% this macro seems to be obsolete now
+
+\newif\if@pageinclindex
+
+\newcommand*\quoted@eschar{\quotechar\bslash}% we'll redefine it when
+
+\def\IndexPrefix{}
+
+\if@linesnotnum\@pageindextrue\fi
+\AtBeginDocument{%
+ \if@pageindex
+ \def\gmdindexrefcs#1#2#3#4{\csname#2\endcsname{\hyperpage{#4}}}%^^A
+ % in the page case we gobble the third argument that is supposed
+ % to be the entry prefix.\ilrr
+ \let\gmdindexpagecs=\gmdindexrefcs
+ \else
+ \def \gmdindexrefcs#1#2#3#4{\gmiflink[clnum.#4]{%
+ \csname#2\endcsname{#4}}}%
+ \def \gmdindexpagecs#1#2#3#4{\hyperlink{page.#4}{%
+ \csname#2\endcsname{\gmd@revprefix{#3}#4}}}%
+ % \stanza \DefIndex\gmd@revprefix
+ \def\gmd@revprefix#1{%
+ \def\gmu@tempa{#1}%
+ \ifx\gmu@tempa\@empty p.\,\fi}
+
+ \providecommand*\HLPrefix{}% it'll be the hypertargets names' prefix
+ % in mul\-ti-docs. Moreover, it showed that if it was empty,
+ % \pk{hyperref} saw duplicates of the hyper destinations, which
+ % was perfectly understandable (|codelinenum.123| made by
+ % |\refstepcounter| and |codelinenum.123| made by
+ % |\gmhypertarget|). But since v0.98 it is not a~problem anymore
+ % because during the automatic \inverb|\hypertarget|ing the
+ % lines are labelled |clnum.|\<number>. When |\HLPrefix| was
+ % defined as dot, MakeIndex rejected the entries as `illegal page
+ % number'. \changes[\HLPrefix]{v0.98a}{06/09/05}{again
+ % \cs{@empty}fied since \cs{hypertarget}ing the codelines names
+ % them \cs[]{clnum} (since v0.98).}
+ \fi}
+
+\def\DefEntry#1{\underline{#1}}
+\def\UsgEntry#1{\textit{#1}}
+\def\CommonEntryCmd{relax}
+
+
+
+\outer\def\DefIndex{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar
+ {\@sanitize\MakePrivateOthers%^^A\verbatim@specials
+ \Code@DefIndexStar}%
+ {\Code@DefIndex}}
+
+\long\def\Code@DefIndex#1{\endgroup{%
+ \escapechar\m@ne% because we will compare the macro's name with
+ % a~string without the backslash.
+ \@defentryze{#1}{1}}}
+
+\long\def\Code@DefIndexStar#1{%
+ \endgroup{%
+ \addto@estoindex{#1}%
+ \@defentryze{#1}{0}}%
+}
+
+\def\gmd@justadot{.}
+
+\long\def\@defentryze#1#2{%
+ \@xa\glet\csname gmd/defentry/\detokenize{#1 }\endcsname\gmd@justadot% The\\
+ % \LaTeX\ \inverb|\@namedef| macro could not be used since it's not
+ % `long'. The space to sound with the checker. \ilrr
+ % \Define\last@defmark
+ \ifcat\relax\@xa\@nx\@firstofmany#1\@nil
+ % \nostanza if we meet a~\CS, then maybe it's a~\CS to be
+ % ‘defentryzed’ or maybe it's a~‘verbatim special’ \CS. The only way
+ % to distinguish those cases is to assume there shouldn't be
+ % a~verbatim containing only a~‘verbatim special’ \CS.
+ \@xa\def\@xa\gmu@tempa\@xa{\@allbutfirstof#1\@nil}%
+ \ifx\gmu@tempa\@empty
+ \afterfifi\@firstoftwo% if |#1| is a~single \CS, we
+ % \incmd\xiistring\ it. Otherwise we \incmd\detokenize\ it.
+ \else\afterfifi\@secondoftwo
+ \fi
+ \else\@xa\@secondoftwo
+ \fi
+ {\xdef\last@defmark{\xiistring#1}}% we |\string| the argument just in case it's
+ % a~control sequence. But when it can be a~\CS, we |\@defentryze| in
+ % a~scope of |\escapechar=-1|, so there will never be a~backslash at
+ % the beginning of |\last@defmark|'s meaning (unless we
+ % |\@defentryze| |\\|).
+ {\xdef\last@defmark{\detokenize{#1}}}%
+ \@xa\gdef\csname gmd/isaCS/\last@defmark\endcsname{#2}% |#2| is
+}% of |\@defentryze|.
+
+\long\def\@usgentryze#1{%
+ \@xa\let\csname gmd/usgentry/\detokenize{#1}\endcsname\gmd@justadot}
+
+\@emptify\envirs@toindex
+
+\outer\def\CodeUsgIndex{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar
+ {\@sanitize\MakePrivateOthers%^^A\verbatim@specials
+ \Code@UsgIndexStar}%
+ {\Code@UsgIndex}}
+\long\def\Code@UsgIndex#1{%
+ \endgroup{%
+ \escapechar\m@ne
+ \global\@usgentryze{#1}}}
+
+\long\def\Code@UsgIndexStar#1{%
+ \endgroup
+ {%^^A\verbatim@specials
+ \addto@estoindex{#1}%
+ \@usgentryze{#1}}%
+}
+
+\outer\def\CodeCommonIndex{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar
+ {\MakePrivateOthers\@sanitize\Code@CommonIndexStar}%
+ {\Code@CommonIndex}}
+
+\long\def\Code@CommonIndex#1{\endgroup}
+
+\long\def\Code@CommonIndexStar#1{%
+ \endgroup\addto@estoindex{#1}}
+
+\long\def\text@indexmacro#1{%
+ {\escapechar\m@ne \xdef\macro@pname{\xiistring#1}}%
+ % ^^A \typeout{@@@@ 4803}%
+ \@xa\quote@mname\macro@pname\relax% we process the \CS's
+ % name char by char and quote MakeIndex controls. |\relax| is the
+ % iterating macro's stopper. The scanned \CS's quoted name shall be the
+ % expansion of |\macro@iname|.
+ \if\verbatimchar\macro@pname
+ \def\im@firstpar{[$]}%^^A$
+ \else\def\im@firstpar{}%
+ \fi
+ {\do@properindex% see line \ref{do@properindex}.
+ \@xa \index@macro\im@firstpar\macro@iname\macro@pname}}
+
+\def\quote@mname{%
+ \def\macro@iname{}%
+ \quote@charbychar}
+
+\def\quote@charbychar#1{%
+ \ifx\relax#1% finish quoting when you meet |\relax| or:
+ \else
+ \ifnum0\ifcat\@nx#1\@nx~1\fi\ifcat\@nx#1\relax1\fi>0 % we can meet
+ % active char and/or control sequences (made by) verbatim
+ % specials, therefore we check whether \inhash1 is an active char
+ % and if it is a~\CS.
+ \afterfifi{% we can meet an active char or a~\CS iff we use
+ % verbatim specials.
+ \ifdefined\verbatim@specials@list
+ \afterfi{%
+ \begingroup
+ \escapechar\@xa\@xa\@xa`\@xa\@firstofmany\verbatim@specials@list\@nil
+ \@xa\endgroup
+ \@xa\quote@charbychar\detokenize{#1}%% for a~\CS\
+ % \incs{detokenize} adds a~space but if so, it will be ignored
+ % by the argument scanner.
+ }% of |\afterfi|.
+ \else\PackageError{gmdoc}{Please report a\space bug in
+ \bslash quote@charbychar in line 4934}{}%
+ \fi% of |\ifdefined\verbatim@specials@list|.
+ }% of |\afterfifi|.
+ \else
+ \quote@char#1%
+ \xdef\macro@iname{\macro@iname \gmd@maybequote#1}%
+ \afterfifi\quote@charbychar
+ \fi
+ \fi}
+
+\def\TextUsgIndex{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar{\MakePrivateOthers\Text@UsgIndexStar}{\Text@UsgIndex}}
+
+\long\def\Text@UsgIndex#1{%
+ \endgroup\@usgentryze#1%
+ \text@indexmacro#1}
+
+\long\def\Text@UsgIndexStar#1{\endgroup\@usgentryze{#1}%
+ \text@indexenvir{#1}}
+
+\long\def\text@indexenvir#1{%
+ {\verbatim@specials
+ \edef\macro@pname{\xiistring#1}%
+ \if\bslash\@xa\@firstofmany\macro@pname\@nil% if
+ % |\string|ed |#1| begins with a~backslash, we will gobble it
+ % to make MakeIndex not see it.
+ \edef\gmu@tempa{\@xa\@gobble\macro@pname}%
+ \@tempswatrue
+ \else
+ \let\gmu@tempa\macro@pname
+ \@tempswafalse
+ \fi
+ % ^^A \typeout{@@@@@ 4858}%
+ \@xa\quote@mname\gmu@tempa\relax% \label{quote@mname comm}we
+ % process |\string|ed |#1| char by char and quote MakeIndex
+ % controls. |\relax| is the iterating macro's stopper. The quoted
+ % |\string|ed |#1| shall be the meaning of |\macro@iname|.
+ \if@tempswa
+ \def\quoted@eschar{\quotechar\bslash}%
+ \else\@emptify\quoted@eschar\fi% we won't print any backslash before
+ % an environment's name, but we will before a~\CS's name.
+ \do@properindex% see line \ref{do@properindex}.
+ \index@macro\macro@iname\macro@pname}}
+
+\def\TextCommonIndex{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar{\MakePrivateOthers\Text@CommonIndexStar}{\Text@CommonIndex}}
+
+\long\def\Text@CommonIndex#1{\endgroup
+ \text@indexmacro#1}
+
+\long\def\Text@CommonIndexStar#1{\endgroup
+ \text@indexenvir{#1}}
+
+
+\outer\def\CodeMarginize{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar
+ {\MakePrivateOthers\egCode@MarginizeEnvir}
+ {\egCode@MarginizeMacro}}
+
+\long\def\egCode@MarginizeMacro#1{\endgroup
+ \Code@MarginizeMacro#1}
+
+\long\def\Code@MarginizeMacro#1{{% |#1| is always a~\CS.
+ % ^^A \typeout{@@@@ :::\xiistring#1:::}%
+ % ^^A \show\detokenize
+ \escapechar\m@ne
+ \@xa\glet\csname gmd/2marpar/\xiistring#1\endcsname\gmd@justadot
+ }}
+
+\long\def\egCode@MarginizeEnvir#1{\endgroup
+ \Code@MarginizeEnvir{#1}}
+
+\long\def\Code@MarginizeEnvir#1{\addto@estomarginpar{#1}}
+
+\def\mark@envir{%\label{mark@envir}
+ \ifx\envirs@tomarginpar\@empty
+ \else
+ \def\do{\Text@Marginize*}%
+ \envirs@tomarginpar%
+ \g@emptify\envirs@tomarginpar%
+ \fi
+ \ifx\envirs@toindex\@empty
+ \else
+ {\verbatim@specials
+ \gmd@doindexingtext
+ \envirs@toindex
+ \g@emptify\envirs@toindex}%
+ \fi}
+
+\def\gmd@doindexingtext{%
+ \def\do##1{% the |\envirs@toindex| list contains |\string|ed
+ % macros or environments' names in braces and each preceded
+ % with |\do|. We extract the definition because we use it also in
+ % line \ref{gmd@doindexingtext 2nd use}.
+ \if\bslash\@firstofmany##1\@nil% if
+ % |##1| begins with a~backslash, we will gobble it for
+ % MakeIndex not see it.
+ \edef\gmd@resa{\@gobble##1}%
+ \@tempswatrue
+ \else
+ \edef\gmd@resa{##1}\@tempswafalse
+ \fi
+ \@xa\quote@mname\gmd@resa\relax% see line
+ % \ref{quote@mname comm} \& subs. for commentary.
+ {\if@tempswa
+ \def\quoted@eschar{\quotechar\bslash}%
+ \else\@emptify\quoted@eschar
+ \fi
+ \index@macro\macro@iname{##1}}}%
+}
+
+\@emptify\envirs@tomarginpar
+\@emptify\envirs@toindex
+
+\outer\def\Define{% note that since it's |\outer|, it doesn't have to
+ % be \incmd\protected.
+ \begingroup
+ \MakePrivateLetters
+ \gmu@ifstar{\@sanitize%^^A\verbatim@specials
+ \Code@DefEnvir}{\Code@DefMacro}}
+
+\outer\def\CodeUsage{\begingroup
+ \MakePrivateLetters
+ \gmu@ifstar{%
+ \@sanitize%^^A\verbatim@specials
+ \MakePrivateOthers
+ \Code@UsgEnvir}{\Code@UsgMacro}}
+
+\DeclareCommand\Code@DefMacro\long{om}{%
+ \Code@DefIndex#2% we use the internal macro; it'll close the group.
+ \IfValueTF{#1}%
+ {\Code@MarginizeMacro#1}%
+ {\Code@MarginizeMacro#2}%
+}
+
+\DeclareCommand\Code@UsgMacro\long{om}{%
+ \Code@UsgIndex#2% here also the internal macro; it'll close the
+ % group
+ \IfValueTF{#1}%
+ {\Code@MarginizeMacro#1}%
+ {\Code@MarginizeMacro#2}%
+}
+
+\def\codeline@wrindex#1{\if@filesw
+ \immediate\write\@indexfile
+ {\string\indexentry{#1}%
+ {\HLPrefix\number\c@codelinenum}}\fi}
+
+\def\codeline@glossary#1{% It doesn't need to establish a~group since
+ % it is always called in a~group.
+ \if@pageinclindex
+ \edef\gmu@tempa{gmdindexpagecs{\HLPrefix}{relax}{\EntryPrefix}}%
+ \else
+ \edef\gmu@tempa{gmdindexrefcs{\HLPrefix}{relax}{\EntryPrefix}}% \inverb|relax| stands for the formatting command. But we don't want to do anything special with the change history entries. \ilrr
+ \fi
+ \protected@edef\gmu@tempa{%
+ \@nx\protected@write\@nx\@glossaryfile{}%
+ {\string\glossaryentry{#1\encapchar\gmu@tempa}%
+ {\HLPrefix\number\c@codelinenum}}}%
+ \gmu@tempa
+}
+
+
+\AtBeginDocument{%
+ \if@pageindex
+ \let\special@index=\index
+ \let\gmd@glossary\glossary
+ \else
+ % \DefIndex\special@index
+ \let\special@index=\codeline@wrindex
+ \let\gmd@glossary\codeline@glossary
+ % \label{codeline indexnumber declaration}
+ \fi}% postponed till |\begin{document}| with respect of \docfm-like
+
+\def\gag@index{\let\index=\@gobble
+ %\label{gag@index}
+ \let\codeline@wrindex=\@gobble}
+\Store@Macros{\index\codeline@wrindex}
+
+\def\ungag@index{\Restore@Macros {\index\@@codeline@wrindex}}
+ %\label{ungag@index}
+
+\DeclareCommand\Code@DefEnvir\long{om}{%
+ \endgroup
+ % ^^A \typeout{@@@@@ 5069: \unexpanded{#1}}%
+ {%^^A\verbatim@specials
+ \IfValueTF{#1}%
+ {\addto@estomarginpar{#1}}%
+ {\addto@estomarginpar{#2}}%
+ \addto@estoindex{#2}%
+ \@defentryze{#2}{0}}}
+
+\DeclareCommand\Code@UsgEnvir\long{om}{%
+ \endgroup
+ {%^^A~\verbatim@specials
+ \IfValueTF{#1}%
+ {\addto@estomarginpar{#1}}%
+ {\addto@estomarginpar{#2}}%
+ \addto@estoindex{#2}%
+ \@usgentryze{#2}}}
+
+\long\def\addto@estomarginpar#1{%
+ % ^^A \def\gmu@tempa{\do{#1}}% we |\string|ed the argument to
+ % ^^A % allow it to be a~control sequence but now (2008/12/14) it's not
+ % ^^A % necessary because |#1| is sanitised.
+ % ^^A \@xa\gaddtomacro\@xa\envirs@tomarginpar\@xa{\gmu@tempa}
+\gaddtomacro\envirs@tomarginpar{\do{#1}}}
+
+\long\def\addto@estoindex#1{%
+ % ^^A \typeout{@@@@ \unexpanded{#1}}%
+ % ^^A \edef\gmu@tempa{\@nx\do{\xiistring#1}}
+ % ^^A \@xa\gaddtomacro\@xa\envirs@toindex\@xa{\gmu@tempa}
+ \gaddtomacro\envirs@toindex{\do{#1}}}
+
+\def\TextUsage{\begingroup
+ % \chgs{2008/12/8 v0.99s added \cmd\@sanitize\ in the starred
+ % version}
+ % \label{TextUsage}
+ \MakePrivateLetters
+ \gmu@ifstar{\@sanitize\MakePrivateOthers
+ \Text@UsgEnvir}{\Text@UsgMacro}}
+
+\DeclareCommand\Text@UsgMacro\long{om}{%
+ \endgroup
+ % \chgs[\narrativett]{2008/12/12 v0.99s introduced in \pk{gmutils}
+ % and employed in the narrative verbatims, including \cs{ampulexdef}
+ % of the \pk{gmverb} macros}
+ \IfValueTF{#1}%
+ {\Text@Marginize*{#1}{\scanverb*{#1}}}%
+ {\Text@Marginize*{#2}{\scanverb*{#2}}}%
+ \begingroup\Code@UsgIndex#2% we declare the kind of formatting of the entry.
+ \text@indexmacro#2}
+
+\DeclareCommand\Text@UsgEnvir\long{om}{%
+ \endgroup
+ % ^^A \typeout{@@@@ :::\detokenize{#1}::::}%
+ % ^^A \typeout{@@@@ :::\detokenize{#2}::::}%
+ \IfValueTF{#1}%
+ {\Text@Marginize*{#1}{\scanverb*{#1}}}%
+ {\Text@Marginize*{#2}{\scanverb*{#2}}}%
+ \@usgentryze{#2}% we declare the `usage' kind of formatting of the
+ % entry and index the sequence |#1|.
+ \text@indexenvir{#2}}
+
+\pdef\TextMarginize{\@bsphack\begingroup
+ % \chgs{2008/12/8 v0.99s added \cmd\@sanitize\ in the starred
+ % version}
+ \MakePrivateLetters
+ \gmu@ifstar{%
+ \MakePrivateOthers\egText@MarginizeEnv}{\egText@MarginizeCS}}
+
+\long\def\egText@MarginizeEnv#1{\endgroup
+ \Text@Marginize*{#1}% \chgs{2008/12/07 v0.99s a~bug fixed: braces
+ % added around \hash1}
+ \@esphack}
+
+\long\def\egText@MarginizeCS#1{%
+ \endgroup
+ \Text@Marginize*{#1}%
+}
+
+\if@marginparsused
+ \reversemarginpar
+ \marginparpush\z@
+ \marginparwidth8pc\relax
+ % ^^A \settowidth{\marginparsep}{\ \ }%
+ %
+ % You may wish to put not only macros and environments to
+ % a~marginpar.
+ \long\def\gmdmarginpar#1{%
+ \marginpar{\raggedleft\strut
+ \hskip0ptplus100ptminus100pt%
+ #1}}%\stanza
+ %
+\else
+ \long\def\gmdmarginpar#1{}%
+\fi
+
+\let\gmu@tempa\all@stars
+\@xa\addtomacro\@xa\gmu@tempa\@xa{\all@unders}
+\@xa\DeclareCommand\@xa\Text@Marginize\@xa!%
+\@xa{\@xa Q\@xa{\gmu@tempa}m}{%
+ \gmdmarginpar{%
+ \addtomacro\verb@lasthook{\marginpartt}%
+ \IfValueTF{#1}{\scanverb#1}{\scanverb}{#2}}%
+}% of |\Text@Marginize|.
+\let\marginpartt\narrativett
+
+\def\do@properindex{%\label{do@properindex}
+ \if@printalllinenos\else
+ \@pageinclindextrue
+ \let\special@index=\index
+ \fi}
+
+
+\newenvironment*{macrocode*}{%\label{macrocode*}
+ \if@codeskipput\else\par\addvspace\CodeTopsep\@codeskipputgtrue\fi
+ \QueerEOL}%^^A\docstrips
+ {\par\addvspace\CodeTopsep\CodeEscapeChar\\}
+ % Let's remind that the starred version makes | |
+
+\newenvironment*{macrocode}{%\label{macrocode}
+ \if@codeskipput\else\par\addvspace\CodeTopsep\@codeskipputgtrue\fi
+ \QueerEOL}% \changes{v0.99l}{2008/08/06}{removed \cs{CodeSpacesBlank}}
+ {\par\addvspace\CodeTopsep\CodeEscapeChar\\}
+\let\oldmc\macrocode
+\let\endoldmc\endmacrocode
+\n@melet{oldmc*}{macrocode*}
+\n@melet{endoldmc*}{endmacrocode*}
+
+\addtomacro\oldmc{\@oldmacrocode@launch}%
+\@xa\addtomacro\csname oldmc*\endcsname{%
+ \@oldmacrocode@launch}
+
+\def\@oldmacrocode@launch{%
+ \emptify\gmd@textEOL% to disable it in |\gmd@docstripdirective|
+ % launched within the code.
+ \gmd@ctallsetup
+ \glet\stored@code@delim\code@delim
+ \@makeother\^^B\CodeDelim*\^^B%
+ \ttverbatim \gmd@DoTeXCodeSpace
+ \@makeother\|% because |\ttverbatim| doesn't do that.
+ \MakePrivateLetters% see line \ref{MPL}.\par
+ % ^^A \@xa\@makeother\code@delim
+ \docstrips@percent \@makeother\>%
+ % sine qua non of the automatic delimiting is replacing possible
+ % |*|\catother in the environment's name with |*|\catletter.
+ % Not to complicate assume |*| may occur at most once and only at
+ % the end. We also assume the environment's name consists only of
+ % character tokens whose catcodes (except of |*|) will be the same
+ % in the verbatim text.
+ \@xa\gmd@currenvxistar\@currenvir*\relax
+ \@oldmacrocode}
+
+\foone{\catcode`*11 }
+{\def\gmu@xistar{*}}
+
+\def\gmd@currenvxistar#1*#2\relax{%
+ \edef\@currenvir{#1\if*#2\gmu@xistar\fi}}
+
+\foone{%
+\catcode`[=1 \catcode`]=2
+\catcode`\{=\active \@makeother\}
+\@makeother\^^B
+\catcode`/=0 \catcode`\\=\active
+\catcode`&=14 \catcode`*=11
+\catcode`\%=\active \obeyspaces}& % \CodeEscapeChar\/ \CDAnd
+[& here the \cs{foone}'s second pseudo-argument begins
+&%\stanza
+/def/@oldmacrocode[&
+/bgroup/let =/relax&% to avoid writing |/@nx | four times.
+/xdef/oldmc@def[&
+/def/@nx/oldmc@end####1/@nx% /@nx\end&
+/@nx{/@currenvir}[&
+####1^^B/@nx/gmd@oldmcfinis]]&
+/egroup&% now |\oldmc@edef| is defined to have one parameter delimited
+&% with \incmd\end\arg{current env.'s name}
+/oldmc@def&
+/oldmc@end]&% \CDPerc
+]
+
+\def\gmd@oldmcfinis{%
+ \def\gmu@tempa{\end{\@currenvir}}%
+ \@xa\gmu@tempa\@xa\def\@xa\gmd@lastenvir\@xa{\@currenvir}%
+ \@xa\CodeDelim\@xa*\stored@code@delim
+ \gmd@mchook}% see line \ref{gmd@mchook}
+
+\def\OldMacrocodes{%% \changes{v0.99m}{2008/08/10}{renamed from
+ %% \cs{VerbMacrocodes}}
+ \let\macrocode\oldmc
+ \n@melet{macrocode*}{oldmc*}}
+
+
+\foone{\catcode`\%\active}
+{\def\docstrips@percent{\catcode`\%\active
+ \let%\gmd@codecheckifds}}
+
+\def\gmd@codecheckifds#1#2{% note that |#1| is just to gobble
+ % \inverb|\gmd@charbychar| token.
+\typeout{@@@@@ codecheckifds hash 1: »\unexpanded{#1}«, 2: »\unexpanded{#2}«}%
+ \ifnum \if@dsdir 1\else 0\fi\ifgmd@dsVerb 1\fi>\z@
+ \afterfi{%
+ \gmd@dsChecker{%
+ \if\@nx<\@nx#2\afterfi\gmd@docstripdirective
+ \else\afterfi{\xiipercent#1#2}%
+ \fi}% of the checker's arg
+ }% of |\afterfi|
+ \else\afterfi{\xiipercent#1#2}%
+ \fi}
+\newenvironment{macro}{%\label{macro}
+ \@tempskipa=\MacroTopsep
+ \if@codeskipput\advance\@tempskipa by-\CodeTopsep\fi
+ \par\addvspace{\@tempskipa}\@codeskipputgtrue
+ \begingroup\MakePrivateLetters\MakePrivateOthers% we make also the
+ % `private others' to cover the case of other sequence in the
+ % argument. (We'll use the |\macro| macro also in the environment
+ % for describing and defining environments.)
+ \gmd@ifonetoken\Hybrid@DefMacro\Hybrid@DefEnvir}%
+ {\par\addvspace\MacroTopsep\@codeskipputgtrue}
+ % It came out that the \docfm's author(s) give the \env{macro}
+ % environment also starred versions of commands as argument. It's \acro{OK}
+ % since (the default version of) |\MakePrivateLetters| makes |*|
+ % a~letter and therefore such a~starred version is just one \CS.
+ % However, in \pk{doc.dtx} occur \env{macro}s that mark
+ % \emph{implicit} definitions i.e., such that the defined \CS is not
+ % scanned in the subsequent code.
+\@namedef{macro*}{\let\gmd@ifonetoken\@secondoftwo\macro}
+\@xa\let\csname endmacro*\endcsname\endmacro
+\def\gmd@ifsingle#1#2\@nil{%
+ \def\gmu@tempa{#2}%
+ \ifx\gmu@tempa\@empty}
+\def\gmd@ifonetoken#1#2#3{%
+ \def\gmu@tempb{#3}% We hide |#3| from \TeX\ in case it's |\if›…| or
+ % so. \inverb|\gmu@tempa| is used in \inverb|\gmd@ifsingle|. \ilrr
+ \gmd@ifsingle#3\@nil
+ \afterfi{\@xa#1\gmu@tempb}%
+ \else
+ \edef\gmu@tempa{\@xa\string\gmu@tempb}%
+ \afterfi{\@xa#2\@xa{\gmu@tempa}}%
+ \fi}
+\long\def\Hybrid@DefMacro#1{%
+ \Code@DefIndex{#1}% this macro closes the group opened by |\macro|.
+ \Text@MarginizeNext{*{#1}}}
+
+\long\def\Hybrid@DefEnvir#1{%
+ \Code@DefIndexStar{#1}% this macro also closes the group begun by
+ % |\macro|.
+ \Text@MarginizeNext{*{#1}}}
+
+\long\def\Text@MarginizeNext#1{%
+ \gmd@evpaddonce{\Text@Marginize#1\ignorespaces}}
+
+\long\def\gmd@evpaddonce#1{%
+ \global\advance\gmd@oncenum\@ne
+ \@xa\long\@xa\edef% \CodeUsgIndex*{NeuroOncer}
+ \csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname{%
+ \@nx\g@relaxen
+ \csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname}% Why does it
+ % work despite it shouldn't? Because when the \CS got with
+ % \inverb|\csname›…\endcsname| is undefined, it's equivalent to
+ % |\relax| and therefore unexpandable. That's why it passes
+ % \inverb|\edef| and is able to be assigned.\ilrr
+ \@xa\addtomacro\csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname{#1}%
+ \@xa\addto@hook\@xa\everypar\@xa{%
+ \csname gmd/evp/NeuroOncer\the\gmd@oncenum\endcsname}%
+}
+
+\newcount\gmd@oncenum
+
+\@xa\let\@xa\environment\csname macro*\endcsname
+\@xa\let\@xa\endenvironment\csname endmacro*\endcsname
+
+\def\DoNotIndex{\bgroup\MakePrivateLetters\DoNot@Index}
+
+\long\def\DoNot@Index#1{\egroup% we close the group,
+ \let\gmd@iedir\gmd@justadot% we declare the direction of the \<?>cluding
+ % to be \emph{ex}cluding. We act this way to be able to reverse the
+ % exclusions easily later.\ilrr
+ \dont@index#1.}
+
+\long\def\dont@index#1{%
+ \def\gmu@tempa{\@nx#1}% My \TeX\ Guru's trick to deal with |\fi|
+ % and such, i.e., to hide from \TeX\ when it is processing a~test's
+ % branch without expanding.
+ \if\gmu@tempa.% a~dot finishes expelling
+ \else
+ \if\gmu@tempa,% The list this macro is put before may
+ % contain commas and that's O.K., we just continue the work.
+ \afterfifi\dont@index
+ \else% what is else shall off the Index be expelled.
+ {\escapechar\m@ne
+ \xdef\gmu@tempa{\string#1 }}% its to sound with
+ % \incs{detokenize}s in tests.
+ \@xa\let%
+ \csname gmd/iexcl/\gmu@tempa\endcsname=\gmd@iedir% In the default
+ % case explained e.g.\ by the macro's name, the last macro's
+ % meaning is such that the test in line \ref{iexcltest} will
+ % turn false and the subject \CS shall not be indexed.
+ % We |\let| not |\def| to spare \TeX's memory.
+ \afterfifi\dont@index
+ \fi
+ \fi}
+
+\DoNotIndex\{ \DoNotIndex\}% \label{DNIbraces}the index entries of
+
+\begin{MakePrivateLetters}% Yes, |\DoNotIndex| does
+ % |\MakePrivateLetters| on its own but No, it won't have any effect
+ % if it's given in another macro's |\def|.
+ % \HideAllDefining
+ \gdef\DefaultIndexExclusions{%
+ \DoNotIndex{\@ \@@par \@beginparpenalty \@empty}%\label{DIE1}
+ \DoNotIndex{\@flushglue \@gobble \@input}%
+ \DoNotIndex{\@makefnmark \@makeother \@maketitle}%
+ \DoNotIndex{\@namedef \@ne \@spaces \@tempa}%
+ \DoNotIndex{\@tempb \@tempswafalse \@tempswatrue}%
+ \DoNotIndex{\@thanks \@thefnmark \@topnum}%
+ \DoNotIndex{\@@ \@elt \@forloop \@fortmp \@gtempa \@totalleftmargin}%
+ \DoNotIndex{\" \/ \@ifundefined \@nil \@verbatim \@vobeyspaces}%
+ \DoNotIndex{\| \~ \ \active \advance \aftergroup \begingroup \bgroup}%
+ \DoNotIndex{\mathcal \csname \def \documentstyle \dospecials \edef}%
+ \DoNotIndex{\egroup}%
+ \DoNotIndex{\else \endcsname \endgroup ⵢendinput \endtrivlist}%
+ \DoNotIndex{\expandafter \fi \fnsymbol \futurelet \gdef \global}%
+ \DoNotIndex{\hbox \hss \if \if@inlabel \if@tempswa \if@twocolumn}%
+ \DoNotIndex{\ifcase}%
+ \DoNotIndex{\ifcat \iffalse \ifx \ignorespaces \index \input \item}%
+ \DoNotIndex{\jobname \kern \leavevmode \leftskip \let \llap \lower}%
+ \DoNotIndex{\m@ne \next \newpage \nobreak \noexpand \nonfrenchspacing}%
+ \DoNotIndex{\obeylines \or \protect \raggedleft \rightskip \rm \sc}%
+ \DoNotIndex{\setbox \setcounter \small \space \string \strut}%
+ \DoNotIndex{\strutbox}%
+ \DoNotIndex{\thefootnote \thispagestyle \topmargin \trivlist \tt}%
+ \DoNotIndex{\twocolumn \typeout \vss \vtop \xdef \z@}%
+ \DoNotIndex{\, \@bsphack \@esphack \@noligs \@vobeyspaces \@xverbatim}%
+ \DoNotIndex{\` \catcode \end \escapechar \frenchspacing \glossary}%
+ \DoNotIndex{\hangindent \hfil \hfill \hskip \hspace \ht \it \langle}%
+ \DoNotIndex{\leaders \long \makelabel \marginpar \markboth \mathcode}%
+ \DoNotIndex{\mathsurround \mbox}%\verb+% \newcount \newdimen \newskip+
+ \DoNotIndex{\nopagebreak}%
+ \DoNotIndex{\parfillskip \parindent \parskip \penalty \raise \rangle}%
+ \DoNotIndex{\section \setlength \TeX \topsep \underline \unskip}%
+ \DoNotIndex{\vskip \vspace \widetilde \\ \% \@date \@defpar}%
+ \DoNotIndex{\[ \]}% see line \ref{DNIbraces}.
+ \DoNotIndex{\count@ \ifnum \loop \today \uppercase \uccode}%
+ \DoNotIndex{\baselineskip \begin \tw@}%
+ \DoNotIndex{\a \b \c \d \e \f \g \h \i \j \k \l \m \n \o \p \q}%
+ \DoNotIndex{\r \s \t \u \v \w \x \y \z \A \B \C \D \E \F \G \H}%
+ \DoNotIndex{\I \J \K \L \M \N \O \P \Q \R \S \T \U \V \W \X \Y \Z}%
+ \DoNotIndex{\1 \2 \3 \4 \5 \6 \7 \8 \9 \0}%
+ \DoNotIndex{\! \# \$ \& \' \( \) \. \: \; \< \= \> \? \_}% |\+|
+ % seems to be so rarely used that it may be advisable to index it.
+ \DoNotIndex{\discretionary \immediate \makeatletter \makeatother}%
+ \DoNotIndex{\meaning \newenvironment \par \relax \renewenvironment}%
+ \DoNotIndex{\repeat \scriptsize \selectfont \the \undefined}%
+ \DoNotIndex{\arabic \do \makeindex \null \number \show \write \@ehc}%
+ \DoNotIndex{\@author \@ehc \@ifstar \@sanitize \@title}%
+ \DoNotIndex{\if@minipage \if@restonecol \ifeof \ifmmode}%
+ \DoNotIndex{\lccode %|%\newtoks|
+ \onecolumn \openin \p@ \SelfDocumenting}%
+ \DoNotIndex{\settowidth \@resetonecoltrue \@resetonecolfalse \bf}%
+ \DoNotIndex{\clearpage \closein \lowercase \@inlabelfalse}%
+ \DoNotIndex{\selectfont \mathcode \newmathalphabet \rmdefault}%
+ \DoNotIndex{\bfdefault}%
+ % From the above list I~removed some |\new›…| declarations because
+ % I~think it may be useful to see gathered the special |\new›…|s of
+ % each kind. For the same reason I~would not recommend excluding
+ % from the index such declarations as |\AtBeginDocument|,
+ % |\AtEndDocument|, |\AtEndOfPackage|, |\DeclareOption|,
+ % |\DeclareRobustCommand| etc. But the
+ % common definitions, such as |\›(new⁄|provide›)command| and
+ % |\›(e⁄|g⁄|x›)def|s, as the most common, in my opinion excluded should
+ % be.^^A\)
+ %
+ % \stanza
+ % And some my exclusions:
+ \DoNotIndex{\@@input \@auxout \@currentlabel \@dblarg}%
+ \DoNotIndex{\@ifdefinable \@ifnextchar \@ifpackageloaded}%
+ \DoNotIndex{\@indexfile \@let@token \@sptoken \^}% the latter comes
+ % from \CSs like |\^^M|, see sec. \ref{Tasks}.
+ \DoNotIndex{\addto@hook \addvspace}%
+ \DoNotIndex{\CurrentOption}%
+ \DoNotIndex{\emph \empty \firstofone}%
+ \DoNotIndex{\font \fontdimen \hangindent \hangafter}%
+ \DoNotIndex{\hyperpage \hyperlink \hypertarget}%
+ \DoNotIndex{\ifdim \ifhmode \iftrue \ifvmode \medskipamount}%
+ \DoNotIndex{\message}%
+ \DoNotIndex{\NeedsTeXFormat \newcommand \newif}%
+ \DoNotIndex{\newlabel}%
+ \DoNotIndex{\of}%
+ % ^^A\PassOptionsToClass\PassOptionsToPackage
+ \DoNotIndex{\phantom \ProcessOptions \protected@edef}%
+ \DoNotIndex{\protected@xdef \protected@write}%
+ \DoNotIndex{\ProvidesPackage \providecommand}%
+ \DoNotIndex{\raggedright}%
+ \DoNotIndex{\raisebox \refstepcounter \ref \rlap}% ^^A\RequirePackage
+ \DoNotIndex{\reserved@a \reserved@b \reserved@c \reserved@d}%
+ \DoNotIndex{\stepcounter \subsection \textit \textsf \thepage \tiny}%
+ \DoNotIndex{\copyright \footnote \label \LaTeX}%
+ % \changes[\DefaultIndexExclusions]{v0.98a}{06/09/06}{more
+ % macros added to the `exclude list'}
+ \DoNotIndex{\@eha \@endparenv \if@endpe \@endpefalse \@endpetrue}%
+ \DoNotIndex{\@evenfoot \@oddfoot \@firstoftwo \@secondoftwo}%
+ \DoNotIndex{\@for \@gobbletwo \@idxitem \@ifclassloaded}%
+ \DoNotIndex{\@ignorefalse \@ignoretrue \if@ignore}%
+ \DoNotIndex{\@input@ \@input}%
+ \DoNotIndex{\@latex@error \@mainaux \@nameuse}%
+ \DoNotIndex{\@nomath \@oddfoot}%|%\@onlypreamble| should be indexed
+ % \acro{IMHO}.
+ \DoNotIndex{\@outerparskip \@partaux \@partlist \@plus}%
+ \DoNotIndex{\@sverb \@sxverbatim}%
+ \DoNotIndex{\@tempcnta \@tempcntb \@tempskipa \@tempskipb}%\\
+ % I~think the layout parameters even the kernel, should not be
+ % excluded: \inverb|\@topsep| \inverb|\@topsepadd|^^B
+ % \ \inverb|\abovedisplayskip| \inverb|\clubpenalty| etc.
+ \DoNotIndex{\@writeckpt}%
+ \DoNotIndex{\bfseries \chapter \part \section \subsection}%
+ \DoNotIndex{\subsubsection}%
+ \DoNotIndex{\char \check@mathfonts \closeout}%
+ \DoNotIndex{\fontsize \footnotemark \footnotetext \footnotesize}%
+ \DoNotIndex{\g@addto@macro \hfilneg \Huge \huge}%
+ \DoNotIndex{\hyphenchar \if@partsw \IfFileExists }%
+ \DoNotIndex{\include \includeonly \indexspace}%
+ \DoNotIndex{\itshape \language \LARGE \Large \large}%
+ \DoNotIndex{\lastbox \lastskip \m@th \makeglossary}%
+ \DoNotIndex{\maketitle \math@fontsfalse \math@fontstrue \mathsf}%
+ \DoNotIndex{\MessageBreak \noindent \normalfont \normalsize}%
+ \DoNotIndex{\on@line \openout \outer}%
+ \DoNotIndex{\parbox \part \rmfamily \rule \sbox}%
+ \DoNotIndex{\sf@size \sffamily \skip}%
+ \DoNotIndex{\textsc \textup \toks@ \ttfamily \vbox}%
+ % \changes[\DoNotIndex]{v0.97}{06/09/04}{Excluding some star-versions of
+ % commands}
+ % \nostanza\noindent
+ % |%% \DoNotIndex{\begin*}| maybe in the future, if the idea gets
+ % popular\dots \nostanza
+ \DoNotIndex{\hspace* \newcommand* \newenvironment* \providecommand*}%
+ \DoNotIndex{\renewenvironment* \section* \chapter*}%\label{DIE2}
+ }% of |\DefaultIndexExclusions|.\par
+ % I~put all the expellings into a~macro because I~want them
+ % to be optional.
+\end{MakePrivateLetters}
+
+\if@indexallmacros\else
+ \DefaultIndexExclusions
+\fi
+
+\def\DoIndex{\bgroup\MakePrivateLetters\Do@Index}
+
+\long\def\Do@Index#1{\egroup\@relaxen\gmd@iedir\dont@index#1.}% note
+
+\def\UndoDefaultIndexExclusions{%
+ \Store@Macro\DoNotIndex
+ % ^^A\dont@index
+ \let\DoNotIndex\DoIndex
+ % ^^A \let\dont@index=\do@index
+ \DefaultIndexExclusions
+ % ^^A \RestoreMacro\dont@index
+ \Restore@Macro\DoNotIndex}
+
+\long\def\IndexPrologue#1{\@bsphack\def\index@prologue{#1}\@esphack}
+
+\def\indexdiv{\@ifundefined{chapter}{\section*}{\chapter*}}
+
+\@ifundefined{index@prologue} {\def\index@prologue{\indexdiv{Index}%
+ \markboth{Index}{Index}%
+ Numbers written in italic refer to the \if@pageindex pages \else
+ code lines \fi where the
+ corresponding entry is described; numbers underlined refer to the
+ \if@pageindex\else code line of the \fi definition; numbers in
+ roman refer to the \if@pageindex pages\else code lines \fi where
+ the entry is used.
+ \if@pageindex\else
+ \ifx\HLPrefix\@empty
+ The numbers preceded with `p.' are page numbers.
+ \else The numbers with no prefix are page numbers.
+ \fi\fi
+ \ifx\IndexLinksBlack\relax\else
+ All the numbers are hyperlinks.
+ % ^^A, they are made black just to let Adobe Reader work
+ % ^^A~faster.
+ \fi
+ \gmd@dip@hook% this hook is intended to let a~user add
+ % something without redefining the entire prologue, see below.
+ }}{}
+
+\@emptify\gmd@dip@hook
+\long\def\AtDIPrologue#1{\g@addto@macro\gmd@dip@hook{#1}}
+
+\AtDIPrologue{%\label{verb:ampulex:index}
+ \ampulexdef\verb\ttverbatim\verbatim@specials
+ {\ttverbatim\verbatim@specials}}
+
+\RequirePackage{multicol}
+
+\newdimen\IndexMin \IndexMin = 133pt\relax% originally it was set
+\newcount\c@IndexColumns \c@IndexColumns = 3
+\renewenvironment{theindex}
+ {\begin{multicols}\c@IndexColumns[\index@prologue][\IndexMin]%
+ \IndexLinksBlack
+ \IndexParms \let\item\@idxitem \ignorespaces}%
+ {\end{multicols}}
+
+\def\IndexLinksBlack{\hypersetup{linkcolor=black}}% To make Adobe
+
+\@ifundefined{IndexParms}
+ {\def\IndexParms{%
+ % \label{IndexParms}
+ \parindent \z@
+ \columnsep 15pt
+ \parskip 0pt plus 1pt
+ \rightskip 15pt
+ \mathsurround \z@
+ \parfillskip=-15pt plus 1 fil % \docfm\ defines this parameter
+ % rigid but that's because of the stretchable space (more
+ % precisely, a~|\dotfill|) between the item and the entries. But
+ % in \pk{gmdoc} we define no such special delimiters, so we add
+ % an infinite stretch.
+ \small
+ \def\@idxitem{\par\hangindent 30pt}%
+ \def\subitem{\@idxitem\hspace*{15pt}}%
+ \def\subsubitem{\@idxitem\hspace*{25pt}}%
+ \def\indexspace{\par\vspace{10pt plus 2pt minus 3pt}}%
+ \ifx\EntryPrefix\@empty\else\raggedright\fi% long (actually,
+ % a~quite \emph{short but nonempty} entry prefix) made space
+ % stretches so terribly large in the justified paragraphs that
+ % we should make |\raggedright| rather.
+ \ifnum\c@IndexColumns>\tw@\raggedright\fi% the numbers in narrow
+ % col\-umns look better when they are |\raggedright| in my opinion.
+ }}{}
+
+\def\PrintIndex{% we ensure the standard meaning of the line end
+ % character not to cause a~disaster.
+ \@ifQueerEOL{\StraightEOL\printindex\QueerEOL}%
+ {\printindex}}
+
+
+\foone{\@makeother\<\@makeother\>
+ \glet\sgtleftxii=<}
+{
+ \def\gmd@docstripdirective{%
+ \begingroup\let\do=\@makeother
+ \do\*\do\/\do\+\do\-\do\,\do\&\do\|\do\!\do\(\do\)\do\>\do\<% ^^Ayes, we
+ % ^^A make \inverb|<|\catother\ since a~directive |<<|\<any text till ^^B>>
+ % ^^A~the end of line> theoretically may occur.
+ \@ifnextchar{<}{%
+ \let\do=\@makeother \dospecials
+ \gmd@docstripverb}
+ {\gmd@docstripinner}}%
+
+ \def\gmd@docstripinner#1>{%
+ \endgroup
+ \def\gmd@modulehashone{%
+ \Module{#1}\space
+ \@afternarrgfalse\@aftercodegtrue\@codeskipputgfalse}%
+ % ^^A \gmd@docstripshook
+ \gmd@textEOL\gmd@modulehashone}
+ % A~word of explanation: first of all, we
+ % close the group for changed |\catcode|s; the directive's text has its
+ % |\catcode|s fixed. Then we put the directive's text wrapped with the
+ % formatting macro into one macro in order to give just one token
+ % the \gmdoc's \TeX\ code scanner.
+ % ^^A But before we launch the \TeX\ code
+ % ^^A scanning with all the b\&w, we virtually restore the meaning of
+ % ^^A further |<|s to let them start further \ds\ directives,
+ % ^^A and after this possible restore (if it \emph{actually} takes place
+ % ^^A depends on the declaration used: |\docstrip| or |\docstrips|) we
+ % Then launch this big \TeX\ code scanning machinery by calling
+ % |\gmd@textEOL| which is an alias for the `narrative' meaning of the
+ % line end. This macro opens the verbatim group and launches the
+ % char-by-char scanner. That is this scanner because of what we
+ % encapsulated the directive's text with the formatting into one
+ % macro: to let it pass the scanner.
+ %
+ % That's why in the `old' macrocodes case the active |%| closes the
+ % group before launching |\gmd@docstripdirective|.
+ %
+ % \stanza
+ % The `verbatim' directive macro works very similarly.
+}
+
+\foone{\@makeother\<\@makeother\>
+ \glet\sgtleftxii=<
+ \catcode`\^^M=\active}%
+{%
+ \def\gmd@docstripverb<#1^^M{%
+ \endgroup%
+ \def\gmd@modulehashone{%
+ \ModuleVerb{#1}\@afternarrgfalse\@aftercodegtrue%
+ \@codeskipputgfalse}%
+ \xdef\gmd@dsVerbDelim{\detokenize{#1}}%
+ \gmd@textEOL\gmd@modulehashone^^M}%
+}
+
+\edef\gmd@dsVerbDelim{\detokenize{#@$$$$#_()(_)*981-71092519-40^^A^^B}}
+
+
+\pdef\dsVerbClose{%
+ \global\gmd@dsVerbtrue}
+
+\providecommand*\Module[1]{{%
+ \mod@math@codes$\langle\mathsf{#1}\rangle$}}
+
+\providecommand*\ModuleVerb[1]{{%
+ \mod@math@codes$\langle\langle\mathsf{#1}$}}
+
+\def\ModuleVerbClose#1{{%
+ \xiipercent
+ \mod@math@codes$\mathsf{#1}$
+ {\normalfont[\ds\ verbatim closing dir.]}}}
+
+\def\mod@math@codes{\mathcode`\|="226A \mathcode`\&="2026 }
+
+\def\gmd@DefineChanges{%
+ \outer\long\def\changes{%
+ \gmd@changes@init
+ \changes@}}
+
+\def\gmd@changes@init{%
+ \@bsphack\begingroup\@sanitize
+ \catcode`\\\z@ \catcode`\ 10 \MakePercentIgnore
+\catcode`\^=7
+ \MakePrivateLetters \StraightEOL
+ \MakeGlossaryControls}
+
+\newcommand\changes[4][]{\PackageWarningNoLine{gmdoc}{%
+ ^^JThe \bslash changes command used \on@line
+ ^^Jwith no \string\RecordChanges\space declared.
+ ^^JI shall not warn you again about it}%
+ %^^A\gmd@countlines{#4}%
+ \renewcommand\changes[4][]{%^^A\gmd@countlines{#4}
+ }}
+
+\def\MakeGlossaryControls{%
+ \edef\actualchar{\string=}\edef\quotechar{\string!}%
+ \edef\levelchar{\string>}\edef\encapchar{\xiiclub}}%for the glossary the
+ % `actual', the `quote' and the `level' chars are respectively |=|,
+ % |!| and |>|, the `encap' char remains untouched. I~decided to
+ % preserve the \docfm's settings for the compatibility.
+
+\newcommand\changes@[4][\generalname]{%
+ \if@RecentChange{#3}% if the date is later than the one stored in
+ % \cs{c@Chang\+es\+Start\+Date},
+ \@tempswafalse
+ \ifx\generalname#1% then we check whether a~\CS-entry is given
+ % in the optional first argument or is it unchanged.
+ \ifx\last@defmark\relax\else% if no particular \CS is
+ % specified in |#1|, we check whether |\last@defmark| contains
+ % something and if so, we put it into |\gmu@tempb| scratch macro.
+ \@tempswatrue
+ \edef\gmu@tempb{% it's a~bug fix: while typesetting traditional
+ % \file{.dtx}es, \inverb|\last@defmark| came out with \inverb|\| at the
+ % beginning (which resulted with \inverb|\\|\<name> in the change
+ % log) but while typesetting the `new' way, it occurred
+ % without the bslash. So we gobble the bslash if it's
+ % present and two lines below we handle the exception of
+ % \inverb|\last@defmark|\equals|{\}| (what would happen if
+ % a~definition of \inverb|\\| was marked in new way \gmdoc ing).%^^A]
+ \if\bslash\last@defmark\else\last@defmark\fi}%
+ \ifx\last@defmark\bslash\let\gmu@tempb\last@defmark\fi%
+ \n@melet{gmd@glossCStest}{gmd/isaCS/\last@defmark}%
+ \fi
+ \else%the first argument isx not |\generalname| i.e.,
+ %a~particular \CS is specified by it (if some day one
+ % wishes to |\changes| |\generalname|, \heshe\ should type
+ % |\changes[generalname]|\dots)
+ \@tempswatrue
+ {\escapechar\m@ne
+ \xdef\gmu@tempb{\string#1}}%
+ \if\bslash\@xa\@firstofmany\string#1\relax\@nil% we check
+ % whether \inverb|#1| is a~\CS\dots\ilrr
+ \def\gmd@glossCStest{1}%\dots\ and tell the glossary if so.
+ \fi
+ \fi
+ \@ifundefined{gmd@glossCStest}{\def\gmd@glossCStest{0}}{}%
+ \protected@edef\gmu@tempa{\@nx\gmd@glossary{%
+ \if\relax\GeneralName\relax\else
+ \GeneralName% it's for the |\DocInclude| case to precede
+ % every |\changes| of the same file with the file name, cf.\ line
+ % \ref{GeneralName}.
+ \fi
+ #2\levelchar%
+ \if@tempswa% If the macro |\last@defmark|
+ % doesn't contain any \CS name (i.e., is empty) nor |#1|
+ % specifies a~\CS, the current
+ % changes entry was done at top-level. In this case we precede
+ % it by |\generalname|.
+ \gmu@tempb
+ \actualchar\bslash verb*%
+ \if\verbatimchar\gmu@tempb$\else\verbatimchar\fi
+ \if1\gmd@glossCStest\quotechar\bslash\fi \gmu@tempb
+ \if\verbatimchar\gmu@tempb$\else\verbatimchar\fi
+ \else
+ \space\actualchar\generalname
+ \fi
+ :\levelchar%^^A\gmd@deeolize{
+ #4%^^A}
+ }}%
+ \gmu@tempa
+ \grelaxen\gmd@glossCStest
+ \fi% of |\if@recentchange|
+ %^^A\gmd@countlines{#4}%
+ \endgroup\@esphack}
+
+\@relaxen\last@defmark
+\@emptify\GeneralName
+
+\def\ChangesGeneral{\grelaxen\last@defmark}% If automatic detection of
+
+\AtBegInput{\ChangesGeneral}
+
+\newcount\c@ChangesStartDate
+
+\def\if@RecentChange#1{%
+ \gmd@setChDate#1\@nil\@tempcnta
+ \ifnum\@tempcnta>\c@ChangesStartDate}
+
+\def\gmd@setChDate#1/#2/#3\@nil#4{% the last parameter will be a~|\count|
+ % register.
+ #4=\numexpr#1*\@M+#2*100+#3\relax
+ %\CH{2010/06/23 changed from \TeX's arithmetic to \cmd\numexpr}
+}
+
+
+\def\ChangesStart#1#2{%
+ \gmd@setChDate#2\@nil\c@ChangesStartDate
+ \typeout{^^JPackage gmdoc info: ^^JChanges' start date #1 memorised
+ as \string<\the\c@ChangesStartDate\string> \on@line.^^J}
+ \advance\c@ChangesStartDate\m@ne% we shall show the changes \emph{at ^^B
+ % the specified day} and later.
+ \ifnum\c@ChangesStartDate>19820900 %\unskip\StraightEOL\footnote{^^A
+ % DEK writes in \textit{\TeX, The Program} of September 1982 as the
+ % date of \TeX\ Version 0.}\QueerEOL\label{TeXVer0}
+ % see \gmiflink[personalchanges]{below}.
+ \edef\gmu@tempa{%
+ \@nx\g@addto@macro\@nx\glossary@prologue{%
+ The changes
+ \if\relax\GeneralName\relax\else of \GeneralName\space\fi
+ earlier than
+ #1 \if\relax#1\relax #2\else(#2)\fi\space are not shown.}}%
+ \gmu@tempa
+ \fi}
+\def\generalname{General}
+
+\def\RecordChanges{\makeglossary\gmd@DefineChanges
+ \@relaxen\RecordChanges}
+
+\newdimen\GlossaryMin \GlossaryMin = 80pt
+\newcount\c@GlossaryColumns \c@GlossaryColumns = 2
+\newenvironment{theglossary}{%
+ \begin{multicols}\c@GlossaryColumns
+ [\glossary@prologue][\GlossaryMin]%
+ \GlossaryParms \IndexLinksBlack
+ \let\item\@idxitem \ignorespaces}%
+ {\end{multicols}}
+
+\long\def\GlossaryPrologue#1{\@bsphack
+ \def\glossary@prologue{#1}%
+ \@esphack}
+\@ifundefined{glossary@prologue}
+ {\def\glossary@prologue{\indexdiv{{Change History}}%
+ \markboth{{Change History}}{{Change History}}%
+ }}{}
+\AtBeginDocument{%
+ \@ifundefined{GlossaryParms}{\let\GlossaryParms\IndexParms}{}}
+
+\def\PrintChanges{% to avoid a~disaster among queer EOLs:
+ \@ifQueerEOL
+ {\StraightEOL\@input@{\jobname.gls}\QueerEOL}%
+ {\@input@{\jobname.gls}}%
+ \g@emptify\PrintChanges}
+
+\pdef\toCTAN{%\
+ % \begin{enumargs}
+ % \item \<year/month/day>\textvisiblespace\<version number>
+ % \end{enumargs}
+ % \changes{v0.99r}{2008/11/22}{added}
+ % \chgs{2008/11/30 v0.99s made a~shorthand for \cs{chgs} not
+ % \cs{changes}}
+ \gmd@changes@init
+ \gmd@toCTAN@}
+
+\def\gmd@toCTAN@#1{%
+ \edef\gmu@tempa{\gmd@chgs@parse#1 \@nil}%
+ \edef\gmu@tempa{%
+ \unexpanded{\changes@[\generalname]}%
+ {\@xa\@firstofthree\gmu@tempa}%
+ {\@xa\@secondofthree\gmu@tempa}%
+ {put to \acro{CTAN} on \@xa\@secondofthree\gmu@tempa}}%
+ \gmu@tempa}
+
+
+\outer\pdef\chgs{\gmd@changes@init\gmd@chgs}
+
+\DeclareCommand\gmd@chgs{%
+ o % the optional \CS the change refers to
+ >!m % change's date, version and text
+}{%
+ \IfValueTF{#1}{%%
+ \edef\gmu@tempa{\@nx\changes@[\unexpanded{#1}]%
+ \@xa\unexpanded\@xa{\gmd@chgs@parse#2\@nil}}}%
+ {\edef\gmu@tempa{\@nx\changes@
+ \@xa\unexpanded\@xa{\gmd@chgs@parse#2\@nil}}}%
+ \gmu@tempa}% of |\gmd@chgs|
+
+\long\def\gmd@chgs@parse#1 #2 #3\@nil{{#2}{#1}{#3}}%
+
+\outer\pdef\CH{%
+ \gmd@changes@init\gmd@chgsplus}
+
+\DeclareCommand\gmd@chgsplus{\SameAs\gmd@chgs}{%
+ \DCUse\gmd@chgs{#1}{#2}%
+ \gmd@threeway{#1}#2\@nil
+}
+
+\long\def\gmd@threeway
+#1% opt. \CS that |\CH| refers to
+#2 % (delimd.\ with a blank) date
+#3 % (delimd.\ with a blank) version
+#4\@nil % text
+{%
+ \par (#2, #3\IfValueT{#1}{, \texttt{\detokenize\@xa{\string#1}}}:)
+ #4\scantokens{}% to provide proper line end which'll take care of
+ % |\par| \&c.
+}
+
+\newcount\check@sum
+
+\def\CheckSum#1{\@bsphack\global\check@sum#1\relax\@esphack}
+
+\newcounter{CheckSum}
+
+\newcommand*\step@checksum{\stepcounter{CheckSum}}
+\AtEndInput{\check@checksum}
+
+\def\check@checksum{\relax
+ \ifnum\check@sum=\z@
+ \edef\gmu@tempa{% why \cs{edef}---see line \ref{wypis sumy}
+ \@nx\typeout{**********************************^^J%
+ * The input file \gmd@inputname\space has no Checksum
+ stated.^^J%
+ * The current checksum is \the\c@CheckSum.^^J%
+ \gmd@chschangeline% a~check sum changes history entry, see below.
+ * (package gmdoc info.)^^J%
+ **********************************^^J}}
+ \else
+ \ifnum\check@sum=\c@CheckSum
+ \edef\gmu@tempa{%
+ \@nx\typeout{*****+*+*+*+*+*+*+*+*+*+^^J%
+ * The input file \gmd@inputname: Checksum passed.^^J%
+ \gmd@chschangeline
+ * (package gmdoc info.)^^J%
+ *****+*+*+*+*+*+*+*+*+*+^^J}}
+ \else
+ \edef\gmu@tempa{%
+ \@nx\typeout{********\gmd@wykrzykniki^^J%
+ *! The input file \gmd@inputname:^^J%
+ *! The CheckSum stated: \the\check@sum\space<> my
+ count: \the\c@CheckSum.^^J%
+ \gmd@chschangeline
+ *! (package gmdoc info.)^^J%
+ ********\gmd@wykrzykniki^^J}}%
+ % \chgs{2008/11/30 v0.99s
+ % \env{\quotechar!*\quotechar!*\quotechar!…} sequence changed to
+ % \env{\quotechar! \quotechar! \quotechar!…} for better
+ % distinction}
+ \fi
+ \fi
+ \gmu@tempa
+ \@xa\AtEndDocument\@xa{\gmu@tempa}%\label{wypis sumy} we print
+ % the checksum notification on the terminal immediately and at end
+ % of \TeX ing not to have to scroll the output far nor search the log.
+ \global\check@sum\z@}
+
+\def\gmd@wykrzykniki{! ! ! ! ! ! ! ! ! ! ! !}
+
+\def\gmd@chschangeline{%
+ \xiipercent\space\string\chschange
+ {\@ifundefined{fileversion}{v???}{\fileversion}}%
+ {\the\year/\the\month/\the\day}%
+ {\the\c@CheckSum}^^J%
+ \xiipercent\space\string\chschange
+ {\@ifundefined{fileversion}{v???}{\fileversion}}%
+ {\@xa\@gobbletwo\the\year/\the\month/\the\day}%
+ {% with two di\-g\-it year in case you use |\ChangesStart|.
+ \the\c@CheckSum}^^J}
+
+\outer\pdef\chschange{% \
+ % \begin{enumargs}
+ % \dc m file version,
+ % \dc m date,
+ % \dc checksum,
+ % \dc o the reason of check sum change, possibly short.
+ % \end{enumargs}
+ \@ifQueerEOL
+ {\def\EOLwasQueer{11}}{\def\EOLwasQueer{10}}%
+ \gmd@changes@init
+ \chschange@}
+
+\DeclareCommand\chschange@{mmmo}{%\label{chschange}
+ \changes@{#1}{#2}{CheckSum #3
+ \IfValueT{#4}{because of #4}%
+ }% |\csname›…| because
+ % \incs{cha\+n\+g\+es} is \inverb|\outer|.
+ \CheckSum{#3}%
+ \IfValueF{#4}{%
+ \if\EOLwasQueer
+ \afterfi{%
+ \@ifnextchar\par{%
+ \@xa\gmd@textEOL\gobble}%
+ {}%
+ }% of |\afterfi|,
+ \fi}% of no value of |#4|,
+}% of |\chschange@|.\nostanza
+
+\newcommand*\ltxPageLayout{%
+ \setlength{\textwidth}{355pt}%
+ \setlength\marginparwidth{95pt}%
+ \setlength\oddsidemargin{82pt}%
+ \setlength\evensidemargin{82pt}}
+
+
+\DeclareCommand\DocInclude{O{}mO{}}{%\
+ % \begin{enumargs}
+ % \dc o path (with closing slash), will not be printed
+ % \dc m file name without extension, will be printed
+ % \dc o file extension (with dot) if not \file{.sty}, \file{.cls},
+ % \file{.tex}, \file{.dtx} nor \file{.fdd}
+ % \end{enumargs}\
+ % originally it took just one
+ % argument. Here we make it take two, first of which is intended to
+ % be the path (with the closing \inverb |/|). This is intended not to print
+ % the path in the page footers only the filename.\par
+ % \CodeUsage\HLPrefix
+ \gdef\HLPrefix{\filesep}%
+ \gdef\EntryPrefix{\filesep}% we define two rather kernel parameters
+ % to expand to the file marker. The first will bring the information
+ % to one of the default \inverb|\IndexPrologue|'s
+ % |\if|s. Therefore the
+ % definition is global. The latter is such for symmetry.
+ \def\GeneralName{#2\actualchar\pk{#2} }% \label{GeneralName} for the
+ % changes' history main level entry.
+ %
+ % Now we check whether we try to include ourselves and if
+ % so---we'll (create and) read an \file{.auxx} file instead of
+ % (the main) \file{.aux} to avoid an infinite recursion of |\input|s.
+ %
+ \edef\gmd@jobname{\jobname}%
+ \edef\gmd@difilename{% we want the filename all `other', just as
+ % in \inverb|\jobname|.
+ \@xa\@xa\@xa\@gobble\@xa\string\csname#2\endcsname}%
+ \ifx\gmd@jobname\gmd@difilename
+ \def\gmd@auxext{auxx}%
+ \else
+ \def\gmd@auxext{aux}%
+ \fi
+ \relax
+ %^^A\if@ltxDocInclude
+ \clearpage
+ % ^^A\fi
+ \gmd@docincludeaux \def\currentfile{gmdoc-IncludeFileNotFound.000}%
+ \let\fullcurrentfile\currentfile
+ \@ifnonempty{#3}%
+ {%
+ \unless\if.\@firstofmany#3\relax\@nil
+ \PackageError{gmdoc}{Optional \xiihash3 of
+ \string\DocInclude\space
+ if present has to begin with a dot (.)}{}%
+ \fi
+ \edef\currentfile{#2#3}%
+ \IfFileExists{#1\currentfile}{}%
+ {\PackageError{gmdoc}{\string\DocInclude\space file
+ \currentfile\space not found}{}}%
+ }% of if extension given.
+ {% if extension not given:
+ \IfFileExists{#1#2.fdd}{\edef\currentfile{#2.fdd}}{% it's not \pk{.fdd},
+ \IfFileExists{#1#2.dtx}{\edef\currentfile{#2.dtx}}{% it's not \pk{.dtx}
+ % either,
+ \IfFileExists{#1#2.sty}{\edef\currentfile{#2.sty}}{% it's not
+ % \pk{.sty},
+ \IfFileExists{#1#2.cls}{\edef\currentfile{#2.cls}}{% it's
+ % not \pk{.cls},
+ \IfFileExists{#1#2.tex}{\edef\currentfile{#2.tex}}{% it's
+ % not \pk{.tex},
+ \IfFileExists{#1#2.fd}{\edef\currentfile{#2.fd}}{% so it
+ % must be \pk{.fd} or error.
+ \PackageError{gmdoc}{\string\DocInclude\space file
+ #1#2.fdd/dtx/sty/cls/tex/fd not found.}{}%
+ }}}}}}%
+ }% of if no extension given
+ % \changes{v0.98j}{06/10/16}{\pk{.fdd} added in \cs{DocInclude}'s
+ % search for the extension.}
+ \edef\currentfile{\@xa\detokenize\@xa{\currentfile}}%
+ \edef\fullcurrentfile{#1\currentfile}%
+ \ifnum\@auxout=\@partaux
+ \@latexerr{\string\DocInclude\space cannot be nested}\@eha
+ \else \@docinclude{#1}#2#3 \fi}% Why is |#2| delimited with | | not
+
+\def\@docinclude#1#2 {% To match the macro's parameter string, is an
+ % answer. But why is |\@docinclude| defined so? Originally, in
+ % \pk{ltxdoc} it takes one argument and it's delimited with a~space
+ % probably in resemblance to the true |\input| \nlpercent(|\@@input| in
+ % \LaTeX). ^^A\if@ltxDocInclude
+ \clearpage
+ %^^A\fi
+ \if@filesw \gmd@writemauxinpaux{#2.\gmd@auxext}\fi% this strange macro with
+ % a~long name is another spurious thing to allow |_| in the filenames (see
+ % line \ref{gmd@writemauxinpaux}). which are allowed anyway unless
+ % active or \cat14.
+ \@tempswatrue
+ \if@partsw \@tempswafalse\edef\gmu@tempb{#2}%
+ \@for \gmu@tempa:=\@partlist\do{\ifx\gmu@tempa\gmu@tempb\@tempswatrue\fi}%
+ \fi
+ \if@tempswa% the file is on |\@partlist|
+ \let\@auxout\@partaux
+ \if@filesw
+ \immediate\openout\@partaux #2.\gmd@auxext\relax% Yes, only |#2|. It's to
+ % create and process the partial \pk{.aux(x)} files always in the main
+ % document's (driver's) directory.
+ % \changes[\DocInclude]{v0.97}{06/09/04}{\protect\TeX forced to
+ % process the partial \pk{.aux}es in the main document directory}
+ \immediate\write\@partaux{\relax}%
+ \fi
+ % \begin{quotation}We need to save (and later restore) various
+ % index-related commands which might be changed by the included
+ % file.\end{quotation}
+ % \changes{v0.98a}{06/09/06}{\cs{MacroStoringDo} renamed (in
+ % \pk{gmutils}) to \cs{StoringAndRelaxingDo}, and
+ % \cs{MacroRestoringDo} to \cs{RestoringDo}.}
+ \StoringAndRelaxingDo\gmd@doIndexRelated
+ \if@ltxDocInclude\part{\currentfile}% In the \pk{ltxdoc}-like setup
+ % we make a~part title page with only the filename and the file's
+ % |\maketitle| will typeset an \pk{article}-like title.
+ \else\let\maketitle=\InclMaketitle
+ \fi% In the default setup we
+ % redefine |\maketitle| to typeset a~common chapter or part heading.
+ \if@ltxDocInclude\xdef@filekey\fi
+ \GetFileInfo{\currentfile}% it's my (GM) addition with the account
+ % of using file info in the included files' title/\:heading etc.
+ \incl@DocInput{\fullcurrentfile}% originally just |\currentfile|.
+ \if@ltxDocInclude\else\xdef@filekey\fi% in the default case we add
+ % new file to the file key \emph{after} the input because in this
+ % case it's the files own |\maketitle| what launches the
+ % sectioning command that increases the counter.
+ % \par And here is the moment to restore the index-related
+ % commands.
+ \RestoringDo\gmd@doIndexRelated
+ % ^^A\if@ltxDocInclude
+ \clearpage
+ % ^^A\fi
+ \gmd@writeckpt{#1#2}%
+ \if@filesw \immediate\closeout\@partaux \fi
+ \else% the file isn't on |\@partlist|
+ \@nameuse{cp@#1#2}%
+ \g@emptify\gmd@ABIOnce
+ \fi
+ \let\@auxout\@mainaux}% end of |\@docinclude|.
+\def\xdef@filekey{{\@relaxen\narrativett% \label{LetTTFRelax}This
+ % assignment is very trickily crafted: it makes \emph{all}
+ % |\narrativett|s present in the |\filekey|'s expansion unexpandable
+ % not only the one added in this step.
+ \xdef\filekey{\filekey, \thefilediv={\narrativett\currentfile}}}}
+
+\def\gmd@writemauxinpaux#1{% \label{gmd@writemauxinpaux}
+ % this name comes from `\emph{write} out to \emph main
+ % \emph{\pk{.aux}} to \emph{in}put \emph partial
+ % \emph{\pk{.aux}}'.\par
+ % We wrap |\@input{|\<partial \pk{.aux}>|}| in a~|_|\catother\
+ % hacked scope. This hack is especially recommended here since the
+ % \pk{.aux} file may contain a~non-|\global| stuff that should not
+ % be localised by a~group that we would have to establish if we
+ % didn't use the hack. (Hope you understand it. If not, notify me
+ % and for now I'll only give a~hint: ``Look at it with the \TeX's
+ % eyes''. More uses of this hack are to be seen in \pk{gmutils}
+ % where they are a~bit more explained.)
+ \immediate\write\@mainaux{%
+ \unexpanded{%
+ \bgroup
+ \@makeother\_% to allow underscore
+ \@makeother\~% to allow paths beginning with |~/|
+ \firstofone}{\egroup
+ \string\@input{#1}}}}
+
+\def\gmd@writeckpt#1{%
+ \immediate\write\@partaux{%
+ \unexpanded{%
+ \bgroup
+ \@makeother\_%
+ \@makeother\~%
+ \firstofone}\@charlb\egroup}%
+ \@writeckpt{#1}%
+ \immediate\write\@partaux{\@charrb}}
+
+\def\gmd@doIndexRelated{%
+ \do\tableofcontents \do\makeindex \do\EnableCrossrefs
+ \do\PrintIndex \do\printindex \do\RecordChanges \do\PrintChanges
+ \do\theglossary \do\endtheglossary}
+
+\@emptify\filesep
+\def\aalph#1{\@aalph{\csname c@#1\endcsname}}
+\def\@aalph#1{%
+ \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\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}
+
+\def\gmd@docincludeaux{%
+ % We set the things for including the files only once.
+ \global\@relaxen\gmd@docincludeaux
+ % By default, we will include multiple files into one document
+ % as chapters in the classes that provide |\chapter| and as parts
+ % elsewhere.
+ \ifx\filediv\relax
+ \ifx\filedivname\relax% (nor |\filediv| neither
+ % |\filedivname| is defined by the user)
+ % \changes[\filediv]{v0.98a}{06/09/06}{definition moved into
+ % \cs{DocInclude} and let \cs{relax} by default ($\quotechar=$a~bug fix).}
+ \@ifundefined{chapter}{%
+ \SetFileDiv{part}}%\changes[\DocInclude]{v0.98f}{06/9/29}{\cs{filediv(name)}
+ % defined as \cs[]{(\protect\bslash)part} for the classes that
+ % don't know \cs{chapter}}
+ {\SetFileDiv{chapter}}%
+ \else% (|\filedivname| is defined by the user, |\filediv| is not)
+ \SetFileDiv{\filedivname}% why not? Inside is |\edef| so it'll work.
+ \fi
+ \else% (|\filediv| is defined by the user
+ \ifx\filedivname\relax% and |\filedivname| is not)
+ %^^A~I~deleted a~six level test which one sectioning command
+ %^^A~|\filedivname| isx.
+ \PackageError{gmdoc}{You've redefined \string\filediv\space
+ without redefining \string\filedivname.}{Please redefine the
+ two macros accordingly. You may use \string\SetFileDiv{name
+ without bslash}.}%
+ \fi
+ \fi
+ % \changes[\DocInclude]{v0.99m}{2008/08/09}{
+ % resetting of codeline number with every
+ % \cs{filedivname} commented out because with the
+ % \env{countalllines} option it caused that reset at \cs{maketitle}
+ % after some lines of file}
+ % ^^A \@addtoreset{codelinenum}{\filedivname}% remember it has
+ % ^^A~a~|\global| effect in fact. For each file we'll reset
+ % ^^A~\env{codelinenum}.
+ \def\thefilediv{\aalph{\filedivname}}% The files will be numbered
+ % with letters, lowercase first.
+ \@xa\let\csname the\filedivname\endcsname=\thefilediv% This
+ % li\-ne lets |\the|\<chapter> etc.\ equal |\thefilediv|.
+ \def\filesep{\thefilediv-}% File separator (identifier) for the index.
+ \let\filekey=\@gobble
+ \g@addto@macro\index@prologue{%
+ \gdef\@oddfoot{\parbox{\textwidth}{\strut\footnotesize
+ \raggedright{\bfseries File Key:} \filekey}}% The footer for
+ % the pages of index.
+ \glet\@evenfoot\@oddfoot}% \label{oneside}anyway, it's intended to
+ % be oneside.
+ \g@addto@macro\glossary@prologue{%
+ \gdef\@oddfoot{\strut Change History\hfill\thepage}% The footer
+ % for the changes history.
+ \glet\@evenfoot\@oddfoot}%
+ % \changes[\DocInclude]{v0.98c}{06/9/10}{Change History footer
+ % defined}
+ \gdef\@oddfoot{% The footer of the file pages will be its name and,
+ % if there is a~file info, also the date and version.
+ \@xa\ifx\csname ver@\currentfile\endcsname\relax
+ File \thefilediv: {\narrativett\currentfile} %
+ \else
+ \GetFileInfo{\currentfile}%
+ File \thefilediv: {\narrativett\filename} %
+ Date: \filedate\ %
+ Version \fileversion
+ \fi
+ \hfill\thepage}%
+ \glet\@evenfoot\@oddfoot% see line \ref{oneside}.
+ % ^^A \show\filedivname% for debug
+ \@xa\def\csname\filedivname name\endcsname{File}% we
+ % redefine the name of the proper division to `File'.
+ \ifx\filediv\section
+ \let\division=\subsection
+ \let\subdivision=\subsubsection
+ \let\subsubdivision=\paragraph
+ % If |\filediv| is higher than
+ % |\section| we don't change the three divisions (they are
+ % |\section|, |\subsection| and |\subsubsection| by default).
+ % |\section| seems to me the lowest reasonable sectioning command
+ % for the file. If |\filediv| is lower you should rather rethink
+ % the level of a~file in your documentation not redefine the two
+ % divisions.
+ \fi}% end of |\gmd@docincludeaux|.
+
+\def\SetFileDiv#1{%
+ \edef\filedivname{#1}%
+ \@xa\let\@xa\filediv\csname#1\endcsname}
+
+\def\SelfInclude{\DocInclude{\jobname}}
+
+\newif\if@ltxDocInclude
+
+\newcommand*\ltxLookSetup{%
+ \SetFileDiv{part}%
+ \ltxPageLayout
+ \@ltxDocIncludetrue
+}
+
+\@onlypreamble\ltxLookSetup
+
+\let\incl@DocInput=\DocInput
+
+\@emptify\currentfile% for the pages outside the
+
+\newcommand*\olddocIncludes{%
+ \let\incl@DocInput=\OldDocInput}
+
+\newcommand*\gmdocIncludes{%
+ \let\incl@DocInput=\DocInput
+ \AtBegInput{\QueerEOL}}% to move back the |\StraightEOL| declaration put
+\AtBegInput{%^^A~ why provide not just \cs{def}?
+ \providecommand*\maketitle{\par
+ \begingroup \def \thefootnote {\fnsymbol {footnote}}%
+ \setcounter {footnote}\z@
+ \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}%
+ \long\def\@makefntext##1{\parindent 1em\noindent
+ \hb@xt@1.8em{%
+ \hss\@textsuperscript{\normalfont\@thefnmark}}##1}%
+ \if@twocolumn \twocolumn [\@maketitle ]%
+ \else \newpage \global \@topnum \z@ \@maketitle \fi
+ \thispagestyle{titlepage}\@thanks \endgroup
+ \setcounter {footnote}\z@
+ \gdef\@date{\today}\g@emptify\@thanks%
+ \g@relaxen\@author\g@relaxen\@title%
+ }%\par
+ % \begin{quotation}When a number of articles are concatenated into
+ % a~journal, for example, it is not usual for the title pages of
+ % such documents to be formatted differently. Therefore, a class
+ % such as \pk{ltugboat} can define this macro in advance. However,
+ % if no such definition exists, we use page style plain for title
+ % pages.\end{quotation}
+ \@ifundefined{ps@titlepage}{\let\ps@titlepage=\ps@plain}{}%
+ % \par And let's provide |\@maketitle| just in case: an error occurred
+ % without it at \TeX ing with \pk{mwbk.cls} because this class with the
+ % default options does not define |\@maketitle|. The below definitions
+ % are taken from \pk{report.cls} and \pk{mwrep.cls}.
+ \providecommand*\@maketitle{%
+ \newpage\null \vskip 2em\relax%
+ \begin{center}%
+ \titlesetup
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \strut \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \end{center}%
+ \par \vskip 1.5em\relax}%\par
+ % We'd better restore the primary meanings of the macros making
+ % a~title. (\LaTeXe\ source, File F: ltsect.dtx Date: 1996/12/20 Version
+ % v1.0z, lines 3.5.7.9--12.14--17.)
+ \providecommand*\title[1]{\gdef\@title{#1}}
+ \providecommand*\author[1]{\gdef\@author{#1}}
+ \providecommand*\date[1]{\gdef\@date{#1}}
+ \providecommand*\thanks[1]{\footnotemark
+ \protected@xdef\@thanks{\@thanks
+ \protect\footnotetext[\the\c@footnote]{#1}}%
+ }%
+ \providecommand*\and{%| % \begin{tabular}|
+ \end{tabular}%
+ \hskip 1em \@plus.17fil%
+ \begin{tabular}[t]{c}}%| % \end{tabular}|
+ % And finally, let's initialise \cs{tit\+le\+set\+up} if it is not yet.
+ \providecommand*\titlesetup{}%
+}% end of |\AtBegInput|.
+\@relaxen\filediv
+\@relaxen\filedivname
+\@relaxen\thefilediv
+
+
+\def\InclMaketitle{%
+ % \changes{v0.98a}{06/09/05}{renamed from \cs{incl@maketitle} because
+ % I~needed it in self-input hacks.}
+ % \chgs{2008/12/10 v0.99s a~bug fixed: \cmd\if\cmd\relax\cmd\@date\
+ % changed to \cmd\ifx}
+ %
+ {\def\and{, }% we make |\and| just a~comma.
+ {\let\thanks=\@gobble% for the toc version of the heading we
+ % discard |\thanks|.
+ \protected@xdef\incl@titletotoc{%
+ \@title\@ifauthor{%
+ \protect\space(\@author)}{}}% we add the author iff the `files have
+ % different authors' \emph{and} author exists \nlpercent(|@variousauthors|)
+ }%
+ \def\thanks##1{\footnotemark
+ \protected@xdef\@thanks{\@thanks% to keep the previous |\thanks|
+ % if there were any.
+ \protect\footnotetext[\the\c@footnote]{##1}}}% for some
+ % mysterious reasons so defined |\thanks| do typeset the footnote
+ % mark and text but they don't hyperlink it
+ % properly. A~\pk{hyperref} bug?
+ \@emptify\@thanks
+ \protected@xdef\incl@filedivtitle{%
+ [{\incl@titletotoc}]% braces to allow |[| and
+ % |]| in the title to toc.
+ {\protect\@title
+ {\protect\smallerr% this macro is provided by the \pk{gmutils}
+ % package after the \pk{relsize} package.
+ \@ifauthor
+ {\protect\\[0.15em]\@nx\@author
+ \ifx\relax\@date\else, \fi}% after use, |\@date| is let to
+ % \incmd\relax.
+ {\ifx\relax\@date\else\protect\\[0.15em]\fi}
+ % The default is that all the included files have the same
+ % author(s). In this case we won't print the author(s) in
+ % the headings. Otherwise we wish to print them. The
+ % information which case are we in is brought by the
+ % |\if@variousauthors| switch defined in line \ref{@variousauthors}.
+ \protect\@date}}% end of |\incl@filedivtitle|'s brace (2nd
+ % or 3rd argument).
+ }% end of |\incl@filedivtitle|'s |\protected@xdef|.\par
+ % We |\protect| all the title components to avoid expanding
+ % |\footnotemark| hidden in |\thanks| during |\protected@xdef|
+ % (and to let it be executed during the typesetting, of course).
+ }% end of the comma-|\and|'s group.
+ \@xa\filediv\incl@filedivtitle
+ \@thanks
+ \g@relaxen\@author \g@relaxen\@title \g@relaxen\@date
+ \g@emptify\@thanks
+}% end of |\InclMaketitle|.
+
+
+\newif\if@variousauthors
+
+\newcommand*\PrintFilesAuthors{\@variousauthorstrue}
+\newcommand*\SkipFilesAuthors{\@variousauthorsfalse}
+
+\def\@ifauthor{%\
+ % \begin{enumargs}
+ % \item what if true
+ % \item what if false
+ % \end{enumargs}
+ \ifnum\numexpr\if@variousauthors1\else0\fi*
+ \ifx\@author\relax0\else\ifx\@author\@empty0\else1\fi\fi>0
+ \@xa\@firstoftwo
+ \else
+ \@xa\@secondoftwo
+ \fi
+}
+
+
+\def\GetFileInfo#1{%
+ \def\filename{#1}%
+ \def\gmu@tempb##1 ##2 ##3\relax##4\relax{%
+ \def\filedate{##1}%
+ \def\fileversion{##2}%
+ \def\fileinfo{##3}}%
+ \edef\gmu@tempa{\csname ver@#1\endcsname}%
+ \@xa\gmu@tempb\gmu@tempa\relax? ? \relax\relax}
+
+
+\newcommand*\FileInfo{%
+ \bgroup
+ \gmd@ctallsetup
+ \bgroup% yes, we open two groups because we want to rescan tokens in
+ % `usual' catcodes. We cannot put \incs{gmd@ctallsetup} into the
+ % inner macro because when that will be executed, the
+ % \incs{inputlineno} will be too large (the last not the first line).
+ \let\do\@makeother
+ \do\ \do\{\do\}\do\^^M\do\\%
+ \gmd@fileinfo}
+
+\foone{%
+ \catcode`!\z@
+ \catcode`(\@ne
+ \catcode`)\tw@
+ \let\do\@makeother
+ \do\ % we make space `other' to keep it for scanning the code where
+ % it may be leading.
+ \do\{\do\}\do\^^M\do\\}%\CodeEscapeChar\!
+(%
+!def!gmd@fileinfo#1Provides#2{#3}#4[#5]#6^^M%
+(!egroup% we close the group of changed catcodes, the catcodes
+!gmd@writeFI(#2)(#3)(#5)%
+!gmd@FIrescan(#1Provides#2{#3}#4[#5]#6)% this macro will close the group.
+)% \CodeEscapeChar\\
+)
+
+\def\gmd@writeFI#1#2#3{%
+ % ^^A \typeout{@@@ write FI}\show\relax
+ {\newlinechar=\endlinechar% \chgs{2008/11/30 v0.99s added assignment
+ % of \cmd\newlinechar}
+ \immediate\write\@auxout{%
+ \global\@nx\@namedef{%
+ ver@#2.\if P\@firstofmany#1\@nil sty\else cls\fi}{#3}}}}
+
+\foone\obeylines{%
+ \def\gmd@FIrescan#1{%
+ % \changes{v0.99l}{2008/08/06}{\cs{scantokens} used instead of
+ % \cs{write} and \cs{@@input} which simplified the macro}
+ % ^^A \newwrite\gmd@docrescanfile
+ % ^^A \immediate\openout\gmd@docrescanfile=\jobname.docrescan\relax
+ {\newlinechar=\endlinechar\scantokens{#1}}\egroup^^M}}
+
+
+\def\ProvideFileInfo#1{%
+ \begingroup
+ \catcode`\ 10 \catcode\endlinechar 10 %
+ \@makeother\/\@makeother\&%
+ \kernel@ifnextchar[{\gmd@providefii{#1}}{\gmd@providefii{#1}[]}%^^A]
+ }
+
+ % \DefIndex\gmd@providefii
+\def\gmd@providefii#1[#2]{%\\
+ % (we \emph{don't} write the file info to \pk{.log})
+ \@xa\xdef\csname ver@#1\endcsname{#2}%
+ \endgroup}
+
+\def\ProvideSelfInfo{\ProvideFileInfo{\jobname.tex}}
+
+
+\def\gmd@upperDIV#1{%
+ \if d#1D\fi
+ \if i#1I\fi
+ \if v#1V\fi
+}
+
+\def\edefInfo
+#1% name
+#2% datum
+{%
+ \edef\gmd@edefInfo@resa{\gmd@upperDIV #2}%
+ \@nameedef{file#2}{%
+ \ifcsname #1Leaf\gmd@edefInfo@resa\endcsname % e.g.~|gmbaseLeafVersion|
+ \xA\xA\xA\detokenize\xA\xA\xA{%
+ \csname #1Leaf\gmd@edefInfo@resa\endcsname
+ }%
+ \else
+ \ifcsname #1\gmd@edefInfo@resa\endcsname % e.g.~|gmbaseVersion|
+ \xA\xA\xA\detokenize\xA\xA\xA{%
+ \csname #1\gmd@edefInfo@resa\endcsname
+ }%
+ \else
+ \ifcsname \gmBundleFile \gmd@edefInfo@resa\endcsname % e.g.~|gmutilsVersion|
+ \xA\xA\xA\detokenize\xA\xA\xA{%
+ \csname \gmBundleFile \gmd@edefInfo@resa\endcsname
+ }%
+ \fi
+ \fi
+ \fi
+ }% of edefined macro
+}% of |\edefInfo|
+
+\def\FileInfoFromName#1{%
+ \edefInfo{#1}{date}%
+ \edefInfo{#1}{version}%
+ \edefInfo{#1}{info}%
+ \def\GeneralName{#1\actualchar\pk{#1} }% for the changes' history.
+}
+
+\def\BundleInfoFromName#1{%
+ \def\gmBundleFile{#1}%
+ \Store@MacroSt {#1LeafDate}%
+ \Store@MacroSt {#1LeafVersion}%
+ \Store@MacroSt {#1LeafInfo}%
+ \n@melet{#1LeafDate}{@undefined}%
+ \n@melet{#1LeafVersion}{@undefined}%
+ \n@melet{#1LeafInfo}{@undefined}%
+ \FileInfoFromName{#1}%
+ \Restore@MacroSt {#1LeafDate}%
+ \Restore@MacroSt {#1LeafVersion}%
+ \Restore@MacroSt {#1LeafInfo}%
+}
+
+\pdef\filenote{This file has version number \fileversion{} dated \filedate{}.}
+\pdef\thfileinfo{\thanks\filenote}
+
+\pdef\fnfileinfo{%
+ \gmu@ifedetokens{\@currext}{toc}%
+ {}%
+ {\footnote\filenote}%
+}
+
+\foone{\obeylines}%
+{%
+ \pdef\IndexInput#1{% \changes{v0.98b}{06/09/07}{\cs{StoreMacro}ing
+ %% and \cs{RestoreMacro}ing
+ % \cs{code@delim} added}
+ \Store@Macro\code@delim%
+ \CodeDelim*\^^Z%
+ \def\gmd@iihook{% \label{iihook}this hook is |\edef|ed!
+ \@nx^^M%
+ \code@delim\relax\@nx\let\@nx\EOFMark\relax}%^^A\@nx^^M
+ \DocInput{#1}\Restore@Macro\code@delim}%
+}
+\newenvironment{gmlonely}{\StraightEOL}{}
+
+\newcommand\skipgmlonely[1][]{%
+ \def\gmu@tempa{%\DefIndex\gmd@skipgmltext
+ \def\gmd@skipgmltext{%
+ \g@emptify\gmd@skipgmltext
+ % ^^A \gmd@deeolize{
+ #1%^^A}
+ }}% not to count the lines of the substituting
+ % text but only of the text omitted
+ \gmu@tempa
+ \@xa\AtBegInput\@xa{\gmu@tempa}%
+ \renewenvironment{gmlonely}{%
+ \StraightEOL
+ \@fileswfalse% to forbid writing to \pk{.toc}, \pk{.idx} etc.
+ \setbox0=\vbox\bgroup}{\egroup\gmd@skipgmltext}}
+
+
+\foone{\catcode`\_=8 }% we ensure the standard |\catcode| of |_|.
+{%
+ \newcommand*\catother{${}_{12}$}%\par
+ % Similarly, if we need to say some char is of category 13 (`active'),
+ % we'll write \catactive, got by |\catactive|
+ \newcommand*\catactive{${}_{13}$}%\par
+ % and a~letter, \catletter
+ \newcommand*\catletter{${}_{11}$}%.
+}
+\newenvironment*{copyrnote}{%
+ \StraightEOL\everypar{\hangindent3em\relax\hangafter1 }%
+ \par\addvspace\medskipamount\parindent\z@\obeylines}{%
+ \@codeskipputgfalse\stanza}
+\StoreEnvironment{quotation}
+\def\gmd@quotationname{quotation}
+\renewenvironment{quotation}{%
+ % \changes{v0.99j}{2008/08/03}{Improved behaviour of redefined
+ % \env{quotation} to be the original if used by another environment.}
+ % The first non-me user complained that \env{abstract} comes out in
+ % quotation marks. That is because \env{abstract} uses \env{quotation}
+ % internally. So we first check whether the current environment is
+ % \env{quotation} or something else.
+ \ifx\@currenvir\gmd@quotationname
+ \afterfi{\par``\ignorespaces}%
+ \else\afterfi{\storedcsname{quotation}}%
+ \fi}
+{\ifx\@currenvir\gmd@quotationname
+ \afterfi{\ifhmode\unskip\fi''\par}%
+ \else\afterfi{\storedcsname{endquotation}}%
+ \fi}
+
+\def\gmdnoindent{%
+ \ifvmode\leavevmode\hskip-\parindent\ignorespaces
+ \fi}% \incs{ignorespaces} is added to eat a~space inserted% by
+\pdef\inverb{%
+ % \changes{v0.99g}{2007/11/12}{added}
+ \gmu@ifstar{%
+ \def\gmu@tempa{\verbhyphen}% the pre-break.
+ \@emptify\gmu@tempb% the no-break.
+ \gmd@inverb}%
+ {\@emptify\gmu@tempa% the pre-break empty
+ \def\gmu@tempb{\gmboxedspace}% the no-break boxed space.
+ \gmd@inverb}}
+
+\newcommand*\gmboxedspace{\hbox{\normalfont{ }}}
+
+\pdef\gmd@nlperc{% \changes{v0.99n}{2008/08/22}{% added
+ % \cs{hbox}es in \cs{discretionary} to score \cs{hyphenpenalty} not
+ % \cs{exhyphenpenalty}}
+ % \chgs{2008/12/06 v0.99s \cs{newcommand*} replaced with \cs{pdef}
+ % and optional argument's declaration removed since nothing is done
+ % to \texttt{\#1} in the body of now-macro. Wrapped in a~group for
+ % setting \cmd\hyphenpenalty}
+ \ifhmode\unskip\fi
+ \begingroup\hyphenpenalty\inverbpenalty\relax
+ \discretionary{\hbox{\gmu@tempa}}% (pre-break). I~always put
+ % a~\incs{hbox} here to make this discretionary score the
+ % \incs{hyphenpenalty} not \incs{exhyphenpenalty} (\TB\ p.~96) since
+ % the latter may be 10,000 in Polish typesetting.
+ {\hbox{\narrationmark}}% (post-break)
+ {\gmu@tempb}% (no-break).
+ \endgroup
+ \penalty10000\hskip0sp\relax}
+
+\def\inverbpenalty{-1000}
+
+\pdef\gmd@inverb{%
+ \gmd@nlperc
+ \ifmmode\hbox\else\leavevmode\null\fi
+ \bgroup
+ \ttverbatim
+ \narrativett
+ \def\breakablevisspace{%
+ \discretionary{\visiblespace}{\narrationmark}{\visiblespace}}%
+ \def\breakbslash{%
+ \discretionary{}{\narrationmark\type@bslash}{\type@bslash}}%
+ \def\breaklbrace{%
+ \discretionary
+ {\xiilbrace\verbhyphen}%
+ {\narrationmark}%
+ {\xiilbrace}}%
+ \gm@verb@eol
+ %^^A \gmu@ifstar {\@sverb@chbsl}
+ %^^A~ {\gmobeyspaces\frenchspacing\@sverb@chbsl}
+ \@sverb@chbsl% It's always with visible spaces.
+}
+
+\pdef\nlperc{\newline\narrationmark\ignorespaces}
+
+\pdef\nlpercent{%
+ % ^^A \gmu@ifstar{\def\gmu@tempa{{\tt\xiipercent}}%
+ % ^^A \@emptify\gmu@tempb
+ % ^^A \gmd@nlperc}%
+ % ^^A {
+ % \chgs{200/12/7 v0.99s starred version discarded as never used and
+ % undocumented}
+ % \UnDef
+ \@emptify\gmu@tempa
+ \def\gmu@tempb{\gmboxedspace}%
+ \gmd@nlperc
+ % ^^A}
+}
+
+\pdef\incs{% an in-line \cs{cs}
+ % \changes{v0.99m}{008/08/07}{added}
+ % \chgs{200/12/7 v0.99s starred version discarded as never used and
+ % undocumented}
+ % ^^A \gmu@ifstar{\def\gmu@tempa{{\tt\xiipercent}}%
+ % ^^A \@emptify\gmu@tempb
+ % ^^A \gmd@nlperc\cs}%
+ % ^^A {
+ % \UnDef
+ \@emptify\gmu@tempa
+ \def\gmu@tempb{\gmboxedspace}%
+ \gmd@nlperc\cs
+ % ^^A}
+}
+
+\def\inenv{\incs[]}% an in-line \cs{env}
+
+\def\incmd{% it has to be |\def| to let it expand to let \incmd\cmd\
+ % convert its argument to a~safe string.
+ \nlpercent\cmd}
+
+\def\inhash{\nlpercent\hash}
+
+
+\@xa\ampulexdef\csname\@dc@InnerName\cs\endcsname
+[#1] [#1] {\begingroup} {\ifdefined}
+{\begingroup \def\+{\discre{\gmv@hyphen}{\narrationmark}{}}%
+ \ifdefined}
+
+
+\providecommand*\ds{DocStrip}
+
+
+\newcommand*\CDAnd{\CodeDelim\&}
+
+\newcommand*\CDPerc{\CodeDelim\%}
+
+\let\division=\section
+
+\let\subdivision=\subsection
+
+\let\subsubdivision=\subsubsection
+\newcounter{gmd@mc}
+
+\def\gmd@mchook{\stepcounter{gmd@mc}% \label{gmd@mchook}
+ \gmd@mcdiag
+ \ifcsname gmd@mchook\the\c@gmd@mc\endcsname
+ \afterfi{\csname gmd@mchook\the\c@gmd@mc\endcsname}%
+ \fi}
+
+\long\def\AfterMacrocode#1#2{\@namedef{gmd@mchook#1}{#2}}
+
+\@emptify\gmd@mcdiag
+
+\def\mcdiagOn{\def\gmd@mcdiag{%
+ \typeout{^^J\bslash end{\gmd@lastenvir} No.\the\c@gmd@mc
+ \space\on@line, cln.\the\c@codelinenum.}}}
+
+\def\mcdiagOff{\@emptify\gmd@mcdiag}
+\DeclareEnvironment{enumargs}{o}%\
+{%
+ \StraightEOL
+ \if@aftercode
+ \edef\gmu@tempa{\the\leftskip}%
+ \edef\gmu@tempb{\the\hangindent}%
+ \fi
+ \enumerate
+ \if@aftercode
+ \leftskip=\glueexpr\gmu@tempa+\gmu@tempb\relax
+ \fi
+ \edef\gmd@ea@hashes{%
+ \#\ifcase\IfValueTF{#1}{#1}{1}\relax
+ \or\or\#\or\or\#\#\#\fi}%
+ %\stanza
+ \@namedef{label\@enumctr}{%
+ \env{\if@aftercode\narrationmark\fi
+ \relax% to stop |\ignorespaces|
+ \gmd@ea@bwrap
+ \gmd@ea@hashes
+ \csname the\@enumctr\endcsname
+ \gmd@ea@ewrap}}% of |\label⁄<@enumctr>|.
+ \let\mand\item
+ \provide\gmd@ea@wraps{%
+ \emptify\gmd@ea@ewrap
+ \emptify\gmd@ea@bwrap}%
+ \gmd@ea@wraps
+ \def\opt{%\HideDef
+ \def\gmd@ea@bwrap{[}\def\gmd@ea@ewrap{]}%
+ \item
+ \gmd@ea@wraps}%
+ %\stanza
+ \settowidth{\@tempdima}{\narrativett x\gmd@ea@hashes7x}%
+ \edef\gmd@ea@xxxwd{\the\@tempdima}%
+ %\stanza
+ \DeclareCommand\dc !{%
+ Q{*>} % (1) we check whether there's a~sergeant right of the prefix or
+ % a~star to suppress parentheses,
+ Q{P!lL\long iI} % (2) an optional ‘bare’ prefix for a~‘long’ argument
+ % or for ignored
+ b % (3) prefix(es) in curly braces
+ % ( % This way we allow the prefix(es) to be braced or not
+ % at the author's option),
+ >\@xa T{\@dc@argtypes} % (4) (optional) argument type
+ % specifier,
+ b % (5) (optional) default value of the specified argument or
+ % (for |K| and |G|) mandatory.
+ b % (6) default of |K| and |G|.
+ }{%
+ \gmu@ifxany *{##1}%
+ {% a~|*| suppresses bracket/brace/parentheses decoration.
+ \def\gmd@ea@bwrap{\hbox to \gmd@ea@xxxwd\bgroup\hss}%
+ \def\gmd@ea@ewrap{\hss\egroup}%
+ }%
+ {% if there's no |*| in \hash1, be wrap the item label in
+ % braces/brackets/parentheses.
+ \gmu@ifxany ##4{bB}{% I~decide not to print |m| type
+ % arguments in braces because the braces are not mandatory for
+ % this type.
+ \def\gmd@ea@bwrap{\{}%
+ \def\gmd@ea@ewrap{\}}%
+ }{}%
+ \gmu@ifxany ##4{cC}{%
+ \def\gmd@ea@bwrap{(}%
+ \def\gmd@ea@ewrap{)}%
+ }{}%
+ \gmu@ifxany ##4{oO}{%
+ \def\gmd@ea@bwrap{[}%
+ \def\gmd@ea@ewrap{]}%
+ }{}%
+ \gmu@ifxany ##4{G}{%
+ \def\gmd@ea@bwrap{\detokenize\@xa{\@firstoftwo##5}}%
+ \def\gmd@ea@ewrap{\detokenize\@xa{\@secondoftwo##5}}%%
+ }{}%
+ \gmu@ifxany ##4{A}{%
+ \def\gmd@ea@bwrap{<}%
+ \def\gmd@ea@ewrap{>}%
+ }{}%
+ }% of if no |*| in \hash1.
+ \gmu@ifxany ##4{mQsSTK\afterassignment}{%
+ \def\gmd@ea@bwrap{\hbox to \gmd@ea@xxxwd\bgroup\hss}%
+ \def\gmd@ea@ewrap{\hss\egroup}%
+ }{}%
+ % we add a~normal space
+ \addtomacro\gmd@ea@ewrap{{\normalfont\ }}%
+ \IfValueT{##2}{%
+ \addtomacro\gmd@ea@ewrap{>\{\string##2\}}}%
+ \IfValueT{##3}{%
+ \addtomacro\gmd@ea@ewrap{>\{##3\}}}%
+ \IfValueT{##4}{%
+ \ifx s##4%
+ \addtomacro\gmd@ea@ewrap{%
+ \llap{\metachar[}\scanverb{*}\metachar]}%
+ \else\addtomacro\gmd@ea@ewrap{##4}%
+ \fi}%
+ \IfValueT{##5}{%
+ \addtomacro\gmd@ea@ewrap{\{%
+ %\nostanza|%\ttverbatim| breakable chars won't work because we are in
+ % the item's label's \incmd\hbox. \nostanza
+ \scanverb*{##5}%
+ \}}}%
+ \IfValueT{##6}{%
+ \addtomacro\gmd@ea@ewrap{\{%
+ %\nostanza|%\ttverbatim| breakable chars won't work because we are in
+ % the item's label's \incmd\hbox. \nostanza
+ \scanverb*{##6}%
+ \}}}%
+ \def\gmd@blubra{%
+ \addtomacro\gmd@ea@bwrap{%
+ \begingroup
+ \relaxen\gmd@ea@hashes
+ \@namedef{the\@enumctr}{\<ign.>}%
+ }%
+ \prependtomacro\gmd@ea@ewrap{%
+ \endgroup}%
+ \addtomacro\gmd@ea@ewrap{%
+ \global \advance \csname c@\@enumctr\endcsname \m@ne
+ }%
+ \emptify\gmd@blubra
+ }%
+ \gmu@ifsbintersect {##2}{Ii}{\gmd@blubra}{}%
+ \gmu@ifsbintersect {##3}{Ii}{\gmd@blubra}{}%
+ \gmu@ifxany ##4{\afterassignment}{\gmd@blubra}{}%
+ \item\relax}%
+ % \stanza
+ \IfNoValueT{#1}{\@ifnextac\@gobble{}}% to gobble a~possible active line end or
+ % active \hathat{A} or \hathat{B} that might
+ % have occurred because of \incmd\futurelet\ of the optional
+ % argument checker.
+ }% of begin definition \ResumeDef
+{\endenumerate}
+
+\newenvironment*{enumargs*}{%
+ \def\gmd@ea@wraps{% \HideDef
+ \def\gmd@ea@bwrap{ }\def\gmd@ea@ewrap{ }}% \ResumeDef
+ \enumargs}{\endenumargs}
+
+
+\def\CharacterTable{\begingroup
+ \@makeother\{\@makeother\}%
+ \Character@Table}
+
+\foone{%
+ \catcode`\[=1 \catcode`\]=2 %
+ \@makeother\{\@makeother\}}%
+[
+ \def\Character@Table#1{#2}[\endgroup
+ \message[^^J^^J gmdoc.sty package:^^J
+ ==== The input file contains the \bslash CharacterTable.^^J
+ ==== If you really need to check the correctness of the chars,^^J
+ ==== please notify the author of gmdoc.sty at the email address^^J
+ ==== given in the legal notice in gmdoc.sty.^^J^^J]%
+ %^^A~\gmd@countlines[#1]\gmd@countlines[#2]
+ ]]
+\outer\def\DescribeMacro{%
+ \@bsphack
+ \begingroup\MakePrivateLetters
+ \gmd@ifonetoken\Describe@Macro\Describe@Env}
+\outer\def\DescribeEnv{%
+ \@bsphack
+ \begingroup\MakePrivateOthers\Describe@Env}
+
+\outer\def\Describe{% It doesn't typeset its argument in the point of
+ % occurrence.
+ \leavevmode
+ \@bsphack
+ \begingroup\MakePrivateLetters
+ \gmu@ifstar{\MakePrivateOthers\Describe@Env}{\Describe@Macro}}
+
+\long\def\Describe@Macro#1{%
+ \endgroup
+ \strut\Text@Marginize*{#1}%
+ \@usgentryze#1% we declare kind of formatting the entry
+ \text@indexmacro#1%
+ \@esphack}
+
+\def\Describe@Env#1{%
+ \endgroup
+ \strut\Text@Marginize*{#1}%
+ \@usgentryze{#1}% we declare the `usage' kind of
+ % formatting the entry and index the sequence |#1|.
+ \text@indexenvir{#1}%
+ \@esphack}
+
+
+\let\MacroFont\tt
+
+\let\MacroIndent\CodeIndent
+\let\MacrocodeTopsep\CodeTopsep
+\let\SpecialEscapechar\CodeEscapeChar
+
+
+\AtEndInput{\@ifundefined{theCodelineNo}{}{\PackageInfo{gmdoc}{The
+ \string\theCodelineNo\space macro has no effect here, please use
+ \string\LineNumFont\space for setting the font and/or
+ \string\thecodelinenum\space to set the number format.}}}
+\def\noeffect@info#1{\@ifundefined{#1}{}{\PackageInfo{gmdoc}{^^J%
+ The \bslash#1 macro is not supported by this package^^J
+ and therefore has no effect but this notification.^^J
+ If you think it should have, please contact the maintainer^^J
+ indicated in the package's legal note.^^J}}}
+
+\AtEndInput{%
+ \noeffect@info{PrintDescribeMacro}%
+ \noeffect@info{PrintMacroName}%
+ \noeffect@info{PrintDescribeEnv}%
+ \noeffect@info{PrintEnvName}}
+
+\def\CodelineNumbered{\AtBeginDocument{\gag@index}}
+\@onlypreamble\CodelineNumbered
+\let\CodelineIndex\@pageindexfalse
+\@onlypreamble\CodelineIndex
+
+\let\PageIndex\@pageindextrue
+\@onlypreamble\PageIndex
+
+\def\DisableCrossrefs{\@bsphack\gag@index\@esphack}
+
+\def\EnableCrossrefs{\@bsphack\ungag@index
+ \def\DisableCrossrefs{\@bsphack\@esphack}\@esphack}
+\newcommand*\AlsoImplementation{\@bsphack
+ \long\def\StopEventually##1{\gdef\Finale{##1}}% we define
+ % \incs{Fi\+n\+a\+le} just to expand to the argument of \incs{StopEventually} not
+ % to to add anything to the end input hook because \incs{Finale} should
+ % only be executed if entire document is typeset.\nostanza\par
+ %
+ % \hangindent\verbatimhangindent \hangafter1\relax
+ % \gmdnoindent \leftskip\CodeIndent
+ % |%\init@checksum| is obsolete in
+ % \pk{gmdoc} at this point: the \env{CheckSum} counter is reset just at
+ % the beginning of (each of probably numerous) input(s).
+ % \nostanza\par
+ \@esphack}
+
+\AlsoImplementation
+
+
+\def\OnlyDescription{\@bsphack\long\def\StopEventually##1{%
+ % \begin{quotation} In this case the argument of |\StopEventually|
+ % should be set and afterwards \TeX\ should stop reading from
+ % this file. Therefore we finish this macro with\end{quotation}
+ ##1ⵢendinput}\@esphack}
+
+
+\@relaxen\Finale
+
+\let\SpecialMainIndex=\DefIndex
+
+\def\SpecialMainEnvIndex{\csname CodeDefIndex\endcsname*}% we don't
+
+\let\SpecialIndex=\CodeCommonIndex
+
+\let\SpecialUsageIndex=\TextUsgIndex
+
+\def\SpecialEnvIndex{\csname TextUsgIndex\endcsname*}
+
+\def\SortIndex#1#2{\index{#1\actualchar#2}}
+\def\verbatimchar{&}
+
+
+
+\@ifundefined{main}{}{\let\DefEntry=\main}
+
+\@ifundefined{usage}{}{\let\UsgEntry=\usage}
+
+\newcounter{StandardModuleDepth}
+
+\noeffect@info{DocstyleParms}
+
+\@emptify\DontCheckModules \noeffect@info{DontCheckModules}
+\@emptify\CheckModules \noeffect@info{CheckModules}
+\@emptify\AltMacroFont \noeffect@info{AltMacroFont}
+
+\def\MakePercentIgnore{\catcode`\%9\relax}
+\def\MakePercentComment{\catcode`\%14\relax}
+\def\OldDocInput{% \changes{v0.99g}{2007/11/11}{obsolete redefinition
+ % of the \env{macro} environment removed}
+ \AtBegInputOnce{\StraightEOL
+ \let\@MakeShortVerb=\old@MakeShortVerb
+ % \label{oldmkshvrrb}
+ \OldMacrocodes}%
+ \bgroup\@makeother\_% it's to allow |_| in the filenames. The next
+ % macro will close the group.
+ \Doc@Input}
+%% \AVerySpecialMacro % delete the first % when.\unskip|..|\CDPerc
+
+\DeclareCommand\OCRInclude{O{}mO{}}{%
+ \Store@Macro\incl@DocInput
+ \def\incl@DocInput##1{%
+ \begingroup
+ \CodeSpacesBlank
+ \@beginputhook
+ \title{\currentfile}\maketitle
+ \noverbatimspecials
+ \relaxen\@xverbatim
+ \relaxen\check@percent
+ \Restore@Macro\@verbatim
+ \verbatimleftskip\z@skip
+ \verbatim
+ \@makeother\|% because |\ttverbatim| doesn't do that.
+ \texcode@hook% we add some special stuff, e.g.\ in \pk{gmdocc.cls} we
+ \@input{##1}%
+ \endgroup}%
+ \csname\@dc@InnerName\DocInclude\endcsname{#1}{#2}{#3}%
+ \Restore@Macro\incl@DocInput
+}
+
+
+\foone{\catcode`\^^M\active }{%
+ \def\@NoEOF#1^^M{%
+ \@relaxen\EOFMarkⵢendinput}%
+ \def\@EOF#1^^M{ⵢendinput}}
+
+\def\NoEOF{\QueerEOL\@NoEOF}
+\def\EOF{\QueerEOL\@EOF}
+\endinput
+%%
+%% End of file `gmdoc.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmenvir.sty b/tex/.texmf/tex/latex/misc/gmenvir.sty
new file mode 100644
index 0000000..347198c
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmenvir.sty
@@ -0,0 +1,143 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmenvir.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `envir')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmenvir}
+ [2011/10/12 v0.996 redefinition of \string \begin \space and \string \end (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage{gmbase, gmampulex} % the low-level macros
+
+
+
+\emptify\@envirstack
+
+\def\@pushenvir{%
+ %^^V\edef\@currenvir{\@currenvir}% is already expanded.
+ \xdef\@envirstack{%
+ {\@xa\detokenize\@xa{\@currenvir}}%
+ {\the\currentgrouplevel}%
+ {\@currenvline}%
+ \@envirstack
+ }%
+}
+
+\def\@popenvir #1#2#3{%
+ \@XA{\@popenvir@ #1#2#3}\@envirstack\@nil
+}
+
+\def\@popenvir@ #1#2#3#4#5#6#7\@nil{%
+ \gdef #1{#4}% |#1| carries last envir name
+ \gdef #2{#5}% |#2| carries last envir level
+ \gdef #3{#6}% |#3| carries last envir beginnig line
+ \gdef\@envirstack{#7}% and we update the stack
+}
+
+\long\def\@begnamedgroup#1{%
+ \edef\@prevgrouplevel{\the\currentgrouplevel}% added 2009/03/24 to
+ % handle special pseudo-environments that don't increase
+ % \incmd\currentgrouplevel (such as \inenv{document}). Note it's
+ % |\edef|ed \emph{outside} the environment's group.
+ \@ignorefalse% not to ignore blanks after group
+ \begingroup\@endpefalse
+ \edef\@prevenvir{\@currenvir}% Note we |\edef| it inside the group
+ % (for obvious reason), unlike the ‘previous’ grouplevel.
+ \edef\@currenvir{#1}% We could do recatcoding
+ % through\inverb|\string| or \nlperc\cmd\detokenize\ but all the name
+ % `other' and 10 could affect
+ % a~thousand packages so we don't do that and we'll recatcode in
+ % a~testing macro, see line \ref{@ifenvir}.
+ \edef\@currenvline{\on@line}%
+ \@pushenvir % we put current envir to |\@envirstack|.
+ \csname #1\endcsname}% if the argument is a~command's name (an
+
+\def\begin{\gmu@ifstar{\@begnamedgroup}{%
+ \@begnamedgroup@ifcs}}
+
+\def\@begnamedgroup@ifcs#1{%
+ \ifcsname#1\endcsname\afterfi{\@begnamedgroup{#1}}%
+ \else\afterfi{\@latex@error{Environment #1 undefined}\@eha}%
+ \fi}%
+
+
+\long\def\@fourthofmany#1#2#3#4#5\@nil{#4}%
+
+\lpdef\@ifprevenvir#1{%\label{@ifenvir}\
+ \gmu@ifedetokens
+ {\@xa\@fourthofmany\@envirstack\relax\relax\relax\relax\@nil}%
+ {#1}%
+}
+
+
+\def\@checkend#1{%
+ \@ifenvir{#1}%
+ {}%
+ {\@badend{#1}}%
+}
+
+\ampulexdef\end[#1][#1]\endcsname\@checkend{%
+\endcsname
+\@xa\gmu@ifempty\@xa{\@envirstack}%
+{%
+ \PackageError {gmutils/base}%
+ {There's no environment to pop!}{Oy vey, gefeelte fish!}%
+}%
+{\@popenvir\gmu@drain\gmu@drain\gmu@drain }%
+\@checkend
+}
+
+\pdef\@endif#1{\@ifenvir{#1}{\end{#1}}{}}
+
+\pdef\@endifprev#1{\@ifprevenvir{#1}{\end{#1}}{}}
+
+\newcount\c@EnvirInterruption
+
+\lpdef\gmu@InterruptEnvir
+#1% the contents of interruption.
+{%
+ \global \advance\c@EnvirInterruption\@ne
+ \Name \@popenvir
+ {gmu@InterruptCurrenv \the\c@EnvirInterruption}\gmu@drain\gmu@drain
+ \endgroup
+ #1%
+ \begingroup
+ \@XA {\let\@currenvir}%
+ \csname gmu@InterruptCurrenv \the\c@EnvirInterruption \endcsname
+ \@pushenvir
+ \global \advance\c@EnvirInterruption\m@ne
+}
+
+
+\endinput
+%%
+%% End of file `gmenvir.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmlogos.sty b/tex/.texmf/tex/latex/misc/gmlogos.sty
new file mode 100644
index 0000000..107ccfd
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmlogos.sty
@@ -0,0 +1,232 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmlogos.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `logos')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmlogos}
+ [2011/05/05 v0.996 TeX-related logos (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage{gmbase}
+
+
+\let\oldLaTeX\LaTeX
+\let\oldLaTeXe\LaTeXe
+
+\pdef\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\@}
+\Store@Macro\TeX
+\AtBeginDocument{\Restore@Macro\TeX}
+
+\lpdef\EofTeX
+#1#2% whether put kerns before and after »E« respectively.
+#3% we do nothing with it (maybe unbrace) but we want to gobble
+ % possible space.
+{\if1#1\relax \kern-.1667em \fi
+ \lower.5ex\hbox{E}%
+ \if1#2\relax \kern-.125em \fi
+ #3
+}
+
+\newcommand*\DeclareLogo[3][\relax]{% \begin{enumargs*}
+ % \opt is for non-\LaTeX\ spelling and will be used in the
+ % \acro{PD1} encoding (to make pdf bookmarks);
+ % \item is the command, its name will be the PD1 spelling by
+ % default,
+ % \item is the definition for all the font encodings except PD1.
+ % \end{enumargs*}
+ %
+ \ifx\relax#1\def\gmu@DeclareLogo@resa{\@xa\@gobble\string#2}%
+ \else
+ \def\gmu@DeclareLogo@resa{#1}%
+ \fi
+ \edef\gmu@DeclareLogo@resa{%
+ \@nx\DeclareTextCommand\@nx#2{PD1}{\gmu@DeclareLogo@resa}}
+ \gmu@DeclareLogo@resa
+ \DeclareTextCommandDefault#2{#3}%
+ \pdef#2{#3}% added for \XeTeX.
+}
+
+\DeclareLogo\LaTeX{%
+ {%
+ L%
+ \setbox\z@\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \kern-.57\wd\z@
+ \sbox\tw@ T%
+ \vbox to\ht\tw@{\copy\z@ \vss}%
+ \kern-.2\wd\z@% originally $-,15$\,em for T.
+ }%
+ {%
+ \ifdim\fontdimen1\font=\z@
+ \else
+ \count\z@=\fontdimen5\font
+ \multiply\count\z@ by 64\relax
+ \divide\count\z@ by\p@
+ \count\tw@=\fontdimen1\font
+ \multiply\count\tw@ by\count\z@
+ \divide\count\tw@ by 64\relax
+ \divide\count\tw@ by\tw@
+ \kern-\the\count\tw@ sp\relax
+ \fi}%
+ \gmlogos@hyphen
+ \TeX
+}
+
+\DeclareLogo\LaTeXe{\mbox{\m@th \if
+ b\expandafter\@car\f@series\@nil\boldmath\fi
+ \LaTeX\kern.15em2$_{\textstyle\varepsilon}$}}
+
+\Store@Macro\LaTeX
+\Store@MacroSt{LaTeX }
+
+\DeclareLogo[(La)TeX]{\LaTeXpar}{%
+ {%
+ \setbox\z@\hbox{(}%)
+ \leavevmode % \chgs{2010/04/09 v0.993 added \cmd\leavevmode\ (a
+ % bug fix)}
+ \copy\z@
+ \kern-.2\wd\z@ L%
+ \setbox\z@\hbox{\check@mathfonts
+ \fontsize\sf@size\z@
+ \math@fontsfalse\selectfont
+ A}%
+ \kern-.57\wd\z@
+ \sbox\tw@ T%
+ \vbox to\ht\tw@{\box\z@%
+ \vss}%
+ }%
+ \kern-.07em% originally $-,15$\,em for T.
+ {%(
+ \sbox\z@)%
+ \kern-.2\wd\z@\copy\z@
+ \kern-.2\wd\z@}\gmlogos@hyphen\TeX
+}
+
+\gmu@ifundefined{AmSTeX}
+ {\def\AmSTeX{\leavevmode\hbox{$\mathcal A\kern-.2em\lower.376ex%
+ \hbox{$\mathcal M$}\kern-.2em\mathcal S$-\TeX}}}{}
+
+\DeclareLogo\BibTeX{{\rmfamily B\kern-.05em%
+ \textsc{i{\kern-.025em}b}\kern-.08em% the kern is wrapped in
+ % braces for my |\fakescaps|' sake.
+ \TeX}}
+
+\DeclareLogo\SliTeX{{\rmfamily S\kern-.06emL\kern-.18em\raise.32ex\hbox
+ {\scshape i}\kern -.03em\TeX}}
+
+\DeclareLogo\PlainTeX{\textsc{Plain}\kern2pt\TeX}
+
+\DeclareLogo\Web{\textsc{Web}}
+\DeclareLogo[The TeX book]\TeXbook{\textsl{The \TeX\space book}}
+\let\TB\TeXbook% \textit{TUG Boat} uses this.
+
+\DeclareLogo[e-TeX]\eTeX{%
+ \iffontchar\font"03B5{\itshape ε}\else
+ \ensuremath{\varepsilon}\fi-\kern-.125em\TeX}% definition sent by Karl
+
+\Store@Macro\eTeX
+
+\DeclareLogo[pdfe-TeX]\pdfeTeX{pdf\gmlogos@hyphen\eTeX}
+
+\DeclareLogo\pdfTeX{pdf\gmlogos@hyphen\TeX}
+\DeclareLogo\pdfLaTeX{pdf\gmlogos@hyphen\LaTeX}
+
+
+\gmu@ifundefined{XeTeX}{%
+ \DeclareLogo\XeTeX{X\kern-.125em\relax
+ \gmu@ifundefined{reflectbox}{%
+ \lower.5ex\hbox{E}\kern-.1667em\relax}{%
+ \lower.5ex\hbox{\reflectbox{E}}\kern-.1667em\relax}%
+ \TeX
+ }%
+}{}
+
+\gmu@ifundefined{XeLaTeX}{%
+ \DeclareLogo\XeLaTeX{X\kern-.125em\relax
+ \gmu@ifundefined{reflectbox}{%
+ \lower.5ex\hbox{E}\kern-.1667em\relax}{%
+ \lower.5ex\hbox{\reflectbox{E}}\kern-.1667em\relax}%
+ \LaTeX}}{}
+
+\DeclareLogo\XeTeXpar{% \chgs{2010/04/09 v0.993 added}
+ \setbox\z@\hbox{(}%)
+ \leavevmode
+ \copy\z@
+ \kern-.2\wd\z@
+ \smash{% the “Xe” part is copied from \pk{xltxtra}
+ X\lower0.5ex
+ \hbox{\kern-0.15em
+ \gmu@ifundefined{XeTeXversion}%
+ {\setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ }% of if not in \XeTeX, then in \XeTeX:
+ {\ifnum\XeTeXfonttype\font>0
+ \ifnum\XeTeXcharglyph"018E>0
+ \char"018E\relax
+ \else
+ \ifdim\fontdimen1\font=0pt
+ \reflectbox{E}%
+ \else
+ \XeTeXuseglyphmetrics=1%
+ \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ \fi
+ \fi
+ \else
+ \setbox0=\hbox{E}\dimen0=\ht0\advance\dimen0by\dp0%
+ \raise\dimen0\hbox{\rotatebox{180}{\box0}}%
+ \fi}% of reversed E when in \XeTeX
+ }% of hbox
+ }% of smash ^^A(
+ \setbox\z@\hbox{)}%
+ \kern-.2\wd\z@
+ \copy\z@
+ \kern-0.15em
+ \TeX}%
+
+\DeclareLogo[LuaTeX]\LuaTeX{\textsc{Lua}\gmlogos@hyphen\TeX}
+
+\DeclareLogo [ConTeXt]\ConTeXt{Con\gmlogos@hyphen\TeX t}
+
+\emptify\gmlogos@hyphen
+
+\def\HyphenateLogo#1{%
+ {\let\gmlogos@hyphen\-%
+ #1}%
+}
+
+
+\endinput
+%%
+%% End of file `gmlogos.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmmeta.sty b/tex/.texmf/tex/latex/misc/gmmeta.sty
new file mode 100644
index 0000000..fa8b106
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmmeta.sty
@@ -0,0 +1,292 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmmeta.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `meta')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmmeta}
+ [2011/10/12 v0.996 meta-symbols for typesetting macros and arguments (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+\RequirePackage{gmcommand}
+\pdef\meta#1{%
+ % \begin{quotation}
+ % Since the old implementation of |\meta| could be used in math we better ensure
+ % that this is possible with the new one as well. So we use |\ensuremath| around
+ % |\langle| and |\rangle|. However this is not enough: if |\meta@font@select| below
+ % expands to |\itshape| it will fail if used in math mode. For this reason we hide
+ % the whole thing inside an |\nfss@text| box in that case.
+ % \end{quotation}
+ {\meta@fontsetting\ensuremath\langle}%
+ \ifmmode\@xa\nfss@text\fi
+ {% this has to be a~begin-group because \incmd{\nfss@text} becomes
+ % \incmd\hbox\ in math mode.
+ \gmu@activespaceblank
+ \meta@font@select
+ % Need to keep track of what we changed just in case the user changes font inside
+ % the argument so we store the font explicitly.
+ #1\/%
+ }%
+ {\meta@fontsetting\ensuremath\rangle}%
+}% of |\meta|.
+
+\pdef\gmu@activespaceblank{%
+ \@xa\def\gmu@activespace{\space\ignorespaces}% note the
+ % subtle perversity of this definition: if we meet more than one
+ % subsequent active spaces, then the first of them will
+ % typeset \incmd\space and its \incmd\ignorespaces\ will
+ % gobble \incmd\space\ of the second and will stop at
+ % \incs{ignorespaces} and this \incs{ignorespaces} will gobble
+ % the next \incs{space} and so on.
+}
+
+\def\meta@fontsetting{\color{red!85!black}}
+
+\def\meta@font@select{\meta@fontsetting\it}
+
+\def\<#1>{\meta{#1}}
+
+\pdef\metachar#1{\begingroup\metacharfont #1\endgroup}
+\def\metacharfont{\meta@fontsetting\rm}
+
+\pdef\vs{\discre{\visiblespace}{}{\visiblespace}}
+
+\def\printspaces#1{{\let~=\vs \let\ =\vs \gmu@pswords#1 \@nil}}
+\def\gmu@pswords#1 #2\@nil{%
+ \ifx\relax#1\relax\else#1\fi
+ \ifx\relax#2\relax\else\vs\penalty\hyphenpenalty\gmu@pswords#2\@nil\fi}% note
+
+\pdef\sfname#1{\textsf{\printspaces{#1}}}
+
+\def\gmu@discretionaryslash{\discre{/}{\hbox{}}{/}}% the second
+
+\pdef\file#1{\gmu@printslashes#1/\gmu@printslashes}
+
+\def\gmu@printslashes#1/#2\gmu@printslashes{%
+ \sfname{#1}%
+ \ifx\gmu@printslashes#2\gmu@printslashes
+ \else
+ \textsf{\gmu@discretionaryslash}%
+ \afterfi{\gmu@printslashes#2\gmu@printslashes}\fi}
+
+
+\pdef\pk#1{\textsf{#1}}
+
+\DeclareCommand\cs{O{\type@bslash\penalty\@M\hskip\z@skip}}{%\
+ % \begin{enumargs}
+ % \dc O{\bslash} the control sequence's prefix, by default it's
+ % \inverb|\| allowing hyphenation of subsequent word,
+ % \dc m the control sequence or anything to be typeset in
+ % typewriter font.
+ % \end{enumargs}
+ % \chgs{2008/12/12 v0.98 added \cs{verbatim@specials}}
+ % \chgs{2008/12/12 v0.98 made \cmd\- switch to \cmd\normalfont\
+ % because \IMHO\ this underlines the fact that a~\CS\ belongs to the
+ % narrative. \cmd\hyphenchar\ set to 45 as in usual texts}
+ \begingroup
+ \ifdefined\verbatim@specials\verbatim@specials\fi
+ \edef\-{\discretionary{%
+ \ifdefined\gmv@hyphen\gmv@hyphen
+ \else\unexpanded{{\normalfont-}}%
+ \fi}{}{}}%
+ \def\{{\type@lbrace\yeshy}\def\}{\char`\}}%
+ \narrativett
+ \edef\narrativett@storedhyphenchar{\the\hyphenchar\font}%
+ \hyphenchar\font=%
+ \ifdefined\gmv@hyphenchar\gmv@hyphenchar
+ \else "A6
+ \fi
+ \cs@inner{#1}%
+}% of |\cs|
+
+\let\type@bslash\bslash
+
+\pdef\cs@inner#1#2{%
+ #1#2%
+ \endgroup}
+
+\def\narrativett{\ttfamily}% such name because I~introduce it to
+
+\long\pdef\env{\cs[]}
+
+\foone{\@makeother\^}
+ {\pdef\hathat{\cs[^^]}}
+
+\AtBeginDocument{%
+ \@ifpackageloaded{gmdoc}{\def\hash{\cs[\#]}}{}}
+
+\def\possfil{\hfil\penalty1000\hfilneg}
+
+\def\possvfil{\vfil
+ \penalty\numexpr
+ \gmu@minnum{\clubpenalty+\widowpenalty}{9999}%
+ \relax % eaten by |\gmu@maxnum|
+ \relax % eaten by |\numexpr|
+ \vfilneg}
+
+
+\long\def\cmd#1{\@xa\cs\@xa{\@xa\cmd@to@cs\string#1}\spifletter}% it has to be
+
+\def\cmd@to@cs#1#2{\char\number`#2\relax}
+
+\pdef\marg#1{{\narrativett\type@lbrace}\arg@wrap{#1}{\narrativett\char`\}}}
+
+\pdef\oarg{\@ifnextchar[\@oargsq\@oarg}
+\pdef\@oarg#1{{\narrativett[}\arg@wrap{#1}{\narrativett]}}
+\pdef\@oargsq[#1]{\@oarg{#1}}
+
+\pdef\parg{\@ifnextchar(\@pargp\@parg}
+\def\@parg#1{{\narrativett(}\arg@wrap{#1}{\narrativett)}}
+\def\@pargp(#1){\@parg{#1}}
+
+\pdef\aarg{\@ifnextchar<\@aarga\@aarg}
+\def\@aarg#1{{\narrativett<}\arg@wrap{#1}{\narrativett>}}
+\def\@aarga<#1>{\@aarg{#1}}
+
+\def\@verbaarga#1#2>{\@aarg{#2}\arg@dc}
+
+\foone{\catcode`>\active}{%
+ \def\@verbaargact#1#2>{\@aarg{#2}\arg@dc}%
+}
+
+\foone{\@makeother\{\@makeother\}%
+ \catcode`[=\@ne\catcode`]=\tw@}
+[% ^^A{
+ \def\@verbmargm#1#2}[% for an argument in curly braces in a verbatim, where
+ % the braces are not groupers and not necessary ‘other’. We'll know
+ % by \incmd{\@ifnextif} that the future token is an opening
+ % brace. Note this macro has 2nd parameter delimited with ‘other’
+ % closing brace (so may not act correctly when braces are nested
+ % (then hide them with special verbatim groupers)).
+ \marg[#2]%
+ \arg@dc
+ ]%
+]% of |\foone|
+
+\def\arg@wrap{\meta}
+
+\DeclareCommand\arg@dc!{%
+ % \chgs{200/03/04 v0.991 added rcognising of verbatim braces and
+ % angles}
+ s % (1)
+ o % (2)
+ c % (3)
+ b % (4)
+ a % (5)
+ T{\arg} % (6) just gobbled (for backwards compatibility)
+}{% This command iterates while it
+ % has arguments and typesets them in brackets, parentheses or curly
+ % braces. Note it gobbles subsequent |\arg|s and just iterates.
+ \def\next{0}%
+ \gmuIfValueT{#1}%
+ {\metachar[\scanverb{*}\metachar]\def\next{1}}%
+ \gmuIfValueT{#2}{\@oarg{#2}\def\next{1}}%
+ \gmuIfValueT{#3}{\@parg{#3}\def\next{1}}%
+ \gmuIfValueT{#4}{\marg{#4}\def\next{1}}%
+ \gmuIfValueT{#5}{\aarg{#5}\def\next{1}}%
+ \@ifnextchar\egroup{\endgroup}{%
+ \if1\next\@xa\arg@dc
+ \else % it's crucial that we look for verbatim braces \emph{after}
+ % we checked there were no \inhash4, otherwise there would
+ % be an error.
+ \def\next{%
+ \@ifnextif\xiilbrace{\@verbmargm}%
+ {% not active or other lbrace
+ \@ifnextif<{% then we look for angles
+ \ifnum\catcode`>=\active
+ \@xa\@verbaargact
+ \else\@xa\@verbaarga
+ \fi}%
+ {% and if not angles neither verbatim braces, then
+ \endgroup % if we have no more arguments to typeset, we
+ % close the group opened in lines \ref{queer.group} and \ref{queer.group2}.
+ \spifletter
+ }%
+ }%
+ }%
+ \@xa \next
+ \fi
+ }% of not egroup
+}% of |\arg@dc|
+
+\foone{\obeylines\@makeother\^^C}{%
+ \AtBeginDocument{%
+ \let\math@arg\arg %
+ \pdef\arg{% This is |\arg| for meta-arguments.
+ \ifmmode\math@arg %
+ % \chgs{200/03/04 v0.991 added rcognising of verbatim braces and angles}
+ \else\afterfi{%
+ \begingroup %
+ % \label{queer.group}
+ \ifdefined\@ifQueerEOL\@ifQueerEOL{%
+ \def^^M{\unskip\space}% in the ‘queer’ \ac{EOL}s scope we
+ % keep line end active in case we have
+ % \incmd\arg\nlpercent\arg{arg.} ending a~line: the next
+ % char peeper touches line end or, if the line end was $_5$,
+ % gobbles the space it turns into so the comment layer would
+ % ‘leak’ to the code layer.
+ }{}\fi %
+ \arg@dc}%
+ \fi}% of |\arg|,
+ }% of |\AtBeginDocument|,
+ %
+ % \stanza
+ % And this is arg-typesetting command for verbatim arguments.
+ \pdef\argv{%
+ \begingroup %
+ % \label{queer.group2}
+ \@makeother\^^C%
+ \pdef\arg@wrap##1{%
+ \narrativett{##1}%
+ }%
+ \ifdefined\@ifQueerEOL\@ifQueerEOL{%
+ \def^^M{\unskip\space}% in the ‘queer’ \ac{EOL}s scope we
+ % keep line end active… as above
+ }{}%
+ \fi % of |\ifdefined|
+ \arg@dc}%
+}% of |\foone|.
+
+
+\DeclareCommand\cat{Q{'"0123456789ABCDEF}{0}}{%
+ ${}_{\the\numexpr#1}\m@th$\spifletter
+}
+
+\pdef\CS{% \changes{v0.99n}{2008/08/30}{added}
+ \acro{CS}%
+ \@ifnextcat a{ }{}}% we put a~space if the next token is
+
+\pdef\CSs{\CS{}es\@ifnextcat a{ }{}}% for pluralis.
+\pdef\CSes{\CS{}es\@ifnextcat a{ }{}}% for pluralis.
+
+
+\endinput
+%%
+%% End of file `gmmeta.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmmw.sty b/tex/.texmf/tex/latex/misc/gmmw.sty
new file mode 100644
index 0000000..46b8e41
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmmw.sty
@@ -0,0 +1,363 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmmw.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `mw')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmmw}
+ [2011/10/12 v0.996 improvements and workarounds to the MWCLS classes (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+\RequirePackage{gmcommand}
+
+
+\AtBeginDocument{% because we don't know when exactly \pk{hyperref} is
+ % loaded and maybe after this package.
+ \@ifpackageloaded{hyperref}{\newcounter{NoNumSecs}%
+ \setcounter{NoNumSecs}{617}% to make |\ref|ing to an unnumbered section
+ % visible (and funny?).
+ \def\gmu@hyperrefstepcounter{\refstepcounter{NoNumSecs}}%
+ \pdef\gmu@targetheading#1{%
+ \hypertarget{#1}{#1}}}% end of then
+ {\def\gmu@hyperrefstepcounter{}%
+ \def\gmu@targetheading#1{#1}}% end of else
+}% of |\AtBeginDocument|
+
+\def\gmu@dontnumbersectionsoutofmainmatter{%
+ \if@mainmatter\else \HeadingNumberedfalse \fi}
+\def\gmu@clearpagesduetoopenright{%
+ \if@openright\cleardoublepage\else \clearpage\fi}
+
+\long\def\@ifnotmw#1#2{\gmu@ifundefined{mw@sectionxx}{#1}{#2}}
+
+\@ifnotmw{}{%
+\def\mw@sectionxx#1#2[#3]#4{%
+ \edef\mw@HeadingLevel{\csname #1@level\endcsname
+ \space}% space delimits level number!
+ \ifHeadingNumbered
+ \ifnum \mw@HeadingLevel>\c@secnumdepth \HeadingNumberedfalse \fi
+ % \nostanza line below is in |\gmu@ifundefined| to make it work in classes
+ % other than \pk{mwbk}\nostanza
+ \gmu@ifundefined{if@mainmatter}{}{\gmu@dontnumbersectionsoutofmainmatter}
+ \fi
+%% \ifHeadingNumbered
+%% \refstepcounter{#1}%
+%% \protected@edef\HeadingNumber{\csname the#1\endcsname\relax}%
+%% \else
+%% \let\HeadingNumber\@empty
+%% \fi
+ \def\HeadingRHeadText{#2}%
+ \def\HeadingTOCText{#3}%
+ \def\HeadingText{#4}%
+ \def\mw@HeadingType{#1}%
+ \if\mw@HeadingBreakBefore
+ \if@specialpage\else\thispagestyle{closing}\fi
+ \gmu@ifundefined{if@openright}{}{\gmu@clearpagesduetoopenright}%
+ \if\mw@HeadingBreakAfter
+ \thispagestyle{blank}\else
+ \thispagestyle{opening}\fi
+ \global\@topnum\z@
+ \fi% of |\if\mw@HeadingBreakBefore|
+%%
+ \ifHeadingNumbered
+ \refstepcounter{#1}%
+ \protected@edef\HeadingNumber{\csname the#1\endcsname\relax}%
+ \else
+ \let\HeadingNumber\@empty
+ \gmu@hyperrefstepcounter % we step an auxiliary counter to make a
+ % hyperref's label/target.
+ \fi% of |\ifHeadingNumbered|
+%%
+ \if\mw@HeadingRunIn
+ \mw@runinheading
+ \else
+ \if\mw@HeadingWholeWidth
+ \if@twocolumn
+ \if\mw@HeadingBreakAfter
+ \onecolumn
+ \mw@normalheading
+ \pagebreak\relax
+ \if@twoside
+ \null
+ \thispagestyle{blank}%
+ \newpage
+ \fi% of |\if@twoside|
+ \twocolumn
+ \else
+ \@topnewpage[\mw@normalheading]%
+ \fi% of |\if\mw@HeadingBreakAfter|
+ \else
+ \mw@normalheading
+ \if\mw@HeadingBreakAfter\pagebreak\relax\fi
+ \fi% of |\if@twocolumn|
+ \else
+ \mw@normalheading
+ \if\mw@HeadingBreakAfter\pagebreak\relax\fi
+ \fi% of |\if\mw@HeadingWholeWidth|
+ \fi% of |\if\mw@HeadingRunIn|
+ }
+
+
+\relaxen\SetSectionFormatting
+\newcommand*\SetSectionFormatting[5][\empty]{%
+ \ifx\empty#1\relax\else% empty (not |\empty|!) |#1| also launches |\else|.\HideDef
+ \def\mw@HeadingRunIn{10}\def\mw@HeadingBreakBefore{10}%
+ \def\mw@HeadingBreakAfter{10}\def\mw@HeadingWholeWidth{10}%
+ \gmu@ifempty{#1}{}{\mw@processflags#1,\relax}% If |#1| is omitted,
+ % the flags are left unchanged. If |#1| is given, even as [], the
+ % flags are first cleared and then processed again.
+ \fi
+ \gmu@ifundefined{#2}{\@namedef{#2}{\mw@section{#2}}}{}%
+ \mw@secdef{#2}{@preskip} {#3}{2 oblig.}%
+ \mw@secdef{#2}{@head} {#4}{3 oblig.}%
+ \mw@secdef{#2}{@postskip}{#5}{4 oblig.}%
+ \ifx\empty#1\relax
+ \mw@secundef{#2@flags}{1 (optional)}%
+ \else\mw@setflags{#2}% \ResumeDef
+ \fi}
+
+\def\mw@secdef#1#2#3#4{% ^^B
+ \gmu@ifempty{#3}
+ {\mw@secundef{#1#2}{#4}}
+ {\@namedef{#1#2}{#3}}}
+
+\def\mw@secundef#1#2{%
+ \gmu@ifundefined{#1}{%
+ \ClassError{mwcls/gm}{%
+ command \bslash#1 undefined \MessageBreak
+ after \bslash SetSectionFormatting!!!\MessageBreak}{%
+ Provide the #2 argument of \bslash SetSectionFormatting.}}{}}
+
+\def\addtoheading#1#2{%
+ \n@melet{gmu@addtoheading@resa}{#1@head}%
+ \edef\gmu@addtoheading@resa{\unexpanded{#2}\@xa\unexpanded{\gmu@addtoheading@resa}}%
+ \n@melet{#1@head}{gmu@addtoheading@resa}%
+}
+
+}% of |\@ifnotmw|'s else.
+
+
+\@ifnotmw{}{% We proceed only in \acro{MWCLS}.
+
+\def\@afterheading{%
+ \@nobreaktrue
+ \xdef\gmu@prevsec{\mw@HeadingType}% added now
+ \everypar{%
+ \grelaxen\gmu@prevsec% added now. All the rest is original \LaTeX.
+ \if@nobreak
+ \@nobreakfalse
+ \clubpenalty \@M
+ \if@afterindent \else
+ {\setbox\z@\lastbox}%
+ \fi
+ \else
+ \clubpenalty \@clubpenalty
+ \everypar{}%
+ \fi}}
+
+\def\gmu@checkaftersec{%
+ \gmu@ifundefined{gmu@prevsec}{}{%
+ \ifgmu@postsec% an additional switch that is true by default but
+ % may be turned into an \cs{ifdim} in special
+ % cases, see line \ref{gmu@postsec}.
+ {\@xa\mw@getflags\@xa{\gmu@prevsec}%
+ \glet\gmu@checkaftersec@resa\mw@HeadingBreakAfter}% \UnDef
+ \if\mw@HeadingBreakBefore\def\gmu@checkaftersec@resa{11}\fi% if the
+ % current heading inserts page break before itself, all the play
+ % with vskips is irrelevant.
+ \if\gmu@checkaftersec@resa\else
+ \penalty10000\relax
+ \skip\z@=\csname\gmu@prevsec @postskip\endcsname\relax
+ \skip\tw@=\csname\mw@HeadingType @preskip\endcsname\relax
+ \gmu@ifundefined{\mw@HeadingType @twoheadskip}{%
+ \ifdim\skip\z@>\skip\tw@
+ \vskip-\skip\z@% we strip off the post-skip of previous
+ % header if it's bigger than current pre-skip
+ \else
+ \vskip-\skip\tw@% we strip off the current pre-skip otherwise
+ \fi}{% But if the two-header-skip is defined, we put
+ % \emph{it}
+ \penalty10000
+ \vskip-\skip\z@
+ \penalty10000
+ \vskip-\skip\tw@
+ \penalty10000
+ \vskip\csname\mw@HeadingType @twoheadskip\endcsname
+ \relax}%
+ \penalty10000
+ \hrule height\z@\relax% to hide the last (un)skip before subsequent
+ % \incs{addvspace}s. \ilrr
+ \penalty10000
+ \fi
+ \fi
+ }% of |\gmu@ifundefined{gmu@prevsec}| `else'.
+}% of |\def\gmu@checkaftersec|.
+
+\def\ParanoidPostsec{% \label{gmu@postsec} this version of
+ % \inverb|\ifgmu@postsec| is intended for the special case of
+ % sections may contain no normal text, as while \pk{gmdoc}ing.
+ \def\ifgmu@postsec{% note this macro expands to an open \cs{if}.
+ \skip\z@=\csname\gmu@prevsec @postskip\endcsname\relax
+ \ifdim\lastskip=\skip\z@\relax% we play
+ % with the vskips only if the last skip is the previous
+ % heading's postskip (a~counter-example I~met while
+ % \pk{gmdoc}ing).
+ }}
+
+\let\ifgmu@postsec\iftrue
+
+\def\gmu@getaddvs#1\addvspace#2\gmu@getaddvs{%
+ \toks\z@={#1}%
+ \toks\tw@={#2}}
+
+\def\gmu@setheading#1{%
+ \@xa\gmu@getaddvs#1\gmu@getaddvs
+ \edef#1{%
+ \the\toks\z@\@nx\gmu@checkaftersec
+ \@nx\addvspace\the\toks\tw@}}
+
+\gmu@setheading\mw@normalheading
+\gmu@setheading\mw@runinheading
+
+\def\SetTwoheadSkip#1#2{\@namedef{#1@twoheadskip}{#2}}
+
+}% of |\@ifnotmw|'s else.
+
+
+\@ifnotmw{}{% We define this declaration only when in \pk{mwcls}.
+\DeclareCommand\WPheadings{T{\chapter}}{%
+ \SetSectionFormatting[breakbefore,wholewidth]
+ {part}{\z@\@plus1fill}{}{\z@\@plus3fill}%
+ %
+ \gmuIfValueF{#1}{%
+ \gmu@ifundefined{chapter}{}{%
+ \SetSectionFormatting[breakbefore,wholewidth]
+ {chapter}
+ {66\p@}% |{67\p@}|% for Adventor/Schola 0,95.
+ {\FormatHangHeading{\LARGE}}
+ {27\p@\@plus0,2\p@\@minus1\p@}%
+ }%
+ }% of unless |#1|
+ %
+ \SetTwoheadSkip{section}{27\p@\@plus0,5\p@}%
+ \SetSectionFormatting{section}
+ {24\p@\@plus0,5\p@\@minus5\p@}% ^^A {24\p@\@plus5\p@\@minus2\p@}
+ {\FormatHangHeading {\Large}}
+ {10\p@\@plus0,5\p@}% ed.\ Krajewska of ``Wiedza Powszechna'', as
+ % we understand her, wants the skip between a~heading and text
+ % to be rigid.
+ %
+ \SetTwoheadSkip{subsection}{11\p@\@plus0,5\p@\@minus1\p@}%
+ \SetSectionFormatting{subsection}
+ {19\p@\@plus0,4\p@\@minus6\p@}
+ {\FormatHangHeading {\large}}% 12/14 pt
+ {6\p@\@plus0,3\p@}% after-skip 6\,pt due to p.12, not to squeeze
+ % the before-skip too much.
+ %
+ \SetTwoheadSkip{subsubsection}{10\p@\@plus1,75\p@\@minus1\p@}%
+ \SetSectionFormatting{subsubsection}
+ {10\p@\@plus0,2\p@\@minus1\p@}
+ {\FormatHangHeading {\normalsize}}
+ {3\p@\@plus0,1\p@}% those little skips should be smaller than
+ % you calculate out of a~geometric progression, because the
+ % interline skip enlarges them.
+ %
+ \SetSectionFormatting[runin]{paragraph}
+ {7\p@\@plus0,15\p@\@minus1\p@}
+ {\FormatRunInHeading{\normalsize}}
+ {2\p@}%
+ %
+ \SetSectionFormatting[runin]{subparagraph}
+ {4\p@\@plus1\p@\@minus0,5\p@}
+ {\FormatRunInHeading{\normalsize}}
+ {\z@}%
+}% of |\WPheadings|
+}% of |\@ifnotmw|
+
+\@ifnotmw{% we are not in \pk{mwcls} and want to
+ % handle \pk{mwcls}-like sectionings i.e., those written with two
+ % optionals.
+ \def\gmu@secini{gm@la}%
+ \Store@Macros{%
+ \partmark \chaptermark \sectionmark \subsectionmark
+ \subsubsectionmark \paragraphmark}%
+ % \Define\gmu@secxx
+ \def\gmu@secxx#1#2[#3]#4{%
+ \ifx\gmu@secstar\@empty
+ % \nostanza a~tiny little trick to allow
+ % a~special version of the heading just to the running head.
+ \@namedef{#1mark}##1{% we redefine \cs{\<sec>mark} to gobble its
+ % argument and to launch the stored true marking command on the
+ % appropriate argument.
+ \storedcsname{#1mark}{#2}%
+ \Restore@MacroSt{#1mark}% after we've done what we
+ % wanted we restore original |\#1mark|.\ilrr
+ }%
+ \def\gmu@secstar{[#3]}% if |\gmu@secstar|
+ % is empty, which means the sectioning command was written
+ % starless, we pass the `true' sectioning command |#3| as the
+ % optional argument. Otherwise the sectioning command was written
+ % with star so the `true' s.c.\ takes no optional.
+ \fi
+ \@xa\@xa\csname\gmu@secini#1\endcsname
+ \gmu@secstar{#4}}%
+}{% we are in \pk{mwcls} and want to reverse MW's optionals order
+ % i.e., if there's just one optional, it should go both to toc and to
+ % running head.
+ \def\gmu@secini{gm@mw}%
+ %
+ \let\gmu@secmarkh\@gobble% in \pk{mwcls} there's no need to make
+ % tricks for special version to running headings.
+ % \Define\gmu@secxx
+ \def\gmu@secxx#1#2[#3]#4{%
+ \@xa\@xa\csname\gmu@secini#1\endcsname
+ \gmu@secstar[#2][#3]{#4}}%
+}
+
+\def\gmu@sec#1{\@dblarg{\gmu@secx{#1}}}
+\def\gmu@secx#1[#2]{%
+ \@ifnextchar[{\gmu@secxx{#1}{#2}}{\gmu@secxx{#1}{#2}[#2]}}% if
+
+\def\gmu@straightensec#1{% the parameter is for the command's name.
+ \gmu@ifundefined{#1}{}{% we don't change the ontological status of the
+ % command because someone may test it.
+ \n@melet{\gmu@secini#1}{#1}%
+ \@namedef{#1}{%
+ \gmu@ifstar{\def\gmu@secstar{*}\gmu@sec{#1}}{%
+ \def\gmu@secstar{}\gmu@sec{#1}}}}%
+}%
+
+\let\do\gmu@straightensec
+\do{part}\do{chapter}\do{section}\do{subsection}\do{subsubsection}
+\@ifnotmw{}{\do{paragraph}}% this `straightening' of
+
+\endinput
+%%
+%% End of file `gmmw.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmnotonlypream.sty b/tex/.texmf/tex/latex/misc/gmnotonlypream.sty
new file mode 100644
index 0000000..1578aba
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmnotonlypream.sty
@@ -0,0 +1,88 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmnotonlypream.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `notonlypream')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmnotonlypream}
+ [2011/10/12 v0.996 modification of the 'only preamble' clause (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage{gmampulex}
+
+
+\newcommand\not@onlypreamble[1]{{%
+ \def\do##1{\ifx#1##1\else\@nx\do\@nx##1\fi}%
+ \xdef\@preamblecmds{\@preamblecmds}}}
+
+\not@onlypreamble\@preamblecmds
+\not@onlypreamble\@ifpackageloaded
+\not@onlypreamble\@ifclassloaded
+\not@onlypreamble\@ifl@aded
+\not@onlypreamble\@pkgextension
+
+\not@onlypreamble\@pushfilename
+\not@onlypreamble\@popfilename
+
+\not@onlypreamble\@currnamestack
+
+
+\def\gmu@notprerr{ can be used only in preamble (\on@line)}
+
+\AtBeginDocument{%
+ \def\do#1{\@nx\do\@nx#1}%
+ \edef\@preamblecmds{%
+ \def\@nx\do##1{%
+ \def##1{\@nx\gmno@NotprerrMessage##1}\@nx\@eha}}%
+ \@preamblecmds}
+
+\def\gmno@NotprerrMessage#1{%
+ \PackageError{gmutils/LaTeX}%
+ {\@nx\string#1 \@nx\gmu@notprerr}{}%
+}
+
+
+\def\gmu@nocite@ampulex{% we wrap the stuff in a~macro to hide an open
+ % \incs{if}. And not to make the begin-input hook too large.
+ % \label{ampulexset} the first optional argument is the
+ % parameters string and the second the argument for one-level
+ % expansion of \incs{nocite}. Both hash strings are doubled to pass
+ % the % first \incs{def}.
+ \ampulexdef\nocite[##1][##1]
+ \ifx
+ {\@onlypreamble\document}%
+ \iftrue}
+
+\AtBeginDocument{\gmu@nocite@ampulex}%
+
+\endinput
+%%
+%% End of file `gmnotonlypream.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmparts.sty b/tex/.texmf/tex/latex/misc/gmparts.sty
new file mode 100644
index 0000000..2551f47
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmparts.sty
@@ -0,0 +1,165 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmparts.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `parts')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmparts}
+ [2011/10/12 v0.996 modification of \string \include \space \string & in/excluding parts of main file (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+
+\RequirePackage{gmcommand}
+
+\def\gmu@getext#1.#2\@nil{%\UnDef
+ \def\gmu@filename{#1}%\UnDef
+ \def\gmu@fileext{#2}}
+
+\def\include#1{\relax
+ \ifnum\@auxout=\@partaux
+ \@latex@error{\string\include\space cannot be nested}\@eha
+ \else \@include#1 \fi}
+
+\def\@include#1 {%
+ \gmu@getext#1.\@nil
+ % \UnDef
+ \ifx\gmu@fileext\empty\def\gmu@fileext{tex}\fi
+ \clearpage
+ \if@filesw
+ \immediate\write\@mainaux{\string\@input{\gmu@filename.aux}}%
+ \fi
+ \@tempswatrue
+ \if@partsw
+ \@tempswafalse
+ \edef\reserved@b{#1}%
+ \@for\reserved@a:=\@partlist\do{%
+ \ifx\reserved@a\reserved@b\@tempswatrue\fi}%
+ \fi
+ \if@tempswa
+ \let\@auxout\@partaux
+ \if@filesw
+ \immediate\openout\@partaux \gmu@filename.aux
+ \immediate\write\@partaux{\relax}%
+ \fi
+ \@input@{\gmu@filename.\gmu@fileext}%
+ \inclasthook
+ \clearpage
+ \@writeckpt{\gmu@filename}%
+ \if@filesw
+ \immediate\closeout\@partaux
+ \fi
+ \else
+ \deadcycles\z@
+ \@nameuse{cp@\gmu@filename}%
+ \fi
+ \let\@auxout\@mainaux
+}
+
+\newcommand\whenonly[3]{%
+ \def\gmu@whonly{#1,}%
+ \ifx\gmu@whonly\@partlist\afterfi{#2}\else\afterfi{#3}\fi}
+
+\def\inclasthook{\thispagestyle{closing}}
+
+\def\filepart#1{\relax
+ \ifnum\@auxout=\@partaux
+ \@latex@error{\string\filepart\space cannot be nested}\@eha
+ \else\afterfi{\@filepart#1 }\fi}
+
+\def\@filepart#1 {%
+ \clearpage
+ \edef\gmu@filepartname{#1}% we'll use it later
+ \if@filesw
+ \immediate\write\@mainaux{\string\@input{#1.aux}}%
+ \fi
+ \@tempswatrue
+ \if@partsw
+ \@tempswafalse
+ \@for\gmu@filepart@resa:=\@partlist\do{%
+ \ifx\gmu@filepart@resa\gmu@filepartname\@tempswatrue\fi}%
+ \fi
+ \if@tempswa
+ \let\@auxout\@partaux
+ \if@filesw
+ \immediate\openout\@partaux #1.aux
+ \immediate\write\@partaux{\relax}%
+ \fi
+ \@xa\@firstoftwo
+ % \label{spart:iftrue}
+ \else
+ \deadcycles\z@
+ \@nameuse{cp@\gmu@filepartname}%
+ \let\@auxout\@mainaux
+ \@xa\@secondoftwo
+ \fi
+ {\iftrue}%
+ {\let\endfilepart\fi
+ \csname gm@skipped@#1\endcsname
+ \def\next{\Restore@MacroSt {endfilepart}%
+ \@ifnextchar\bgroup{\show\NextBgroup\@gobble}{}}%
+ \@xa\next\iffalse}%
+}
+
+\DeclareCommand\endfilepart{b}{% Note the argument is not used really. Maybe later we'll
+ % use it for checking of proper matching. Or maybe not.
+ \inclasthook
+ \clearpage
+ \@writeckpt{\gmu@filepartname}%
+ \if@filesw
+ \immediate\closeout\@partaux
+ \fi
+ \fi% this |\fi| closes |\Iftrue| put by line \ref{spart:iftrue}.
+ \let\@auxout\@mainaux
+}
+
+\Store@Macro\endfilepart
+
+\def\nofileparts{%
+ \let\filepart\@gobble
+ \DeclareCommand\endfilepart{b}{}%
+}
+
+
+\def\includecountfix{%
+ \def\@wckptelt##1{%
+ \immediate\write\@partaux{%
+ \providecounter{##1}% to
+ % provide the font counters defined
+ % in parts of the document.
+ \string\setcounter{##1}{\the\@nameuse{c@##1}}}}%
+}
+
+\pdef\providecounter#1{%
+ \unless\ifcsname c@#1\endcsname\newcounter{#1}\fi}
+
+\endinput
+%%
+%% End of file `gmparts.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmrelsize.sty b/tex/.texmf/tex/latex/misc/gmrelsize.sty
new file mode 100644
index 0000000..9ee550c
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmrelsize.sty
@@ -0,0 +1,80 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmrelsize.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `relsize')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmrelsize}
+ [2010/04/09 v0.996 chosen macros from the relsize package and mine (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+\protected\def\relsize#1{%
+ \ifmmode \@nomath\relsize\else
+ \begingroup
+ \@tempcnta % assign number representing current font size
+ \ifx\@currsize\normalsize 4\else % funny order is to have most …
+ \ifx\@currsize\small 3\else % …likely sizes checked first
+ \ifx\@currsize\footnotesize 2\else
+ \ifx\@currsize\large 5\else
+ \ifx\@currsize\Large 6\else
+ \ifx\@currsize\LARGE 7\else
+ \ifx\@currsize\scriptsize 1\else
+ \ifx\@currsize\tiny 0\else
+ \ifx\@currsize\huge 8\else
+ \ifx\@currsize\Huge 9\else
+ 4\rs@unknown@warning % unknown state: |\normalsize| as starting point
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \advance\@tempcnta#1\relax
+ \ifnum\@tempcnta<\z@ \rs@size@warning{small}{\string\tiny}\@tempcnta\z@ \fi
+ \@xa\endgroup
+ \ifcase\@tempcnta % set new size based on altered number
+ \tiny \or \scriptsize \or \footnotesize \or \small \or \normalsize \or
+ \large \or \Large \or \LARGE \or \huge \or \Huge \else
+ \rs@size@warning{large}{\string\Huge}\Huge
+\fi\fi}% end of |\relsize|.
+
+\providecommand*\rs@size@warning[2]{\PackageWarning{gmutils (relsize)}{%
+ Size requested is too #1.\MessageBreak Using #2 instead}%
+}%
+
+\providecommand*\rs@unknown@warning{\PackageWarning{gmutils (relsize)}{Current font size
+ is unknown! (Why?!?)\MessageBreak Assuming \string\normalsize}}
+
+\DeclareRobustCommand*\larger[1][\@ne]{\relsize{+#1}}
+\DeclareRobustCommand*\smaller[1][\@ne]{\relsize{-#1}}
+\DeclareRobustCommand*\textlarger[2][\@ne]{{\relsize{+#1}#2}}
+\DeclareRobustCommand*\textsmaller[2][\@ne]{{\relsize{-#1}#2}}
+\protected\def\largerr{\relsize{+2}}
+\protected\def\smallerr{\relsize{-2}}
+
+
+\endinput
+%%
+%% End of file `gmrelsize.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmtypos.sty b/tex/.texmf/tex/latex/misc/gmtypos.sty
new file mode 100644
index 0000000..65f6516
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmtypos.sty
@@ -0,0 +1,2099 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmtypos.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `typos')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmtypos}
+ [2011/10/12 v0.996 a collection of macros, mostly typographical (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+\RequirePackage{gmcommand, gmnotonlypream}
+
+\unless\ifcsname ifgmu@quiet\endcsname
+ \@xa\newif\csname ifgmu@quiet\endcsname
+\fi
+
+\DeclareOption{quiet}{\gmu@quiettrue}
+
+\ProcessOptions
+
+\AtBeginDocument{%
+ \@ifpackageloaded{fontspec}{%
+ \pdef\udigits{%
+ \addfontfeature{Numbers=Uppercase}}%
+ }{%
+ \emptify\udigits}%
+}
+
+
+\def\Xedekfracc{\gmu@ifstar\gmu@xedekfraccstar\gmu@xedekfraccplain}
+ % (plain) The starless version turns the font feature |frac| on.
+ %
+ % (\*) But nor my modification of Minion Pro neither \TeX\ Gyre
+ % Pagella doesn't feature the
+ % |frac| font feature properly so, with the starred version of the
+ % declaration we use the characters from the font where available
+ % (see the |\@namedef|s below) and the |numr| and |dnom| features
+ % with the fractional slash otherwise (via |\gmu@dekfracc|).
+ %
+ % (\*\*) But Latin Modern Sans Serif Quotation doesn't support the
+ % numerator and denominator positions so we provide the double
+ % star version for it, which takes the char from font if it exist
+ % and typesets with lowers and kerns otherwise.
+
+\def\gmu@xedekfraccstar{%
+ \def\gmu@xefraccdef##1##2{%
+ \iffontchar\font ##2
+ \@namedef{gmu@xefracc##1}{\char##2 }%
+ \else
+ \n@melet{gmu@xefracc##1}{relax}%
+ \fi}%
+ %
+ \def\gmu@dekfracc##1/##2{%
+ {\addfontfeature{VerticalPosition=Numerator}##1}\gmu@numeratorkern
+ \char"2044 \gmu@denominatorkern
+ {\addfontfeature{VerticalPosition=Denominator}##2}}%
+ %
+ % We define the fractional macros. Since Adobe Minion Pro doesn't
+ % contain $\frac n5$ nor $\frac n6$, we don't provide them here.
+ \gmu@xefraccdef{1/4}{"BC}%
+ \gmu@xefraccdef{1/2}{"BD}%
+ \gmu@xefraccdef{3/4}{"BE}%
+ \gmu@xefraccdef{1/3}{"2153}%
+ \gmu@xefraccdef{2/3}{"2154}%
+ \gmu@xefraccdef{1/5}{"2155}%
+ \gmu@xefraccdef{2/5}{"2156}%
+ \gmu@xefraccdef{3/5}{"2157}%
+ \gmu@xefraccdef{4/5}{"2158}%
+ \gmu@xefraccdef{1/6}{"2159}%
+ \gmu@xefraccdef{5/6}{"215A}%
+ \gmu@xefraccdef{1/8}{"215B}%
+ \gmu@xefraccdef{3/8}{"215C}%
+ \gmu@xefraccdef{5/8}{"215D}%
+ \gmu@xefraccdef{7/8}{"215E}%
+ \pdef\dekfracc@args##1/##2{%
+ \gmu@ifundefined{gmu@xefracc\detokenize{##1/##2}}{%
+ \gmu@dekfracc{##1}/{##2}}{%
+ \csname gmu@xefracc\detokenize{##1/##2}\endcsname}%
+ \if@gmu@mmhbox\egroup\fi
+ }% of |\dekfracc@args|.
+ \gmu@ifstar{\let\gmu@dekfracc\gmu@dekfraccsimple}{}%
+ }
+
+\def\gmu@xedekfraccplain{% `else' of the main |\gmu@ifstar|
+ \pdef\dekfracc@args##1/##2{%
+ \ifmmode\hbox\fi{%
+ \addfontfeature{Fractions=On}%
+ ##1/##2}%
+ \if@gmu@mmhbox\egroup\fi
+ }% of |\dekfracc@args|
+ }
+
+\newif\if@gmu@mmhbox% we'll use this switch for |\dekfracc| and also
+
+\pdef\dekfracc{% \changes{v0.94}{2008/09/14}{made to work also in math
+ % mode, even with math-active digits}
+ \ifmmode\hbox\bgroup\@gmu@mmhboxtrue\fi
+ \dekfracc@args}
+
+\def\gmu@numeratorkern{\kern-.055em\relax}
+\def\gmu@denominatorkern{\kern-.05em\relax}
+
+
+
+\pdef\textsuperscript@@#1{%
+ \@textsuperscript{\selectfont#1}}%
+\def\@textsuperscript#1{%
+ {\m@th\ensuremath{^{\mbox{\fontsize\sf@size\z@#1}}}}}
+
+\let\textsuperscript@@\textsuperscript
+
+\def\GMtextsuperscript{%
+ \@ifXeTeX{%
+ \DeclareCommand\textsuperscript{sm}{%
+ \gmuIfValueTF{##1}{\textsuperscript@@{##2}}%
+ {%
+ \begingroup
+ \addfontfeature{VerticalPosition=Numerator}##2%
+ \endgroup}}%
+ }{\truetextsuperscript}}
+
+\def\truetextsuperscript{%
+ \let\textsuperscript\textsuperscript@@
+}
+
+
+
+\def\gmu@getfontstring{%
+ \xdef\gmu@fontstring{%
+ \gmu@fontstring@}}
+
+\def\gmu@fontstring@{%
+ \@xa\@xa\@xa\gmu@fontstring@@\@xa\meaning\the\font\@nil}
+
+\def\gmu@fontstring@@#1"#2"#3\@nil{"#2"}
+
+\def\gmu@getfontscale#1Scale#2=#3,{%
+ \ifx\gmu@getfontscale#3\else
+ \def\gmu@tempa{MatchLowercase}%
+ \def\gmu@tempb{#3}%
+ \ifx\gmu@tempa\gmu@tempb
+ \gmu@calc@scale{5}%
+ \@xa\@firstoftwo
+ \else
+ \def\gmu@tempa{MatchUppercase}%
+ \ifx\gmu@tempa\gmu@tempb
+ \gmu@calc@scale{8}%
+ \afterfifi\@firstoftwo
+ \else\afterfifi\@secondoftwo
+ \fi
+ \fi
+ {\xdef\gmu@fontscalebr{[\gmu@fontscale] }}%
+ {\xdef\gmu@fontscalebr{[#3] }}%
+ \afterfi\gmu@getfontscale
+ \fi
+}
+
+\def\gmu@getfontdata#1{%
+ \global\emptify\gmu@fontscalebr
+ \begingroup
+ #1%
+ \@xa\@xa\@xa\gmu@getfontscale
+ \csname zf@family@options\f@family\endcsname
+ ,Scale=\gmu@getfontscale,%
+ \gmu@getfontstring
+ \xdef\gmu@theskewchar{\the\skewchar\font}%
+ \endgroup}
+
+\def\gmu@stripchar#1"{"}
+
+\DeclareCommand\gmath@getfamnum{C{\gmath@fam}}{%
+ \edef\gmath@famnum{\@xa\gmu@stripchar\meaning#1}%
+}
+
+
+\DeclareCommand\gmathFams{o % the name of math version
+ C{\NoValue} % ‘rescue’ font. Will be accessible via
+ % \inverb|\symgmathRoman⁄<version>| (math family) and
+ % \inverb|\gmath@fontt⁄<version>| (font).
+}{%
+ \gmuIfValueT{#1}{%
+ \DeclareMathVersion{#1}% this sets the defaults so no need to
+ % define them explicitly
+ }% of if |#1| given
+ %
+ \gmu@getfontdata{\rmfamily\itshape}%
+ %
+ \edef\gmu@tempa{%
+ \gmuIfValueTF{#1}{\@nx\SetSymbolFont{letters}{#1}}%
+ {\@nx\DeclareSymbolFont{letters}}%
+ {\encodingdefault}{gmathit\gmuPutIfValue{#1}}{m}{it}%
+ \gmuIfValueT{#1}{%
+ \@nx\DeclareSymbolFont{letters#1}%
+ {\encodingdefault}{gmathit\gmuPutIfValue{#1}}{m}{it}%
+ }%
+ \@nx\DeclareFontFamily{\encodingdefault}{gmathit\gmuPutIfValue{#1}}{%
+ \skewchar\font\gmu@theskewchar\space}%
+ \@nx\DeclareFontShape{\encodingdefault}{gmathit\gmuPutIfValue{#1}}{m}{it}{%
+ <-> \gmu@fontscalebr \gmu@fontstring}{}%
+ \gmuIfValueT{#1}{%
+ \@nx\SetMathAlphabet\@nx\mathit{#1}{\encodingdefault}{gmathit#1}{m}{it}}%
+ }\gmu@tempa
+ %
+ \gmuIfValueT{#2}{%
+ \gmu@getfontdata{#2\gmu@ifstored{\upshape}{\storedcsname{upshape}}{\upshape}}%
+ \edef\gmu@tempa{%
+ \@nx\DeclareSymbolFont{gmathRoman\gmuPutIfValue{#1}}%
+ {\encodingdefault}{gmathRm\gmuPutIfValue{#1}}{m}{n}%
+ \@nx\DeclareFontFamily{\encodingdefault}{gmathRm\gmuPutIfValue{#1}}{%
+ \skewchar\font\gmu@theskewchar\space}%
+ \@nx\DeclareFontShape{\encodingdefault}{gmathRm\gmuPutIfValue{#1}}{m}{n}{%
+ <-> \gmu@fontscalebr \gmu@fontstring}{}%
+ }\gmu@tempa
+ \@xa\font\csname gmath@fontt\gmuPutIfValue{#1}\endcsname
+ =\gmu@fontstring\relax
+ % \stanza
+ \gmu@getfontdata{#2\gmu@ifstored{\itshape}{\storedcsname{itshape}}{\itshape}}%
+ \edef\gmu@tempa{%
+ \@nx\DeclareSymbolFont{gmathItalic\gmuPutIfValue{#1}}%
+ {\encodingdefault}{gmathIt\gmuPutIfValue{#1}}{m}{n}%
+ \@nx\DeclareFontFamily{\encodingdefault}{gmathIt\gmuPutIfValue{#1}}{%
+ \skewchar\font\gmu@theskewchar\space}%
+ \@nx\DeclareFontShape{\encodingdefault}{gmathIt\gmuPutIfValue{#1}}{m}{n}{%
+ <-> \gmu@fontscalebr \gmu@fontstring}{}%
+ }\gmu@tempa
+ }% of if |#2| given
+ % \stanza
+ \gmu@getfontdata{\rmfamily\upshape}%
+ \edef\gmu@tempa{%
+ \gmuIfValueTF{#1}{\@nx\SetSymbolFont{gmathroman}{#1}}%
+ {\@nx\DeclareSymbolFont{gmathroman}}%
+ {\encodingdefault}{gmathrm\gmuPutIfValue{#1}}{m}{n}%
+ \@nx\DeclareFontFamily{\encodingdefault}{gmathrm\gmuPutIfValue{#1}}{%
+ \skewchar\font\gmu@theskewchar\space}%
+ \@nx\DeclareFontShape{\encodingdefault}{gmathrm\gmuPutIfValue{#1}}{m}{n}{%
+ <-> \gmu@fontscalebr \gmu@fontstring}{}%
+ \gmuIfValueT{#1}{%
+ \@nx\SetMathAlphabet\@nx\mathrm{#1}{\encodingdefault}{gmathrm#1}{m}{n}}%
+ }\gmu@tempa
+ \@xa\font\csname gmath@font\gmuPutIfValue{#1}\endcsname
+ =\gmu@fontstring\relax
+ \gmathfamshook
+}
+
+\emptify\gmathfamshook
+
+\DeclareCommand\gmathbase{oC{\NoValue}}{%
+ \gmathFams[#1](#2)%
+ \DeclareCommand\gmath@do{%
+ m % (1) the character or \CS\ to be declared,
+ o % (2) the Unicode to be assigned,
+ m % (3) math type (\CS like \cs{mathord} etc.)
+ C{\gmath@fam} % font family
+ }{%\
+ %
+ \gmath@getfamnum(##4)%
+ \gmuIfValueTF{##2}{%
+ \edef\gmu@tempa{%
+ = \mathchar@type##3\space
+ \gmath@famnum\space
+ "##2\relax}%
+ \if\relax\@nx##1%
+ \gmu@ifstored{##1}{}{\Store@Macro##1}%
+ \edef\gmu@tempa{%
+ \XeTeXmathchardef \@nx##1\gmu@tempa}%
+ \else
+ \edef\gmu@tempa{%
+ \XeTeXmathcode `##1 \gmu@tempa}
+ \fi%
+ }%
+ {% no value of |##2|
+ \edef\gmu@tempa{%
+ \XeTeXmathcode `##1 =
+ \mathchar@type##3\space
+ \gmath@famnum\space
+ `##1\relax}%
+ }%
+ \gmu@tempa
+ }% of \incs{gmath@do}
+ %
+ \DeclareCommand\gmath@doif{%
+ m % (1) the Unicode hex of char enquired,
+ m % (2) the char or \CS\ to be declared,
+ m % (3) math type \CS (\cs{mathord} etc.),
+ o % (4) second-choice Unicode (taken if first-choice is absent),
+ o % (5) third-choice Unicode (as above if second-choice is absent from font).
+ B{\gmath@fam} % (6) never used in this package. Why?
+ C{\NoValue}
+ }{%
+ \gmu@storeifnotyet{##2}%
+ \@xa\let\@xa\gmath@ft\csname
+ gmath@font%
+ \ifx\gmath@fam##6\else t\fi
+ \gmath@version
+ \endcsname
+ \iffontchar\gmath@ft"##1 \gmath@do##2[##1]##3(##6)%
+ \else
+ \gmuIfValueTF{##4}{%
+ \iffontchar\gmath@ft"##4 \gmath@do##2[##4]##3(##6)%
+ \else
+ \gmuIfValueTF{##5}{%
+ \iffontchar\gmath@ft"##5 \gmath@do##2[##5]##3(##6)%
+ \else
+ \gmath@restore{##1}{##2}{##3}{##4}{##5}{##7}%
+ \fi}%
+ {\gmath@restore{##1}{##2}{##3}{##4}{##5}{##7}}%
+ \fi}%
+ {\gmath@restore{##1}{##2}{##3}{##4}{##5}{##7}}%
+ \fi
+ }% of |\gmath@doif|
+ % In the command above we try to define math char or a~\CS in the
+ % family given as |##6|. If there're no respective chars, we try
+ % the same with the family given (as a~word) in |##7|.
+ \def\gmath@restore##1##2##3##4##5##6{%
+ \gmuIfValueT{##6}%
+ {\ifcsname ##6\endcsname
+ \edef\gmu@tempa{%
+ \unexpanded{\gmath@doif{##1}{##2}{##3}[##4][##5]}%
+ {\@xanxcs{##6}}\relax
+ }\gmu@tempa
+ \@xa\@gobbletwo % if family |##6| is defined, we gobble the
+ % other branch
+ \fi
+ }%
+ \firstofone
+ {\if\relax\@nx##2%
+ \Restore@Macro##2%
+ \fi
+ }%
+ }%
+ %
+\iffalse % doesn't work in a~non-math font.
+ \DeclareCommand\gmath@delc{mo}{%\
+ % \begin{enumargs*}
+ % \mand the char or \CS\ to be declared,
+ % \opt the Unicode (if not the same as the char).
+ % \end{enumargs*}
+ %
+ \gmath@getfamnum
+ \gmuIfValueTF{##2}{%
+ \edef\gmu@tempa{%
+ = \gmath@famnum\space "##2\relax}%
+ \edef\gmu@tempa{%
+ \XeTeXdelcode `##1 \gmu@tempa}
+ }%
+ {%
+ \edef\gmu@tempa{%
+ \XeTeXdelcode `##1 =
+ \gmath@famnum\space
+ `##1\relax}%
+ }%
+ \gmu@tempa
+ }% of \incs{gmath@delc}
+ %
+ \def\gmath@delcif##1##2{%\
+ % \begin{enumargs*}
+ % \mand the Unicode enquired,
+ % \item the char to be delcode-declared
+ % \end{enumargs*}
+ %
+ \iffontchar\gmath@font"##1 \gmath@delc##2[##1]\fi}
+\fi% of iffalse
+ %
+ \def\gmath@delimif##1##2##3{%\
+ % \begin{enumargs*}
+ % \item the Unicode enquired,
+ % \item the \CS\ defined as \cs{XeTeXdelimiter},
+ % \item the math type \CS\ (probably \incs{mathopen} or
+ % \incs{mathclose}).
+ % \end{enumargs*}
+ \iffontchar\gmath@font"##1
+ \gmath@getfamnum
+ \protected\edef##2{\@nx\ensuremath{%
+ \XeTeXdelimiter \mathchar@type##3\space
+ \gmath@famnum\space "##1\relax}}%
+ \fi}% of \cs{gmath@delimif}.
+ %
+ \pdef\rmopname##1##2##3{%
+ \mathop {##1\kern \z@ \mathrm{##3}}\csname n##2limits@\endcsname
+ }%
+ %
+ \DeclareCommand\gmu@dogmathbase{oC{\NoValue}}{%
+ \Restore@Macro\mathchar@type%
+ %
+ \gmuIfValueT{##1}{\mathversion{##1}}%
+ %
+ \edef\gmath@version{\gmuPutIfValue{##1}}%
+ %
+ \@xa\let\@xa\gmath@fam\csname symgmathroman%
+ \endcsname
+ \edef\gmath@famm{symgmathRoman\gmath@version}% as you see, this is
+ % not a~font family (number) but a~macro containing the name: of
+ % the secondary (‘rescue’) family.
+ %
+ \typeout{@@@ gmutils.sty: taking some math chars from the font^^J \gmu@fontstring@}%
+ \gmath@do+\mathbin
+ \gmath@doif{2212}-\mathbin[2013](\gmath@famm)% minus sign if present or else en dash
+ \gmath@do=\mathrel
+ \gmath@do0\mathord
+ \gmath@do1\mathord
+ \gmath@do2\mathord
+ \gmath@do3\mathord
+ \gmath@do4\mathord
+ \gmath@do5\mathord
+ \gmath@do6\mathord
+ \gmath@do7\mathord
+ \gmath@do8\mathord
+ \gmath@do9\mathord
+ %%
+ \gmath@doif{2264}\le\mathrel(\gmath@famm)%
+ \let\leq\le
+ \let\leeng\le
+ \gmath@doif{2265}\ge\mathrel(\gmath@famm)%
+ \let\geq\ge
+ \let\geeng\ge
+ \gmath@doif{2A7D}\xleq\mathrel(\gmath@famm)%
+ \gmath@doif{2A7E}\xgeq\mathrel(\gmath@famm)%
+ \@ifpackageloaded{polski}{%
+ \ifdefined\xleq
+ \gmu@storeifnotyet\leq
+ \let\leq=\xleq
+ \let\le=\leq
+ \fi
+ \ifdefined\xgeq
+ \gmu@storeifnotyet\geq
+ \let\geq=\xgeq
+ \let\ge=\geq
+ \fi}{}%
+ %
+ \gmath@do.\mathpunct
+ \gmath@do,\mathpunct
+ \gmath@do;\mathpunct
+ \gmath@do…\mathpunct
+ \gmath@do(\mathopen
+ \gmath@do)\mathclose
+ \gmath@do[\mathopen
+ \gmath@do]\mathclose
+ %
+ \gmath@doif{00D7}×\mathbin (\gmath@famm)%
+ \gmath@do:\mathrel
+ \gmath@doif{00B7}·\mathbin(\gmath@famm)%
+ \gmath@doif{22C6}*\mathbin(\gmath@famm)% % low star
+ \gmath@doif{2300}\varnothing\mathord(\gmath@famm)%
+ \gmath@doif{221E}\infty\mathord(\gmath@famm)%
+ \gmath@doif{2248}\approx\mathrel(\gmath@famm)%
+ \gmath@doif{2260}\neq\mathrel(\gmath@famm)%
+ \let\ne\neq
+ \gmath@doif{00AC}\neg\mathbin(\gmath@famm)%
+ \gmath@doif{00AC}\nego\mathord(\gmath@famm)%
+ \gmath@do/\mathop
+ \gmath@do<\mathrel
+ \gmath@do>\mathrel
+ \gmath@doif{2329}\langle\mathopen(\gmath@famm)%
+ \gmath@doif{232A}\rangle\mathclose(\gmath@famm)%
+ \gmath@doif{2202}\partial\mathord(\gmath@famm)%
+ \gmath@doif{00B1}\pm\mathbin(\gmath@famm)%
+ \gmath@doif{007E}\sim\mathrel(\gmath@famm)%
+ \gmath@doif{2190}\leftarrow\mathrel(\gmath@famm)%
+ \gmath@doif{2192}\rightarrow\mathrel(\gmath@famm)%
+ \gmath@doif{2194}\leftrightarrow\mathrel(\gmath@famm)%% if not present,
+ % \incs{gmathfurther} will take care
+ % of it if left and right arrows are present.
+ \gmath@doif{2191}\uparrow\mathrel(\gmath@famm)%% it should be a~delimiter
+ % (declared with \incs{gmath@delimif}) % but in a~non-math
+ % font the delimiters don't work (2008/11/19) and I~don't think
+ % I'll ever need up- and down- arrows as delimiters.
+ \gmath@doif{2193}\downarrow\mathrel(\gmath@famm)%
+ %
+ \gmath@doif{2208}\in\mathrel[03F5][0454](\gmath@famm)%%
+ % As a~fan of modal logics I~allow redefinition of \incs{lozenge}
+ % and \incs{square} iff both are in the font. I~don't accept
+ % the ‘ballot box’ U+2610.
+ \if\iffontchar\gmath@font"25CA 0\else 1\fi
+ \iffontchar\gmath@font"25FB 0\else\iffontchar\gmath@font"25A1 0\else 2\fi\fi
+ \gmath@do\lozenge[25CA]\mathord
+ \gmath@doif{25FB}\square\mathord[25A1](\gmath@famm)%% ‘medium white square (modal
+ % operator)’ of just ‘white square’.
+ \fi
+ \gmath@doif{EB08}\bigcircle\mathbin(\gmath@famm)%
+ \gmath@doif{2227}\wedge\mathbin(\gmath@famm)%
+ \gmath@doif{2228}\vee\mathbin(\gmath@famm)%
+ %
+ \gmath@doif{0393}\Gamma\mathalpha(\gmath@famm)%
+ \gmath@doif{0394}\Delta\mathalpha(\gmath@famm)%
+ \gmath@doif{0398}\Theta\mathalpha(\gmath@famm)%
+ \gmath@doif{039B}\Lambda\mathalpha(\gmath@famm)%
+ \gmath@doif{039E}\Xi\mathalpha(\gmath@famm)%
+ \gmath@doif{03A3}\Sigma\mathalpha(\gmath@famm)%
+ \gmath@doif{03A5}\Upsilon\mathalpha(\gmath@famm)%
+ \gmath@doif{03А6}\Phi\mathalpha(\gmath@famm)%
+ \gmath@doif{03A8}\Psi\mathalpha(\gmath@famm)%
+ \gmath@doif{03A9}\Omega\mathalpha(\gmath@famm)%
+ %
+ \@xa\let\@xa\gmath@fam\csname symletters\gmath@version%
+ \endcsname
+ \edef\gmath@famm{symgmathItalic\gmath@version}%
+ %
+ \gmath@doif{03B1}\alpha\mathalpha(\gmath@famm)%
+ \gmath@doif{03B2}\beta\mathalpha(\gmath@famm)%
+ \gmath@doif{03B3}\gamma\mathalpha(\gmath@famm)%
+ \gmath@doif{03B4}\delta\mathalpha(\gmath@famm)%
+ \gmath@doif{03F5}\epsilon\mathalpha(\gmath@famm)%
+ \gmath@doif{03B5}\varepsilon\mathalpha(\gmath@famm)%
+ \gmath@doif{03B6}\zeta\mathalpha(\gmath@famm)%
+ \gmath@doif{03B7}\eta\mathalpha(\gmath@famm)%
+ \gmath@doif{03B8}\theta\mathalpha(\gmath@famm)%
+ \gmath@doif{03D1}\vartheta\mathalpha(\gmath@famm)%
+ \gmath@doif{03B9}\iota\mathalpha(\gmath@famm)%
+ \gmath@doif{03BA}\kappa\mathalpha(\gmath@famm)%
+ \gmath@doif{03BB}\lambda\mathalpha(\gmath@famm)%
+ \gmath@doif{03BC}\mu\mathalpha(\gmath@famm)%
+ \gmath@doif{03BD}\nu\mathalpha(\gmath@famm)%
+ \gmath@doif{03BE}\xi\mathalpha(\gmath@famm)%
+ \gmath@doif{03C0}\pi\mathalpha(\gmath@famm)%
+ \gmath@doif{03A0}\Pi\mathalpha(\gmath@famm)%
+ \gmath@doif{03C1}\rho\mathalpha(\gmath@famm)%
+ \gmath@doif{03C3}\sigma\mathalpha(\gmath@famm)%
+ \gmath@doif{03DA}\varsigma\mathalpha(\gmath@famm)%% 03C2?
+ \gmath@doif{03C4}\tau\mathalpha(\gmath@famm)%
+ \gmath@doif{03C5}\upsilon\mathalpha(\gmath@famm)%
+ \gmath@doif{03D5}\phi\mathalpha(\gmath@famm)%
+ \gmath@doif{03C7}\chi\mathalpha(\gmath@famm)%
+ \gmath@doif{03C8}\psi\mathalpha(\gmath@famm)%
+ \gmath@doif{03C9}\omega\mathalpha(\gmath@famm)%
+ %
+ \if 1 1%
+ \iffontchar\gmath@font"221A
+ \fontdimen61\gmath@font=1pt
+ \edef\sqrtsign{%
+ \XeTeXradical \@xa\gmu@stripchar\meaning\symgmathroman\space "221A\relax}%
+ \fi
+ \fi% of if 1 1.
+ \def\max{\rmopname \relax m{max}}%
+ \def\min{\rmopname \relax m{min}}%
+ \def\lim{\rmopname \relax m{lim}}%
+ \def\sin{\rmopname \relax o{sin}}%
+ \def\cos{\rmopname \relax o{cos}}%
+ \def\tg{\rmopname \relax o{tg}}%
+ \def\ctg{\rmopname \relax o{ctg}}%
+ \def\tan{\rmopname \relax o{tan}}%
+ \def\ctan{\rmopname \relax o{ctan}}%
+ }% of |\gmu@dogmathbase|
+ \AtBeginDocument{\gmu@dogmathbase[#1](#2)%
+ \let\gmathbase\gmu@dogmathbase
+ }% of atbd
+ \not@onlypreamble\gmathbase
+}% of \cs{gmathbase}
+
+
+\@onlypreamble\gmathbase
+
+\pdef\gmathfurther{% \HideDef
+ % \changes{v0.94}{2008/10/4}{removed definition of
+ % \cs{}\<letter>s and \cs{}\<digit>s}
+ % \changes{v0.96}{2008/11/7}{Greek letters completed. Wrapped with
+ % \cs{addtotoks} to allow using in any order with \cs{garamath}
+ % and others}
+ %
+ \def\do##1##2##3{\gmu@storeifnotyet##1%
+ \def##1{%
+ \mathop{\mathchoice{\hbox{%
+ \rm
+ \edef\gma@tempa{\the\fontdimen8\font}%
+ \larger[3]%
+ \lower\dimexpr(\fontdimen8\font-\gma@tempa)/2 %
+ \hbox{##2}}}{\hbox{%
+ \rm
+ \edef\gma@tempa{\the\fontdimen8\font}%
+ \larger[2]%
+ \lower\dimexpr(\fontdimen8\font-\gma@tempa)/2 %
+ \hbox{##2}}}%
+ {\mathrm{##2}}{\mathrm{##2}}}##3}}%
+ \iffontchar\gmath@font"2211 \do\sum{\char"2211}{}\fi%
+ \do\forall{\gma@quantifierhook \rotatebox[origin=c]{180}{A}%
+ \gmu@forallkerning
+ }{\nolimits}%
+ \def\gmu@forallkerning{\setbox0=\hbox{A}\setbox2=\hbox{\scriptsize x}%
+ \kern\dimexpr\ht2/3*2 -\wd0/2\relax}% to be able to redefine it
+ % when the big quantifier is Bauhaus-like.
+ \do\exists{\rotatebox[origin=c]{180}{\gma@quantifierhook E}}\nolimits%
+ %
+ \def\do##1##2##3{\gmu@storeifnotyet##1%
+ \def##1{##3{%
+ \mathchoice{\hbox{\rm##2}}{\hbox{\rm##2}}%
+ {\hbox{\rm\scriptsize##2}}{\hbox{\rm\tiny##2}}}}}%
+ %
+ \unless\iffontchar\gmath@font"2227
+ \do\vee{\rotatebox[origin=c]{90}{<}}\mathbin%
+ \fi
+ \unless\iffontchar\gmath@font"2228
+ \do\wedge{\rotatebox[origin=c]{-90}{<}}\mathbin
+ \fi
+ %
+ \unless\iffontchar\gmath@font"2194
+ \if\iffontchar\gmath@font"2190 0\else1\fi
+ \iffontchar\gmath@font"2192 0\else2\fi
+ \do\leftrightarrow{\char"2190\kern-0,1em \char"2192}\mathrel
+ \fi\fi
+ %
+ \def\do##1##2##3{\gmu@storeifnotyet##1%
+ \def##1####1{##2{\hbox{%
+ \rm
+ \setbox0=\hbox{####1}%
+ \edef\gma@tempa{\the\ht0}%
+ \edef\gma@tempb{\the\dp0}%
+ ##3%
+ \setbox0=\hbox{####1}%
+ \lower\dimexpr(\ht0 + \dp0)/2-\dp0 -((\gma@tempa+\gma@tempb)/2-\gma@tempb) %
+ \box0}}}}%
+ \do\bigl\mathopen\larger
+ \do\bigr\mathclose\larger
+ \do\Bigl\mathopen\largerr
+ \do\Bigr\mathclose\largerr
+ \do\biggl\mathopen{\larger[3]}%
+ \do\biggr\mathclose{\larger[3]}%
+ \do\Biggl\mathopen{\larger[4]}%
+ \do\Biggr\mathclose{\larger[4]}%
+ %
+ %
+ \addtotoks\everymath{% \changes{v0.96}{2008/11/20}{the
+ % \cs{everymath}'s left brace moved here:
+ % earlier all the stuff was put into \cs{everymath}}
+ \def\do##1##2{\gmu@storeifnotyet##1%
+ \def##1{\ifmmode##2{\mathchoice
+ {\hbox{\rm\char`##1}}{\hbox{\rm\char`##1}}%
+ {\hbox{\rm\scriptsize\char`##1}}{\hbox{\rm\tiny\char`##1}}}%
+ \else\char`##1\fi}}%
+ \do\{\mathopen
+ \do\}\mathclose
+ %
+ \def\={\mathbin{=}}%
+ \def\neqb{\mathbin{\neq}}%
+ \let\neb\neqb
+ \def\do##1{\gmu@storeifnotyet##1%
+ \edef\gma@tempa{%
+ \def\@xanxcs{\@xa\gobble\string##1r}{%
+ \@nx\mathrel{\@nx##1}}}%
+ \gma@tempa}%
+ \do\vee \do\wedge \do\neg
+ \def\fakern{\mkern-3mu}%
+ \thickmuskip=8mu plus 4mu\relax
+ %
+ \gma@gmathhook
+ }% of |\everymath|.
+ \everydisplay\everymath
+ \ifdefined\Url
+ \ampulexdef\Url{\let\do}\@makeother
+ {\everymath{}\let\do\@makeother}% I~don't know why but the
+ % \pk{url} package's \incs{url} typesets the argument inside
+ % a~math which caused digits not to be typewriter but Roman and
+ % lowercase.
+ \fi% of |\ifdefined\Url|.
+}% of |\def\gmathfurther|. \ResumeDef
+
+\Store@Macro\mathchar@type
+
+\DeclareCommand\gmath{oC{\NoValue}}{%
+ \gmathbase[#1](#2)%
+ \gmathfurther
+ \gmuIfValueT{#1}{\csname gmathhook#1\endcsname}% this allows adding
+ % version-specific stuff (I~first used this for Fell fonts rescued
+ % with Garamond Premier)
+}
+
+\pdef\gmathscripts{% \changes{v0.96}{2008/11/11}{added}
+ \addtotoks\everymath{\catcode`\^=7\relax \catcode`\_=8\relax }%
+ \everydisplay\everymath}
+
+\pdef\gmathcats{%
+ \addtotoks\everymath{\gmu@septify}%
+ \everydisplay\everymath}
+
+\emptify\gma@quantifierhook
+\def\quantifierhook#1{%
+ \def\gma@quantifierhook{#1}}
+
+\emptify\gma@gmathhook
+\def\gmathhook#1{\addtomacro\gma@gmathhook{#1}}
+
+\def\gma@dollar$#1${{\gmath$#1$}}%
+\def\gma@bare#1{\gma@dollar$#1$}%
+\def\gma@checkbracket{\@ifnextchar\[%^^A\]
+ \gma@bracket\gma@bare}
+\def\gma@bracket\[#1\]{{\gmath\[#1\]}\@ifnextchar\par{}{\noindent}}
+\def\gma{\@ifnextchar$%^^A $
+ \gma@dollar\gma@checkbracket}
+
+ %^^B trial composition
+\def\bgcolor{\color{white}}
+
+\DeclareCommand\garamath{%
+ O{\rm}% the font command
+}{%
+ % Before 2009/10/19 all the stuff was added to |\everymath| which
+ % didn't work.
+ \quantifierhook{\addfontfeature{OpticalSize=800}}%
+ %
+ \def\gma@arrowdash{{%
+ \setbox0=\hbox{\char"2192}\copy0\kern-0,6\wd0
+ \bgcolor\rule[-\dp0]{0,6\wd0}{\dimexpr1,07\ht0+\dp0}\kern-0,6\wd0}}%
+ %
+ \def\gma@gmathhook{%
+ \def\do####1####2####3{\gmu@storeifnotyet####1%
+ \def####1{####3{%
+ \mathchoice{\hbox{#1####2}}{\hbox{#1####2}}%
+ {\hbox{#1\scriptsize####2}}{\hbox{#1\tiny####2}}}}}%
+ \do\mapsto{\rule[0,4ex]{0,1ex}{0,4ex}\kern-0,05em%
+ \gma@arrowdash\kern-0,05em\char"2192}\mathrel
+ \do\cup{\scshape u}\mathbin
+ \do\varnothing{\setbox0=\hbox{\gma@quantifierhook\addfontfeature{Scale=1.272727}0}%
+ \setbox2=\hbox{\char"2044}%
+ \copy0 \kern-0,5\wd0 \kern-0,5\wd2 \lower0,125\wd0 \copy2
+ \kern0,5\wd0\kern-0,5\wd2}{}% of |\varnothing|
+ \do\leftarrow{\char"2190\kern-0,05em\gma@arrowdash}\mathrel
+ \do\shortleftarrow{\char"2190}\mathrel
+ \do\rightarrow{\gma@arrowdash\kern-0,05em\char"2192}\mathrel
+ \do\shortrightarrow{\char"2192\relax}\mathrel
+ \do\in{\gma@quantifierhook\char"0454}\mathbin
+ \do\prec{\gma@quantifierhook
+ \rotatebox[origin=c]{-90}{%
+ \glyphname{u03A5.a}}}\mathrel % added 2009/9/11
+ }% of |\gma@gmathhook|
+}% of |\garamath|.
+
+
+
+\def\gmu@tempa{\kern-0,08em\penalty10000\hskip0sp\relax
+ s\penalty10000\hskip0sp\relax}
+
+\protected\edef\Vs{V\gmu@tempa}
+
+\protected\edef\Ws{W\gmu@tempa}
+
+\pdef\Wz{W\kern-0,05em\penalty10000\hskip0sp\relax z}
+
+
+\pdef\leftslanting@{%
+ \def\litdimen{\strip@pt\fontdimen1\font ex}%
+ \def\litcorrection{%
+ \ifhmode\null\nobreak\hskip\litdimen\relax\fi}%
+ \def\litkern{% note it's to be used inside the left slanted font,
+ % unlike \incmd\litcorrection, intended to be used \emph{before}
+ % switching to left slant/italic.
+ \leavevmode\null
+ \kern-\litdimen\relax}%
+ \def\dilitkern{\kern\litdimen\litkern}%
+ % \stanza
+ \pdef\litshape{% \changes{v0.93}{2008/08/22}{copied here from
+ % E.~Szarzyński's \ty{The Letters}}
+ \litcorrection
+ \itshape
+ \@tempdima=-2\fontdimen1\font
+ \advance\leftskip by\strip@pt\fontdimen1\font ex % to assure at
+ % least the lowercase letters not to overshoot to the (left)
+ % margin. Note this has any effect only if there is a~\incs{par} in
+ % the scope.
+ \litcorrection
+ \edef\gmu@tempa{%
+ \@nx\addfontfeature{FakeSlant=\strip@pt\@tempdima}}%^^B
+ % \ilrr when not \incs{edef}ed, it caused an error, which is
+ % perfectly understandable.
+ \gmu@tempa}%
+ %
+ %
+ \pdef\textlit##1{% \changes{v0.93}{2008/08/22}{added}
+ {\litshape##1}}%
+ %
+ \pdef\lit{\rm\litshape}%
+ %
+ %
+ \pdef\lsl{{%
+ \litcorrection
+ \it
+ % \changes{v0.93}{2008/08/22}{copied here from E.~Szarzyński's \ty{The
+ % Letters}}
+ \@tempdima=-\fontdimen1\font
+ \litcorrection
+ \xdef\gmu@tempa{%
+ \@nx\addfontfeature{RawFeature={slant=\strip@pt\@tempdima}}}}%
+ \rm % Note in this declaration we left-slant the basic Roman font
+ % not the itshape of the current family.
+ \gmu@tempa}%
+ %
+ % Now we can redefine \cs{em} and \cs{emph} to use left Italic for
+ % nested emphasis. In Polish typesetting there is bold in nested
+ % emphasis as I~have heard but we don't like bold since it perturbs
+ % homogeneous greyness of a~page. So we introduce a~three-cycle
+ % instead of two-: Italic, left Italic, upright.
+ %
+ \pdef\em{%\changes{v0.93}{2008/08/22}{added}
+ \ifdim\fontdimen1\font=\z@ \itshape
+ \else
+ \ifdim\fontdimen1\font>\z@ \litshape
+ \else \upshape
+ \fi
+ \fi}%
+ %
+ %
+ \pdef\emph##1{% \changes{v0.93}{2008/08/22}{added}
+ {\em##1}}%
+}% of \cs{leftslanting@}.
+
+\pdef\leftslanting{\AtBeginDocument\leftslanting@}
+
+\AtBeginDocument{\let\leftslanting\leftslanting@}
+
+
+\def\romorzero#1{%
+ \ifnum#1=0 zero\else\romannumeral#1 \fi}
+
+\DeclareCommand\fakeonum{%
+ o % fake bold for the digit »2« (for which emboldening improves
+ % look),
+ >Pm % the text to fake old-style numbers in.
+}{%\
+ % I~tried to use this command as a~declaration but active digits are
+ % very uncomfortable, e.g.\ you can't define macros with arguments.
+ % \chgs{2008/12/04 v0.98 added}
+ \gmu@if@onum{#2}{%
+ \begingroup
+ \edef\gmu@tempa{#2}%
+ \makeatletter%
+ \gmuIfValueT{#1}{%
+ \prependtomacro\fake@onum@ii{%
+ \begingroup\addfontfeature{FakeBold=#1}}%
+ \addtomacro\fake@onum@ii\endgroup
+ }%
+ \endlinechar\m@ne % to suppress the line end added by
+ % |\scantokens|, especially in active |^^M|'s scopes.
+ \gmu@dofakeonum
+ \@xa\scantokens\@xa{\gmu@tempa}%
+ \endgroup
+ }% of |\gmu@ifonum| ‘else’.
+}% of |\fakeonum|.
+
+\def\gmu@dofakeonum{%
+ \def\do##1{%
+ \catcode`##1\active
+ \scantokens{%
+ \@xa\let\@xa##1%
+ \csname fake@onum@\@xa\romorzero\string##1\endcsname\empty}}%
+ \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
+}
+
+\def\do#1#2{%
+ \@namedef{fake@onum@\romorzero#1}{#2}}
+
+\def\gmu@tempa#1{%
+ \do#1{\leavevmode
+ \gmu@calculateslant{#1}% uses \incs{gmu@tempa} and
+ % \incs{gmu@tempb}, therefore goes first. And defines \incs{gmu@tempd}.
+ \gmu@measurewd{#1}% the width of char |#1| is in \incs{gmu@tempa}
+ % without kerning and in \incs{gmu@tempb} with kerning.
+ %
+ \edef\gmu@tempc{\the\fontcharht\font`#1}%
+ \hbox to \gmu@tempb {%
+ \hss\resizebox{\gmu@tempa}%
+ {\dimexpr\fontdimen5\font+\gmu@tempc-\fontdimen8\font}%
+ {\gmu@tempd#1}\hss}}}
+
+\gmu@tempa0 % |\fake@onum@zero|
+\gmu@tempa1 % |\fake@onum@i|
+\gmu@tempa2 % |\fake@onum@ii|
+
+\def\gmu@tempa#1{%
+ \do#1{\leavevmode
+ \gmu@measurewd{#1}%
+ \lower
+ \dimexpr\fontdimen8\font-\fontdimen5\font\relax
+ \hbox to \gmu@tempb {\hss#1\hss}}%
+}
+
+\gmu@tempa3 % |\fake@onum@iii|
+\gmu@tempa4 % |\fake@onum@iv|
+\gmu@tempa5 % |\fake@onum@v|
+\gmu@tempa7 % |\fake@onum@vii|
+\gmu@tempa9 % |\fake@onum@ix|
+
+\def\gmu@tempa#1{% to preserve pseudo-kerning in digits sequences.
+ \do#1{\leavevmode
+ \gmu@measurewd#1%
+ \hbox to \gmu@tempb {\hss#1\hss}}}
+
+\gmu@tempa6 % |\fake@onum@vi|
+\gmu@tempa8 % |\fake@onum@viii|
+
+\protected\def\gmu@if@onum{%
+ \edef\gmu@tempa{\@xa\meaning\the\font}%
+ \@xa\@ifinmeaning\detokenize{+onum}\of\gmu@tempa
+}
+
+\pdef\gmu@getslant{% we define |\gmu@tempa| to the (fake) slant of current font.
+ \edef\gmu@tempa{\@xa\meaning\the\font\detokenize{slant=0,}}%
+ \edef\gmu@tempb{%
+ \def\@nx\gmu@tempb####1%
+ \detokenize{slant=}%
+ ####2,####3}%
+ \gmu@tempb\@nil{##2}%
+ \edef\gmu@tempa{\@xa\gmu@tempb\gmu@tempa\@nil pt}%
+}
+
+\def\gmu@calculateslant#1{%
+ \gmu@getslant
+ \edef\gmu@tempa{\the\numexpr\dimexpr\fontdimen1\font + \gmu@tempa}%\
+ % \incs{gmu@tempa} bears the number of scaled points of total slant
+ % (\inverb|\fontdimen1\font|${}+$\inverb|slant=…| if present) per 1pt
+ % of \inhash1.\ilrr
+ \edef\gmu@tempa{\the\numexpr \gmu@tempa *
+ \numexpr\fontdimen5\font\relax/\numexpr\fontcharht\font`#1
+ \relax}%\
+ % we scale the total slant of \inverb|#1| by the ratio of original
+ % and scaled height of \inverb|#1|.
+ \edef\gmu@tempd{%
+ \the\dimexpr \gmu@tempa sp - \fontdimen1\font}%\
+ % and we subtract slant-fontdimen from the scaled total slant.
+ \ifdim\gmu@tempd=\z@ \emptify\gmu@tempd
+ \else\edef\gmu@tempd{%
+ \@nx\addfontfeature{FakeSlant=\strip@pt\dimexpr\gmu@tempd}}%
+ \fi}
+
+\DeclareCommand\gmu@cepstnof{O{\gmu@tempa}% a~cs to be |\xdef|ed the
+ % font specification,
+ s% not used really,
+ m% |\fontspec| token or name of feature font (\inverb|Italic|, \inverb|Bold|,
+ % \inverb|SmallCaps|, \inverb|BoldItalic| ),
+ O{, Scale=MatchLowercase}% \pk{fontspec} font features (key=val)
+}
+{% |\gmu@cepstnof|'s body
+ \def\gmu@cepstnof@resc##1:##2:\@nil{%
+ \ifx:##2:\else RawFeature={\gmu@maybestripcomma##2,,\@nil} \fi}%
+ % \stanza
+ \def\gmu@cepstnof@resd##1/##2/\@nil{% to check whether font name
+ % contains |/| (which may not be true!)
+ \ifx&##2&\@xa\@firstoftwo\else\@xa\@secondoftwo\fi}%
+ % \stanza
+ \def\gmu@cepstnof@rese##1:##2:\@nil{% to check whether the font name
+ % contains |:| when it doesn't contain |/|.
+ \ifx&##2&\@xa\@firstoftwo\else\@xa\@secondoftwo\fi}%
+ % \stanza
+ \edef\gmu@cepstnof@resa{%
+ % now, reserved B parses the font name and features. It uses an
+ % auxiliary reserved C because after |/| may be or may not be
+ % features specification.
+ \@xa\@xa\@xa\gmu@cepstnof@resd\@xa\meaning\the\font//\@nil
+ {% font name doesn't contain a~slash
+ \@xa\@xa\@xa\gmu@cepstnof@rese\@xa\meaning\the\font::\@nil
+ {% nor does it contain a~colon
+ \def\@nx\gmu@cepstnof@resb\detokenize{select font
+ "}####1\detokenize{"}####2\@nx\@nil{%
+ \ifx\fontspec#3%
+ \@nx\@nx\@nx\fontspec[\@gobble#4\@empty]{####1}% gobble a~comma
+ \else
+ #3Font={####1}, #3Features={\@gobble #4\@empty}%
+ \fi
+ }%
+ }%
+ {% no slash but there is a~colon
+ \def\@nx\gmu@cepstnof@resb\detokenize{select font
+ "}####1:####2\detokenize{"}####3\@nx\@nil{%
+ \ifx\fontspec#3%
+ \@nx\@nx\@nx\fontspec[\@nx\gmu@cepstnof@resc####2::\@nx\@nil#4]{####1}%
+ \else
+ #3Font={####1}, #3Features={\@nx\gmu@cepstnof@resc####2::\@nx\@nil#4}%
+ \fi
+ }%
+ }%
+ }% of ‘no slash’ case
+ {% font name contains a~slash
+ \def\@nx\gmu@cepstnof@resb\detokenize{select font
+ "}####1/####2\detokenize{"}####3\@nx\@nil{%
+ \ifx\fontspec#3%
+ \@nx\@nx\@nx\fontspec[\@nx\gmu@cepstnof@resc####2::\@nx\@nil#4]{####1}%
+ \else
+ #3Font={####1}, #3Features={\@nx\gmu@cepstnof@resc####2::\@nx\@nil#4}%
+ \fi
+ }% of |\gmu@cepstnof@resb|
+ }% of ‘slash present’ case
+ }\gmu@cepstnof@resa
+ \xdef#1{\@xa\@xa\@xa\gmu@cepstnof@resb\@xa\meaning\the\font\@nil}%
+}%
+
+\def\gmu@stripcomma#1,{#1}
+
+\def\gmu@maybestripcomma#1,,#2\@nil{#1}
+
+\pdef\gmu@setbasefont{\@xa\let\@xa\gmu@basefont\the\font}
+
+\let\setbasefont\gmu@setbasefont
+
+\DeclareCommand\gmu@calc@scale{%
+ O{1}% a~factor,
+ m% number of the fontdimen
+ }
+{\begingroup
+ % We ‘descale’ the current font:\nostanza
+ \gmu@cepstnof\fontspec[, Scale=1]\gmu@tempa
+ \@xa\let\@xa\gmu@currfont@descaled\the\font
+ \gmu@basefont
+ \gmu@cepstnof\fontspec[, Scale=1]\gmu@tempa
+ % \nostanza now also the base font is descaled.
+ \xdef\gmu@fontscale{%
+ \strip@pt
+ \dimexpr 1pt *
+ \numexpr\dimexpr#1\fontdimen#2\font\relax\relax /
+ \numexpr\fontdimen#2\gmu@currfont@descaled\relax
+ \relax}%
+ \endgroup}
+
+
+\def\gmu@tilde{%
+ \leavevmode\lower.8ex\hbox{$\,\widetilde{\mbox{ }}\,$}}
+\AtBeginDocument{% to bypass redefinition of |\~| as a~text command
+ % with various encodings
+ \pdef\texttilde{%
+ % \changes{v0.83}{2007/08/22}{postponed to
+ % \cs{begin\{document\}} to avoid overwriting by a~text command
+ % and
+ % made sensible to a~subsequent
+ % /} % \changes{v0.86}{2007/12/11}{renamed from \cmd\~
+ % since the latter is one of \LaTeX's\ accents}
+ \@ifnextchar/{\gmu@tilde\kern-0,1667em\relax}\gmu@tilde}}
+
+\foone{\catcode`\^^M\active}% the comment signs here are crucial.
+{\def\defobeylines{\catcode`\^^M=13 \def^^M{\par}}}
+
+
+\def\deksmallskip{\vskip\smallskipamount}
+\def\undeksmallskip{\vskip-\smallskipamount}
+\def\dekmedbigskip{\vskip\glueexpr \medskipamount+\smallskipamount}
+\def\dekmedskip{\vskip\medskipamount}
+\def\dekbigskip{\vskip\bigskipamount}
+
+\def\hfillneg{\hskip 0pt plus -1fill\relax}
+
+\newcommand*{\TODO}[1][]{{%
+ \sffamily\bfseries\huge TO-DO!\if\relax#1\relax\else\space\fi#1}}
+\newcommand*\twocoltoc{%
+ \RequirePackage{multicol}%
+ \def\@starttoc##1{%
+ \begin{multicols}{2}\makeatletter
+ \NamedInput % changed from |\@input| 2010/8/13.
+ {\jobname .##1}%
+ \if@filesw \@xa \newwrite \csname tf@##1\endcsname
+ \immediate \openout \csname tf@##1\endcsname \jobname .##1\relax
+ \fi
+ \@nobreakfalse\end{multicols}%
+ }% of |\starttoc|
+}
+
+\@onlypreamble\twocoltoc
+
+
+\pdef\equals{\hunskip${}={}$\ignorespaces}
+\pdef\eequals{\hunskip${}=={}$\ignorespaces}
+
+\pdef\·{\hunskip${}·{}$\ignorespaces}
+
+
+\def\freeze@actives{%
+ \count\z@\z@
+ %
+ \@whilenum\count\z@<\@cclvi\do{%
+ \ifnum\catcode\count\z@=\active
+ \uccode`\~=\count\z@
+ \uppercase{\let~\relax}%
+ \fi
+ \advance\count\z@\@ne}}
+
+
+\newcommand*\ShowFont[1][6]{%
+ \begin{multicols}{#1}[The current font (the \f@encoding\ encoding):]
+ \parindent\z@
+ \count\z@\m@ne
+ \@whilenum\count\z@<\@cclv\do{
+ \advance\count\z@\@ne
+ \ \the\count\z@:~\char\count\z@\par}
+ \end{multicols}}
+
+\newcommand*\liturgiques[1][red]{% Requires the \pk{color} package.
+ \gmu@RPfor{xcolor}\color%
+ \newcommand*\czerwo{\small\color{#1}}% environment
+ \newcommand{\czer}[1]{\leavevmode{\czerwo##1}}% we leave
+ % vmode because if we don't, then \env{verse}'s |\everypar| would be
+ % executed in a~group and thus its effect lost.
+ \Store@Macro\*%
+ \def\*{\czer{\storedcsname{*}}}%
+ \def\+{\czer{†}}%
+ \newcommand*\nieczer[1]{\textcolor{black}{##1}}%
+}
+
+\newcommand*\gmu@RPfor[3][]{% \changes{v0.93}{2008/08/30}{renamed from
+ % \cs{gmu@RPif} and \#3 changed from a~csname to \CS}
+ \ifx\relax#1\relax\emptify\gmu@resa
+ \else \def\gmu@resa{[#1]}%
+ \fi
+ \@xa\RequirePackage\gmu@resa{#2}}
+
+\AtBeginDocument{%
+ \renewcommand*\gmu@RPfor[3][]{%
+ \unless\ifdefined#3%
+ \@ifpackageloaded{#2}{}{%
+ \typeout{^^J! Package `#2' not loaded!!! (\on@line)^^J}}%
+ \fi}}
+
+\pprovide\continuum{%
+ \gmu@RPfor{eufrak}\mathfrak\ensuremath{\mathfrak{c}}}
+
+\def\iteracro{%
+ \pdef\acro##1{%
+ \begingroup
+ \acropresetting
+ \gmu@acrospaces##1 \gmu@acrospaces
+ \endgroup
+ }%
+}
+
+\emptify\acropresetting
+
+\iteracro
+
+\def\gmu@acrospaces#1 #2\gmu@acrospaces{%
+ \gmu@acroiter#1\gmu@acroiter
+ \ifx\relax#2\relax\else
+ \space
+ \afterfi{\gmu@acrospaces#2\gmu@acrospaces}% when |#2| is nonempty,
+ % it is ended with a~space. Adding one
+ % more space in this line resulted in
+ % an infinite loop, of course.
+ \fi
+}
+
+\def\gmu@acroiter#1{%
+ \gmu@notif {x\@xa\@xa} {\@firstofmany#1\@undefined\@nil \gmu@acroiter}
+ {\gmu@acrokernel{#1}%
+ % and iterate
+ \gmu@acroiter
+ }% of if sentinel or not
+ {}%
+}
+
+\def\gmu@acrokernel #1{%
+ \gmu@if {cat} {a\@xanx\@firstofmany#1\@undefined\@nil}%
+ {\gmu@if {num} {`#1=\uccode`#1\space }% a space to delimit numer
+ % (without it further macros were
+ % expanded which in this case are
+ % |\expandafter\@firstoftwo\else\@secondoftwo| and this made the test didn't work.)
+ {{\acrocore{#1}}}%
+ {{#1}}% tu było |\smallerr|
+ }%
+ {#1}%
+}
+
+\pdef\acrocore{\smaller % was: |\scshape\lowercase|
+}
+
+
+\def\IMHO{\acro{IMHO}\spifletter}
+\def\AKA{\acro{AKA}\spifletter}
+
+\pdef\usc#1{{\addfontfeature{Letters=UppercaseSmallCaps}#1}}
+
+\def\uscacro{\let\acrocore\usc}
+
+
+
+\def\gmu@dekfraccsimple#1/#2{\leavevmode\kern.1em
+ \raise.7ex\hbox{%^^A \udigits
+ \gmu@fracfontsetup#1}\gmu@numeratorkern
+ \dekfraccslash\gmu@denominatorkern
+ {%^^A\udigits
+ \gmu@fracfontsetup#2}%
+ \if@gmu@mmhbox\egroup\fi}
+
+\def\gmu@fracfontsetup{%
+ \smaller[3]\addfontfeature{FakeBold=1}}
+
+\def\dekfraccsimple{% \label{2292}
+ \let\dekfracc@args\gmu@dekfraccsimple
+}
+\@ifXeTeX{\def\dekfraccslash{\char"2044 }}
+{\def\dekfraccslash{/}} % You can define it as the fraction slash,
+\dekfraccsimple
+
+
+
+\newcommand*\ikern{\,\penalty\@M\hskip\z@skip\relax}
+
+
+\def\gmu@scapLetters#1{%
+ \ifx#1\relax\relax\else% two |\relax|es to cover the case of empty |#1|.
+ \ifcat a\@nx#1\relax
+ \ifnum\the\lccode`#1=`#1\relax
+ {\fakescapscore\MakeUppercase{#1}}% not Plain |\uppercase|
+ % because that works bad with \pk{inputenc}.
+ \else#1%
+ \fi
+ \else#1%
+ \fi%
+ \@xa\gmu@scapLetters
+ \fi}%
+\def\gmu@scapSpaces#1 #2\@nil{%
+ \ifx#1\relax\relax
+ \else\gmu@scapLetters#1\relax
+ \fi
+ \ifx#2\relax\relax
+ \else\afterfi{\ \gmu@scapSpaces#2\@nil}%
+ \fi}
+\def\gmu@scapss#1\@nil{{\def~{{\nobreakspace}}%
+ \gmu@scapSpaces#1 \@nil}}%|% \def\\{{\newline}}\relax|
+
+\pdef\fakescaps#1{{\gmu@scapss#1\@nil}}
+
+\let\fakescapscore\gmu@scalematchX
+
+\def\tinycae{{\tiny\AE}}% to use in |\fakescaps[\tiny]{…}|
+
+\RequirePackage{calc}
+
+
+\@ifpackageloaded{fontspec}{%
+ \def\gmu@scalar{1.0}%
+ \def\zf@scale{}%
+ \def\gmu@scalematchX{%
+ \begingroup
+ \ifx\zf@scale\empty\def\gmu@scalar{1.0}%
+ \else\let\gmu@scalar\zf@scale\fi
+ \setlength\@tempdima{\fontdimen5\font}% 5---ex height
+ \setlength\@tempdimb{\fontdimen8\font}% 8---\XeTeX\ synthesised
+ % uppercase height.
+ \divide\@tempdimb by1000\relax
+ \divide\@tempdima by\@tempdimb
+ \setlength{\@tempdima}{\@tempdima*\real{\gmu@scalar}}%
+ \gmu@ifundefined{fakesc@extrascale}{}{%
+ \setlength{\@tempdima}{\@tempdima*\real{\fakesc@extrascale}}}%
+ \@tempcnta=\@tempdima
+ \divide\@tempcnta by 1000\relax
+ \@tempcntb=-1000\relax
+ \multiply\@tempcntb by\@tempcnta
+ \advance\@tempcntb by\@tempdima
+ \xdef\gmu@scscale{\the\@tempcnta.%
+ \ifnum\@tempcntb<100 0\fi
+ \ifnum\@tempcntb<10 0\fi
+ \the\@tempcntb}%^^A{\strip@pt\@tempdimc}%
+ \endgroup
+ \addfontfeature{Scale=\gmu@scscale}%
+ }}{\let\gmu@scalematchX\smallerr}
+
+\def\fakescextrascale#1{\def\fakesc@extrascale{#1}}
+
+\newcommand*\wyzejnizej[1]{%
+ \edef\gmu@tempa{\gmu@ifundefined{r@#1}{\arabic{page}}{%
+ \@xa\@xa\@xa\@secondoftwo\csname r@#1\endcsname}}%
+ \ifnum\gmu@tempa<\arabic{page}\relax wy\.zej\fi
+ \ifnum\gmu@tempa>\arabic{page}\relax ni\.zej\fi
+ \ifnum\gmu@tempa=\arabic{page}\relax \@xa\ignorespaces\fi
+}
+
+
+
+\def\napapierkistretch{0,3pt}% It's quite much for 11/13pt leading.
+
+\def\napapierkicore{\advance\baselineskip%
+ by 0ptplus\napapierkistretch\relax}
+
+\DeclareEnvironment{napapierki}{s}{%
+ % \chgs{2009/01/05 v0.98 added optional star controlling globalness}
+ \par\gmuIfValueT{#1}{\global}%
+ %
+ \napapierkicore}
+{%
+ \par
+ \gmuIfValueT{#1}{\global\baselineskip=1\baselineskip\relax
+ }%
+}% so that you can use \inverb|\napapierki*›…\endnapapierki*|
+
+
+\newcount\gmu@luzniej
+
+\newcommand*\luzniejcore[1][1]{%
+ \advance\gmu@luzniej\@ne% We use this count to check whether we open
+ % the environment or just set |\looseness| inside it again.
+ \ifnum\gmu@luzniej=\@ne \multiply\tolerance by 2 \fi
+ \looseness=#1\relax}
+
+\newenvironment*{luzniej}{\par\luzniejcore}{\par}
+
+\newenvironment*{luzniej*}[1][1]{%
+ \multiply\tolerance by 2\relax
+ \everypar{\looseness=#1\relax}}{\par}
+
+\newcommand*\nawj{\kern0,1em\relax}% a~kern to be put between
+
+\def\pauza@skipcore{\hskip0.2em plus0.1em\relax
+ \pauzacore
+ \@ifnextanyIS {,;:}%
+ {% 2009/11/22 added a special case of a comma following pauza,
+ % 2011/02/22, 13.33 extended to colon and semicolon (well, the
+ % latter should not happen in such a position but a colon did (in
+ % Polish)).
+ }{\hskip.2em plus0.1em\relax\ignorespaces}}%
+\def\ppauza@skipcore{\unskip\penalty10000\hskip0.2em plus0.1em\relax
+ \ppauza@dash\hskip.2em plus0.1em\ignorespaces}
+
+\AtBeginDocument{%
+ \pdef\pauza{%
+ \ifhmode
+ \unskip\penalty10000
+ \hskip0.2em plus0.1em\relax
+ \pauzacore\hskip.2em plus0.1em\relax\ignorespaces%
+ \else
+ \pauzadial
+ \fi
+ }%
+ %
+ % According to \tytul{Instrukcja technologiczna.\ Skład ręczny ^^B
+ % i~maszynowy} the dialogue dash (in Polish) should be followed by
+ % a~rigid hskip of \dekfracc1/2\,em.
+ \pdef\pauzadial{%
+ \ifhmode\unskip\quad\else\leavevmode\fi
+ \pauzacore\penalty10000\hskip0,5em\ignorespaces
+ }
+ %
+ % And a~version with no space at the left, to begin a~|\noindent|ed
+ % paragraph explaining e.g.\ a~quotation:
+ \pdef\lpauza{%
+ \leavevmode
+ \pauzacore\hskip.2em plus0.1em\ignorespaces}%
+ %
+ % We define |\ppauza| as an en dash surrounded with thin stretchable
+ % spaces and sticking to the upper line or bare but discretionary
+ % depending on the next token being space${}_10$. Of course you'll
+ % never get such a~space after a~literal \CS so an explicit |\ppauza|
+ % will always result with a~bare discretionary en dash, but if we
+ % |\let–\ppauza|…
+ % \stanza
+ \pdef\ppauza{%
+ \ifvmode \PackageError{gmutils}{%
+ command \bslash ppauza (en dash) not intended for vmode.}{%
+ Use \bslash ppauza (en dash) only in number and numeral ranges.}%
+ \else
+ \unskip\discretionary
+ {\ppauza@dash}{\ppauza@dash}{\ppauza@dash}%
+ \fi}%
+}% of at begin document
+
+\ifdefined\XeTeXversion
+\AtBeginDocument{% to be independent of moment of loading of \pk{polski}.
+ \pdef\—{%
+ \ifhmode
+ \unskip\penalty10000
+ \afterfi{%
+ \@ifnextanyRS { ,;:}% was comma as a special case; 2011/02/22,
+ % 13.32 added colon and semicolon.
+ %
+ % The above needs some explanation, I suppose. We check if next token
+ % is blank space or some punctuations, for which purpose we
+ % use \inverb|\@ifnextanyRS|, where |RS| stands for
+ % “respecting space”. So if next is a space it turns true. Then
+ % \inverb|\pauza@skipcore|'s test does not respect space
+ % (gobbles it) and typesets punctuators with no skip while a
+ % blank replaces with a skip.
+ %
+ {\pauza@skipcore}%
+ {\@ifnextMac{\pauza@skipcore}%
+ {\pauzacore\penalty\hyphenpenalty\hskip\z@skip}%
+ }%
+ }% of |\afterfi|'s argument
+ \else
+ % \nostanza According to \tytul{Instrukcja technologiczna.\ Skład ręczny ^^B
+ % i~maszynowy} the dialogue dash should be followed by a~rigid
+ % hskip of \dekfracc1/2\,em.\nostanza
+ \leavevmode\pauzacore\penalty10000\hskip0,5em\ignorespaces
+ \fi
+ }%
+ % The next command's name consists of letters and therefore it eats
+ % any spaces following it, so |\@ifnextspace| would always be
+ % false, therefore we don't use it.\nostanza
+ \pdef\–{%
+ \ifvmode \PackageError{gmutils}{%
+ command \bslash ppauza (en dash) not intended for vmode.}{%
+ Use \bslash ppauza (en dash) only in number and numeral ranges.}%
+ \else
+ \afterfi{%
+ \@ifnextspace{\ppauza@skipcore}{%
+ \@ifnextMac\ppauza@skipcore
+ {\unskip\discretionary
+ {\ppauza@dash}{\ppauza@dash}{\ppauza@dash}}}%
+ }%
+ \fi
+ }%
+ %
+ \def\emdash{\char`\—}
+}% of at begin document
+
+\def\longpauza{%
+ \def\pauzacore@long{—}%
+ \let\pauzacore\pauzacore@long
+}
+\longpauza
+
+\def\shortpauza{%
+ \def\pauzacore@short{\hbox{–\kern,23em\relax\llap{–}}}%
+ \let\pauzacore\pauzacore@short
+}%
+\def\ppauza@dash{–}%
+
+\else % not \XeTeX
+\def\longpauza{\def\pauzacore{---}}
+\longpauza
+\def\shortpauza{%
+ \def\pauzacore{--\kern,23em\relax\llap{--}}}%
+\def\ppauza@dash{--}%
+
+\fi% of if \XeTeX\ or not.
+
+\ifdefined\XeTeXversion
+
+\foone{\catcode`—\active \catcode`–\active \catcode`-\active}{%\label{not@ifundef}
+ \def\adashes{\AtBeginDocument\adashes}% because |\pauza|
+ % is defined at begin document.
+ \AtBeginDocument{\def\adashes{%
+ \catcode`—\active \def—{\—}%
+ \catcode`–\active \def–{\–}%
+ \addtomacro\dospecials{\do\–\do\—}%
+ \addtomacro\@sanitize{\@makeother\–\@makeother\—}%
+ \addtomacro\gmu@septify{\do\–13\do\—13\relax}%
+}}}
+\else
+\relaxen\adashes
+\fi
+
+
+\def\gmu@dywiz{\ifmmode-\else
+ \ifvmode-\else\afterfifi\dywiz\fi\fi}%
+
+\foone{\catcode`-\active}{% aktivnyj diefis aktywny dywiz active hyphen
+ \def\ahyphen{\let-\gmu@dywiz\catcode`\-\active}}
+
+\newcommand*\czas[1][.]{%
+ \the\numexpr(\time-30)/60\relax#1%
+ \@tempcnta=\numexpr\time-(\time-30)/60*60\relax
+ \ifnum\@tempcnta<10 0\fi\the\@tempcnta}
+
+\newenvironment*{tytulowa}{\newpage}{\par\thispagestyle{empty}\newpage}
+
+\def\nazwired{\quad\textsc}
+
+
+\pdef\polskadata{%
+ \DeclareCommand\gmu@datefsl{%
+ ##1 Q{0123456789\bgroup}>iT{/-} % year
+ ##2 Q{0123456789\bgroup}>iT{/-} % month
+ ##3 Q{0123456789\bgroup} % day
+ >is % terminator of date scanning that will be gobbled
+ ##4 T{,}% another terminator of date, but this will be printed
+ ##5 K{##1\gmu@datefsl} % additional stuff after comma (or instead date)
+ }{%
+ \gmuIfValueF{##2}{\gmuPutIfValue{##3}}%
+ \gmuIfValueT{##2}{%
+ \@tempcnta=0##3\relax\the\@tempcnta
+ \ifcase##2\relax\or\ stycznia\or\ lutego%
+ \or\ marca\or\ kwietnia\or\ maja\or\ czerwca\or\ lipca\or\ sierpnia%
+ \or\ września\or\ października\or\ listopada\or\ grudnia\else
+ {}%
+ \fi}%
+ \gmuIfValueT{##1}{\space ##1}%
+ \gmuPutIfValue{##4}%
+ \gmu@ifempty{##5}{}{ ##5}%
+ }% of \incs{gmu@datefsl}.
+ }% of |\polskadata|
+
+\polskadata
+
+\pdef\englishdate{%
+ \DeclareCommand\gmu@datefsl{%
+ Q{0123456789\bgroup}>iT{/-} % (1) year
+ Q{0123456789\bgroup}>iT{/-} % (2) month
+ Q{0123456789\bgroup} % (3) day
+ >is
+ T{,} K{##1\gmu@datefsl} % (4, 5) additional stuff after comma
+ }{%
+ \gmuIfValueF{##2}{\gmuPutIfValue{##3}}%
+ \gmuIfValueT{##2}{%
+ \ifcase##2\relax\or January\or February%
+ \or March\or April\or May\or June\or July\or August%
+ \or September\or October\or November\or December\else
+ {}%
+ \fi}%
+ \space
+ \@tempcnta=##3\relax\the\@tempcnta,
+ \gmuIfValueT{##1}{ ##1}%
+ \gmuPutIfValue{##4}%
+ \gmu@ifempty{##5}{}{ ##5}%
+ }% of \incs{gmu@datefsl}.
+}%
+
+\newif\ifdate
+\pdef\bidate #1{%
+ \gmu@datefsl#1\gmu@datefsl
+}
+
+\DeclareCommand\linedate{s{}m}
+{%
+ \par
+ \linedate@hook #1#2\@nil%
+ \addvspace{\dateskipamount}%
+ \possvfil% if we put it before |\addvspace|, the v-space is always
+ % added.
+ %
+ \ifdate
+ % ^^U \addvspace{\dateskipamount}%
+ \if@CofaćPrzedDatą@
+ \penalty\@M
+ \vskip-0,5\baselineskip
+ \else
+ \@CofaćPrzedDatą@true
+ \fi
+ %
+ \date@line{\DateFont \bidate{#1#2}}%
+ \nopagebreak
+ % ^^U \else%|%\ifnum\arabic{dateinsection}>0\dekbigskip\fi|
+ % ^^U \addvspace{\bigskipamount}\possvfil
+ \fi
+}% end of |\linedate|.
+
+\newif\if@CofaćPrzedDatą@
+\@CofaćPrzedDatą@true
+
+\pdef\NoPredate {\@CofaćPrzedDatą@false}
+
+\newcommand*\DateFont{\footnotesize\itshape}
+
+\def\linedate@hook #1\@nil{}
+
+\newskip\dateskipamount
+\dateskipamount\medskipamount
+
+\pdef\rdate{\let\date@line\rightline \linedate}
+
+\def\date@left#1{\par{%
+ \raggedright#1%
+ \leftskip\z@skip
+ \@@par}}%
+
+\pdef\ldate{%\changes{v0.94}{2008/09/06}{\cs{leftline}
+ % replaced with \cs{par}…\cs{par} to work well with \pk{floatflt}}
+ \let\date@line\date@left
+ \linedate}
+
+\newcommand*\runindate[1]{%
+ \paragraph{\footnotesize\itshape \gmu@datef#1\gmu@datef}%
+ \stepcounter{dateinsection}}
+\let\thedate\ldate
+
+\pdef\zwrobcy#1{\emph{#1}} %ostinato, allegro con moto,
+ %garden party etc., także kompliment
+
+\pdef\tytul#1{\emph{#1}}
+
+\newenvironment{maszynopis}[1][]{#1\ttfamily
+ \hyphenchar\font=45\relax% this assignment is global for the font.
+ \@tempskipa=\glueexpr\rightskip+\leftskip\relax
+ \ifdim\gluestretch\@tempskipa=\z@
+ \tolerance900
+ % \nostanza it worked well with tolerance \equals 900.\nostanza
+ \advance\rightskip by\z@ plus0,5em\relax\fi
+ \fontdimen3\font=\z@% we forbid stretching spaces…\par\nostanza\gmdnoindent
+ %|% \fontdimen4\font=\z@| but allow shrinking them.\nostanza
+ \hyphenpenalty0 % not to make \TeX\ nervous: in a~typewriting this
+ % marvellous algorithm of hyphenation should be turned off and every
+ % line broken at the last allowable point.
+ \Store@Macro\pauzacore
+ \def\pauzacore{-\rlap{\kern-0,3em-}-}%
+}{\par}
+
+\pdef\justified{%
+ \leftskip=1\leftskip% to preserve the natural length and discard
+ % stretch and shrink.
+ \rightskip=1\rightskip
+ \parfillskip=1\parfillskip
+ \advance\parfillskip by 0sp plus 1fil\relax
+ \let\\\@normalcr}
+
+\DeclareCommand\fullpar{%
+ T{+-}%
+ Q{+-0123456789} % optional looseness (most probably negative)
+}{%
+ \begingroup
+ \gmuIfValueT{#1}{\looseness=#1\gmuIfValueTF{#2}{#2}{1}\relax
+ \multiply\tolerance by \tw@
+ }%
+ \fullparcore
+ \par
+ \endgroup}
+
+\pdef\fullparcore{%
+ \hunskip
+ \parfillskip\z@skip}
+
+\newcommand*\twoparinit{% the name stands for `\emph{last} paragraph
+ % line's length \emph{min}imum \emph{two} \incs{parindent}.
+ \def\twopar@defts{%
+ \hsize-\leftskip-\rightskip-\fontcharwd\font`…}%
+ \def\twopar@atleast{2\@parindent}%
+ \DeclareCommand\twopar{%
+ T{+-}% (1) you can specify loosening the paragraph by one only by
+ % typing single |+| and tightening by one by typing single |-|.
+ Q{+-0123456789}% (2)
+ A{\twopar@atleast}% (3)
+ >iT{\cipolagwa}}{%
+ \begingroup
+ \gmuIfValueT{##1}{%
+ \looseness=##1\gmuIfValueTF{##2}{##2}{1}\relax
+ \multiply\tolerance by2
+ }%
+ \twoparcore<##3>%
+ \endgraf
+ \endgroup
+ }% of \incmd\twopar.
+ % \stanza
+ \ifdefined\XeTeXversion
+ \DeclareCommand\twoparcore{%
+ A{\twopar@atleast}
+ \gobblespace
+ }{%
+ \hunskip % it's \ac{O.K.} it's in a~group, it'll work anyway.
+ \edef\gmu@tempa{\the\dimexpr\twopar@defts-##1\relax}%
+ \parfillskip=\glueexpr\gmu@tempa minus \gmu@tempa
+ \relax% to delimit |\glueexpr|.
+ \relax% to delimit the assignment.
+ }%
+ \else % not \XeTeX---doesn't use |\fontcharwd|.
+ \DeclareCommand\twoparcore{%
+ A{\twopar@default}
+ \gobblespace
+ }{%
+ \hunskip % it's \ac{O.K.} it's in a~group, it'll work anyway.
+ {\setbox0=\hbox{\dots}%
+ \xdef\gmu@tempa{\the\wd0}}%
+ \edef\gmu@tempa{%
+ \the\dimexpr\hsize-\leftskip-\rightskip
+ -\gmu@tempa-2\@parindent\relax}%
+ \parfillskip=\glueexpr\gmu@tempa minus \gmu@tempa
+ \relax% to delimit |\glueexpr|.
+ \relax% to delimit the assignment.
+ }%
+ \fi
+ % \stanza
+ \AtBeginDocument{%
+ \def\restoreparindent{\parindent\@parindent}%
+ }% of \cmd\AtBeginDocument.
+}% of \cs{twoparinit}.
+
+
+\def\gmu@leftskipcorr{%
+ \kern1\leftskip
+ \ifcsname \@currenvir leftskip\endcsname
+ \kern-1\csname \@currenvir leftskip\endcsname
+ \fi
+}
+
+\DeclareCommand\wherncore{om}{%\
+ % \begin{enumargs}
+ % \dc optional value of \incs{hskip} of (left) indent of the parbox. If
+ % absent, parbox is aligned right;
+ % \dc text for the datum parbox.
+ % \end{enumargs}
+ \gmuIfValueTF{#1}{\leftline{%
+ \kern1\leftskip
+ \whernfont
+ \hskip#1\relax\parbox
+ {\dimexpr\hsize-\leftskip-\rightskip-#1}%
+ {#2}% of |\parbox|,
+ }% of |\leftline|,
+ }% of |ValueT{#1}|.
+ {% |ValueF{#1}|:
+ \rightline
+ {\whernfont
+ \whern@parbox{#2}%
+ \kern1\rightskip
+ }% of |\rightline|,
+ \setprevdepth
+ }% of |ValueF{#1}|,
+}% of |\wherncore|.
+
+\DeclareCommand\whern@parbox{%
+ T {\leftskip\rightskip}% horizontal alignment of resulting box (the
+ % side to be ragged)
+ O{t} % vertical alignment of parbox
+ >is % separator
+ O{0,7666\hsize} % (3) width of parbox
+ m % (4) parbox contents
+}{%
+ % \begin{enumargs}
+ % \dc S the skip of the ragged side,
+ % \dc the |\parbox|'s contents.
+ % \end{enumargs}
+ \parbox[#2]{#3}{%
+ \gmuIfValueTF{#1}{#1}{\leftskip}=0sp plus \textwidth
+ \parfillskip0sp\relax
+ \let\\\linebreak
+ \disobeylines
+ \whernfont #4\unskip\strut\endgraf
+ \getprevdepth
+ }% of |\parbox|,
+}% of |\whern@parbox|.
+
+\def\whern{%
+ \endgraf\nopagebreak
+ \gmu@ifstar{\wherncore}%
+ {\vskip\whernskip\wherncore}%
+}
+
+\let\whernfont\footnotesize
+
+\newskip\whernskip
+\whernskip2\baselineskip minus 2\baselineskip\relax
+
+\foone{\obeylines}{%
+ \DeclareCommand\whernup{%
+#1 o % a~vskip before
+ >is % separating star (ignored)
+#2 o % custom width of parbox
+#3 >Pm%
+#4 o % a vskip between this box and subsqt. text
+ >iQ{ \par
+ }%
+ }% of args' spec
+}% of obey lines
+{\par
+ \gmuIfValueT{#1}{\vskip#1\relax}%
+ %
+ % The \env{prosato} env. of \pk{gmverse} \& derivs. set some
+ % positive parskip and counterkrank its first occurrence by a vskip
+ % of its negative. Therefore here we put ourselves in a |\rlap| and
+ % put at the very beginning of a paragraph.
+ \ifinner \noindent\nobreak\kern-1\leftskip \nobreak
+ \rlap{%
+ \vbox{%
+ \fi % of if inner
+ \leftline{%
+ % ^^A \gmu@leftskipcorr
+ \gmuIfValueTF{#2}{\whern@parbox\rightskip[b][#2]}%
+ {\whern@parbox\rightskip[b]}%
+ {#3}%
+ }%
+ %
+ \ifinner
+ \gmuIfValueT {#4}{\vskip\glueexpr #4\endexpr }%
+ \phantom{Ala ma Filifjonkgyr}%
+ }% of vbox
+ }% of rlap
+ %
+ \penalty\@M
+ \kern 1\leftskip
+ \@ifenvir{quote}{\hskip\z@skip}{\hskip\parindent\relax}%
+ \else
+ \gmuIfValueT {#4}{\vskip \glueexpr #4\endexpr }%
+ \fi
+}% of |\whernup|'s body.
+
+
+\pdef\thousep#1{% a~macro that'll put the thousand separator between
+ % every two three-digit groups.\par\nostanza
+ % First we check whether we have at least five digits.
+ %\changes{v0.93}{2008/08/23}{added}
+ \gmu@thou@fiver#1\relax\relax\relax\relax\relax% we put five
+ % \incs{relax}es after the parameter to ensure the string will meet
+ % \incs{gmu\+@\+thou\+@\+fi\+ver}'s definition.\ilrr
+ \gmu@thou@fiver{#1}{% if more than five digits:
+ \emptify\gmu@thou@put
+ \relaxen\gmu@thou@o\relaxen\gmu@thou@i\relaxen\gmu@thou@ii
+ \@tempcnta\z@
+ \gmu@thou@putter#1\gmu@thou@putter
+ \gmu@thou@put
+ }}
+
+\def\gmu@thou@fiver#1#2#3#4#5\gmu@thou@fiver#6#7{% this macro only
+ % checks if the text delimited with itself consists of at least five tokens/braces
+ \ifx\relax#5\relax\@xa\@firstoftwo
+ \else\@xa\@secondoftwo
+ \fi{#6}{#7}}
+
+\def\gmu@thou@putter #1#2{% we are sure to have at least five tokens
+ % before the sentinel \incs{gmu@thou@putter}.
+ \advance\@tempcnta\@ne
+ \@tempcntb\@tempcnta
+ \divide\@tempcntb3\relax
+ \@tempcnta=\numexpr\@tempcnta-\@tempcntb*3
+ \edef\gmu@thou@put{\@xau{\gmu@thou@put}\unexpanded{#1}%
+ \ifx\gmu@thou@putter#2\else
+ \ifcase\@tempcnta
+ \gmu@thou@o\or\gmu@thou@i\or\gmu@thou@ii% all three
+ % \CSes are yet \incs{relax} so we may put them in
+ % an \incs{edef} safely.\ilrr
+ \fi
+ \fi}% of \cs{edef}
+ \ifx\gmu@thou@putter #2% if we are at end of the digits…
+ \edef\gmu@tempa{%
+ \ifcase\@tempcnta
+ \gmu@thou@o\or\gmu@thou@i\or\gmu@thou@ii
+ \fi}%
+ \@xa\let\gmu@tempa\gmu@thousep% … we set the proper \CS…
+ \else% or …
+ \afterfi{% iterate.
+ \gmu@thou@putter#2}% of \cs{afterfi}
+ \fi% of if end of digits.
+}% of \cs{gmu@thou@putter}.
+
+\def\gmu@thousep{\,}% in Polish the recommended thousand separator is
+
+\pdef\xathousep#1{\@xa\thousep\@xa{\the#1}}
+
+\def\shortthousep{%
+ \DeclareCommand\thous{
+ D {\NoValue} % decimal argument
+ }{%
+ % we declare it as a command with Q-type argument to allow spaces
+ % between digits.
+ \ifmmode\hbox\bgroup\@gmu@mmhboxtrue\fi
+ \gmuIfValueTF{##1}{% we are given a sequence of digits
+ \@tempcnta=##1\relax
+ \ifnum\@tempcnta<0 $-$%
+ \@tempcnta=-\@tempcnta
+ \fi
+ \xathousep\@tempcnta
+ \if@gmu@mmhbox\egroup
+ \else\@xa\spifletter
+ \fi
+ }%
+ {% no bare digits given, then we assume the argument is braced.
+ \thousep
+ }%
+ }% of |\thous|.
+}% of |\shortthousep|.
+
+
+\DeclareCommand\ATfootnotes{s}{% \chgs{2008/11/29 v0.98 moved here
+ % from my own private macro package to allow the beauty of these
+ % footnotes for the general audience}
+ % \stanza
+ % We make the footnote mark in the footnote |\scriptsize| not
+ % |\scriptscriptsize|.\nostanza
+ \gmuIfValueT{#1}% the following setting is suitable for old style
+ % numbers in footnote marks, therefore I~place it in the starred
+ % version of the command.
+ {\prependtomacro\gmu@ATfootnotes{%
+ \pdef\@makefnmark{%
+ \mbox {\normalfont \textsuperscript {\smaller[3]\@thefnmark }}}%
+ }% of prepend,
+ }% of |\gmuIfValueT|.
+ %
+ \gmu@ATfootnotes
+ \gmu@AT@ampulex\maketitle% without \pk{hyperref}
+ \unless\if@HyOrg@maketitle@ampulexed@
+ \ifdefined\HyOrg@maketitle
+ \afterfi{\gmu@AT@ampulex\HyOrg@maketitle}% with \pk{hyperref}
+ \fi
+ \@HyOrg@maketitle@ampulexed@true
+ \fi
+}
+
+\newif\if@HyOrg@maketitle@ampulexed@
+
+\pdef\gmu@AT@ampulex #1{%
+ \ampulexdef#1{\def\@makefnmark}%
+ \if@twocolumn
+ {\gmu@ATfootnotes\if@twocolumn}% Ampulex redefinition of
+ % \incs{maketitle} for the standard classes.
+ \ampulexdef#1{\long\def\@makefntext}%
+ \if@twocolumn{\gmu@ATfootnotes\if@twocolumn}% Ampulex redefinition
+ % of \incs{maketitle} for \pk{mwcls}.
+}
+
+\pdef\gmu@ATfootnotes{%
+ % And we make the footnote number not be in superscript but on the
+ % base line, according to Andrzej Tomaszewski's suggestion on
+ % Bacho\TeX\ 2008, and the same size as in the footnote mark.\nostanza
+ \long\pdef\@makefntext##1{%
+ \ifdefined\@parindent \parindent\@parindent
+ \else \parindent 1em\relax
+ \fi
+ \indent{\ATf@font\scriptsize% ^^A \hphantom{19}\llap
+ {\@thefnmark}}%
+ \gmu@fnhook
+ \enspace\ignorespaces##1}%
+}
+
+\let\ATf@font\normalfont
+
+\emptify\gmu@fnhook
+
+
+\pdef\rrthis{% ‘rag right this’: make only the current paragraph
+ % ragged right (e.g.\ if the paragraph consists of a~long \ac{URL}).
+ % \chgs{2008/12/01 v0.98 added}
+ \begingroup\rightskip=0sp plus \hsize \endgraf\endgroup}
+
+\pdef\centerthis{% 2009/12/15
+ \begingroup
+ \rightskip=1\rightskip plus \hsize
+ \leftskip=1\leftskip plus\hsize
+ \parfillskip=\z@skip
+ \endgraf\endgroup}
+
+
+\def\TrzaskaTilde{%
+ \@xa\DeclareCommand\@xa\gmu@smarttilde
+ \@xa{\@xa T\@xa{\all@stars~}}{%
+ \gmuIfValueTF{##1}{\nobreakspace{}}%
+ {\ifdim\dimexpr\hsize-\leftskip-\rightskip
+ -\ifdim\hangindent<\z@-\fi\hangindent % the last
+ % parameter is used with respect to the \pk{floatflt} package.
+ >%
+ \ifdim\f@size pt>\dimexpr10pt-1sp\relax
+ 168dd
+ \else
+ 144dd
+ \fi
+ \nobreakspace {}%
+ \else
+ \ %
+ \fi
+ }% of |\gmu@ifstar|'s else,
+ }% of |\gmu@smarttilde|,
+ \let~\gmu@smarttilde
+}% of |\TrzaskaTilde|.
+
+
+\newcommand{\clearemptydoublepage}{%
+ \newpage{\pagestyle{empty}\cleardoublepage}}
+
+\foone\obeylines{%
+ \def\disobeylines{% for arguments in which line end is active to
+ % simulate normal behaviour
+ \ifnum\catcode`\^^M=\active%
+ \pdef^^M{\@ifnextgroup{\ifhmode\unskip\space\fi}{\gmu@disMinner}}%
+ \def\gmu@disMinner##1{%
+ \ifx^^M##1\endgraf%
+ \else\afterfi{\ifhmode\unskip\space\fi}\fi##1}%
+ \fi}%
+}
+
+
+\DeclareCommand\*{Q{0123456789}{1}}
+{\gmu@flexhyphen
+ \gmu@star@loop0{#1}\relax
+}%
+
+\def\gmu@star@loop#1#2{% this is an expandable loop as in The
+ % \eTeX\ Manual p.~9.
+ \ifnum#1<\numexpr#2\relax%
+ \gmu@lowstar
+ \gmu@flexhyphen
+ \@xa\gmu@star@loop
+ \@xa{\number\numexpr#1+1\@xa}%
+ \@xa{\number#2\@xa}%
+ \fi}
+
+\ifdefined\XeTeXversion
+
+\foone{%
+ \catcode`„\active
+ \catcode`”\active
+ \catcode`’\active
+ \catcode`—\active
+ \catcode`–\active
+}{%
+ \def\activequotes{%
+ \incsdef„{}{\@ifnextchar—%
+ {\lv\llap{\string„}\pauzadial}{\string„}}%
+ \incsdef”{}{\string”\@ifnextanyRS{.,}{\quotkern}{}}%
+ \incsdef’{}{\string’\@ifnextanyRS{.,}{\quotkern}{}}%
+ \catcode`„\active
+ \catcode`”\active
+ }%
+ \def\activepunctsQ {„”’—–}%
+}
+
+\catcode`ѥ\active
+
+\DeclareCommand\ac {b} {%
+ \gmuIfValueTF{#1}%
+ {%
+ \acro{#1}%
+ }%
+ {\ac@u}%
+}
+
+\def\ac@kernel#1{{\gmu@acrokernel {#1}}}% |#1| in braces because |\acrocore|
+ % valid in \ty{Dzienniczek} uses
+ % |\lowercase| (that requires braced text).
+
+
+\@xa\def\@xa\@dc@basicdelims\@xa{%
+ \two@Ms \par \relax
+ \bgroup
+ \egroup \begingroup \endgroup
+ \begin \end
+ $% ^^A$
+ \(\)\[\]% other math delims
+ &\\% tabular delims
+}
+
+\let\@dc@basicdelimsp\@dc@basicdelims
+
+\@xa\addtomacro\@xa\@dc@basicdelimsp
+\@xa{\all@spaces}
+
+\@xa\def\@xa\@dc@punctanddelims
+\@xa{\@dc@basicdelims :,.;?!„”«»‹›"'`‘’}%
+
+\let \@dc@acpunctanddelims \@dc@punctanddelims
+
+\@xa\addtomacro\@xa\@dc@acpunctanddelims
+\@xa{\activepunctsQ}
+
+\let \@dc@acpunctanddelimsp \@dc@punctanddelims
+
+\@xa\addtomacro\@xa\@dc@acpunctanddelimsp
+\@xa{\all@spaces}
+
+\addtomacro\@dc@acpunctanddelimsp{~}
+
+\DeclareCommand\ac@u{
+ >\@xa U {\@dc@acpunctanddelimsp ()[]<>ѥ} \default{}
+ \eacher {\ac@kernel}
+ >iW{ѥ}
+}
+{%
+ \ifmmode\@xa\text\else\@xa\firstofone\fi{#1}%
+}
+
+\fi % of if \XeTeX\ of l.~\ref{12322}.
+
+\@namedef{enumerate*}{%
+ \ifnum\@enumdepth>\thr@@
+ \@toodeep
+ \else
+ \advance\@enumdepth\@ne
+ \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+ \@xa\list\csname label\@enumctr\endcsname{%
+ \partopsep\topsep \topsep\z@ \leftmargin\z@
+ \itemindent\@parindent %|%\advance\itemindent\labelsep|
+ \labelwidth\@parindent
+ \advance\labelwidth-\labelsep
+ \listparindent\@parindent
+ \usecounter \@enumctr
+ \def\makelabel##1{##1\hfil}}%
+ \fi}
+\@namedef{endenumerate*}{\endlist}
+
+\@namedef{itemize*}{%
+ \ifnum\@itemdepth>\thr@@
+ \@toodeep
+ \else
+ \advance\@itemdepth\@ne
+ \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+ \@xa\list\csname\@itemitem\endcsname{%
+ \partopsep\topsep \topsep\z@ \leftmargin\z@
+ \itemindent\@parindent
+ \labelwidth\@parindent
+ \advance\labelwidth-\labelsep
+ \listparindent\@parindent
+ \def\makelabel##1{##1\hfil }}%
+ \fi}
+\@namedef{enditemize*}{\endlist}
+
+\endinput
+%%
+%% End of file `gmtypos.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmurl.sty b/tex/.texmf/tex/latex/misc/gmurl.sty
new file mode 100644
index 0000000..646585e
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmurl.sty
@@ -0,0 +1,301 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmurl.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `url')
+%%
+%%
+%% Copyright ©
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmurl}
+ [2011/10/12 v0.996 modifications to the url package (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+
+\RequirePackage{gmcommand}
+
+
+\def\urladdstar{%
+ \AtBeginDocument{%
+ \@ifpackageloaded{hyperref}{%
+ \Store@Macro\url
+ \pdef\url{\gmu@ifstar{\nolinkurl}{\storedcsname{url}}}%
+ }{}}}
+
+\@onlypreamble\urladdstar
+
+\@ifXeTeX{%
+ \pdef\UrlFix{\AtBeginDocument{%
+ \@ifpackageloaded{url}{\gmu@UrlFix}{}}%
+ \relaxen\UrlFix}%
+ %
+ \AtBeginDocument{%
+ \pdef\UrlFix{%
+ \@ifpackageloaded{url}{\gmu@UrlFix}{}%
+ \relaxen\UrlFix}}%
+}
+{%
+ \pdef\UrlFix{\PackageWarning{gmutils}{!!! The \string\UrlFix\space
+ declaration works only with XeTeX}}%
+}
+
+\@ifXeTeX{}{%
+ \edef\gmu@restoreUpUpUp{\catcode`\@nx\^^^=\the\catcode`\^^^}%
+ \AtEndOfPackage\gmu@restoreUpUpUp
+ \catcode`\^^^=9 }
+
+\def\gmu@UrlFix{%
+ % \stanza
+ % default style assignments
+ \def\UrlBreaks{\do\.\do\@\do\\\do\/\do\!\do\_\do\|\do\;\do\]%
+ \do\)\do\,\do\?\do\'\do\"\do\+\do\=\do\#\do\%\do\~\do\_\do\|%
+ \do\{\do\}\do\$}%
+ \def\UrlBigBreaks{\do\:}%
+ \def\UrlNoBreaks{\do\(\do\[\do\{}%
+ \def\UrlSpecials{%
+ \do\ {\hbox{\visiblespace}}\do\^^M{\hbox{\visiblespace}}}%
+ % \stanza
+ %
+ % \stanza
+ \def\Url@Format##1{%
+ \UrlFont
+ \ifdefined\verbatim@specials
+ \catcode`\>\active
+ \verbatim@specials
+ \verbatim@mathhack
+ \fi % setting of
+ % the escape char, begin and end group and optionally math shift,
+ % defined in \pk{gmverb}.
+ \gmu@UrlSetup
+ \UrlLeft
+ \edef\gmu@theendlinechar{\the\endlinechar}%
+ \endlinechar\m@ne
+ \kern\z@% to forbid hyphenating the first word if the \ac{URL}
+ % begins with a~word
+ \hyphenchar\font=\UrlHyphenchar\relax
+ \let\-\gmu@discretionaryhyphen
+ \scantokens{##1}%
+ \endlinechar\gmu@theendlinechar\relax
+ \UrlRight
+ }% of |\Url@Format|.
+ % \stanza
+ \edef\UrlHyphenchar{%
+ \ifdefined\gmv@hyphenchar\gmv@hyphenchar
+ \else"A6 \fi}% \label{UrlHyphenchar} broken bar, |¦| or the same as
+ % provided in \pk{gmverb} for verbatims. You
+ % can redefine it as you please. This char is used as the
+ % hyphenation char in \ac{URL}s and therefore should be different
+ % from |-| (hyphen), which is often a part of an \ac{URL}. The
+ % broken bar seems to be quite unlikely in \ac{URL}s and/or file
+ % names.
+ % \stanza
+ \def\verbatim@mathhack{%
+ \ifdefined\verbatim@specials@list
+ \@xa\verbatim@mathhack@\verbatim@specials@list
+ \fi
+ }%
+ % \stanza
+ \def\verbatim@mathhack@##1##2##3##4##5##6{%
+ \gmuIfValueT{##4}{%
+ \edef\gmu@thinmuskip{\the\thinmuskip}%
+ \edef\gmu@medmuskip{\the\medmuskip}%
+ \edef\gmu@thickmuskip{\the\thickmuskip}%
+ \begingroup
+ \lccode`\~=`##4\lowercase{%
+ \endgroup\def~####1~}%
+ {$\thinmuskip\gmu@thinmuskip\relax
+ \medmuskip\gmu@medmuskip\relax
+ \thickmuskip\gmu@thickmuskip\relax
+ ####1%
+ $}%
+ \catcode`##4\active
+ }%
+ }%
+ %\stanza
+ \def\gmu@UrlSetup{%
+ \medmuskip\Urlmuskip \thickmuskip\medmuskip \thinmuskip0mu%
+ \relpenalty\UrlBigBreakPenalty \binoppenalty\UrlBreakPenalty
+ \def\do{\gmu@doUrlMath\UrlBreakPenalty}\UrlBreaks % bin
+ % (\incs{hyphenpenalty} anyway)
+ \def\do{\gmu@doUrlMath\UrlBigBreakPenalty}\UrlBigBreaks % rel
+ % (\incs{hyphenpenalty} anyway)
+ \def\do{\gmu@doUrlMath\@M}\UrlNoBreaks % open (no break)
+ \def\do{\gmu@doUrlMathAc\UrlBreakPenalty}% (\incs{hyphenpenalty})
+ \UrlSpecials
+ \if \iffontchar\font"2329 1\else0\fi\iffontchar\font"232A 1\else2\fi
+ % \nostanza we check whether the font provides both left and right
+ % angle brackets. \nostanza
+ \gmu@measurewd{^^^^2329}%
+ \edef\gmu@tempa{%
+ \@nx\gmu@doUrlMathAc\@M\@nx\<{%
+ \hbox to\gmu@tempb{\unexpanded{\hss\char"2329 \hss}}}%
+ }\gmu@tempa
+ \gmu@measurewd{^^^^232a}%
+ \edef\gmu@tempa{%
+ \@nx\do\@nx\>{%
+ \hbox to\gmu@tempb{\unexpanded{\hss\char"232A \hss}}}%
+ }\gmu@tempa
+ \else
+ \gmu@doUrlMathAc\@M\<{\langle}\do\>{\rangle}%
+ \fi
+ \iffontchar\font"22C6 % low star
+ \do\*{\hbox{\char"22C6 }}%
+ \else \do\**%
+ \fi
+ \ifx\do@url@hyp\@empty
+ \gmu@measurewd{-}% this macro is defined in line \ref{@measurewd}.
+ \edef\gmu@tempa{%
+ \unexpanded{\gmu@doUrlMathAc\@M\-}%
+ {\hbox to \gmu@tempb{\unexpanded{\hss-\hss}}%
+ \@nx\-}% hyphen is a
+ % good point for hyphenation, but the hyphenation char should
+ % be sth. else, and it is indeed: |¦| (broken bar,
+ % |\char"A6|). See also line \ref{UrlHyphenchar}
+ }\gmu@tempa
+ \fi
+ \addfontfeature{Ligatures=NoCommon, Mapping=none}% instead of
+ % ‘doing’ \incs{ver\+bat\+im\+@\+no\+lig\+@\+list}.
+ }% of |\gmu@UrlSetup|.
+ % \stanza
+ %
+ % \stanza
+ \def\gmu@doUrlMath##1##2{%\
+ % \begin{enumargs}
+ % \item value of the penalty (used as a~Boolean: if $<$
+ % \thous 10000, \nlperc\cs{hyphenpenalty} will be used anyway, if $\ge$
+ % \thous10000, there will be no \incs{discretionary}),
+ % \item the char, given as |\⁄<char>|.
+ % \end{enumargs}
+ \begingroup
+ \lccode`\~=`##2\lowercase{%
+ \endgroup\def~{\@ifnextchar~}%
+ \@xa\addtomacro\@xa~}% of |\lowercase|.
+ \ifnum##1<\@M
+ {%
+ {\char`##2\csname gmu@dbl\string##2kern\endcsname}% if next is the same char
+ {\ifmmode\char`##2% else
+ \else\gmu@urlbreakable{##1}{##2}%
+ \fi}%
+ }% of |\addtomacro|'s argument |\ifnum| true.
+ \else
+ {%
+ {\char`##2\csname gmu@dbl\string##2kern\endcsname}{\char`##2}%
+ }% of |\addtomacro|'s argument |\ifnum| false.
+ \fi
+ \catcode`##2=\active
+ }% of |\gmu@doUrlMath|.
+ % \stanza
+ \def\gmu@doUrlMathAc##1##2##3{%\
+ % \begin{enumargs}
+ % \item (value of) a~penalty (see the remark to \inverb|##1| of
+ % the previous macro),
+ % \item the char (as |\⁄<char>|),
+ % \item the definition.
+ % \end{enumargs}
+ \begingroup
+ \lccode`\~=`##2\lowercase{%
+ \endgroup\def~{\@ifnextchar~}%
+ \@xa\addtomacro\@xa~}% of |\lowercase|.
+ \ifnum ##1<\@M
+ {%
+ {\ifmmode\char`##2\else$##3\m@th$\fi}%
+ {\ifmmode\char`##2%
+ \else\discretionary{\hbox{$##3\m@th$}}{}{\hbox{$##3\m@th$}}%
+ \fi}%
+ }% of |\addtomacro|'s argument if num true.
+ \else
+ {%
+ {\ifmmode\char`##2\else$##3\m@th$\fi}{\ifmmode\char`##2\else$##3\m@th$\fi}%
+ }% of |\addtomacro|'s argument if num false.
+ \fi
+ \catcode`##2=\active
+ }% of |\gmu@doUrlMathAc|.
+ % \stanza
+ \pdef\gmu@url@rigidbreak##1##2{\discretionary{\char`##2}{}{\char`##2}}%
+ % \stanza
+ \pdef\gmu@url@flexbreak##1##2{\penalty\@M \hskip\z@ plus0,03em
+ \char`##2\penalty##1\hskip\z@ plus0,03em\relax}%
+ % \stanza
+ \let\gmu@urlbreakable\gmu@url@flexbreak
+ % \stanza
+ \def\Url@z##1{%
+ % Do any hyper referencing due to hyperref (or perform a url-def)
+ \Url@HyperHook
+ % Now do the formatting in a group (can also have \incs{Url@HyperHook} take
+ % this as an argument). \nostanza
+ {\Url@Format{##1}}%
+ \endgroup}%
+ % \stanza
+ \DeclareUrlCommand\file{\urlstyle{sf}}%
+ % \stanza
+ \emptify\Url@moving% with our settings |\url| is pretty allowed in
+ % moving arguments, I~hope.
+}% of |\gmu@UrlFix|.
+
+\DeclareCommand\UrlSlashKern{O{tt}m}%
+{\AtBeginDocument{%
+ \@nameedef{url@#1style}{\def\@nx\UrlFont{%
+ \@xanxcs{#1family}%
+ \def\@xanxcs{gmu@dbl\string\/kern}%
+ {\kern#2\relax}%
+ }% of |\UrlFont|
+ }% of |\url#1style|
+ \urlstyle{#1}%
+ }% of |\AtBeginDocument|
+}% of |\UrlSlashKern|
+
+\def\DeclareUrlCommand#1#2{\pdef#1{\leavevmode\begingroup #2\Url}}
+
+\foolc ~ : {%
+ \@ifXeTeX{%
+ \def\metaat~{%
+ \penalty\@M \hskip\z@skip
+ \meta{аt}% it's a Cyrillic »a«!
+ \penalty\exhyphenpenalty
+ \hskip\z@skip
+ }%
+ %
+ \def\metadot~{%
+ \penalty\@M \hskip\z@skip
+ \meta{dоt}% it's a Cyrillic »o«!
+ \penalty\exhyphenpenalty
+ \hskip\z@skip
+ }%
+ }% of if \XeTeX
+ {%
+ \def\metaat~{\PackageError{gmurl}{Command \bslash metaat
+ works only in XeTeX}@}%
+ %
+ \def\metadot~{\PackageError{gmurl}{Command \bslash metaat
+ works only in XeTeX}.}%
+ }% of if not XeTeX
+}% of |\foolc|
+
+\endinput
+%%
+%% End of file `gmurl.sty'.
diff --git a/tex/.texmf/tex/latex/misc/gmutils.sty b/tex/.texmf/tex/latex/misc/gmutils.sty
new file mode 100644
index 0000000..b2af20c
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/gmutils.sty
@@ -0,0 +1,136 @@
+%%
+%% \iffalse ^^A we skip the debug setting
+\IfFileExists{\string~/bin/gen_and_xela}{\errorcontextlines=1000 }{}
+%% \fi
+%% ^^A $Id: TheUltimateMaster.gmd,v 0.352 2011/10/12 15:19:42 natror Exp natror $
+%% This is file “gmutils.sty” generated with the DocStrip utility.
+%%
+%%
+%% The original source files were:
+%%
+%% gmutils/gmutils.gmd (with options: `utils')
+%%
+%%
+%% Copyright © 2005, 2006, 2007, 2008, 2009, 2010, 2011
+%% by Grzegorz ‘Natror’ Murzynowski
+%% natror (at) gmail (dot) com
+%%
+%% This program is subject to the LaTeX Project Public License.
+%% See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
+%% for the details of that license.
+%%
+%% LPPL status: "author-maintained".
+%%
+%%
+%%
+%% For documentation please refer to the file(s)
+%% gmutils.{gmd,pdf}.
+%%
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{gmutils}
+ [2011/10/12 v0.996 some low-TeXnical macros, most of them copied from the Gurus (GM)]
+
+
+%%
+%%
+%% ^^A\typeout{\unexpanded{#4}}%%
+
+
+\unless\ifdefined\Name
+ \def\Name#1#2{\expandafter#1\csname#2\endcsname}
+\fi
+
+\unless\ifcsname ifgmu@quiet\endcsname
+\Name\newif {ifgmu@quiet}% % it has to be at least (at highest) in
+\fi
+
+\RequirePackage{xkeyval}
+
+\RequirePackage{gmbase}
+
+
+\DeclareOptionX{quiet}{\gmu@quiettrue
+ \PassOptionsToPackage{quiet}{gmtypos}%
+}
+
+\def\gmu@PackOptionX
+#1% name of a package with or without leading “gm”.
+{%
+ % So we declare an OptionX that by default loads this package thanks
+ % to a special \CS having been defined to load it or do nothing.
+ \DeclareOptionX{#1}[on]{%
+ % ^^V \ifcsname gmu@Require@#1\endcsname
+ % ^^V \PackageError{gmutils}{Value clash for the ***#1*** package option}{}%
+ % ^^V \fi
+ \lowercase{\@xa\if\@gobble ##1\relax}% “off” given as the value
+ \@namedef{gmu@Require@#1}{}%
+ \else % “on”
+ \afterfi{%
+ \@namedef{gmu@Require@#1}{%
+ \IfFileExists{gm#1.sty}%
+ {\RequirePackage{gm#1}}% if there's a \pk{gm} package, we load
+ % it, else we load
+ {\RequirePackage{#1}}%
+ }% of namedef
+ }% of afterfi
+ \fi
+ }% of |\DeclareOptionX|
+ \IfFileExists{gm#1.sty}%
+ {\DeclareOptionX{gm#1}[on]{%
+ \ExecuteOptionsX{#1=####1}%
+ }%
+ }% of if yes. Else:
+ {}%
+ %
+}
+
+ \gmu@PackOptionX{command}
+ \gmu@PackOptionX{ampulex}
+ \gmu@PackOptionX{envir}
+ \gmu@PackOptionX{relsize}
+ \gmu@PackOptionX{meta} % provides |\bihyphen|, |\discre|, |\discret|
+ \gmu@PackOptionX{logos}
+ \gmu@PackOptionX{notonlypream}
+ \gmu@PackOptionX{mw}
+
+ \gmu@PackOptionX{typos}
+ \gmu@PackOptionX{parts}
+ \gmu@PackOptionX{url}
+ \gmu@PackOptionX{RCS}
+
+\ExecuteOptionsX{command, envir, ampulex, relsize, meta, logos,
+ notonlypream, % ^^V mw=off,
+ typos, parts, url}
+
+\ProcessOptionsX
+
+\def\doifdefined#1{\ifdefined#1\@xa#1\fi}
+
+\doifdefined\gmu@Require@command
+\doifdefined\gmu@Require@envir
+\doifdefined\gmu@Require@ampulex
+\doifdefined\gmu@Require@relsize
+\doifdefined\gmu@Require@meta
+\doifdefined\gmu@Require@logos
+\doifdefined\gmu@Require@notonlypream
+\doifdefined\gmu@Require@mw
+\doifdefined\gmu@Require@typos
+\doifdefined\gmu@Require@parts
+\doifdefined\gmu@Require@url
+\doifdefined\gmu@Require@RCS
+
+
+\def\heshe{they}
+\def\hisher{their}
+\def\himher{them}
+\def\hishers{theirs}
+
+\def\HeShe{They}
+\def\HisHer{Their}
+\def\HimHer{Them}
+\def\HisHers{Theirs}
+
+\endinput
+%%
+%% End of file `gmutils.sty'.
diff --git a/tex/.texmf/tex/latex/misc/pstool.sty b/tex/.texmf/tex/latex/misc/pstool.sty
new file mode 100644
index 0000000..7c5c56e
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/pstool.sty
@@ -0,0 +1,650 @@
+% TODO: convert this package into expl3 syntax (will save many lines of code).
+
+\ProvidesPackage{pstool}[2014/05/11 v1.5c
+ Wrapper for processing PostScript/psfrag figures]
+
+% External packages:
+\RequirePackage{
+ catchfile,color,ifpdf,ifplatform,filemod,
+ graphicx,psfrag,suffix,trimspaces,xkeyval,expl3
+}
+
+% Add an additional command before trimspaces.sty is updated formally:
+\providecommand*{\trim@multiple@spaces@in}[1]{%
+ \let\trim@temp#1%
+ \trim@spaces@in#1%
+ \ifx\trim@temp#1%
+ \else
+ \expandafter\trim@multiple@spaces@in\expandafter#1%
+ \fi
+}
+
+% \subsection{Allocations}
+\expandafter\newif\csname if@pstool@pdfcrop@\endcsname
+\expandafter\newif\csname if@pstool@verbose@\endcsname
+\expandafter\newif\csname if@pstool@write@aux\endcsname
+
+\newwrite\pstool@out
+\newread\pstool@mainfile@ior
+\newread\pstool@auxfile@ior
+
+% Macro used to store the name of the graphic's macro file:
+\let\pstool@tex\@empty
+
+% \subsection{Package options}
+
+\define@choicekey*{pstool.sty}{crop}
+ [\@tempa\@tempb]{preview,pdfcrop}{%
+ \ifcase\@tempb\relax
+ \@pstool@pdfcrop@false
+ \or
+ \@pstool@pdfcrop@true
+ \or
+ \fi
+}
+
+\define@choicekey*{pstool.sty}{process}
+ [\@tempa\pstool@process@choice]{all,none,auto}{}
+\ExecuteOptionsX{process=auto}
+
+\define@choicekey*{pstool.sty}{mode}
+ [\@tempa\@tempb]{errorstop,nonstop,batch}{%
+ \ifnum\@tempb=2\relax
+ \@pstool@verbose@false
+ \else
+ \@pstool@verbose@true
+ \fi
+ \edef\pstool@mode{\@tempa mode}%
+}
+\ExecuteOptionsX{mode=batch}
+
+\DeclareOptionX{cleanup}{%
+ \edef\pstool@rm@files{\zap@space #1 \@empty}%
+ \@for\@ii:=\pstool@rm@files\do{%
+ \edef\@tempa{\@ii}%
+ \def\@tempb{.aux}%
+ \ifx\@tempa\@tempb
+ \PackageWarning{pstool}{^^J\space\space%
+ You have requested that ".aux" files be deleted.^^J\space\space
+ Cross-referencing within pstool graphics therefore disabled.^^J%
+ This warning occurred}
+ \fi
+ }
+}
+\ExecuteOptionsX{cleanup={.tex,.dvi,.ps,.pdf,.log}}
+
+\DeclareOptionX{suffix}{\def\pstool@suffix{#1}}
+\ExecuteOptionsX{suffix={-pstool}}
+
+% There is an implicit \cs{space} after the bitmap options.
+\define@choicekey*{pstool.sty}{bitmap}
+ [\@tempa\@tempb]{auto,lossless,lossy}{%
+ \ifcase\@tempb
+ \let\pstool@bitmap@opts\@empty
+ \or
+ \def\pstool@bitmap@opts{%
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/FlateEncode
+ -dGrayImageFilter=/FlateEncode % space
+ }
+ \or
+ \def\pstool@bitmap@opts{%
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/DCTEncode
+ -dGrayImageFilter=/DCTEncode % space
+ }
+ \fi
+}
+\ExecuteOptionsX{bitmap=lossless}
+
+\DeclareOptionX{latex-options}{\def\pstool@latex@opts{#1}}
+\DeclareOptionX{dvips-options}{\def\pstool@dvips@opts{#1}}
+\DeclareOptionX{ps2pdf-options}{\def\pstool@pspdf@opts{#1}}
+\DeclareOptionX{pdfcrop-options}{\def\pstool@pdfcrop@opts{#1}}
+
+\ExecuteOptionsX{
+ latex-options={},
+ dvips-options={},
+ ps2pdf-options={-dPDFSETTINGS=/prepress},
+ pdfcrop-options={}
+}
+
+\DeclareOptionX{macro-file}{%
+ \IfFileExists{#1}
+ {\def\pstool@macrofile{#1}}
+ {%
+ \let\pstool@macrofile\@empty
+ \PackageError{pstool}{^^J\space\space%
+ No file `#1' found for "macro-file" package option.^^J
+ This warning occurred}
+ }
+}
+
+% Default:
+\IfFileExists{\jobname-pstool.tex}
+ {\edef\pstool@macrofile{\jobname-pstool.tex}}
+ {\let\pstool@macrofile\@empty}
+
+
+\ifpdf
+ \ifshellescape\else
+ \ExecuteOptionsX{process=none}
+ \PackageWarning{pstool}{^^J\space\space%
+ Package option [process=none] activated^^J\space\space
+ because -shell-escape is not enabled.^^J%
+ This warning occurred}
+ \fi
+\fi
+
+\ProcessOptionsX
+
+% A command to set \pkg{pstool} options after the package is loaded.
+\newcommand\pstoolsetup{%
+ \setkeys{pstool.sty}%
+}
+
+% \section{Macros}
+% Used to echo information to the console output.
+% Can't use \cs{typeout} because it's asynchronous with
+% any \cs{immediate}\cs{write18} processes (for some reason).
+\def\pstool@echo#1{%
+ \if@pstool@verbose@
+ \pstool@echo@verbose{#1}%
+ \fi
+}
+
+\def\pstool@echo@verbose#1{%
+ \immediate\write18{echo "#1"}%
+}
+
+\let\pstool@includegraphics\includegraphics
+
+% Command line abstractions between platforms:
+\edef\pstool@cmdsep{\ifwindows\string&\else\string;\fi\space}
+\edef\pstool@rm@cmd{\ifwindows del \else rm -- \fi}
+\edef\pstool@cp@cmd{\ifwindows copy \else cp -- \fi}
+
+% Delete a file if it exists:
+% #1: path
+% #2: filename
+\newcommand\pstool@rm[2]{%
+ \IfFileExists{#1#2}{%
+ \immediate\write18{%
+ cd "#1"\pstool@cmdsep\pstool@rm@cmd "#2"
+ }%
+ }{}%
+}
+
+% Copy a file if it exists:
+% #1: path
+% #2: filename
+% #3: new filename
+\newcommand\pstool@cp[3]{%
+ \IfFileExists{#1#2}{%
+ \immediate\write18{%
+ cd "#1"\pstool@cmdsep\pstool@cp@cmd "#2" "#3"
+ }%
+ }{}%
+}
+
+% Generic function to execute a command on the shell and pass its exit status back into \LaTeX. Any number of \cmd\pstool@exe\ statements can be made consecutively followed by \cmd\pstool@endprocess, which also takes an argument. If \emph{any} of the shell calls failed, then the execution immediately skips to the end and expands \cmd\pstool@error\ instead of the argument to \cmd\pstool@endprocess.
+% #1: `name' of process
+% #2: relative path where to execute the command
+% #3: the command itself
+\newcommand\pstool@exe[3]{%
+ \pstool@echo{^^J=== pstool: #1 ===}%
+ \pstool@shellexecute{#2}{#3}%
+ \pstool@retrievestatus{#2}%
+ \ifnum\pstool@status > \z@
+ \PackageWarning{pstool}{%
+ Execution failed during process:^^J\space\space
+ #3^^JThis warning occurred%
+ }%
+ \expandafter\pstool@abort
+ \fi
+}
+
+% Edit this definition to print something else when graphic processing fails.
+\def\pstool@error{%
+ \fbox{%
+ \parbox{0.8\linewidth}{%
+ \color{red}\centering\ttfamily\scshape\small
+ An error occured processing graphic:\\
+ \upshape`%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}.eps%
+ '\\\bigskip
+ \tiny
+ Check the log file for compilation errors:\\
+ `%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}-pstool.log%
+ '\\
+ }%
+ }%
+}
+
+\def\pstool@abort#1\pstool@endprocess{\pstool@error\@gobble}
+\let\pstool@endprocess\@firstofone
+
+% It is necessary while executing commands on the shell to write the exit status to a temporary file to test for failures in processing. (If all versions of \texttt{pdflatex} supported input pipes, things might be different.)
+\def\pstool@shellexecute#1#2{%
+ \immediate\write18{%
+ cd "#1" \pstool@cmdsep
+ #2 \pstool@cmdsep
+ \ifwindows
+ call echo
+ \string^\@percentchar ERRORLEVEL\string^\@percentchar
+ \else
+ echo \detokenize{$?}
+ \fi
+ > \pstool@statusfile}%
+% That's the execution; now we need to flush the write buffer to the status file. This ensures the file is written to disk properly (allowing it to be read by \cmd\CatchFileEdef). Not necessary on Windows, whose file writing is evidently more crude/immediate.
+ \ifwindows\else
+ \immediate\write18{%
+ touch #1\pstool@statusfile}%
+ \fi
+}
+\def\pstool@statusfile{pstool-statusfile.txt}
+
+% Read the exit status from the temporary file and delete it.
+% #1 is the path
+% Status is recorded in \cmd\pstool@status.
+\def\pstool@retrievestatus#1{%
+ \CatchFileEdef{\pstool@status}{#1\pstool@statusfile}{}%
+ \pstool@rm{#1}{\pstool@statusfile}%
+ \ifx\pstool@status\pstool@statusfail
+ \PackageWarning{pstool}{%
+ Status of process unable to be determined:^^J #1^^J%
+ Trying to proceed... }%
+ \def\pstool@status{0}%
+ \fi
+}
+\def\pstool@statusfail{\par }% what results when \TeX\ reads an empty file
+
+% Grab filename and filepath. Always need a relative path to a filename even if it's in the same directory.
+\def\pstool@getpaths#1{%
+ \filename@parse{#1}%
+ \ifx\filename@area\@empty
+ \def\pstool@path{./}%
+ \else
+ \let\pstool@path\filename@area
+ \fi
+ \let\pstool@filestub\filename@base
+}
+
+% The filename of the figure stripped of its path, if any:
+% (analogous to standard \cs{jobname})
+\def\pstool@jobname{\pstool@filestub\pstool@suffix}
+
+
+% \section{Command parsing}
+% User input is \cmd\pstool\ (with optional \texttt{*} or \texttt{!} suffix) which turns into one of the following three macros depending on the mode.
+
+\newcommand\pstool@alwaysprocess[3][]{%
+ \pstool@getpaths{#2}%
+ \pstool@process{#1}{#3}%
+}
+
+\ifpdf
+ \newcommand\pstool@neverprocess[3][]{%
+ \pstool@includegraphics{#2}%
+ }
+\else
+ \newcommand\pstool@neverprocess[3][]{%
+ \begingroup
+ \setkeys*{pstool.sty}{#1}%
+ #3%
+ \expandafter\pstool@includegraphics\expandafter[\XKV@rm]{#2}%
+ \endgroup
+ }
+\fi
+
+% Process the figure when:
+% -- the PDF file doesn't exist, or
+% -- the EPS is newer than the PDF, or
+% -- the TeX file is new than the PDF.
+\ExplSyntaxOn
+\newcommand\pstool@maybeprocess[3][]
+ {
+ \pstool_if_should_process:nTF {#2}
+ { \pstool@process{#1}{#3} }
+ { \pstool@includegraphics{#2} }
+ }
+
+\prg_set_conditional:Nnn \pstool_if_should_process:n {TF}
+ {
+ \pstool@getpaths{#1}
+
+ \file_if_exist:nF { #1.pdf }
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+
+ \filemodCmp {\pstool@path\pstool@filestub.eps}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \exp_args:Nx \clist_map_inline:nn { \pstool@macrofile , \pstool@tex }
+ % empty entries are ignored in clist mappings, so no need to filter here
+ {
+ \filemodCmp {##1} {\pstool@path\pstool@filestub.pdf}
+ {
+ \clist_map_break:n { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+ }
+ {}
+ }
+
+ \filemodCmp {\pstool@path\pstool@filestub.tex}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \use_i_delimit_by_q_stop:nw \prg_return_false:
+ \q_stop
+ }
+\ExplSyntaxOff
+
+% \section{User commands}
+% Finally, define \cmd\pstool\ as appropriate for the mode: (\texttt{all}, \texttt{none}, \texttt{auto}, respectively)
+\ifpdf
+ \newcommand\pstool{%
+ \ifcase\pstool@process@choice\relax
+ \expandafter \pstool@alwaysprocess \or
+ \expandafter \pstool@neverprocess \or
+ \expandafter \pstool@maybeprocess
+ \fi
+ }
+ \WithSuffix\def\pstool!{%
+ \ifcase\pstool@process@choice\relax
+ \expandafter \pstool@alwaysprocess \or
+ \expandafter \pstool@neverprocess \or
+ \expandafter \pstool@neverprocess
+ \fi
+ }
+ \WithSuffix\def\pstool*{%
+ \ifcase\pstool@process@choice\relax
+ \expandafter \pstool@alwaysprocess \or
+ \expandafter \pstool@neverprocess \or
+ \expandafter \pstool@alwaysprocess
+ \fi
+ }
+\else
+ \let\pstool\pstool@neverprocess
+ \WithSuffix\def\pstool!{\pstool@neverprocess}
+ \WithSuffix\def\pstool*{\pstool@neverprocess}
+\fi
+
+% \section{The figure processing}
+
+% And this is the main macro.
+\newcommand\pstool@process[2]{%
+ \begingroup
+ \setkeys*{pstool.sty}{#1}%
+ \pstool@echo@verbose{%
+ ^^J^^J=== pstool: begin processing ===}%
+ \pstool@write@processfile{#1}
+ {\pstool@path\pstool@filestub}{#2}%
+ \pstool@exe{auxiliary process: \pstool@filestub\space}
+ {./}{latex
+ -shell-escape
+ -output-format=dvi
+ -output-directory="\pstool@path"
+ -interaction=\pstool@mode\space
+ \pstool@latex@opts\space
+ "\pstool@jobname.tex"}%
+% Execute \texttt{dvips} in quiet mode if \texttt{latex} is not run in (non/error)stop mode:
+ \pstool@exe{dvips}{\pstool@path}{%
+ dvips \if@pstool@verbose@\else -q \fi -Ppdf
+ \pstool@dvips@opts\space "\pstool@jobname.dvi"}%
+% Pre-process \texttt{ps2pdf} options for Windows (sigh):
+ \pstool@pspdf@opts@preprocess \pstool@bitmap@opts
+ \pstool@pspdf@opts@preprocess \pstool@pspdf@opts
+% Generate the PDF:
+ \if@pstool@pdfcrop@
+ \pstool@exe{ps2pdf}{\pstool@path}{%
+ ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
+ "\pstool@jobname.ps" "\pstool@jobname.pdf"}%
+ \pstool@exe{pdfcrop}{\pstool@path}{%
+ pdfcrop \pstool@pdfcrop@opts\space
+ "\pstool@jobname.pdf" "\pstool@filestub.pdf"}%
+ \else
+ \pstool@exe{ps2pdf}{\pstool@path}{%
+ ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
+ "\pstool@jobname.ps" "\pstool@filestub.pdf"}%
+ \fi
+% Finish up: (implies success!)
+ \pstool@endprocess{%
+ \pstool@includegraphics{\pstool@path\pstool@filestub}%
+% Emulate \cs{include} (sort of) and have the main document load the auxiliary aux file, in a manner of speaking:
+ \pstool@write@aux
+ \pstool@cleanup
+ }%
+ \pstool@echo@verbose{^^J=== pstool: end processing ===^^J}%
+ \endgroup
+}
+
+\newcommand\pstool@write@aux{%
+ \endlinechar=-1
+ \@tempswatrue
+ \@pstool@write@auxfalse
+ \in@false
+ \openin \pstool@auxfile@ior "\pstool@path\pstool@jobname.aux"\relax
+ \@whilesw \if@tempswa \fi {%
+ \readline \pstool@auxfile@ior to \@tempa
+ \ifeof \pstool@auxfile@ior
+ \@tempswafalse
+ \else
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text/}}%
+ \ifx\@tempa\@tempb
+ \@tempswafalse
+ \else
+ \if@pstool@write@aux
+ \immediate\write\@mainaux{\unexpanded\expandafter{\@tempa}}%
+ \fi
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text*}}%
+ \ifx\@tempa\@tempb
+ \@pstool@write@auxtrue
+ \fi
+ \fi
+ \fi
+ }
+ \closein \pstool@auxfile@ior
+}
+
+\ExplSyntaxOn
+\cs_new:Npn \pstool@pspdf@opts@preprocess #1
+ {
+ \ifwindows
+ \exp_args:NNnx \tl_replace_all:Nnn #1 {=} { \cs_to_str:N \# }
+ \fi
+ }
+\ExplSyntaxOff
+
+% For what's coming next.
+\edef\@begindocument@str{\detokenize\expandafter{\string\begin{document}}}
+\edef\@endpreamble@str{\string\EndPreamble}
+\def\in@first#1#2{\in@{NEVEROCCUR!#1}{NEVEROCCUR!#2}}
+
+% We need to cache the aux file, so here goes.
+% This is because the aux file is cleared for writing after \cs{begin{document}}.
+\ifpdf
+ \pstool@rm{}{\jobname.oldaux}
+ \pstool@cp{}{\jobname.aux}{\jobname.oldaux}
+ \AtEndDocument{\pstool@rm{}{\jobname.oldaux}}
+\fi
+
+\edef\pstool@auxmarker#1{\string\@percentchar\space <#1PSTOOLLABELS>}
+\edef\pstool@auxmarker@text#1{\@percentchar <#1PSTOOLLABELS>}
+
+% The file that is written for processing is set up to read the preamble of the original document and set the graphic on an empty page (cropping to size is done either here with \pkg{preview} or later with \pkg{pdfcrop}).
+\def\pstool@write@processfile#1#2#3{%
+ \immediate\openout\pstool@out #2\pstool@suffix.tex\relax
+% Put down a label so we can pass through the current page number:
+ \edef\pstool@label{pstool-\pstool@path\pstool@filestub}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{\pstool@label}{{\@currentlabel}{\the\c@page}}}%
+% And copy the main file's bbl file too: (necessary only for biblatex but do it always)
+ \pstool@rm{\pstool@path}{\pstool@jobname.bbl}%
+ \pstool@cp{}{\jobname.bbl}{\pstool@path\pstool@jobname.bbl}%
+% Scan the main document line by line; print preamble into auxiliary file until the document begins or \cs{EndPreamble} is found:
+ \endlinechar=-1
+ \def\@tempa{\pdfoutput=0\relax}%
+ \in@false
+ \openin\pstool@mainfile@ior "\jobname"\relax
+ \@whilesw \unless\ifin@ \fi {%
+ \immediate\write\pstool@out{\unexpanded\expandafter{\@tempa}}%
+ \readline\pstool@mainfile@ior to\@tempa
+ \let\@tempc\@tempa
+ \trim@multiple@spaces@in\@tempa
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@begindocument@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \unless\ifin@
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@endpreamble@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \fi
+ }
+ \closein\pstool@mainfile@ior
+% Now the preamble of the process file:
+ \immediate\write\pstool@out{%
+ \if@pstool@pdfcrop@\else
+ \noexpand\usepackage[active,tightpage]{preview}^^J%
+ \fi
+ \unexpanded{%
+ \pagestyle{empty}^^J^^J% remove the page number
+ }%
+ \noexpand\makeatletter^^J%
+% Sort out the page numbering here.
+% Force the pagestyle locally to output an integer so it can be written to the external file inside a \cs{setcounter} command.
+ \expandafter\ifx\csname r@\pstool@label\endcsname\relax\else
+ \def\noexpand\thepage{\unexpanded\expandafter{\thepage}}^^J%
+ \noexpand\setcounter{page}{%
+ \expandafter\expandafter\expandafter
+ \@secondoftwo\csname r@\pstool@label\endcsname
+ }^^J%
+ \fi
+% And the document body to place the graphic on a page of its own:
+ \noexpand\@input{\jobname.oldaux}^^J%
+ \noexpand\makeatother^^J^^J%
+ \noexpand\begin{document}^^J%
+ \noexpand\makeatletter^^J%
+ \unexpanded{\immediate\write\@mainaux}{\pstool@auxmarker*}^^J%
+ \noexpand\makeatother^^J^^J%
+ \unexpanded{%
+ \centering\null\vfill^^J%
+ }%
+ ^^J%
+ \if@pstool@pdfcrop@\else
+ \noexpand\begin{preview}^^J%
+ \fi
+ \unexpanded{#3^^J}
+ \noexpand\includegraphics
+ [\unexpanded\expandafter{\XKV@rm}]
+ {\pstool@filestub}^^J%
+ \if@pstool@pdfcrop@\else
+ \noexpand\end{preview}^^J%
+ \fi
+ ^^J%
+ \unexpanded{\vfill^^J^^J\makeatletter^^J\immediate\write\@mainaux}{\pstool@auxmarker/}^^J%
+ \unexpanded{\makeatother^^J\end{document}}^^J%
+ }%
+ \immediate\closeout\pstool@out
+}
+
+\def\pstool@cleanup{%
+ \@for\@ii:=\pstool@rm@files\do{%
+ \pstool@rm{\pstool@path}{\pstool@jobname\@ii}%
+ }%
+}
+
+\providecommand\EndPreamble{}
+
+% \section{User commands}
+% These all support the suffixes \texttt{*} and \texttt{!}, so each user command is defined as a wrapper to \cmd\pstool.
+
+% For EPS figures with psfrag:
+\newcommand\psfragfig[2][]{\pstool@psfragfig{#1}{#2}{}}
+\WithSuffix\newcommand\psfragfig*[2][]{%
+ \pstool@psfragfig{#1}{#2}{*}%
+}
+\WithSuffix\newcommand\psfragfig![2][]{%
+ \pstool@psfragfig{#1}{#2}{!}%
+}
+
+% Parse optional input definitions:
+\newcommand\pstool@psfragfig[3]{%
+ \@ifnextchar\bgroup{%
+ \pstool@@psfragfig{#1}{#2}{#3}%
+ }{%
+ \pstool@@psfragfig{#1}{#2}{#3}{}%
+ }%
+}
+
+% Search for both `filename' and `filename'-psfrag inputs.
+%
+% #1: possible graphicx options
+% #2: graphic name (possibly with path)
+% #3: \cs{pstool} suffix (i.e., \texttt{!} or \texttt{*} or `empty')
+% #4: possible \pkg{psfrag} (or other) macros
+\newcommand\pstool@@psfragfig[4]{%
+ % Find the .eps file to use.
+ \IfFileExists{#2-psfrag.eps}{%
+ \edef\pstool@eps{#2-psfrag}%
+ \IfFileExists{#2.eps}{%
+ \PackageWarning{pstool}{%
+ Graphic "#2.eps" exists but "#2-psfrag.eps" is being used%
+ }%
+ }{}%
+ }{%
+ \IfFileExists{#2.eps}{%
+ \edef\pstool@eps{#2}%
+ }{%
+ \PackageError{pstool}{%
+ No graphic "#2.eps" or "#2-psfrag.eps" found%
+ }{%
+ Check the path and whether the file exists.%
+ }%
+ }%
+ }%
+ % Find the .tex file to use.
+ \IfFileExists{#2-psfrag.tex}{%
+ \edef\pstool@tex{#2-psfrag.tex}%
+ \IfFileExists{#2.tex}{%
+ \PackageWarning{pstool}{%
+ File "#2.tex" exists that may contain macros
+ for "\pstool@eps.eps"^^J%
+ But file "#2-psfrag.tex" is being used instead.%
+ }%
+ }{}%
+ }{%
+ \IfFileExists{#2.tex}{%
+ \edef\pstool@tex{#2.tex}%
+ }{%
+ \PackageWarning{pstool}{%
+ No file "#2.tex" or "#2-psfrag.tex" can be found
+ that may contain macros for "\pstool@eps.eps"%
+ }%
+ }%
+ }%
+ % Perform the actual processing step, skipping it entirely if an EPS file hasn't been found.
+ % (In which case an error would have been called above; this is to clean up nicely in scrollmode, for example.)
+ \ifx\pstool@eps\@undefined\else
+ \edef\@tempa{%
+ \unexpanded{\pstool#3[#1]}{\pstool@eps}{%
+ \ifx\pstool@macrofile\@empty\else
+ \unexpanded{\csname @input\endcsname}{\pstool@macrofile}%
+ \fi
+ \ifx\pstool@tex\@empty\else
+ \unexpanded{\csname @input\endcsname}{\pstool@tex}%
+ \fi
+ \unexpanded{#4}%
+ }%
+ }\@tempa
+ \fi
+}
+% \centerline{\itshape ---The End---}
diff --git a/tex/.texmf/tex/latex/misc/pstool.tex b/tex/.texmf/tex/latex/misc/pstool.tex
new file mode 100644
index 0000000..3799d3a
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/pstool.tex
@@ -0,0 +1,1184 @@
+\RequirePackage{filecontents}
+\begin{filecontents*}{README.txt}
+__________________
+The pstool package
+
+A package like "pst-pdf" for processing PostScript graphics
+with psfrag labels within pdfLaTeX documents. The difference
+with this package is that every graphic is compiled individually,
+drastically speeding up compilation time when only a single
+figure needs re-processing.
+
+Running `latex` on pstool.tex will produce the files
+ pstool.ins, pstool.sty, and README.txt,
+and compile the PDF documentation.
+
+Executing `latex pstool.ins` produces the files above
+except pstool.ins (and the PDF file, obviously).
+
+Please see the PDF documentation for further information.
+
+Will Robertson & Zebb Prime
+Copyright 2008-2014
+Distributed under the LaTeX Project Public License, "maintained" by Will Robertson.
+
+____________________
+Brief change history
+
+v1.5c
+ - Documentation update; some minor cosmetic code changes.
+
+v1.5b
+ - Fix conflict with beamer, which resets the catcode of @ with \begin{document}.
+
+v1.5a, March 2013:
+ - Fix bug introduced in last version in which plain LaTeX compilation
+ (producing DVI) produced erroneous output above each figure.
+
+v1.5, February 2013:
+ - Fix =/# mixup in Windows ps2pdf options.
+ - Check the .tex file for newness when regenerating figures.
+ - Add [macro-file=...] for a global file to retrieve psfrag macros
+ (default is "\jobname-pstool.tex").
+ Thanks to Heinrich Kruger for suggestions for the above.
+ - Cross-references and citations within external graphics are now supported.
+
+v1.4, November 2010:
+ - More robust parsing of the main input file to read in the preamble.
+ Therefore, \EndPreamble is now required much less often.
+ - Apparently unreleased to CTAN, oops :)
+
+v1.3, July 2009:
+ - [bitmap] option to control compression of bitmap graphics,
+ - Package options may now be set anywhere with \pstoolsetup{},
+ - localised pstool options can be set per-graphic.
+
+\end{filecontents*}
+
+
+
+
+\begin{filecontents*}{pstool.sty}
+% TODO: convert this package into expl3 syntax (will save many lines of code).
+
+\ProvidesPackage{pstool}[2014/05/11 v1.5c
+ Wrapper for processing PostScript/psfrag figures]
+
+% External packages:
+\RequirePackage{
+ catchfile,color,ifpdf,ifplatform,filemod,
+ graphicx,psfrag,suffix,trimspaces,xkeyval,expl3
+}
+
+% Add an additional command before trimspaces.sty is updated formally:
+\providecommand*{\trim@multiple@spaces@in}[1]{%
+ \let\trim@temp#1%
+ \trim@spaces@in#1%
+ \ifx\trim@temp#1%
+ \else
+ \expandafter\trim@multiple@spaces@in\expandafter#1%
+ \fi
+}
+
+% \subsection{Allocations}
+\expandafter\newif\csname if@pstool@pdfcrop@\endcsname
+\expandafter\newif\csname if@pstool@verbose@\endcsname
+\expandafter\newif\csname if@pstool@write@aux\endcsname
+
+\newwrite\pstool@out
+\newread\pstool@mainfile@ior
+\newread\pstool@auxfile@ior
+
+% Macro used to store the name of the graphic's macro file:
+\let\pstool@tex\@empty
+
+% \subsection{Package options}
+
+\define@choicekey*{pstool.sty}{crop}
+ [\@tempa\@tempb]{preview,pdfcrop}{%
+ \ifcase\@tempb\relax
+ \@pstool@pdfcrop@false
+ \or
+ \@pstool@pdfcrop@true
+ \or
+ \fi
+}
+
+\define@choicekey*{pstool.sty}{process}
+ [\@tempa\pstool@process@choice]{all,none,auto}{}
+\ExecuteOptionsX{process=auto}
+
+\define@choicekey*{pstool.sty}{mode}
+ [\@tempa\@tempb]{errorstop,nonstop,batch}{%
+ \ifnum\@tempb=2\relax
+ \@pstool@verbose@false
+ \else
+ \@pstool@verbose@true
+ \fi
+ \edef\pstool@mode{\@tempa mode}%
+}
+\ExecuteOptionsX{mode=batch}
+
+\DeclareOptionX{cleanup}{%
+ \edef\pstool@rm@files{\zap@space #1 \@empty}%
+ \@for\@ii:=\pstool@rm@files\do{%
+ \edef\@tempa{\@ii}%
+ \def\@tempb{.aux}%
+ \ifx\@tempa\@tempb
+ \PackageWarning{pstool}{^^J\space\space%
+ You have requested that ".aux" files be deleted.^^J\space\space
+ Cross-referencing within pstool graphics therefore disabled.^^J%
+ This warning occurred}
+ \fi
+ }
+}
+\ExecuteOptionsX{cleanup={.tex,.dvi,.ps,.pdf,.log}}
+
+\DeclareOptionX{suffix}{\def\pstool@suffix{#1}}
+\ExecuteOptionsX{suffix={-pstool}}
+
+% There is an implicit \cs{space} after the bitmap options.
+\define@choicekey*{pstool.sty}{bitmap}
+ [\@tempa\@tempb]{auto,lossless,lossy}{%
+ \ifcase\@tempb
+ \let\pstool@bitmap@opts\@empty
+ \or
+ \def\pstool@bitmap@opts{%
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/FlateEncode
+ -dGrayImageFilter=/FlateEncode % space
+ }
+ \or
+ \def\pstool@bitmap@opts{%
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+ -dColorImageFilter=/DCTEncode
+ -dGrayImageFilter=/DCTEncode % space
+ }
+ \fi
+}
+\ExecuteOptionsX{bitmap=lossless}
+
+\DeclareOptionX{latex-options}{\def\pstool@latex@opts{#1}}
+\DeclareOptionX{dvips-options}{\def\pstool@dvips@opts{#1}}
+\DeclareOptionX{ps2pdf-options}{\def\pstool@pspdf@opts{#1}}
+\DeclareOptionX{pdfcrop-options}{\def\pstool@pdfcrop@opts{#1}}
+
+\ExecuteOptionsX{
+ latex-options={},
+ dvips-options={},
+ ps2pdf-options={-dPDFSETTINGS=/prepress},
+ pdfcrop-options={}
+}
+
+\DeclareOptionX{macro-file}{%
+ \IfFileExists{#1}
+ {\def\pstool@macrofile{#1}}
+ {%
+ \let\pstool@macrofile\@empty
+ \PackageError{pstool}{^^J\space\space%
+ No file `#1' found for "macro-file" package option.^^J
+ This warning occurred}
+ }
+}
+
+% Default:
+\IfFileExists{\jobname-pstool.tex}
+ {\edef\pstool@macrofile{\jobname-pstool.tex}}
+ {\let\pstool@macrofile\@empty}
+
+
+\ifpdf
+ \ifshellescape\else
+ \ExecuteOptionsX{process=none}
+ \PackageWarning{pstool}{^^J\space\space%
+ Package option [process=none] activated^^J\space\space
+ because -shell-escape is not enabled.^^J%
+ This warning occurred}
+ \fi
+\fi
+
+\ProcessOptionsX
+
+% A command to set \pkg{pstool} options after the package is loaded.
+\newcommand\pstoolsetup{%
+ \setkeys{pstool.sty}%
+}
+
+% \section{Macros}
+% Used to echo information to the console output.
+% Can't use \cs{typeout} because it's asynchronous with
+% any \cs{immediate}\cs{write18} processes (for some reason).
+\def\pstool@echo#1{%
+ \if@pstool@verbose@
+ \pstool@echo@verbose{#1}%
+ \fi
+}
+
+\def\pstool@echo@verbose#1{%
+ \immediate\write18{echo "#1"}%
+}
+
+\let\pstool@includegraphics\includegraphics
+
+% Command line abstractions between platforms:
+\edef\pstool@cmdsep{\ifwindows\string&\else\string;\fi\space}
+\edef\pstool@rm@cmd{\ifwindows del \else rm -- \fi}
+\edef\pstool@cp@cmd{\ifwindows copy \else cp -- \fi}
+
+% Delete a file if it exists:
+% #1: path
+% #2: filename
+\newcommand\pstool@rm[2]{%
+ \IfFileExists{#1#2}{%
+ \immediate\write18{%
+ cd "#1"\pstool@cmdsep\pstool@rm@cmd "#2"
+ }%
+ }{}%
+}
+
+% Copy a file if it exists:
+% #1: path
+% #2: filename
+% #3: new filename
+\newcommand\pstool@cp[3]{%
+ \IfFileExists{#1#2}{%
+ \immediate\write18{%
+ cd "#1"\pstool@cmdsep\pstool@cp@cmd "#2" "#3"
+ }%
+ }{}%
+}
+
+% Generic function to execute a command on the shell and pass its exit status back into \LaTeX. Any number of \cmd\pstool@exe\ statements can be made consecutively followed by \cmd\pstool@endprocess, which also takes an argument. If \emph{any} of the shell calls failed, then the execution immediately skips to the end and expands \cmd\pstool@error\ instead of the argument to \cmd\pstool@endprocess.
+% #1: `name' of process
+% #2: relative path where to execute the command
+% #3: the command itself
+\newcommand\pstool@exe[3]{%
+ \pstool@echo{^^J=== pstool: #1 ===}%
+ \pstool@shellexecute{#2}{#3}%
+ \pstool@retrievestatus{#2}%
+ \ifnum\pstool@status > \z@
+ \PackageWarning{pstool}{%
+ Execution failed during process:^^J\space\space
+ #3^^JThis warning occurred%
+ }%
+ \expandafter\pstool@abort
+ \fi
+}
+
+% Edit this definition to print something else when graphic processing fails.
+\def\pstool@error{%
+ \fbox{%
+ \parbox{0.8\linewidth}{%
+ \color{red}\centering\ttfamily\scshape\small
+ An error occured processing graphic:\\
+ \upshape`%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}.eps%
+ '\\\bigskip
+ \tiny
+ Check the log file for compilation errors:\\
+ `%
+ \detokenize\expandafter{\pstool@path}%
+ \detokenize\expandafter{\pstool@filestub}-pstool.log%
+ '\\
+ }%
+ }%
+}
+
+\def\pstool@abort#1\pstool@endprocess{\pstool@error\@gobble}
+\let\pstool@endprocess\@firstofone
+
+% It is necessary while executing commands on the shell to write the exit status to a temporary file to test for failures in processing. (If all versions of \texttt{pdflatex} supported input pipes, things might be different.)
+\def\pstool@shellexecute#1#2{%
+ \immediate\write18{%
+ cd "#1" \pstool@cmdsep
+ #2 \pstool@cmdsep
+ \ifwindows
+ call echo
+ \string^\@percentchar ERRORLEVEL\string^\@percentchar
+ \else
+ echo \detokenize{$?}
+ \fi
+ > \pstool@statusfile}%
+% That's the execution; now we need to flush the write buffer to the status file. This ensures the file is written to disk properly (allowing it to be read by \cmd\CatchFileEdef). Not necessary on Windows, whose file writing is evidently more crude/immediate.
+ \ifwindows\else
+ \immediate\write18{%
+ touch #1\pstool@statusfile}%
+ \fi
+}
+\def\pstool@statusfile{pstool-statusfile.txt}
+
+% Read the exit status from the temporary file and delete it.
+% #1 is the path
+% Status is recorded in \cmd\pstool@status.
+\def\pstool@retrievestatus#1{%
+ \CatchFileEdef{\pstool@status}{#1\pstool@statusfile}{}%
+ \pstool@rm{#1}{\pstool@statusfile}%
+ \ifx\pstool@status\pstool@statusfail
+ \PackageWarning{pstool}{%
+ Status of process unable to be determined:^^J #1^^J%
+ Trying to proceed... }%
+ \def\pstool@status{0}%
+ \fi
+}
+\def\pstool@statusfail{\par }% what results when \TeX\ reads an empty file
+
+% Grab filename and filepath. Always need a relative path to a filename even if it's in the same directory.
+\def\pstool@getpaths#1{%
+ \filename@parse{#1}%
+ \ifx\filename@area\@empty
+ \def\pstool@path{./}%
+ \else
+ \let\pstool@path\filename@area
+ \fi
+ \let\pstool@filestub\filename@base
+}
+
+% The filename of the figure stripped of its path, if any:
+% (analogous to standard \cs{jobname})
+\def\pstool@jobname{\pstool@filestub\pstool@suffix}
+
+
+% \section{Command parsing}
+% User input is \cmd\pstool\ (with optional \texttt{*} or \texttt{!} suffix) which turns into one of the following three macros depending on the mode.
+
+\newcommand\pstool@alwaysprocess[3][]{%
+ \pstool@getpaths{#2}%
+ \pstool@process{#1}{#3}%
+}
+
+\ifpdf
+ \newcommand\pstool@neverprocess[3][]{%
+ \pstool@includegraphics{#2}%
+ }
+\else
+ \newcommand\pstool@neverprocess[3][]{%
+ \begingroup
+ \setkeys*{pstool.sty}{#1}%
+ #3%
+ \expandafter\pstool@includegraphics\expandafter[\XKV@rm]{#2}%
+ \endgroup
+ }
+\fi
+
+% Process the figure when:
+% -- the PDF file doesn't exist, or
+% -- the EPS is newer than the PDF, or
+% -- the TeX file is new than the PDF.
+\ExplSyntaxOn
+\newcommand\pstool@maybeprocess[3][]
+ {
+ \pstool_if_should_process:nTF {#2}
+ { \pstool@process{#1}{#3} }
+ { \pstool@includegraphics{#2} }
+ }
+
+\prg_set_conditional:Nnn \pstool_if_should_process:n {TF}
+ {
+ \pstool@getpaths{#1}
+
+ \file_if_exist:nF { #1.pdf }
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+
+ \filemodCmp {\pstool@path\pstool@filestub.eps}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \exp_args:Nx \clist_map_inline:nn { \pstool@macrofile , \pstool@tex }
+ % empty entries are ignored in clist mappings, so no need to filter here
+ {
+ \filemodCmp {##1} {\pstool@path\pstool@filestub.pdf}
+ {
+ \clist_map_break:n { \use_i_delimit_by_q_stop:nw \prg_return_true: }
+ }
+ {}
+ }
+
+ \filemodCmp {\pstool@path\pstool@filestub.tex}
+ {\pstool@path\pstool@filestub.pdf}
+ { \use_i_delimit_by_q_stop:nw \prg_return_true: } {}
+
+ \use_i_delimit_by_q_stop:nw \prg_return_false:
+ \q_stop
+ }
+\ExplSyntaxOff
+
+% \section{User commands}
+% Finally, define \cmd\pstool\ as appropriate for the mode: (\texttt{all}, \texttt{none}, \texttt{auto}, respectively)
+\ifpdf
+ \newcommand\pstool{%
+ \ifcase\pstool@process@choice\relax
+ \expandafter \pstool@alwaysprocess \or
+ \expandafter \pstool@neverprocess \or
+ \expandafter \pstool@maybeprocess
+ \fi
+ }
+ \WithSuffix\def\pstool!{%
+ \ifcase\pstool@process@choice\relax
+ \expandafter \pstool@alwaysprocess \or
+ \expandafter \pstool@neverprocess \or
+ \expandafter \pstool@neverprocess
+ \fi
+ }
+ \WithSuffix\def\pstool*{%
+ \ifcase\pstool@process@choice\relax
+ \expandafter \pstool@alwaysprocess \or
+ \expandafter \pstool@neverprocess \or
+ \expandafter \pstool@alwaysprocess
+ \fi
+ }
+\else
+ \let\pstool\pstool@neverprocess
+ \WithSuffix\def\pstool!{\pstool@neverprocess}
+ \WithSuffix\def\pstool*{\pstool@neverprocess}
+\fi
+
+% \section{The figure processing}
+
+% And this is the main macro.
+\newcommand\pstool@process[2]{%
+ \begingroup
+ \setkeys*{pstool.sty}{#1}%
+ \pstool@echo@verbose{%
+ ^^J^^J=== pstool: begin processing ===}%
+ \pstool@write@processfile{#1}
+ {\pstool@path\pstool@filestub}{#2}%
+ \pstool@exe{auxiliary process: \pstool@filestub\space}
+ {./}{latex
+ -shell-escape
+ -output-format=dvi
+ -output-directory="\pstool@path"
+ -interaction=\pstool@mode\space
+ \pstool@latex@opts\space
+ "\pstool@jobname.tex"}%
+% Execute \texttt{dvips} in quiet mode if \texttt{latex} is not run in (non/error)stop mode:
+ \pstool@exe{dvips}{\pstool@path}{%
+ dvips \if@pstool@verbose@\else -q \fi -Ppdf
+ \pstool@dvips@opts\space "\pstool@jobname.dvi"}%
+% Pre-process \texttt{ps2pdf} options for Windows (sigh):
+ \pstool@pspdf@opts@preprocess \pstool@bitmap@opts
+ \pstool@pspdf@opts@preprocess \pstool@pspdf@opts
+% Generate the PDF:
+ \if@pstool@pdfcrop@
+ \pstool@exe{ps2pdf}{\pstool@path}{%
+ ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
+ "\pstool@jobname.ps" "\pstool@jobname.pdf"}%
+ \pstool@exe{pdfcrop}{\pstool@path}{%
+ pdfcrop \pstool@pdfcrop@opts\space
+ "\pstool@jobname.pdf" "\pstool@filestub.pdf"}%
+ \else
+ \pstool@exe{ps2pdf}{\pstool@path}{%
+ ps2pdf \pstool@bitmap@opts \pstool@pspdf@opts \space
+ "\pstool@jobname.ps" "\pstool@filestub.pdf"}%
+ \fi
+% Finish up: (implies success!)
+ \pstool@endprocess{%
+ \pstool@includegraphics{\pstool@path\pstool@filestub}%
+% Emulate \cs{include} (sort of) and have the main document load the auxiliary aux file, in a manner of speaking:
+ \pstool@write@aux
+ \pstool@cleanup
+ }%
+ \pstool@echo@verbose{^^J=== pstool: end processing ===^^J}%
+ \endgroup
+}
+
+\newcommand\pstool@write@aux{%
+ \endlinechar=-1
+ \@tempswatrue
+ \@pstool@write@auxfalse
+ \in@false
+ \openin \pstool@auxfile@ior "\pstool@path\pstool@jobname.aux"\relax
+ \@whilesw \if@tempswa \fi {%
+ \readline \pstool@auxfile@ior to \@tempa
+ \ifeof \pstool@auxfile@ior
+ \@tempswafalse
+ \else
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text/}}%
+ \ifx\@tempa\@tempb
+ \@tempswafalse
+ \else
+ \if@pstool@write@aux
+ \immediate\write\@mainaux{\unexpanded\expandafter{\@tempa}}%
+ \fi
+ \edef\@tempb{\detokenize\expandafter{\pstool@auxmarker@text*}}%
+ \ifx\@tempa\@tempb
+ \@pstool@write@auxtrue
+ \fi
+ \fi
+ \fi
+ }
+ \closein \pstool@auxfile@ior
+}
+
+\ExplSyntaxOn
+\cs_new:Npn \pstool@pspdf@opts@preprocess #1
+ {
+ \ifwindows
+ \exp_args:NNnx \tl_replace_all:Nnn #1 {=} { \cs_to_str:N \# }
+ \fi
+ }
+\ExplSyntaxOff
+
+% For what's coming next.
+\edef\@begindocument@str{\detokenize\expandafter{\string\begin{document}}}
+\edef\@endpreamble@str{\string\EndPreamble}
+\def\in@first#1#2{\in@{NEVEROCCUR!#1}{NEVEROCCUR!#2}}
+
+% We need to cache the aux file, so here goes.
+% This is because the aux file is cleared for writing after \cs{begin{document}}.
+\ifpdf
+ \pstool@rm{}{\jobname.oldaux}
+ \pstool@cp{}{\jobname.aux}{\jobname.oldaux}
+ \AtEndDocument{\pstool@rm{}{\jobname.oldaux}}
+\fi
+
+\edef\pstool@auxmarker#1{\string\@percentchar\space <#1PSTOOLLABELS>}
+\edef\pstool@auxmarker@text#1{\@percentchar <#1PSTOOLLABELS>}
+
+% The file that is written for processing is set up to read the preamble of the original document and set the graphic on an empty page (cropping to size is done either here with \pkg{preview} or later with \pkg{pdfcrop}).
+\def\pstool@write@processfile#1#2#3{%
+ \immediate\openout\pstool@out #2\pstool@suffix.tex\relax
+% Put down a label so we can pass through the current page number:
+ \edef\pstool@label{pstool-\pstool@path\pstool@filestub}%
+ \protected@write\@auxout{}%
+ {\string\newlabel{\pstool@label}{{\@currentlabel}{\the\c@page}}}%
+% And copy the main file's bbl file too: (necessary only for biblatex but do it always)
+ \pstool@rm{\pstool@path}{\pstool@jobname.bbl}%
+ \pstool@cp{}{\jobname.bbl}{\pstool@path\pstool@jobname.bbl}%
+% Scan the main document line by line; print preamble into auxiliary file until the document begins or \cs{EndPreamble} is found:
+ \endlinechar=-1
+ \def\@tempa{\pdfoutput=0\relax}%
+ \in@false
+ \openin\pstool@mainfile@ior "\jobname"\relax
+ \@whilesw \unless\ifin@ \fi {%
+ \immediate\write\pstool@out{\unexpanded\expandafter{\@tempa}}%
+ \readline\pstool@mainfile@ior to\@tempa
+ \let\@tempc\@tempa
+ \trim@multiple@spaces@in\@tempa
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@begindocument@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \unless\ifin@
+ \expandafter\expandafter\expandafter\in@first
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@endpreamble@str
+ \expandafter}%
+ \expandafter{\@tempa}%
+ \fi
+ }
+ \closein\pstool@mainfile@ior
+% Now the preamble of the process file:
+ \immediate\write\pstool@out{%
+ \if@pstool@pdfcrop@\else
+ \noexpand\usepackage[active,tightpage]{preview}^^J%
+ \fi
+ \unexpanded{%
+ \pagestyle{empty}^^J^^J% remove the page number
+ }%
+ \noexpand\makeatletter^^J%
+% Sort out the page numbering here.
+% Force the pagestyle locally to output an integer so it can be written to the external file inside a \cs{setcounter} command.
+ \expandafter\ifx\csname r@\pstool@label\endcsname\relax\else
+ \def\noexpand\thepage{\unexpanded\expandafter{\thepage}}^^J%
+ \noexpand\setcounter{page}{%
+ \expandafter\expandafter\expandafter
+ \@secondoftwo\csname r@\pstool@label\endcsname
+ }^^J%
+ \fi
+% And the document body to place the graphic on a page of its own:
+ \noexpand\@input{\jobname.oldaux}^^J%
+ \noexpand\makeatother^^J^^J%
+ \noexpand\begin{document}^^J%
+ \noexpand\makeatletter^^J%
+ \unexpanded{\immediate\write\@mainaux}{\pstool@auxmarker*}^^J%
+ \noexpand\makeatother^^J^^J%
+ \unexpanded{%
+ \centering\null\vfill^^J%
+ }%
+ ^^J%
+ \if@pstool@pdfcrop@\else
+ \noexpand\begin{preview}^^J%
+ \fi
+ \unexpanded{#3^^J}
+ \noexpand\includegraphics
+ [\unexpanded\expandafter{\XKV@rm}]
+ {\pstool@filestub}^^J%
+ \if@pstool@pdfcrop@\else
+ \noexpand\end{preview}^^J%
+ \fi
+ ^^J%
+ \unexpanded{\vfill^^J^^J\makeatletter^^J\immediate\write\@mainaux}{\pstool@auxmarker/}^^J%
+ \unexpanded{\makeatother^^J\end{document}}^^J%
+ }%
+ \immediate\closeout\pstool@out
+}
+
+\def\pstool@cleanup{%
+ \@for\@ii:=\pstool@rm@files\do{%
+ \pstool@rm{\pstool@path}{\pstool@jobname\@ii}%
+ }%
+}
+
+\providecommand\EndPreamble{}
+
+% \section{User commands}
+% These all support the suffixes \texttt{*} and \texttt{!}, so each user command is defined as a wrapper to \cmd\pstool.
+
+% For EPS figures with psfrag:
+\newcommand\psfragfig[2][]{\pstool@psfragfig{#1}{#2}{}}
+\WithSuffix\newcommand\psfragfig*[2][]{%
+ \pstool@psfragfig{#1}{#2}{*}%
+}
+\WithSuffix\newcommand\psfragfig![2][]{%
+ \pstool@psfragfig{#1}{#2}{!}%
+}
+
+% Parse optional input definitions:
+\newcommand\pstool@psfragfig[3]{%
+ \@ifnextchar\bgroup{%
+ \pstool@@psfragfig{#1}{#2}{#3}%
+ }{%
+ \pstool@@psfragfig{#1}{#2}{#3}{}%
+ }%
+}
+
+% Search for both `filename' and `filename'-psfrag inputs.
+%
+% #1: possible graphicx options
+% #2: graphic name (possibly with path)
+% #3: \cs{pstool} suffix (i.e., \texttt{!} or \texttt{*} or `empty')
+% #4: possible \pkg{psfrag} (or other) macros
+\newcommand\pstool@@psfragfig[4]{%
+ % Find the .eps file to use.
+ \IfFileExists{#2-psfrag.eps}{%
+ \edef\pstool@eps{#2-psfrag}%
+ \IfFileExists{#2.eps}{%
+ \PackageWarning{pstool}{%
+ Graphic "#2.eps" exists but "#2-psfrag.eps" is being used%
+ }%
+ }{}%
+ }{%
+ \IfFileExists{#2.eps}{%
+ \edef\pstool@eps{#2}%
+ }{%
+ \PackageError{pstool}{%
+ No graphic "#2.eps" or "#2-psfrag.eps" found%
+ }{%
+ Check the path and whether the file exists.%
+ }%
+ }%
+ }%
+ % Find the .tex file to use.
+ \IfFileExists{#2-psfrag.tex}{%
+ \edef\pstool@tex{#2-psfrag.tex}%
+ \IfFileExists{#2.tex}{%
+ \PackageWarning{pstool}{%
+ File "#2.tex" exists that may contain macros
+ for "\pstool@eps.eps"^^J%
+ But file "#2-psfrag.tex" is being used instead.%
+ }%
+ }{}%
+ }{%
+ \IfFileExists{#2.tex}{%
+ \edef\pstool@tex{#2.tex}%
+ }{%
+ \PackageWarning{pstool}{%
+ No file "#2.tex" or "#2-psfrag.tex" can be found
+ that may contain macros for "\pstool@eps.eps"%
+ }%
+ }%
+ }%
+ % Perform the actual processing step, skipping it entirely if an EPS file hasn't been found.
+ % (In which case an error would have been called above; this is to clean up nicely in scrollmode, for example.)
+ \ifx\pstool@eps\@undefined\else
+ \edef\@tempa{%
+ \unexpanded{\pstool#3[#1]}{\pstool@eps}{%
+ \ifx\pstool@macrofile\@empty\else
+ \unexpanded{\csname @input\endcsname}{\pstool@macrofile}%
+ \fi
+ \ifx\pstool@tex\@empty\else
+ \unexpanded{\csname @input\endcsname}{\pstool@tex}%
+ \fi
+ \unexpanded{#4}%
+ }%
+ }\@tempa
+ \fi
+}
+% \centerline{\itshape ---The End---}
+\end{filecontents*}
+%%%%%%%%%1%%%%%%%%%2%%%%%%%%%3%%%%%%%%%4%%%%%%%%%5
+
+
+
+
+% Conditionally compile the documentation & generate the .ins file:
+\providecommand\pstoolCompile{Y}
+\if\pstoolCompile N
+ \expandafter\endinput
+\fi
+
+
+\begin{filecontents*}{pstool.ins}
+%&latex
+\def\pstoolCompile{N}
+\input pstool.tex
+\csname @@end\endcsname
+\end{filecontents*}
+
+
+
+
+\makeatletter
+\documentclass{ltxdoc}
+\usepackage[rm,medium]{titlesec}
+
+\usepackage{xcolor}
+\usepackage[colorlinks,linktocpage]{hyperref}
+%\usepackage{gmdoc}
+%\usepackage{gmverb}
+%\dekclubs
+%\stanzaskip=\bigskipamount
+%\CodeSpacesGrey
+
+\usepackage{enumitem}
+\setlist{noitemsep}
+
+\usepackage{tocloft,varwidth}
+\setcounter{tocdepth}{1}
+\def\tocwidthA{0.45}
+\def\tocwidthB{0.45}
+\def\cftpartfont{\scshape}
+\def\cftsecfont{\small}
+\cftbeforesecskip=0pt
+\def\cftpartleader{}
+\def\cftpartafterpnum{\cftparfillskip}
+\def\cftsecleader{}
+\def\cftsecafterpnum{\cftparfillskip}
+
+\let\pkg\textsf
+\def\pkgopt#1{\texttt{[#1]}}
+
+\def\PDF{\textsc{pdf}}
+\def\PS{\textsc{ps}}
+\def\DVI{\textsc{dvi}}
+\def\EPS{\textsc{eps}}
+
+\usepackage{pstool}
+\usepackage[T1]{fontenc}
+\usepackage{microtype}
+\usepackage{lmodern}
+\usepackage[sc,osf]{mathpazo}
+\linespread{1.1}
+\frenchspacing
+
+\def\partname{Part}
+
+\GetFileInfo{pstool.sty}
+\begin{document}
+{\addtocontents{toc}{\protect\begin{varwidth}[t]{\tocwidthA\linewidth}}}
+
+\title{The \pkg{pstool} package}
+\author{
+ \normalsize Concept by Zebb Prime\\
+ \normalsize Package by Will Robertson\footnote{\texttt{wspr81@gmail.com}}}
+\date{\fileversion\qquad\filedate}
+
+\maketitle
+
+\begin{abstract}
+This package defines the \cmd\psfragfig\ user command for including \EPS\ files that use \pkg{psfrag} features in a pdf\/\LaTeX\ document. The command \cmd\pstool\ can be used to define other commands with similar behaviour.
+\end{abstract}
+
+\tableofcontents
+
+\part{User documentation}
+
+\section{Introduction}
+
+While directly producing \PDF\ output with pdf\/\LaTeX\ is a great improvement in many ways over the `old method' of \DVI$\to$\PS$\to$\PDF, it loses the ability to interface with a generic PostScript workflow, used to great effect in numerous packages, most notably \pkg{PSTricks} and \pkg{psfrag}.
+
+Until now, the best way to use these packages while running pdf\/\LaTeX\ has been to use the \pkg{pst-pdf} package, which processes the entire document through a filter, sending the relevant PostScript environments (only) through a single pass of \LaTeX\ producing \DVI$\to$\PS$\to$\PDF. The resulting \PDF\ versions of each graphic are then included into the pdf\/\LaTeX\ document in a subsequent compilation. The \pkg{auto-pst-pdf} package provides a wrapper to perform all of this automatically.
+
+The disadvantage with this method is that for every document compilation, \emph{every} graphic must be re-processed. The \pkg{pstool} package uses a different approach to allow each graphic to be processed only as needed, speeding up and simplifying the typesetting of the main document.
+
+At present this package is designed solely as a replacement for \pkg{pst-pdf} in the r\^ole of supporting the \pkg{psfrag} package (which it loads) in pdf\/\LaTeX.
+
+More flexible usage to provide a complete replacement for \pkg{pst-pdf} (e.g., supporting the \cs{begin\{postscript\}} environment) is planned for a later release.
+If you simply need to automatically convert plain \EPS\ files to \PDF, I recommend using the \pkg{epstopdf} package with the \pkgopt{update,prepend} package options (\pkg{epstopdf} and \pkg{pstool} are compatible, but \textbf{only} if \pkg{epstopdf} is loaded first).
+
+\section{Getting started}
+
+Processing pdf\/\LaTeX\ documents with \pkg{pstool} requires the `shell escape' feature of pdf\/\TeX\ to be activated.
+This allows execution of auxiliary commands from within \LaTeX, a feature which is often disabled by default for security reasons.
+If shell escape is not enabled, a warning will be issued in console output when the package is loaded.
+Depending how you compile your \LaTeX\ document, shell escape is enabled in different ways.%
+\footnote{On the command line, use the \texttt{-shell-escape} switch. Otherwise, you're on your own.}
+
+Load the package as usual; no package options are required by default, but there are a few useful options described later in section~\ref{pkgopt}.
+Note that you do not need to load \pkg{psfrag} separately.
+You also do not need to load \pkg{graphicx} separately, but if you do so, ensure that you do \emph{not} include driver information (such as |[pdftex]|); this will play havoc with \pkg{pstool}'s automatic processing stage.
+
+\section{User commands}
+
+The low-level generic command provided by this package is
+\begin{description}
+ \item[\cmd\pstool\ \meta{suffix} \oarg{options} \marg{filename} \marg{input definitions}]
+\end{description}
+It converts the graphic \meta{filename}|.eps| to \meta{filename}|.pdf| with \pkg{psfrag} macros in \meta{filename}|.tex| through a unique \DVI$\to$\PS$\to$\PDF\ process for each graphic, using the preamble of the main document.
+The resulting graphic is then inserted into the document, with \meta{options} consisting of options for \pkg{graphicx} (e.g., \texttt{angle}, \texttt{scale}) or for \pkg{pstool} (as described later in Section~\ref{pkgopt}).
+Note that these optional arguments take effect in the \emph{processing stage}; if you change the \meta{options}, you must manually re-process the figure.
+The third argument to \cmd\pstool\ allows arbitrary \meta{input definitions} (such as \cmd\psfrag\ directives) to be inserted before the figure as it is processed.
+
+By default, \cs{pstool} processes the graphic \meta{filename}|.eps| if \meta{filename}|.pdf| does not already exist, or if the \EPS\ file is \emph{newer} than the \PDF.
+Additionally, if one or more macro files are associated with the graphic, they are also checked whether they have changed since the \PDF\ was generated.
+The macro file(s) can be defined per-graphic as for the \cs{psfragfig} command (see below), and/or globally as for the \pkgopt{macro-file=...} package option described in Section~\ref{macrofile}.
+
+The \cmd\pstool\ command can take an optional |*| or |!| suffix to change its behaviour:
+\begin{description}
+\item[\cs{pstool*}] Always process the figure;
+\item[\cs{pstool!}] Never process the figure.
+\end{description}
+The behaviour in all three cases can be overridden globally by the package option \pkgopt{process} as described in section~\ref{process}.
+
+\subsection{The main \cs{psfragfig} command}
+
+It is useful to define higher-level commands based on \cmd\pstool\ for including specific types of \EPS\ graphics that take advantage of \pkg{psfrag}. The \pkg{pstool} package defines the following wrapper command \cmd\psfragfig, which also supports the |*| or |!| suffixes described above.
+\begin{description}
+\item[{\cmd\psfragfig\ \meta{suffix} \oarg{opts} \marg{filename}}]
+\end{description}
+This catch-all macro is designed to support a wide range of graphics naming schemes. It inserts an \EPS\ file named either \meta{filename}|-psfrag.eps| or \meta{filename}|.eps| (in that order of preference), and uses \pkg{psfrag} definitions contained within either \meta{filename}|-psfrag.tex| or \meta{filename}|.tex|.
+The \cs{psfragfig} command can be used to insert figures produced by the \textsc{Mathematica} package \pkg{MathPSfrag} or the \textsc{Matlab} package \pkg{matlabfrag}. \cmd\psfragfig\ also accepts an optional braced argument:
+\begin{description}
+\item[{\cmd\psfragfig~\meta{suffix} \oarg{opts} \marg{filename} \marg{input definitions}}]
+\end{description}
+The command behaves as above, but also inserts the arbitrary code \meta{input definitions} into the processing stage; this additional code will usually be used to define new or override existing \pkg{psfrag} commands.
+
+\section{Package options}
+\label{pkgopt}
+
+Package options can be set or overridden at any time with \cmd\pstoolsetup\marg{pstool settings}.
+As mentioned in the previous section, these options also may be set in the optional argument to \cmd\pstool\ and \cmd\psfragfig, in which case they apply to that figure alone.
+
+\subsection{Macro file(s)}
+\label{macrofile}
+
+\textbf{New in v1.5}.
+As mentioned above, macro files can be used to store commands for processing \pkg{psfrag} graphics.
+If they change, these macro files can trigger a pre-compilation of the graphics.
+While usually the macro files will be defined per-graphic (such as \texttt{foo.eps} having a \texttt{foo-psfrag.tex} file), \pkg{pstool} will also load a `master' macro file for each graphic if it exists.
+
+\begin{description}
+ \item[\pkgopt{macro-file = ...}]
+\end{description}
+The default is \pkgopt{macro-file=\meta{jobname}\texttt{-pstool.tex}}; if this file does not exist then no macro file is loaded.
+That is, if your document is called \texttt{thesis.tex}, the master macro file will be loaded in each graphic as \texttt{thesis-pstool.tex}, if it exists.
+
+This option is useful if you have macro definitions in a single file that are used by multiple graphics.
+By updating the definitions file, the graphics in the document will be automatically updated.
+(Note that this file can contain plain \LaTeX\ defintions; the \cs{psfrag} commands can still be located in the per-graphic \texttt{.tex} files.)
+
+To suppress the loading of a master macro file in all cases, use an empty argument for the package option, as in \pkgopt{macro-file=\char`\{\char`\}}.
+
+
+\subsection{Forcing/disabling graphics processing}
+\label{process}
+
+While the suffixes |*| and |!| can be used to force or disable (respectively) the processing of each individual graphic, sometimes we want to do this on a global level. The following package options override \emph{all} \pkg{pstool} macros:
+\begin{description}
+\item[\pkgopt{process=auto}] This is the default mode as described in the previous section, in which graphics without suffixes are only (re-)processed if the \EPS\ file is newer or the \PDF\ file does not exist;
+\item[\pkgopt{process=all}] Suffixes are ignored and all \cmd\pstool\ graphics are processed;
+\item[\pkgopt{process=none}] Suffixes are ignored and no \cmd\pstool\ graphics are processed.\footnote{If \pkg{pstool} is loaded in a \LaTeX\ document in \DVI\ mode, this is the option that is used since no external processing is required for these graphics.}
+\end{description}
+
+\subsection{Cropping graphics}
+The default option \pkgopt{crop=preview} selects the \pkg{preview} package to crop graphics to the appropriate size for each auxiliary process.
+
+However, when an inserted label protrudes from the natural bounding box of the figure, or when the original bounding box of the figure is wrong, the \pkg{preview} package will not always produce a good result (with parts of the graphic trimmed off the edge). A robust method to solve this problem is to use the \pkg{pdfcrop} program instead.%
+\footnote{\pkg{pdfcrop} requires a Perl installation under Windows, freely available from \url{http://www.activestate.com/Products/activeperl/index.plex}} This can be activated in \pkg{pstool} with the \pkgopt{crop=pdfcrop} package option.
+
+\subsection{Temporary files \& cleanup}
+Each figure that is processed spawns an auxiliary \LaTeX\ compilation through \DVI$\to$\PS$\to$\PDF. This process is named after the name of the figure with an appended string suffix; the default is \pkgopt{suffix=\{-pstool\}}. Most of these suffixed files are ``temporary'' in that they may be deleted once they are no longer needed.
+
+As an example, if the figure is called |ex.eps|, the files that are created are |ex-pstool.tex|, |ex-pstool.dvi|, \dots. The \pkgopt{cleanup} package option declares via a list of filename suffixes which temporary files are to be deleted after processing.
+
+The default is \pkgopt{cleanup=\{.tex,\,.dvi,\,.ps,\,.pdf,\,.log\}}. To delete none of the temporary files, choose \pkgopt{cleanup=\{\}} (useful for debugging).
+Note that if you want cross-referencing to work correctly for labels in figures, etc., then you must not delete the |.aux| file (see Section~\ref{xref}).
+
+\subsection{Interaction mode of the auxiliary processes}
+Each graphic echoes the output of its auxiliary process to the console window; unless you are trying to debug errors there is little interest in seeing this information. The behaviour of these auxiliary processes are governed globally by the \pkgopt{mode} package option, which takes the following parameters:
+\begin{description}
+\item[\pkgopt{mode=batch}] hide almost all of the \LaTeX\ output (\emph{default});
+\item[\pkgopt{mode=nonstop}] echo all \LaTeX\ output but continues right past any errors; and
+\item[\pkgopt{mode=errorstop}] prompt for user input when errors are encountered.
+\end{description}
+These three package options correspond to the \LaTeX\ command line options \texttt{-interaction=batchmode}, \texttt{=nonstopmode}, and \texttt{=errorstopmode}, respectively. When \pkgopt{mode=batch} is activated, then \pkg{dvips} is also run in `quiet mode'.
+
+\subsection{Auxiliary processing command line options}
+The command line options passed to each program of the auxiliary processing can be changed with the following package options:
+\begin{description}
+\item[\pkgopt{latex-options~~~= ...}]
+\item[\pkgopt{dvips-options~~~= ...}]
+\item[\pkgopt{ps2pdf-options~~= ...}] and,
+\item[\pkgopt{pdfcrop-options~= ...}] (if applicable).
+\end{description}
+For the most part these will be unnecessary, although passing the correct options to |ps2pdf| can sometimes be a little obscure.\footnote{The manual is here: \url{http://pages.cs.wisc.edu/~ghost/doc/cvs/Ps2pdf.htm}} For example, I used the following for generating figures in my thesis:%
+\par{\centering|ps2pdf-options={-dPDFSETTINGS=/prepress}|\par}
+This forces the `base fourteen' fonts to be embedded within the individual figure files, without which some printers and \textsc{pdf} viewers have trouble with the textual labels. In fact, from v1.3 of \pkg{pstool}, this option is now the default.
+Note that subsequent calls to \pkgopt{ps2pdf-options=...} will override the \pkg{pstool} default; use |ps2pdf-options={}| to erase |ps2pdf|'s defaults if necessary.
+
+\textbf{New in 1.5}: recently, the behaviour of |ps2pdf| has changed under Windows.
+In the past, options to |ps2pdf| needed to be quoted and use |=| to assign its options.
+Something about this has now changed, and it appears the best way to set |ps2pdf| options to use the |#| character instead. Therefore, \pkg{pstool} attempts to be clever and replaces all instances of |=| within a |ps2pdf| option into |#| (under Windows only).
+No quotes are added.
+Windows uses can therefore continue to use |=| to set |ps2pdf| options and allow \pkg{pstool} to make the substitution; their documents will still compile correctly on Mac OS X or Linux platforms.
+
+\subsection{Compression of bitmap data}
+In the conversion using |ps2pdf|, bitmap images are stored using either lossy or lossless compression. The default behaviour for \pkg{pstool} is to force lossless compression, because we believe that to be the most commonly desired use case (you don't want scientific graphics rendered with possible compression artifacts). This behaviour can be adjusted using one of these options:\footnote{Technical details are given in section~\ref{sec:bitmapdetails}.}
+\begin{description}
+\item[\pkgopt{bitmap=auto}] :~ Do whatever |ps2pdf| does by default, which seems to be to use lossy compression most, if not all, of the time;
+\item[\pkgopt{bitmap=lossy}]:~ Bitmap images are compressed like \textsc{jpg}; this is only really suitable for photographs;
+\item[\pkgopt{bitmap=lossless}] (\emph{default}) : Bitmap images are compressed like \textsc{png}; this is suitable for screenshots and generated data such as a surface plot within Matlab.
+\end{description}
+These are just special cases of the \pkgopt{ps2pdf-options=...} option, but using \pkgopt{bitmap=...} is much more convenient since the |ps2pdf| options to effect this behaviour are quite verbose.
+Note that the |auto| and |lossy| outputs differ in quality; |lossy| is lower quality than |auto| even when the latter uses a lossy compression scheme. Adjusting the quality for these options is only possible with relatively complex Ghostscript options.
+
+\section{Miscellaneous details}
+
+\subsection{Conditional preamble or setup commands}
+
+It can be necessary to use a slightly different preamble for the main document compared to the auxiliary file used to process each graphic individually.
+To have preamble material be directed at only one or the other, use the \cs{ifpdf} command (automatically loaded from the \pkg{ifpdf} package) as follows:
+\begin{list}{}\item{}
+| \ifpdf|\\
+| %| \emph{main preamble only}\\
+| \else|\\
+| %| \emph{graphics preamble only}\\
+| \fi|
+\end{list}
+For example, when using \pkg{beamer} and showing navigation symbols on each slide, you want to suppress these in the \pkg{pstool}-generated graphics (else they'll show up twice!).
+In this case, the preamble snippet would look something like:
+\begin{list}{}\item{}
+| \ifpdf\else|\\
+| \setbeamertemplate{navigation symbols}{}|\\
+| \fi|
+\end{list}
+It would be possible to provide specific \pkg{pstool} commands or environments to do this; let me know if the \cs{ifpdf} approach doesn't work for you.
+For larger amount of preamble material that should be omitted for each graphic, the \cmd{\EndPreamble} command (see next) might also help.
+
+\subsection{The \cmd\EndPreamble\ command}
+
+The \pkg{pstool} package scans the beginning of the main document to insert its preamble into each graphic that is converted.
+This feature hasn't been well-tested and there are certain cases in which it is known to fail.
+(For example, if \verb|\begin{document}| doesn't appear on a line by itself.)
+If you need to indicate the end of the preamble manually because this scanning has failed, place the command \cmd\EndPreamble\ where-ever you'd like the preamble in the auxiliary processing to end.
+This is also handy to bypass anything in the preamble that will never be required for the figures but which will slow down or otherwise conflict with the auxiliary processing.
+
+\subsection{Cross-referencing}
+\label{xref}
+
+\textbf{New in v1.5}: \pkg{pstool} now supports cross-referencing within graphics.
+That is, you can use |\ref| and |\cite|, etc., within \pkg{psfrag} commands.
+In fact, references to page numbers within an external figure should now resolve correctly; e.g., you can use |\thepage| within a \pkg{psfrag} command.
+(I haven't really tested, but this should allow any package that writes information to the |.aux| file to work correctly.)
+
+The implementation to achieve this is somewhat convoluted and difficult to extend, but the user interface should work just as you would expect, mostly.
+The main gotcha to keep in mind is that when cross-referencing is used, the graphics will need multiple compilations to resolve all the cross-references properly.
+Therefore, I recommend when setting such figures up in your document to use the |\psfragfig*| command, which forces graphics compilation every time, and remove the star only when you're sure the graphic is now correct.
+Alternatively, don't worry about the resolving of the cross-references until the very end, and then load the package with the \pkgopt{process=all} option.
+
+\subsection{A note on file paths}
+
+The \pkg{pstool} package tries to ensure that you can put image files in subdirectories of the main document and the auxiliary processing will still function correctly. In order to ensure this, the external |pdflatex| compilation uses the |-output-directory| feature of pdf\/\TeX. This command line option is definitely supported on all platforms from TeX~Live~2008 and MiKTeX~2.7 onwards, but earlier distributions may not be supported.
+
+One problem that \pkg{pstool} does not solve on its own is the inclusion of images that do not exist in subdirectories of the main document. For example, |\pstool{../Figures/myfig}| can not process by default because pdf\/\TeX\ usually does not have permission to write into folders that are higher in the heirarchy than the main document. This can be worked around presently in two different ways: (although maybe only for Mac~OS~X and Linux)
+\begin{enumerate}
+\item Give |pdflatex| permission to write anywhere with the command:\\
+|openout_any=a pdflatex ...|
+\item Create a symbolic link in the working directory to a point higher in the path: |ln -s ../../PhD ./PhD|, for example, and then refer to the graphics through this symbolic link.
+\end{enumerate}
+
+\subsection{Technical details on \texttt{ps2pdf}'s bitmap options}
+\label{sec:bitmapdetails}
+
+The \pkgopt{bitmap=auto} \pkg{pstool} option does not set any |ps2pdf| options; use this if you wish to set the following |ps2pdf| options manually.
+
+For both \pkgopt{bitmap=lossless} (default) and \pkgopt{bitmap=lossy}, the following |ps2pdf| options are set:
+\begin{verbatim}
+ -dAutoFilterColorImages=false
+ -dAutoFilterGrayImages=false
+\end{verbatim}
+Then for lossless image encoding, the following options are set:
+\begin{verbatim}
+ -dColorImageFilter=/FlateEncode
+ -dGrayImageFilter=/FlateEncode
+\end{verbatim}
+Instead for lossly encoding, these are the options used:
+\begin{verbatim}
+ -dColorImageFilter=/DCTEncode
+ -dGrayImageFilter=/DCTEncode
+\end{verbatim}
+If there are more |ps2pdf| options that you frequently use, please let me know and it may be a good idea to add \pkg{pstool} wrappers to make them more convenient.
+
+{\addtocontents{toc}{\protect\end{varwidth}\protect\hfill}}
+{\addtocontents{toc}{\protect\begin{varwidth}[t]{\protect\tocwidthB\protect\linewidth}}}
+\clearpage
+\part{Implementation}
+
+\section{Package information}
+The most recent publicly released version of \pkg{pstool} is available at \textsc{ctan}: \url{http://tug.ctan.org/pkg/pstool/}. Historical and developmental versions are available at GitHub: \url{http://github.com/wspr/pstool/}. While general feedback via email is welcomed, specific bugs or feature requests should be reported through the issue tracker: \url{http://github.com/wspr/pstool/issues}.
+
+\subsection{Licence}
+
+This package is freely modifiable and distributable under the terms and conditions of the \LaTeX\ Project Public Licence, version 1.3c or greater (your choice).\footnote{\url{http://www.latex-project.org/lppl.txt}} This work consists of the files |pstool.tex| and the derived files |pstool.sty|, |pstool.ins|, and |pstool.pdf|. This work is maintained by \textsc{Will Robertson}.
+
+\section{Code}
+
+Note that the following code is typeset in a non-verbatim manner; indentation is controlled automatically by some hastily written macros (and will sometimes not indent as might be done manually). When in doubt, consult the source directly!
+
+\parindent=0pt
+
+\ExplSyntaxOn
+
+\ior_new:N \pstool_doc_ior
+\seq_new:N \l_pstool_line_seq
+\tl_new:N \l_pstool_tl
+
+\tl_const:Nx \c_pstool_percent_str { \cs_to_str:N \% }
+\tl_const:Nx \c_pstool_lbrace_str { \cs_to_str:N \{ }
+\tl_const:Nx \c_pstool_rbrace_str { \cs_to_str:N \} }
+
+\cs_new:Nn \pstool_typeset_percent:
+ {
+ \group_begin:
+ \color{blue}
+ \scriptsize\bfseries
+ \c_pstool_percent_str
+ \group_end:
+ }
+
+\cs_new:Nn \pstool_doc_rescan_line:
+ {
+ \exp_args:Nno \tl_rescan:nn
+ {
+ \char_set_catcode_space:N \ % space
+ \char_set_catcode_letter:N \#
+ }
+ { \l_pstool_tl }
+ }
+
+\cs_new:Nn \pstool_doc_line_comment:
+ {
+ \seq_pop_left:NNTF \l_pstool_line_seq \l_pstool_tl
+ % Comment on a line of its own:
+ {
+ \group_begin:
+ \int_compare:nT { \g_pstool_indent_int > 0 } { \color{blue}\small }
+ \pstool_doc_rescan_line:
+ \group_end:
+ \par
+ }
+ % A completely empty line:
+ {
+ \vspace{\baselineskip}
+ }
+ }
+
+\int_new:N \g_pstool_indent_int
+\int_new:N \l_pstool_line_indent_int
+\dim_new:N \l_pstool_dim
+
+\cs_new:Nn \pstool_doc_line_code:
+ {
+ \makebox[0pt][r]{\scriptsize\color{blue}\int_use:N \g_pstool_docline_int\quad}
+
+ \int_zero:N \l_pstool_line_indent_int
+ \tl_map_inline:Nn \l_pstool_tl
+ {
+ \str_if_eq_x:nnT {##1} {\c_pstool_lbrace_str} { \int_gincr:N \l_pstool_line_indent_int }
+ \str_if_eq_x:nnT {##1} {\c_pstool_rbrace_str} { \int_gdecr:N \l_pstool_line_indent_int }
+ }
+ \exp_args:NNx \tl_if_in:NnT \l_pstool_tl { \token_to_str:N \if } { \int_gincr:N \l_pstool_line_indent_int }
+ \exp_args:NNx \tl_if_in:NnT \l_pstool_tl { \token_to_str:N \fi } { \int_gdecr:N \l_pstool_line_indent_int }
+
+ \int_compare:nT { \l_pstool_line_indent_int < 0 }
+ { \int_set:Nn \g_pstool_indent_int { \g_pstool_indent_int + \l_pstool_line_indent_int } }
+ \int_compare:nT { \g_pstool_indent_int > 0 }
+ { \prg_replicate:nn {\g_pstool_indent_int} {\quad} }
+ \int_compare:nT { \l_pstool_line_indent_int > 0 }
+ { \int_set:Nn \g_pstool_indent_int { \g_pstool_indent_int + \l_pstool_line_indent_int } }
+ \int_compare:nT { \g_pstool_indent_int < 0 }
+ { \int_zero:N \g_pstool_indent_int }
+
+ \texttt{\l_pstool_tl}
+
+ \seq_pop_left:NNT \l_pstool_line_seq \l_pstool_tl
+ {
+ \makebox
+ {%
+ \pstool_typeset_percent:
+ \space
+ \small
+ \color{blue}%
+ \pstool_doc_rescan_line:
+ }
+ }
+ \par
+ }
+
+\errorcontextlines=999
+
+\int_new:N \g_pstool_docline_int
+\ior_open:Nn \pstool_doc_ior {pstool.sty}
+
+\cs_set_eq:NN \___tl_trim_spaces:n \tl_trim_spaces:n
+\cs_set_eq:NN \tl_trim_spaces:n \use:n % avoid space trimming inside \seq_set_split:n following (MAJOR SIDE-EFFECTS OF COURSE)
+\ior_str_map_inline:Nn \pstool_doc_ior
+ {
+ \int_gincr:N \g_pstool_docline_int
+ \exp_args:NNo \seq_set_split:Nnn \l_pstool_line_seq {\c_pstool_percent_str} {#1}
+ %\seq_show:N \l_pstool_line_seq
+ \seq_pop_left:NNT \l_pstool_line_seq \l_pstool_tl
+ {
+ \tl_if_empty:NTF \l_pstool_tl
+ {
+ \pstool_doc_line_comment:
+ }
+ {
+ \pstool_doc_line_code:
+ }
+ }
+ }
+\cs_set_eq:NN \tl_trim_spaces:n \___tl_trim_spaces:n
+
+\ExplSyntaxOff
+
+%\DocInput{pstool.sty}
+
+{\addtocontents{toc}{\protect\end{varwidth}}}
+\end{document}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tex/.texmf/tex/latex/misc/soul.sty b/tex/.texmf/tex/latex/misc/soul.sty
new file mode 100644
index 0000000..7878e0f
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/soul.sty
@@ -0,0 +1,898 @@
+%%
+%% This is file `soul.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% soul.dtx (with options: `package')
+%%
+%% IMPORTANT NOTICE:
+%%
+%% For the copyright see the source file.
+%%
+%% Any modified versions of this file must be renamed
+%% with new filenames distinct from soul.sty.
+%%
+%% For distribution of the original source see the terms
+%% for copying and modification in the file soul.dtx.
+%%
+%% This generated file may be distributed as long as the
+%% original source files, as listed above, are part of the
+%% same distribution. (The sources need not necessarily be
+%% in the same archive or directory.)
+%% File: soul.dtx Copyright (C) 1998--2003 Melchior FRANZ
+%% $Id: soul.dtx,v 1.128 2003/11/17 22:57:24 m Rel $
+%% $Version: 2.4 $
+\expandafter\ifx\csname SOUL@\endcsname\relax\else
+ \expandafter\endinput
+\fi
+\ifx\documentclass\SOULundefined
+ \chardef\atcode=\catcode`@
+ \catcode`\@=11
+ \def\DeclareRobustCommand*{\def}
+ \let\newcommand\DeclareRobustCommand
+ \def\DeclareOption#1#2{\expandafter\def\csname#1\endcsname{#2}}
+ \def\PackageError#1#2#3{{%
+ \newlinechar`^^J%
+ \errorcontextlines\z@
+ \edef\\{\errhelp{#3}}\\%
+ \errmessage{Package #1 error: #2}%
+ }}
+ \def\@height{height}
+ \def\@depth{depth}
+ \def\@width{width}
+ \def\@plus{plus}
+ \def\@minus{minus}
+ \font\SOUL@tt=ectt1000
+ \let\@xobeysp\space
+ \let\linebreak\break
+ \let\mbox\hbox
+\else
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{soul}
+ [2003/11/17 v2.4 letterspacing/underlining (mf)]
+ \newfont\SOUL@tt{ectt1000}
+ \newcommand*\sodef{}
+ \newcommand*\resetso{}
+ \newcommand*\capsdef{}
+ \newcommand*\capsfont{}
+ \newcommand*\setulcolor{}
+ \newcommand*\setuloverlap{}
+ \newcommand*\setul{}
+ \newcommand*\resetul{}
+ \newcommand*\setuldepth{}
+ \newcommand*\setstcolor{}
+ \newcommand*\sethlcolor{}
+ \newcommand*\so{}
+ \newcommand*\ul{}
+ \newcommand*\st{}
+ \newcommand*\hl{}
+ \newcommand*\caps{}
+ \newcommand*\soulaccent{}
+ \newcommand*\soulregister{}
+ \newcommand*\soulfont{}
+ \newcommand*\soulomit{}
+\fi
+\newtoks\SOUL@word
+\newtoks\SOUL@lasttoken
+\toksdef\SOUL@syllable\z@
+\newtoks\SOUL@cmds
+\newtoks\SOUL@buffer
+\newtoks\SOUL@token
+\dimendef\SOUL@syllgoal\z@
+\dimendef\SOUL@syllwidth\tw@
+\dimendef\SOUL@charkern=4
+\dimendef\SOUL@hyphkern=6
+\countdef\SOUL@minus\z@
+\countdef\SOUL@comma\tw@
+\countdef\SOUL@apo=4
+\countdef\SOUL@grave=6
+\newskip\SOUL@spaceskip
+\newif\ifSOUL@ignorespaces
+\def\soulomit#1{#1}
+\def\SOUL@stopM{\SOUL@stop}
+\let\SOUL@stop\relax
+\def\SOUL@lowerthan{}
+\def\SOUL@lowerthanM{\<}
+\def\SOUL@hyphenhintM{\-}
+\def\SOUL@n*{\let\SOUL@spc= }\SOUL@n* %
+\def\SOUL@{%
+ \futurelet\SOUL@@\SOUL@expand
+}
+\def\SOUL@expand{%
+ \ifcat\bgroup\noexpand\SOUL@@
+ \let\SOUL@n\SOUL@start
+ \else
+ \bgroup
+ \def\\##1##2{\def##2{\noexpand##2}}%
+ \the\SOUL@cmds
+ \SOUL@buffer={%
+ \\\TeX\\\LaTeX\\\soulomit\\\mbox\\\hbox\\\textregistered
+ \\\slash\\\textcircled\\\copyright\\\S\\\,\\\<\\\>\\~%
+ \\\\%
+ }%
+ \def\\##1{\def##1{\noexpand##1}}%
+ \the\SOUL@buffer
+ \let\protect\noexpand
+ \xdef\SOUL@n##1{\noexpand\SOUL@start{\SOUL@@}}%
+ \egroup
+ \fi
+ \SOUL@n
+}
+\long\def\SOUL@start#1{{%
+ \let\<\SOUL@lowerthan
+ \let\>\empty
+ \def\soulomit{\noexpand\soulomit}%
+ \gdef\SOUL@eventuallyexhyphen##1{}%
+ \let\SOUL@soeventuallyskip\relax
+ \SOUL@spaceskip=\fontdimen\tw@\font\@plus\fontdimen\thr@@\font
+ \@minus\fontdimen4\font
+ \SOUL@ignorespacesfalse
+ \leavevmode
+ \SOUL@preamble
+ \SOUL@lasttoken={}%
+ \SOUL@word={}%
+ \SOUL@minus\z@
+ \SOUL@comma\z@
+ \SOUL@apo\z@
+ \SOUL@grave\z@
+ \SOUL@do{#1}%
+ \SOUL@postamble
+}}
+\long\def\SOUL@do#1{%
+ \SOUL@scan#1\SOUL@stop
+}
+\def\SOUL@scan{%
+ \futurelet\SOUL@@\SOUL@eval
+}
+\def\SOUL@eval{%
+ \def\SOUL@n*##1{\SOUL@scan}%
+ \if\noexpand\SOUL@@\SOUL@spc
+ \else
+ \SOUL@ignorespacesfalse
+ \fi
+ \ifnum\SOUL@minus=\thr@@
+ \SOUL@flushminus
+ \else\ifnum\SOUL@comma=\tw@
+ \SOUL@flushcomma
+ \else\ifnum\SOUL@apo=\tw@
+ \SOUL@flushapo
+ \else\ifnum\SOUL@grave=\tw@
+ \SOUL@flushgrave
+ \fi\fi\fi\fi
+ \ifx\SOUL@@-\else\SOUL@flushminus\fi
+ \ifx\SOUL@@,\else\SOUL@flushcomma\fi
+ \ifx\SOUL@@'\else\SOUL@flushapo\fi
+ \ifx\SOUL@@`\else\SOUL@flushgrave\fi
+ \ifx\SOUL@@-%
+ \advance\SOUL@minus\@ne
+ \else\ifx\SOUL@@,%
+ \advance\SOUL@comma\@ne
+ \else\ifx\SOUL@@'%
+ \advance\SOUL@apo\@ne
+ \else\ifx\SOUL@@`%
+ \advance\SOUL@grave\@ne
+ \else
+ \SOUL@flushminus
+ \SOUL@flushcomma
+ \SOUL@flushapo
+ \SOUL@flushgrave
+ \ifx\SOUL@@\SOUL@stop
+ \def\SOUL@n*{%
+ \SOUL@doword
+ \SOUL@eventuallyexhyphen\null
+ }%
+ \else\ifx\SOUL@@\par
+ \def\SOUL@n*\par{\par\leavevmode\SOUL@scan}%
+ \else\if\noexpand\SOUL@@\SOUL@spc
+ \SOUL@doword
+ \SOUL@eventuallyexhyphen\null
+ \ifSOUL@ignorespaces
+ \else
+ \SOUL@everyspace{}%
+ \fi
+ \def\SOUL@n* {\SOUL@scan}%
+ \else\ifx\SOUL@@\\%
+ \SOUL@doword
+ \SOUL@eventuallyexhyphen\null
+ \SOUL@everyspace{\unskip\nobreak\hfil\break}%
+ \SOUL@ignorespacestrue
+ \else\ifx\SOUL@@~%
+ \SOUL@doword
+ \SOUL@eventuallyexhyphen\null
+ \SOUL@everyspace{\nobreak}%
+ \else\ifx\SOUL@@\slash
+ \SOUL@doword
+ \SOUL@eventuallyexhyphen{/}%
+ \SOUL@exhyphen{/}%
+ \else\ifx\SOUL@@\mbox
+ \def\SOUL@n*{\SOUL@addprotect}%
+ \else\ifx\SOUL@@\hbox
+ \def\SOUL@n*{\SOUL@addprotect}%
+ \else\ifx\SOUL@@\soulomit
+ \def\SOUL@n*\soulomit##1{%
+ \SOUL@doword
+ {\spaceskip\SOUL@spaceskip##1}%
+ \SOUL@scan
+ }%
+ \else\ifx\SOUL@@\break
+ \SOUL@doword
+ \break
+ \else\ifx\SOUL@@\linebreak
+ \SOUL@doword
+ \SOUL@everyspace{\linebreak}%
+ \else\ifcat\bgroup\noexpand\SOUL@@
+ \def\SOUL@n*{\SOUL@addgroup{}}%
+ \else\ifcat$\noexpand\SOUL@@
+ \def\SOUL@n*{\SOUL@addmath}%
+ \else
+ \def\SOUL@n*{\SOUL@dotoken}%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi
+ \SOUL@n*%
+}
+\def\SOUL@flushminus{%
+ \ifcase\SOUL@minus
+ \else
+ \SOUL@doword
+ \SOUL@eventuallyexhyphen{-}%
+ \ifcase\SOUL@minus
+ \or
+ \SOUL@exhyphen{-}%
+ \or
+ \SOUL@exhyphen{--}%
+ \or
+ \SOUL@exhyphen{---}%
+ \fi
+ \SOUL@minus\z@
+ \fi
+}
+\def\SOUL@flushcomma{%
+ \ifcase\SOUL@comma
+ \or
+ \edef\x{\SOUL@word={\the\SOUL@word,}}\x
+ \or
+ \edef\x{\SOUL@word={\the\SOUL@word{{,,}}}}\x
+ \fi
+ \SOUL@comma\z@
+}
+\def\SOUL@flushapo{%
+ \ifcase\SOUL@apo
+ \or
+ \edef\x{\SOUL@word={\the\SOUL@word'}}\x
+ \or
+ \edef\x{\SOUL@word={\the\SOUL@word{{''}}}}\x
+ \fi
+ \SOUL@apo\z@
+}
+\def\SOUL@flushgrave{%
+ \ifcase\SOUL@grave
+ \or
+ \edef\x{\SOUL@word={\the\SOUL@word`}}\x
+ \or
+ \edef\x{\SOUL@word={\the\SOUL@word{{``}}}}\x
+ \fi
+ \SOUL@grave\z@
+}
+\def\SOUL@dotoken#1{%
+ \def\SOUL@@{\SOUL@addtoken{#1}}%
+ \def\\##1##2{%
+ \edef\SOUL@x{\string#1}%
+ \edef\SOUL@n{\string##2}%
+ \ifx\SOUL@x\SOUL@n
+ \def\SOUL@@{\SOUL@docmd{##1}{#1}}%
+ \else
+ \edef\SOUL@n{\string##2\space}%
+ \ifx\SOUL@x\SOUL@n
+ \def\SOUL@@{\SOUL@docmd{##1}{#1}}%
+ \fi
+ \fi
+ }%
+ \the\SOUL@cmds
+ \SOUL@@
+}
+\def\SOUL@docmd#1#2{%
+ \ifx9#1%
+ \def\SOUL@@{\SOUL@addgroup{#2}}%
+ \else\ifx8#1%
+ \SOUL@doword
+ \def\SOUL@@##1{%
+ \SOUL@token={\footnotemark}%
+ \SOUL@everytoken
+ \SOUL@syllable={\footnotemark}%
+ \SOUL@everysyllable
+ \footnotetext{##1}%
+ \SOUL@doword
+ \SOUL@scan
+ }%
+ \else\ifx7#1%
+ \SOUL@doword
+ \def\SOUL@@##1{%
+ \SOUL@token={#2{##1}}%
+ \SOUL@everytoken
+ \SOUL@syllable={#2{##1}}%
+ \SOUL@everysyllable
+ \SOUL@doword
+ \SOUL@scan
+ }%
+ \else\ifx1#1%
+ \SOUL@doword
+ \def\SOUL@@##1{%
+ #2{\protect\SOUL@do{##1}}%
+ \SOUL@scan
+ }%
+ \else
+ \SOUL@doword
+ #2%
+ \let\SOUL@@\SOUL@scan
+ \fi\fi\fi\fi
+ \SOUL@@
+}
+\def\SOUL@addgroup#1#2{%
+ {\let\protect\noexpand
+ \edef\x{\global\SOUL@word={\the\SOUL@word{{\noexpand#1#2}}}}\x}%
+ \SOUL@scan
+}
+\def\SOUL@addmath$#1${%
+ {\let\protect\noexpand
+ \edef\x{\global\SOUL@word={\the\SOUL@word{{\hbox{$#1$}}}}}\x}%
+ \SOUL@scan
+}
+\def\SOUL@addprotect#1#2{%
+ {\let\protect\noexpand
+ \edef\x{\global\SOUL@word={\the\SOUL@word{{\hbox{#2}}}}}\x}%
+ \SOUL@scan
+}
+\def\SOUL@addtoken#1{%
+ \edef\x{\SOUL@word={\the\SOUL@word\noexpand#1}}\x
+ \SOUL@scan
+}
+\def\SOUL@exhyphen#1{%
+ \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@hyphkern}{#1}%
+ \gdef\SOUL@eventuallyexhyphen##1{%
+ \SOUL@getkern{#1}{\SOUL@charkern}{##1}%
+ \SOUL@everyexhyphen{#1}%
+ \gdef\SOUL@eventuallyexhyphen####1{}%
+ }%
+}
+\SOUL@cmds={%
+ \\9\`\\9\'\\9\^\\9\"\\9\~\\9\=\\9\.%
+ \\9\u\\9\v\\9\H\\9\t\\9\c\\9\d\\9\b\\9\r
+ \\1\emph\\1\textrm\\1\textsf\\1\texttt\\1\textmd\\1\textbf
+ \\1\textup\\1\textsl\\1\textit\\1\textsc\\1\textnormal
+ \\0\rmfamily\\0\sffamily\\0\ttfamily\\0\mdseries\\0\upshape
+ \\0\slshape\\0\itshape\\0\scshape\\0\normalfont
+ \\0\em\\0\rm\\0\bf\\0\it\\0\tt\\0\sc\\0\sl\\0\sf
+ \\0\tiny\\0\scriptsize\\0\footnotesize\\0\small
+ \\0\normalsize\\0\large\\0\Large\\0\LARGE\\0\huge\\0\Huge
+ \\1\MakeUppercase\\7\textsuperscript\\8\footnote
+ \\1\textfrak\\1\textswab\\1\textgoth
+ \\0\frakfamily\\0\swabfamily\\0\gothfamily
+}
+\def\soulregister#1#2{{%
+ \edef\x{\global\SOUL@cmds={\the\SOUL@cmds
+ \noexpand\\#2\noexpand#1}}\x
+}}
+\def\soulaccent#1{\soulregister{#1}9}
+\let\soulfont\soulregister
+\def\SOUL@doword{%
+ \edef\x{\the\SOUL@word}%
+ \ifx\x\empty
+ \else
+ \SOUL@buffer={}%
+ \setbox\z@\vbox{%
+ \SOUL@tt
+ \hyphenchar\font`\-
+ \hfuzz\maxdimen
+ \hbadness\@M
+ \pretolerance\m@ne
+ \tolerance\@M
+ \leftskip\z@
+ \rightskip\z@
+ \hsize1sp
+ \everypar{}%
+ \parfillskip\z@\@plus1fil
+ \hyphenpenalty-\@M
+ \noindent
+ \hskip\z@
+ \relax
+ \the\SOUL@word}%
+ \let\SOUL@errmsg\SOUL@error
+ \let\-\relax
+ \count@\m@ne
+ \SOUL@analyze
+ \SOUL@word={}%
+ \fi
+}
+\setbox\z@\hbox{\SOUL@tt-}
+\newdimen\SOUL@ttwidth
+\SOUL@ttwidth\wd\z@
+\def\SOUL@sethyphenchar{%
+ \ifnum\hyphenchar\font=\m@ne
+ \else
+ \char\hyphenchar\font
+ \fi
+}
+\def\SOUL@analyze{{%
+ \setbox\z@\vbox{%
+ \unvcopy\z@
+ \unskip
+ \unpenalty
+ \global\setbox\@ne=\lastbox}%
+ \ifvoid\@ne
+ \else
+ \setbox\@ne\hbox{\unhbox\@ne}%
+ \SOUL@syllgoal=\wd\@ne
+ \advance\count@\@ne
+ \SOUL@analyze
+ \SOUL@syllwidth\z@
+ \SOUL@syllable={}%
+ \ifnum\count@>\z@
+ \advance\SOUL@syllgoal-\SOUL@ttwidth
+ \SOUL@dosyllable
+ \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@hyphkern}%
+ {\SOUL@sethyphenchar}%
+ \SOUL@everyhyphen
+ \else
+ \SOUL@dosyllable
+ \fi
+ \fi
+}}
+\def\SOUL@dosyllable{%
+ \SOUL@gettoken
+ \SOUL@eventuallyexhyphen{\the\SOUL@token}%
+ \edef\x{\the\SOUL@token}%
+ \ifx\x\SOUL@hyphenhintM
+ \let\SOUL@n\SOUL@dosyllable
+ \else\ifx\x\SOUL@lowerthanM
+ \SOUL@gettoken
+ \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern}
+ {\the\SOUL@token}%
+ \SOUL@everylowerthan
+ \SOUL@puttoken
+ \let\SOUL@n\SOUL@dosyllable
+ \else\ifdim\SOUL@syllwidth=\SOUL@syllgoal
+ \SOUL@everysyllable
+ \SOUL@puttoken
+ \let\SOUL@n\relax
+ \else\ifx\x\SOUL@stopM
+ \SOUL@errmsg
+ \global\let\SOUL@errmsg\relax
+ \let\SOUL@n\relax
+ \else
+ \setbox\tw@\hbox{\SOUL@tt\the\SOUL@token}%
+ \advance\SOUL@syllwidth\wd\tw@
+ \global\SOUL@lasttoken=\SOUL@token
+ \SOUL@gettoken
+ \SOUL@getkern{\the\SOUL@lasttoken}{\SOUL@charkern}
+ {\the\SOUL@token}%
+ \SOUL@puttoken
+ \global\SOUL@token=\SOUL@lasttoken
+ \SOUL@everytoken
+ \edef\x{\SOUL@syllable={\the\SOUL@syllable\the\SOUL@token}}\x
+ \let\SOUL@n\SOUL@dosyllable
+ \fi\fi\fi\fi
+ \SOUL@n
+}
+\def\SOUL@gettoken{%
+ \edef\x{\the\SOUL@buffer}%
+ \ifx\x\empty
+ \SOUL@nexttoken
+ \else
+ \global\SOUL@token=\SOUL@buffer
+ \global\SOUL@buffer={}%
+ \fi
+}
+\def\SOUL@puttoken{%
+ \edef\x{\the\SOUL@buffer}%
+ \ifx\x\empty
+ \global\SOUL@buffer=\SOUL@token
+ \global\SOUL@token={}%
+ \else
+ \SOUL@debug{puttoken called twice}%
+ \fi
+}
+\def\SOUL@nexttoken{%
+ \edef\x{\the\SOUL@word}%
+ \ifx\x\empty
+ \SOUL@token={\SOUL@stop}%
+ \else
+ \expandafter\SOUL@splittoken\the\SOUL@word\SOUL@stop
+ \fi
+}
+\def\SOUL@splittoken#1#2\SOUL@stop{%
+ \global\SOUL@token={#1}%
+ \global\SOUL@word={#2}%
+}
+\def\SOUL@getkern#1#2#3{%
+ \setbox\tw@\hbox{#1#3}%
+ #2\wd\tw@
+ \setbox\tw@\hbox{#1\null#3}%
+ \advance#2-\wd\tw@
+}
+\def\SOUL@setkern#1{\ifdim#1=\z@\else\kern#1\fi}
+\def\SOUL@error{%
+ \vrule\@height.8em\@depth.2em\@width1em
+ \PackageError{soul}{Reconstruction failed}{%
+ I came across hyphenatable material enclosed in group
+ braces,^^Jwhich I can't handle. Either drop the braces or
+ make the material^^Junbreakable using an \string\mbox\space
+ (\string\hbox). Note that a space^^Jalso counts as possible
+ hyphenation point. See page 4 of the manual.^^JI'm leaving
+ a black square so that you can see where I am right now.%
+ }%
+}
+\def\SOUL@setup{%
+ \let\SOUL@preamble\relax
+ \let\SOUL@postamble\relax
+ \let\SOUL@everytoken\relax
+ \let\SOUL@everysyllable\relax
+ \def\SOUL@everyspace##1{##1\space}%
+ \let\SOUL@everyhyphen\relax
+ \def\SOUL@everyexhyphen##1{##1}%
+ \let\SOUL@everylowerthan\relax
+}
+\SOUL@setup
+\def\SOUL@sosetletterskip{\nobreak\hskip\SOUL@soletterskip}
+\def\SOUL@sopreamble{%
+ \ifdim\lastskip>5sp
+ \unskip
+ \hskip\SOUL@soouterskip
+ \fi
+ \spaceskip\SOUL@soinnerskip
+}
+\def\SOUL@sopostamble{%
+ \global\skip@=\SOUL@soouterskip
+ \aftergroup\SOUL@socheck
+}
+\def\SOUL@socheck{%
+ \futurelet\SOUL@@\SOUL@sodoouter
+}
+\def\SOUL@sodoouter{%
+ \def\SOUL@n*##1{\hskip\skip@}%
+ \ifcat\egroup\noexpand\SOUL@@
+ \unkern
+ \egroup
+ \def\SOUL@n*{\afterassignment\SOUL@socheck\let\SOUL@x=}%
+ \else\ifx\SOUL@spc\SOUL@@
+ \def\SOUL@n* {\hskip\skip@}%
+ \else\ifx~\SOUL@@
+ \def\SOUL@n*~{\nobreak\hskip\skip@}%
+ \else\ifx\ \SOUL@@
+ \else\ifx\space\SOUL@@
+ \else\ifx\@xobeysp\SOUL@@
+ \else
+ \def\SOUL@n*{}%
+ \let\SOUL@@\relax
+ \fi\fi\fi\fi\fi\fi
+ \SOUL@n*%
+}
+\def\SOUL@soeverytoken{%
+ \edef\x{\the\SOUL@token}%
+ \ifx\x\SOUL@lowerthanM
+ \else
+ \global\let\SOUL@soeventuallyskip\SOUL@sosetletterskip
+ \the\SOUL@token
+ \SOUL@gettoken
+ \edef\x{\the\SOUL@token}%
+ \ifx\x\SOUL@stopM
+ \else
+ \SOUL@setkern\SOUL@charkern
+ \SOUL@sosetletterskip
+ \SOUL@puttoken
+ \fi
+ \fi
+}
+\def\SOUL@soeveryspace#1{#1\space\kern\z@}
+\def\SOUL@soeveryhyphen{%
+ \discretionary{%
+ \unkern
+ \SOUL@setkern\SOUL@hyphkern
+ \SOUL@sethyphenchar
+ }{}{}%
+}
+\def\SOUL@soeveryexhyphen#1{%
+ \SOUL@setkern\SOUL@hyphkern
+ \SOUL@soeventuallyskip
+ \hbox{#1}%
+ \discretionary{}{}{%
+ \SOUL@setkern\SOUL@charkern
+ }%
+ \SOUL@sosetletterskip
+ \global\let\SOUL@soeventuallyskip\relax
+}
+\def\SOUL@soeverylowerthan{%
+ \unskip
+ \unpenalty
+ \global\let\SOUL@soeventuallyskip\relax
+ \SOUL@setkern\SOUL@charkern
+}
+\def\SOUL@sosetup{%
+ \SOUL@setup
+ \let\SOUL@preamble\SOUL@sopreamble
+ \let\SOUL@postamble\SOUL@sopostamble
+ \let\SOUL@everytoken\SOUL@soeverytoken
+ \let\SOUL@everyspace\SOUL@soeveryspace
+ \let\SOUL@everyhyphen\SOUL@soeveryhyphen
+ \let\SOUL@everyexhyphen\SOUL@soeveryexhyphen
+ \let\SOUL@everylowerthan\SOUL@soeverylowerthan
+}
+\def\SOUL@setso#1#2#3{%
+ \def\SOUL@soletterskip{#1}%
+ \def\SOUL@soinnerskip{#2}%
+ \def\SOUL@soouterskip{#3}%
+}
+\def\sodef#1#2#3#4#5{%
+ \DeclareRobustCommand*#1{\SOUL@sosetup
+ \def\SOUL@preamble{%
+ \SOUL@setso{#3}{#4}{#5}%
+ #2%
+ \SOUL@sopreamble
+ }%
+ \SOUL@
+ }%
+}
+\def\resetso{%
+ \sodef\textso{}{.25em}{.65em\@plus.08em\@minus.06em}%
+ {.55em\@plus.275em\@minus.183em}%
+}
+\resetso
+\sodef\sloppyword{%
+ \linepenalty10
+ \hyphenpenalty10
+ \adjdemerits\z@
+ \doublehyphendemerits\z@
+ \finalhyphendemerits\z@
+ \emergencystretch.1em}%
+ {\z@\@plus.1em}%
+ {.33em\@plus.11em\@minus.11em}%
+ {.33em\@plus.11em\@minus.11em}
+\ifx\documentclass\@undefined
+\let\capsfont\relax
+\let\capsreset\relax
+\def\capsdef#1#2#3#4#5{}
+\def\capssave#1{}
+\def\capsselect#1{}
+\sodef\textcaps{\capsfont}
+ {.028em\@plus.005em\@minus.01em}%
+ {.37em\@plus.1667em\@minus.111em}%
+ {.37em\@plus.1em\@minus.14em}
+\else
+\DeclareRobustCommand*\capsreset{%
+ \let\SOUL@capsbase\empty
+ \SOUL@capsdefault
+}
+\def\capsdef#1#2#3#4#5{{%
+ \toks\z@{\\{#1/#2/#3/#4/#5}}%
+ \toks\tw@=\expandafter{\SOUL@capsbase}%
+ \xdef\SOUL@capsbase{\the\toks\z@\the\toks\tw@}%
+}}
+\DeclareRobustCommand*\capssave[1]{%
+ \expandafter\global\expandafter\let
+ \csname SOUL@db@#1\endcsname\SOUL@capsbase
+}
+\DeclareRobustCommand*\capsselect[1]{%
+ \expandafter\let\expandafter\SOUL@capsbase
+ \csname SOUL@db@#1\endcsname
+}
+\def\SOUL@capsfind#1/#2/#3/#4/#5/#6/#7/#8/#9/{%
+ \let\SOUL@match=1%
+ \SOUL@chk{#1}\f@encoding
+ \SOUL@chk{#2}\f@family
+ \SOUL@chk{#3}\f@series
+ \SOUL@chk{#4}\f@shape
+ \SOUL@dimchk{#5}\f@size
+ \if\SOUL@match1%
+ \let\\\@gobble
+ \gdef\SOUL@caps{%
+ \SOUL@sosetup
+ \def\SOUL@preamble{\SOUL@setso{#7}{#8}{#9}#6%
+ \SOUL@sopreamble}%
+ \SOUL@}%
+ \fi
+}
+\def\SOUL@chk#1#2{%
+ \if$#1$%
+ \else
+ \def\SOUL@n{#1}%
+ \ifx#2\SOUL@n\else\let\SOUL@match=0\fi
+ \fi
+}
+\def\SOUL@dimchk#1#2{\if$#1$\else\SOUL@rangechk{#2}#1--\@ne\@@\fi}
+\def\SOUL@rangechk#1#2-#3-#4\@@{%
+ \count@=#4%
+ \ifnum\count@>\z@
+ \ifdim#1\p@=#2\p@\else\let\SOUL@match=0\fi
+ \else
+ \dimen@=\if$#2$\z@\else#2\p@\fi
+ \ifdim#1\p@<\dimen@\let\SOUL@match=0\fi
+ \dimen@=\if$#3$\maxdimen\else#3\p@\fi
+ \ifdim#1\p@<\dimen@\else\let\SOUL@match=0\fi
+ \fi
+}
+\DeclareRobustCommand*\textcaps{{%
+ \def\\##1{\expandafter\SOUL@capsfind##1/}%
+ \SOUL@capsbase
+ \aftergroup\SOUL@caps
+}}
+\def\SOUL@capsdefault{%
+ \capsdef{////}%
+ \SOUL@capsdfltfnt
+ {.028em\@plus.005em\@minus.01em}%
+ {.37em\@plus.1667em\@minus.1em}%
+ {.37em\@plus.111em\@minus.14em}%
+}
+\let\SOUL@capsdfltfnt\scshape
+\capsreset
+\fi
+\newdimen\SOUL@uldp
+\newdimen\SOUL@ulht
+\def\SOUL@ulleaders{%
+ \leaders\hrule\@depth\SOUL@uldp\@height\SOUL@ulht\relax
+}
+\def\SOUL@ulunderline#1{{%
+ \setbox\z@\hbox{#1}%
+ \dimen@=\wd\z@
+ \dimen@i=\SOUL@uloverlap
+ \advance\dimen@2\dimen@i
+ \rlap{%
+ \null
+ \kern-\dimen@i
+ \SOUL@ulcolor{\SOUL@ulleaders\hskip\dimen@}%
+ }%
+ \unhcopy\z@
+}}
+\def\SOUL@ulpreamble{%
+ \SOUL@uldp=\SOUL@uldepth
+ \SOUL@ulht=-\SOUL@uldp
+ \advance\SOUL@uldp\SOUL@ulthickness
+ \spaceskip\SOUL@spaceskip
+}
+\def\SOUL@uleverysyllable{%
+ \SOUL@ulunderline{%
+ \the\SOUL@syllable
+ \SOUL@setkern\SOUL@charkern
+ }%
+}
+\def\SOUL@uleveryspace#1{%
+ \SOUL@ulcolor{%
+ #1%
+ \SOUL@ulleaders
+ \hskip\spaceskip
+ }%
+ \null
+}
+\def\SOUL@uleveryhyphen{%
+ \discretionary{%
+ \unkern
+ \SOUL@ulunderline{%
+ \SOUL@setkern\SOUL@hyphkern
+ \SOUL@sethyphenchar
+ }%
+ }{}{}%
+}
+\def\SOUL@uleveryexhyphen#1{%
+ \SOUL@setkern\SOUL@hyphkern
+ \SOUL@ulunderline{#1}%
+ \discretionary{}{}{%
+ \SOUL@setkern\SOUL@charkern
+ }%
+}
+\let\SOUL@ulcolor\relax
+\def\setulcolor#1{%
+ \if$#1$
+ \let\SOUL@ulcolor\relax
+ \else
+ \def\SOUL@ulcolor{\textcolor{#1}}%
+ \fi
+}
+\def\setuloverlap#1{\def\SOUL@uloverlap{#1}}
+\setuloverlap{.25pt}
+\def\SOUL@ulsetup{%
+ \SOUL@setup
+ \let\SOUL@preamble\SOUL@ulpreamble
+ \let\SOUL@everysyllable\SOUL@uleverysyllable
+ \let\SOUL@everyspace\SOUL@uleveryspace
+ \let\SOUL@everyhyphen\SOUL@uleveryhyphen
+ \let\SOUL@everyexhyphen\SOUL@uleveryexhyphen
+}
+\DeclareRobustCommand*\textul{\SOUL@ulsetup\SOUL@}
+\def\setul#1#2{%
+ \if$#1$\else\def\SOUL@uldepth{#1}\fi
+ \if$#2$\else\def\SOUL@ulthickness{#2}\fi
+}
+\def\resetul{\setul{.65ex}{.1ex}}
+\resetul
+\def\setuldepth#1{{%
+ \def\SOUL@n{#1}%
+ \setbox\z@\hbox{%
+ \tracinglostchars\z@
+ \ifx\SOUL@n\empty
+ \count@\z@
+ \loop
+ \ifnum\catcode\count@=11\char\count@\fi
+ \ifnum\count@<\@cclv
+ \advance\count@\@ne
+ \repeat
+ \else
+ #1%
+ \fi
+ }%
+ \dimen@\dp\z@
+ \advance\dimen@\p@
+ \xdef\SOUL@uldepth{\the\dimen@}%
+}}
+\def\SOUL@stpreamble{%
+ \dimen@\SOUL@ulthickness
+ \dimen@i=-.5ex
+ \advance\dimen@i-.5\dimen@
+ \edef\SOUL@uldepth{\the\dimen@i}%
+ \let\SOUL@ulcolor\SOUL@stcolor
+ \SOUL@ulpreamble
+}
+\def\SOUL@stsetup{%
+ \SOUL@ulsetup
+ \let\SOUL@preamble\SOUL@stpreamble
+}
+\DeclareRobustCommand*\textst{\SOUL@stsetup\SOUL@}
+\let\SOUL@stcolor\relax
+\def\setstcolor#1{%
+ \if$#1$
+ \let\SOUL@stcolor\relax
+ \else
+ \def\SOUL@stcolor{\textcolor{#1}}%
+ \fi
+}
+\def\SOUL@hlpreamble{%
+ \setul{}{2.5ex}%
+ \let\SOUL@stcolor\SOUL@hlcolor
+ \SOUL@stpreamble
+}
+\def\SOUL@hlsetup{%
+ \SOUL@stsetup
+ \let\SOUL@preamble\SOUL@hlpreamble
+}
+\DeclareRobustCommand*\texthl{\SOUL@hlsetup\SOUL@}
+\def\sethlcolor#1{\if$#1$\else\def\SOUL@hlcolor{\textcolor{#1}}\fi}
+\sethlcolor{yellow}
+\let\so\textso
+\let\ul\textul
+\let\st\textst
+\let\hl\texthl
+\let\caps\textcaps
+\ifx\documentclass\@undefined
+ \ifx\mdqoff\@undefined
+ \else
+ \soulaccent{"}%
+ \fi
+ \catcode`\@=\atcode
+\else
+ \bgroup
+ \catcode`\"\active
+ \AtBeginDocument{%
+ \@ifundefined{color}{%
+ \let\SOUL@color\relax
+ \let\setulcolor\@gobble
+ \let\setstcolor\@gobble
+ \let\sethlcolor\@gobble
+ \let\hl\ul
+ }{}
+ \@ifundefined{mdqoff}{}{\soulaccent{"}}
+ }
+ \egroup
+ \DeclareOption{capsdefault}{%
+ \AtBeginDocument{%
+ \def\SOUL@capsdfltfnt#1{%
+ \SOUL@ulsetup
+ \SOUL@ulpreamble
+ \scshape
+ }%
+ }%
+ }
+ \InputIfFileExists{soul.cfg}%
+ {\PackageInfo{soul}{Local config file soul.cfg used}}{}
+ \ProcessOptions
+\fi
+\endinput
+%%
+%% End of file `soul.sty'.
diff --git a/tex/.texmf/tex/latex/misc/tcolorbox.sty b/tex/.texmf/tex/latex/misc/tcolorbox.sty
new file mode 100644
index 0000000..daf0c19
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/tcolorbox.sty
@@ -0,0 +1,2130 @@
+%% The LaTeX package tcolorbox - version 3.96 (2016/11/18)
+%% tcolorbox.sty: Text color boxes
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2006-2016 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% 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 `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{tcolorbox}[2016/11/18 version 3.96 text color boxes]
+\def\tcb@version{3.96}
+
+\RequirePackage{pgf}[2008/01/15]
+\RequirePackage{verbatim}[2003/08/22]
+\RequirePackage{environ}[2013/04/01]
+\RequirePackage{etoolbox}[2011/01/03]
+
+% register
+\newif\iftcb@lowerignored
+\newif\iftcb@lowervisible
+\newif\iftcb@uppervisible
+\newif\iftcb@hasTitle
+\newif\iftcb@hasLower
+\newif\iftcb@lowerspace
+\newif\iftcb@sidebyside
+\newif\iftcb@hasPhantom
+\newif\iftcb@lowerseparated
+\newif\iftcb@titlefilled
+\newif\iftcb@fixedheight
+\newif\iftcb@ignorenobreak
+\newif\iftcb@checkpage
+
+\newbox\tcb@titlebox
+\newbox\tcb@upperbox
+\newbox\tcb@lowerbox
+\newbox\tcb@phantombox
+
+\newcounter{tcbbreakpart}
+\newcounter{tcblayer}
+\newcount\tcolorbox@number
+
+\def\tcb@warning#1{\PackageWarning{tcolorbox}{#1}}
+\def\tcb@error#1#2{\PackageError{tcolorbox}{#1}{#2}}
+
+% key management
+\pgfkeys{/tcb/.is family}
+
+\def\tcbset{\pgfqkeys{/tcb}}
+\long\def\tcbset@late@options#1{\appto\tcb@lateoptions@hook{\tcbset{#1}}}
+
+\def\tcb@dim@to#1#2{\def#1{\the\dimexpr#2\relax}}
+\def\tcbdimto#1#2{\edef#1{\the\dimexpr#2\relax}}
+
+\def\tcb@defToTotalHeightStandard#1#2{\tcbdimto#1{\ht#2+\dp#2}}
+\let\tcb@defToTotalHeight\tcb@defToTotalHeightStandard
+
+\def\tcb@zpt{0pt}
+
+\def\tcb@comp@arc@auto{%
+ \let\tcb@outer@arc=\kvtcb@top@rule@stand%
+ \ifdim\kvtcb@bottom@rule@stand<\tcb@outer@arc\relax%
+ \let\tcb@outer@arc=\kvtcb@bottom@rule@stand\fi%
+ \ifdim\kvtcb@left@rule<\tcb@outer@arc\relax%
+ \let\tcb@outer@arc=\kvtcb@left@rule\fi%
+ \ifdim\kvtcb@right@rule<\tcb@outer@arc\relax%
+ \let\tcb@outer@arc=\kvtcb@right@rule\fi%
+ \tcbdimto\tcb@outer@arc{\tcb@arc@scale\dimexpr\tcb@outer@arc\relax+\kvtcb@arc}%
+}
+
+\def\tcb@comp@arc@fix{%
+ \tcbdimto\tcb@outer@arc{\kvtcb@outerarc}%
+}
+
+\def\tcb@use@auto@parskip{%
+ \tcbset{autoparskip}%
+}
+
+\def\tcb@hack@currenvir{\edef\tcb@temp{\noexpand\def\noexpand\@currenvir{\kvtcb@savedelimiter}}\tcb@temp}
+
+\def\tcb@sbs@quota@leftwidth{%
+ \tcbdimto\tcb@w@upper{\kvtcb@sbs@ratio}%
+ \tcbdimto\tcb@w@lower{\tcb@w@sbs-\tcb@w@upper}%
+}
+
+\def\tcb@sbs@quota@rightwidth{%
+ \tcbdimto\tcb@w@lower{\kvtcb@sbs@ratio}%
+ \tcbdimto\tcb@w@upper{\tcb@w@sbs-\tcb@w@lower}%
+}
+
+\def\tcb@sbs@quota@leftratio{%
+ \tcbdimto\tcb@w@upper{\kvtcb@sbs@ratio\dimexpr\tcb@w@sbs}%
+ \tcbdimto\tcb@w@lower{\tcb@w@sbs-\tcb@w@upper}%
+}
+
+\def\tcb@sbs@quota@rightratio{%
+ \tcbdimto\tcb@w@lower{\kvtcb@sbs@ratio\dimexpr\tcb@w@sbs}%
+ \tcbdimto\tcb@w@upper{\tcb@w@sbs-\tcb@w@lower}%
+}
+
+\def\tcb@shield@@externalize{%
+ \ifdefined\tikzexternaldisable%
+ \ifdefined\pgfpictureid%
+ \else%
+ \tikzexternaldisable%
+ \fi%
+ \fi}
+
+\def\tcb@set@embed@tcbox#1{%
+ \long\def\tcb@embed@tcbox##1{%
+ \tcbdimto\tcb@w@upper{\kvtcb@width-(\kvtcb@left@rule+\kvtcb@leftupper+(\kvtcb@boxsep)*2+\kvtcb@rightupper+\kvtcb@right@rule)}%
+ #1}%
+}
+
+\def\tcb@new@skin#1#2{\tcbset{skin@#1/.style={#2}}}
+\newcommand{\tcbsubskin}[3]{\tcb@new@skin{#1}{skin@#2,#3}}
+
+\pgfkeys{/handlers/.dimstore in/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\def#1{\the\dimexpr##1\relax}}}
+\pgfkeys{/handlers/.colorlet/.code=\pgfkeysalso{\pgfkeyscurrentpath/.code=\colorlet{#1}{##1}}}
+
+\newcommand\tcbtitle{\ifx\tcbtitletext\@empty\else%
+ \leavevmode{\color{tcbcol@title}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\tcbtitletext\kvtcb@after@title}\fi}
+
+\def\tcb@detach@title@code@{%
+ \let\tcbtitletext\kvtcb@title%
+ \let\kvtcb@title\@empty%
+ \tcbset{title/.store in=\tcbtitletext}%
+ \let\tcb@detach@title@code\@empty%
+ \let\tcb@attach@title@code\tcb@attach@title@code@%
+ \let\tcb@specialtitle@hook\@empty%
+}
+
+\def\tcb@attach@title@code@{%
+ \let\kvtcb@title\tcbtitletext%
+ \let\tcbtitletext\@empty%
+ \tcbset{title/.store in=\kvtcb@title}%
+ \let\tcb@attach@title@code\@empty%
+ \let\tcb@detach@title@code\tcb@detach@title@code@%
+ \let\tcb@specialtitle@hook\@empty%
+}
+
+\def\tcb@gettitle#1{\protected@edef\@currentlabelname{#1}}
+
+\AfterEndPreamble{%
+ \ifdefined\NR@gettitle%
+ \let\tcb@gettitle\NR@gettitle%
+ \fi%
+}
+
+% analog to plain.tex
+\def\tcb@raggedright@plain{\raggedright\rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax}
+\def\tcb@raggedleft@plain{\raggedleft\leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \hbadness=10000\relax}
+\def\tcb@raggedcenter@plain{\centering\leftskip0pt plus2em\rightskip0pt plus2em\spaceskip.3333em \xspaceskip.5em \hbadness=10000\relax}
+
+\tcbset{%
+ title/.store in=\kvtcb@title,
+ notitle/.style={title=},
+ adjust text/.store in=\kvtcb@adjusttext,
+ adjusted title/.style={title={#1\vphantom{\kvtcb@adjusttext}}},
+ squeezed title/.style={title={%
+ \setbox\z@=\color@hbox#1\color@endbox%
+ \ifdim\wd\z@>\linewidth\relax%
+ \resizebox{\linewidth}{\height}{\unhbox\z@}%
+ \else%
+ \unhbox\z@%
+ \fi%
+ }},
+ squeezed title*/.style={squeezed title={#1\vphantom{\kvtcb@adjusttext}}},%
+ detach title/.code=\tcb@detach@title@code,%
+ attach title/.code=\tcb@attach@title@code,%
+ attach title to upper/.style={detach title,before upper={\ifx\tcbtitletext\@empty\else\tcbtitle#1\fi}},
+ attach title to upper/.default=,
+ subtitle style/.store in=\kvtcb@subtitle@style,%
+ width/.store in=\kvtcb@width,
+ text width/.style={width={#1+\kvtcb@left@rule+\kvtcb@right@rule+\kvtcb@boxsep*2+\kvtcb@leftupper+\kvtcb@rightupper}},%
+ add to width/.code={\tcbdimto\kvtcb@width{\kvtcb@width+(#1)}},%
+ boxsep/.store in=\kvtcb@boxsep,
+ toprule/.code={%
+ \def\kvtcb@top@rule@stand{#1}%
+ \let\kvtcb@top@rule@break=\kvtcb@top@rule@stand%
+ },
+ bottomrule/.code={%
+ \def\kvtcb@bottom@rule@stand{#1}%
+ \let\kvtcb@bottom@rule@break=\kvtcb@bottom@rule@stand%
+ },
+ leftrule/.store in=\kvtcb@left@rule,
+ rightrule/.store in=\kvtcb@right@rule,
+ titlerule/.store in=\kvtcb@title@rule,
+ boxrule/.code={
+ \def\kvtcb@top@rule@stand{#1}%
+ \let\kvtcb@top@rule@break=\kvtcb@top@rule@stand%
+ \let\kvtcb@bottom@rule@stand=\kvtcb@top@rule@stand%
+ \let\kvtcb@bottom@rule@break=\kvtcb@top@rule@stand%
+ \let\kvtcb@left@rule=\kvtcb@top@rule@stand%
+ \let\kvtcb@right@rule=\kvtcb@top@rule@stand%
+ \let\kvtcb@title@rule=\kvtcb@top@rule@stand%
+ },
+ arc/.store in=\kvtcb@arc,
+ outer arc/.code={\def\kvtcb@outerarc{#1}\let\tcb@comp@arc=\tcb@comp@arc@fix},
+ auto outer arc/.code={\let\tcb@comp@arc=\tcb@comp@arc@auto},
+ circular arc/.style={arc=\tcb@innerwidth/2},
+ bean arc/.code={%
+ \iftcb@fixedheight%
+ \ifdim\dimexpr\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule)>\dimexpr\kvtcb@height@fixed-(\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand)\relax%
+ \def\kvtcb@arc{(\kvtcb@height@fixed-(\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand))/2}%
+ \else%
+ \def\kvtcb@arc{(\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule))/2}%
+ \fi%
+ \else%
+ \def\kvtcb@arc{\tcb@innerwidth/2}%
+ \fi%
+ },
+ octogon arc/.style={arc=0.292893218\dimexpr\tcb@innerwidth\relax},
+ arc is curved/.code={%
+ \def\tcb@arc@scale{1}%
+ \let\tcb@apply@graph@patches=\tcbpatcharcround%
+ },
+ arc is angular/.code={%
+ \def\tcb@arc@scale{0.58578644}%
+ \let\tcb@apply@graph@patches=\tcbpatcharcangular%
+ },
+ sharpish corners/.style={arc=0pt,outer arc=0pt},
+ lefttitle/.store in=\kvtcb@lefttitle,
+ leftupper/.store in=\kvtcb@leftupper,
+ leftlower/.store in=\kvtcb@leftlower,
+ left/.style={lefttitle=#1,leftupper=#1,leftlower=#1},
+ righttitle/.store in=\kvtcb@righttitle,
+ rightupper/.store in=\kvtcb@rightupper,
+ rightlower/.store in=\kvtcb@rightlower,
+ right/.style={righttitle=#1,rightupper=#1,rightlower=#1},
+ top/.store in=\kvtcb@top,
+ toptitle/.store in=\kvtcb@toptitle,
+ bottom/.store in=\kvtcb@bottom,
+ bottomtitle/.store in=\kvtcb@bottomtitle,
+ middle/.store in=\kvtcb@middle,
+ colback/.colorlet=tcbcol@back,
+ colframe/.colorlet=tcbcol@frame,
+ colupper/.colorlet=tcbcol@upper,
+ collower/.colorlet=tcbcol@lower,
+ coltext/.style={colupper=#1,collower=#1},
+ coltitle/.colorlet=tcbcol@title,
+ fonttitle/.store in=\kvtcb@fonttitle,
+ fontupper/.store in=\kvtcb@fontupper,
+ fontlower/.store in=\kvtcb@fontlower,
+ tempfile/.store in=\kvtcb@tempfile,
+ savelowerto/.store in=\kvtcb@savelowerto,
+ saveto/.store in=\kvtcb@saveupperto,
+ savedelimiter/.estore in=\kvtcb@savedelimiter,
+ floatplacement/.store in=\kvtcb@floatplacement,
+ float/.code={\def\kvtcb@float{#1}\def\tcb@float@env@begin{\@float}\def\tcb@float@env@end{\end@float}},
+ float/.default=\kvtcb@floatplacement,
+ float*/.code={\def\kvtcb@float{#1}\def\tcb@float@env@begin{\@dblfloat}\def\tcb@float@env@end{\end@dblfloat}},
+ float*/.default=\kvtcb@floatplacement,
+ every float/.store in=\kvtcb@everyfloat,%
+ nofloat/.style={float=},
+ before/.code={\def\kvtcb@beforebox{#1}\let\tcb@undo@before=\@empty\let\tcb@use@autoparskip=\relax},
+ after/.code={\def\kvtcb@afterbox{#1}\let\tcb@use@autoparskip=\relax},
+ autoparskip/.code={\let\tcb@use@autoparskip=\tcb@use@auto@parskip},
+ parskip/.style={before={\ifnum\lastnodetype=-1\relax\else\par%
+ \ifvmode\edef\tcb@prevdepth{\the\glueexpr\prevdepth+\lineskip+\parskip}%
+ \def\tcb@undo@before{\addvspace{-\glueexpr\tcb@prevdepth}}%
+ \pagebreak[0]\fi\fi\parindent=0pt},
+ after={\par}},
+ noparskip/.style={before={\ifnum\lastnodetype=-1\relax\else\par%
+ \ifvmode\edef\tcb@prevdepth{\the\glueexpr\prevdepth+\lineskip}%
+ \def\tcb@undo@before{\addvspace{-\glueexpr\smallskipamount+\tcb@prevdepth}}%
+ \pagebreak[0]\smallskip\fi\fi\parindent=0pt},
+ after={\par\smallskip}},
+ nobeforeafter/.style={before=,after=},
+ force nobeforeafter/.code={\tcbset@late@options{nobeforeafter}},
+ before skip/.style={before={%
+ \ifnum\lastnodetype=-1\relax%
+ \else%
+ \par%
+ \ifvmode\tcbdimto\tcb@prevdepth{\prevdepth}\nointerlineskip%
+ \addvspace{\glueexpr#1-\parskip}%
+ \def\tcb@undo@before{\addvspace{-\glueexpr#1+\tcb@prevdepth}}%
+ \fi%
+ \fi%
+ \lineskip=0pt\noindent%
+ }},
+ after skip/.style={after={%
+ \par\ifvmode\nointerlineskip%
+ \addvspace{\glueexpr#1-\parskip}\fi%
+ }},
+ beforeafter skip/.style={before skip={#1},after skip={#1}},
+ before nobreak/.store in=\kvtcb@beforebox@nobreak,
+ lowerbox/.is choice,
+ lowerbox/visible/.code={\tcb@lowerignoredfalse\tcb@lowervisibletrue},
+ lowerbox/invisible/.code={\tcb@lowerignoredfalse\tcb@lowervisiblefalse},
+ lowerbox/ignored/.code={\tcb@lowerignoredtrue\tcb@lowervisiblefalse},
+ upperbox/.is choice,
+ upperbox/visible/.code={\tcb@uppervisibletrue},
+ upperbox/invisible/.code={\tcb@uppervisiblefalse},
+ visible/.style={upperbox=visible,lowerbox=visible},
+ invisible/.style={upperbox=invisible,lowerbox=invisible},
+ natural height/.code={\tcb@fixedheightfalse\tcb@@ch@@operation{\tcb@ch@natural}},
+ height/.code={\tcb@fixedheighttrue\tcb@dim@to\kvtcb@height@fixed{#1}\tcb@@ch@@operation{\tcb@ch@fixed}},
+ text height/.code={\tcb@fixedheighttrue\tcb@dim@to\kvtcb@height@fixed{#1}\tcb@@ch@@operation{\tcb@ch@innerfixed}},
+ add to height/.code={\iftcb@fixedheight\tcbdimto\kvtcb@height@fixed{\kvtcb@height@fixed+(#1)}\fi},
+ add to natural height/.code={\tcb@fixedheightfalse\def\kvtcb@height@natural@plus{#1}\tcb@@ch@@operation{\tcb@ch@natural@plus}},
+ height plus/.dimstore in=\kvtcb@height@fixed@plus,%
+ height from/.style args={#1 to #2}{height={#1},height plus={#2-(#1)}},%
+ height fill/.is choice,%
+ height fill/false/.code={\let\tcb@height@adjust\@empty},%
+ square/.style={height=\kvtcb@width},
+ equal height group/.code={\tcb@fixedheightfalse\edef\tcb@ehgid{#1}\tcb@@ch@@operation{\tcb@ch@equalheight}},
+ minimum for equal height group/.code args={#1:#2}{\bgroup\edef\tcb@ehgid{#1}\tcbdimto\tcb@min@ehg{#2}\tcb@ehgadd{\tcb@min@ehg}\egroup},
+ minimum for current equal height group/.code={\ifcsundef{tcb@ehgid}{}{%
+ \tcbset{minimum for equal height group=\tcb@ehgid:#1}}},
+ use height from group/.code={\ifcsundef{tcb@ehg@height@#1}{}{\tcbset{height=\csuse{tcb@ehg@height@#1}}}},
+ use height from group/.default={\csuse{tcb@ehgid}},
+ space/.code={\def\tcb@height@fraction{#1}%
+ \let\tcb@ch@fixed@both=\tcb@ch@fixed@space%
+ \let\tcb@ch@fixed@upper=\tcb@ch@fixed@upper@standard%
+ },
+ space to upper/.style={space=1},
+ space to lower/.style={space=0},
+ space to both/.style={space=0.5},
+ split/.code={\def\tcb@height@fraction{#1}%
+ \let\tcb@ch@fixed@both=\tcb@ch@fixed@space%
+ \let\tcb@ch@fixed@upper=\tcb@ch@fixed@upper@standard%
+ },
+ space to/.code={%
+ \ifcsdef{tcb@space@\thetcolorboxnumber}{%
+ \letcs{\tcb@space}{tcb@space@\thetcolorboxnumber}%
+ }{}%
+ \let#1\tcb@space%
+ \let\tcb@ch@fixed@both=\tcb@ch@fixed@spacesave%
+ \let\tcb@ch@fixed@upper=\tcb@ch@fixed@spacesave%
+ },
+ %
+ halign/.is choice,
+ halign/flush left/.code={\let\kvtcb@halignupper=\raggedright},
+ halign/flush right/.code={\let\kvtcb@halignupper=\raggedleft},
+ halign/flush center/.code={\let\kvtcb@halignupper=\centering},
+ halign/left/.code={\let\kvtcb@halignupper=\tcb@raggedright@plain},
+ halign/right/.code={\let\kvtcb@halignupper=\tcb@raggedleft@plain},
+ halign/center/.code={\let\kvtcb@halignupper=\tcb@raggedcenter@plain},
+ halign/justify/.code={\let\kvtcb@halignupper=\@empty},
+ halign upper/.style={halign=#1},
+ %
+ halign lower/.is choice,
+ halign lower/flush left/.code={\let\kvtcb@halignlower=\raggedright},
+ halign lower/flush right/.code={\let\kvtcb@halignlower=\raggedleft},
+ halign lower/flush center/.code={\let\kvtcb@halignlower=\centering},
+ halign lower/left/.code={\let\kvtcb@halignlower=\tcb@raggedright@plain},
+ halign lower/right/.code={\let\kvtcb@halignlower=\tcb@raggedleft@plain},
+ halign lower/center/.code={\let\kvtcb@halignlower=\tcb@raggedcenter@plain},
+ halign lower/justify/.code={\let\kvtcb@halignlower=\@empty},
+ %
+ halign title/.is choice,
+ halign title/flush left/.code={\let\kvtcb@haligntitle=\raggedright},
+ halign title/flush right/.code={\let\kvtcb@haligntitle=\raggedleft},
+ halign title/flush center/.code={\let\kvtcb@haligntitle=\centering},
+ halign title/left/.code={\let\kvtcb@haligntitle=\tcb@raggedright@plain},
+ halign title/right/.code={\let\kvtcb@haligntitle=\tcb@raggedleft@plain},
+ halign title/center/.code={\let\kvtcb@haligntitle=\tcb@raggedcenter@plain},
+ halign title/justify/.code={\let\kvtcb@haligntitle=\@empty},
+ %
+ valign scale limit/.store in=\kvtcbv@valignscalelimit,
+ valign scale limit=1.1,
+ valign/.is choice,
+ valign/top/.code={\def\kvtcb@valignupper{top}},
+ valign/center/.code={\def\kvtcb@valignupper{center}},
+ valign/bottom/.code={\def\kvtcb@valignupper{bottom}},
+ valign/scale/.code={\def\kvtcb@valignupper{resize}},
+ valign/scale*/.code={\def\kvtcb@valignupper{resizelimited}},
+ valign upper/.style={valign=#1},
+ valign lower/.is choice,
+ valign lower/top/.code={\def\kvtcb@valignlower{top}},
+ valign lower/center/.code={\def\kvtcb@valignlower{center}},
+ valign lower/bottom/.code={\def\kvtcb@valignlower{bottom}},
+ valign lower/scale/.code={\def\kvtcb@valignlower{resize}},
+ valign lower/scale*/.code={\def\kvtcb@valignlower{resizelimited}},
+ enlarge top initially by/.store in=\kvtcb@bbtop@stand,%
+ enlarge top at break by/.store in=\kvtcb@bbtop@break,%
+ enlarge top by/.style={enlarge top initially by={#1},enlarge top at break by={#1}},%
+ enlarge bottom finally by/.store in=\kvtcb@bbbottom@stand,%
+ enlarge bottom at break by/.store in=\kvtcb@bbbottom@break,%
+ enlarge bottom by/.style={enlarge bottom finally by={#1},enlarge bottom at break by={#1}},%
+ enlarge left by/.store in=\kvtcb@bbleft,
+ enlarge right by/.store in=\kvtcb@bbright,
+ enlarge by/.style={enlarge top by={#1},enlarge bottom by={#1},enlarge left by={#1},enlarge right by={#1}},%
+ grow to left by/.code={%
+ \tcbdimto\kvtcb@width{\kvtcb@width+#1}%
+ \pgfkeysalso{enlarge left by={-\the\dimexpr#1\relax}}},%
+ grow to right by/.code={%
+ \tcbdimto\kvtcb@width{\kvtcb@width+#1}%
+ \pgfkeysalso{enlarge right by={-\the\dimexpr#1\relax}}},%
+ left skip/.style={grow to left by={-\dimexpr#1\relax}},
+ right skip/.style={grow to right by={-\dimexpr#1\relax}},
+ leftright skip/.style={left skip={#1},right skip={#1}},
+ toggle enlargement/.is choice,
+ toggle enlargement/none/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@none},
+ toggle enlargement/evenpage/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@evenpage\tcbset{check odd page}},
+ toggle enlargement/forced/.code={\let\tcb@setbb@toggle=\tcb@setbb@toggle@forced},
+ toggle enlargement/.default=evenpage,
+ toggle left and right/.is choice,
+ toggle left and right/none/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@none},
+ toggle left and right/evenpage/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@evenpage\tcbset{check odd page}},
+ toggle left and right/forced/.code={\let\tcb@lrtoggle=\tcb@lrtoggle@forced},
+ toggle left and right/.default=evenpage,
+ graphical environment/.store in=\kvtcb@graphenv,
+ %
+ frame engine/.is choice,
+ frame engine/standard/.style={frame code=\tcb@drawframe@standard},
+ frame engine/standardjigsaw/.style={frame code=\tcb@drawframe@standardjigsaw},
+ frame code/.code={\def\tcb@frame@code{#1}},%
+ frame code/.default=\tcb@drawframe@standard,%
+ frame empty/.style={frame code=},
+ %
+ interior titled engine/.is choice,
+ interior titled engine/standard/.style={interior titled code=\tcb@drawwithtitle@standard},
+ interior titled code/.code={\def\tcb@interiortitled@code{#1}},%
+ interior titled code/.default=\tcb@drawwithtitle@standard,%
+ interior titled empty/.style={interior titled code=},
+ %
+ interior engine/.is choice,
+ interior engine/standard/.style={interior code=\tcb@drawwithouttitle@standard},
+ interior code/.code={\def\tcb@interior@code{#1}},%
+ interior code/.default=\tcb@drawwithouttitle@standard,%
+ interior empty/.style={interior code=},
+ %
+ segmentation engine/.is choice,
+ segmentation engine/standard/.style={segmentation code=\tcb@drawlower@standard},
+ segmentation code/.code={\def\tcb@segmentation@code{#1}},%
+ segmentation code/.default=\tcb@drawlower@standard,%
+ segmentation empty/.style={segmentation code=},
+ %
+ title engine/.is choice,
+ title engine/standard/.style={@title code=\tcb@drawtitle@standard},
+ @title code/.code={\def\tcb@title@code{#1}},%
+ @title code/.default=\tcb@drawtitle@standard,%
+ title code/.style={title filled,@title code={#1}},%
+ title code/.default=\tcb@drawtitle@standard,%
+ title empty/.style={@title code=},
+ %
+ geometry nodes/.store in=\kvtcb@geonodes,
+ geometry nodes/.default=true,%
+ set@extensions@preframe/.store in=\tcb@extensions@preframe,%
+ set@extensions@postframe/.store in=\tcb@extensions@postframe,%
+ set@extensions@final/.store in=\tcb@extensions@final,%
+ set@outerboundary/.store in=\tcb@outerboundary,%
+ skin first/.store in=\kvtcb@skin@first,
+ skin middle/.store in=\kvtcb@skin@middle,
+ skin last/.store in=\kvtcb@skin@last,
+ skin/.style={code={\edef\kvtcb@skin@current{#1}},skin@#1},
+ skin first is subskin of/.style 2 args={skin@local@first/.style={skin@#1,#2},skin first=local@first},%
+ skin middle is subskin of/.style 2 args={skin@local@middle/.style={skin@#1,#2},skin middle=local@middle},%
+ skin last is subskin of/.style 2 args={skin@local@last/.style={skin@#1,#2},skin last=local@last},%
+ parbox/.store in=\kvtcb@parbox,
+ parbox/.default=true,%
+ hyphenationfix/.is choice,%
+ hyphenationfix/.default=true,%
+ hyphenationfix/true/.code={\def\tcb@hyph@fix{\everypar=\expandafter{\the\everypar\everypar{\hspace{0pt}}\hspace{0pt}}}},%
+ hyphenationfix/false/.code={\let\tcb@hyph@fix=\@empty},%
+ overlay unbroken/.code={\def\tcb@overlay@unbroken{#1}},%
+ overlay first/.code={\def\tcb@overlay@first{#1}},%
+ overlay middle/.code={\def\tcb@overlay@middle{#1}},%
+ overlay last/.code={\def\tcb@overlay@last{#1}},%
+ overlay/.code={\def\tcb@overlay@temp{#1}%
+ \let\tcb@overlay@unbroken=\tcb@overlay@temp%
+ \let\tcb@overlay@first=\tcb@overlay@temp%
+ \let\tcb@overlay@middle=\tcb@overlay@temp%
+ \let\tcb@overlay@last=\tcb@overlay@temp},%
+ overlay broken/.code={\def\tcb@overlay@temp{#1}%
+ \let\tcb@overlay@first=\tcb@overlay@temp%
+ \let\tcb@overlay@middle=\tcb@overlay@temp%
+ \let\tcb@overlay@last=\tcb@overlay@temp},%
+ overlay unbroken and first/.code={\def\tcb@overlay@temp{#1}%
+ \let\tcb@overlay@unbroken=\tcb@overlay@temp%
+ \let\tcb@overlay@first=\tcb@overlay@temp},%
+ overlay unbroken and last/.code={\def\tcb@overlay@temp{#1}%
+ \let\tcb@overlay@unbroken=\tcb@overlay@temp%
+ \let\tcb@overlay@last=\tcb@overlay@temp},%
+ overlay middle and last/.code={\def\tcb@overlay@temp{#1}%
+ \let\tcb@overlay@middle=\tcb@overlay@temp%
+ \let\tcb@overlay@last=\tcb@overlay@temp},%
+ overlay first and middle/.code={\def\tcb@overlay@temp{#1}%
+ \let\tcb@overlay@first=\tcb@overlay@temp%
+ \let\tcb@overlay@middle=\tcb@overlay@temp},%
+ no overlay/.style={overlay=},%
+ standard/.style={skin=standard},%
+ standard jigsaw/.style={skin=standard jigsaw},%
+ before title/.store in=\kvtcb@before@title,%
+ after title/.store in=\kvtcb@after@title,%
+ before upper/.store in=\kvtcb@before@upper,%
+ after upper/.store in=\kvtcb@after@upper,%
+ after upper*/.style={after upper={#1}},%
+ before lower/.store in=\kvtcb@before@lower,%
+ after lower/.store in=\kvtcb@after@lower,%
+ after lower*/.style={after lower={#1}},%
+ center title/.style={halign title=flush center},%
+ center upper/.style={halign upper=flush center},%
+ center lower/.style={halign lower=flush center},%
+ flushleft title/.style={halign title=flush left},%
+ flushleft upper/.style={halign upper=flush left},%
+ flushleft lower/.style={halign lower=flush left},%
+ flushright title/.style={halign title=flush right},%
+ flushright upper/.style={halign upper=flush right},%
+ flushright lower/.style={halign lower=flush right},%
+ tabularx*/.style 2 args={%
+ boxsep=0pt,top=0pt,bottom=0pt,leftupper=0pt,rightupper=0pt,
+ toptitle=1mm,bottomtitle=1mm,boxrule=0.5mm,
+ before upper={\arrayrulecolor{tcbcol@frame}\def\arraystretch{1.1}#1%
+ \tcb@hack@currenvir\tabularx{\linewidth}{#2}},
+ after upper=\endtabularx\arrayrulecolor{black}},
+ tabularx/.style={tabularx*={}{#1}},
+ tikz upper/.style={before upper=\centering\tcb@shield@externalize\begin{tikzpicture}[#1],after upper=\end{tikzpicture}},%
+ tikz lower/.style={before lower=\centering\tcb@shield@externalize\begin{tikzpicture}[#1],after lower=\end{tikzpicture}},%
+ tikznode upper/.style={before upper={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after upper={\egroup;\end{tikzpicture}}},%
+ tikznode lower/.style={before lower={\centering\tcb@shield@externalize\begin{tikzpicture}\node[align=center,inner sep=0pt,outer sep=0pt,#1]\bgroup},after lower={\egroup;\end{tikzpicture}}},%
+ tikznode/.style={tikznode upper={#1},tikznode lower={#1}},%
+ varwidth upper/.style={before upper={\tcbdimto\tcb@w@upper{#1-(\kvtcb@left@rule+\kvtcb@right@rule+(\kvtcb@boxsep)*2+\kvtcb@leftupper+\kvtcb@rightupper)}%
+ \begin{varwidth}{\tcb@w@upper}},after upper={\end{varwidth}}},%
+ varwidth upper/.default=\kvtcb@width,
+ text fill/.style={before upper={%
+ \ifdim\dimexpr\tcbtextheight>0pt\relax%
+ \edef\tcb@temp{\noexpand\minipage[c][\tcbtextheight]}%
+ \else%
+ \let\tcb@temp\minipage%
+ \fi%
+ \tcb@temp{\linewidth}\kvtcb@halignupper},
+ after upper=\endminipage},
+ oversize/.style={%
+ width=\the\dimexpr\dimexpr\linewidth+#1+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule\relax,%
+ enlarge left by=-\the\dimexpr\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep+(#1)/2\relax,%
+ enlarge right by=-\the\dimexpr\kvtcb@boxsep+\kvtcb@rightupper+\kvtcb@right@rule+(#1)/2\relax},%
+ oversize/.default=0pt,%
+ flush right/.style={enlarge left by=\linewidth-(\kvtcb@width)},
+ flush left/.style={enlarge right by=\linewidth-(\kvtcb@width)},
+ center/.style={enlarge left by=(\linewidth-(\kvtcb@width))/2,enlarge right by=\kvtcb@bbleft},
+ baseline/.store in=\kvtcb@baseline,%
+ tcbox raise/.style={baseline=-\the\dimexpr#1\relax},%
+ tcbox raise base/.style={baseline=\tcb@val@raisebase},%
+ box align/.is choice,%
+ box align/bottom/.style={baseline=0pt},%
+ box align/top/.style={baseline=\tcb@height},%
+ box align/center/.style={baseline=\tcb@height/2},%
+ box align/base/.style={baseline=\tcb@val@raisebase},%
+ shrink tight/.style={boxsep=0mm,top=-\the\dimexpr\kvtcb@top@rule@stand\relax,bottom=-\the\dimexpr\kvtcb@bottom@rule@stand\relax,%
+ left=-\the\dimexpr\kvtcb@left@rule\relax,right=-\the\dimexpr\kvtcb@right@rule\relax},%
+ extrude left by/.code={\tcbdimto\kvtcb@leftupper{\kvtcb@leftupper+#1}\tcbdimto\kvtcb@bbleft{\kvtcb@bbleft-(#1)}\tcbdimto\kvtcb@width{\kvtcb@width+#1}},%
+ extrude right by/.code={\tcbdimto\kvtcb@rightupper{\kvtcb@rightupper+#1}\tcbdimto\kvtcb@bbright{\kvtcb@bbright-(#1)}\tcbdimto\kvtcb@width{\kvtcb@width+#1}},%
+ extrude top by/.code={\tcbdimto\kvtcb@top{\kvtcb@top+#1}\tcbdimto\kvtcb@bbtop@stand{\kvtcb@bbtop@stand-(#1)}},%
+ extrude bottom by/.code={\tcbdimto\kvtcb@bottom{\kvtcb@bottom+#1}\tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand-(#1)}},%
+ extrude by/.style={extrude left by=#1,extrude right by=#1,extrude top by=#1,extrude bottom by=#1},%
+ sidebyside/.is if=tcb@sidebyside,%
+ sidebyside align/.is choice,%
+ sidebyside align/top/.code={\def\kvtcb@sbs@align{top}\def\tcb@box@align##1{}},%
+ sidebyside align/center/.code={\def\kvtcb@sbs@align{center}\def\tcb@box@align##1{}},%
+ sidebyside align/bottom/.code={\def\kvtcb@sbs@align{bottom}\def\tcb@box@align##1{}},%
+ sidebyside align/top seam/.code={\def\kvtcb@sbs@align{top}\let\tcb@box@align\tcb@box@align@top},%
+ sidebyside align/center seam/.code={\def\kvtcb@sbs@align{center}\let\tcb@box@align\tcb@box@align@center},%
+ sidebyside align/bottom seam/.code={\def\kvtcb@sbs@align{bottom}\let\tcb@box@align\tcb@box@align@bottom},%
+ sidebyside gap/.dimstore in=\kvtcb@sbs@gap,%
+ lefthand width/.code={\def\kvtcb@sbs@ratio{#1}\let\tcb@sbs@quota=\tcb@sbs@quota@leftwidth},
+ righthand width/.code={\def\kvtcb@sbs@ratio{#1}\let\tcb@sbs@quota=\tcb@sbs@quota@rightwidth},
+ lefthand ratio/.code={\def\kvtcb@sbs@ratio{#1}\let\tcb@sbs@quota=\tcb@sbs@quota@leftratio},
+ righthand ratio/.code={\def\kvtcb@sbs@ratio{#1}\let\tcb@sbs@quota=\tcb@sbs@quota@rightratio},
+ breakable@false/.code={%
+ \let\tcb@savebox=\tcb@lrbox%
+ \let\endtcb@savebox=\endtcb@lrbox%
+ \let\tcb@defToTotalHeight=\tcb@defToTotalHeightStandard%
+ \let\tcb@drawcolorbox=\tcb@drawcolorbox@standalone},
+ code/.code={#1},
+ capture/.store in=\kvtcb@capture,%
+ hbox/.style={capture=hbox},%
+ minipage/.style={capture=minipage},%
+ void/.style={capture=v@@d,capture/.code=,options@for/.code=,code={\def\tcbinputlisting@core{}}},
+ check odd page/.is if=tcb@checkpage,
+ if odd page/.code 2 args={%
+ \tcbset{check odd page}%
+ \tcbifoddpage{\tcbset{#1}}{\tcbset{#2}}%
+ },
+ if odd page or oneside/.code 2 args={%
+ \tcbset{check odd page}%
+ \tcbifoddpageoroneside{\tcbset{#1}}{\tcbset{#2}}%
+ },
+ phantom/.code={\appto\kvtcb@phantom{#1}},
+ step and label/.style 2 args={phantom={\refstepcounter{#1}\tcb@set@label{#2}}},%
+ step/.style={phantom={\refstepcounter{#1}}},%
+ label/.style={phantom={\tcb@set@label{#1}}},%
+ phantomlabel/.style={phantom={\ifdefined\phantomsection\phantomsection\fi\tcb@set@label{#1}}},%
+ nameref/.code={\tcb@gettitle{#1}},%
+ label type/.store in=\kvtcb@label@type,%
+ no label type/.style={label type=},%
+ add to list/.style 2 args={phantom={\tcb@addcontentsline{#1}{#2}}},
+ nophantom/.code={\def\kvtcb@phantom{}},%
+ shield externalize/.is choice,
+ shield externalize/true/.code={\let\tcb@shield@externalize=\tcb@shield@@externalize},
+ shield externalize/false/.code={\let\tcb@shield@externalize=\relax},
+ shield externalize/.default=true,
+ external/.code={\tikzsetnextfilename{#1}},
+ remake/.code={\tikzset{external/remake next={#1}}},
+ remake/.default=true,
+ lower separated/.is if=tcb@lowerseparated,
+ options@for/.code={\letcs\tcb@new@colop{tcb@opt@#1}\pgfkeysalsofrom\tcb@new@colop},
+ list entry/.store in=\kvtcb@listentry,
+ list text/.style={list entry={\protect\numberline{\thetcbcounter}{\ignorespaces #1}}},
+ title filled/.is if=tcb@titlefilled,%
+ @colbacktitle/.colorlet=tcbcol@backtitle,
+ colbacktitle/.style={title filled,@colbacktitle={#1}},
+ opacityupper/.store in=\kvtcb@opacityupper,
+ opacitylower/.store in=\kvtcb@opacitylower,
+ opacitytitle/.store in=\kvtcb@opacitytitle,
+ opacityframe/.store in=\kvtcb@opacityframe,
+ opacityback/.store in=\kvtcb@opacityback,
+ @opacitybacktitle/.store in=\kvtcb@opacitybacktitle,
+ opacitybacktitle/.style={title filled,@opacitybacktitle={#1}},
+ opacityfill/.style={opacityframe={#1},opacityback={#1},@opacitybacktitle={#1}},
+ opacitytext/.style={opacityupper={#1},opacitylower={#1}},
+ spartan@fit/.code={},%
+ %
+ size/.is choice,
+ size/normal/.style={boxrule=0.5mm,boxsep=1mm,left=4mm,right=4mm,top=2mm,bottom=2mm,toptitle=0pt,bottomtitle=0pt,
+ middle=2mm,arc=1mm,auto outer arc},
+ size/title/.style={boxrule=0.4mm,boxsep=1mm,left=2mm,right=2mm,top=0.25mm,bottom=0.25mm,toptitle=0pt,bottomtitle=0pt,
+ middle=0.75mm,arc=0.75mm,auto outer arc},
+ size/small/.style={boxrule=0.3mm,boxsep=1mm,left=1mm,right=1mm,top=0pt,bottom=0pt,toptitle=0pt,bottomtitle=0pt,
+ middle=0.5mm,arc=0.5mm,auto outer arc},
+ size/fbox/.style={boxrule=0.4pt,boxsep=3pt,left=0pt,right=0pt,top=0pt,bottom=0pt,toptitle=0pt,bottomtitle=0pt,
+ middle=1pt,arc=1pt,auto outer arc},
+ size/tight/.style={boxrule=0.4pt,boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt,toptitle=0pt,bottomtitle=0pt,
+ middle=0.2pt,arc=0pt,outer arc=0pt},
+ size/minimal/.style={boxrule=0pt,boxsep=0pt,left=0pt,right=0pt,top=0pt,bottom=0pt,toptitle=0pt,bottomtitle=0pt,
+ middle=0pt,arc=0pt,outer arc=0pt},
+ on line/.style={tcbox raise base,nobeforeafter},
+ shape@of@skin/.store in=\tcb@shapeofskin,
+ ignore nobreak/.is if=tcb@ignorenobreak,%
+ only/.code args={<#1>#2}{\only<#1>{\tcbset{#2}}},%
+ %
+ tcbox width/.is choice,
+ tcbox width/auto/.code={\def\tcb@embed@tcbox{}},
+ tcbox width/auto limited/.code={\tcb@set@embed@tcbox{%
+ \setbox\z@=\color@hbox##1\color@endbox\ifdim\wd\z@<\tcb@w@upper\relax\box\z@\else%
+ \begin{minipage}{\tcb@w@upper}##1\end{minipage}\fi}},
+ tcbox width/forced center/.code={\tcb@set@embed@tcbox{\makebox[\tcb@w@upper]{##1}}},
+ tcbox width/forced left/.code={\tcb@set@embed@tcbox{\makebox[\tcb@w@upper][l]{##1}}},
+ tcbox width/forced right/.code={\tcb@set@embed@tcbox{\makebox[\tcb@w@upper][r]{##1}}},
+ tcbox width/minimum center/.code={\tcb@set@embed@tcbox{%
+ \setbox\z@=\color@hbox##1\color@endbox\ifdim\wd\z@<\tcb@w@upper\relax\makebox[\tcb@w@upper]{\box\z@}\else\box\z@\fi}},
+ tcbox width/minimum left/.code={\tcb@set@embed@tcbox{%
+ \setbox\z@=\color@hbox##1\color@endbox\ifdim\wd\z@<\tcb@w@upper\relax\makebox[\tcb@w@upper][l]{\box\z@}\else\box\z@\fi}},
+ tcbox width/minimum right/.code={\tcb@set@embed@tcbox{%
+ \setbox\z@=\color@hbox##1\color@endbox\ifdim\wd\z@<\tcb@w@upper\relax\makebox[\tcb@w@upper][r]{\box\z@}\else\box\z@\fi}},
+ }
+
+\def\kvtcb@beforebox{}
+\def\kvtcb@afterbox{}
+
+\tcbset{%
+ autoparskip,minipage,savedelimiter=tcolorbox,%
+ set@extensions@preframe=,set@extensions@postframe=,set@extensions@final=,%
+}%
+
+\def\tcb@set@label#1{%
+ \ifx\kvtcb@label@type\@empty%
+ \label{#1}%
+ \else%
+ \label[\kvtcb@label@type]{#1}%
+ \fi%
+}
+
+\let\tcb@parboxrestore=\@parboxrestore
+
+\def\tcb@parbox@false@settings{%
+ \noindent%
+ \linewidth\hsize%
+ \@totalleftmargin\z@%
+ \leftskip\z@skip%
+ \rightskip\z@skip%
+ \@rightskip\z@skip%
+}
+
+\let\tcb@parbox@use@true\relax
+\def\tcb@parbox@use@false{%
+ \def\@parboxrestore{%
+ \tcb@parbox@false@settings%
+ \let\@parboxrestore=\tcb@parboxrestore%
+ }%
+}
+
+\let\tcb@afteroptions@hook\@empty
+
+\def\tcb@minipage@top{\minipage[t]}
+\let\tcb@minipage@center=\minipage
+\def\tcb@minipage@bottom{\minipage[b]}
+\let\tcb@minipage=\tcb@minipage@center
+
+% lrbox with integrated minipage
+\def\tcb@lrbox#1#2{%
+ \edef\reserved@a{%
+ \endgroup
+ \setbox#1\hbox{%
+ \begingroup\aftergroup}%
+ \def\noexpand\@currenvir{\@currenvir}%
+ \def\noexpand\@currenvline{\on@line}}%
+ \reserved@a
+ \@endpefalse
+ \csname tcb@parbox@use@\kvtcb@parbox\endcsname%
+ \tcb@minipage#2\tcb@hyph@fix\ignorespaces}
+\let\endtcb@lrbox=\endminipage
+
+\let\tcb@savebox=\tcb@lrbox
+\let\endtcb@savebox=\endtcb@lrbox
+
+\def\tcb@saveupperbox{%
+\begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces}
+
+\def\tcb@savelowerbox{%
+\begin{tcb@savebox}{\tcb@lowerbox}{\tcb@w@lower}\kvtcb@fontlower\kvtcb@halignlower\kvtcb@before@lower\ignorespaces}
+
+
+% counter for float
+\AtBeginDocument{%
+\@ifundefined{c@float@type}%
+ {\edef\ftype@tcbfloat{\ifx\c@figure\@undefined 1\else 4\fi}}%
+ {\edef\ftype@tcbfloat{\the\c@float@type}%
+ \addtocounter{float@type}{\value{float@type}}}%
+\def\c@tcbfloat{\c@float@type}% tricking the caption package
+\ifdim\parskip>0pt%
+ \tcbset{autoparskip/.style=parskip}%
+\else%
+ \tcbset{autoparskip/.style=noparskip}%
+\fi%
+\tcb@use@autoparskip%
+}
+
+\long\def\tcb@colorbox{%
+ \@ifnextchar[{\tcb@@icolorbox}{\tcb@@icolorbox[]}}
+
+
+\def\tcb@set@@phantom{%
+ \iftcb@checkpage\tcb@phantom@savepage\fi%
+ \ifx\kvtcb@phantom\@empty\tcb@hasPhantomfalse\else%
+ \tcb@hasPhantomtrue%
+ \sbox\tcb@phantombox{\kvtcb@phantom}%
+ \let\kvtcb@phantom\@empty%
+ \fi%
+}
+
+\def\tcb@set@@title{%
+ \ifx\kvtcb@title\@empty\tcb@hasTitlefalse\tcb@specialtitle@hook\else%
+ \tcb@hasTitletrue%
+ \tcbdimto\tcb@w@title{\kvtcb@width-(\kvtcb@left@rule+\kvtcb@right@rule+(\kvtcb@boxsep)*2+\kvtcb@lefttitle+\kvtcb@righttitle)}%
+ \begin{tcb@savebox}{\tcb@titlebox}{\tcb@w@title}\color{tcbcol@title}\kvtcb@fonttitle\kvtcb@haligntitle\kvtcb@before@title\kvtcb@title\kvtcb@after@title\end{tcb@savebox}%
+ \fi%
+}
+
+\def\tcb@set@@dimensions{%
+ % sanitize
+ \tcbdimto\kvtcb@left@rule{\kvtcb@left@rule}%
+ \tcbdimto\kvtcb@right@rule{\kvtcb@right@rule}%
+ \tcbdimto\kvtcb@title@rule{\kvtcb@title@rule}%
+ \tcbdimto\kvtcb@top@rule@stand{\kvtcb@top@rule@stand}%
+ \tcbdimto\kvtcb@top@rule@break{\kvtcb@top@rule@break}%
+ \tcbdimto\kvtcb@bottom@rule@stand{\kvtcb@bottom@rule@stand}%
+ \tcbdimto\kvtcb@bottom@rule@break{\kvtcb@bottom@rule@break}%
+ \tcbdimto\kvtcb@boxsep{\kvtcb@boxsep}%
+ \tcbdimto\kvtcb@lefttitle{\kvtcb@lefttitle}%
+ \tcbdimto\kvtcb@leftupper{\kvtcb@leftupper}%
+ \tcbdimto\kvtcb@leftlower{\kvtcb@leftlower}%
+ \tcbdimto\kvtcb@righttitle{\kvtcb@righttitle}%
+ \tcbdimto\kvtcb@rightupper{\kvtcb@rightupper}%
+ \tcbdimto\kvtcb@rightlower{\kvtcb@rightlower}%
+ \tcbdimto\kvtcb@top{\kvtcb@top}%
+ \tcbdimto\kvtcb@toptitle{\kvtcb@toptitle}%
+ \tcbdimto\kvtcb@bottom{\kvtcb@bottom}%
+ \tcbdimto\kvtcb@bottomtitle{\kvtcb@bottomtitle}%
+ \tcbdimto\kvtcb@middle{\kvtcb@middle}%
+ \tcbdimto\kvtcb@bbtop@stand{\kvtcb@bbtop@stand}%
+ \tcbdimto\kvtcb@bbtop@break{\kvtcb@bbtop@break}%
+ \tcbdimto\kvtcb@bbbottom@stand{\kvtcb@bbbottom@stand}%
+ \tcbdimto\kvtcb@bbbottom@break{\kvtcb@bbbottom@break}%
+ \tcbdimto\kvtcb@bbleft{\kvtcb@bbleft}%
+ \tcbdimto\kvtcb@bbright{\kvtcb@bbright}%
+ % computation of text width
+ \tcbdimto\tcb@width{\kvtcb@width}%
+ \tcbdimto\tcb@innerwidth{\tcb@width-\kvtcb@left@rule-\kvtcb@right@rule}%
+ \tcbdimto\tcb@w@upper{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@leftupper-\kvtcb@rightupper}%
+ \let\tcbtextwidth=\tcb@w@upper%
+ \tcbdimto\kvtcb@arc{\kvtcb@arc}%
+ % computation of text height
+ \iftcb@fixedheight%
+ \tcbdimto\tcbtextheight{\kvtcb@top@rule@stand+\kvtcb@bottom@rule@stand+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
+ \iftcb@hasTitle%
+ \tcbdimto\tcbtextheight{\tcbtextheight+\ht\tcb@titlebox+\dp\tcb@titlebox+\kvtcb@title@rule+\kvtcb@boxsep*2+\kvtcb@toptitle+\kvtcb@bottomtitle}%
+ \fi%
+ \tcbdimto\tcbtextheight{\kvtcb@height@fixed-\tcbtextheight}%
+ \fi%
+}
+
+\def\tcb@set@@sidebyside{%
+ \iftcb@sidebyside%
+ \tcbset{breakable@false}%
+ \def\tcb@minipage{\csname tcb@minipage@\kvtcb@sbs@align\endcsname}%
+ \tcbdimto\tcb@w@upper@real{\tcb@w@upper}%
+ \tcbdimto\kvtcb@sbs@gap{\kvtcb@sbs@gap}%
+ \tcbdimto\tcb@w@sbs{\tcb@w@upper@real-\kvtcb@sbs@gap}%
+ \tcb@sbs@quota%
+ \fi%
+}
+
+\def\tcb@set@color#1{%
+ \letcs{\current@color}{\string\color@#1}%
+ \colorlet{.}{#1}%
+}
+
+\def\tcb@reset@color{%
+ \colorlet{.}{tcbcol@origin}%
+ \letcs{\current@color}{\string\color@tcbcol@origin}%
+}
+
+\def\tcb@set@@upper@and@lower{%
+ \colorlet{tcbcol@origin}{.}%
+ \let\tcb@after@box=\kvtcb@after@upper%
+ % switch for lower box
+ \def\tcblower{%
+ \ifvmode\else\unskip\fi\tcb@after@box%
+ \end{tcb@savebox}%
+ \tcb@set@color{tcbcol@lower}%
+ \unless\iftcb@sidebyside%
+ \tcbdimto\tcb@w@lower{\tcb@innerwidth-\kvtcb@boxsep*2-\kvtcb@leftlower-\kvtcb@rightlower}%
+ \fi%
+ \tcb@hasLowertrue%
+ \let\tcb@after@box=\kvtcb@after@lower%
+ \ifx\kvtcb@savelowerto\@empty%
+ \let\tcb@startbox\tcb@savelowerbox%
+ \let\endtcolorbox\tcb@endboxanddraw%
+ \else%
+ \let\tcb@startbox\tcb@lowerverbatim%
+ \expandafter\let\csname end\kvtcb@savedelimiter\expandafter\endcsname\csname tcb@endlowerverbatimanddraw\endcsname%
+ \fi%
+ \tcb@startbox}%
+ % start of upper box
+ \tcb@set@color{tcbcol@upper}%
+ \ifx\kvtcb@saveupperto\@empty%
+ \let\tcb@startbox\tcb@saveupperbox%
+ \let\endtcolorbox\tcb@endboxanddraw%
+ \else%
+ \let\tcb@startbox\tcb@upperverbatim%
+ \expandafter\let\csname end\kvtcb@savedelimiter\expandafter\endcsname\csname tcb@endupperverbatimanddraw\endcsname%
+ \ifx\kvtcb@savelowerto\@empty%
+ \else%
+ \tcb@warning{'saveto' and 'savelowerto' cannot be combined. I deactivate 'savelowerto'}%
+ \tcbset{savelowerto=}%
+ \fi%
+ \fi%
+ \tcb@startbox%
+}
+
+
+\def\tcb@@capture@minipage{%
+ \let\tcb@val@raisebase=\tcb@zpt%
+ \tcb@set@@phantom%
+ \tcb@set@@title%
+ \tcb@set@@dimensions%
+ \tcb@set@@sidebyside%
+ \tcb@set@@upper@and@lower%
+}
+
+\def\tcb@@capture@hbox{%
+ \let\endtcolorbox=\relax%
+ \Collect@Body\tcbox@inner@hbox@collected%
+}
+
+\def\tcb@@end@v@@d{%
+ \endcomment%
+ \tcb@layer@dec%
+}
+
+\def\tcb@@capture@v@@d{%
+ \let\endtcolorbox\tcb@@end@v@@d%
+ \comment%
+}
+
+\long\def\tcbox@inner@hbox@collected#1{%
+ \tcbox@inner@hbox{#1}%
+ \tcb@finalize@environment%
+}
+
+\def\tcb@count@boxes{%
+ \global\advance\tcolorbox@number by 1\relax%
+ \edef\thetcolorboxnumber{\number\tcolorbox@number}%
+ \expandafter\ifx\csname tcolorboxpage@\thetcolorboxnumber\endcsname\relax%
+ \edef\thetcolorboxpage{\number\c@page}%
+ \else%
+ \expandafter\let\expandafter\thetcolorboxpage\csname tcolorboxpage@\thetcolorboxnumber\endcsname%
+ \fi%
+}
+
+\def\tcolorbox@label{\@newl@bel{tcolorboxpage}}%
+
+\write\@auxout{\string\providecommand\string\tcolorbox@label[2]{}}%
+
+\def\tcolorbox@savepage#1{%
+ \@bsphack%
+ \write\@auxout{\string\tcolorbox@label{#1}{\number\c@page}}%
+ \@esphack%
+}%
+
+\def\tcb@phantom@savepage{\preto\kvtcb@phantom{\expandafter\tcolorbox@savepage\expandafter{\thetcolorboxnumber}}}
+
+\def\tcbifoddpage{%
+ \ifodd\thetcolorboxpage\relax%
+ \expandafter\@firstoftwo%
+ \else%
+ \expandafter\@secondoftwo%
+ \fi%
+}
+
+\def\tcbifoddpageoroneside{%
+ \if@twoside%
+ \ifodd\thetcolorboxpage\relax%
+ \let\reserved@a\@firstoftwo%
+ \else%
+ \let\reserved@a\@secondoftwo%
+ \fi%
+ \else%
+ \let\reserved@a\@firstoftwo%
+ \fi%
+ \expandafter\reserved@a%
+}
+
+\def\tcb@managed@layers@max{0}
+\def\tcbsetmanagedlayers#1{%
+ \setcounter{tcblayer}{\tcb@managed@layers@max}%
+ \ifnum\c@tcblayer<#1\relax%
+ \loop
+ \stepcounter{tcblayer}%
+ \newbox\tcb@temp%
+ \cslet{tcb@footnote@\romannumeral\c@tcblayer}{\tcb@temp}%
+ \tcbset{every box on layer \number\c@tcblayer/.style={reset,every box}}
+ \ifnum\c@tcblayer<#1\repeat%
+ \else%
+ \fi%
+ \xdef\tcb@managed@layers@max{#1}%
+ \setcounter{tcblayer}{0}%
+}
+\@onlypreamble\tcbsetmanagedlayers
+\tcbsetmanagedlayers{4}%
+
+\tcbset{%
+ every box/.style={},
+ every box on layer 1/.style={every box},
+ every box on higher layers/.style={reset,every box},
+}
+
+\def\tcb@layer@inc{%
+ \tcb@count@boxes%
+ \stepcounter{tcblayer}%
+ \ifnum\c@tcblayer>1%
+ \tcbset{breakable@true/.code=}%
+ \else%
+ \ifinner\ifhmode\tcbset{breakable@true/.code=}\fi\fi%
+ \fi%
+ \ifnum\c@tcblayer>\tcb@managed@layers@max%
+ \tcbset{every box on higher layers}%
+ \else%
+ \expandafter\setbox\csname tcb@footnote@\romannumeral\c@tcblayer\endcsname\box\@mpfootins%
+ \csedef{tcb@footnote@cnt@\romannumeral\c@tcblayer}{\the\c@mpfootnote}%
+ \tcbset{every box on layer \number\c@tcblayer}%
+ \fi%
+}
+
+\def\tcb@layer@pushup{%
+ \tcb@count@boxes%
+ \global\advance\tcolorbox@number by -1\relax%
+ \stepcounter{tcblayer}%
+ \ifnum\c@tcblayer>1%
+ \tcbset{breakable@true/.code=}%
+ \else%
+ \ifinner\ifhmode\tcbset{breakable@true/.code=}\fi\fi%
+ \fi%
+ \ifnum\c@tcblayer>\tcb@managed@layers@max%
+ \tcbset{every box on higher layers}%
+ \tcbset{every box on higher layers/.code=}%
+ \else%
+ \tcbset{every box on layer \number\c@tcblayer}%
+ \tcbset{every box on layer \number\c@tcblayer/.code=}%
+ \fi%
+ \addtocounter{tcblayer}{-1}%
+}
+
+\def\tcb@layer@dec{%
+ \ifnum\c@tcblayer>\tcb@managed@layers@max%
+ \else%
+ \expandafter\global\setbox\@mpfootins\box\csname tcb@footnote@\romannumeral\c@tcblayer\endcsname%
+ \setcounter{mpfootnote}{\csname tcb@footnote@cnt@\romannumeral\c@tcblayer\endcsname}%
+ \fi%
+ \addtocounter{tcblayer}{-1}%
+}
+
+\long\def\tcb@apply@box@options#1{%
+ \let\tcb@space\tcb@zpt%
+ \let\tcbtextheight\tcb@zpt%
+ \let\tcbtextwidth\tcb@zpt%
+ \tcbset{#1}\tcb@lateoptions@hook\tcb@afteroptions@hook%
+ \if@nobreak%
+ \let\iftcb@nobreak\@firstoftwo%
+ \else%
+ \let\iftcb@nobreak\@secondoftwo%
+ \fi%
+}
+
+\long\def\tcb@@icolorbox[#1]{%
+ \tcb@layer@inc%
+ \tcb@apply@box@options{capture=minipage,#1}\tcb@height@adjust%
+ \tcb@hasLowerfalse%
+ \csname tcb@@capture@\kvtcb@capture\endcsname%
+}
+
+\let\tcolorbox\tcb@colorbox
+
+\def\tcb@endboxanddraw{%
+ \ifvmode\else\unskip\fi\tcb@after@box%
+ \end{tcb@savebox}%
+ \tcb@reset@color%
+ \tcb@draw@color@box%
+ \tcb@finalize@environment%
+}
+
+\def\tcb@finalize@environment{%
+ %\color{.}% hack for some special cases
+ \tcb@layer@dec%
+}
+
+\let\endtcolorbox=\tcb@endboxanddraw
+
+% height computations
+\def\tcb@@ch@@operation#1{%
+ \let\tcb@ch=#1%
+ \let\tcb@height@adjust\@empty%
+}
+
+
+\def\tcb@ch@natural{%
+ \let\tcb@height\tcb@natheight%
+ \let\tcbheightspace\tcb@zpt%
+ \tcbdimto\tcb@height@upper{\ht\tcb@upperbox+\dp\tcb@upperbox}%
+ \iftcb@lowerspace%
+ \tcbdimto\tcb@height@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}%
+ \fi%
+}
+
+\def\tcb@ch@natural@plus{%
+ \tcbdimto\tcbheightspace{\kvtcb@height@natural@plus}%
+ \tcbdimto\tcb@height{\tcb@natheight+\tcbheightspace}%
+ \iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi%
+}
+
+
+\def\tcb@ch@fixed@upper@standard{%
+ \tcbdimto\tcb@height@upper{\ht\tcb@upperbox+\dp\tcb@upperbox+\tcbheightspace}%
+}
+
+\def\tcb@ch@fixed@space{%
+ \tcbdimto\tcb@height@spaceupper{\tcb@height@fraction\dimexpr\tcbheightspace\relax}%
+ \tcbdimto\tcb@height@upper{\ht\tcb@upperbox+\dp\tcb@upperbox+\tcb@height@spaceupper}%
+ \tcbdimto\tcb@height@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox+\tcbheightspace-\tcb@height@spaceupper}%
+}
+
+\def\tcb@savespace#1#2{%
+ \immediate\write\@auxout{\string\csgdef{tcb@space@#1}{#2}}%
+}
+
+\def\tcb@ch@fixed@spacesave{%
+ \tcbdimto\tcb@space{\tcb@space+\tcbheightspace}%
+ \ifdim\dimexpr\tcb@space<0pt\relax
+ \let\tcb@space\tcb@zpt%
+ \else%
+ \ifdim\dimexpr\tcb@space>\tcb@height\relax
+ \let\tcb@space\tcb@height%
+ \fi%
+ \fi%
+ \begingroup\edef\x{\endgroup\noexpand\tcb@savespace{\thetcolorboxnumber}{\tcb@space}}\x%
+ \tcbdimto\tcb@height@upper{\ht\tcb@upperbox+\dp\tcb@upperbox+\tcbheightspace}%
+ \let\tcbheightspace\tcb@zpt%
+ \iftcb@lowerspace%
+ \tcbdimto\tcb@height@lower{\ht\tcb@lowerbox+\dp\tcb@lowerbox}%
+ \fi%
+}
+
+\def\tcb@ch@fixed@split{%
+ \tcbdimto\tcb@height@space{\tcbheightspace+\ht\tcb@upperbox+\dp\tcb@upperbox+\ht\tcb@lowerbox+\dp\tcb@lowerbox}%
+ \tcbdimto\tcb@height@upper{\tcb@height@fraction\dimexpr\tcb@height@space\relax}%
+ \tcbdimto\tcb@height@lower{\tcb@height@space-\tcb@height@upper}%
+}
+
+\def\tcb@ch@fixed{%
+ \ifdim\tcb@natheight<\dimexpr\kvtcb@height@fixed\relax%
+ \tcbdimto\tcb@height{\kvtcb@height@fixed}%
+ \else%
+ \tcbdimto\tcb@space{\tcb@space+\kvtcb@height@fixed-\tcb@natheight}%
+ \tcbdimto\tcb@temp{\kvtcb@height@fixed+\kvtcb@height@fixed@plus}%
+ \ifdim\tcb@natheight>\tcb@temp\relax%
+ \let\tcb@height\tcb@temp%
+ \else%
+ \let\tcb@height\tcb@natheight%
+ \fi%
+ \fi%
+ \tcbdimto\tcbheightspace{\tcb@height-\tcb@natheight}%
+ \iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi%
+}
+
+\def\tcb@ch@innerfixed{%
+ \tcbdimto\kvtcb@height@fixed{\kvtcb@height@fixed+\kvtcb@top@rule+\kvtcb@bottom@rule+\tcb@h@padtitle+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom}%
+ \tcb@ch@fixed%
+}
+
+\def\tcbheightfromgroup#1#2{%
+ \ifcsundef{tcb@ehg@height@#2}{%
+ \let#1\tcb@zpt%
+ }{%
+ \letcs{#1}{tcb@ehg@height@#2}%
+ }%
+}
+
+\def\tcb@saveehg#1{%
+ \immediate\write\@auxout{\string\csgdef{tcb@ehg@height@#1}{\csuse{tcb@ehg@current@#1}}}%
+}
+
+\def\tcb@ehgadd#1{%
+ \ifcsdef{tcb@ehg@current@\tcb@ehgid}{%
+ \ifdim\csuse{tcb@ehg@current@\tcb@ehgid}<#1\relax%
+ \csxdef{tcb@ehg@current@\tcb@ehgid}{#1}%
+ \fi%
+ }{%
+ \csxdef{tcb@ehg@current@\tcb@ehgid}{#1}%
+ \begingroup\edef\x{\endgroup\noexpand\AtEndDocument{\noexpand\tcb@saveehg{\tcb@ehgid}}}\x%
+ }%
+}
+
+\def\tcb@ch@equalheight{%
+ \tcbdimto\tcb@ehg@currentheight{\tcb@natheight-\tcb@space}%
+ \tcb@ehgadd{\tcb@ehg@currentheight}%
+ \ifcsdef{tcb@ehg@height@\tcb@ehgid}{%
+ \ifdim\csuse{tcb@ehg@height@\tcb@ehgid}<\tcb@ehg@currentheight\relax%
+ \let\tcb@height\tcb@ehg@currentheight%
+ \else%
+ \letcs{\tcb@height}{tcb@ehg@height@\tcb@ehgid}%
+ \fi%
+ }{%
+ \let\tcb@height\tcb@ehg@currentheight%
+ }%
+ \tcbdimto\tcbheightspace{\tcb@height-\tcb@natheight}%
+ \iftcb@lowerspace\tcb@ch@fixed@both\else\tcb@ch@fixed@upper\fi%
+}
+
+\def\tcb@dbox@top#1#2#3#4#5{\pgftext[x=#1,y=#2+#3,left,top]{\color{#5}\box#4}}%
+
+\def\tcb@dbox@bottom#1#2#3#4#5{\pgftext[x=#1,y=#2,left,bottom]{\color{#5}\box#4}}%
+
+\def\tcb@dbox@center#1#2#3#4#5{\pgftext[x=#1,y=#2+#3/2,left]{\color{#5}\box#4}}%
+
+\def\tcb@resize@box#1#2#3{%
+ \setbox#1\hbox{\resizebox*{#2}{#3}{\box#1}}%
+ \wd#1=#2\relax%
+ \ht#1=\the\dimexpr#3-\dp#1\relax%
+}
+
+\def\tcb@dbox@resize#1#2#3#4#5{%
+ \iftcb@fixedheight%
+ \tcbdimto\tcb@box@w@target{\wd#4}%
+ \tcbdimto\tcb@box@h@target{#3}%
+ \tcb@resize@box{#4}{\tcb@box@w@target}{\tcb@box@h@target}%
+ \fi%
+ \pgftext[x=#1,y=#2+#3,left,top]{\color{#5}\box#4}}%
+
+\def\tcb@dbox@resizelimited#1#2#3#4#5{%
+ \iftcb@fixedheight%
+ \tcbdimto\tcb@box@w@target{\wd#4}%
+ \tcbdimto\tcb@box@h@target{\kvtcbv@valignresizelimit\dimexpr(\ht#4+\dp#4)}%
+ \ifdim\dimexpr\tcb@box@h@target>#3\relax%
+ \tcbdimto\tcb@box@h@target{#3}%
+ \fi%
+ \tcb@resize@box{#4}{\tcb@box@w@target}{\tcb@box@h@target}%
+ \fi%
+ \pgftext[x=#1,y=#2+#3,left,top]{\color{#5}\box#4}}%
+
+\let\tcb@pgfprocess@@specialround@orig=\pgfprocess@@specialround
+
+% patch for \pgfprocess@@specialround
+\def\tcb@pgfprocess@@specialround@angular#1#2#3{%
+ \pgfutil@g@addto@macro\pgfprocess@segment{#1}%
+ % start point
+ \pgf@xb=#2%
+ \pgf@yb=#3%
+ %
+ \edef\pgf@marshal%
+ {\noexpand\pgfpointlineatdistance{\pgfprocess@savex}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
+ {\noexpand\pgfqpoint{\the\pgf@xa}{\the\pgf@ya}}}%
+ \pgf@process{\pgf@marshal}%
+ \pgf@xa=\pgf@x% save start point
+ \pgf@ya=\pgf@y%
+ \edef\pgfprocess@addition{{\the\pgf@x}{\the\pgf@y}}%
+ \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@segment\expandafter{\pgfprocess@addition}%
+ %
+ \edef\pgf@marshal%
+ {\noexpand\pgfpointlineatdistance{\pgfprocess@savey}%
+ {\noexpand\pgfqpoint{\the\pgf@xb}{\the\pgf@yb}}%
+ {\noexpand\pgfqpoint{\the\pgf@xc}{\the\pgf@yc}}}%
+ \pgf@process{\pgf@marshal}%
+ \pgf@xc=\pgf@x% save end point
+ \pgf@yc=\pgf@y%
+ \edef\pgfprocess@addition{\noexpand\pgfsyssoftpath@linetotoken{\the\pgf@xc}{\the\pgf@yc}}%
+ \expandafter\pgfutil@g@addto@macro\expandafter\pgfprocess@segment\expandafter{\pgfprocess@addition}%
+ %
+ \pgf@xa=#2%
+ \pgf@ya=#3%
+ \pgfprocess@continueafterrounding%
+}
+
+\def\tcbpatcharcround{\let\pgfprocess@@specialround=\tcb@pgfprocess@@specialround@orig}
+\def\tcbpatcharcangular{\let\pgfprocess@@specialround=\tcb@pgfprocess@@specialround@angular}
+
+\def\tcb@arc@zpt{\pgfsetcornersarced{\pgfpointorigin}}%
+\def\tcb@arc@ins{\pgfsetcornersarced{\pgfqpoint{\kvtcb@arc}{\kvtcb@arc}}}%
+\def\tcb@arc@out{\pgfsetcornersarced{\pgfqpoint{\tcb@outer@arc}{\tcb@outer@arc}}}%
+
+\def\tcb@define@corner@mode#1{%
+\tcbset{%
+ #1 corners/.is choice,%
+ #1 corners/northwest/.code={\edef\tcb@corner@mode@NW{#1}},%
+ #1 corners/northeast/.code={\edef\tcb@corner@mode@NE{#1}},%
+ #1 corners/southwest/.code={\edef\tcb@corner@mode@SW{#1}},%
+ #1 corners/southeast/.code={\edef\tcb@corner@mode@SE{#1}},%
+ #1 corners/north/.code={\edef\tcb@corner@mode@NW{#1}\edef\tcb@corner@mode@NE{#1}},%
+ #1 corners/south/.code={\edef\tcb@corner@mode@SW{#1}\edef\tcb@corner@mode@SE{#1}},%
+ #1 corners/east/.code={\edef\tcb@corner@mode@NE{#1}\edef\tcb@corner@mode@SE{#1}},%
+ #1 corners/west/.code={\edef\tcb@corner@mode@NW{#1}\edef\tcb@corner@mode@SW{#1}},%
+ #1 corners/downhill/.code={\edef\tcb@corner@mode@NW{#1}\edef\tcb@corner@mode@SE{#1}},%
+ #1 corners/uphill/.code={\edef\tcb@corner@mode@NE{#1}\edef\tcb@corner@mode@SW{#1}},%
+ #1 corners/all/.code={\edef\tcb@corner@mode@NW{#1}\edef\tcb@corner@mode@NE{#1}\edef\tcb@corner@mode@SW{#1}\edef\tcb@corner@mode@SE{#1}},%
+ #1 corners/.default=all}}%
+
+\tcb@define@corner@mode{rounded}
+\tcb@define@corner@mode{sharp}
+
+\def\tcb@arc@out@NW{\csname tcb@arc@out@NW@\tcb@corner@mode@NW\endcsname}
+\def\tcb@arc@out@NE{\csname tcb@arc@out@NE@\tcb@corner@mode@NE\endcsname}
+\def\tcb@arc@out@SW{\csname tcb@arc@out@SW@\tcb@corner@mode@SW\endcsname}
+\def\tcb@arc@out@SE{\csname tcb@arc@out@SE@\tcb@corner@mode@SE\endcsname}
+
+\def\tcb@arc@ins@NW{\csname tcb@arc@ins@NW@\tcb@corner@mode@NW\endcsname}
+\def\tcb@arc@ins@NE{\csname tcb@arc@ins@NE@\tcb@corner@mode@NE\endcsname}
+\def\tcb@arc@ins@SW{\csname tcb@arc@ins@SW@\tcb@corner@mode@SW\endcsname}
+\def\tcb@arc@ins@SE{\csname tcb@arc@ins@SE@\tcb@corner@mode@SE\endcsname}
+
+\let\tcb@arc@out@NW@sharp\tcb@arc@zpt
+\let\tcb@arc@out@NE@sharp\tcb@arc@zpt
+\let\tcb@arc@out@SW@sharp\tcb@arc@zpt
+\let\tcb@arc@out@SE@sharp\tcb@arc@zpt
+
+\let\tcb@arc@ins@NW@sharp\tcb@arc@zpt
+\let\tcb@arc@ins@NE@sharp\tcb@arc@zpt
+\let\tcb@arc@ins@SW@sharp\tcb@arc@zpt
+\let\tcb@arc@ins@SE@sharp\tcb@arc@zpt
+
+\let\tcb@arc@out@NW@rounded\tcb@arc@out
+\let\tcb@arc@out@NE@rounded\tcb@arc@out
+\let\tcb@arc@out@SW@rounded\tcb@arc@out
+\let\tcb@arc@out@SE@rounded\tcb@arc@out
+
+\let\tcb@arc@ins@NW@rounded\tcb@arc@ins
+\let\tcb@arc@ins@NE@rounded\tcb@arc@ins
+\let\tcb@arc@ins@SW@rounded\tcb@arc@ins
+\let\tcb@arc@ins@SE@rounded\tcb@arc@ins
+
+
+% boundaries
+\def\tcb@boundary@base#1#2#3#4#5#6#7#8{%
+ \tcbdimto\tcb@xa{#1}%
+ \tcbdimto\tcb@ya{#2}%
+ \tcbdimto\tcb@xb{#3}%
+ \tcbdimto\tcb@yb{#4}%
+ \pgfpathmoveto{\pgfqpoint{\tcb@xa}{\tcb@ya}}%
+ #6\pgfpathlineto{\pgfqpoint{\tcb@xa}{\tcb@yb}}%
+ #7\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@yb}}%
+ #8\pgfpathlineto{\pgfqpoint{\tcb@xb}{\tcb@ya}}%
+ #5\pgfpathclose%
+}
+
+\def\tcb@boundaryframe@standard{%
+ \tcb@boundary@base{0pt}{0pt}%
+ {\tcb@width}{\tcb@height}%
+ {\tcb@arc@out@SW}{\tcb@arc@out@NW}{\tcb@arc@out@NE}{\tcb@arc@out@SE}%
+}
+
+\def\tcb@boundaryframe@standardjigsaw{%
+ \pgfseteorule%
+ \tcb@boundaryframe@standard%
+ \iftcb@hasTitle%
+ \tcb@boundaryinterior@title@standard%
+ \iftcb@titlefilled%
+ \tcb@boundarytitle@standard%
+ \fi%
+ \else%
+ \tcb@boundaryinterior@notitle@standard%
+ \fi%
+}
+
+\def\tcb@boundaryinterior@title@standard{%
+ \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule}%
+ {\tcb@width-\kvtcb@right@rule}{\kvtcb@bottom@rule+\tcb@innerheight}%
+ {\tcb@arc@ins@SW}{\tcb@arc@zpt}{\tcb@arc@zpt}{\tcb@arc@ins@SE}%
+}
+
+\def\tcb@boundaryinterior@notitle@standard{%
+ \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule}%
+ {\tcb@width-\kvtcb@right@rule}{\tcb@height-\kvtcb@top@rule}%
+ {\tcb@arc@ins@SW}{\tcb@arc@ins@NW}{\tcb@arc@ins@NE}{\tcb@arc@ins@SE}%
+}
+
+\def\tcb@boundarytitle@standard{%
+ \tcb@boundary@base{\kvtcb@left@rule}{\kvtcb@bottom@rule+\tcb@innerheight+\kvtcb@title@rule}%
+ {\tcb@width-\kvtcb@right@rule}{\tcb@height-\kvtcb@top@rule}%
+ {\tcb@arc@zpt}{\tcb@arc@ins@NW}{\tcb@arc@ins@NE}{\tcb@arc@zpt}%
+}
+
+% fill frame
+\def\tcb@drawframe@standard{%
+ \begin{pgfscope}%
+ \tcb@boundaryframe@standard%
+ \pgfsetfillcolor{tcbcol@frame}%
+ \pgfsetfillopacity{\kvtcb@opacityframe}%
+ \pgfusepath{fill}%
+ \end{pgfscope}%
+}
+
+% fill frame
+\def\tcb@drawframe@standardjigsaw{%
+ \begin{pgfscope}%
+ \tcb@boundaryframe@standardjigsaw%
+ \pgfsetfillcolor{tcbcol@frame}%
+ \pgfsetfillopacity{\kvtcb@opacityframe}%
+ \pgfusepath{fill}%
+ \end{pgfscope}%
+}
+
+% fill inner box with title
+\def\tcb@drawwithtitle@standard{%
+ \begin{pgfscope}%
+ \tcb@boundaryinterior@title@standard%
+ \pgfsetfillcolor{tcbcol@back}%
+ \pgfsetfillopacity{\kvtcb@opacityback}%
+ \pgfusepath{fill}%
+ \end{pgfscope}%
+}
+
+% fill inner box without title
+\def\tcb@drawwithouttitle@standard{%
+ \begin{pgfscope}%
+ \tcb@boundaryinterior@notitle@standard%
+ \pgfsetfillcolor{tcbcol@back}%
+ \pgfsetfillopacity{\kvtcb@opacityback}%
+ \pgfusepath{fill}%
+ \end{pgfscope}%
+}
+
+% draw title box
+\def\tcb@drawtitle@standard{%
+ \begin{pgfscope}%
+ \tcb@boundarytitle@standard%
+ \pgfsetfillcolor{tcbcol@backtitle}%
+ \pgfsetfillopacity{\kvtcb@opacitybacktitle}%
+ \pgfusepath{fill}%
+ \end{pgfscope}%
+}
+
+% draw segmentation line
+\def\tcb@drawlower@standard{%
+ \begin{pgfscope}%
+ \pgfsetdash{{1mm}{1mm}}{0.5mm}%
+ \iftcb@sidebyside%
+ \tcbdimto\tcb@seg@pos{\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper+\tcb@w@upper+\kvtcb@sbs@gap/2}%
+ \pgfpathmoveto{\pgfqpoint{\tcb@seg@pos}{\the\dimexpr\kvtcb@bottom@rule+\tcb@innerheight\relax}}%
+ \pgfpathlineto{\pgfqpoint{\tcb@seg@pos}{\kvtcb@bottom@rule}}%
+ \else%
+ \tcbdimto\tcb@seg@pos{\kvtcb@bottom@rule+\kvtcb@boxsep*2+\tcb@break@bottomsep+\kvtcb@middle+\kvtcb@bottom+\tcb@height@lower}%
+ \pgfpathmoveto{\pgfqpoint{\kvtcb@left@rule}{\tcb@seg@pos}}%
+ \pgfpathlineto{\pgfqpoint{\the\dimexpr\tcb@width-\kvtcb@right@rule\relax}{\tcb@seg@pos}}%
+ \fi%
+ \pgfsetcolor{tcbcol@frame}%
+ \pgfsetstrokeopacity{\kvtcb@opacityframe}%
+ \pgfusepath{stroke}%
+ \end{pgfscope}%
+}
+
+\def\tcb@setbb@toggle@none{%
+ \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr0pt-\kvtcb@bbleft\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}%
+ {\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbright\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}%
+}
+
+\def\tcb@setbb@toggle@forced{%
+ \pgfpathrectanglecorners{\pgfqpoint{\the\dimexpr0pt-\kvtcb@bbright\relax}{\the\dimexpr0pt-\kvtcb@bbbottom\relax}}%
+ {\pgfqpoint{\the\dimexpr\tcb@width+\kvtcb@bbleft\relax}{\the\dimexpr\tcb@height+\kvtcb@bbtop\relax}}%
+}
+
+\def\tcb@setbb@toggle@evenpage{%
+ \tcbifoddpage{\tcb@setbb@toggle@none}{\tcb@setbb@toggle@forced}%
+}
+
+\def\tcb@creategeonodes@false{}
+
+\def\tcb@swap#1#2{%
+ \let\tcb@temp=#1%
+ \let#1=#2%
+ \let#2=\tcb@temp%
+}
+
+\let\tcb@lrtoggle@none=\relax
+
+\def\tcb@lrtoggle@forced{%
+ \tcb@swap{\kvtcb@left@rule}{\kvtcb@right@rule}%
+ \tcb@swap{\kvtcb@lefttitle}{\kvtcb@righttitle}%
+ \tcb@swap{\kvtcb@leftupper}{\kvtcb@rightupper}%
+ \tcb@swap{\kvtcb@leftlower}{\kvtcb@rightlower}%
+}
+
+\def\tcb@lrtoggle@evenpage{%
+ \tcbifoddpage{}{\tcb@lrtoggle@forced}%
+}
+
+\def\tcb@bbdraw{%
+ \tcb@lrtoggle%
+ \tcb@setbb@toggle%
+ \pgfusepath{use as bounding box}%
+ \iftcb@hasPhantom%
+ \pgftext[x=0pt,y=\tcb@height-\baselineskip,left,top]{\box\tcb@phantombox}%
+ \tcb@hasPhantomfalse%
+ \fi%
+ \csname tcb@creategeonodes@\kvtcb@geonodes\endcsname%
+}
+
+\def\tcb@tdraw@title@core{%
+ \iftcb@hasTitle%
+ \begin{pgfscope}%
+ \pgfsetfillopacity{\kvtcb@opacitytitle}%
+ \pgftext[x=\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@lefttitle\relax,
+ y=\the\dimexpr\tcb@height-\kvtcb@top@rule-\kvtcb@boxsep-\kvtcb@toptitle\relax,
+ left,top]{\color{tcbcol@title}\box\tcb@titlebox}%
+ \end{pgfscope}%
+ \fi%
+}
+\let\tcb@tdraw@title=\tcb@tdraw@title@core
+
+\def\tcb@tdraw@upper@core{%
+ \iftcb@uppervisible%
+ \begin{pgfscope}%
+ \pgfsetfillopacity{\kvtcb@opacityupper}%
+ \csname tcb@dbox@\kvtcb@valignupper\endcsname{\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftupper\relax}%
+ {\the\dimexpr\tcb@innerheight+\kvtcb@bottom@rule-\kvtcb@boxsep-\tcb@break@topsep-\kvtcb@top-\tcb@height@upper\relax}%
+ {\tcb@height@upper}{\tcb@upperbox}{tcbcol@upper}%
+ \end{pgfscope}%
+ \fi%
+}
+\let\tcb@tdraw@upper=\tcb@tdraw@upper@core
+
+\def\tcb@tdraw@lower@core{%
+ \iftcb@lowervisible%
+ \begin{pgfscope}%
+ \pgfsetfillopacity{\kvtcb@opacitylower}%
+ \csname tcb@dbox@\kvtcb@valignlower\endcsname{\the\dimexpr\kvtcb@left@rule+\kvtcb@boxsep+\kvtcb@leftlower\relax}%
+ {\the\dimexpr\kvtcb@bottom@rule+\kvtcb@boxsep+\tcb@break@bottomsep+\kvtcb@bottom\relax}%
+ {\tcb@height@lower}{\tcb@lowerbox}{tcbcol@lower}%
+ \end{pgfscope}%
+ \fi%
+}
+\let\tcb@tdraw@lower=\tcb@tdraw@lower@core
+
+\def\tcb@box@align@top#1{%
+ \setbox#1=\hbox{\raise-\ht#1\box#1}%
+}
+
+\def\tcb@box@align@center#1{%
+ \setbox#1=\hbox{\raise\dimexpr(\dp#1-\ht#1)/2\relax\box#1}%
+}
+
+\def\tcb@box@align@bottom#1{%
+ \setbox#1=\hbox{\raise\dp#1\box#1}%
+}
+
+\def\tcb@sbs@mix{%
+ \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper@real}%
+ \tcb@box@align{\tcb@upperbox}%
+ \iftcb@uppervisible%
+ \tcbdimto{\tcb@temp@wd}{\tcb@w@upper-\wd\tcb@upperbox+\kvtcb@sbs@gap}%
+ \noindent\unhbox\tcb@upperbox\kern\tcb@temp@wd%
+ \else%
+ \tcbdimto{\tcb@temp@wd}{\tcb@w@upper+\kvtcb@sbs@gap}%
+ \noindent\kern\tcb@temp@wd%
+ \rule[-\dp\tcb@upperbox]{0pt}{\the\dimexpr\ht\tcb@upperbox+\dp\tcb@upperbox\relax}%
+ \fi%
+ \iftcb@hasLower%
+ \tcb@box@align{\tcb@lowerbox}%
+ \iftcb@lowervisible\leavevmode\color{tcbcol@lower}\unhbox\tcb@lowerbox%
+ \else%
+ \iftcb@lowerignored\else\rule[-\dp\tcb@lowerbox]{0pt}{\the\dimexpr\ht\tcb@lowerbox+\dp\tcb@lowerbox\relax}\fi%
+ \fi%
+ \fi%
+ \end{tcb@savebox}%
+ \tcb@hasLowerfalse%
+ \tcb@uppervisibletrue%
+}
+
+\def\tcb@draw@color@box{%
+ \iftcb@sidebyside\tcb@sbs@mix\fi%
+ \tcb@comp@arc%
+ \iftcb@hasTitle%
+ \tcbdimto\tcb@h@title{\ht\tcb@titlebox+\dp\tcb@titlebox}%
+ \tcbdimto\tcb@h@padtitle{\kvtcb@title@rule+\kvtcb@boxsep*2+\kvtcb@toptitle+\kvtcb@bottomtitle+\tcb@h@title}%
+ \else%
+ \let\tcb@h@title=\tcb@zpt%
+ \let\tcb@h@padtitle=\tcb@zpt%
+ \fi%
+ %
+ \tcb@defToTotalHeight\tcb@h@upper{\tcb@upperbox}%
+ %
+ \iftcb@hasLower%
+ \iftcb@lowerignored\tcb@lowerspacefalse\else\tcb@lowerspacetrue\fi%
+ \else\tcb@lowerspacefalse\fi%
+ \iftcb@lowerspace%
+ \tcbdimto\tcb@h@segment{\kvtcb@boxsep*2+\kvtcb@middle*2}%
+ \tcb@defToTotalHeight\tcb@h@lower{\tcb@lowerbox}%
+ \else
+ \let\tcb@h@segment=\tcb@zpt%
+ \let\tcb@h@lower=\tcb@zpt%
+ \fi%
+ %
+ \tcb@shield@externalize%
+ \tcb@drawcolorbox%
+}
+
+\def\tcb@apply@overlay{\csname tcb@overlay@\tcb@split@state\endcsname}%
+
+\def\tcb@adraw@frame{%
+ \tcb@frame@code%
+}
+
+\def\tcb@adraw@interior{%
+ \iftcb@hasTitle%
+ \tcb@interiortitled@code%
+ \else%
+ \tcb@interior@code%
+ \fi%
+}
+
+\def\tcb@adraw@title{%
+ \iftcb@hasTitle%
+ \iftcb@titlefilled%
+ \tcb@title@code%
+ \fi%
+ \fi%
+}
+
+\def\tcb@drawing@env@begin{%
+ \csname tcb@before@\tcb@split@state\endcsname%
+ \begin{\kvtcb@graphenv}%
+ \tcb@bbdraw%
+ \tcb@apply@graph@patches%
+}
+
+\def\tcb@drawing@env@end{%
+ \end{\kvtcb@graphenv}%
+ \csname tcb@after@\tcb@split@state\endcsname%
+}
+
+\def\tcb@set@normal@unbroken@beforeafter{%
+ \let\tcb@before@unbroken=\kvtcb@beforebox%
+ \iftcb@nobreak{%
+ \iftcb@ignorenobreak\else%
+ \let\tcb@before@unbroken=\kvtcb@beforebox@nobreak%
+ \fi%
+ }{}%
+ \let\tcb@after@unbroken=\kvtcb@afterbox%
+}
+
+\let\tcb@extras@unbroken\@empty
+
+\def\tcb@drawcolorbox{%
+ \edef\tcb@split@state{unbroken}%
+ \tcb@extras@unbroken%
+ \let\kvtcb@top@rule=\kvtcb@top@rule@stand%
+ \let\kvtcb@bottom@rule=\kvtcb@bottom@rule@stand%
+ \let\kvtcb@bbtop=\kvtcb@bbtop@stand%
+ \let\kvtcb@bbbottom=\kvtcb@bbbottom@stand%
+ \let\tcb@break@topsep=\tcb@zpt%
+ \let\tcb@break@bottomsep=\tcb@zpt%
+ % floats
+ \ifx\kvtcb@float\@empty%
+ \tcb@set@normal@unbroken@beforeafter%
+ \else%
+ \edef\tcb@before@unbroken{\noexpand\tcb@float@env@begin{tcbfloat}[\kvtcb@float]\noexpand\kvtcb@everyfloat}%
+ \let\tcb@after@unbroken=\tcb@float@env@end%
+ \fi%
+ \setcounter{tcbbreakpart}{1}%
+ % computation of total height
+ \tcbdimto\tcb@natheight{\tcb@h@padtitle+\kvtcb@top@rule+\kvtcb@bottom@rule+\kvtcb@boxsep*2+\kvtcb@top+\kvtcb@bottom+\tcb@h@upper}%
+ \iftcb@lowerspace%
+ \tcbdimto\tcb@natheight{\tcb@natheight+\tcb@h@segment+\tcb@h@lower}%
+ \def\tcb@segment@state{1}%
+ \else%
+ \def\tcb@segment@state{0}%
+ \fi%
+ \tcb@ch%
+ \tcbdimto\tcb@innerheight{\tcb@height-\kvtcb@top@rule-\kvtcb@bottom@rule-\tcb@h@padtitle}%
+ \tcbdimto\tcbtextheight{\tcb@innerheight-\kvtcb@boxsep*2-\kvtcb@top-\kvtcb@bottom}%
+ \tcb@drawing@env@begin%
+ \pgfsetbaseline{\the\dimexpr\kvtcb@baseline-\kvtcb@bbbottom\relax}%
+ \tcb@extensions@preframe%
+ % draw frame and interior
+ \tcb@adraw@frame%
+ \tcb@adraw@interior%
+ \iftcb@lowerseparated%
+ \iftcb@lowerspace%
+ \tcb@segmentation@code%
+ \else\iftcb@sidebyside%
+ \tcb@segmentation@code%
+ \fi\fi%
+ \fi%
+ \tcb@adraw@title%
+ \tcb@extensions@postframe%
+ % draw text boxes
+ \tcb@tdraw@title%
+ \tcb@tdraw@upper%
+ \iftcb@hasLower\tcb@tdraw@lower\fi%
+ \tcb@extensions@final%
+ \tcb@drawing@env@end%
+}
+
+\let\tcb@drawcolorbox@standalone=\tcb@drawcolorbox
+
+\def\tcb@draw@border#1{}
+
+\long\def\tcbox@inner@hbox#1{%
+ \tcbset{breakable@false,sidebyside=false}%
+ \tcb@set@@phantom%
+ \colorlet{tcbcol@origin}{.}%
+ \tcb@set@color{tcbcol@upper}%
+ \sbox\tcb@upperbox{\tcb@embed@tcbox{\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\ifvmode\else\unskip\fi\kvtcb@after@upper}}%
+ \tcb@reset@color%
+ \tcbdimto\tcb@val@raisebase{\the\dimexpr\dp\tcb@upperbox+\kvtcb@bottom+\kvtcb@boxsep+\kvtcb@bottom@rule@stand+\kvtcb@bbbottom@stand\relax}%
+ \tcbdimto\kvtcb@width{\wd\tcb@upperbox+\kvtcb@left@rule+\kvtcb@leftupper+\kvtcb@boxsep*2+\kvtcb@rightupper+\kvtcb@right@rule}%
+ \tcb@hasLowerfalse%
+ \tcb@set@@title%
+ \tcb@set@@dimensions%
+ \tcb@draw@color@box%
+}
+
+\long\def\tcbox@inner@minipage#1{%
+ \tcbset{breakable@false,sidebyside=false}%
+ \let\tcb@val@raisebase=\tcb@zpt%
+ \tcb@set@@phantom%
+ \tcb@set@@title%
+ \tcb@set@@dimensions%
+ \colorlet{tcbcol@origin}{.}%
+ \tcb@set@color{tcbcol@upper}%
+ \begin{tcb@savebox}{\tcb@upperbox}{\tcb@w@upper}\kvtcb@fontupper\kvtcb@halignupper\kvtcb@before@upper\ignorespaces#1\ifvmode\else\unskip\fi\kvtcb@after@upper\end{tcb@savebox}%
+ \tcb@reset@color%
+ \tcb@hasLowerfalse%
+ \tcb@draw@color@box%
+}
+
+\long\def\tcbox@inner@v@@d#1{}%
+
+\long\def\tcb@ox#1#2{%
+ \begingroup%
+ \tcb@layer@inc%
+ \tcb@apply@box@options{#1}\tcb@height@adjust%
+ \csname tcbox@inner@\kvtcb@capture\endcsname{#2}%
+ \tcb@layer@dec%
+ \endgroup%
+}
+
+\newcommand{\tcbox}[2][]{%
+ \tcb@ox{capture=hbox,#1}{#2}%
+}
+
+\newcommand{\tcbsubtitle}[2][]{%
+ \begingroup%
+ \colorlet{tcbtranscol@frame}{tcbcol@frame}%
+ \iftcb@titlefilled%
+ \colorlet{tcbtranscol@back}{tcbcol@backtitle}%
+ \else%
+ \colorlet{tcbtranscol@back}{tcbcol@frame}%
+ \fi%
+ \colorlet{tcbtranscol@upper}{tcbcol@title}%
+ \let\tcb@trans@fontupper\kvtcb@fonttitle%
+ \let\tcb@trans@boxsep\kvtcb@boxsep%
+ \let\tcb@trans@left\kvtcb@leftupper%
+ \let\tcb@trans@right\kvtcb@rightupper%
+ \let\tcb@trans@top\kvtcb@toptitle%
+ \let\tcb@trans@bottom\kvtcb@bottomtitle%
+ \let\tcb@trans@rule\kvtcb@title@rule%
+ \let\tcb@trans@style\kvtcb@subtitle@style%
+ \begin{tcolorbox}[sharp corners,
+ before skip={0.5\baselineskip},after skip={0.5\baselineskip},
+ colframe=tcbtranscol@frame,colback=tcbtranscol@back,
+ colupper=tcbtranscol@upper,fontupper=\tcb@trans@fontupper,
+ boxsep=\tcb@trans@boxsep,left=\tcb@trans@left,right=\tcb@trans@right,
+ top=\tcb@trans@top,bottom=\tcb@trans@bottom,
+ boxrule=\tcb@trans@rule,leftrule=0pt,rightrule=0pt,oversize,
+ code={\pgfkeysalsofrom\tcb@trans@style},#1]%
+ #2%
+ \end{tcolorbox}%
+ \endgroup%
+}
+
+
+\def\tcb@new@label@type{\begingroup\edef\x{\endgroup\noexpand\appto\noexpand\tcb@new@colopt{,label type=\tcb@new@boxname}}\x}
+
+\def\tcb@blend@beforetitle#1{#1:\ }
+
+\tcbset{%
+ blend before title code/.code={\def\tcb@blend@beforetitle##1{#1}},
+ blend before title/.is choice,
+ blend before title/colon/.style={blend before title code={##1:\ }},
+ blend before title/dash/.style={blend before title code={##1 --\ }},
+ blend before title/colon hang/.style={blend before title code={%
+ \setbox\z@=\hbox{##1:\ }\hangindent\wd\z@\hangafter=1\mbox{\unhbox\z@}}},
+ blend before title/dash hang/.style={blend before title code={%
+ \setbox\z@=\hbox{##1 --\ }\hangindent\wd\z@\hangafter=1\mbox{\unhbox\z@}}},
+ blend before title=colon,
+}
+
+\tcbset{%
+ new/.cd,%
+ use counter/.code={\edef\kvtcb@new@counter{#1}\let\tcb@proc@counter=\tcb@proc@counter@use},
+ use counter*/.code={\edef\kvtcb@new@counter{#1}\let\tcb@proc@counter=\tcb@proc@counter@from},
+ auto counter/.code={\let\tcb@proc@counter=\tcb@proc@counter@auto},
+ use counter from/.code={\edef\kvtcb@new@counter{\csname tcb@cnt@#1\endcsname}\let\tcb@proc@counter=\tcb@proc@counter@from},
+ no counter/.code={\let\tcb@proc@counter=\tcb@proc@counter@no},
+ %
+ number within/.store in=\kvtcb@new@numberwithin,
+ number format/.store in=\kvtcb@new@format,
+ number freestyle/.store in=\kvtcb@new@freestyle,
+ %
+ list inside/.store in=\kvtcb@new@listof,
+ list type/.store in=\kvtcb@new@listtype,
+ %
+ init@hook@clear/.code={\def\kvtcb@init@hook{}},
+ crefname/.code 2 args={\begingroup\edef\x{\endgroup\noexpand\crefname{\tcb@new@boxname}}\x{#1}{#2}\tcb@new@label@type},
+ Crefname/.code 2 args={\begingroup\edef\x{\endgroup\noexpand\Crefname{\tcb@new@boxname}}\x{#1}{#2}\tcb@new@label@type},
+ %
+ blend into/.is choice,%
+ blend into/figures/.style={use counter*=figure,list inside=lof,/tcb/code={\appto\tcb@new@colopt{,before title={\tcb@blend@beforetitle{\fnum@figure}}}}},%
+ blend into/tables/.style={use counter*=table,list inside=lot,/tcb/code={\appto\tcb@new@colopt{,before title={\tcb@blend@beforetitle{\fnum@table}}}}},%
+ blend into/listings/.style={use counter*=lstlisting,list inside=lol,/tcb/code={\appto\tcb@new@colopt{,before title={\tcb@blend@beforetitle{\lstlistingname~\thetcbcounter}}}}},%
+ %
+ reset@new/.style={no counter,number within=,number format=\arabic,number freestyle=,list inside=,list type=tcolorbox,init@hook@clear},
+}
+
+\def\tcb@proc@counter@autoanduse#1{%
+ \letcs\tcbcounter{tcb@cnt@#1}%
+ \ifx\kvtcb@new@numberwithin\@empty%
+ \csxdef{the\tcbcounter}{\expandafter\noexpand\kvtcb@new@format{\tcbcounter}}%
+ \else%
+ \@addtoreset{\tcbcounter}{\kvtcb@new@numberwithin}%
+ \csxdef{the\tcbcounter}{\expandafter\noexpand\csname the\kvtcb@new@numberwithin\endcsname .\expandafter\noexpand\kvtcb@new@format{\tcbcounter}}%
+ \fi%
+ \ifx\kvtcb@new@freestyle\@empty%
+ \else%
+ \csxdef{the\tcbcounter}{\kvtcb@new@freestyle}%
+ \fi%
+ \global\csletcs{thetcb@cnt@#1}{the\tcbcounter}%
+ \appto\tcb@new@colopt{,code={\letcs\tcbcounter{tcb@cnt@#1}\letcs\thetcbcounter{thetcb@cnt@#1}\stepcounter{\tcbcounter}\preto\kvtcb@phantom{\addtocounter{\tcbcounter}{-1}\refstepcounter{\tcbcounter}}}}%
+}
+
+\def\tcb@proc@counter@auto#1{%
+ \newcounter{tcb@cnt@#1}%
+ \csxdef{tcb@cnt@#1}{tcb@cnt@#1}%
+ \tcb@proc@counter@autoanduse{#1}%
+}
+
+\def\tcb@proc@counter@use#1{%
+ \csxdef{tcb@cnt@#1}{\kvtcb@new@counter}%
+ \tcb@proc@counter@autoanduse{#1}%
+}
+
+\def\tcb@proc@counter@from#1{%
+ \csxdef{tcb@cnt@#1}{\kvtcb@new@counter}%
+ \global\csletcs{thetcb@cnt@#1}{the\kvtcb@new@counter}%
+ \appto\tcb@new@colopt{,code={\letcs\tcbcounter{tcb@cnt@#1}\letcs\thetcbcounter{thetcb@cnt@#1}\stepcounter{\tcbcounter}\preto\kvtcb@phantom{\addtocounter{\tcbcounter}{-1}\refstepcounter{\tcbcounter}}}}%
+}
+
+\def\tcb@proc@counter@no#1{%
+ \appto\tcb@new@colopt{,code={\let\tcbcounter=\@empty\let\thetcbcounter=\@empty}}%
+}%
+
+\long\def\tcb@proc@options@init#1#2{%
+ \tcbset{new/.cd,reset@new,#1}%
+ \tcb@proc@counter{#2}%
+ \ifx\kvtcb@new@listof\@empty%
+ \else%
+ \csedef{tcb@lstof@#2}{\kvtcb@new@listof}%
+ \csedef{tcb@lsttp@#2}{\kvtcb@new@listtype}%
+ \appto\tcb@new@colopt{,add to list={\csname tcb@lstof@#2\endcsname}{\csname tcb@lsttp@#2\endcsname}}%
+ \fi%
+ \kvtcb@init@hook%
+}%
+
+\long\def\tcb@process@newtcolorbox#1#2{%
+ \edef\tcb@new@boxname{#1}%
+ \def\tcb@new@colopt{}%
+ \long\def\temp@a{#2}%
+ \ifx\temp@a\@empty\relax%
+ \else%
+ \tcb@proc@options@init{#2}{#1}%
+ \fi%
+ \preto\tcb@new@colopt{savedelimiter=#1}%
+ \cslet{tcb@opt@#1}{\tcb@new@colopt}%
+ \tcb@process@newtcolorbox@continue{#1}%
+}
+
+\newcommand\tcb@process@newenvironment[2][]{%
+ \tcb@process@newtcolorbox{#2}{#1}%
+}
+
+\long\def\tcb@newtcolorbox#1#2{\tcb@newenvironment{#1}{\tcolorbox[#2,options@for=#1]}{\endtcolorbox}}
+
+\long\def\tcb@newtcolorbox@#1[#2]#3{\tcb@newenvironment{#1}[#2]{\tcolorbox[#3,options@for=#1]}{\endtcolorbox}}
+
+\long\def\tcb@newtcolorbox@@#1[#2][#3]#4{\tcb@newenvironment{#1}[#2][#3]{\tcolorbox[#4,options@for=#1]}{\endtcolorbox}}
+
+\long\def\tcb@new@tcolorbox@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcolorbox@@{#1}[#2]}{\tcb@newtcolorbox@{#1}[#2]}}
+
+\def\tcb@new@tcolorbox#1{%
+ \@ifnextchar[{\tcb@new@tcolorbox@{#1}}{\tcb@newtcolorbox{#1}}}
+
+\def\newtcolorbox{%
+ \let\tcb@newenvironment\newenvironment%
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcolorbox%
+ \tcb@process@newenvironment}
+
+\def\renewtcolorbox{%
+ \let\tcb@newenvironment\renewenvironment%
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcolorbox%
+ \tcb@process@newenvironment}
+
+\newcommand{\tcolorboxenvironment}[2]{%
+ \BeforeBeginEnvironment{#1}{\begin{tcolorbox}[savedelimiter={#1},#2]}%
+ \AfterEndEnvironment{#1}{\end{tcolorbox}}%
+}
+
+% auxiliary code to remove a leading backspace
+\newcommand{\tcb@remove@bs}[1]{%
+ \ifcat\relax\noexpand#1%
+ \expandafter\tcb@remove@bs@aux@i%
+ \fi
+ #1}
+\newcommand*{\tcb@remove@bs@aux@i}{%
+ \romannumeral%
+ \if\string\ \tcb@remove@bs@aux@ii\fi%
+ \expandafter\tcb@remove@bs@aux@iii\string}
+\newcommand{\tcb@remove@bs@aux@ii}{}
+\long\def\tcb@remove@bs@aux@ii#1\tcb@remove@bs@aux@iii{%
+ -\number\fi\expandafter\z@}
+\newcommand{\tcb@remove@bs@aux@iii}[1]{\z@}
+
+\newcommand\tcb@process@newcommand[2][]{%
+ \begingroup\edef\x{\endgroup\noexpand\tcb@process@newtcolorbox{\tcb@remove@bs{#2}}}\x{#1}%
+}
+
+\long\def\tcb@newtcbox#1#2{\expandafter\tcb@newcommand\csname#1\endcsname{\tcbox[#2,options@for=#1]}}
+
+\long\def\tcb@newtcbox@#1[#2]#3{\expandafter\tcb@newcommand\csname#1\endcsname[#2]{\tcbox[#3,options@for=#1]}}
+
+\long\def\tcb@newtcbox@@#1[#2][#3]#4{\expandafter\tcb@newcommand\csname#1\endcsname[#2][#3]{\tcbox[#4,options@for=#1]}}
+
+\long\def\tcb@new@tcbox@#1[#2]{%
+ \@ifnextchar[{\tcb@newtcbox@@{#1}[#2]}{\tcb@newtcbox@{#1}[#2]}}
+
+\def\tcb@new@tcbox#1{%
+ \@ifnextchar[{\tcb@new@tcbox@{#1}}{\tcb@newtcbox{#1}}}
+
+\def\newtcbox{%
+ \let\tcb@newcommand\newcommand%
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcbox%
+ \tcb@process@newcommand}
+
+\def\renewtcbox{%
+ \let\tcb@newcommand\renewcommand%
+ \let\tcb@process@newtcolorbox@continue\tcb@new@tcbox%
+ \tcb@process@newcommand}
+
+
+\def\tcb@addcontentsline#1#2{%
+ \ifx\kvtcb@listentry\@empty%
+ \ifx\kvtcb@title\@empty%
+ \ifx\tcbtitletext\@empty%
+ \addcontentsline{#1}{#2}{\protect\numberline{\thetcbcounter}{\ignorespaces\kvtcb@savedelimiter}}%
+ \else%
+ \addcontentsline{#1}{#2}{\protect\numberline{\thetcbcounter}{\ignorespaces\tcbtitletext}}%
+ \fi%
+ \else%
+ \addcontentsline{#1}{#2}{\protect\numberline{\thetcbcounter}{\ignorespaces\kvtcb@title}}%
+ \fi%
+ \else%
+ \addcontentsline{#1}{#2}{\kvtcb@listentry}%
+ \fi%
+}
+
+\newcommand*\l@tcolorbox{\@dottedtocline{1}{1.5em}{2.3em}}
+
+\newcommand{\tcblistof}[3][\section]{%
+ #1{#3}%
+ \@starttoc{#2}%
+}
+
+
+
+% verbatim output as in 'verbatim'
+
+\newwrite\tcb@out
+
+\let\tcb@verbatim@begin@hook\@empty
+\let\tcb@verbatim@end@hook\@empty
+
+\def\tcbverbatimwrite#1{%
+ \@bsphack
+ \immediate\openout\tcb@out #1
+ \tcb@verbatim@begin@hook%
+ \let\do\@makeother\dospecials
+ \catcode`\^^M\active \catcode`\^^I=12
+ \def\verbatim@processline{%
+ \immediate\write\tcb@out
+ {\the\verbatim@line}}%
+ \verbatim@start}%'
+
+
+\def\endtcbverbatimwrite{%
+ \tcb@verbatim@end@hook%
+ \immediate\closeout\tcb@out
+ \@esphack%
+}
+
+
+% saving of the lower box
+
+\def\tcb@lowerverbatim{%
+ \begingroup%
+ \tcbverbatimwrite\kvtcb@savelowerto}
+
+\def\tcb@endlowerverbatimanddraw{%
+ \endtcbverbatimwrite%
+ \endgroup%
+ \IfFileExists{\kvtcb@savelowerto}{%
+ \tcb@savelowerbox\input{\kvtcb@savelowerto}\end{tcb@savebox}}{}%
+ \tcb@draw@color@box%
+ \tcb@finalize@environment%
+}
+
+% saving of the upper box
+
+\def\tcb@upperverbatim{%
+ \begingroup%
+ \tcbverbatimwrite\kvtcb@saveupperto}
+
+\def\tcb@endupperverbatimanddraw{%
+ \endtcbverbatimwrite%
+ \endgroup%
+ \IfFileExists{\kvtcb@saveupperto}{%
+ \tcb@saveupperbox\input{\kvtcb@saveupperto}\end{tcb@savebox}}{}%
+ \tcb@draw@color@box%
+ \tcb@finalize@environment%
+}
+
+\def\tcbwritetemp{%
+ \begingroup%
+ \tcbverbatimwrite\kvtcb@tempfile}
+
+\def\endtcbwritetemp{%
+ \endtcbverbatimwrite%
+ \endgroup%
+}
+
+\def\tcbusetemp{\input{\kvtcb@tempfile}}
+
+% recording
+
+\newwrite\tcb@record@out
+
+\def\tcb@null#1{}
+\newcommand{\tcb@record}[1]{\immediate\write\tcb@record@out{#1}}
+
+\newcommand{\tcbstartrecording}[1][\jobname.records]{%
+ \let\tcbrecord\tcb@record%
+ \edef\tcb@record@file{#1}%
+ \immediate\openout\tcb@record@out\tcb@record@file%
+}
+
+\newcommand{\tcbstoprecording}{%
+ \immediate\closeout\tcb@record@out%
+ \let\tcbrecord\tcb@null%
+}
+
+\tcbset{%
+ record/.style={phantom={\tcbrecord{#1}}},
+ no recording/.code={\let\tcbrecord\tcb@null},
+ no recording
+}
+
+\newcommand{\tcbinputrecords}[1][\tcb@record@file]{%
+ \IfFileExists{#1}{\input{#1}}{\tcb@error{record file `#1' not found}{The record file `#1' was not found}}%
+}
+
+\tcb@new@skin{standard}{frame engine=standard,interior titled engine=standard,
+ interior engine=standard,segmentation engine=standard,title engine=standard,
+ graphical environment=pgfpicture,geometry nodes=false,
+ set@extensions@preframe=,set@extensions@postframe={\tcb@apply@overlay},set@extensions@final=,%
+ set@outerboundary=\tcb@boundaryframe@standard,%
+ shape@of@skin=unbroken,
+ skin first=standard,skin middle=standard,skin last=standard%
+}
+
+\tcb@new@skin{standard jigsaw}{skin@standard,frame engine=standardjigsaw,%
+ skin first=standard jigsaw,skin middle=standard jigsaw,skin last=standard jigsaw}
+
+\def\tcb@reset{}%
+\tcbset{%
+ initialize@reset/.code={\tcbset{#1}\appto\tcb@reset{\tcbset{#1}}},%
+ reset/.code={\tcb@reset},%
+ reset@core/.style={code={\let\tcbtitletext\@empty\tcb@attach@title@code@%
+ \let\tcb@lateoptions@hook\@empty},
+ width=\linewidth,autoparskip,arc is curved,
+ natural height,height plus=0pt,space to lower,valign=top,valign lower=top,
+ size=normal,rounded corners,
+ enlarge top by=0mm,enlarge bottom by=0mm,enlarge left by=0mm,enlarge right by=0mm,
+ toggle enlargement=none,toggle left and right=none,
+ baseline=0pt,adjust text={\"Apgjy},upperbox=visible,lowerbox=visible,lower separated,
+ colback=black!5!white,colframe=black!75!white,@colbacktitle=black!50!white,coltext=black,coltitle=white,
+ fonttitle=,fontupper=,fontlower=,floatplacement=htb,nofloat,saveto=,savelowerto=,
+ tempfile={\jobname.tcbtemp},
+ standard,parbox,hyphenationfix=false,overlay=,
+ halign=justify,halign lower=justify,halign title=justify,
+ before title=,after title=,before upper=,after upper=,before lower=,after lower=,
+ sidebyside=false,sidebyside align=center,sidebyside gap=10mm,
+ lefthand ratio=0.5,check odd page=false,nophantom,
+ shield externalize=false,list entry=,no label type,
+ opacityupper=1.0,opacitylower=1.0,opacitytitle=1.0,opacityframe=1.0,opacityback=1.0,@opacitybacktitle=1.0,
+ subtitle style=,title filled=false,every float=,ignore nobreak=false,before nobreak=\noindent,
+ tcbox width=auto,
+ },
+ initialize@reset=reset@core,
+}
+
+\def\tcbsetforeverylayer#1{\tcbset{initialize@reset={#1}}}
+
+% libraries
+\def\tcb@optionlist{}
+
+\def\tcb@set@library@version#1{%
+ \def\tcb@library@version{#1}%
+ \typeout{Library (tcolorbox): '\@currname' version '\tcb@library@version'}
+ \tcb@check@library@version%
+}
+
+\def\tcb@check@library@version{%
+ \ifx\tcb@library@version\tcb@version\else%
+ \tcb@error{tcolorbox version '\tcb@version' loads library '\@currname' with version '\tcb@library@version'}%
+ {tcolorbox is not installed correctly. At least one library is not compatible to the main package.}%
+ \fi%
+}
+
+\def\tcbuselibrary#1{\tcbset{library/.cd,#1}}
+\@onlypreamble\tcbuselibrary
+
+\providecommand{\tcbpkgprefix}{}
+
+\def\tcb@load@library#1#2{%
+ \pgfkeysifdefined{/tcb/libload/#1}{}{%
+ \pgfkeyssetvalue{/tcb/libload/#1}{}%
+ \@pushfilename%
+ \xdef\@currname{#2}%
+ \makeatletter%
+ \def\tcb@library@version{-}%
+ \input\tcbpkgprefix#2\relax%
+ \tcb@check@library@version%
+ \@popfilename%
+ }%
+}
+
+\def\tcb@add@library#1#2{%
+ \tcbset{library/#1/.code={\tcb@load@library{#1}{#2}}}%
+ \DeclareOption{#1}{\appto\tcb@optionlist{,#1}}%
+}
+\def\tcb@add@library@style#1#2{%
+ \tcbset{library/#1/.style={#2}}%
+ \DeclareOption{#1}{\appto\tcb@optionlist{,#1}}%
+}
+
+\tcb@add@library{pro@cessing}{tcbprocessing.code.tex}
+\tcb@add@library{listings@core}{tcblistingscore.code.tex}
+\tcb@add@library{listings}{tcblistings.code.tex}
+\tcb@add@library{listingsutf8}{tcblistingsutf8.code.tex}
+\tcb@add@library{minted}{tcbminted.code.tex}
+\tcb@add@library{theorems}{tcbtheorems.code.tex}
+\tcb@add@library{documentation}{tcbdocumentation.code.tex}
+\tcb@add@library{raster}{tcbraster.code.tex}
+\tcb@add@library{skins@jigsaw}{tcbskinsjigsaw.code.tex}
+\tcb@add@library{skins}{tcbskins.code.tex}
+\tcb@add@library{breakable}{tcbbreakable.code.tex}
+\tcb@add@library{magazine}{tcbmagazine.code.tex}
+\tcb@add@library{hooks}{tcbhooks.code.tex}
+\tcb@add@library{fitting}{tcbfitting.code.tex}
+\tcb@add@library{xparse}{tcbxparse.code.tex}
+\tcb@add@library{external}{tcbexternal.code.tex}
+\tcb@add@library{vignette}{tcbvignette.code.tex}
+
+\tcb@add@library@style{many}{raster,skins,breakable,hooks,theorems,fitting,xparse}
+\tcb@add@library@style{most}{many,listingsutf8,external,magazine,vignette}
+\tcb@add@library@style{all}{many,minted,listingsutf8,external,magazine,vignette,documentation}
+
+\ProcessOptions*
+\begingroup\edef\x{\endgroup\noexpand\tcbuselibrary{\tcb@optionlist}}\x
diff --git a/tex/.texmf/tex/latex/misc/titlesec.sty b/tex/.texmf/tex/latex/misc/titlesec.sty
new file mode 100644
index 0000000..67960ef
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/titlesec.sty
@@ -0,0 +1,1350 @@
+% +--------------------------------------------------+
+% | Typeset titlesec.tex to get the documentation. |
+% +--------------------------------------------------+
+%
+% Copyright (c) 1998-2016 by Javier Bezos.
+% All Rights Reserved.
+%
+% This file is part of the titlesec distribution release 2.10.2
+% -----------------------------------------------------------
+%
+% It 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 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Javier Bezos.
+%
+% Notes
+% ~~~~~
+%
+% The following tags are used:
+% ttl@ : the generic tag used through the style
+% ttlh@ : a shape definition
+% ttlf@ : a macro containing the title format
+% ttls@ : id. the title space
+% ttlp@ : page key related macros
+% ttll@ : level number
+%
+% The ttlf@ and ttls@ contains data in the form {..}{..}.
+% Perhaps in future releases they should be converted
+% to a prop-like list, similar to that proposed by the
+% latex team.
+%
+% Admittedly, the current implementation seems too
+% complicated, but that's necessary in order to provide
+% certain compatibility with the sections as defined by the
+% used class. Other packages opt for providing the sections
+% as defined by standard classes ignoring the class; for
+% instance sectsty which does a simple task in a simple and
+% nice way. However, that was not my goal.
+%
+% Release
+% ~~~~~~~
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{titlesec}[2016/03/21 v2.10.2 Sectioning titles]
+
+% Initialization
+% ~~~~~~~~~~~~~~
+
+\newif\ifttl@ps
+\ttl@psfalse
+
+% The \ttl@label switch is used when printing the label in titles.
+% A numberless variant makes it to true.
+% There is a \ttl@toclabel as well, which is true iff the
+% title is numbered; used in toc entries (except default part
+% and chapter) and marks (only in titlesec pagestyles).
+
+\newif\ifttl@label
+\newif\ifttl@toclabel
+
+\newbox\ttl@box
+
+% A provision for the report style:
+
+\@ifundefined{if@mainmatter}
+ {\let\if@mainmatter\iftrue}{}
+
+\@ifundefined{if@openright}
+ {\let\if@openright\iftrue}{}
+
+% and the ams styles as well
+
+\@ifundefined{@chapapp}
+ {\let\@chapapp\chaptername}{}
+
+\def\ttl@trylist{\ttl@try{}}
+
+\def\ttl@getkeys#1#2{%
+ \if\expandafter @\@gobble#1@\@empty
+ \edef\ttl@b{\expandafter\@gobble\string#1}%
+ \let\ttl@a\ttl@b
+ \else
+ \makeatletter
+ \edef\ttl@d{%
+ \noexpand\input{ttlkeys.def}%
+ \catcode`\noexpand\@=\the\catcode`\@}%
+ \ttl@d
+ \ttl@getkeys{#1}{#2}%
+ \fi}
+
+% A more meaningful error for \@notdefinable
+
+\expandafter\AtEndOfPackage\expandafter{\expandafter
+ \gdef\expandafter\@notdefinable\expandafter{\@notdefinable}}
+
+\def\@notdefinable{%
+ \PackageError{titlesec}%
+ {Incompatible package}%
+ {Titlesec cannot continue defining its own macros
+ because\MessageBreak
+ \@backslashchar\reserved@a\space is already used by other package,
+ the class\MessageBreak
+ or the document.}}
+
+% +-----------------+
+% | C L A S S E S |
+% +-----------------+
+
+\def\ttl@useclass#1#2{%
+ \@ifstar
+ {\ttl@labelfalse#1{#2}[]}%
+ {\ttl@labeltrue\@dblarg{#1{#2}}}}
+
+\def\ttl@straightclass{\ttl@useclass\ttl@straight@i}
+\def\ttl@partclass{\ttl@useclass\ttl@part@i}
+\def\ttl@topclass{\ttl@useclass\ttl@top@i}
+\def\ttl@pageclass{\ttl@useclass\ttl@page@i}
+
+% Here \scantokens is used to make sure the unescaped name
+% has `letters' and no `others'. Mainly for hyperref, so there
+% should be no problems.
+
+\newcommand\titleclass[1]{%
+ \edef\ttl@a{\expandafter\@gobble\string#1}%
+ \ifx\scantokens\@undefined\else
+ \scantokens\expandafter{\expandafter
+ \def\expandafter\ttl@a\expandafter{\ttl@a}}%
+ \fi
+ \@ifnextchar[{\@tempswatrue\ttl@class@i{#1}}%
+ {\@tempswafalse\ttl@class@ii{#1}}}
+
+\def\ttl@class@i#1[#2]{%
+ \@namedef{ttll@\ttl@a}{#2}%
+ \expandafter\providecommand\csname\ttl@a title\endcsname{}%%%%
+ \@ifundefined{ttl@toplevel}{}%
+ {\expandafter\let\csname ttlss@\ttl@a\expandafter\endcsname
+ \csname ttlss@\ttl@toplevel\endcsname}%
+ \edef\ttl@toplevel{\ttl@a}%
+ \ttl@class@ii{#1}}
+
+\def\ttl@class@ii#1#2{%
+ \@ifundefined{ttl@#2class}%
+ {\PackageError{titlesec}{Unknown sectioning class}%
+ {Valid names are top, page and straight}}%
+ {\expandafter\let\csname ttl@compat\ttl@a\endcsname\relax
+ \@ifundefined{\ttl@a mark}%
+ {\@namedef{\ttl@a mark}{\@gobble}}%
+ {}%
+ \edef#1{%
+ \expandafter\noexpand\csname ttl@#2class\endcsname{\ttl@a}}}%
+ \if@tempswa
+ \expandafter\@gobble
+ \else
+ \expandafter\@firstofone
+ \fi
+ {\@ifnextchar[%
+ {\ttl@class@iii}%
+ {\@ifundefined{ttll@\ttl@a}%
+ {\PackageError{titlesec}{Unknown sectioning level}%
+ {\string\titleclass\space with no optional arguments\MessageBreak
+ only changes the class of an *existing* level}}}}}
+
+\def\ttl@class@iii[#1]{%
+ \edef\ttl@b{\expandafter\@gobble\string#1}%
+ \expandafter\let\csname ttlss@\ttl@a\expandafter\endcsname
+ \csname ttlss@\ttl@b\endcsname
+ \expandafter\edef\csname ttlss@\ttl@b\endcsname{\ttl@a}%
+ \let\ttl@a\ttl@toplevel
+ \count@\csname ttll@\ttl@toplevel\endcsname
+ \ttl@class@iv}
+
+\def\ttl@class@iv{%
+ \@ifundefined{ttlss@\ttl@a}{}%
+ {\advance\count@\@ne
+ \edef\ttl@a{\csname ttlss@\ttl@a\endcsname}%
+ \expandafter\edef\csname ttll@\ttl@a\endcsname{\the\count@}%
+ \ttl@class@iv}}
+
+% Typesetting Classes: General tools
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+% The following command handles the *n spacing
+% Some tricks are necessary to multiply a
+% skip by a non integer number
+
+\newskip\beforetitleunit
+\beforetitleunit=1ex\@plus.3ex\@minus.06ex
+\newskip\aftertitleunit
+\aftertitleunit=1ex\@plus.1ex
+
+\newdimen\ttl@plus
+\newdimen\ttl@minus
+
+\def\ttl@assign#1{%
+ \@ifstar
+ {\ttl@assign@i{#1}}%
+ {\ttl@assign@d{#1}}}
+
+\def\ttl@assign@i#1#2\relax#3{%
+ \ttl@plus\z@
+ \ttl@minus\z@
+ \afterassignment\ttl@assign@ii
+ \dimen@\the#3, % <- space
+ #1 = #2\dimen@
+ plus #2\ttl@plus
+ minus #2\ttl@minus}
+
+\def\ttl@assign@ii#1 {% <- space
+ \if#1,\else\afterassignment\ttl@assign@ii\fi
+ \csname ttl@\string#1\endcsname}
+
+\def\ttl@assign@d#1#2\relax#3{\setlength#1{#2}}
+
+% To be used with \v/vspace to make them calc-savvy
+
+\def\ttl@calc#1#2{%
+ {\setlength\@tempskipa{#2}%
+ #1\@tempskipa}}
+
+\def\ttl@calcneg#1#2{%
+ {\setlength\@tempskipa{#2}%
+ #1{-\@tempskipa}}}
+
+% Gets from ttls@ and passes the spacing parameters:
+
+\def\ttl@startargs#1#2{% Get the first arguments, with the spacing
+ \@ifundefined{ttlp@#2}%
+ {\let\ttl@key@page\@empty}%
+ {\ttlp@fetch{#2}}%
+ \begingroup
+ \def\ttl@b{ttls@#2}%
+ \edef\ttl@key@numberless{\ifttl@label//\else/*\fi}%
+ \def\ttl@a##1{\csname ttl@key@##1\endcsname}% Used as elt in try
+ \ttl@trylist
+ \xdef\ttl@b{\ttl@c}%
+ \endgroup
+ \ifx\ttl@b\@empty
+ \PackageError{titlesec}{Format/spacing not found}%
+ {I was unable to find the format corresponding to #2.\MessageBreak
+ Maybe you haven't set it with \string\titleformat\space and
+ \string\titlespacing}
+ \fi
+ \expandafter#1\ttl@b{#2}}
+
+% Used in ttl@select
+
+\def\ttl@savefn#1[#2]#3{%
+ \ifcase#1%
+ \footnotemark[#2]%
+ \gdef\ttl@fn{\footnotetext[#2]{#3}}%
+ \else
+ \footnotemark
+ \gdef\ttl@fn{\footnotetext{#3}}%
+ \fi}
+
+\def\ttl@nest@error{%
+ \PackageError{titlesec}{Nested titles}{Titles must not be nested}}
+
+\def\ttl@hmode@error{%
+ \PackageError{titlesec}{Entered in horizontal mode}
+ {The <format> argument cannot contain horizontal material\MessageBreak
+ such as text, \string\noindent, \string\makebox, etc.}}
+
+% \ttl@select not only selects the right version to be
+% used. It also take steps to ensure that a mark
+% is not lost inside a box by saving it into \ttl@mk,
+% which in turn is used by the sect and chap commands.
+
+\newif\ifttl@explicit
+
+\def\ttl@gmk#1{\gdef\ttl@mk{#1}}
+
+\def\ttl@select#1#2#3#4{%
+ \ttl@Hy@saveanchor
+ \global\let\ttl@mk\@empty % global because of rigidchapters
+ \global\let\ttl@fn\@empty
+ \begingroup
+ \if@inlabel\else % Keep item's \everypar
+ \everypar{\setbox\z@\lastbox\strut}%
+ \fi
+ \let\ttl@straight@i\ttl@nest@error
+ \let\ttl@top@i \ttl@nest@error
+ \let\ttl@part@i \ttl@nest@error
+ \let\ttl@page@i \ttl@nest@error
+ \let\ttl@newpage\newpage
+ \def\newpage{\ttl@savewrite\ttl@newpage}%
+ \def\markboth##1##2{\protect\ttl@gmk{\protect\markboth{##1}{##2}}}%
+ \def\markright##1{\protect\ttl@gmk{\protect\markright{##1}}}%
+ \def\@mkboth##1##2{\protect\ttl@gmk{\protect\@mkboth{##1}{##2}}}%
+ \def\footnote{\@ifnextchar[%
+ {\ttl@savefn\z@}{\ttl@savefn\@ne[]}}%
+ \edef\ttl@key@numberless{\ifttl@label//\else/*\fi}%
+ \def\ttl@b{ttlf@#1}%
+ \def\ttl@a##1{\csname ttl@key@##1\endcsname}% Used as elt in try
+ \ttl@trylist
+ \ifttl@explicit
+ \def\ttl@passexplicit{\ttl@case{#4}}%
+ \ttl@c{#4}{#2}{#3}{}% ttl@c is returned by ttl@try with ttlf@...
+ \else
+ \let\ttl@passexplicit\ttl@case
+ \ttl@c{#2}{#3}{#4}% ttl@c is returned by ttl@try with ttlf@...
+ \fi
+ \endgroup}
+
+\let\ttl@savewrite\@empty
+
+\def\ttl@finmarks{%
+ \ttl@savewrite
+ \ttl@mk % Contains a possible mark, returned by \ttl@select
+ \ttl@fn} % And a footnote
+
+\def\ttl@try#1{%
+ \edef\ttl@c{#1}% #1 is a list in the form \ttl@a{key}\ttl@a{key}
+ \@ifundefined{\ttl@b\ttl@c}{}{%
+ \edef\ttl@c{\expandafter\noexpand\csname\ttl@b\ttl@c\endcsname}%
+ \def\ttl@a##1{\csname ttl@extra@##1\endcsname}%
+ #1%
+ \let\ttl@try\@gobble}} % locally modified to `break' testings
+
+% \ttl@write writes marks and toc. tocdepth is taken care of when
+% the toc is typesetted and not here. Used always through
+% ttl@savewrite, which is reset to \@empty to avoid duplicated
+% calls.
+
+\def\ttl@write#1#2{%
+ \ttl@blinemarks
+ \csname#1mark\endcsname{#2}%
+ \def\ttl@a{\protect\numberline{\@nameuse{the#1}}}%
+ \@nameuse{ttl@toc#1}% eg, \ttl@tocpart modifies \ttl@a
+ \ttl@addcontentsline{#1}{#2}% Depends on toctitles, uses \ttl@a
+ \ttl@elinemarks
+ \global\ttl@toclabelfalse
+ \global\let\ttl@savewrite\@empty}
+
+\newif\ifttl@premark % to be used in ttlps.def
+\ttl@premarkfalse
+
+\def\ttl@premark#1#2{%
+ \protected@xdef\ttl@prevmarks{\ttl@marks}%
+ \ttl@blinemarks
+ \csname#1mark\endcsname{#2}%
+ \ttl@elinemarks
+ \gdef\ttl@prevmarks{\ttl@marks}}
+
+% Must be preceded by a default \ttl@savewrite, which is used
+% in starred variants--\@empty in top and straight classes.
+% In straight class, it is preceded by the setting of
+% prev marks to provide a "fixed" top mark. Otherwise,
+% the default prev mark (= curr mark) is used (restored
+% after ttl@labelling in straight). This is the command
+% to be hacked if you want to change the behaviour of
+% starred variants.
+
+\def\ttl@labelling#1#2{%
+ \let\ttl@Hy@saveanchor\@empty
+ \ifttl@label % 1st - if star
+ \def\ttl@savewrite{\ttl@write{#1}{#2}}%
+ \@nameuse{ttl@#1label}% eg, sets if mainmatter in chapter.
+ \ifttl@label % 2nd - eg, if not main matter
+ \ifnum\@nameuse{ttll@#1}>\c@secnumdepth\relax
+ \ttl@labelfalse % 3rd - if too deep
+ \else
+ \ttl@Hy@refstepcounter{#1}%
+ \@nameuse{ttl@#1out}%
+ \fi
+ \fi
+ \fi
+ \let\ifttl@toclabel\ifttl@label
+ \ifx\ttl@savewrite\@empty\else % If marks
+ \ifttl@ps
+ \ifttl@premark
+ \global\ttl@premarkfalse
+ \else % if no \pretitlemark
+ \ttl@premark{#1}{#2}%
+ \fi
+ \fi
+ \ifttl@label\else\ttl@Hy@steplink{#1}\fi
+ \fi}
+
+% Executed by ttl@labelling if the name of section is chapter:
+
+\def\ttl@chapterlabel{\if@mainmatter\else\ttl@labelfalse\fi}
+
+% Executed by ttl@labelling if chapter has a number. Note
+% you can define messages for other sectioning levels (eg,
+% \ttl@sectionout).
+
+\def\ttl@chapterout{\typeout{\chaptertitlename\space\thechapter.}}
+
+% Straight class
+% ~~~~~~~~~~~~~
+% Default for nobottomtitles. Changed by nobottomtitles*
+
+\def\ttl@addstretch{\advance\@tempskipa-\pagestretch}
+
+% 1:name 2:level 3:indent 4:before 5:after 6:afind [7]:cap 8:title
+% The second argument of ttl@sect is the level, which
+% is empty if the star version is used. In this case
+% neither the toc nor the marks are written.
+
+\def\ttl@straight@i#1[#2]#3{%
+ \def\@currentlabelname{#2}% for nameref
+ \gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
+ \let\ttl@savewrite\@empty
+ \def\ttl@savetitle{#3}%
+ \gdef\thetitle{\csname the#1\endcsname}%
+ \if@noskipsec \leavevmode \fi
+ \par
+ \ttl@labelling{#1}{#2}%
+ \ttl@startargs\ttl@straight@ii{#1}{#3}}
+
+% 1:left 2:right 3:before 4:after 5:afterindent 6:name 7:title
+
+\def\ttl@straight@ii#1#2#3#4#5#6#7{%
+ \ttl@assign\@tempskipa#3\relax\beforetitleunit
+ \@ifundefined{ttl@ps@#6}{}%
+ {\PackageWarning{titlesec}{Page style in straight class ignored}}%
+ \if@nobreak
+ \ttl@titlespace{\@tempskipa}%
+ \else
+ \@ifundefined{#6break}%
+ {\addpenalty{\@secpenalty}}%
+ {\csname#6break\endcsname}%
+ \addvspace{\@tempskipa}%
+ \ifdim\bottomtitlespace<\z@
+ \else
+ \begingroup
+ \@tempskipb\pagegoal
+ \@tempskipa\pagegoal
+ \ttl@addstretch % \relax if nobottomtitle*
+ \advance\@tempskipa-\bottomtitlespace\relax % not a register
+ \pagegoal\@tempskipa
+ \def\@textbottom{\vskip\z@\@plus.0001fil}%
+ \penalty9999
+ \pagegoal\@tempskipb
+ \endgroup
+ \fi
+ \fi
+ \@afterindenttrue
+ \ifcase#5 \@afterindentfalse\fi
+ \ttl@assign\@tempskipb#4\relax\aftertitleunit
+ \ttl@select{#6}{#1}{#2}{#7}%
+ \ttl@finmarks
+ \@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
+ \if@noskipsec
+ \global\@nobreakfalse
+ \everypar{%
+ \if@noskipsec
+ \global\@noskipsecfalse
+ \clubpenalty\@M
+ \hskip-\parindent
+ \begingroup
+ \@svsechd\unskip{\hspace{\@tempskipb}}%
+ \endgroup
+ \else
+ \clubpenalty\@clubpenalty\everypar{}%
+ \fi}%
+ \else
+ \par\nobreak
+ \vspace{\@tempskipb}%
+ \@afterheading
+ \fi
+ \ignorespaces}
+
+% Part class
+% ~~~~~~~~~~
+
+\providecommand\partmark[1]{\markboth{}{}}
+
+\def\ttl@part@i#1[#2]#3{%
+ \gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
+ \ifx\ttl@notocparts\@undefined
+ \def\ttl@savewrite{\ttl@write{#1}{#3}}% Not #2!
+ \else
+ \let\ttl@savewrite\@empty
+ \fi
+ \def\ttl@savetitle{#3}%
+ \ttl@labelling{#1}{#2}%
+ \ttl@startargs\ttl@part@ii{#1}{#3}}
+
+\def\ttl@part@ii#1#2#3#4#5#6#7{%
+ \ttl@assign\@tempskipa#3\relax\beforetitleunit
+ \vspace*{\@tempskipa}%
+ \@ifundefined{ttl@ps@#6}{}%
+ {\PackageWarning{titlesec}{Page style in part class ignored}}%
+ \global\@afterindenttrue
+ \ifcase#5 \global\@afterindentfalse \fi
+ \ttl@assign\@tempskipb#4\relax\aftertitleunit
+ \ttl@select{#6}{#1}{#2}{#7}%
+ \ttl@finmarks
+ \@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
+ \par\nobreak
+ \vspace{\@tempskipb}%
+ \@afterheading}
+
+% Page class
+% ~~~~~~~~~~
+
+\def\ttl@page@i#1[#2]#3{%
+ \gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
+ \ifx\ttl@notocparts\@undefined
+ \def\ttl@savewrite{\ttl@write{#1}{#3}}% Not #2!
+ \else
+ \let\ttl@savewrite\@empty
+ \fi
+ \def\ttl@savetitle{#3}%
+ \ttl@labelling{#1}{#2}%
+ \ttl@startargs\ttl@page@ii{#1}{#3}}
+
+\def\ttl@page@ii#1#2#3#4#5#6#7{%
+ \ttl@assign\@tempskipa#3\relax\beforetitleunit
+ \if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi
+ \@ifundefined{ttl@ps@#6}%
+ {\thispagestyle{plain}}%
+ {\thispagestyle{\@nameuse{ttl@ps@#6}}}%
+ \if@twocolumn
+ \onecolumn
+ \@tempswatrue
+ \else
+ \@tempswafalse
+ \fi
+ \vspace*{\@tempskipa}%
+ \@afterindenttrue
+ \ifcase#5 \@afterindentfalse\fi
+ \ttl@assign\@tempskipb#4\relax\aftertitleunit
+ \ttl@select{#6}{#1}{#2}{#7}%
+ \ttl@finmarks
+ \@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}%
+ \vspace{\@tempskipb}%
+ \newpage
+ \if@twoside
+ \if@openright
+ \null
+ \@ifundefined{ttl@ps@#6}%
+ {\thispagestyle{empty}}%
+ {\thispagestyle{\@nameuse{ttl@ps@#6}}}%
+ \newpage
+ \fi
+ \fi
+ \if@tempswa
+ \twocolumn
+ \fi
+ \ignorespaces}
+
+% Top class and some makechapterhead stuff
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+%
+% \ttl@mkchap is the new make(s)chapterhead.
+
+\def\ttl@mkchap#1#2#3#4#5#6#7{%
+ \gdef\ttl@savemark{\csname#6mark\endcsname{#7}}%
+ \let\ttl@savewrite\@empty
+ \let\ttl@Hy@saveanchor\@empty
+ \@ifundefined{ttl@ps@#6}{}%
+ {\thispagestyle{\@nameuse{ttl@ps@#6}}}%
+ \let\ifttl@toclabel\ifttl@label
+ \ttl@mkchap@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
+
+% But \ttl@mkchap@i is used by both makechapterhead and
+% the top class.
+
+\def\ttl@mkchap@i#1#2#3#4#5#6#7{%
+ \ttl@assign\@tempskipa#3\relax\beforetitleunit
+ \vspace*{\@tempskipa}%
+ \global\@afterindenttrue
+ \ifcase#5 \global\@afterindentfalse\fi
+ \ttl@assign\@tempskipb#4\relax\aftertitleunit
+ \ttl@topmode{\@tempskipb}{%
+ \ttl@select{#6}{#1}{#2}{#7}}%
+ \ttl@finmarks % Outside the box!
+ \@ifundefined{ttlp@#6}{}{\ttlp@write{#6}}}
+
+\def\ttl@top@i#1[#2]#3{%
+ \gdef\ttl@savemark{\csname#1mark\endcsname{#3}}%
+ \let\ttl@savewrite\@empty
+ \def\ttl@savetitle{#3}%
+ \ttl@labelling{#1}{#2}%
+ \ttl@startargs\ttl@top@ii{#1}{#3}}
+
+\def\ttl@top@ii#1#2#3#4#5#6#7{%
+ \@ifundefined{#6break}%
+ {\if@openright
+ \cleardoublepage
+ \else
+ \clearpage
+ \fi}%
+ {\csname#6break\endcsname}%
+ \@ifundefined{ttl@ps@#6}%
+ {\thispagestyle{plain}}%
+ {\thispagestyle{\@nameuse{ttl@ps@#6}}}%
+ \global\@topnum\z@
+ \@ifundefined{#6tolists}%
+ {\addtocontents{lof}{\protect\ttl@tocsep}%
+ \addtocontents{lot}{\protect\ttl@tocsep}}
+ {\@nameuse{#6tolists}}%
+ \if@twocolumn
+ \@topnewpage[\ttl@mkchap@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}]%
+ \else
+ \ttl@mkchap@i{#1}{#2}{#3}{#4}{#5}{#6}{#7}%
+ \@afterheading
+ \fi
+ \ignorespaces}
+
+
+% \def\ttl@noskipsectrue{%
+% \if@noskipsec
+% \PackageError{titlesec}{Invalid shape for top class}%
+% {The selected shape only makes sense when merged into\MessageBreak
+% a paragraph. That is impossible in the top class}%
+% \else
+
+\newcommand\chaptertitlename{\@chapapp}
+\def\ttl@tocsep{\addvspace{10\p@}}
+
+% +-----------------+
+% | S H A P E S |
+% +-----------------+
+%
+% % Reformatting Titles: Interface
+% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+% The surrounding space is stored in a macro
+% named \ttls@<section> whose content is
+% {left}{right}{before}{after}{afterindent}.
+% But if there is the page key, the name is
+% \ttls@<section>/<page>
+
+\newcommand\titlespacing{%
+ \@ifstar{\ttl@spacing@i{\z@}}{\ttl@spacing@i{\@ne}}}
+
+\def\ttl@spacing@i#1#2#3#4#5{%
+ \ttl@getkeys{#2}{titlesec}%
+ \@ifnextchar[{%
+ \ttl@spacing@ii{#1}{#3}{#4}{#5}%
+ }{%
+ \ttl@spacing@ii{#1}{#3}{#4}{#5}[\z@]}}
+
+\def\ttl@spacing@ii#1#2#3#4[#5]{%
+ \expandafter\def\csname ttls@\ttl@a\endcsname
+ {{#2}{#5}{#3}{#4}{#1}}}
+
+% The section name is built in \ttl@a.
+% The format is stored in a macro named \ttlf@<section>,
+% or \ttlf@<section>/<page> if there is the page spec,
+% or \ttlf@.../* if numberless is true
+% whose content is
+% \ttl@<shape>{format}{label}{sep}{before}{after}
+
+\newtoks\ttl@toksa
+
+\newcommand\titleformat{%
+ \@ifstar{\ttl@format@s}%
+ {\ttl@format@i}}
+
+\def\ttl@format@s#1#2{%
+ \edef\ttl@a{\expandafter\@gobble\string#1}%
+ \@ifundefined{ttlf@\ttl@a}%
+ {\PackageError{titlesec}{Not allowed in `easy' settings}
+ {The sectiong command you are trying to redefine\MessageBreak
+ is not handled by the starred variant (eg, \string\part)}}{}
+ \expandafter\expandafter\expandafter
+ \ttl@format@si\csname ttlf@\ttl@a \endcsname
+ {#2}}
+
+\def\ttl@format@si#1#2#3#4#5#6#7{%
+ \@namedef{ttlf@\ttl@a}{#1{#7}{#3}{#4}{#5}{#6}}}
+
+\def\ttl@format@i#1{%
+ \@ifnextchar[{\ttl@format@ii{#1}}{\ttl@format@ii{#1}[hang]}}
+
+\def\ttl@format@ii#1[#2]#3#4#5#6{%
+ \ttl@getkeys{#1}{titlesec}%
+ \ttl@toksa{{#3}{#4}{#5}{#6}}% Save arguments
+ \@ifnextchar[{%
+ \ttl@format@iii{#2}%
+ }{%
+ \ttl@format@iii{#2}[]}}
+
+% First, we get the shape -- if not defined it loads
+% the corresponding file.
+
+\def\ttl@format@iii#1[#2]{%
+ \@ifundefined{ttlh@#1}{%
+ \begingroup
+ \makeatletter
+ \InputIfFileExists{#1.tss}{}{%
+ \PackageError{titlesec}{Unknown shape}%
+ {Shapes are defined in files with extension tss\MessageBreak
+ Either you have misspelled the shape\MessageBreak
+ or there is no a #1.tss file}}%
+ \endgroup}{}%
+ \@temptokena{#2}%
+ \ifttl@explicit
+ \edef\ttl@b{%
+ \def\expandafter\noexpand\csname ttlf@\ttl@a\endcsname####1%
+ {\expandafter\noexpand\csname ttlh@#1\endcsname
+ \the\ttl@toksa{\the\@temptokena}}}%
+ \else
+ \edef\ttl@b{%
+ \def\expandafter\noexpand\csname ttlf@\ttl@a\endcsname
+ {\expandafter\noexpand\csname ttlh@#1\endcsname
+ \the\ttl@toksa{\the\@temptokena}}}%
+ \fi
+ \ttl@b
+ \csname ttl@compat\ttl@a\endcsname}
+
+% Styles
+% ~~~~~~
+
+% 1:global 2:label 3:sep 4:style 5:after 6:left 7:right 8:title
+% \ttl@<shape> and \ttlh@<shape> take the following eight
+% arguments:
+% {format}{label}{sep}{before}{after}{left}{right}{title}
+% where before and after refer to the format.
+% With the option explicit, #4 contains the title and #8 is
+% empty.
+
+\def\ttlh@display#1#2#3#4#5#6#7#8{%
+ \gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
+ \setlength\leftskip{#6}%
+ \setlength\rightskip{#7}%
+ \interlinepenalty\@M
+ \ttl@changecentercr
+ \ttl@beginlongest
+ #1\ifhmode\ttl@hmode@error\fi
+ \ttl@glcmds
+ \parindent\z@
+ \ifttl@label
+ {#2\strut\@@par}\nobreak\ttl@calc\vspace{#3}%
+ \fi
+ #4{#8}%
+ \kern\z@\strut\@@par
+ \nobreak\ttl@midlongest#5\@@par
+ \ttl@endlongest}
+
+\def\ttlh@hang#1#2#3#4#5#6#7#8{%
+ \gdef\ttl@makeline##1{\ttl@calc\hspace{#6}##1\ttl@calc\hspace{#7}}%
+ \setlength\leftskip{#6}%
+ \setlength\rightskip{#7}%
+ \interlinepenalty\@M
+ \ttl@changecentercr
+ \ttl@beginlongest
+ #1{\ifhmode\ttl@hmode@error\fi
+ \ttl@glcmds
+ \parindent\z@
+ \begingroup
+ \ifttl@label
+ \noindent
+ \sbox\z@{#2\strut\ttl@calc\hspace{#3}}%
+ \hangindent\wd\z@
+ \box\z@
+ \fi
+ #4{#8}%
+ \kern\z@\strut\@@par
+ \endgroup
+ \nobreak\ttl@midlongest#5\@@par}%
+ \ttl@endlongest}
+
+\def\ttlh@runin#1#2#3#4#5#6#7#8{%
+ \global\@noskipsectrue
+ \gdef\ttl@makeline##1{##1}%
+ \ttl@changecentercr
+ #1{\ifhmode\ttl@hmode@error\fi
+ \global\sbox\ttl@box{%
+ \ttl@calc\hspace{#6}%
+ \ifttl@label{\strut#2}\ttl@calc\hspace{#3}\fi
+ #4{#8}#5\unskip}}%
+ \gdef\@svsechd{\unhbox\ttl@box}}
+
+% +-----------------+
+% | T O O L S |
+% +-----------------+
+%
+% calcwidth
+% ~~~~~~~~~
+% Implemented after code from soul (but much modified...)
+
+\newdimen\titlewidth
+\newdimen\titlewidthlast
+\newdimen\titlewidthfirst
+
+\let\ttl@glcmds\relax
+\let\ttl@beginlongest\@empty
+\let\ttl@midlongest\@empty
+\let\ttl@endlongest\@empty
+\let\iftitlemeasuring\@secondoftwo
+
+\def\ttl@xbeginlongest#1\ttl@endlongest{%
+ \titlewidth\z@
+ \titlewidthlast\z@
+ \let\iftitlemeasuring\@firstoftwo
+ \setbox\ttl@box\vbox{%
+ \def\ttl@glcmds{%
+ \def\\{\@ifstar{\@ifnextchar[{\ttl@bs}{\newline}}%
+ {\@ifnextchar[{\ttl@bs}{\newline}}}%
+ \def\ttl@bs[####1]{\newline}%
+ \let\@centercr\\%
+ \def\ttl@midlongest####1\@@par{}% Very dirty...
+ \advance\rightskip 1\leftskip plus 1fil
+ \leftskip=\z@}%
+ #1}%
+ \let\iftitlemeasuring\@secondoftwo
+ \ttl@boxprocess
+ #1}
+
+\def\ttl@boxprocess{%
+ \setbox\ttl@box=\vbox{%
+ \unvcopy\ttl@box
+ \unskip\unpenalty
+ \global\setbox\@ne=\lastbox}%
+ \ifvoid\@ne
+ \else
+ \setbox\tw@=\hbox{\hskip-\leftskip\unhbox\@ne\hskip-\rightskip}%
+ \titlewidthfirst\wd\tw@
+ \ifdim\titlewidth<\titlewidthfirst
+ \titlewidth\titlewidthfirst
+ \fi
+ \ifdim\titlewidthlast=\z@
+ \titlewidthlast\titlewidthfirst
+ \fi
+ \expandafter\ttl@boxprocess
+ \fi}
+
+% Rules
+% ~~~~~
+
+\providecommand\titleline{%
+ \@ifstar{\ttl@line@i{\hb@xt@\titlewidth}}%
+ {\ttl@line@i{}}}
+
+\def\ttl@line@i#1{%
+ \@ifnextchar[{\ttl@line{#1}}{\ttl@line{#1}[s]}}
+
+\def\ttl@line#1[#2]#3{%
+ \vskip\topskip
+ \hrule \@height \z@
+ \nobreak
+ \vskip-\topskip
+ \begingroup
+ \parindent\z@
+ \everypar{}%
+ \leftskip\z@
+ \rightskip\z@ % #1 is either \hb@xt@\titlewidth or empty:
+ \@makebox[\hsize][#2]{\ttl@makeline{#1{#3}}}%
+ \par
+ \endgroup
+ \hrule height \z@
+ \nobreak}
+
+\providecommand\titlerule{\@ifstar{\ttl@row}{\ttl@rule}}
+
+\let\ttl@leaders\xleaders % For titletoc compatibility
+
+\def\ttl@row{\@ifnextchar[{\ttl@row@i}{\ttl@row@i[\wd\z@]}}
+\def\ttl@row@i[#1]#2{%
+ \ifvmode\expandafter\titleline\fi
+ {\sbox\z@{#2}%
+ \ttl@calcneg\hspace{#1}%
+ \hskip\wd\z@
+ \ttl@leaders\hb@xt@#1{\hss\box\z@}%
+ \hfill\kern\z@}}
+
+\def\ttl@rule{\@ifnextchar[{\ttl@rule@i}{\ttl@rule@i[.4\p@]}}
+\def\ttl@rule@i[#1]{%
+ \ifvmode\expandafter\titleline\fi
+ {\leaders\hrule height #1\hfill\kern\z@}}
+
+% Par shapes and space
+% ~~~~~~~~~~~~~~~~~~~~
+
+\providecommand\filright{%
+ \gdef\ttl@filleft##1{\hskip##1}%
+ \gdef\ttl@filright##1{\hfill}%
+ \let\\\@centercr
+ \advance\rightskip\z@ \@plus 1fil\relax}
+\providecommand\filleft{%
+ \gdef\ttl@filleft##1{\hfill}%
+ \gdef\ttl@filright##1{\hskip##1}%
+ \let\\\@centercr
+ \advance\leftskip\z@ \@plus 1fil
+ \parfillskip\z@}
+\providecommand\filcenter{\filleft\filright
+ \gdef\ttl@filleft##1{\hfill}}
+\providecommand\fillast{%
+ \gdef\ttl@filleft##1{\hfill}%
+ \gdef\ttl@filright##1{\hfill}%
+ \let\\\@centercr
+ \filleft\advance\rightskip\z@ \@plus -1fil
+ \parfillskip\z@ \@plus 2fil\relax}
+\newcommand\filinner{%
+ \if@twoside
+ \ifodd\count\z@\filleft\else\filright\fi
+ \else
+ \filleft
+ \fi}
+\newcommand\filouter{%
+ \if@twoside
+ \ifodd\count\z@\filright\else\filleft\fi
+ \else
+ \filright
+ \fi}
+
+\newcommand\wordsep{\fontdimen\tw@\font \@plus
+ \fontdimen\thr@@\font \@minus \fontdimen4\font}
+
+% +-----------------+
+% | O P T I O N S |
+% +-----------------+
+
+
+\DeclareOption{pagestyles}{\let\sectiontitle\@empty}
+\DeclareOption{extramarks}{\let\ttl@fetchmark\@empty}
+\DeclareOption{floatps}{%
+ \ifx\sectiontitle\@empty
+ \let\ttl@replace\space
+ \else
+ \PackageWarning{titlesec}{Ignoring `floatps' without
+ `pagestyles'. This option is now deprecated.}%
+ \fi}
+\DeclareOption{psfloats}{%
+ \ifx\sectiontitle\@empty
+ \let\ttl@replace\@empty
+ \else
+ \PackageWarning{titlesec}{Ignoring `psfloats' without
+ `pagestyles'}%
+ \fi}
+
+\DeclareOption{loadonly}{\let\ttl@extract\@empty}
+
+\DeclareOption{outermarks}{%
+ \def\ttl@titlemarks{\outertitlemarks}}
+\DeclareOption{topmarks}{
+ \def\ttl@titlemarks{\toptitlemarks}}
+\DeclareOption{botmarks}{%
+ \def\ttl@titlemarks{\bottitlemarks}}
+\DeclareOption{innermarks}{%
+ \def\ttl@titlemarks{\innertitlemarks}}
+
+\DeclareOption{footmarks}{} % Backward compat
+
+\DeclareOption{explicit}{\ttl@explicittrue}
+
+\DeclareOption{clearempty}{%
+ \def\cleardoublepage{%
+ \clearpage{\ps@empty\if@twoside\ifodd\c@page\else
+ \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi}}}
+
+\DeclareOption{rigidchapters}{%
+ \def\ttl@topmode#1#2{\vbox to #1{#2\vfil}}%
+ \def\ttl@chapafter{.26\textheight}}
+\DeclareOption{rubberchapters}{%
+ \def\ttl@topmode#1#2{{#2}\ttl@calc\vspace{#1}}%
+ \def\ttl@chapafter{40\p@}}
+
+\DeclareOption{bottomtitles}{%
+ \def\bottomtitlespace{-1\p@}}
+\DeclareOption{nobottomtitles}{%
+ \def\bottomtitlespace{.2\textheight}}
+\DeclareOption{nobottomtitles*}{%
+ \let\ttl@addstretch\relax
+ \def\bottomtitlespace{.2\textheight}}
+
+\DeclareOption{calcwidth}{%
+ \let\ttl@beginlongest\ttl@xbeginlongest}
+
+\DeclareOption{aftersep}{%
+ \let\ttl@titlespace\@gobble}
+\DeclareOption{largestsep}{%
+ \let\ttl@titlespace\addvspace}
+
+\DeclareOption{oldparttoc}{%
+ \def\ttl@tocpart{\def\ttl@a{\thepart\hspace{1em}}}}
+\DeclareOption{newparttoc}{%
+ \let\ttl@tocpart\relax}
+\DeclareOption{notocpart*}{%
+ \let\ttl@notocparts\@empty}
+
+\DeclareOption{rm}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\rmfamily}}
+\DeclareOption{sf}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\sffamily}}
+\DeclareOption{tt}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\ttfamily}}
+\DeclareOption{md}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\mdseries}}
+\DeclareOption{bf}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\bfseries}}
+\DeclareOption{up}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\upshape}}
+\DeclareOption{it}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\itshape}}
+\DeclareOption{sl}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\slshape}}
+\DeclareOption{sc}{%
+ \protected@xdef\ttl@fonts{\ttl@fonts\protect\scshape}}
+
+\DeclareOption{big}{%
+ \gdef\ttl@sizes#1{\ifcase#1\relax\Huge\or\Large\or\large
+ \or\normalsize\or\or\or\huge\fi}}
+\DeclareOption{medium}{%
+ \gdef\ttl@sizes#1{\ifcase#1\relax\huge\or\Large\or\large
+ \or\normalsize\or\or\or\LARGE\fi}}
+\DeclareOption{small}{%
+ \gdef\ttl@sizes#1{\ifcase#1\relax\LARGE\or\large
+ \or\normalsize\or\normalsize\or\or\or\Large\fi}}
+\DeclareOption{tiny}{%
+ \gdef\ttl@sizes#1{\ifcase#1\relax\large\or\normalsize\or
+ \normalsize\or\normalsize\or\or\or\normalsize\fi}}
+
+\DeclareOption{raggedleft}{%
+ \gdef\ttl@fil{\filleft}}
+\DeclareOption{center}{%
+ \gdef\ttl@fil{\filcenter}}
+\DeclareOption{raggedright}{%
+ \gdef\ttl@fil{\filright}}
+
+\DeclareOption{uppercase}{%
+ \gdef\ttl@case{\MakeUppercase}}
+
+\DeclareOption{compact}{%
+ \gdef\ttl@space{1}%
+ \gdef\ttl@chapafter{30\p@}}
+
+% Deprecated. To be remmoved in a major upgrade (3.0)
+\DeclareOption{indentfirst}{%
+ \gdef\@afterindentfalse{\let\if@afterindent\iftrue}%
+ \@afterindenttrue
+ \def\titlespacing{%
+ \@ifstar{\ttl@spacing@i{\@ne}}{\ttl@spacing@i{\@ne}}}}
+\DeclareOption{nonindentfirst}{%
+ \def\titlespacing{%
+ \@ifstar{\ttl@spacing@i{\z@}}{\ttl@spacing@i{\z@}}}}
+
+% New names
+\DeclareOption{indentafter}{%
+ \gdef\@afterindentfalse{\let\if@afterindent\iftrue}%
+ \@afterindenttrue
+ \def\titlespacing{%
+ \@ifstar{\ttl@spacing@i{\@ne}}{\ttl@spacing@i{\@ne}}}}
+\DeclareOption{noindentafter}{%
+ \def\titlespacing{%
+ \@ifstar{\ttl@spacing@i{\z@}}{\ttl@spacing@i{\z@}}}}
+
+% newlinetospace
+\let\ttl@blinemarks\relax
+\let\ttl@elinemarks\relax
+
+\DeclareRobustCommand\ttl@linetosp{%
+ \@ifstar{\ttl@linetosp@i}{\ttl@linetosp@i}}%
+
+\def\ttl@linetosp@i{%
+ \ifdim\lastskip>\z@\else\space\fi
+ \ignorespaces}
+
+\DeclareOption{newlinetospace}{%
+ \def\ttl@blinemarks{%
+ \let\ttl@e\\%
+ \def\\{\ttl@linetosp}}%
+ \def\ttl@elinemarks{\let\\\ttl@e}}%
+
+% toctitles
+\def\ttl@addcontentsline#1#2{%
+ \addcontentsline{toc}{#1}{\ifttl@toclabel\ttl@a\fi#2}%
+ \nobreak}
+
+\DeclareOption{toctitles}{%
+ \def\ttl@addcontentsline#1#2{%
+ \addcontentsline{toc}{#1}{\ifttl@toclabel\ttl@a\fi\ttl@savetitle}%
+ \nobreak}}
+
+% pageatnewline
+
+\def\ttl@changecentercr{%
+ \let\ttl@centercr\@centercr
+ \def\@centercr{\@ifstar{\ttl@centercr*}{\ttl@centercr*}}}
+
+\DeclareOption{pageatnewline}{\let\ttl@changecentercr\relax}
+
+\def\ttl@fonts{}
+
+\ExecuteOptions{rubberchapters,bottomtitles,aftersep,oldparttoc,%
+ innermarks}
+
+\ProcessOptions
+
+% +-----------------+
+% | H Y P E R R E F |
+% +-----------------+
+%
+% These two commands are provided by hyperref. But if they
+% are not defined at \begin{document} hyperref has not been
+% loaded or it is an old version.
+
+\AtBeginDocument{%
+ \ifx\ttl@Hy@steplink\@undefined
+ \let\ttl@Hy@steplink\@gobble
+ \let\ttl@Hy@refstepcounter\refstepcounter
+ \fi}
+
+% +-----------------+
+% | PAGE STYLES |
+% +-----------------+
+%
+% This is generic:
+
+\newcommand\assignpagestyle[2]{%
+ \@namedef{ttl@ps@\expandafter\@gobble\string#1}{#2}}
+
+% Old pagestyles
+% ~~~~~~~~~~~~~~
+
+\providecommand\newpagestyle{%
+ \let\ttl@compatps\@empty % marks the ``old interface''
+ \makeatletter
+ \edef\ttl@d{%
+ \noexpand\input{ttlps.def}%
+ \catcode`\noexpand\@=\the\catcode`\@}%
+ \ttl@d
+ \newpagestyle}
+
+\providecommand\renewpagestyle{%
+ \let\ttl@compatps\@empty % marks the ``old interface''
+ \makeatletter
+ \edef\ttl@d{%
+ \noexpand\input{ttlps.def}%
+ \catcode`\noexpand\@=\the\catcode`\@}%
+ \ttl@d
+ \renewpagestyle}
+
+\providecommand\widenhead{%
+ \let\ttl@compatps\@empty % marks the ``old interface''
+ \makeatletter
+ \edef\ttl@d{%
+ \noexpand\input{ttlps.def}%
+ \catcode`\noexpand\@=\the\catcode`\@}%
+ \ttl@d
+ \widenhead}
+
+% New pagestyles
+% ~~~~~~~~~~~~~~
+
+\@ifundefined{sectiontitle}{}{\input{ttlps.def}}
+
+% +-----------------+
+% | C O M P A T |
+% +-----------------+
+% Easy setup, i.e., that of package options, is
+% taken care of, if necessary.
+
+\renewcommand\secdef[2]{%
+ \@ifstar
+ {\ttl@labelfalse
+ #2}
+ {\ttl@labeltrue
+ \ifx#1\@chapter
+ \if@mainmatter\else\ttl@labelfalse\fi
+ \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
+ \else\ifx#1\@part
+ \ifnum\ttll@part>\c@secnumdepth\ttl@labelfalse\fi
+ \fi\fi
+ \let\ifttl@toclabel\ifttl@label
+ \@dblarg{#1}}}
+
+\@ifundefined{ttl@extract}{}{\endinput}
+
+\newcommand\titlelabel[1]{%
+ \def\@seccntformat##1{#1}}
+
+\expandafter\ifx\csname chapter\endcsname\relax
+
+ \def\ttl@compatpart{\titleclass{\part}{part}\relax}
+
+\else
+
+ \def\ttl@compatchapter{%
+ \def\@makechapterhead{%
+ \ttl@labeltrue
+ \if@mainmatter\else\ttl@labelfalse\fi
+ \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
+ \ttl@startargs\ttl@mkchap{chapter}}%
+ \def\@makeschapterhead{%
+ \ttl@labelfalse
+ \if@mainmatter\else\ttl@labelfalse\fi
+ \ifnum\ttll@chapter>\c@secnumdepth\ttl@labelfalse\fi
+ \ttl@startargs\ttl@mkchap{chapter}}}
+
+ \def\ttl@compatpart{\titleclass{\part}{page}\relax}
+
+\fi
+
+\def\ttl@@extract#1\@startsection#2#3#4#5#6#7#8{%
+ \@tempskipa=#5
+ \@tempskipb=#6
+ \ifdim\@tempskipa<\z@
+ \toks@{\titlespacing*#8{#4}}%
+ \@tempskipa-\@tempskipa
+ \else
+ \toks@{\titlespacing#8{#4}}%
+ \fi
+ \@ifundefined{ttl@space}{}{%
+ \ttl@assign\@tempskipa*\ttl@space\relax\beforetitleunit}%
+ \ifdim\@tempskipb<\z@
+ \if@tempswa
+ \titleformat#8[runin]%
+ {\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}%
+ {\z@}\ttl@passexplicit
+ \else
+ \titleformat#8[runin]%
+ {#7}{\@seccntformat{#2}}%
+ {\z@}\ttl@passexplicit
+ \fi
+ \@tempskipb-\@tempskipb
+ \else
+ \if@tempswa
+ \titleformat#8%
+ {\ttl@fil\ttl@fonts\ttl@sizes{#3}}{\@seccntformat{#2}}%
+ {\z@}\ttl@passexplicit
+ \else
+ \titleformat#8%
+ {#7}{\@seccntformat{#2}}%
+ {\z@}\ttl@passexplicit
+ \fi
+ \@ifundefined{ttl@space}{}{%
+ \ttl@assign\@tempskipb*\ttl@space\relax\aftertitleunit}%
+ \fi
+ \edef\ttl@a{\the\toks@{\the\@tempskipa}{\the\@tempskipb}}
+ \ttl@a}
+
+\def\ttl@extract#1{%
+ \expandafter\in@\expandafter\@startsection\expandafter{#1}%
+ \ifin@
+ \expandafter\ttl@@extract#1#1%
+ \else
+ \PackageWarningNoLine{titlesec}%
+ {Non standard sectioning command detected\MessageBreak
+ Using default spacing and no format}
+ \titlespacing*#1{\z@}{*3}{*2}%
+ \fi}
+
+\@tempswafalse
+
+\ifx\ttl@fonts\@empty
+ \def\ttl@fonts{\bfseries}
+\else
+ \@tempswatrue
+\fi
+
+\expandafter\ifx\csname ttl@sizes\endcsname\relax
+ \gdef\ttl@sizes#1{\ifcase#1\relax\Huge\or\Large\or\large
+ \or\normalsize\or\or\or\huge\fi}
+\else
+ \@tempswatrue
+\fi
+
+\expandafter\ifx\csname ttl@fil\endcsname\relax
+ \let\ttl@fil\@empty
+\else
+ \@tempswatrue
+\fi
+
+\expandafter\ifx\csname ttl@case\endcsname\relax
+ \let\ttl@case\@firstofone
+\else
+ \@tempswatrue
+\fi
+
+\if@tempswa
+
+ \expandafter\ifx\csname chapter\endcsname\relax\else
+ \titleformat\chapter[display]%
+ {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}
+ {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}
+ \fi
+
+\fi
+
+\ttl@extract\section
+\ttl@extract\subsection
+\ttl@extract\subsubsection
+\ttl@extract\paragraph
+\ttl@extract\subparagraph
+
+\let\ttl@extract\@undefined
+\let\ttl@@extract\@undefined
+
+\def\ttl@toplevel{part}
+
+\expandafter\ifx\csname chapter\endcsname\relax
+
+ \@namedef{ttll@part}{0}
+ \titleclass{\section}{straight}[\part]
+
+ \titlespacing*{\part}
+ {\z@}
+ {4ex}
+ {3ex}
+
+\else
+
+ \let\ttl@save@mkchap\@makechapterhead
+ \let\ttl@save@mkschap\@makeschapterhead
+
+ \def\@makechapterhead#1{%
+ \gdef\ttl@savemark{\chaptermark{#1}}%
+ \ttl@save@mkchap{#1}%
+ \@ifundefined{ttl@ps@chapter}{}%
+ {\thispagestyle{\@nameuse{ttl@ps@chapter}}}}
+
+ \def\@makeschapterhead#1{%
+ \gdef\ttl@savemark{\chaptermark{#1}}%
+ \ttl@save@mkschap{#1}%
+ \@ifundefined{ttl@ps@chapter}{}%
+ {\thispagestyle{\@nameuse{ttl@ps@chapter}}}}
+
+ \@namedef{ttll@part}{-1}
+ \@namedef{ttlss@part}{chapter}
+ \@namedef{ttll@chapter}{0}
+ \titleclass{\section}{straight}[\chapter]
+
+% The following is unoperant, unless when \chapter / \part
+% format is redefined
+
+ \titlespacing*{\part}
+ {\z@}
+ {\z@\@plus1fil}
+ {\z@\@plus1fil}
+
+ \titlespacing*\chapter
+ {\z@}%
+ {50\p@}%
+ {\ttl@chapafter}%
+
+\fi
+
+\titleclass{\subsection} {straight}[\section]
+\titleclass{\subsubsection}{straight}[\subsection]
+\titleclass{\paragraph} {straight}[\subsubsection]
+\titleclass{\subparagraph} {straight}[\paragraph]
+
+\endinput
diff --git a/tex/.texmf/tex/latex/misc/todonotes.sty b/tex/.texmf/tex/latex/misc/todonotes.sty
new file mode 100644
index 0000000..5bae62f
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/todonotes.sty
@@ -0,0 +1,474 @@
+%%
+%% This is file `todonotes.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% todonotes.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2008 by Henrik Skov Midtiby <henrikmidtiby@gmail.com>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.2 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.2 or later is part of all distributions of LaTeX version
+%% 1999/12/01 or later.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{todonotes}
+ [2015/07/09 .dtx Todonotes source and documentation.]
+
+\ProvidesPackage{todonotes}[2012/07/25]
+\RequirePackage{ifthen}
+\RequirePackage{xkeyval}
+\RequirePackage{xcolor}
+\RequirePackage{tikz}
+\usetikzlibrary{positioning}
+\RequirePackage{calc}
+\newcommand{\@todonotes@text}{}%
+\newcommand{\@todonotes@backgroundcolor}{orange}
+\newcommand{\@todonotes@linecolor}{orange}
+\newcommand{\@todonotes@bordercolor}{black}
+\newcommand{\@todonotes@textwidth}{\marginparwidth}
+\newcommand{\@todonotes@textsize}{\normalsize}
+\newcommand{\@todonotes@figwidth}{\linewidth}
+\newcommand{\@todonotes@figheight}{4cm}
+\newcommand{\@todonotes@figcolor}{black!40}
+\AtBeginDocument{
+\ifx\undefined\phantomsection
+\newcommand{\phantomsection}{}
+\fi
+}
+
+\newcommand{\@todonotes@todolistname}{Todo list}
+\newcommand{\@todonotes@MissingFigureText}{Figure}
+\newcommand{\@todonotes@MissingFigureUp}{Missing}
+\newcommand{\@todonotes@MissingFigureDown}{figure}
+\newcommand{\@todonotes@SetTodoListName}[1]
+ {\renewcommand{\@todonotes@todolistname}{#1}}
+\newcommand{\@todonotes@SetMissingFigureText}[1]
+ {\renewcommand{\@todonotes@MissingFigureText}{#1}}
+\newcommand{\@todonotes@SetMissingFigureUp}[1]
+ {\renewcommand{\@todonotes@MissingFigureUp}{#1}}
+\newcommand{\@todonotes@SetMissingFigureDown}[1]
+ {\renewcommand{\@todonotes@MissingFigureDown}{#1}}
+\newif{\if@todonotes@reverseMissingFigureTriangle}
+\DeclareOptionX{catalan}{
+ \@todonotes@SetTodoListName{Llista de feines pendents}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendent}%
+}
+\DeclareOptionX{croatian}{%
+ \@todonotes@SetTodoListName{Popis obveza}%
+ \@todonotes@SetMissingFigureText{Slika}%
+ \@todonotes@SetMissingFigureUp{Nedostaje}%
+ \@todonotes@SetMissingFigureDown{slika}%
+}
+\DeclareOptionX{danish}{%
+ \@todonotes@SetTodoListName{G\o{}rem\aa{}lsliste}%
+ \@todonotes@SetMissingFigureText{Figur}%
+ \@todonotes@SetMissingFigureUp{Manglende}%
+ \@todonotes@SetMissingFigureDown{figur}%
+}
+\DeclareOptionX{dutch}{%
+ \@todonotes@SetTodoListName{Lijst van onafgewerkte taken}%
+ \@todonotes@SetMissingFigureText{Figuur}%
+ \@todonotes@SetMissingFigureUp{Ontbrekende}%
+ \@todonotes@SetMissingFigureDown{figuur}%
+}
+\DeclareOptionX{english}{%
+ \@todonotes@SetTodoListName{Todo list}%
+ \@todonotes@SetMissingFigureText{Figure}%
+ \@todonotes@SetMissingFigureUp{Missing}%
+ \@todonotes@SetMissingFigureDown{figure}%
+}
+\DeclareOptionX{french}{%
+ \@todonotes@SetTodoListName{Liste des points \`a traiter}%
+ \@todonotes@SetMissingFigureText{Figure}%
+ \@todonotes@SetMissingFigureUp{Figure}%
+ \@todonotes@SetMissingFigureDown{manquante}%
+ \@todonotes@reverseMissingFigureTrianglefalse
+}
+\DeclareOptionX{german}{%
+ \@todonotes@SetTodoListName{Liste der noch zu erledigenden Punkte}%
+ \@todonotes@SetMissingFigureText{Abbildung}%
+ \@todonotes@SetMissingFigureUp{Fehlende}%
+ \@todonotes@SetMissingFigureDown{Abbildung}%
+}
+\DeclareOptionX{italian}{
+ \@todonotes@SetTodoListName{Elenco delle cose da fare}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{mancante}%
+}
+\DeclareOptionX{ngerman}{%
+ \@todonotes@SetTodoListName{Liste der noch zu erledigenden Punkte}%
+ \@todonotes@SetMissingFigureText{Abbildung}%
+ \@todonotes@SetMissingFigureUp{Fehlende}%
+ \@todonotes@SetMissingFigureDown{Abbildung}%
+}
+\DeclareOptionX{portuguese}{
+ \@todonotes@SetTodoListName{Lista de tarefas pendentes}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendente}%
+}
+\DeclareOptionX{spanish}{
+ \@todonotes@SetTodoListName{Lista de tareas pendientes}%
+ \@todonotes@SetMissingFigureText{Figura}%
+ \@todonotes@SetMissingFigureUp{Figura}%
+ \@todonotes@SetMissingFigureDown{pendiente}%
+}
+\DeclareOptionX{swedish}{%
+ \@todonotes@SetTodoListName{Att g\"{o}ra-lista}%
+ \@todonotes@SetMissingFigureText{Figur}%
+ \@todonotes@SetMissingFigureUp{Figur}%
+ \@todonotes@SetMissingFigureDown{saknas}%
+}
+\newcounter{@todonotes@numberoftodonotes}
+\newif{\if@todonotes@obeyDraft}
+\DeclareOptionX{obeyDraft}{\@todonotes@obeyDrafttrue}
+\newif{\if@todonotes@isDraft}
+\DeclareOptionX{draft}{\@todonotes@isDrafttrue}
+\DeclareOptionX{draftcls}{\@todonotes@isDrafttrue}
+\DeclareOptionX{draftclsnofoot}{\@todonotes@isDrafttrue}
+\newif{\if@todonotes@obeyFinal}
+\DeclareOptionX{obeyFinal}{\@todonotes@obeyFinaltrue}
+\newif{\if@todonotes@isFinal}
+\DeclareOptionX{final}{\@todonotes@isFinaltrue}
+\newif{\if@todonotes@disabled}
+\DeclareOptionX{disable}{\@todonotes@disabledtrue}
+\newif{\if@todonotes@colorinlistoftodos}
+\DeclareOptionX{colorinlistoftodos}{\@todonotes@colorinlistoftodostrue}
+\newif{\if@todonotes@dviStyle}
+\DeclareOptionX{dvistyle}{\@todonotes@dviStyletrue}
+\define@key{todonotes.sty}%
+ {color}{
+ \renewcommand{\@todonotes@backgroundcolor}{#1}
+ \renewcommand{\@todonotes@linecolor}{#1}}
+\define@key{todonotes.sty}%
+ {backgroundcolor}{\renewcommand{\@todonotes@backgroundcolor}{#1}}
+\define@key{todonotes.sty}%
+ {linecolor}{\renewcommand{\@todonotes@linecolor}{#1}}
+\define@key{todonotes.sty}%
+ {bordercolor}{\renewcommand{\@todonotes@bordercolor}{#1}}
+\newif{\if@todonotes@prependcaptionglobal}
+\@todonotes@prependcaptionglobalfalse
+\DeclareOptionX{prependcaption}{\@todonotes@prependcaptionglobaltrue}
+\define@key{todonotes.sty}%
+ {textwidth}{\renewcommand{\@todonotes@textwidth}{#1}}
+\define@key{todonotes.sty}%
+ {textsize}{\renewcommand{\@todonotes@textsize}{\csname #1\endcsname}}
+\newif{\if@todonotes@shadowenabled}
+\@todonotes@shadowenabledfalse
+\DeclareOptionX{shadow}{\@todonotes@shadowenabledtrue
+\usetikzlibrary{shadows}}
+\define@key{todonotes.sty}%
+ {figwidth}{\renewcommand{\@todonotes@figwidth}{#1}}
+\define@key{todonotes.sty}%
+ {figheight}{\renewcommand{\@todonotes@figheight}{#1}}
+\define@key{todonotes.sty}%
+ {figcolor}{\renewcommand{\@todonotes@figcolor}{#1}}
+\ProcessOptionsX*
+\if@todonotes@disabled
+\else
+\if@todonotes@obeyDraft
+\@todonotes@disabledtrue
+\if@todonotes@isDraft
+\@todonotes@disabledfalse
+\fi
+\fi
+\if@todonotes@obeyFinal
+\@todonotes@disabledfalse
+\if@todonotes@isFinal
+\@todonotes@disabledtrue
+\fi
+\fi
+\fi
+
+\newcommand{\@todonotes@currentlinecolor}{}%
+\newcommand{\@todonotes@currentbackgroundcolor}{}%
+\newcommand{\@todonotes@currentbordercolor}{}%
+\define@key{todonotes}{color}{%
+ \renewcommand{\@todonotes@currentlinecolor}{#1}%
+ \renewcommand{\@todonotes@currentbackgroundcolor}{#1}}%
+\define@key{todonotes}{linecolor}{%
+ \renewcommand{\@todonotes@currentlinecolor}{#1}}%
+\define@key{todonotes}{backgroundcolor}{%
+ \renewcommand{\@todonotes@currentbackgroundcolor}{#1}}%
+\define@key{todonotes}{bordercolor}{%
+ \renewcommand{\@todonotes@currentbordercolor}{#1}}%
+\newcommand{\@todonotes@sizecommand}{}%
+\define@key{todonotes}{size}{\renewcommand{\@todonotes@sizecommand}{#1}}%
+\newif\if@todonotes@localdisable%
+\define@key{todonotes}{disable}[]{\@todonotes@localdisabletrue}%
+\define@key{todonotes}{nodisable}[]{\@todonotes@localdisablefalse}%
+\newif\if@todonotes@appendtolistoftodos%
+\define@key{todonotes}{list}[]{\@todonotes@appendtolistoftodostrue}%
+\define@key{todonotes}{nolist}[]{\@todonotes@appendtolistoftodosfalse}%
+\newif\if@todonotes@inlinenote%
+\define@key{todonotes}{inline}[]{\@todonotes@inlinenotetrue}%
+\define@key{todonotes}{noinline}[]{\@todonotes@inlinenotefalse}%
+\newif\if@todonotes@prependcaption%
+\define@key{todonotes}{prepend}[]{\@todonotes@prependcaptiontrue}%
+\define@key{todonotes}{noprepend}[]{\@todonotes@prependcaptionfalse}%
+\newif\if@todonotes@line%
+\define@key{todonotes}{line}[]{\@todonotes@linetrue}%
+\define@key{todonotes}{noline}[]{\@todonotes@linefalse}%
+\newif\if@todonotes@fancyline\@todonotes@fancylinefalse%
+\define@key{todonotes}{fancyline}[]{\@todonotes@fancylinetrue}%
+\define@key{todonotes}{nofancyline}[]{\@todonotes@fancylinefalse}%
+\newcommand{\@todonotes@author}{}%
+\newif\if@todonotes@authorgiven%
+\define@key{todonotes}{author}{%
+ \renewcommand{\@todonotes@author}{#1}%
+ \@todonotes@authorgiventrue}%
+\define@key{todonotes}{noauthor}[]{\@todonotes@authorgivenfalse}%
+\newcommand{\@todonotes@caption}{}%
+\newif\if@todonotes@captiongiven%
+\define@key{todonotes}{caption}%
+ {\renewcommand{\@todonotes@caption}{#1}%
+ \@todonotes@captiongiventrue}%
+\define@key{todonotes}{nocaption}[]{\@todonotes@captiongivenfalse}%
+\newcommand{\@todonotes@currentfigwidth}{\@todonotes@figwidth}
+\define@key{todonotes}%
+ {figwidth}{\renewcommand{\@todonotes@currentfigwidth}{#1-2pt}}
+\newcommand{\@todonotes@currentfigheight}{\@todonotes@figheight}
+\define@key{todonotes}%
+ {figheight}{\renewcommand{\@todonotes@currentfigheight}{#1-2pt}}
+\newcommand{\@todonotes@currentfigcolor}{\@todonotes@figcolor}
+\define@key{todonotes}%
+ {figcolor}{\renewcommand{\@todonotes@currentfigcolor}{#1}}
+\presetkeys%
+ {todonotes}%
+ {linecolor=\@todonotes@linecolor,%
+ backgroundcolor=\@todonotes@backgroundcolor,%
+ bordercolor=\@todonotes@bordercolor,%
+ nofancyline,%
+ nodisable,%
+ noinline,%
+ nocaption,%
+ noauthor,%
+ figwidth=\@todonotes@figwidth,%
+ figheight=\@todonotes@figheight,%
+ figcolor=\@todonotes@figcolor,%
+ line, list, size=\@todonotes@textsize}{}%
+\if@todonotes@disabled%
+ \newcommand{\listoftodos}[1][]{}
+ \newcommand{\@todo}[2][]{}
+ \newcommand{\missingfigure}[2][]{}
+\else % \if@todonotes@disabled
+\newcommand{\listoftodos}[1][\@todonotes@todolistname]
+ {\@ifundefined{chapter}{\section*{#1}}{\chapter*{#1}} \@starttoc{tdo}}
+\newcommand{\l@todo}
+ {\@dottedtocline{1}{0em}{2.3em}}
+\tikzstyle{notestyleraw} = [
+ draw=\@todonotes@currentbordercolor,
+ fill=\@todonotes@currentbackgroundcolor,
+ line width=0.5pt,
+ text width = \@todonotes@textwidth - 1.6 ex - 1pt,
+ inner sep = 0.8 ex,
+ rounded corners=4pt]
+\if@todonotes@shadowenabled
+\tikzstyle{notestyle} = [notestyleraw,
+ general shadow={shadow xshift=.5ex, shadow yshift=-.5ex,
+ opacity=1,fill=black!50}]
+\else
+\tikzstyle{notestyle} = [notestyleraw]
+\fi
+\tikzstyle{notestyleleft} = [
+ notestyle,
+ left]
+\tikzstyle{connectstyle} = [
+ thick,
+ draw=\@todonotes@currentlinecolor]
+\tikzstyle{inlinenotestyle} = [
+ notestyle,
+ text width=\linewidth - 1.6 ex - 1 pt]
+\newcommand{\@todo}[2][]{%
+\if@todonotes@prependcaptionglobal%
+\@todonotes@prependcaptiontrue%
+\else%
+\@todonotes@prependcaptionfalse%
+\fi%
+\renewcommand{\@todonotes@text}{#2}%
+\renewcommand{\@todonotes@caption}{#2}%
+\setkeys{todonotes}{#1}%
+\if@todonotes@localdisable%
+\else%
+\addtocounter{@todonotes@numberoftodonotes}{1}%
+\if@todonotes@appendtolistoftodos%
+ \phantomsection%
+ \if@todonotes@captiongiven%
+ \else%
+ \renewcommand{\@todonotes@caption}{#2}%
+ \fi%
+ \@todonotes@addElementToListOfTodos%
+\fi%
+\if@todonotes@captiongiven%
+ \if@todonotes@prependcaption%
+ \renewcommand{\@todonotes@text}{\@todonotes@caption: #2}%
+ \fi%
+\fi%
+\if@todonotes@inlinenote%
+ \@todonotes@drawInlineNote%
+\else%
+ \@todonotes@drawMarginNoteWithLine%
+\fi%\if@todonotes@inlinenote
+\fi%\if@todonotes@localdisable
+}%
+\newcommand{\@todonotes@drawMarginNoteWithLine}{%
+\begin{tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
+ \node [coordinate] (inText) {};%
+\end{tikzpicture}%
+\marginpar[{% Draw note in left margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToLeftMargin%
+}]{% Draw note in right margin
+ \@todonotes@drawMarginNote%
+ \@todonotes@drawLineToRightMargin%
+}%
+}%
+\newcommand{\@todonotes@addElementToListOfTodos}{%
+ \if@todonotes@colorinlistoftodos%
+ \addcontentsline{tdo}{todo}{%
+ \fcolorbox{\@todonotes@currentbordercolor}%
+ {\@todonotes@currentbackgroundcolor}%
+ {\textcolor{\@todonotes@currentbackgroundcolor}{o}}%
+ \ \@todonotes@caption}%
+ \else%
+ \addcontentsline{tdo}{todo}{\@todonotes@caption}%
+ \fi}%
+\newcommand{\@todonotes@drawInlineNote}{%
+ \if@todonotes@dviStyle%
+ {\par\noindent\begin{tikzpicture}[remember picture]%
+ \draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
+ \if@todonotes@authorgiven%
+ {\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
+ \else%
+ {\noindent \@todonotes@sizecommand \@todonotes@text}%
+ \fi
+ {\par\noindent\begin{tikzpicture}[remember picture]%
+ \draw node[inlinenotestyle] {};\end{tikzpicture}\par}%
+ \else%
+ {\par\noindent\begin{tikzpicture}[remember picture]%
+ \draw node[inlinenotestyle,font=\@todonotes@sizecommand]{%
+ \if@todonotes@authorgiven%
+ {\noindent \@todonotes@sizecommand \@todonotes@author:\,\@todonotes@text}%
+ \else%
+ {\noindent \@todonotes@sizecommand \@todonotes@text}%
+ \fi};%
+ \end{tikzpicture}\par}%
+ \fi}%
+\newcommand{\@todonotes@drawMarginNote}{%
+\if@todonotes@dviStyle%
+ \begin{tikzpicture}[remember picture]%
+ \draw node[notestyle] {};%
+ \end{tikzpicture}\\%
+ \begin{minipage}{\@todonotes@textwidth}%
+ \if@todonotes@authorgiven%
+ \@todonotes@sizecommand \@todonotes@author \@todonotes@text%
+ \else%
+ \@todonotes@sizecommand \@todonotes@text%
+ \fi%
+ \end{minipage}\\%
+ \begin{tikzpicture}[remember picture]%
+ \draw node[notestyle] (inNote) {};%
+ \end{tikzpicture}%
+\else%
+ \let\originalHbadness\hbadness%
+ \hbadness 100000%
+ \begin{tikzpicture}[remember picture,baseline=(X.base)]%
+ \node(X){\vphantom{X}};%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@text};%
+ \if@todonotes@authorgiven%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@sizecommand\@todonotes@author};%
+ \node(Y)[below=of X]{};%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.south)%
+ {\@todonotes@text};%
+ \else%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@text};%
+ \fi%
+ \end{tikzpicture}%
+ \hbadness \originalHbadness%
+\fi}%
+\newcommand{\@todonotes@drawLineToRightMargin}{%
+\if@todonotes@line%
+\if@todonotes@fancyline%
+\tikz[remember picture,overlay]{%
+\tikzstyle{both}=[line width=3pt, draw, opacity=0.15]%
+\tikzstyle{line}=[shorten >=5pt, line cap=round]%
+\tikzstyle{head}=[shorten >=-1pt, dash pattern=on 0pt off 1pt, ->]%
+\foreach \s in {line,head}{%
+\draw[both,\s]%
+(inNote.north west).. controls +(0:0) and +(90:1.5)..([yshift=1ex] inText);%
+};%
+}%
+\else%
+\begin{tikzpicture}[remember picture, overlay]%
+\draw[connectstyle]%
+([yshift=-0.2cm] inText)%
+-| ([xshift=-0.2cm] inNote.west)%
+-| (inNote.west);%
+\end{tikzpicture}%
+\fi%
+\fi}%
+\newcommand{\@todonotes@drawLineToLeftMargin}{%
+\if@todonotes@line%
+\if@todonotes@fancyline%
+\tikz[remember picture,overlay]{%
+\tikzstyle{both}=[line width=3pt, draw, opacity=0.15]%
+\tikzstyle{line}=[shorten >=5pt, line cap=round]%
+\tikzstyle{head}=[shorten >=-1pt, dash pattern=on 0pt off 1pt,->]%
+\foreach \s in {line,head}{%
+\draw[both,\s]%
+(inNote.north east).. controls +(0:0) and +(90:1.5)..([yshift=1ex] inText);%
+};%
+}%
+\else%
+\begin{tikzpicture}[remember picture, overlay]%
+\draw[connectstyle]%
+([yshift=-0.2cm] inText)%
+-| ([xshift=0.2cm] inNote.east)%
+-| (inNote.east);%
+\end{tikzpicture}%
+\fi%
+\fi}%
+\newcommand{\missingfigure}[2][]{%
+\setkeys{todonotes}{#1}%
+\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: #2}%
+\par
+\noindent
+\begin{tikzpicture}
+\draw[fill=\@todonotes@currentfigcolor, draw = black!40, line width=2pt]
+ (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight);
+\draw (2, -0.3) node[right, text
+ width=\@todonotes@currentfigwidth-4.5cm] {#2};
+\draw[red, fill=white, rounded corners = 5pt, line width=10pt]
+ (30:2cm) -- (150:2cm) -- (270:2cm) -- cycle;
+\draw (0, 0.3) node {\@todonotes@MissingFigureUp};
+\draw (0, -0.3) node {\@todonotes@MissingFigureDown};
+\end{tikzpicture}\hfill
+}% Ending \missingfigure command
+\fi% Ending \@todonotes@ifdisabled
+\newcommand{\todototoc}
+{
+ \if@todonotes@disabled
+ \else
+\addcontentsline{toc}{\@ifundefined{chapter}{section}{chapter}}{\@todonotes@todolistname}
+ \fi
+}
+\newcommand{\todo}[2][]{\@bsphack\@todo[#1]{#2}\@esphack\ignorespaces}%
+\endinput
+%%
+%% End of file `todonotes.sty'.
diff --git a/tex/.texmf/tex/latex/misc/trimspaces.sty b/tex/.texmf/tex/latex/misc/trimspaces.sty
new file mode 100644
index 0000000..5327a2f
--- /dev/null
+++ b/tex/.texmf/tex/latex/misc/trimspaces.sty
@@ -0,0 +1,58 @@
+%% LaTeX2e file `trimspaces.sty'
+%% generated by the `filecontents' environment
+%% from source `trimspaces' on 2017/02/05.
+%%
+\ProvidesPackage{trimspaces}[2009/09/17 v1.1
+ Trim spaces around a token list]
+
+% Trimming surrounding spaces:
+\catcode`\Q=3
+\newcommand\trim@spaces[1]{%
+ \romannumeral-`\q\trim@trim@\noexpand#1Q Q%
+}
+\long\def\trim@trim@#1 Q{\trim@trim@@#1Q}
+\long\def\trim@trim@@#1Q#2{#1}
+\catcode`\Q=11
+
+\newcommand\trim@spaces@noexp[1]{%
+ \unexpanded\expandafter\expandafter\expandafter
+ {\trim@spaces{#1}}%
+}
+
+\newcommand\trim@spaces@in[1]{%
+ \edef#1{\expandafter\trim@spaces@noexp\expandafter{#1}}%
+}
+
+% Trimming preceding spaces:
+\newcommand\trim@pre@space[1]{%
+ \romannumeral-`\.\expandafter\noexpand#1%
+}
+
+\newcommand\trim@pre@space@noexp[1]{%
+ \unexpanded\expandafter{%
+ \romannumeral-`\.\expandafter\noexpand#1%
+ }%
+}
+
+\newcommand\trim@pre@space@in[1]{%
+ \expandafter\def\expandafter#1\expandafter{%
+ \romannumeral-`\.\expandafter\noexpand#1%
+ }%
+}
+
+% Trimming trailing space:
+\catcode`\Q=3
+\newcommand\trim@post@space[1]{\trim@trim@#1Q Q}
+\catcode`\Q=11
+
+\newcommand\trim@post@space@noexp[1]{%
+ \unexpanded\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter\expandafter
+ {\trim@post@space{#1}}%
+}
+
+\newcommand\trim@post@space@in[1]{%
+ \edef#1{\expandafter\trim@post@space@noexp\expandafter{#1}}%
+}
+
+% That's it.