summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/sttools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-18 22:33:43 +0000
committerKarl Berry <karl@freefriends.org>2012-10-18 22:33:43 +0000
commit34c48d9566089694027f919d621fec0e075d1b84 (patch)
tree0d9a5e32bd2805eb15ed9a7444b9dfead77d58d9 /Master/texmf-dist/source/latex/sttools
parentb2af3a5c5a7adb196a11e1d049a2162b4dd34a45 (diff)
sttools (19oct12)
git-svn-id: svn://tug.org/texlive/trunk@28013 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/sttools')
-rw-r--r--Master/texmf-dist/source/latex/sttools/boundbox.dtx312
-rw-r--r--Master/texmf-dist/source/latex/sttools/cuted.dtx753
-rw-r--r--Master/texmf-dist/source/latex/sttools/floatpag.dtx354
-rw-r--r--Master/texmf-dist/source/latex/sttools/flushend.dtx324
-rw-r--r--Master/texmf-dist/source/latex/sttools/marginal.dtx339
-rw-r--r--Master/texmf-dist/source/latex/sttools/midfloat.dtx393
-rw-r--r--Master/texmf-dist/source/latex/sttools/stabular.dtx361
-rw-r--r--Master/texmf-dist/source/latex/sttools/stfloats.dtx541
-rw-r--r--Master/texmf-dist/source/latex/sttools/sttools.dtx106
-rw-r--r--Master/texmf-dist/source/latex/sttools/sttools.ins57
-rw-r--r--Master/texmf-dist/source/latex/sttools/texsort.dtx556
11 files changed, 4096 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/sttools/boundbox.dtx b/Master/texmf-dist/source/latex/sttools/boundbox.dtx
new file mode 100644
index 00000000000..3453b2128c6
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/boundbox.dtx
@@ -0,0 +1,312 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files boundbox.dtx and boundbox.ins
+% and the derived filebase boundbox.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{boundbox.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1997-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Calculate TeX bounding box in rounded points (LaTeX2e)
+%% from left top corner of the paper
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{boundbox}
+%<*package>
+ [2012/05/29 v1.3 Calculate TeX bounding box in points]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{boundbox}[2012/05/29]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{boundbox.dtx}
+ %%\PrintChanges
+ %%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{186}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.3}{2012/05/29}{Source converted to DTX file}
+% \changes{v1.3}{2012/05/29}{Added package option nospec}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{boundbox.dtx}
+% \title{The \textsf{boundbox} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The package is used to calculate textbox coordinates on the page.
+% I guess that the most useable part of this package can be internal
+% macro \verb|\roundtexdim| for rounding pt values to int numbers.
+%
+% \section{Usage}
+%
+% Just add package to the tex file as: \verb|\usepackage{boundbox}|.
+% \\\medskip
+% Rounding tex dimension values:
+%
+% \newdimen\testdim \testdim=1in\verb|\newdimen\testdim|
+%
+% \verb|\testdim=1in \the\testdim ->|
+% \the\testdim
+%
+% \medskip
+% \roundtexdim{\testdim}\foo\verb|\roundtexdim{\testdim}\foo \number\foo->|\number\foo
+%
+% \medskip
+% \roundtexdim floor{\testdim}\foo\verb|\roundtexdim floor{\testdim}\foo \number\foo->|\number\foo
+%
+% \medskip
+% \roundtexdim ceil{\testdim}\foo\verb|\roundtexdim ceil{\testdim}\foo \number\foo->|\number\foo
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% The package contains two options:
+%
+% \meta{nofoot} -- do not include foot to the bbox.
+%
+% \meta{nospec} -- do not write specials with bbox info.
+%
+% \begin{macrocode}
+%
+%%
+\newif\if@withfoot \@withfoottrue
+\newif\if@output@bbox@special \@output@bbox@specialtrue
+\DeclareOption{nofoot}{\global\@withfootfalse}
+\DeclareOption{nospec}{\global\@output@bbox@specialfalse}
+\ProcessOptions
+%%
+%
+% \end{macrocode}
+%
+% Definitions of special prefixes.
+%
+% \begin{macrocode}
+\def\special@bbox@odd@prefix{mt:TeXBBox:odd}
+\def\special@bbox@even@prefix{mt:TeXBBox:even}
+% \end{macrocode}
+%
+% \begin{macro}{\roundtexdim}
+% \marg{round type}\marg{tex dimension}\marg{command}
+%
+% \meta{tex dimension} value in pt rounded with \meta{round type}
+% is defined as \meta{command}.
+%
+% \begin{macrocode}
+%
+%%
+\def\roundtexdim#1#{\round@tex@dim{#1}}
+\def\round@tex@dim#1#2#3{%
+ \expandafter\expandafter\csname get@#1@pt@data\endcsname\the#2\to#3\relax
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Internal macro for calculating rounded value to the floor.
+%
+%
+% \begin{macro}{\get@floor@pt@data}
+%
+% \begin{macrocode}
+\def\get@floor@pt@data#1.#2#3\to#4{%
+ \bgroup
+ \@tempcnta=#1\relax
+ \xdef#4{\the\@tempcnta}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Internal macro for calculating rounded value by first number after point.
+%
+%
+% \begin{macro}{\get@round@pt@data}
+%
+% \begin{macrocode}
+\def\get@round@pt@data#1.#2#3\to#4{%
+ \bgroup
+ \@tempcnta=#1\relax
+ \ifnum#2>4\relax
+ \advance\@tempcnta by\@ne
+ \fi
+ \xdef#4{\the\@tempcnta}%
+ \egroup
+ }
+\let\get@@pt@data\get@round@pt@data
+% \end{macrocode}
+% \end{macro}
+%
+%
+% Internal macro for calculating rounded value to the ceiling.
+%
+%
+% \begin{macro}{\get@ceil@pt@data}
+%
+% \begin{macrocode}
+\def\get@ceil@pt@data#1.#2#3\to#4{%
+ \bgroup
+ \@tempcnta=#1\relax
+ \afterassignment\@gobbletwo
+ \@tempcntb=#2#3\relax
+ \ifnum\@tempcntb>0\relax
+ \advance\@tempcnta by\@ne
+ \fi
+ \xdef#4{\the\@tempcnta}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@calculate@bbox}
+%
+% Internal macro \verb|\@calculate@bbox| calculates TeX box dimensions:
+%
+% \begin{itemize}
+% \item \verb|\bbox@odd@top@pt| and \verb|\bbox@even@top@pt|:
+% distance in rounded ``floor'' points from the top of paper to the top of TeX box
+% (including head) (the same for odd and even pages);
+% \item \verb|\bbox@odd@left@pt| and \verb|\bbox@even@left@pt|:
+% distance in rounded ``floor'' points from the left side of paper
+% to the left side of TeX box for odd and even pages;
+% \item \verb|\bbox@odd@right@pt| and \verb|\bbox@even@right@pt|:
+% distance in rounded ``ceil'' points from the left side of paper to the right
+% side of TeX box accordingly for odd and even pages;
+% \item \verb|\bbox@odd@bottom@pt| and \verb|\bbox@even@bottom@pt|:
+% distance in rounded ``ceil'' points from the top of paper to the bottom of TeX
+% box (including foot by default; with option "nofoot" without
+% foot) (the same for odd and even pages).
+% \end{itemize}
+%
+% \begin{macrocode}
+\def\@calculate@bbox{%
+ \bgroup
+ \@tempdima=1in\relax
+ \advance\@tempdima by\hoffset
+ \advance\@tempdima by\oddsidemargin
+ \roundtexdim floor{\@tempdima}\bbox@odd@left@pt
+ \advance\@tempdima\textwidth
+ \roundtexdim ceil{\@tempdima}\bbox@odd@right@pt
+ \@tempdima=1in\relax
+ \advance\@tempdima by\hoffset
+ \advance\@tempdima by\evensidemargin
+ \roundtexdim floor{\@tempdima}\bbox@even@left@pt
+ \advance\@tempdima\textwidth
+ \roundtexdim ceil{\@tempdima}\bbox@even@right@pt
+ \@tempdima=1in\relax
+ \advance\@tempdima by\voffset
+ \advance\@tempdima by\topmargin
+ \roundtexdim floor{\@tempdima}\bbox@odd@top@pt
+ \global\let\bbox@even@top@pt\bbox@odd@top@pt
+ \advance\@tempdima by\headheight
+ \advance\@tempdima by\headsep
+ \advance\@tempdima\textheight
+ \if@withfoot
+ \advance\@tempdima\footskip
+ \fi
+ \roundtexdim ceil{\@tempdima}\bbox@odd@bottom@pt
+ \global\let\bbox@even@bottom@pt\bbox@odd@bottom@pt
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Without package option \meta{nospec} two specials are written to the
+% output file. Prefix of particular special is defined by:
+% \verb|\special@bbox@odd@prefix| and \verb|\special@bbox@even@prefix|.
+%
+% \begin{macrocode}
+%
+%%
+\AtBeginDocument{%
+ \@calculate@bbox
+ \if@output@bbox@special
+ \special{\special@bbox@odd@prefix\space
+ left=\csname bbox@odd@left@pt\endcsname\space
+ top=\csname bbox@odd@top@pt\endcsname\space
+ right=\csname bbox@odd@right@pt\endcsname\space
+ bottom=\csname bbox@odd@bottom@pt\endcsname
+ }%
+ \special{\special@bbox@even@prefix\space
+ left=\csname bbox@even@left@pt\endcsname\space
+ top=\csname bbox@even@top@pt\endcsname\space
+ right=\csname bbox@even@right@pt\endcsname\space
+ bottom=\csname bbox@even@bottom@pt\endcsname
+ }%
+ \fi
+ }
+\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/cuted.dtx b/Master/texmf-dist/source/latex/sttools/cuted.dtx
new file mode 100644
index 00000000000..453ba5d0511
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/cuted.dtx
@@ -0,0 +1,753 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files cuted.dtx and cuted.ins
+% and the derived filebase cuted.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{cuted.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1997-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Insert some onecolumn material in full-width on double-column page.
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{cuted}
+%<*package>
+ [2012/10/04 v1.5 Mixing onecolumn and twocolumn modes]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{cuted}[2012/10/04]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{cuted.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{1136}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{}{1997/09/02}{improved column balancing}
+% \changes{}{1997/09/03}{float control for \cs{@colroom} setting}
+% \changes{}{1997/09/04}{improved \cs{@colroom} setting}
+% \changes{}{1997/09/05}{checking for \cs{@viper} and \cs{hold@viper}}
+% \changes{}{1997/09/09}{compatibility with flushend.sty}
+% \changes{}{1997/09/22}{improved \cs{output} ir \cs{@specialoutput}}
+% \changes{}{1997/10/01}{improved \cs{output} ir \cs{@addviper}}
+% \changes{}{1998/10/23}{pakeistas koloneliu sujungimas}
+% \changes{}{2000/01/18}{pakeistas \cs{@outputdblcol}}
+% \changes{}{2002/06/11}{added options unskipbreak and autobase}
+% \changes{v1.4}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{cuted.dtx}
+% \title{The \textsf{cuted} package}
+% \author{Sigitas Tolu\v{s}is\\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% It is denoted to place some material in full-width at any place
+% on double-column page (|\twocolumn| mode). The part of material
+% can be placed on the next page. Existing text is placed
+% under inserted material in two columns (it is reformatted).
+%
+% \section{Usage}
+%
+%
+% \DescribeMacro{strip}
+% Provides new environment:
+%
+% \begin{verbatim}
+% \begin{strip}
+% <wide onecolumn material>
+% \end{strip}
+% \end{verbatim}
+%
+% Puts |\vbox|\marg{wide onecolumn material} in full-width on
+% double-column page.
+%
+% \medskip
+% Adds |\stripsep| glue before and after
+% (by default: |15pt plus2pt minus 2pt|).
+%
+% \medskip
+% It can be problems with floats and footnotes. In the case of
+% problems with footnotes it is possible to correct the situation
+% using commands |\footnotemark| and |\footnotetext|.
+%
+% \medskip
+% \DescribeMacro{\oldcolsbreak}
+% \marg{adds}
+%
+% Adds \meta{adds} in place of original column break if strip is placed
+% on the right column.
+%
+% \subsection{Package options}
+%
+% \DescribeMacro{unskipbreak}
+% \indent It is used to change |\hbox{}| to |\unskip| after leftcolumn break on striped page.
+%
+% \medskip
+% \DescribeMacro{autobase}
+% It is used to guess |\baselineskip| value on original columns break.
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+%
+% \begin{macro}{unskipbreak}
+% \begin{macrocode}
+\def\on@stripcols@break{\hbox{}}
+\DeclareOption{unskipbreak}{\gdef\on@stripcols@break{\unskip}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{autobase}
+% \begin{macrocode}
+\newif\if@flushend@auto@baselineskip
+\DeclareOption{autobase}{\global\@flushend@auto@baselineskiptrue}
+\ProcessOptions
+
+\newtoks\At@ViperColsBreak \At@ViperColsBreak{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\oldcolsbreak}
+% \begin{macrocode}
+\def\oldcolsbreak#1{\global\At@ViperColsBreak{#1}}
+\def\viper@top@hook{\splittopskip0pt plus 2pt}
+
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\newbox\v@aaa
+\newbox\v@ccc
+\@ifundefined{lastskip@a}{\newskip\lastskip@a}{}
+\@ifundefined{lastskip@b}{\newskip\lastskip@b}{}
+\@ifundefined{lastskip@d}{\newskip\lastskip@d}{}
+\@ifundefined{lastbox@a}{\newbox\lastbox@a}{}
+\@ifundefined{stripsep}{\newskip\stripsep \stripsep 15pt plus 2pt minus 2pt}{}
+
+\@ifundefined{@viper}{\newbox\@viper}{}
+\newif\if@lastviper \@lastviperfalse
+% \end{macrocode}
+%
+%
+% \begin{macro}{\@outputdblcol}
+% \begin{macrocode}
+\def\@outputdblcol{%
+ \if@firstcolumn
+ \global \@firstcolumnfalse
+ \global \setbox\@leftcolumn \box\@outputbox
+ \else
+ \global \@firstcolumntrue
+ \setbox\@outputbox \vbox {%
+ \hb@xt@\textwidth {%
+ \hb@xt@\columnwidth {%
+ \box\@leftcolumn \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth {%
+ \box\@outputbox \hss}%
+ }%
+ }%
+ \ifvoid\hold@viper
+ \else
+ \setbox\@outputbox \vbox to\textheight{%
+ \box\hold@viper
+ \box\@outputbox
+ \vss
+ }%
+ \fi
+ \@combinedblfloats
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi
+ {\@outputpage
+ \@startdblcolumn}%
+ \ifvoid\@viper
+ \else
+ \global\setbox\@viper\vbox{%
+ \vskip-\stripsep
+ \unvbox\@viper
+ }%
+ \@viperoutput
+ \fi
+ \endgroup
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\mathchardef\@Mv=10005
+\newcount\viper@penalty
+% \end{macrocode}
+%
+% \begin{macro}{\strip}
+% \begin{macrocode}
+\def\strip{%
+ \ifinner
+ \@parmoderr\viper@penalty\z@
+ \else
+ \viper@penalty=-\@Mv\relax
+ \fi
+ \global \setbox\@viper\vbox\bgroup%
+ \hsize\textwidth
+ \@parboxrestore
+ \col@number \@ne
+ \vrule height\topskip width\z@ depth\z@
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\endstrip}
+% \begin{macrocode}
+\def\endstrip{%
+ \egroup
+ \ifnum\viper@penalty <-\@Mii
+ \penalty -\@Miv
+ \ifvmode
+ \@tempdima\prevdepth %% saving and restoring \prevdepth added
+ \vbox{}% %% 26 May 87 to prevent extra vertical
+ \prevdepth\@tempdima %% space when used in vertical mode
+ \penalty-\@Mv\relax
+ \else
+ \par
+ \penalty-\@Mv\relax
+ \noindent
+ \fi
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@viperoutput}
+% \begin{macrocode}
+\gdef\@viperoutput{%
+ \global \setbox\@holdpg \vbox{%
+ \unvbox\@holdpg
+ \unvbox\@cclv
+ \setbox\@tempboxa \lastbox
+ \unskip
+ }%
+ \@pagedp \dp\@holdpg
+ \@pageht \ht\@holdpg
+ \ifvoid\@viper\else
+ \advance \@pageht \@pagedp
+ \ifvoid\footins \else
+ \advance \@pageht \ht\footins
+ \advance \@pageht \skip\footins
+ \advance \@pageht \dp\footins
+ \fi
+ \ifvbox \@kludgeins
+ \ifdim \wd\@kludgeins=\z@
+ \advance \@pageht \ht\@kludgeins
+ \fi
+ \fi
+ \@reinserts
+ \@addviper
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@specialoutput}
+% \begin{macrocode}
+\gdef\@specialoutput{%
+ \ifnum \outputpenalty>-\@Mii
+ \@doclearpage
+ \else
+ \ifnum \outputpenalty<-\@Miii
+ \ifnum \outputpenalty<-\@MM \deadcycles \z@ \fi
+ \ifnum \outputpenalty=-\@Mv
+ \@viperoutput
+ \ifnum \outputpenalty<\z@
+ \if@nobreak
+ \else
+ \addpenalty \interlinepenalty
+ \fi
+ \fi
+ \else
+ \global \setbox\@holdpg \vbox {\unvbox\@cclv}%
+ \fi
+ \else
+ \global \setbox\@holdpg \vbox{%
+ \unvbox\@holdpg
+ \unvbox\@cclv
+ \setbox\@tempboxa \lastbox
+ \unskip
+ }%
+ \@pagedp \dp\@holdpg
+ \@pageht \ht\@holdpg
+ \unvbox \@holdpg
+ \@next\@currbox\@currlist{%
+ \ifnum \count\@currbox>\z@
+ \advance \@pageht \@pagedp
+ \ifvoid\footins \else
+ \advance \@pageht \ht\footins
+ \advance \@pageht \skip\footins
+ \advance \@pageht \dp\footins
+ \fi
+ \ifvbox \@kludgeins
+ \ifdim \wd\@kludgeins=\z@
+ \advance \@pageht \ht\@kludgeins
+ \fi
+ \fi
+ \@reinserts
+ \@addtocurcol
+ \else
+ \@reinserts
+ \@addmarginpar
+ \fi
+ }\@latexbug
+ \ifnum \outputpenalty<\z@
+ \if@nobreak
+ \else
+ \addpenalty \interlinepenalty
+ \fi
+ \fi
+ \fi
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\@ifundefined{hold@viper}{\newbox\hold@viper}{}
+\newdimen\ht@viper
+% \end{macrocode}
+%
+% \begin{macro}{\@addviper}
+% \begin{macrocode}
+\def \@addviper {%
+ \if@firstcolumn
+ \@insertfalse
+ \@reqcolroom .5\@pageht
+ \ht@viper\@reqcolroom
+ \advance \@reqcolroom \ht\@viper
+ \advance \@reqcolroom \stripsep
+ \ifvoid\hold@viper\@tempdima=\z@\else\@tempdima\ht\hold@viper\fi
+%%
+ \@tempdimb \ht@viper
+ \loop
+ \setbox\v@aaa\copy\@holdpg
+ \setbox\v@ccc\vbox to\@tempdimb{%
+ \vsplit\v@aaa to\@tempdimb\vss\vsplit\v@aaa to\@tempdimb}%
+ \wlog{Extra height:\the\ht\v@aaa\space when \the\@tempdimb}%
+ \ifvoid\v@aaa \else \advance\@tempdimb 1pt \repeat
+ \loop
+ \setbox\v@aaa\copy\@holdpg
+ \setbox\v@ccc\vbox to\@tempdimb{%
+ \vsplit\v@aaa to\@tempdimb\vss}%
+ \wlog{(2)Left:\the\ht\v@ccc\space Right:\the\ht\v@aaa\space Output:\the\@tempdimb}%
+ \ifdim \ht\v@ccc<\ht\v@aaa \@tempdimb \the\ht\v@aaa \repeat
+ \wlog{- LAST -^^JLeft:\the\ht\v@ccc^^JRight:\the\ht\v@aaa^^JOutput:\the\@tempdimb}%
+ \setbox\v@ccc\vbox to\@tempdimb{%
+ \vsplit\@holdpg to\@tempdimb\vss}%
+%%
+ \setbox\@tempboxa \vbox {%
+ \hb@xt@\textwidth {%
+ \hb@xt@\columnwidth {%
+ \vbox to\ht@viper{\box\v@ccc\vss} \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth {%
+ \vbox to\ht@viper{\box\@holdpg\vss} \hss}%
+ }%
+ }%
+ \ifvoid\hold@viper
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\@tempboxa
+ \penalty\interlinepenalty
+ \vskip\stripsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ }%
+ \else
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\hold@viper
+ \unvbox\@tempboxa
+ \penalty\interlinepenalty
+ \vskip\stripsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ }%
+ \fi
+ \ifdim \@colroom>\@reqcolroom
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\hold@viper
+ \box\@viper
+ \penalty\interlinepenalty
+ \vskip\stripsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ }%
+ \@inserttrue
+ \advance\@tempdima by-\ht\hold@viper
+ \global \advance \@colht \@tempdima
+ \ifdim \@colht<2.5\baselineskip
+ \@latex@warning@no@line {Optional argument of \noexpand\twocolumn
+ too tall on page \thepage (1 stulpelis)}%
+ \@emptycol
+ \if@firstcolumn
+ \else
+ \@emptycol
+ \fi
+ \global\@lastvipertrue
+ \else
+ \global \vsize \@colht
+ \global \@colroom \@colht
+ \check@floats
+ \ifdim\@tempdima>\z@
+ \global\advance\@colroom by-\@tempdima
+ \fi
+ \ifdim\@colroom<\z@
+ \global\@colroom 1pt
+ \ifdim\@tempdima>\@colht
+ \@latex@warning@no@line {TOP ir/ar BOT FLOAT's
+ netelpa lape \thepage (1 stulpelis)}%
+ \fi
+ \@emptycol
+ \if@firstcolumn
+ \else
+ \@emptycol
+ \fi
+ \global\@lastvipertrue
+ \fi
+ \fi
+ \fi
+ \else
+ \@insertfalse
+ \@reqcolroom\@colht
+ \advance\@reqcolroom \@pageht
+ \ht@viper.5\@reqcolroom
+ \@reqcolroom\ht@viper
+ \advance \@reqcolroom \ht\@viper
+ \advance \@reqcolroom \stripsep
+ \if@flushend@auto@baselineskip
+ \setbox\@tempboxa\vbox{\unvcopy\@leftcolumn
+ \global\lastskip@d\lastskip
+ \global\lastskip@b\lastskip
+ \loop
+ \global\lastskip@a\lastskip@b
+ \unskip\unpenalty
+ \global\lastskip@b\lastskip
+ \global\advance\lastskip@d by\lastskip
+ \ifdim\lastskip@b=-\lastskip@a
+ \global\advance\lastskip@d by-\lastskip
+ \else
+ \repeat
+ \ifdim\lastskip@b=-\lastskip@a
+ \ifdim\lastskip@b=\z@
+ \setbox\lastbox@a\lastbox
+ \global\advance\lastskip@d by\ht\lastbox@a
+ \global\advance\lastskip@d by\lastskip
+ \unskip\unpenalty
+ \setbox\lastbox@a\lastbox
+ \global\advance\lastskip@d by\dp\lastbox@a
+ \else
+ \global\lastskip@d\lastskip
+ \global\advance\lastskip@d by\topskip
+ \fi
+ \fi
+ \global\advance\lastskip@d by-\topskip
+ }%
+ \ifdim\ht\@holdpg>\@colht
+ \global\setbox\@holdpg\vbox{\unvbox\@leftcolumn\unskip\unpenalty
+ \par\eject
+ \vbox to \@colht{\unvbox\@holdpg\unskip}%
+ }%
+ \else
+ \global\setbox\@holdpg\vbox{%
+ \unvbox\@leftcolumn\unskip\unpenalty
+ \vskip\lastskip@d
+ \the\At@ViperColsBreak
+ \unvbox\@holdpg
+ \unskip
+ }%
+ \fi
+ \else
+ \global\setbox\@holdpg\vbox{%
+ \unvbox\@leftcolumn
+ \setbox\@tempboxa\lastbox
+ \on@stripcols@break
+ \the\At@ViperColsBreak
+ \unvbox\@holdpg
+ }%
+ \fi
+ \global\At@ViperColsBreak{}%
+ \ht@viper .5\ht\@holdpg
+ \ifdim \ht@viper>\@colht
+ \ht@viper \@colht
+ \fi
+ \ifvoid\hold@viper\@tempdima=\z@\else\@tempdima\ht\hold@viper\fi
+% \end{macrocode}
+%%
+% \begin{macrocode}
+ \@tempdimb \ht@viper
+ \loop
+ \setbox\v@aaa\copy\@holdpg
+ \setbox\v@ccc\vbox to\@tempdimb{%
+ \vsplit\v@aaa to\@tempdimb
+ \vss
+ \vsplit\v@aaa to\@tempdimb
+ }%
+ \wlog{Extra height:\the\ht\v@aaa\space when \the\@tempdimb}%
+ \ifvoid\v@aaa
+ \else
+ \advance\@tempdimb 1\p@
+ \repeat
+ \loop
+ \setbox\v@aaa\copy\@holdpg
+ \setbox\v@ccc\vbox to\@tempdimb{\vsplit\v@aaa to\@tempdimb\vss}%
+ \wlog{(2)Left:\the\ht\v@ccc\space
+ Right:\the\ht\v@aaa\space
+ Output:\the\@tempdimb
+ }%
+ \ifdim\ht\v@ccc<\ht\v@aaa
+ \@tempdimb \the\ht\v@aaa
+ \repeat
+ \wlog{- LAST -^^JLeft:\the\ht\v@ccc
+ ^^JRight:\the\ht\v@aaa
+ ^^JOutput:\the\@tempdimb
+ }%
+ \setbox\v@ccc\vbox to\@tempdimb{\vsplit\@holdpg to\@tempdimb\vss}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \setbox\@tempboxa\vbox{%
+ \hb@xt@\textwidth {%
+ \hb@xt@\columnwidth{\vbox to\ht@viper{\box\v@ccc\vss} \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth {\vbox to\ht@viper{\box\@holdpg\vss} \hss}%
+ }%
+ }%
+ \ifvoid\hold@viper
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\@tempboxa
+ \penalty\interlinepenalty
+ \vskip\stripsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ }%
+ \else
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\hold@viper
+ \unvbox\@tempboxa
+ \penalty\interlinepenalty
+ \vskip\stripsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ }%
+ \fi
+ \ifdim \@colht>\@reqcolroom
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\hold@viper
+ \box\@viper
+ \penalty\interlinepenalty
+ \vskip\stripsep
+ \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi
+ \outputpenalty \z@
+ }%
+ \@inserttrue
+ \global\@firstcolumntrue
+ \advance\@tempdima by-\ht\hold@viper
+ \global \advance \@colht \@tempdima
+ \ifdim \@colht<2.5\baselineskip
+ \@latex@warning@no@line {Optional argument of \noexpand\twocolumn
+ too tall on page \thepage (2 stulpelis)}%
+ \@emptycol
+ \if@firstcolumn
+ \else
+ \@emptycol
+ \fi
+ \global\@lastvipertrue
+ \else
+ \global \vsize \@colht
+ \global \@colroom \@colht
+ \check@floats
+ \ifdim\@tempdima>\z@
+ \global\advance\@colroom by-\@tempdima
+ \fi
+ \ifdim\@colroom<\z@
+ \global\@colroom 1pt
+ \ifdim\@tempdima>\@colht
+ \@latex@warning@no@line {TOP ir/ar BOT FLOAT's
+ netelpa lape \thepage (2 stulpelis)}%
+ \fi
+ \@emptycol
+ \if@firstcolumn
+ \else
+ \@emptycol
+ \fi
+ \global\@lastvipertrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \advance\@tempdima by-\ht\hold@viper
+ \global \advance \@colht \@tempdima
+ \global\setbox\hold@viper \vbox {%
+ \unvbox\hold@viper
+ \csname viper@top@hook\endcsname
+ \vsplit\@viper to \@colht
+ \vss
+ }%
+ \vbox{}%
+ \global\@firstcolumnfalse
+ \newpage
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\check@floats}
+% \begin{macrocode}
+
+\def\check@floats{%
+ \global\@tempdima\z@
+ \let\@elt\ht@comflelt
+ \ifx\@toplist\@empty \else \@toplist \fi
+ \ifx\@botlist\@empty \else \@botlist \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\ht@comflelt}
+% \begin{macrocode}
+\def\ht@comflelt#1{%
+ \setbox\@tempboxa\vbox{\copy #1\vskip\floatsep}%
+ \global\advance\@tempdima by\ht\@tempboxa
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{output}
+% \begin{macrocode}
+\output {%
+ \let \par \@@par
+ \ifnum \outputpenalty<-\@M
+ \@specialoutput
+ \else
+ \@makecol
+ \@opcol
+ \@startcolumn
+ \@whilesw \if@fcolmade \fi
+ {%
+ \@opcol\@startcolumn}%
+ \fi
+ \ifnum \outputpenalty>-\@Miv
+ \ifdim \@colroom<1.5\baselineskip
+ \ifdim \@colroom<\textheight
+ \@latex@warning@no@line {Text page \thepage\space
+ contains only floats}%
+ \if@lastviper\else\@emptycol\fi
+ \if@twocolumn
+ \if@firstcolumn
+ \else
+ \@emptycol
+ \fi
+ \fi
+ \global\@lastviperfalse
+ \else
+ \global \vsize \@colroom
+ \fi
+ \else
+ \global \vsize \@colroom
+ \fi
+ \else
+ \ifnum\outputpenalty<-100005
+ \global \vsize \maxdimen
+ \else
+ \global \vsize \@colroom
+ \fi
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/floatpag.dtx b/Master/texmf-dist/source/latex/sttools/floatpag.dtx
new file mode 100644
index 00000000000..95d732b665a
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/floatpag.dtx
@@ -0,0 +1,354 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 1999-2012 by Vytas Statulevi\v{c}ius <vytas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files floatpag.dtx and floatpag.ins
+% and the derived filebase floatpag.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{floatpag.dtx}
+%</driver>
+%% Copyright (C) 1999-2012 by Vytas Statulevi\v{c}ius <vytas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% The macros, developed by Sigitas Tolu\v{s}is <sigitas@vtex.lt>,
+%% were used in this package.
+%%
+%% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%%
+%% PURPOSE: provides commands to apply different pagestyles
+%% to the full page floats.
+%%
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{floatpag}
+%<*package>
+ [2012/05/29 v1.1 Different pagestyles on float pages]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{floatpag}[2012/05/29]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{floatpag.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{304}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.1}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{floatpag.dtx}
+% \title{The \textsf{floatpag} package}
+% \author{Vytas Statulevi\v{c}ius and Sigitas Tolu\v{s}is \\
+% \url{vytas@vtex.lt}, \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% Provides commands to apply different pagestyles to the full page floats.
+%
+% \section{Usage}
+%
+% \DescribeMacro{\floatpagestyle}
+% \marg{foo} will apply pagestyle \meta{foo} to all pages
+% occupied by full page floats.
+%
+% \medskip
+% \DescribeMacro{\rotfloatpagestyle}
+% \marg{foo} will apply pagestyle \meta{foo} to all pages
+% occupied by sideways figures and tables
+% produced with the help of |rotating|
+% package (Sebastian Rahtz and Leonor Barroca).
+%
+% \medskip
+% \DescribeMacro{\thisfloatpagestyle}
+% \marg{foo} will apply pagestyle \meta{foo} to a page where
+% this command was used inside figure or table
+% environment.
+%
+% \medskip
+% \textbf{Default:} |\floatpagestyle{headings}| and |\rotfloatpagestyle{plain}|.
+%
+% \medskip
+% The following commands from the LaTeX2e kernel were redefined:
+% |\@xfloat|, |\@vtryfc|.
+%
+% \medskip
+% The following command from the rotating.sty was redefined:
+% |\@xrotfloat|.
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{floatpag}
+ [1999/04/29
+ FLOAT PAGESTYLE]
+% \end{macrocode}
+%
+% \begin{macro}{\floatpagestyle}
+% \begin{macrocode}
+\def\floatpagestyle#1{\gdef\at@float@page{\thispagestyle{#1}}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\rotfloatpagestyle}
+% \begin{macrocode}
+\def\rotfloatpagestyle#1{%
+ \gdef\@r@f@pagestyle{#1}%
+ \gdef\at@rotfloat@page{\thispagestyle{#1}}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\floatpagestyle{headings}
+\rotfloatpagestyle{plain}
+% \end{macrocode}
+%
+% \begin{macro}{\thisfloatpagestyle}
+%
+% \begin{macrocode}
+\def\thisfloatpagestyle#1{%
+ \expandafter\expandafter\expandafter\gdef\expandafter
+ \csname\number\@currbox @float\endcsname{\thispagestyle{#1}}\relax
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@xfloat}
+%
+%% Modify |\x@float| - ordinary floats
+%
+% \begin{macrocode}
+\def\@xfloat #1[#2]{%
+ \@nodocument
+ \def \@captype {#1}%
+ \def \@fps {#2}%
+ \@onelevel@sanitize \@fps
+ \def \reserved@b {!}%
+ \ifx \reserved@b \@fps
+ \@fpsadddefault
+ \else
+ \ifx \@fps \@empty
+ \@fpsadddefault
+ \fi
+ \fi
+ \ifhmode
+ \@bsphack
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist
+ {%
+ \@tempcnta \sixt@@n
+ \expandafter \@tfor \expandafter \reserved@a
+ \expandafter :\expandafter =\@fps
+ \do
+ {%
+ \if \reserved@a h%
+ \ifodd \@tempcnta
+ \else
+ \advance \@tempcnta \@ne
+ \fi
+ \fi
+ \if \reserved@a t%
+ \@setfpsbit \tw@
+ \fi
+ \if \reserved@a b%
+ \@setfpsbit 4%
+ \fi
+ \if \reserved@a p%
+ \@setfpsbit 8%
+ \fi
+ \if \reserved@a !%
+ \ifnum \@tempcnta>15
+ \advance\@tempcnta -\sixt@@n\relax
+ \fi
+ \fi
+ }%
+ \@tempcntb \csname ftype@\@captype \endcsname
+ \multiply \@tempcntb \@xxxii
+ \advance \@tempcnta \@tempcntb
+ \global \count\@currbox \@tempcnta
+ \expandafter\expandafter\expandafter\gdef\expandafter
+ \csname\number\@currbox @float\endcsname{\at@float@page}\relax
+ }%
+ \@fltovf
+ \fi
+ \global \setbox\@currbox
+ \color@vbox
+ \normalcolor
+ \vbox \bgroup
+ \hsize\columnwidth
+ \@parboxrestore
+ \@floatboxreset
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\e@xrotfloat}
+%
+%% 2e rotating.sty v. 2.10:
+% \begin{macrocode}
+\def\e@xrotfloat#1[#2]{%
+ \@float{#1}[#2]%
+ \thisfloatpagestyle{\@r@f@pagestyle}%
+ \begin{lrbox}\rot@float@box
+ \begin{minipage}\textheight
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\n@xrotfloat}
+%% 2.09 rotating.sty v. 1.6
+% \begin{macrocode}
+\def\n@xrotfloat#1[#2]{%
+ \ifhmode
+ \@bsphack
+ \@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \def\@captype{#1}%
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist{\@tempcnta\csname ftype@#1\endcsname
+ \multiply\@tempcnta\@xxxii\advance\@tempcnta\sixt@@n
+ \@tfor \@tempa :=#2\do{%
+ \if\@tempa h\advance\@tempcnta \@ne\fi
+ \if\@tempa t\advance\@tempcnta \tw@\fi
+ \if\@tempa b\advance\@tempcnta 4\relax\fi
+ \if\@tempa p\advance\@tempcnta 8\relax\fi
+ }%
+ \global\count\@currbox\@tempcnta
+ }%
+ \@fltovf
+ \fi
+ \expandafter\expandafter\expandafter\gdef\expandafter
+ \csname\number\@currbox @float\endcsname{\at@rotfloat@page}\relax
+ \global\setbox\@currbox\vbox\bgroup
+ \hsize\textheight
+ \@parboxrestore
+ }
+% \end{macrocode}
+%
+%% Check for |rotating| version: 2e ar 209:
+%% 1999.02.08 To be sure check at begin document.
+% \begin{macrocode}
+\AtBeginDocument{%
+\@ifpackageloaded{rotating}%
+{\let\@xrotfloat\e@xrotfloat\let\n@xrotfloat\relax}%
+{\let\@xrotfloat\n@xrotfloat\let\e@xrotfloat\relax}}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\spec@float}
+%
+%% "Hook" in the output procedure.
+% \begin{macrocode}
+\def\spec@float#1{\expandafter\csname\number#1@float\endcsname
+ \expandafter\expandafter\expandafter\gdef\expandafter\csname\number#1@float\endcsname{}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@vtryfc}
+% \begin{macrocode}
+\def\@vtryfc#1{%
+ \global\setbox\@outputbox\vbox{}%
+ \let\@elt\@wtryfc
+ \@flsucceed
+ \let\@elt\spec@float
+ \@flsucceed
+ \global\setbox\@outputbox \vbox to\@colht{%
+ \vskip \@fptop
+ \vskip -\@fpsep
+ \unvbox \@outputbox
+ \vskip \@fpbot
+ }%
+ \let\@elt\relax
+ \xdef#1{\@failedlist\@flfail}%
+ \xdef\@freelist{\@freelist\@flsucceed}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/flushend.dtx b/Master/texmf-dist/source/latex/sttools/flushend.dtx
new file mode 100644
index 00000000000..6e5327ee4df
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/flushend.dtx
@@ -0,0 +1,324 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files flushend.dtx and flushend.ins
+% and the derived filebase flushend.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{flushend.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1997-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Balanced columns on last page in twocolumn mode.
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{flushend}
+%<*package>
+ [2012/05/29 v1.1 Balancing columns at last page]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{flushend}[2012/05/29]
+\EnableCrossrefs
+\CodelineIndex
+%%\RecordChanges
+\begin{document}
+ \DocInput{flushend.dtx}
+ %%\PrintChanges
+ %%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{285}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v0.1}{1997/05/16}{first version}
+% \changes{v0.2}{1997/09/09}{support for compatibility with cuted.sty}
+% \changes{v1.0}{1997/10/01}{\string\vipersep changed to \string\stripsep for compatibility with cuted.sty}
+% \changes{v1.1}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{flushend.dtx}
+% \title{The \textsf{flushend} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The package is used to balance columns on the last page in twocolumn mode.
+%
+% \section{Usage}
+%
+% Just load the package: that's all.
+%
+% \DescribeMacro{\flushend}
+%
+% This macro switches on column balancing on the last page. It is used
+% by default.
+%
+% \medskip
+% \DescribeMacro{\raggedend}
+%
+% This macro switches off column balancing on the last page.
+%
+% \medskip
+% \DescribeMacro{\atColsBreak}
+% \marg{tokens}
+%
+% Adds \meta{tokens} in place of the original column break (made without balancing).
+%
+% \medskip
+% \textit{Example}: |\atColsBreak{\vskip-2pt}|
+%
+% \medskip
+% \DescribeMacro{\showcolsendrule}
+%
+% It can be used just for debugging: adds rule to the bottom of columns.
+%
+% \section{Tips}
+%
+% Sometimes the balancing can be not so good. In that case to stretch
+% right column by \meta{tex dimension} add command |\vskip-|\meta{tex dimension} just before
+% |\end{document}|. To shrink right column use |\vskip|\meta{tex dimension}.
+%
+% \medskip
+% \textit{Example}:
+%
+% |\vskip-10pt%|
+%
+% |\end{document}|
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{flushend}[1997/10/01]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newbox\@aaa
+\newbox\@ccc
+\@ifundefined{@viper}{\newbox\@viper}{}
+\@ifundefined{hold@viper}{\newbox\hold@viper}{}
+\newtoks\atColsBreak \atColsBreak={}
+\newdimen\@extra@skip \@extra@skip\z@
+\newdimen\@nd@page@rule \@nd@page@rule\z@
+% \end{macrocode}
+%
+% \begin{macro}{\last@outputdblcol}
+% \begin{macrocode}
+\def\last@outputdblcol{%
+ \if@firstcolumn
+ \global \@firstcolumnfalse
+ \global \setbox\@leftcolumn \box\@outputbox
+ \else
+ \global \@firstcolumntrue
+ \if@lastpage
+ \@tempdima\ht\@leftcolumn
+ \splittopskip\topskip\splitmaxdepth\maxdepth
+ \setbox\@tempboxa\vbox{%
+ \unvbox\@leftcolumn\setbox0\lastbox\unskip
+ \the\atColsBreak
+ \unvbox\@outputbox\setbox0\lastbox\unskip
+ }%
+ \@tempdimb .5\ht\@tempboxa
+ \loop
+ \setbox\@aaa\copy\@tempboxa
+ \setbox\@ccc\vbox to\@tempdimb{%
+ \vsplit\@aaa to\@tempdimb
+ \vss
+ \vsplit\@aaa to\@tempdimb
+ }%
+ \wlog{Extra height:\the\ht\@aaa\space when \the\@tempdimb}%
+ \ifvoid\@aaa
+ \else
+ \advance\@tempdimb 1\p@
+ \repeat
+ \loop
+ \setbox\@aaa\copy\@tempboxa
+ \setbox\@ccc\vbox to\@tempdimb{%
+ \vsplit\@aaa to\@tempdimb
+ \vss
+ }%
+ \wlog{(2)Left:\the\ht\@ccc\space
+ Right:\the\ht\@aaa\space
+ Output:\the\@tempdimb
+ }%
+ \ifdim \ht\@ccc<\ht\@aaa
+ \@tempdimb \the\ht\@aaa
+ \repeat
+ \wlog{- LAST -^^JExtra skip:\the\@extra@skip
+ ^^JLeft:\the\ht\@ccc
+ ^^JRight:\the\ht\@aaa
+ ^^JOutput:\the\@tempdimb
+ }%
+ \setbox\@ccc\vbox to\@tempdimb{%
+ \vsplit\@tempboxa to\@tempdimb
+ \vss
+ }%
+ \setbox\@leftcolumn\vbox to\@tempdima{%
+ \vbox to\@tempdimb{\unvbox\@ccc}%
+ \hrule\@height\@nd@page@rule
+ \vss
+ }%
+ \setbox\@outputbox\vbox to\@tempdima{%
+ \vbox to\@tempdimb{%
+ \unvbox\@tempboxa
+ \vfilneg
+ \vskip\@extra@skip
+ }%
+ \hrule\@height\@nd@page@rule
+ \vss
+ }%
+ \setbox\@outputbox \vbox {%
+ \hb@xt@\textwidth {%
+ \hb@xt@\columnwidth {\box\@leftcolumn \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth {\box\@outputbox \hss}%
+ }%
+ }%
+ \else
+ \setbox\@outputbox \vbox {%
+ \hb@xt@\textwidth {%
+ \hb@xt@\columnwidth {\box\@leftcolumn \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth {\box\@outputbox \hss}%
+ }%
+ }%
+ \fi
+ \ifvoid\hold@viper
+ \else
+ \setbox\@outputbox \vbox{\box\hold@viper\box\@outputbox}%
+ \fi
+ \@combinedblfloats
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi
+ {\@outputpage \@startdblcolumn}%
+ \ifvoid\@viper
+ \else
+ \global\setbox\@viper\vbox{%
+ \vskip-\stripsep
+ \unvbox\@viper
+ }%
+ \@viperoutput
+ \fi
+ \endgroup
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\let\prev@enddocument\enddocument
+\newif\if@lastpage \@lastpagefalse
+% \end{macrocode}
+%
+% \begin{macro}{\enddocument}
+% \begin{macrocode}
+\def\enddocument{%
+ \global\@lastpagetrue
+ \let\@outputdblcol\last@outputdblcol
+ \prev@enddocument
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\raggedend}
+% \begin{macrocode}
+\def\raggedend{\global\let\enddocument\prev@enddocument}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\flushend}
+% \begin{macrocode}
+\def\flushend{%
+ \gdef\enddocument{%
+ \global\@lastpagetrue
+ \let\@outputdblcol\last@outputdblcol
+ \prev@enddocument
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\showcolsendrule}
+% \begin{macrocode}
+\def\showcolsendrule{\global\@nd@page@rule=.4pt}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/marginal.dtx b/Master/texmf-dist/source/latex/sttools/marginal.dtx
new file mode 100644
index 00000000000..4c619ffa2ca
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/marginal.dtx
@@ -0,0 +1,339 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files marginal.dtx and marginal.ins
+% and the derived filebase marginal.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{marginal.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1997-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Enlarge free and show lost marginal inserts.
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{marginal}
+%<*package>
+ [2012/05/29 v1.1 Enlarge free and show lost marginal inserts]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{marginal}[2012/05/29]
+%%\EnableCrossrefs
+%%\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{marginal.dtx}
+ %%\PrintChanges
+ %%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{374}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.1}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{marginal.dtx}
+% \title{The \textsf{marginal} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% Enlarge free and show lost marginal inserts.
+%
+% \section{Usage}
+%
+% \DescribeMacro{\showlostmarginals}
+% \indent Outputs lost marginal notes at the left of page.
+%
+% \medskip
+% \DescribeMacro{\enlargefreelist}
+% Adds more(34) free inserts to freelist.
+%
+% \medskip
+% \DescribeMacro{\onesidemarginals}
+% Outputs marginal notes only on one side. It saves one half
+% of the available free inserts.
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \begin{macrocode}
+\newif\if@mparlost \@mparlostfalse
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newbox\@mparlostbox
+\setbox\@mparlostbox\vbox{}
+% \end{macrocode}
+%
+% \begin{macro}{\@fltovfpar}
+%
+% \begin{macrocode}
+\gdef\@fltovfpar{\global\@mparlosttrue
+ \@latex@warning{Too many unprocessed (marginal)floats}\relax
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@fltovfmess}
+% \begin{macrocode}
+\gdef\@fltovfmess{%
+ \@latex@error{Too many unprocessed floats}\@ehb
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\marginpar}
+%
+% \begin{macrocode}
+\def\marginpar{%
+ \ifhmode
+ \@bsphack\@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist{}{}%
+ \@next\@marbox\@freelist{\global\count\@marbox\m@ne}{\@floatpenalty\z@
+ \@fltovfmess \def\@currbox{\@tempboxa}\def\@marbox{\@tempboxa}}%
+ \fi
+ \@ifnextchar[\@xmpar\@ympar
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@savemarbox}
+%
+% \begin{macrocode}
+\long\def\@savemarbox#1#2{%
+ \global\setbox#1%
+ \color@vbox
+ \vtop{%
+ \hsize\marginparwidth
+ \@parboxrestore
+ \@marginparreset
+ #2%
+ \global\@minipagefalse
+ \outer@nobreak
+ }%
+ \color@endbox
+ \if@mparlost
+ \global\setbox\@mparlostbox\vbox{\unvbox\@mparlostbox\copy#1}%
+ \global\@mparlostfalse
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\showlostmarginals}
+% Outputs lost marginal notes at the left of the page.
+% \begin{macrocode}
+\def\showlostmarginals{%
+ \global\let\old@textbottom\@textbottom
+ \gdef\@textbottom{%
+ \vtop to\z@{%
+ \hbox to\z@{\kern-\wd\@mparlostbox
+ \vbox to\z@{\kern-\ht\@mparlostbox
+ \box\@mparlostbox
+ \vfill
+ }%
+ }%
+ }%
+ \old@textbottom
+ }%
+ \global\let\@fltovfmess\@fltovfpar
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\enlargefreelist}
+% Adds more(34) free inserts to freelist
+% \begin{macrocode}
+\def\enlargefreelist{%
+ \@for\curr@option:={S,T,U,W,X,Y,Z,a,b,c,d,e,f,g,h,i,%
+ j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}%
+ \do{\expandafter\newinsert\csname bx@\curr@option\endcsname}%
+ \gdef\@freelist{%
+ \@elt\bx@A \@elt\bx@B \@elt\bx@C \@elt\bx@D \@elt\bx@E \@elt\bx@F
+ \@elt\bx@G \@elt\bx@H \@elt\bx@I \@elt\bx@J \@elt\bx@K \@elt\bx@L
+ \@elt\bx@M \@elt\bx@N \@elt\bx@O \@elt\bx@P \@elt\bx@Q \@elt\bx@R
+ \@elt\bx@S \@elt\bx@T \@elt\bx@U \@elt\bx@V \@elt\bx@W \@elt\bx@X
+ \@elt\bx@Y \@elt\bx@Z
+ \@elt\bx@a \@elt\bx@b \@elt\bx@c \@elt\bx@d \@elt\bx@e \@elt\bx@f
+ \@elt\bx@g \@elt\bx@h \@elt\bx@i \@elt\bx@j \@elt\bx@k \@elt\bx@l
+ \@elt\bx@m \@elt\bx@n \@elt\bx@o \@elt\bx@p \@elt\bx@q \@elt\bx@r
+ \@elt\bx@s \@elt\bx@t \@elt\bx@u \@elt\bx@v \@elt\bx@w \@elt\bx@x
+ \@elt\bx@y \@elt\bx@z
+ }%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\onesidemarginals}
+%
+%% \onesidemarginals - outputs marginals only on one side
+%
+% \begin{macrocode}
+\def\onesidemarginals{%
+ \newbox\@marbox
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@addmarginpar}
+% \begin{macrocode}
+ \gdef\@addmarginpar{\@cons\@freelist\@currbox
+ \@tempdima\@mparbottom
+ \advance\@tempdima -\@pageht
+ \advance\@tempdima\ht\@currbox
+ \ifdim\@tempdima >\z@
+ \@latex@warning@no@line {Marginpar on page \thepage\space moved}%
+ \else
+ \@tempdima\z@
+ \fi
+ \global\@mparbottom\@pageht
+ \global\advance\@mparbottom\@tempdima
+ \global\advance\@mparbottom\dp\@currbox
+ \global\advance\@mparbottom\marginparpush
+ \advance\@tempdima -\ht\@currbox
+ \global\setbox\@currbox
+ \vbox {\vskip\@tempdima \box\@currbox}%
+ \global \ht\@currbox \z@
+ \global \dp\@currbox \z@
+ \kern -\@pagedp
+ \nointerlineskip
+ \hb@xt@\columnwidth
+ {\hskip\columnwidth \hskip\marginparsep \box\@currbox \hss}%
+ \nointerlineskip
+ \hbox{\vrule \@height\z@ \@width\z@ \@depth\@pagedp}%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\marginpar}
+%
+% \begin{macrocode}
+ \gdef\marginpar{%
+ \ifhmode
+ \@bsphack\@floatpenalty -\@Mii
+ \else
+ \@floatpenalty-\@Miii
+ \fi
+ \ifinner
+ \@parmoderr\@floatpenalty\z@
+ \else
+ \@next\@currbox\@freelist{\global\count\@currbox\m@ne}{\@floatpenalty\z@
+ \@fltovfmess \def\@currbox{\@tempboxa}}%
+ \fi
+ \@ifnextchar[\@xmpar\@ympar
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@xmpar}
+%
+% \begin{macrocode}
+ \long\gdef\@xmpar[##1]##2{\@savemarbox\@currbox{##2}\@xympar}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ympar}
+% \begin{macrocode}
+ \long\gdef\@ympar##1{\@savemarbox\@currbox{##1}\@xympar}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@xympar}
+% \begin{macrocode}
+ \def\@xympar{%
+ \ifnum\@floatpenalty<\z@ \@cons\@currlist\@marbox \fi
+ \setbox\@tempboxa
+ \color@vbox
+ \vbox\bgroup
+ \end@float
+ \global\@ignorefalse \@esphack
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/midfloat.dtx b/Master/texmf-dist/source/latex/sttools/midfloat.dtx
new file mode 100644
index 00000000000..ba2f7d58721
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/midfloat.dtx
@@ -0,0 +1,393 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files midfloat.dtx and midfloat.ins
+% and the derived filebase midfloat.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{midfloat.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1997-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Insert some material in full-width on double-column page.
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{midfloat}
+%<*package>
+ [2012/05/29 v1.1 Insert some material in full-width on double-column page]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{midfloat}[2012/05/29]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{midfloat.dtx}
+ \PrintChanges
+ \PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{439}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v1.0}{1997/10/01}{some names}
+% \changes{v1.1}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{midfloat.dtx}
+% \title{The \textsf{midfloat} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% It is denoted to place some material (from the left column)
+% in full-width at any place (but not at the top) on double-column
+% page (|\twocolumn| mode). Existing text remains as it was before
+% insert. Placement is restricted to one page. (It is some kind of
+% dbfloat intext).
+%
+% \section{Usage}
+%
+% \DescribeMacro{strip}
+% Provides new environment:
+%
+% \begin{verbatim}
+% \begin{strip}[<top strip stretch skip>/<bottom strip skip>]
+% <wide onecolumn material>
+% \end{strip}
+% \end{verbatim}
+%
+% Puts |\vbox|\marg{wide onecolumn material} in full-width on
+% double-column page.
+%
+% \medskip
+% Adds |\stripsep| glue before and after (by default: |15pt|).
+%
+% \medskip
+% It can be problems with floats and footnotes. In the case of
+% problems with footnotes it is possible to correct the situation
+% using commands |\footnotemark| and |\footnotetext|.
+%
+% \medskip
+% Parameters \meta{top strip stretch skip} and \meta{bottom strip skip} are optional.
+% By default \meta{top strip stretch skip}|=0pt| and \meta{bottom strip skip}|=0pt|.
+% The material on the right column under strip is stretched down
+% by \meta{top strip stretch skip} and below strip is moved down by \meta{bottom strip skip}.
+%
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{midfloat}[1997/10/01]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newif\if@vihproof \@vihprooftrue
+\newtoks\juo@sar \juo@sar={}
+\@ifundefined{stripsep}{\newskip\stripsep \stripsep 15\p@}{}
+\newskip\m@addvipersep \m@addvipersep\z@
+\newskip\c@addvipersep \c@addvipersep\z@
+\newdimen\ht@strip
+\newdimen\right@cor
+\newdimen\cor@height \cor@height=\z@
+\newdimen\juo@pr
+\newdimen\juo@ht
+\newdimen\c@colht
+\newbox\@viper
+\newbox\@rightcolumn
+\newcount\juo@sk
+\def\@ca#1#2#3#4{}
+% \end{macrocode}
+%
+% \begin{macro}{\add@strip}
+% \begin{macrocode}
+\def\add@strip#1#2#3#4{%
+ \begingroup
+ \xdef\ex@{\global\noexpand\juo@sar{\the\juo@sar\noexpand\@ca{#1}{#2}{#3}{#4}}}%
+ \ex@
+ \endgroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\remove@strip}
+% \begin{macrocode}
+\def\remove@strip#1{\ifx#1\@empty\global\juo@sk=0\else
+ \global\advance\juo@sk by-1\expandafter\next@item\the #1\@@#1\fi}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\next@item}
+% \begin{macrocode}
+\def\next@item \@ca #1#2#3#4#5\@@#6{\global #6={#5}\global\juo@pr=#1\global\juo@ht=#2%
+\global\cor@height=#3\global\m@addvipersep=#4}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\strip}
+% \begin{macrocode}
+\def\strip{\@ifnextsymb[{\@strip}{\@strip[0pt/0pt]}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@strip}
+% \begin{macrocode}
+\def\@strip[#1/#2]{\global\@tempdima=#1\global\@tempdimb=#2%
+ \global \setbox\@viper\vbox\bgroup%
+ \hsize\textwidth
+ \@parboxrestore
+ \col@number \@ne
+ \vrule height\topskip width0pt depth0pt
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\endstrip}
+% \begin{macrocode}
+\def\endstrip{%
+ \egroup
+ \if@firstcolumn
+ \ifdim\pagetotal>\z@
+ \vskip\stripsep
+ \global\ht@strip\pagegoal
+ \global\advance\ht@strip by-\pagetotal
+ \global\advance\ht@strip by-\stripsep
+ \global\advance\ht@strip by-\ht\@viper
+ \global\advance\ht@strip by-\stripsep
+ \global\juo@ht=\ht\@viper
+ \else
+ \global\ht@strip\z@
+ \fi
+ \ifdim\ht@strip>\z@
+ \unvbox\@viper
+ \vskip\stripsep
+ \add@strip{\the\pagetotal}{\the\juo@ht}{\the\@tempdima}{\the\@tempdimb}%
+ \global\advance\juo@sk by1
+ \else
+ \@latex@error{Strip needs more place!}\@ehc
+ \if@vihproof
+ \framebox[\columnwidth]{??? Strip ???}%
+ \fi
+ \fi
+ \else
+ \@latex@error{Strip is used only on left column!}\@ehc
+ \if@vihproof
+ \framebox[\columnwidth]{??? Strip ???}%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@outputdblcol}
+% \begin{macrocode}
+\def\@outputdblcol{%
+ \if@firstcolumn
+ \global \@firstcolumnfalse
+ \global \setbox\@leftcolumn \box\@outputbox
+ \global\c@colht\@colht\global\c@addvipersep\z@
+ \ifnum\juo@sk>0
+ \remove@strip\juo@sar
+ \global\@colht\the\juo@pr
+ \ifdim\right@cor>\z@
+ \global\advance\@colht by\right@cor
+ \fi
+ \global\advance\@colht by\cor@height
+ \global\cor@height=0pt
+ \fi
+ \global \setbox\@rightcolumn \vbox{}%
+ \else
+ \ifdim\c@colht>\@colht
+ \@tempdima\@colht
+ \ifdim\@colht>\z@
+ \global\setbox\@rightcolumn \vbox{%
+ \unvbox\@rightcolumn
+ \vbox to\@tempdima{%
+ \vskip\c@addvipersep\unvbox\@outputbox}%
+ \vskip\stripsep
+ \vrule height\the\juo@ht width 0pt depth 0pt
+ \vskip\stripsep
+ }%
+ \global\c@addvipersep\m@addvipersep
+ \else
+ \global\setbox\@rightcolumn \vbox{%
+ \unvbox\@rightcolumn
+ \vrule height\the\juo@ht width 0pt depth 0pt
+ \vskip\stripsep
+ }%
+ \fi
+ \ifnum\juo@sk>0
+ \remove@strip\juo@sar
+ \global\@colht\the\juo@pr
+ \global\advance\@colht by -\ht\@rightcolumn
+ \global\advance\@colht by\cor@height
+ \global\cor@height=0pt
+ \else
+ \global\advance\c@colht by-\ht\@rightcolumn
+ \global\@colht\c@colht
+ \fi
+ \else
+ \global \@firstcolumntrue
+ \global\setbox\@outputbox\vbox to\ht\@leftcolumn{%
+ \unvbox\@rightcolumn
+ \vskip\c@addvipersep
+ \unvbox\@outputbox
+ }%
+ \setbox\@outputbox \vbox {%
+ \hb@xt@\textwidth {%
+ \hb@xt@\columnwidth {%
+ \box\@leftcolumn \hss}%
+ \hfil
+ \vrule \@width\columnseprule
+ \hfil
+ \hb@xt@\columnwidth {%
+ \box\@outputbox \hss}%
+ }%
+ }%
+ \@combinedblfloats
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if@fcolmade \fi
+ {\@outputpage
+ \@startdblcolumn}%
+ \endgroup
+ \global\juo@sk=0\global\juo@sar={}%
+ \global\cor@height\z@\global\c@addvipersep\z@
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@cflt}
+% \begin{macrocode}
+\def \@cflt{%
+ \let \@elt \@comflelt
+ \setbox\@tempboxa \vbox{}%
+ \@toplist
+ \global\right@cor\ht\@tempboxa
+ \ifdim\right@cor>\z@
+ \global\advance\right@cor by-\floatsep
+ \global\advance\right@cor by\textfloatsep
+ \fi
+ \setbox\@outputbox \vbox{%
+ \boxmaxdepth \maxdepth
+ \unvbox\@tempboxa
+ \vskip -\floatsep
+ \topfigrule
+ \vskip \textfloatsep
+ \unvbox\@outputbox
+ }%
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@toplist}%
+ \global\let\@toplist\@empty
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ifnextsymb}
+% \begin{macrocode}
+\def\@ifnextsymb#1#2#3{%
+ \let\reserved@d=#1%
+ \def\reserved@a{#2}\def\reserved@b{#3}%
+ \futurelet\@let@token\@ifnsymb}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@ifnsymb}
+% \begin{macrocode}
+\def\@ifnsymb{%
+ \ifx\@let@token\@sptoken
+ \let\reserved@c\reserved@b
+ \else
+ \ifx\@let@token\reserved@d
+ \let\reserved@c\reserved@a
+ \else
+ \let\reserved@c\reserved@b
+ \fi
+ \fi
+ \reserved@c}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/stabular.dtx b/Master/texmf-dist/source/latex/sttools/stabular.dtx
new file mode 100644
index 00000000000..7ee9688c123
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/stabular.dtx
@@ -0,0 +1,361 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files stabular.dtx and stabular.ins
+% and the derived filebase stabular.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{stabular.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1998-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Improve tabular environment.
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{stabular}
+%<*package>
+ [2012/05/29 v1.1 Improve tabular environment]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{stabular}[2012/05/29]
+\EnableCrossrefs
+\CodelineIndex
+%%\RecordChanges
+\begin{document}
+ \DocInput{stabular.dtx}
+ %%\PrintChanges
+ %%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{322}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{<+version+>}{<+date+>}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{stabular.dtx}
+% \title{The \textsf{stabular} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% \textbf{Purpose}: improve tabular environment by providing
+% new commands for adds between tabular rows and allowing page break.
+%
+% \section{Usage}
+%
+% Provides new commands in tabular (used after command |\\|).
+%
+% \DescribeMacro{\emptyrow[\meta{row height}]}
+%
+% \medskip
+% Adds empty row with specified \meta{row height}.
+%
+% \medskip
+% \DescribeMacro{\tabrow\marg{tokens}[\meta{adds}]}
+%
+% Adds row of natural height: \meta{tokens}|\\|[\meta{adds}].
+%
+% \medskip
+% \DescribeMacro{stabular}
+% \DescribeMacro{stabular*}
+% Provides new environments: |stabular| and |stabular*|.
+% It is one more multi-page version of tabular.
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% Changed internal commands: |\@mkpream|, |\@addamp|, |\@xhline|.
+%
+% \iffalse
+%<*package>
+% \fi
+%
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{stabular}[1998/03/19]
+% \end{macrocode}
+%
+% \begin{macro}{\empty@finalstrut}
+%
+% \begin{macrocode}
+\def\empty@finalstrut#1{%
+ \unskip
+ \ifhmode\nobreak\fi
+ \vrule\@width\z@\@height\z@\@depth\z@
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\no@strut}
+% \begin{macrocode}
+\def\no@strut{%
+ \global\setbox\@arstrutbox\hbox{%
+ \vrule \@height\z@
+ \@depth\z@
+ \@width\z@
+ }%
+ \gdef\@endpbox{\empty@finalstrut\@arstrutbox\par\egroup\hfil}%
+ }%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\yes@strut}
+% \begin{macrocode}
+\def\yes@strut{\global\setbox\@arstrutbox\hbox{%
+ \vrule \@height\arraystretch \ht\strutbox
+ \@depth\arraystretch \dp\strutbox
+ \@width\z@}%
+ \gdef\@endpbox{\@finalstrut\@arstrutbox\par\egroup\hfil}%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@mkpream}
+% \begin{macrocode}
+\def\@mkpream#1{\@firstamptrue\@lastchclass6
+ \let\@preamble\@empty\def\empty@preamble{\add@ins}%
+ \let\protect\@unexpandable@protect
+ \let\@sharp\relax
+ \let\add@ins\relax
+ \let\@startpbox\relax
+ \let\@endpbox\relax
+ \@expast{#1}%
+ \expandafter\@tfor \expandafter
+ \@nextchar \expandafter:\expandafter=\reserved@a\do
+ {\@testpach\@nextchar
+ \ifcase \@chclass \@classz \or \@classi \or \@classii \or \@classiii
+ \or \@classiv \or\@classv \fi\@lastchclass\@chclass}%
+ \ifcase \@lastchclass \@acol
+ \or \or \@preamerr \@ne\or \@preamerr \tw@\or \or \@acol \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@addamp}
+% \begin{macrocode}
+\def\@addamp{%
+ \if@firstamp
+ \@firstampfalse
+ \edef\empty@preamble{\add@ins}%
+ \else
+ \edef\@preamble{\@preamble &}%
+ \edef\empty@preamble{\expandafter\noexpand\empty@preamble &\add@ins}%
+ \fi
+ }
+\newif\iftw@hlines \tw@hlinesfalse
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@xhline}
+% \begin{macrocode}
+\def\@xhline{%
+ \ifx\reserved@a\hline
+ \tw@hlinestrue
+ \else
+ \ifx\reserved@a\Hline
+ \tw@hlinestrue
+ \else
+ \tw@hlinesfalse
+ \fi
+ \fi
+ \iftw@hlines
+ \aftergroup\do@after
+ \fi
+ \ifnum0=`{\fi}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\do@after}
+% \begin{macrocode}
+\def\do@after{\emptyrow[\the\doublerulesep]}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\emptyrow}
+% \begin{macrocode}
+\def\emptyrow{\noalign\bgroup
+ \@ifnextchar[\@emptyrow{\@emptyrow[\z@]}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@emptyrow}
+% \begin{macrocode}
+\def\@emptyrow[#1]{%
+ \no@strut
+ \gdef\add@ins{\vrule \@height\z@ \@depth#1 \@width\z@}%
+ \egroup
+ \empty@preamble\\
+ \noalign{%
+ \yes@strut
+ \gdef\add@ins{\vrule \@height\z@ \@depth\z@ \@width\z@}%
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\tabrow}
+% \begin{macrocode}
+\def\tabrow#1{\noalign\bgroup
+ \@ifnextchar[{\@tabrow{#1}}{\@tabrow{#1}[]}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@tabrow}
+% \begin{macrocode}
+\def\@tabrow#1[#2]{\no@strut\egroup
+ #1\ifx.#2.\\\else\\[#2]\fi
+ \noalign{\yes@strut}%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\endstabular}
+%
+% \begin{macrocode}
+\def\endstabular{\crcr\egroup\egroup\egroup}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\expandafter\let\csname endstabular*\endcsname\endstabular
+% \end{macrocode}
+%
+% \begin{macro}{\stabular}
+% \begin{macrocode}
+\def\stabular{\let\@halignto\@empty\@stabular}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\stabular}
+% \begin{macrocode}
+\@namedef{stabular*}#1{\def\@halignto{to#1}\@stabular}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@stabular}
+% \begin{macrocode}
+\def\@stabular{\leavevmode
+ \bgroup
+ \let\@acol\@tabacol
+ \let\@classz\@tabclassz
+ \let\@classiv\@tabclassiv
+ \let\\\@tabularcr
+ \@stabarray
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@stabarray}
+% \begin{macrocode}
+\def\@stabarray{\m@th\@ifnextchar[\@sarray{\@sarray[c]}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@sarray}
+% \begin{macrocode}
+\def\@sarray[#1]#2{%
+ \bgroup
+ \setbox\@arstrutbox\hbox{%
+ \vrule \@height\arraystretch\ht\strutbox
+ \@depth\arraystretch \dp\strutbox
+ \@width\z@
+ }%
+ \@mkpream{#2}%
+ \edef\@preamble{%
+ \ialign \noexpand\@halignto
+ \bgroup \@arstrut \@preamble \tabskip\z@skip \cr
+ }%
+ \let\@startpbox\@@startpbox \let\@endpbox\@@endpbox
+ \let\tabularnewline\\
+ \let\par\@empty
+ \let\@sharp##%
+ \set@typeset@protect
+ \lineskip\z@skip \baselineskip\z@skip
+ \@preamble
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/stfloats.dtx b/Master/texmf-dist/source/latex/sttools/stfloats.dtx
new file mode 100644
index 00000000000..3b8b762649a
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/stfloats.dtx
@@ -0,0 +1,541 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files stfloats.dtx and stfloats.ins
+% and the derived filebase stfloats.sty.
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{stfloats.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 1997-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Improve float mechanism and baselineskip settings
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{stfloats}
+%<*package>
+ [2012/05/29 v1.1 Improve float mechanism and baselineskip settings]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{stfloats}[2012/05/29]
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\begin{document}
+ \DocInput{stfloats.dtx}
+ %%\PrintChanges
+ %%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{551}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v0.1}{1997/08/25}{first version}
+% \changes{v0.2}{1997/09/10}{standard LaTeX2e macros are used for dblfloats at top}
+% \changes{v1.0}{1997/10/01}{new commands: \cs{fnbelowfloat} and \cs{fnunderfloat}}
+% \changes{v2.0}{1998/09/21}{new commands: \cs{setbaselinefloat} and \cs{setbaselinefixed}}
+% \changes{v2.1}{1999/10/04}{changed dblfloat's output}
+% \changes{v2.2}{1999/10/22}{changed cs{output} for older LaTeX distributions}
+% \changes{v3.0}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{stfloats.dtx}
+% \title{The \textsf{stfloats} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% The package improves dblfloat(s) and footnotes placements mechanism and baselineskip
+% glue settings.
+%
+% \section{Usage}
+%
+% To place dblfloat(s) on top or bottom of the page just use optional
+% [t] or [b].
+%
+% \leftline{Example (to place figure at the page bottom):}
+%
+% \begin{verbatim}
+% \begin{figure*}[b]
+% ...
+% \end{figure*}
+% \end{verbatim}
+%
+% \DescribeMacro{\fnbelowfloat}
+% Puts footnotes below the bottom floats
+%
+% \medskip
+% \DescribeMacro{\fnunderfloat} (default and standard)
+% Puts footnotes under the bottom floats.
+%
+% \medskip
+% \DescribeMacro{\setbaselinefloat}
+% Allows |\baselineskip| to stretch and shrink if the |\baselineskip|
+% is set internally with command |\@setfontsize| (|\linespread| and
+% |\fontsize| at user level). The settings are calculated and activated
+% with command |\selectfont| (|\size@update|).
+%
+% \medskip
+% Example:
+%
+% \medskip
+% |\@setfontsize\normalsize\@xpt{12pt plus .1pt minus .1pt}| |\normalsize|%
+%
+% \medskip
+% \DescribeMacro{\setbaselinefixed} (default and standard)
+% Disables baselineskip to stretch and shrink even if the |\baselineskip|
+% is set with command |\@setfontsize| as in the previous example in case that
+% |\baselinestretch| is not empty.
+%
+% \medskip
+% Then line spreading is not used |\baselineskip| glue can be
+% controlled by ordinary |\baselinestretch| definition:
+%
+% \begin{itemize}
+% \item
+% |\def\baselinestretch{1}| - removes |\baselineskip| glue.
+% \item
+% |\def\baselinestretch{}| - keeps |\baselineskip| glue.
+% \end{itemize}
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+%
+% \begin{macro}{\@dblbotlist}
+% Used for dblfloat(s) to be placed at the page bottom.
+% \begin{macrocode}
+\gdef\@dblbotlist{}
+% \end{macrocode}
+% \end{macro}
+%
+% Additional counters for dblfloat(s) support at the page bottom.
+% \begin{macrocode}
+\newcount\@dblbotnum
+\newcount\c@dblbotnumber
+\setcounter{dblbotnumber}{2}
+% \end{macrocode}
+%
+% \begin{macro}{\@dbflt}
+% With extended set of default args: |[tp] -> [tbp]|
+% \begin{macrocode}
+\def\@dbflt#1{\@ifnextchar[{\@xdblfloat{#1}}{\@xdblfloat{#1}[tbp]}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@dblfloatplacement}
+% With adds to support dblfoat(s) placement at the page bottom.
+% \begin{macrocode}
+\def \@dblfloatplacement {%
+ \global \@dbltopnum \c@dbltopnumber
+ \global \@dblbotnum \c@dblbotnumber
+ \global \@dbltoproom \dbltopfraction\@colht
+ \@textmin \@colht
+ \advance \@textmin -\@dbltoproom
+ \@fpmin \dblfloatpagefraction\textheight
+ \@fptop \@dblfptop
+ \@fpsep \@dblfpsep
+ \@fpbot \@dblfpbot
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@addtodblcol}
+% With adds to support dblfoat(s) placement at the page bottom.
+% \begin{macrocode}
+\def\@addtodblcol{%
+ \begingroup
+ \@insertfalse
+ \@setfloattypecounts
+ \@getfpsbit \tw@
+ \ifodd\@tempcnta
+ \@flsetnum \@dbltopnum
+ \ifnum \@dbltopnum>\z@
+ \@tempswafalse
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+ \else
+ \ifnum \@fpstype<\sixt@@n
+ \advance \@dbltoproom \@textmin
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+ \fi
+ \advance \@dbltoproom -\@textmin
+ \fi
+ \fi
+ \if@tempswa
+ \@bitor \@currtype \@dbldeferlist
+ \if@test
+ \else
+ \@bitor \@currtype \@dblbotlist
+ \if@test
+ \else
+ \@tempdima -\ht\@currbox
+ \advance\@tempdima
+ -\ifx \@dbltoplist\@empty \dbltextfloatsep \else
+ \dblfloatsep \fi
+ \global \advance \@dbltoproom \@tempdima
+ \global \advance \@colht \@tempdima
+ \global \advance \@dbltopnum \m@ne
+ \@cons \@dbltoplist \@currbox
+ \@inserttrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@getfpsbit 4\relax
+ \ifodd\@tempcnta
+ \@flsetnum \@dblbotnum
+ \ifnum \@dblbotnum>\z@
+ \@tempswafalse
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+ \else
+ \ifnum \@fpstype<\sixt@@n
+ \advance \@dbltoproom \@textmin
+ \ifdim \@dbltoproom>\ht\@currbox
+ \@tempswatrue
+ \fi
+ \advance \@dbltoproom -\@textmin
+ \fi
+ \fi
+ \if@tempswa
+ \@bitor \@currtype \@dbldeferlist
+ \if@test
+ \else
+ \@tempdima -\ht\@currbox
+ \advance\@tempdima
+ -\ifx \@dblbotlist\@empty \dbltextfloatsep \else
+ \dblfloatsep \fi
+ \global \advance \@dbltoproom \@tempdima
+ \global \advance \@colht \@tempdima
+ \global \advance \@dblbotnum \m@ne
+ \@cons \@dblbotlist \@currbox
+ \@inserttrue
+ \fi
+ \fi
+ \fi
+ \fi
+ \if@insert
+ \else
+ \@cons\@dbldeferlist\@currbox
+ \fi
+ \fi
+ \endgroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@combinedblfloats}
+% Combines outputbox with top and bottom placed dblfloat(s).
+% \begin{macrocode}
+\def\@combinedblfloats{%
+ \ifx \@dbltoplist\@empty \else \@cdblflt \fi
+ \ifx \@dblbotlist\@empty \else \@cdblflb \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@cdblflt}
+% Combines outputbox with top placed dblfloat(s).
+% \begin{macrocode}
+\def\@cdblflt{%
+ \setbox\@tempboxa \vbox{}%
+ \let \@elt \@comdblflelt
+ \@dbltoplist
+ \let \@elt \relax
+ \xdef \@freelist {\@freelist\@dbltoplist}%
+ \global\let \@dbltoplist \@empty
+ \setbox\@outputbox \vbox% to\textheight
+ {%\boxmaxdepth\maxdepth %% probably not needed, CAR
+ \unvbox\@tempboxa\vskip-\dblfloatsep
+ \ifnum \@dbltopnum>\m@ne
+ \dblfigrule
+ \fi
+ \vskip \dbltextfloatsep
+ \unvbox \@outputbox
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@cdblflb}
+% Combines outputbox with bottom placed dblfloat(s).
+% \begin{macrocode}
+\def\@cdblflb{%
+ \setbox\@tempboxa \vbox{}%
+ \let \@elt \@comdblflelt
+ \@dblbotlist
+ \let \@elt \relax
+ \xdef \@freelist {\@freelist\@dblbotlist}%
+ \global\let \@dblbotlist \@empty
+ \setbox\@outputbox \vbox% to\textheight
+ {%\boxmaxdepth\maxdepth %% probably not needed, CAR
+ \unvbox\@outputbox
+ \vskip \dbltextfloatsep
+ \ifnum \@dblbotnum>\m@ne
+ \dblfigrule
+ \fi
+ \unvbox\@tempboxa
+ \vskip -\dblfloatsep
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@doclearpage}
+% With adds to support dblfoat(s) placement at the page bottom.
+% \begin{macrocode}
+\def \@doclearpage {%
+ \ifvoid\footins
+ \ifvbox\@kludgeins
+ {\setbox \@tempboxa \box \@kludgeins}%
+ \fi
+ \setbox\@tempboxa\vsplit\@cclv to\z@ \unvbox\@tempboxa
+ \setbox\@tempboxa\box\@cclv
+ \xdef\@deferlist{\@toplist\@botlist\@deferlist}%
+ \global \let \@toplist \@empty
+ \global \let \@botlist \@empty
+ \global \@colroom \@colht
+ \ifx \@currlist\@empty
+ \else
+ \@latexerr{Float(s) lost}\@ehb
+ \global \let \@currlist \@empty
+ \fi
+ \@makefcolumn\@deferlist
+ \@whilesw\if@fcolmade \fi{\@opcol\@makefcolumn\@deferlist}%
+ \if@twocolumn
+ \if@firstcolumn
+ \xdef\@dbldeferlist{\@dbltoplist\@dblbotlist\@dbldeferlist}%
+ \global \let \@dbltoplist \@empty
+ \global \let \@dblbotlist \@empty
+ \global \@colht \textheight
+ \begingroup
+ \@dblfloatplacement
+ \@makefcolumn\@dbldeferlist
+ \@whilesw\if@fcolmade \fi{\@outputpage
+ \@makefcolumn\@dbldeferlist}%
+ \endgroup
+ \else
+ \vbox{}\clearpage
+ \fi
+ \fi
+ \else
+ \setbox\@cclv\vbox{\box\@cclv\vfil}%
+ \@makecol\@opcol
+ \clearpage
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Makes |\@makecol| current definition copy to |\org@makecol|.
+% \begin{macrocode}
+\global\let\org@makecol\@makecol
+% \end{macrocode}
+%
+% \begin{macro}{\fn@makecol}
+% Redefined macro |\@makecol| which puts footnotes below the bottom floats.
+% \begin{macrocode}
+\gdef \fn@makecol {%
+ \setbox\@outputbox \box\@cclv
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+ \@combinefloats
+ \ifvoid\footins
+ \else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \unvbox \@outputbox
+ \vskip \skip\footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \fi
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \dimen@ \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\dimen@
+ \@textbottom
+ }%
+ \fi
+ \global \maxdepth \@maxdepth
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fnbelowfloat}
+% Switch to put footnotes below the bottom floats.
+% \begin{macrocode}
+\def\fnbelowfloat{\global\let\@makecol\fn@makecol}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\fnunderfloat}
+% Switch to put footnotes under the bottom floats.
+% \begin{macrocode}
+\def\fnunderfloat{\global\let\@makecol\org@makecol}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\set@floatfontsize}
+% Such definition |\baselineskip\f@linespread\baselineskip| removes
+% any glue from the |\baselineskip| in the case |\f@linespread| is
+% not empty. To prevent this |\size@update| is redefined.
+% \begin{macrocode}
+\def\set@floatfontsize#1#2#3{%
+ \@defaultunits\@tempdimb#2pt\relax\@nnil
+ \edef\f@size{\strip@pt\@tempdimb}%
+ \@defaultunits\@tempskipa#3pt\relax\@nnil
+ \edef\f@baselineskip{\the\@tempskipa}%
+ \edef\f@linespread{#1}%
+ \let\baselinestretch\f@linespread
+ \def\size@update{%
+% \end{macrocode}
+% Saving of the |\baselineskip| glue.
+% \begin{macrocode}
+ \baselineskip\f@baselineskip
+ \@tempskipa\baselineskip\relax\baselineskip=1\baselineskip
+ \advance\@tempskipa by-\baselineskip\baselineskip\f@baselineskip
+% \end{macrocode}
+% Removes the |\baselineskip| glue in case |\f@linespread| not empty.
+% \begin{macrocode}
+ \baselineskip\f@linespread\baselineskip
+% \end{macrocode}
+% Restoring of the |\baselineskip| glue.
+% \begin{macrocode}
+ \advance\@tempskipa by\baselineskip\baselineskip\@tempskipa
+ \normalbaselineskip\baselineskip
+ \setbox\strutbox\hbox{%
+ \vrule\@height.7\baselineskip
+ \@depth.3\baselineskip
+ \@width\z@}%
+ \let\size@update\relax
+ }%
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% Simple copy of the previous original |\set@fontsize| definition in |\set@@@fontsize|.
+%
+% \begin{macrocode}
+\let\set@@@fontsize\set@fontsize
+% \end{macrocode}
+%
+%
+% \begin{macro}{\setbaselinefloat}
+% It allows |\baselineskip| to be set to the value with glue.
+% \begin{macrocode}
+\def\setbaselinefloat{\let\set@fontsize\set@floatfontsize}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\setbaselinefixed}
+% It is used to restore macro definition |\set@fontsize| to the
+% original one. It means that |\baselineskip| is set to the value
+% without glue in the case |\baselinestretch| is not empty.
+% \begin{macrocode}
+\def\setbaselinefixed{%
+ \@tempdima=\baselinestretch\p@
+ \edef\baselinestretch{\strip@pt\@tempdima}%
+ \let\set@fontsize\set@@@fontsize
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\output}
+% It is removed from this package as the duplicate of the same
+% definition in kernel since the macro definition change
+% v.1.2c at 1997/11/09 in |ltoutput|.
+% \end{macro}
+%
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale
diff --git a/Master/texmf-dist/source/latex/sttools/sttools.dtx b/Master/texmf-dist/source/latex/sttools/sttools.dtx
new file mode 100644
index 00000000000..fd1e017e55a
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/sttools.dtx
@@ -0,0 +1,106 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files sttools.dtx and sttools.ins
+% and the derived filebases: boundbox.sty, cuted.sty, floatpag.sty,
+% flushend.sty, marginal.sty, midfloat.sty, stabular.sty,
+% stfloats.sty, texsort.sty.
+%
+% Also available from:
+% http://www.vtex.lt/tex/download/macros/
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{sttools.dtx}
+%</driver>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\begin{document}
+ \DocInput{sttools.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{0}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{sttools.dtx}
+% \title{The \textsf{sttools} collection}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{2012.10.17}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% This is collection of various
+% packages historically placed in a bundle and maintained by Sigitas Tolu\v{s}is.
+%
+% \section{Usage}
+%
+% \begin{itemize}
+% \item \textbf{boundbox.sty} -- calculate textbox coordinates on the page;
+% \\\texttt{TODO: remove from bundle};
+% \item \textbf{cuted.sty} -- place some material page width wide at any
+% place on twocolumn page with existing text reformatted under inserted
+% material; \\\texttt{TODO: add optional rules to separate from text};
+% \item \textbf{floatpag.sty} -- set pagestyle for floats page;
+% \item \textbf{flushend.sty} -- balance twocolumn page; \\\texttt{TODO:
+% extend to balance any page};
+% \item \textbf{marginal.sty} -- use enlarged room for marginal inserts;
+% \item \textbf{midfloat.sty} -- insert onecolumn stuff in twocolumn
+% page; \\\texttt{TODO: extend to work on both columns};
+% \item \textbf{stabular.sty} -- use modified tabular environment;
+% \\\texttt{TODO: remove extra stuff and leave only possibility to break
+% on page boundary};
+% \item \textbf{stfloats.sty} -- enable enriched floats output mechanism;
+% \item \textbf{texsort.sty} -- sort numerical values; \\\texttt{TODO:
+% extend (rewrite) to support alphnanumerical values for sorting}.
+% \end{itemize}
+%
+% Just load any of the provided packages in the standard way:
+% |\usepackage{|\meta{package}|}| or
+% |\RequirePackage{|\meta{package}|}|.
+%
+% \medskip
+% To read documentation: |texdoc |\meta{package}.
+%
+% \StopEventually{}
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/sttools/sttools.ins b/Master/texmf-dist/source/latex/sttools/sttools.ins
new file mode 100644
index 00000000000..4b537051fd1
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/sttools.ins
@@ -0,0 +1,57 @@
+%% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% --------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%%
+%% This work consists of the files boundbox.dtx and boundbox.ins
+%% and the derived filebase boundbox.sty.
+%%
+
+\input docstrip.tex
+
+\def\SimplePackage#1{%
+ \generate{\file{#1.sty}{\from{#1.dtx}{package}}}}
+
+\keepsilent
+
+\usedir{tex/latex/sttools}
+
+\preamble
+\endpreamble
+
+\askforoverwritefalse
+\SimplePackage{boundbox}
+\SimplePackage{cuted}
+\SimplePackage{floatpag}
+\SimplePackage{flushend}
+\SimplePackage{midfloat}
+\SimplePackage{marginal}
+\SimplePackage{stabular}
+\SimplePackage{stfloats}
+\SimplePackage{texsort}
+
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the following *}
+\Msg{* file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* All the files with extension `.sty' *}
+\Msg{* *}
+\Msg{* To produce the documentation run the files with extension *}
+\Msg{* '.dtx' through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*************************************************************}
+
+\endbatchfile
diff --git a/Master/texmf-dist/source/latex/sttools/texsort.dtx b/Master/texmf-dist/source/latex/sttools/texsort.dtx
new file mode 100644
index 00000000000..cc21e6147d2
--- /dev/null
+++ b/Master/texmf-dist/source/latex/sttools/texsort.dtx
@@ -0,0 +1,556 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+% ---------------------------------------------------------------------------
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Sigitas Tolu\v{s}is.
+%
+% This work consists of the files texsort.dtx and texsort.ins
+% and the derived filebase texsort.sty.
+%
+% Also available from:
+% http://www.vtex.lt/tex/download/macros/
+%
+% \fi
+%
+% \iffalse
+%<*driver>
+\ProvidesFile{texsort.dtx}
+%</driver>
+%<*package>
+%% Copyright (C) 2000-2012 by Sigitas Tolu\v{s}is <sigitas@vtex.lt>
+%% VTeX Ltd., Akademijos 4, Vilnius, Lithuania
+%% http://www.vtex.lt/tex/download/macros/
+%% --------------------------------------------------------------------------
+%% 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.
+%%
+%% PURPOSE: Sort/compress numerical lists
+%%
+%</package>
+%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+%<package>\ProvidesPackage{texsort}
+%<*package>
+ [2012/05/29 v1.1 Sort/compress alphanumerical list]
+%</package>
+%
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{texsort}[2012/05/29]
+%%\EnableCrossrefs
+%%\CodelineIndex
+%%\RecordChanges
+\begin{document}
+ \DocInput{texsort.dtx}
+ %%\PrintChanges
+ %%\PrintIndex
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{629}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+%
+% \changes{v0.1a}{2000/06/06}{Created alfa version}
+% \changes{v1.0}{2000/06/08}{Added compression}
+% \changes{v1.1}{2012/05/29}{Converted to DTX file}
+%
+% \DoNotIndex{\newcommand,\newenvironment}
+%
+% \providecommand*{\url}{\texttt}
+% \GetFileInfo{texsort.dtx}
+% \title{The \textsf{texsort} package}
+% \author{Sigitas Tolu\v{s}is \\ \url{sigitas@vtex.lt}}
+% \date{\fileversion~from \filedate}
+%
+% \maketitle
+%
+% \section{Introduction}
+%
+% Purpose: sort/compress numerical lists.
+%
+% \section{Usage}
+%
+% \DescribeMacro{\sortlist}
+%
+% \leftline{Sort list:}
+%
+% \verb|\sortlist{1,5,20,6,23,2,1,4000,4}\to{mylist}\sep{,}|
+%
+% \medskip
+% \leftline{Result:}
+%
+% \sortlist{1,5,20,6,23,2,1,4000,4}\to{mylist}\sep{,}
+% \verb|\mylist->|\mylist
+%
+% \bigskip
+% \DescribeMacro{\compresslist}
+%
+% \leftline{Compress list:}
+%
+% \verb|\compresslist{\mylist}\to{clist}\sep{,}{-}|
+%
+% \medskip
+% \leftline{Result:}
+% \compresslist{\mylist}\to{clist}\sep{,}{-}%
+% \verb|\clist->|\clist
+%
+% \StopEventually{}
+%
+% \section{Implementation}
+%
+% \iffalse
+%<*package>
+% \fi
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{texsort}[2012/05/29]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcount\t@mp@r@a
+\newcount\t@mp@r@b
+\newcount\t@mp@r@c
+% \end{macrocode}
+%
+% \begin{macro}{\initarray}
+% \marg{list}\marg{array}
+%
+% \medskip
+% Converts \meta{list} to \meta{array}.
+% \medskip
+% \begin{macrocode}
+\def\initarray#1#2{%
+ \bgroup
+ \@tempcnta=\z@
+ \@for\@@refb:=#2\do{%
+ \advance\@tempcnta by\@ne
+ \bgroup
+ \setbox\z@\hbox{%
+ \expandafter\global\expandafter\t@mp@r@a\expandafter\add@zero\@@refb\relax
+ }%
+ \ifdim\wd0>\z@\relax
+ \@latex@warning{Not number \@@refb!}%
+ \fi
+ \expandafter\edef\csname @a@\endcsname{\expandafter\xdef\expandafter
+ \noexpand\csname#1@\the\@tempcnta\endcsname{\the\t@mp@r@a}}\@a@
+ \egroup
+ }%
+ \expandafter\xdef\csname #1@lenght\endcsname{\the\@tempcnta}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\outarray}
+% \marg{array}\marg{sep}
+%
+% \medskip
+% Outputs \meta{array} elements separated by \meta{sep}.
+% \medskip
+% \begin{macrocode}
+\def\outarray#1\sep#2{%
+ \bgroup
+ \@tempcnta=\z@\relax
+ \@tempcntb=\getarraylenght{#1}%
+ \loop
+ \ifnum\@tempcnta<\@tempcntb
+ \advance\@tempcnta by\@ne\relax
+ \ifnum\@tempcnta>\@ne\relax#2\fi
+ \csname#1@\the\@tempcnta\endcsname
+ \repeat
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\add@zero}
+% \marg{arg}
+%
+% \medskip
+% Adds 0 before \meta{arg}.
+% \medskip
+% \begin{macrocode}
+\def\add@zero#1{0#1}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\getarrayitem}
+% \marg{array}\marg{index}\verb|\to|\marg{command}
+%
+% \medskip
+% Gets \meta{array} element by \meta{index} to \verb|\|\meta{command}.
+% \medskip
+% \begin{macrocode}
+\def\getarrayitem#1#2\to#3{\expandafter\xdef\csname#3\endcsname{\csname#1@#2\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\setarrayitem}
+% \marg{array}\marg{index}\marg{value}
+%
+% \medskip
+% Sets \meta{array} element by \meta{index} to \meta{value}.
+% \medskip
+% \begin{macrocode}
+\def\setarrayitem#1#2#3{%
+ \bgroup
+ \setbox0\hbox{%
+ \expandafter\global\expandafter\t@mp@r@a\expandafter\add@zero#3\relax
+ }%
+ \ifdim\wd0>\z@\relax
+ \@latex@warning{Not number #3!}%
+ \fi
+ \expandafter\xdef\csname#1@#2\endcsname{\the\t@mp@r@a}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\getarraylenght}
+% \marg{array}
+%
+% \medskip
+% Gets \meta{array} elements count.
+% \medskip
+% \begin{macrocode}
+\def\getarraylenght#1{\@ifundefined{#1@lenght}{0}{\csname #1@lenght\endcsname}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\setarraylenght}
+% \marg{array}\marg{value}
+%
+% \medskip
+% Sets \meta{array} elements count to \meta{value}.
+% \medskip
+% \begin{macrocode}
+\def\setarraylenght#1#2{\expandafter\xdef\csname #1@lenght\endcsname{#2}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\upheap}
+% \marg{array}\marg{index}
+%
+% \medskip
+% Internal macro of sort algorithm.
+% \medskip
+% \begin{macrocode}
+\def\upheap#1#2{%
+ \bgroup
+ \getarrayitem{#1}{#2}\to{vara}%
+ \@namedef{#1@0}{\maxdimen}%
+ \@tempcntb=#2\relax
+ \loop
+ \@tempcnta=\@tempcntb
+ \divide\@tempcnta by2\getarrayitem{#1}{\the\@tempcnta}\to{varb}%
+ \ifnum\varb>\vara\relax
+ \else
+ \getarrayitem{#1}{\the\@tempcnta}\to{varb}%
+ \setarrayitem{#1}{\the\@tempcntb}{\varb}%
+ \divide\@tempcntb by2\relax
+ \repeat
+ \setarrayitem{#1}{\the\@tempcntb}{\vara}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\insertheapelem}
+% \marg{array}\marg{value}
+%
+% \medskip
+% Internal macro of sort algorithm.
+% \medskip
+% \begin{macrocode}
+\def\insertheapelem#1#2{%
+ \bgroup
+ \@tempcnta=\getarraylenght{#1}\relax
+ \advance\@tempcnta by1\relax
+ \setarraylenght{#1}{\the\@tempcnta}\relax
+ \setarrayitem{#1}{\the\@tempcnta}{#2}%
+ \upheap{#1}{\the\@tempcnta}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\newcount\@tempcntd
+% \end{macrocode}
+%
+% \begin{macro}{\downheap}
+% \marg{array}\marg{index}
+%
+% \medskip
+% Internal macro of sort algorithm.
+% \medskip
+% \begin{macrocode}
+\def\downheap#1#2{%
+ \bgroup
+ \getarrayitem{#1}{#2}\to{vara}%
+ \@tempcntb=\getarraylenght{#1}%
+ \t@mp@r@c=\@tempcntb\relax
+ \divide\@tempcntb by2\relax
+ \t@mp@r@b=\@tempcntb\relax
+ \@tempcntb=#2\relax
+ \ifnum\@tempcntb>\t@mp@r@b\relax
+ \else
+ \loop
+ \@tempcnta=\@tempcntb \advance\@tempcnta by\@tempcntb\relax
+ \@tempcntd=\@tempcnta \advance\@tempcntd by1\relax
+ \ifnum\@tempcnta<\t@mp@r@c\relax
+ \getarrayitem{#1}{\the\@tempcnta}\to{temp@@a}%
+ \getarrayitem{#1}{\the\@tempcntd}\to{temp@@b}%
+ \ifnum\temp@@a<\temp@@b\relax
+ \@tempcnta=\@tempcntd
+ \fi
+ \fi
+ \getarrayitem{#1}{\the\@tempcnta}\to{temp@@a}%
+ \ifnum\vara>\temp@@a\relax
+ \t@mp@r@b=-1\relax
+ \else
+ \getarrayitem{#1}{\the\@tempcnta}\to{temp@@a}%
+ \setarrayitem{#1}{\the\@tempcntb}{\temp@@a}%
+ \@tempcntb=\@tempcnta
+ \fi
+ \ifnum\@tempcntb>\t@mp@r@b\relax
+ \else
+ \repeat
+ \fi
+ \setarrayitem{#1}{\the\@tempcntb}{\vara}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+
+% \end{macrocode}
+%
+% \begin{macro}{\removetop}
+% \marg{array}\verb|\to|\marg{command}
+%
+% \medskip
+% Internal macro of sort algorithm.
+% \medskip
+% \begin{macrocode}
+\def\removetop#1\to#2{%
+ \bgroup
+ \getarrayitem{#1}{1}\to{temp@@c}%
+ \expandafter\xdef\csname #2\endcsname{\temp@@c}%
+ \@tempcnta=\getarraylenght{#1}%
+ \getarrayitem{#1}{\the\@tempcnta}\to{temp@@a}%
+ \setarrayitem{#1}{1}{\temp@@a}%
+ \setarrayitem{#1}{\the\@tempcnta}{}%
+ \advance\@tempcnta by-1\relax
+ \setarraylenght{#1}{\the\@tempcnta}%
+ \downheap{#1}{1}%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\g@addto@macrobeg}
+% \marg{macro}\marg{definition}
+%
+% \medskip
+% Adds some more \meta{definition} to \meta{macro} begining.
+% \medskip
+% \begin{macrocode}
+\long\def\g@addto@macrobeg#1#2{%
+ \begingroup
+ \def\@a@{#2}%
+ \toks@\expandafter\expandafter\expandafter{\expandafter\@a@#1}%
+ \xdef#1{\the\toks@}%
+ \endgroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\sortlistarray}
+% \marg{array}\marg{sorted array}
+%
+% \medskip
+% Sorts \meta{array} and puts result to \meta{sorted array}.
+% \begin{macrocode}
+\def\sortlistarray#1\to#2{%
+ \bgroup
+ \@for\@@refb:=#1\do{%
+ \insertheapelem{@tempa@}{\@@refb}%
+ }%
+ \@tempcntb=\getarraylenght{@tempa@}%
+ \setarraylenght{#2}{\the\@tempcntb}%
+ \@for\@@refb:=#1\do{%
+ \removetop{@tempa@}\to{aka}%
+ \setarrayitem{#2}{\the\@tempcntb}{\aka}%
+ \advance\@tempcntb by-1\relax
+ }%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\sortlist}
+% \marg{list}\verb|\to|\marg{macro}\verb|\sep|\marg{sep}
+%
+% \medskip
+% Sorts \meta{list} and puts elements separated by \meta{sep} to \meta{macro}.
+% \medskip
+% \begin{macrocode}
+\def\sortlist#1\to#2\sep#3{%
+ \bgroup
+ \@for\@@refb:=#1\do{%
+ \insertheapelem{@tempa@}{\@@refb}%
+ }%
+ \@tempcntb=\getarraylenght{@tempa@}%
+ \expandafter\def\csname#2\endcsname{}%
+ \expandafter\def\expandafter\@a@\expandafter{\csname#2\endcsname}%
+ \@for\@@refb:=#1\do{%
+ \removetop{@tempa@}\to{aka}%
+ \advance\@tempcntb by-1\relax
+ \expandafter\expandafter\expandafter
+ \g@addto@macrobeg\expandafter\@a@\expandafter{\aka}%
+ \ifnum\@tempcntb>0\relax
+ \expandafter\expandafter\expandafter
+ \g@addto@macrobeg\expandafter\@a@\expandafter{#3}%
+ \fi
+ }%
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\compresslist}
+% \marg{list}\verb|\to|\marg{macro}\verb|\sep|\marg{single}\marg{multi}
+%
+% \medskip
+% Compress \meta{list} and puts result to \marg{macro};
+% single elements separated by \meta{single}, multi by \meta{multi}.
+% \medskip
+% \begin{macrocode}
+\def\compresslist#1\to#2\sep#3#4{%
+ \bgroup
+ \expandafter\def\csname#2\endcsname{}%
+ \expandafter\def\expandafter\@a@\expandafter{\csname#2\endcsname}%
+ \t@mp@r@a=-1\relax
+ \@tempcnta=-2\relax
+ \expandafter\@for\expandafter\@@refb\expandafter:\expandafter=#1\do{%
+ \ifnum\t@mp@r@a=-1\relax
+ \t@mp@r@a=\@@refb\relax
+ \t@mp@r@b=\@@refb\relax
+ \t@mp@r@c=\@@refb\relax
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@a}%
+ \else
+ \t@mp@r@c=\@@refb\relax
+ \ifnum\t@mp@r@c=\t@mp@r@a\relax
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#3}%
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@c}%
+ \t@mp@r@b=\t@mp@r@c\relax
+ \else
+ \@tempcnta=\t@mp@r@b\relax
+ \advance\@tempcnta by1\relax
+ \ifnum\@tempcnta=\t@mp@r@c\relax
+ \t@mp@r@b=\t@mp@r@c\relax
+ \else
+ \@tempcnta=\t@mp@r@a\relax
+ \advance\@tempcnta by-\t@mp@r@b\relax
+ \ifnum\@tempcnta<-1\relax
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#4}%
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@b}%
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#3}%
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@c}%
+ \else
+ \ifnum\t@mp@r@a<\t@mp@r@b
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#3}%
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@b}%
+ \fi
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#3}%
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@c}%
+ \fi
+ \t@mp@r@a=\t@mp@r@c\relax
+ \t@mp@r@b=\t@mp@r@c\relax
+ \fi
+ \fi
+ \fi
+ }%
+ \ifnum\t@mp@r@a<\t@mp@r@c\relax
+ \advance\t@mp@r@a by-\t@mp@r@c\relax
+ \ifnum\t@mp@r@a<-1\relax
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#4}%
+ \else
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{#3}%
+ \fi
+ \expandafter\expandafter\expandafter
+ \g@addto@macro\expandafter\@a@\expandafter{\the\t@mp@r@c}%
+ \fi
+ \egroup
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%\endinput
+% \end{macrocode}
+%
+% \iffalse
+%</package>
+% \fi
+%
+% \Finale \ No newline at end of file