summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/oberdiek
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-12-11 01:07:09 +0000
committerKarl Berry <karl@freefriends.org>2009-12-11 01:07:09 +0000
commitc6ddbfa56ffeb39f08fef67b1f9fc97778cd70bd (patch)
treec3312443c40388c8eeb3f515454f9a2e666c15de /Master/texmf-dist/source/latex/oberdiek
parent01aade3322bbb50b565fbb94ed1bade7a0726478 (diff)
oberdiek update (10dec09)
git-svn-id: svn://tug.org/texlive/trunk@16352 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/oberdiek')
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx53
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/atveryend.dtx1170
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/bookmark.dtx63
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx6
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx916
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx47
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/hypdoc.dtx25
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx173
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/luatex.dtx40
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/oberdiek.ins7
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/oberdiek.tex80
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx1044
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx1031
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/resizegather.dtx936
-rw-r--r--Master/texmf-dist/source/latex/oberdiek/zref.dtx144
15 files changed, 5547 insertions, 188 deletions
diff --git a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx
index 05753a8c984..823cd77bf9e 100644
--- a/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/atbegshi.dtx
@@ -1,6 +1,7 @@
% \iffalse meta-comment
%
-% Copyright (C) 2007, 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+% Copyright (C) 2007, 2008, 2009 by
+% Heiko Oberdiek <oberdiek@uni-freiburg.de>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -73,7 +74,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: atbegshi 2008/07/31 v1.9 At begin shipout hook (HO)}
+\Msg{* Package: atbegshi 2009/12/02 v1.10 At begin shipout hook (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -84,7 +85,8 @@
This is a generated file.
-Copyright (C) 2007, 2008 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+Copyright (C) 2007, 2008, 2009 by
+ Heiko Oberdiek <oberdiek@uni-freiburg.de>
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -148,7 +150,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{atbegshi.drv}%
- [2008/07/31 v1.9 At begin shipout hook (HO)]%
+ [2009/12/02 v1.10 At begin shipout hook (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -157,7 +159,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1413}
+% \CheckSum{1416}
%
% \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
@@ -178,7 +180,7 @@ and the derived files
% \GetFileInfo{atbegshi.drv}
%
% \title{The \xpackage{atbegshi} package}
-% \date{2008/07/31 v1.9}
+% \date{2009/12/02 v1.10}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -301,6 +303,11 @@ and the derived files
% See \cs{AtBeginShipoutUpperLeft}. The difference is that the material
% is put in the foreground.
%
+% \begin{declcs}{AtBeginShipoutOriginalShipout} \M{box}
+% \end{declcs}
+% It stores the meaning of \cs{shipout} at the time this package
+% is loaded.
+%
% \subsection{Examples}
%
% \subsubsection{Example: circle in background}
@@ -849,7 +856,7 @@ The last page.
\fi
\expandafter\x\csname ver@atbegshi.sty\endcsname
\ProvidesPackage{atbegshi}%
- [2008/07/31 v1.9 At begin shipout hook (HO)]
+ [2009/12/02 v1.10 At begin shipout hook (HO)]
% \end{macrocode}
%
% \subsection{Catcodes}
@@ -1004,7 +1011,7 @@ X \endgroup
\else
\AtBegShi@First
\let\protect\AtBegShi@OrgProtect
- \AtBegShi@OrgShipout\box\AtBeginShipoutBox
+ \AtBeginShipoutOriginalShipout\box\AtBeginShipoutBox
\fi
\fi
}
@@ -1143,8 +1150,8 @@ X \endgroup
\AtBegShi@CheckDefinable\AtBeginShipoutInit
\def\AtBeginShipoutInit{%
\csname newbox\endcsname\AtBeginShipoutBox
- \AtBegShi@CheckDefinable\AtBegShi@OrgShipout
- \global\let\AtBegShi@OrgShipout\shipout
+ \AtBegShi@CheckDefinable\AtBeginShipoutOriginalShipout
+ \global\let\AtBeginShipoutOriginalShipout\shipout
\global\let\shipout\AtBegShi@Shipout
\gdef\AtBeginShipoutInit{}%
}
@@ -1318,8 +1325,8 @@ X \endgroup
\let\AtBegShi@found\relax
\ifx\shipout\AtBegShi@Crop@shipout
\def\AtBegShi@found{\shipout}%
- \else\ifx\AtBegShi@OrgShipout\AtBegShi@Crop@shipout
- \def\AtBegShi@found{\AtBegShi@OrgShipout}%
+ \else\ifx\AtBeginShipoutOriginalShipout\AtBegShi@Crop@shipout
+ \def\AtBegShi@found{\AtBeginShipoutOriginalShipout}%
\else\ifx\@EveryShipout@Org@Shipout\AtBegShi@Crop@shipout
\def\AtBegShi@found{\@EveryShipout@Org@Shipout}%
\else\ifx\GPTorg@shipout\AtBegShi@Crop@shipout
@@ -1399,8 +1406,8 @@ X \endgroup
\let\AtBegShi@found\relax
\ifx\shipout\AtBegShi@Everyshi@shipout
\def\AtBegShi@found{\shipout}%
- \else\ifx\AtBegShi@OrgShipout\AtBegShi@Everyshi@shipout
- \def\AtBegShi@found{\AtBegShi@OrgShipout}%
+ \else\ifx\AtBeginShipoutOriginalShipout\AtBegShi@Everyshi@shipout
+ \def\AtBegShi@found{\AtBeginShipoutOriginalShipout}%
\else\ifx\CROP@shipout\AtBegShi@Everyshi@shipout
\def\AtBegShi@found{\CROP@shipout}%
\else\ifx\GPTorg@shipout\AtBegShi@Everyshi@shipout
@@ -1498,8 +1505,8 @@ X \endgroup
\let\AtBegShi@found\relax
\ifx\shipout\AtBegShi@Memoir@shipout
\def\AtBegShi@found{\shipout}%
- \else\ifx\AtBegShi@OrgShipout\AtBegShi@Memoir@shipout
- \def\AtBegShi@found{\AtBegShi@OrgShipout}%
+ \else\ifx\AtBeginShipoutOriginalShipout\AtBegShi@Memoir@shipout
+ \def\AtBegShi@found{\AtBeginShipoutOriginalShipout}%
\else\ifx\CROP@shipout\AtBegShi@Memoir@shipout
\def\AtBegShi@found{\CROP@shipout}%
\else\ifx\GPTorg@shipout\AtBegShi@Memoir@shipout
@@ -1653,7 +1660,7 @@ X \endgroup
%<*test2>
\input atbegshi.sty\relax
\def\msg#{\immediate\write16}
-\msg{File: atbegshi-test2.tex 2008/07/31 v1.9 Test file for plain-TeX}
+\msg{File: atbegshi-test2.tex 2009/12/02 v1.10 Test file for plain-TeX}
\def\testmsg#1#2{%
\msg{}%
\msg{*** Test with box (#1), expected page output [#2]}% hash-ok
@@ -1750,7 +1757,7 @@ Hello World
% \begin{macrocode}
%<*test3>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{atbegshi-test3.tex}[2008/07/31 v1.9 Test file for LaTeX]
+\ProvidesFile{atbegshi-test3.tex}[2009/12/02 v1.10 Test file for LaTeX]
\RequirePackage{color}
\pagecolor{yellow}
\documentclass[a5paper,showtrims]{memoir}
@@ -1774,6 +1781,10 @@ Hello World
}
\usepackage{eso-pic}
\makeatletter
+\@ifundefined{@EveryShipout@Init}{%
+ \typeout{Test skipped}%
+ \@@end
+}{}
\@EveryShipout@Init
\let\@EveryShipout@Init\relax
\makeatother
@@ -2041,6 +2052,12 @@ Hello World
% \item
% No changes in package code.
% \end{Version}
+% \begin{Version}{2009/12/02 v1.10}
+% \item
+% \cs{AtBeginShipoutOriginalShipout} added.
+% \item
+% Test file fixed.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx b/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx
new file mode 100644
index 00000000000..a08a5bd6e10
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/atveryend.dtx
@@ -0,0 +1,1170 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Heiko Oberdiek.
+%
+% This work consists of the main source file atveryend.dtx
+% and the derived files
+% atveryend.sty, atveryend.pdf, atveryend.ins, atveryend.drv,
+% atveryend-test1.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/atveryend.dtx
+% CTAN:macros/latex/contrib/oberdiek/atveryend.pdf
+%
+% Unpacking:
+% (a) If atveryend.ins is present:
+% tex atveryend.ins
+% (b) Without atveryend.ins:
+% tex atveryend.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{atveryend.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If atveryend.drv is present:
+% latex atveryend.drv
+% (b) Without atveryend.drv:
+% latex atveryend.dtx; ...
+% The class ltxdoc loads the configuration file ltxdoc.cfg
+% if available. Here you can specify further options, e.g.
+% use A4 as paper format:
+% \PassOptionsToClass{a4paper}{article}
+%
+% Programm calls to get the documentation (example):
+% pdflatex atveryend.dtx
+% makeindex -s gind.ist atveryend.idx
+% pdflatex atveryend.dtx
+% makeindex -s gind.ist atveryend.idx
+% pdflatex atveryend.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/atveryend.sty
+% TDS:doc/latex/oberdiek/atveryend.pdf
+% TDS:doc/latex/oberdiek/test/atveryend-test1.tex
+% TDS:source/latex/oberdiek/atveryend.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: atveryend 2009/12/09 v1.2 Hooks at very end of document (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+This Current Maintainer of this work is Heiko Oberdiek.
+
+This work consists of the main source file atveryend.dtx
+and the derived files
+ atveryend.sty, atveryend.pdf, atveryend.ins, atveryend.drv,
+ atveryend-test1.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{atveryend.ins}{\from{atveryend.dtx}{install}}%
+ \file{atveryend.drv}{\from{atveryend.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{atveryend.sty}{\from{atveryend.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{atveryend-test1.tex}{\from{atveryend.dtx}{test1}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* atveryend.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `atveryend.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{atveryend.drv}%
+ [2009/12/09 v1.2 Hooks at very end of document (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\begin{document}
+ \DocInput{atveryend.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{791}
+%
+% \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 \~}
+%
+% \GetFileInfo{atveryend.drv}
+%
+% \title{The \xpackage{atveryend} package}
+% \date{2009/12/09 v1.2}
+% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This \LaTeX\ package provides two hooks for \verb|\end{document}|
+% that are executed after the hook of \cs{AtEndDocument}.
+% \cs{AfterLastShipout} can be used for code that is to be executed
+% right after the last \cs{clearpage} before the \xext{.aux} file
+% is closed. \cs{AtVeryEndDocument} is used for code after closing
+% and final reading of the \xext{.aux} file.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% There are packages (e.g. \xpackage{hyperref} \cite{hyperref},
+% \xpackage{lastpage} \cite{lastpage})
+% that want to call code after the typesetting is done, for example
+% to remember the last page number. \LaTeX\ provides the hook
+% \cs{AtEndDocument} (\xpackage{clsguide} \cite{clsguide}).
+% There are packages that use this hook to do their job for
+% typesetting pages (e.g. \xpackage{endfloat} emits the floats here
+% \cite{endfloat}).
+% Also a user might provide additional code in \cs{AtEndDocument}.
+% Therefore packages have to call \clearpage in \cs{AtEndDocument}
+% to get after the last shipout page. But this is not too reliable,
+% because the right timing is important between packages that want
+% or have to do things before the last page is output and packages
+% that only work properly if they can reach the point after the
+% last shipout.
+%
+% Therefore the task of this package is to provide two hooks
+% that are called after the last page is shipped out:
+% \begin{declcs}{AfterLastShipout} \M{code}
+% \end{declcs}
+% The code is called after the final \cs{clearpage} of \cs{enddocument}
+% before the main \xext{.aux} file is closed. This is the right place
+% to remember the last page in the \xext{.aux} file, for instance.
+%
+% \begin{declcs}{AtVeryEndDocument} \M{code}
+% \end{declcs}
+% The code is called after the \xext{.aux} file is closed and read in again.
+% It is the place for final checks, rerun hints, final messages.
+%
+% \subsection{Related work}
+%
+% \begin{description}
+% \item[Package \xpackage{scrfile}:]
+% Markus Kohm has written package \xpackage{scrlfile}
+% (part of KOMA-Script \cite{koma})
+% that provides
+% hooks \cs{BeforeClosingMainAux} and after \cs{AfterReadingMainAux}.
+% They have the same function as the hooks of this package. In fact
+% this package uses them, if they are available.
+% \item[Class \xclass{revtex4-1}:]
+% This class calls \cs{clear@document} in \cs{enddocument}
+% that wraps the final call of \cs{clearpage}.
+% Thus it can be used as hook to call stuff after that \cs{clearpage}.
+% This is also done by this package.
+% \item[Package \xpackage{etoolbox}:]
+% It provides \cs{AfterEndDocument}, a hook right before
+% \cs{deadcycles} or \cs{@@end} \cite{etoolbox}.
+% \end{description}
+% This package tries to combine as many approaches as possible:
+% \begin{itemize}
+% \item It looks for a known \cs{enddocument} and redefines it.
+% \item Hooks that are provided by others are used (package
+% \xpackage{scrlfile} or class \xclass{revtex4-1}.
+% \item It redefines \cs{@checkend} and \cs{@dofilelist} to insert
+% the hooks similar to package{scrlfile}.
+% \item The hook execution is wrapped in a macro that
+% is redefined by its first call to prevent calling the hook
+% more than once.
+% \end{itemize}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\let\expandafter\x\csname ver@atveryend.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \else
+ \catcode35 6 % #
+ \expandafter\ifx\csname PackageInfo\endcsname\relax
+ \def\x#1#2{%
+ \immediate\write-1{Package #1 Info: #2.}%
+ }%
+ \else
+ \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
+ \fi
+ \x{atveryend}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode91 12 % [
+ \catcode93 12 % ]
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1#2#3[#4]{\endgroup
+ \immediate\write-1{Package: #3 #4}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@atveryend.sty\endcsname
+\ProvidesPackage{atveryend}%
+ [2009/12/09 v1.2 Hooks at very end of document (HO)]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname AtVeryEnd@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\AtVeryEnd@AtEnd{%
+ \AtVeryEnd@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{9}{10}% (tab)
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{96}{12}% `
+% \end{macrocode}
+%
+% \subsection{Hooks}
+%
+% \begin{macro}{\AtVeryEnd@AfterLastShipoutHook}
+% \begin{macrocode}
+\let\AtVeryEnd@AfterLastShipoutHook\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@AtVeryEndDocumentHook}
+% \begin{macrocode}
+\let\AtVeryEnd@AtVeryEndDocumentHook\@empty
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AfterLastShipout}
+% \begin{macrocode}
+\newcommand*{\AfterLastShipout}{%
+ \g@addto@macro\AtVeryEnd@AfterLastShipoutHook
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEndDocument}
+% \begin{macrocode}
+\newcommand*{\AtVeryEndDocument}{%
+ \g@addto@macro\AtVeryEnd@AtVeryEndDocumentHook
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Call@AfterLastShipout}
+% \begin{macrocode}
+\newcommand*{\Call@AfterLastShipout}{%
+ \let\AfterLastShipout\@firstofone
+ \ifx\AtVeryEnd@AfterLastShipoutHook\@empty
+ \PackageInfo{atveryend}{Empty hook `AfterLastShipout'}%
+ \else
+ \PackageInfo{atveryend}{Executing hook `AfterLastShipout'}%
+ \AtVeryEnd@AfterLastShipoutHook
+ \fi
+ \global\let\AtVeryEnd@AfterLastShipoutHook\@undefined
+ \global\let\Call@AfterLastShipout\relax
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\Call@AtVeryEndDocument}
+% \begin{macrocode}
+\newcommand*{\Call@AtVeryEndDocument}{%
+ \let\AtVeryEndDocument\@firstofone
+ \ifx\AtVeryEnd@AtVeryEndDocumentHook\@empty
+ \PackageInfo{atveryend}{Empty hook `AtVeryEndDocument'}%
+ \else
+ \PackageInfo{atveryend}{Executing hook `AtVeryEndDocument'}%
+ \AtVeryEnd@AtVeryEndDocumentHook
+ \fi
+ \global\let\AtVeryEnd@AtVeryEndDocumentHook\@undefined
+ \global\let\Call@AtVeryEndDocument\relax
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Redefining \cs{enddocument}}
+%
+% This approach looks for known versions of \cs{enddocument}
+% and redefines it. Class \xclass{seminar}
+% and package \xpackage{slidesec} are not checked, because
+% there would be too much combinations to check.
+%
+% \subsubsection{\LaTeX\ kernel}
+%
+% \begin{macro}{\AtVeryEnd@test@standard}
+% \begin{macrocode}
+\def\AtVeryEnd@test@standard{%
+ \let\AtEndDocument\@firstofone
+ \@enddocumenthook
+ \@checkend{document}%
+ \clearpage
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+ \@tempswafalse
+ \makeatletter
+ \input\jobname.aux %
+ \fi
+ \@dofilelist
+ \ifdim \font@submax >\fontsubfuzz\relax
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
+ \@defaultsubs
+ \@refundefined
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed. %
+ Rerun to get cross-references right}%
+ \fi
+ \else
+ \@multiplelabels
+ \fi
+ \fi
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@enddocument@standard}
+% \begin{macrocode}
+\def\AtVeryEnd@enddocument@standard{%
+ \let\AtEndDocument\@firstofone
+ \@enddocumenthook
+ \@checkend{document}%
+ \clearpage
+ \Call@AfterLastShipout
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+ \@tempswafalse
+ \makeatletter
+ \input\jobname.aux %
+ \fi
+ \Call@AtVeryEndDocument
+ \@dofilelist
+ \ifdim \font@submax >\fontsubfuzz\relax
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
+ \@defaultsubs
+ \@refundefined
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed. %
+ Rerun to get cross-references right}%
+ \fi
+ \else
+ \@multiplelabels
+ \fi
+ \fi
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Package \xpackage{booklet}, file \xpackage{2up.tex}}
+%
+% \begin{macro}{\AtVeryEnd@test@booklet}
+% \begin{macrocode}
+\expandafter\def\expandafter\AtVeryEnd@test@booklet\expandafter{%
+ \expandafter\twoupclearpage
+ \AtVeryEnd@test@standard
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@enddocument@booklet}
+% \begin{macrocode}
+\expandafter\def\expandafter\AtVeryEnd@enddocument@booklet\expandafter{%
+ \expandafter\twoclearpage
+ \AtVeryEnd@enddocument@standard
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Class \xclass{dinbrief}}
+%
+% \begin{macro}{\AtVeryEnd@test@dinbrief}
+% \begin{macrocode}
+\def\AtVeryEnd@test@dinbrief{%
+ \@checkend{document} %
+ \newpage
+ \begingroup
+ \if@filesw
+ \ifnum\c@labelgen>0 %
+ \immediate\closeout\@mainlbl
+ \makeatletter
+ \input \jobname@lbl\relax
+ \clearpage
+ \fi
+ \immediate\closeout\@mainaux
+ \fi
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@enddocument@dinbrief}
+% \begin{macrocode}
+\def\AtVeryEnd@enddocument@dinbrief{%
+ \@checkend{document}%
+ \newpage
+ \Call@AfterLastShipout
+ \begingroup
+ \if@filesw
+ \ifnum\c@labelgen>\z@
+ \immediate\closeout\@mainlbl
+ \makeatletter
+ \input \jobname@lbl\relax
+ \clearpage
+ \fi
+ \immediate\closeout\@mainaux
+ \fi
+ \Call@AtVeryEndDocument
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Class \xclass{combine}}
+%
+% \begin{macro}{\AtVeryEnd@test@combine}
+% \begin{macrocode}
+\def\AtVeryEnd@test@combine{%
+ \@enddocumenthook
+ \@checkend{document}%
+ \clearpage
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \immediate\closeout\@partaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+ \@tempswafalse
+ \makeatletter \input\c@lmainauxfile %% change here
+ \fi
+ \c@lenddoca %% a replacement
+ \@refundefined
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@enddocument@combine}
+% \begin{macrocode}
+\def\AtVeryEnd@enddocument@combine{%
+ \@enddocumenthook
+ \@checkend{document}%
+ \clearpage
+ \Call@AfterLastShipout
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \immediate\closeout\@partaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+ \@tempswafalse
+ \makeatletter \input\c@lmainauxfile %% change here
+ \fi
+ \Call@AtVeryEndDocument
+ \c@lenddoca %% a replacement
+ \@refundefined
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Class \xpackage{jpsj2}}
+%
+% \begin{macro}{\AtVeryEnd@test@jpsj}
+% \begin{macrocode}
+\def\AtVeryEnd@test@jpsj{%
+ \if@lastpagebalancing
+ \global\let\@outputdblcol=\balancing@outputdblcol
+ \fi
+ \@checkend{document}%
+ \clearpage
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \def\global\@namedef##1##2{}%
+ \def\newlabel{\@testdef r}%
+ \def\bibcite{\@testdef b}%
+ \@tempswafalse
+ \makeatletter
+ \input \jobname.aux %
+ \if@tempswa
+ \@warning{%
+ Label(s) may have changed. %
+ Rerun to get cross-references right%
+ }%
+ \fi
+ \fi
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@enddocument@jpsj}
+% \begin{macrocode}
+\def\AtVeryEnd@enddocument@jpsj{%
+ \if@lastpagebalancing
+ \global\let\@outputdblcol=\balancing@outputdblcol
+ \fi
+ \@checkend{document}%
+ \clearpage
+ \Call@AfterLastShipout
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \def\global\@namedef##1##2{}%
+ \def\newlabel{\@testdef r}%
+ \def\bibcite{\@testdef b}%
+ \@tempswafalse
+ \makeatletter
+ \input \jobname.aux %
+ \if@tempswa
+ \@warning{%
+ Label(s) may have changed. %
+ Rerun to get cross-references right%
+ }%
+ \fi
+ \fi
+ \Call@AtVeryEndDocument
+ \endgroup
+ \deadcycles\z@
+ \@@end
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Testing and redefining}
+%
+% \begin{macro}{\AtVeryEnd@Test}
+% \begin{macrocode}
+\def\AtVeryEnd@Test#1#2{%
+ \expandafter\ifx\csname AtVeryEnd@test@#2\endcsname#1%
+ \expandafter\let\expandafter#1%
+ \csname AtVeryEnd@enddocument@#2\endcsname
+ \begingroup
+ \let\on@line\@empty
+ \PackageInfo{atveryend}{%
+ \string#1 detected (#2)%
+ }%
+ \endgroup
+ \expandafter\AtVeryEnd@SkipToNil
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@SkipToNil}
+% \begin{macrocode}
+\def\AtVeryEnd@SkipToNil#1\@nil{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\AtVeryEnd@RedefEndDocument}
+% \begin{macrocode}
+\def\AtVeryEnd@RedefEndDocument#1{%
+ \ifx#1\@undefined
+ \else
+ \AtVeryEnd@Test#1{standard}%
+ \AtVeryEnd@Test#1{booklet}%
+ \AtVeryEnd@Test#1{dinbrief}%
+ \AtVeryEnd@Test#1{combine}%
+ \AtVeryEnd@Test#1{jpsj}%
+ \AtVeryEnd@SkipToNil
+ \@nil
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\AtVeryEnd@RedefEndDocument\enddocument
+\AtVeryEnd@RedefEndDocument\AP@enddocument % afterpage.sty
+\AtVeryEnd@RedefEndDocument\hyper@back@cite@enddocument % htx-bc.sty
+\AtVeryEnd@RedefEndDocument\hyper@enddocument % hyper.sty
+\AtVeryEnd@RedefEndDocument\hyper@fn@enddocument % hyper.sty
+\AtVeryEnd@RedefEndDocument\cweb@save@enddocument % cweb.cls
+\AtVeryEnd@RedefEndDocument\prev@enddocument % flushend.sty
+\AtVeryEnd@RedefEndDocument\endorigdocument % gaceta.cls
+\AtVeryEnd@RedefEndDocument\keependdoc % aguplus.sty
+\AtVeryEnd@RedefEndDocument\EMenddocument % t-angles.sty
+\AtVeryEnd@RedefEndDocument\docmute@enddocument % docmute.sty
+\AtVeryEnd@RedefEndDocument\a@enddocument % alatex.sty
+\AtVeryEnd@RedefEndDocument\enddocumentasusual % frenchle.sty
+\AtVeryEnd@RedefEndDocument\old@enddocument % uwthesis.cls
+% \end{macrocode}
+%
+% \subsection{Using hooks of other packages}
+%
+% \subsubsection{Package \xpackage{scrlfile}}
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{scrlfile}{%
+ \@ifundefined{BeforeClosingMainAux}{}{%
+ \BeforeClosingMainAux{\Call@AfterLastShipout}%
+ }%
+ \@ifundefined{AfterReadingMainAux}{}{%
+ \AfterReadingMainAux{\Call@AtVeryEndDocument}%
+ }%
+ }{}%
+% \end{macrocode}
+%
+% \subsubsection{Package \xpackage{etoolbox}}
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{etoolbox}{%
+ \@ifundefined{AfterEndDocument}{}{%
+ \AfterEndDocument{\Call@AtVeryEndDocument}%
+ }%
+ }{}%
+}
+% \end{macrocode}
+%
+% \subsection{Hack into \cs{enddocument}}
+%
+% Class \xclass{revtex} provides ``hook'' \cs{clear@document}.
+% \begin{macrocode}
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname clear@document\endcsname\relax
+ \def\AtVeryEnd@document{document}%
+ \def\AtVeryEnd@RedefCheckend{%
+ \expandafter\def\expandafter\@checkend
+ \expandafter##\expandafter1\expandafter{%
+ \@checkend{##1}%
+ \def\AtVeryEnd@temp{##1}%
+ \ifx\AtVeryEnd@temp\AtVeryEnd@document
+ \let\AtVeryEnd@OrgClearpage\clearpage
+ \def\clearpage{%
+ \let\clearpage\AtVeryEnd@OrgClearpage
+ \clearpage
+ \Call@AfterLastShipout
+ }%
+ \fi
+ }%
+ \aftergroup\AtVeryEnd@RedefCheckend
+ }%
+ \AtEndDocument{%
+ \AtVeryEnd@RedefCheckend
+ }%
+ \else
+ \g@addto@macro\clear@document{\Call@AfterLastShipout}%
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AtEndDocument{%
+ \@ifundefined{@dofilelist}{%
+ \gdef\@dofilelist{\Call@AtVeryEndDocument}%
+ }{%
+ \begingroup
+ \toks@\expandafter{\@dofilelist}%
+ \xdef\@dofilelist{%
+ \noexpand\Call@AtVeryEndDocument
+ \the\toks@
+ }%
+ \endgroup
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AtVeryEnd@AtEnd
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@ 1 %
+ \repeat
+}
+\expandafter\ifx\csname LoadCommand\endcsname\relax
+ \def\LoadCommand{\input atveryend.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \LoadCommand
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/oberdiek/atveryend.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/atveryend.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+% |unzip oberdiek.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \paragraph{Script installation.}
+% Check the directory \xfile{TDS:scripts/oberdiek/} for
+% scripts that need further installation steps.
+% Package \xpackage{attachfile2} comes with the Perl script
+% \xfile{pdfatfi.pl} that should be installed in such a way
+% that it can be called as \texttt{pdfatfi}.
+% Example (linux):
+% \begin{quote}
+% |chmod +x scripts/oberdiek/pdfatfi.pl|\\
+% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+% \verb|tex atveryend.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% atveryend.sty & tex/generic/oberdiek/atveryend.sty\\
+% atveryend.pdf & doc/latex/oberdiek/atveryend.pdf\\
+% test/atveryend-test1.tex & doc/latex/oberdiek/test/atveryend-test1.tex\\
+% atveryend.dtx & source/latex/oberdiek/atveryend.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \teTeX\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Attached source.}
+%
+% The PDF documentation on CTAN also includes the
+% \xfile{.dtx} source file. It can be extracted by
+% AcrobatReader 6 or higher. Another option is \textsf{pdftk},
+% e.g. unpack the file into the current directory:
+% \begin{quote}
+% \verb|pdftk atveryend.pdf unpack_files output .|
+% \end{quote}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+% \verb|latex \let\install=y\input{atveryend.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+% \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex atveryend.dtx
+%makeindex -s gind.ist atveryend.idx
+%pdflatex atveryend.dtx
+%makeindex -s gind.ist atveryend.idx
+%pdflatex atveryend.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \section{Acknowledgement}
+%
+% \begin{description}
+% \item[Arthur Ogawa:] He proposed the new API with \cs{AfterLastShipout}.
+% For version 1.2 he provided a comprehensive class/package list that
+% deal with \cs{enddocument}.
+% \end{description}
+%
+% \begin{thebibliography}{9}
+%
+% \bibitem{clsguide}
+% The \LaTeX3 Project:
+% \textit{\LaTeX2e\ for class and package writers}
+% 2006/02/15;
+% \CTAN{macros/latex/doc/clsguide.pdf}.
+%
+% \bibitem{endfloat}
+% James Darrell McCauley, Jeff Goldberg:
+% \textit{The \xpackage{endfloat} package};
+% 1995/10/11 v2.4i;
+% \CTAN{macros/latex/contrib/endfloat/endfloat.pdf}.
+%
+% \bibitem{etoolbox}
+% Philipp Lehmann:
+% \textit{The \xpackage{etoolbox} package};
+% 2009/08/06 v1.8;
+% \CTAN{macros/latex/contrib/etoolbox/etoolbox.pdf}.
+%
+% \bibitem{hyperref}
+% Sebastian Rahtz, Heiko Oberdiek:
+% \textit{The \xpackage{hyperref} package};
+% 2009/12/05 v6.79l;
+% \CTAN{macros/latex/contrib/hyperref/}.
+%
+% \bibitem{koma}
+% Markus Kohm:
+% \textit{KOMA-Script};
+% 2009/07/24 v3.04a;
+% \url{http://www.komascript.de/}.
+%
+% \bibitem{lastpage}
+% Jeff Goldberg:
+% \textit{The \xpackage{lastpage} package};
+% 1994/07/20 v0.1b;
+% \CTAN{macros/latex/contrib/lastpage/lastpage.pdf}.
+%
+% \bibitem{revtex}
+% APS, AIP, Arthur Orgawa;
+% ReVTeX 4.1;
+% 2009/10/13 v4.1;
+% \url{http://authors.aps.org/revtex4/}.
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2009/12/06 v1.0}
+% \item
+% The first version.
+% \end{Version}
+% \begin{Version}{2009/12/07 v1.1}
+% \item
+% Bug fixes.
+% \end{Version}
+% \begin{Version}{2009/12/09 v1.2}
+% \item
+% Additional support of classes and packages.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx
index a0123f4faa4..440ab0c7a53 100644
--- a/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/bookmark.dtx
@@ -76,7 +76,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: bookmark 2009/08/13 v1.5 PDF bookmarks (HO)}
+\Msg{* Package: bookmark 2009/12/07 v1.7 PDF bookmarks (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -155,7 +155,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bookmark.drv}%
- [2009/08/13 v1.5 PDF bookmarks (HO)]%
+ [2009/12/07 v1.7 PDF bookmarks (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -164,7 +164,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1946}
+% \CheckSum{1945}
%
% \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
@@ -185,7 +185,7 @@ and the derived files
% \GetFileInfo{bookmark.drv}
%
% \title{The \xpackage{bookmark} package}
-% \date{2009/08/13 v1.5}
+% \date{2009/12/07 v1.7}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -461,12 +461,11 @@ and the derived files
%
% Some drivers
% (\xoption{pdftex}, \xoption{dvips}, \xoption{dvipsone},
-% \xoption{textures})
-% uses \LaTeX's \cs{AtEndDocument} for this purpose.
+% \xoption{textures}) use package \xpackage{atveryend}'s
+% for this purpose. \cs{AtEndDocument} is too early,
+% the last page might not been shipped out. Because the \xext{.aux}
+% file is needed, these drivers use \cs{AfterLastShipout}.
%
-% However \cs{AtEndDocument} cannot be used in general.
-% The last page can already be finished if the hook
-% of \cs{AtEndDocument} is called.
% The implementation of the other drivers
% (\xoption{dvipdfm}, \xoption{xetex}, \xoption{vtex})
% depends on
@@ -502,7 +501,7 @@ and the derived files
open,
openlevel=2,
atend
-]{bookmark}[2009/08/13]
+]{bookmark}[2009/12/07]
\bookmarksetup{color=blue}
@@ -605,7 +604,7 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bookmark}%
- [2009/08/13 v1.5 PDF bookmarks (HO)]%
+ [2009/12/07 v1.7 PDF bookmarks (HO)]%
% \end{macrocode}
%
% \subsubsection{Requirements}
@@ -1218,7 +1217,7 @@ and the derived files
%<*dvipdfm>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-dvipdfm.def}%
- [2009/08/13 v1.5 bookmark driver for dvipdfm (HO)]%
+ [2009/12/07 v1.7 bookmark driver for dvipdfm (HO)]%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1383,7 +1382,7 @@ and the derived files
%<*vtex>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-vtex.def}%
- [2009/08/13 v1.5 bookmark driver for VTeX (HO)]%
+ [2009/12/07 v1.7 bookmark driver for VTeX (HO)]%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1668,7 +1667,7 @@ and the derived files
%<*pdftex>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-pdftex.def}%
- [2009/08/13 v1.5 bookmark driver for pdfTeX (HO)]%
+ [2009/12/07 v1.7 bookmark driver for pdfTeX (HO)]%
% \end{macrocode}
%
% \begin{macrocode}
@@ -1789,7 +1788,7 @@ and the derived files
%<*dvips>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-dvips.def}%
- [2009/08/13 v1.5 bookmark driver for dvips (HO)]%
+ [2009/12/07 v1.7 bookmark driver for dvips (HO)]%
% \end{macrocode}
% \begin{macrocode}
\def\BKM@PSHeaderFile#1{%
@@ -1804,7 +1803,7 @@ and the derived files
%<*dvipsone>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-dvipsone.def}%
- [2009/08/13 v1.5 bookmark driver for dvipsone (HO)]%
+ [2009/12/07 v1.7 bookmark driver for dvipsone (HO)]%
% \end{macrocode}
% \begin{macrocode}
\def\BKM@PSHeaderFile#1{%
@@ -1819,7 +1818,7 @@ and the derived files
%<*textures>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{bkm-textures.def}%
- [2009/08/13 v1.5 bookmark driver for textures (HO)]%
+ [2009/12/07 v1.7 bookmark driver for textures (HO)]%
% \end{macrocode}
% \begin{macrocode}
\def\BKM@PSHeaderFile#1{%
@@ -1837,9 +1836,12 @@ and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-\AtEndDocument{\BKM@pdfmark@out}
+\RequirePackage{atveryend}[2009/12/07]
+\AfterLastShipout{\BKM@pdfmark@out}
% \end{macrocode}
%
+% Do not use package \xpackage{rerunfilecheck} here, because
+% the file \cs{BMK@filename} is not read during the \TeX\ run.
% \begin{macrocode}
\def\BKM@pdfmark@out{%
\if@filesw
@@ -2170,10 +2172,11 @@ and the derived files
%</package>
% \end{macrocode}
%
-% \subsubsection{Drivers using \cs{AtEndDocument}}
+% \subsubsection{Drivers using hooks at end of document}
%
-% \cs{AtEndDocument} can be used, if the implementation
-% of \cs{bookmark} does not depend on \cs{special}:
+% The following drivers use package \xpackage{atveryend}'s
+% \cs{AfterLastShipout}, because they still need the
+% \xext{.aux} file.
% \begin{itemize}
% \item
% Driver \xoption{pdftex} uses \cs{pdfoutline} that can
@@ -2182,16 +2185,13 @@ and the derived files
% PostScript drivers such as
% \xoption{dvips} use an external PostScript header file
% for the bookmarks. File writing can be done after
-% the last shipout page, thus \cs{AtEndDocument} works.
+% the last shipout page, but before the \xext{.aux} file is closed.
% \end{itemize}
% \begin{macrocode}
%<*pdftex|pdfmark>
\ifBKM@atend
- \AtBeginDocument{%
- \AtEndDocument{%
- \clearpage
- \BKM@EndHook
- }%
+ \AfterLastShipout{%
+ \BKM@EndHook
}%
\fi
%</pdftex|pdfmark>
@@ -2495,6 +2495,15 @@ and the derived files
% Except for driver options the other options are now local options.
% This resolves a problem with KOMA-Script v3.00 and its option \xoption{open}.
% \end{Version}
+% \begin{Version}{2009/12/06 v1.6}
+% \item
+% Use of package \xpackage{atveryend} for drivers \xoption{pdftex}
+% and \xoption{pdfmark}.
+% \end{Version}
+% \begin{Version}{2009/12/07 v1.7}
+% \item
+% Use of package \xpackage{atveryend} fixed.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx b/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx
index 20cca4d0415..9e8a61543bc 100644
--- a/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/etexcmds.dtx
@@ -154,7 +154,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{484}
+% \CheckSum{490}
%
% \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
@@ -567,6 +567,10 @@ and the derived files
\ProvidesFile{etexcmds-test4.tex}[2007/12/12 v1.2 Test file for LaTeX]
\documentclass{article}
\usepackage{m-pictex}
+\def\normalwritestatus#1#2{%
+ \typeout{EMERGENCY HACK \string\normalwritestatus}%
+ \typeout{#1: #2}%
+}
\usepackage{m-ch-de}
\usepackage{etexcmds}
\makeatletter
diff --git a/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx b/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx
new file mode 100644
index 00000000000..a15f305b2e4
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/gettitlestring.dtx
@@ -0,0 +1,916 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Heiko Oberdiek.
+%
+% This work consists of the main source file gettitlestring.dtx
+% and the derived files
+% gettitlestring.sty, gettitlestring.pdf, gettitlestring.ins,
+% gettitlestring.drv, gettitlestring-test1.tex,
+% gettitlestring-test2.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/gettitlestring.dtx
+% CTAN:macros/latex/contrib/oberdiek/gettitlestring.pdf
+%
+% Unpacking:
+% (a) If gettitlestring.ins is present:
+% tex gettitlestring.ins
+% (b) Without gettitlestring.ins:
+% tex gettitlestring.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{gettitlestring.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If gettitlestring.drv is present:
+% latex gettitlestring.drv
+% (b) Without gettitlestring.drv:
+% latex gettitlestring.dtx; ...
+% The class ltxdoc loads the configuration file ltxdoc.cfg
+% if available. Here you can specify further options, e.g.
+% use A4 as paper format:
+% \PassOptionsToClass{a4paper}{article}
+%
+% Programm calls to get the documentation (example):
+% pdflatex gettitlestring.dtx
+% makeindex -s gind.ist gettitlestring.idx
+% pdflatex gettitlestring.dtx
+% makeindex -s gind.ist gettitlestring.idx
+% pdflatex gettitlestring.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/gettitlestring.sty
+% TDS:doc/latex/oberdiek/gettitlestring.pdf
+% TDS:doc/latex/oberdiek/test/gettitlestring-test1.tex
+% TDS:doc/latex/oberdiek/test/gettitlestring-test2.tex
+% TDS:source/latex/oberdiek/gettitlestring.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: gettitlestring 2009/12/08 v1.0 Cleanup strings for title referencing (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+This Current Maintainer of this work is Heiko Oberdiek.
+
+This work consists of the main source file gettitlestring.dtx
+and the derived files
+ gettitlestring.sty, gettitlestring.pdf, gettitlestring.ins,
+ gettitlestring.drv, gettitlestring-test1.tex,
+ gettitlestring-test2.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{gettitlestring.ins}{\from{gettitlestring.dtx}{install}}%
+ \file{gettitlestring.drv}{\from{gettitlestring.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{gettitlestring.sty}{\from{gettitlestring.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{gettitlestring-test1.tex}{\from{gettitlestring.dtx}{test1}}%
+ \file{gettitlestring-test2.tex}{\from{gettitlestring.dtx}{test2}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* gettitlestring.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `gettitlestring.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{gettitlestring.drv}%
+ [2009/12/08 v1.0 Cleanup strings for title referencing (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\begin{document}
+ \DocInput{gettitlestring.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{638}
+%
+% \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 \~}
+%
+% \GetFileInfo{gettitlestring.drv}
+%
+% \title{The \xpackage{gettitlestring} package}
+% \date{2009/12/08 v1.0}
+% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% The \LaTeX\ package addresses packages that are dealing with
+% references to titles (\cs{section}, \cs{caption}, \dots).
+% The package tries to remove \cs{label} and other
+% commands from title strings.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% \subsection{Macros}
+%
+% \begin{declcs}{GetTitleStringSetup} \M{key value list}
+% \end{declcs}
+% The options are given as comma separated key value pairs.
+% See section \ref{sec:options}.
+%
+% \begin{declcs}{GetTitleString} \M{text}\\
+% \cs{GetTitleStringExpand} \M{text}\\
+% \cs{GetTitleStringNonExpand} \M{text}
+% \end{declcs}
+% Macro \cs{GetTitleString} tries to remove unwanted stuff from \meta{text}
+% the result is stored in Macro \cs{GetTitleStringResult}.
+% Two methods are available:
+% \begin{description}
+% \item[\cs{GetTitleStringExpand}:]
+% The \meta{text} is expanded in a context where the unwanted
+% macros are redefined to remove themselves.
+% This is the method used in packages \xpackage{titleref}~\cite{titleref},
+% \xpackage{zref-titleref}~\cite{zref}
+% or class \xclass{memoir}~\cite{memoir}.
+% \cs{protect} is supported, but fragile material might break.
+% \item[\cs{GetTitleStringNonExpand}:]
+% The \meta{text} is not expanded. Thus the removal of unwanted
+% material is more difficult. It is especially removed at the
+% start of the \meta{text} and spaces are removed from the end.
+% Currently only \cs{label} is removed in the whole string,
+% if it is not hidden inside curly braces or part of macro
+% definitions. Thus the removal of unwanted stuff might not be
+% complete, but fragile material will not break.
+% (But the result string can break at a later time, of course).
+% \end{description}
+% Option \xoption{expand} controls which method is used by
+% macro \cs{GetTitleString}.
+%
+% \begin{declcs}{GetTitleStringDisableCommands} \M{code}
+% \end{declcs}
+% The \meta{code} is called right before the
+% text is expanded in \cs{GetTitleStringExpand}.
+% Additional definitions can be given for macros that
+% should be removed.
+% Keep in mind that expansion means that the definitions
+% must work in expandable context. Macros like
+% \cs{@ifstar} or \cs{@ifnextchar} or optional arguments
+% will not work. The macro names in \meta{code} may contain
+% the at sign |@|, it has catcode 11 (letter).
+%
+% \subsection{Options}\label{sec:options}
+%
+% \begin{description}
+% \item[\xoption{expand}:] Boolean option, takes values |true| or |false|.
+% No value means |true|. The option specifies the method to remove
+% unwanted stuff from the title string, see below.
+% \end{description}
+% Options can be set at the following places:
+% \begin{itemize}
+% \item \cs{usepackage}
+% \item Configuration file \xfile{gettitlestring.cfg}.
+% \item \cs{GetTitleStringSetup}
+% \end{itemize}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\let\expandafter\x\csname ver@gettitlestring.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \else
+ \catcode35 6 % #
+ \expandafter\ifx\csname PackageInfo\endcsname\relax
+ \def\x#1#2{%
+ \immediate\write-1{Package #1 Info: #2.}%
+ }%
+ \else
+ \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
+ \fi
+ \x{gettitlestring}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode91 12 % [
+ \catcode93 12 % ]
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1#2#3[#4]{\endgroup
+ \immediate\write-1{Package: #3 #4}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@gettitlestring.sty\endcsname
+\ProvidesPackage{gettitlestring}%
+ [2009/12/08 v1.0 Cleanup strings for title referencing (HO)]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname GTS@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\GTS@AtEnd{%
+ \GTS@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+% \end{macrocode}
+%
+% \subsection{Options}
+%
+% \begin{macrocode}
+\RequirePackage{kvoptions}[2009/07/17]
+\SetupKeyvalOptions{%
+ family=gettitlestring,%
+ prefix=GTS@%
+}
+\newcommand*{\GetTitleStringSetup}{%
+ \setkeys{gettitlestring}%
+}
+\DeclareBoolOption{expand}
+\InputIfFileExists{gettitlestring.cfg}{}
+\ProcessKeyvalOptions*\relax
+% \end{macrocode}
+%
+% \subsection{\cs{GetTitleString}}
+%
+% \begin{macro}{\GetTitleString}
+% \begin{macrocode}
+\newcommand*{\GetTitleString}{%
+ \ifGTS@expand
+ \expandafter\GetTitleStringExpand
+ \else
+ \expandafter\GetTitleStringNonExpand
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GetTitleStringExpand}
+% \begin{macrocode}
+\newcommand{\GetTitleStringExpand}[1]{%
+ \def\GetTitleStringResult{#1}%
+ \begingroup
+ \GTS@DisablePredefinedCmds
+ \GTS@DisableHook
+ \edef\x{\endgroup
+ \noexpand\def\noexpand\GetTitleStringResult{%
+ \GetTitleStringResult
+ }%
+ }%
+ \x
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GetTitleString}
+% \begin{macrocode}
+\newcommand{\GetTitleStringNonExpand}[1]{%
+ \def\GetTitleStringResult{#1}%
+ \global\let\GTS@GlobalString\GetTitleStringResult
+ \begingroup
+ \GTS@RemoveLeft
+ \GTS@RemoveRight
+ \endgroup
+ \let\GetTitleStringResult\GTS@GlobalString
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Expand method}
+%
+% \begin{macro}{\GTS@DisablePredefinedCmds}
+% \begin{macrocode}
+\def\GTS@DisablePredefinedCmds{%
+ \let\label\@gobble
+ \let\zlabel\@gobble
+ \let\zref@label\@gobble
+ \let\zref@labelbylist\@gobbletwo
+ \let\zref@labelbyprops\@gobbletwo
+ \let\index\@gobble
+ \let\glossary\@gobble
+ \let\markboth\@gobbletwo
+ \let\@mkboth\@gobbletwo
+ \let\markright\@gobble
+ \let\phantomsection\@empty
+ \def\addcontentsline{\expandafter\@gobble\@gobbletwo}%
+ \let\raggedright\@empty
+ \let\raggedleft\@empty
+ \let\centering\@empty
+ \let\protect\@unexpandable@protect
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\GTS@DisableHook}
+% \begin{macrocode}
+\providecommand*{\GTS@DisableHook}{}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GetTitleStringDisableCommands}
+% \begin{macrocode}
+\def\GetTitleStringDisableCommands{%
+ \begingroup
+ \makeatletter
+ \GTS@DisableCommands
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\GTS@DisableCommands}
+% \begin{macrocode}
+\long\def\GTS@DisableCommands#1{%
+ \toks0=\expandafter{\GTS@DisableHook}%
+ \toks2={#1}%
+ \xdef\GTS@GlobalString{\the\toks0 \the\toks2}%
+ \endgroup
+ \let\GTS@DisableHook\GTS@GlobalString
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Non-expand method}
+%
+% \begin{macrocode}
+\def\GTS@RemoveLeft{%
+ \toks@\expandafter\expandafter\expandafter{%
+ \expandafter\GTS@Car\GTS@GlobalString{}{}{}{}\GTS@Nil
+ }%
+ \edef\GTS@Token{\the\toks@}%
+ \GTS@PredefinedLeftCmds
+ \expandafter\futurelet\expandafter\GTS@Token
+ \expandafter\GTS@TestLeftSpace\GTS@GlobalString\GTS@Nil
+ \GTS@End
+}
+\def\GTS@End{}
+\long\def\GTS@TestLeft#1#2{%
+ \def\GTS@temp{#1}%
+ \ifx\GTS@temp\GTS@Token
+ \toks@\expandafter\expandafter\expandafter{%
+ \expandafter#2\GTS@GlobalString\GTS@Nil
+ }%
+ \expandafter\GTS@TestLeftEnd
+ \fi
+}
+\long\def\GTS@TestLeftEnd#1\GTS@End{%
+ \xdef\GTS@GlobalString{\the\toks@}%
+ \GTS@RemoveLeft
+}
+\long\def\GTS@Car#1#2\GTS@Nil{#1}
+\long\def\GTS@Cdr#1#2\GTS@Nil{#2}
+\long\def\GTS@CdrTwo#1#2#3\GTS@Nil{#3}
+\long\def\GTS@CdrThree#1#2#3#4\GTS@Nil{#4}
+\long\def\GTS@CdrFour#1#2#3#4#5\GTS@Nil{#5}
+\long\def\GTS@TestLeftSpace#1\GTS@Nil{%
+ \ifx\GTS@Token\@sptoken
+ \toks@\expandafter{%
+ \romannumeral-0\GTS@GlobalString
+ }%
+ \expandafter\GTS@TestLeftEnd
+ \fi
+}
+% \end{macrocode}
+% \begin{macro}{\GTS@PredefinedLeftCmds}
+% \begin{macrocode}
+\def\GTS@PredefinedLeftCmds{%
+ \GTS@TestLeft\Hy@SectionAnchor\GTS@Cdr
+ \GTS@TestLeft\Hy@phantomsection\GTS@Cdr
+ \GTS@TestLeft\label\GTS@CdrTwo
+ \GTS@TestLeft\zlabel\GTS@CdrTwo
+ \GTS@TestLeft\index\GTS@CdrTwo
+ \GTS@TestLeft\glossary\GTS@CdrTwo
+ \GTS@TestLeft\markboth\GTS@CdrThree
+ \GTS@TestLeft\@mkboth\GTS@CdrThree
+ \GTS@TestLeft\addcontentsline\GTS@CdrFour
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\def\GTS@RemoveRight{%
+ \toks@{}%
+ \expandafter\GTS@TestRightLabel\GTS@GlobalString
+ \label{}\GTS@Nil\@nil
+ \GTS@RemoveRightSpace
+}
+\begingroup
+ \def\GTS@temp#1{\endgroup
+ \def\GTS@RemoveRightSpace{%
+ \expandafter\GTS@TestRightSpace\GTS@GlobalString
+ \GTS@Nil#1\GTS@Nil\@nil
+ }%
+ }%
+\GTS@temp{ }
+\def\GTS@TestRightSpace#1 \GTS@Nil#2\@nil{%
+ \ifx\relax#2\relax
+ \else
+ \gdef\GTS@GlobalString{#1}%
+ \expandafter\GTS@RemoveRightSpace
+ \fi
+}
+\def\GTS@TestRightLabel#1\label#2#3\GTS@Nil#4\@nil{%
+ \def\GTS@temp{#3}%
+ \ifx\GTS@temp\@empty
+ \expandafter\gdef\expandafter\GTS@GlobalString\expandafter{%
+ \the\toks@
+ #1%
+ }%
+ \expandafter\@gobble
+ \else
+ \expandafter\@firstofone
+ \fi
+ {%
+ \toks@\expandafter{\the\toks@#1}%
+ \GTS@TestRightLabel#3\GTS@Nil\@nil
+ }%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\GTS@AtEnd
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@ 1 %
+ \repeat
+}
+\expandafter\ifx\csname LoadCommand\endcsname\relax
+ \def\LoadCommand{\input gettitlestring.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \LoadCommand
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \subsection{Test of non-expand method}
+%
+% \begin{macrocode}
+%<*test2>
+\NeedsTeXFormat{LaTeX2e}
+\documentclass{minimal}
+\usepackage{gettitlestring}[2009/12/08]
+\usepackage{qstest}
+\IncludeTests{*}
+\LogTests{log}{*}{*}
+\begin{document}
+\begin{qstest}{non-expand}{non-expand}
+ \def\test#1#2{%
+ \sbox0{%
+ \GetTitleString{#1}%
+ \Expect{#2}*{\GetTitleStringResult}%
+ }%
+ \Expect{0.0pt}*{\the\wd0}%
+ }%
+ \test{}{}%
+ \test{ }{}%
+ \test{ x }{x}%
+ \test{ x y }{x y}%
+ \test{ \relax}{\relax}%
+ \test{\label{f}a}{a}%
+ \test{ \label{f}a}{a}%
+ \test{\label{f} a}{a}%
+ \test{ \label{f} a}{a}%
+ \test{a\label{f}}{a}%
+ \test{a\label{f} }{a}%
+ \test{a \label{f}}{a}%
+ \test{a \label{f} }{a}%
+ \test{a\label{f}b\label{g}}{ab}%
+ \test{a \label{f}b \label{g} }{a b}%
+ \test{a\label{f} b \label{g} }{a b}%
+\end{qstest}
+\end{document}
+%</test2>
+% \end{macrocode}
+%
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/oberdiek/gettitlestring.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/gettitlestring.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+% |unzip oberdiek.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \paragraph{Script installation.}
+% Check the directory \xfile{TDS:scripts/oberdiek/} for
+% scripts that need further installation steps.
+% Package \xpackage{attachfile2} comes with the Perl script
+% \xfile{pdfatfi.pl} that should be installed in such a way
+% that it can be called as \texttt{pdfatfi}.
+% Example (linux):
+% \begin{quote}
+% |chmod +x scripts/oberdiek/pdfatfi.pl|\\
+% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+% \verb|tex gettitlestring.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% gettitlestring.sty & tex/generic/oberdiek/gettitlestring.sty\\
+% gettitlestring.pdf & doc/latex/oberdiek/gettitlestring.pdf\\
+% test/gettitlestring-test1.tex & doc/latex/oberdiek/test/gettitlestring-test1.tex\\
+% test/gettitlestring-test2.tex & doc/latex/oberdiek/test/gettitlestring-test2.tex\\
+% gettitlestring.dtx & source/latex/oberdiek/gettitlestring.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \teTeX\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Attached source.}
+%
+% The PDF documentation on CTAN also includes the
+% \xfile{.dtx} source file. It can be extracted by
+% AcrobatReader 6 or higher. Another option is \textsf{pdftk},
+% e.g. unpack the file into the current directory:
+% \begin{quote}
+% \verb|pdftk gettitlestring.pdf unpack_files output .|
+% \end{quote}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+% \verb|latex \let\install=y\input{gettitlestring.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+% \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex gettitlestring.dtx
+%makeindex -s gind.ist gettitlestring.idx
+%pdflatex gettitlestring.dtx
+%makeindex -s gind.ist gettitlestring.idx
+%pdflatex gettitlestring.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{thebibliography}{9}
+%
+% \bibitem{memoir}
+% Peter Wilson, Lars Madsen:
+% \textit{The Memoir Class};
+% 2009/11/17 v1.61803398c;
+% \CTAN{macros/latex/contrib/memoir/}
+%
+% \bibitem{titleref}
+% Donald Arsenau:
+% \textit{Titleref.sty};
+% 2001/04/05 ver 3.1;
+% \CTAN{macros/latex/contrib/misc/titleref.sty}
+%
+% \bibitem{zref}
+% Heiko Oberdiek:
+% \textit{The \xpackage{zref} package};
+% 2009/12/08 v2.7;
+% \CTAN{macros/latex/contrib/oberdiek/zref.pdf}
+%
+% \end{thebibliography}
+%
+% \begin{History}
+% \begin{Version}{2009/12/08 v1.0}
+% \item
+% The first version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
index 1a7c1eeb2c8..1e045270539 100644
--- a/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/holtxdoc.dtx
@@ -66,7 +66,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: holtxdoc 2009/08/07 v0.12 Private additional ltxdoc support (HO)}
+\Msg{* Package: holtxdoc 2009/12/02 v0.13 Private additional ltxdoc support (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -132,7 +132,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{holtxdoc.drv}%
- [2009/08/07 v0.12 Private additional ltxdoc support (HO)]%
+ [2009/12/02 v0.13 Private additional ltxdoc support (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -141,7 +141,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{283}
+% \CheckSum{292}
%
% \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
@@ -162,7 +162,7 @@ and the derived files
% \GetFileInfo{holtxdoc.drv}
%
% \title{The \xpackage{holtxdoc} package}
-% \date{2009/08/07 v0.12}
+% \date{2009/12/02 v0.13}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -202,7 +202,7 @@ and the derived files
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{holtxdoc}%
- [2009/08/07 v0.12 Private additional ltxdoc support (HO)]
+ [2009/12/02 v0.13 Private additional ltxdoc support (HO)]
% \end{macrocode}
%
% \begin{macrocode}
@@ -227,18 +227,30 @@ and the derived files
\newcommand*{\StartHistory}{%
\section{History}%
}
-\newcommand*{\HistVersion}[1]{%
- \subsection*{%
- \phantomsection
+\@ifpackagelater{hyperref}{2009/11/27}{%
+ \newcommand*{\HistVersion}[1]{%
+ \subsection*{[#1]}% hash-ok
\addcontentsline{toc}{subsection}{[#1]}% hash-ok
- [#1]% hash-ok
+ \def\HistLabel##1{%
+ \begingroup
+ \edef\@currentlabel{[#1]}% hash-ok
+ \label{##1}%
+ \endgroup
+ }%
}%
- \def\HistLabel##1{%
- \begingroup
- \edef\x{[#1]}% hash-ok
- \let\@currentlabel\x
- \label{##1}%
- \endgroup
+}{%
+ \newcommand*{\HistVersion}[1]{%
+ \subsection*{%
+ \phantomsection
+ \addcontentsline{toc}{subsection}{[#1]}% hash-ok
+ [#1]% hash-ok
+ }%
+ \def\HistLabel##1{%
+ \begingroup
+ \edef\@currentlabel{[#1]}% hash-ok
+ \label{##1}%
+ \endgroup
+ }%
}%
}
\newenvironment{History}{%
@@ -647,6 +659,11 @@ and the derived files
% \item
% \cs{xmodule} added.
% \end{Version}
+% \begin{Version}{2009/12/02 v0.13}
+% \item
+% Anchor hack for unnumbered subsections is removed for
+% \xpackage{hyperref} $\ge$ 2009/11/27 6.79k.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/hypdoc.dtx b/Master/texmf-dist/source/latex/oberdiek/hypdoc.dtx
index 67328153b3e..f5465164bdc 100644
--- a/Master/texmf-dist/source/latex/oberdiek/hypdoc.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/hypdoc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2002, 2006, 2007 by
+% Copyright (C) 2002, 2006, 2007, 2009 by
% Heiko Oberdiek <oberdiek@uni-freiburg.de>
%
% This work may be distributed and/or modified under the
@@ -67,7 +67,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: hypdoc 2007/11/12 v1.6 Hyper extensions for doc.sty (HO)}
+\Msg{* Package: hypdoc 2009/12/10 v1.7 Hyper extensions for doc.sty (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -78,7 +78,7 @@
This is a generated file.
-Copyright (C) 2002, 2006, 2007 by
+Copyright (C) 2002, 2006, 2007, 2009 by
Heiko Oberdiek <oberdiek@uni-freiburg.de>
This work may be distributed and/or modified under the
@@ -134,7 +134,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{hypdoc.drv}%
- [2007/11/12 v1.6 Hyper extensions for doc.sty (HO)]%
+ [2009/12/10 v1.7 Hyper extensions for doc.sty (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -143,7 +143,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{680}
+% \CheckSum{682}
%
% \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
@@ -164,7 +164,7 @@ and the derived files
% \GetFileInfo{hypdoc.drv}
%
% \title{The \xpackage{hypdoc} package}
-% \date{2007/11/12 v1.6}
+% \date{2009/12/10 v1.7}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -341,7 +341,7 @@ and the derived files
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{hypdoc}%
- [2007/11/12 v1.6 Hyper extensions for doc.sty (HO)]%
+ [2009/12/10 v1.7 Hyper extensions for doc.sty (HO)]%
% \end{macrocode}
% The package identification is done at the top of the |.dtx| file
% in order to use only one identification string.
@@ -721,6 +721,9 @@ and the derived files
\HD@savedest@init
}
% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{rerunfilecheck}[2009/12/10]
+% \end{macrocode}
% \begin{macro}{\HD@savedest@init}
% \begin{macrocode}
\begingroup
@@ -737,8 +740,10 @@ and the derived files
\let~\HDorg@tilde
\catcode`\^^M=\HDorg@catcodeM\relax
\newwrite\HD@savedest@out
+ \RerunFileCheck{\jobname.hd}{%
+ \immediate\closeout\HD@savedest@out
+ }{}%
\immediate\openout\HD@savedest@out=\jobname.hd\relax
- \AtEndDocument{\immediate\closeout\HD@savedest@out}%
\else
\let\HD@savedest@add\@gobble
\fi
@@ -1312,6 +1317,10 @@ and the derived files
% \item
% Markup added in implementation section.
% \end{Version}
+% \begin{Version}{2009/12/10 v1.7}
+% \item
+% Use of package \xpackage{rerunfilecheck}.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx b/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
index c108ce24ecd..958cac61be3 100644
--- a/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/kvoptions.dtx
@@ -19,7 +19,8 @@
% and the derived files
% kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv,
% kvoptions-patch.sty, example-mycolorsetup.sty,
-% kvoptions-test1.tex, kvoptions-test2.tex.
+% kvoptions-test1.tex, kvoptions-test2.tex,
+% kvoptions-test3.tex.
%
% Distribution:
% CTAN:macros/latex/contrib/oberdiek/kvoptions.dtx
@@ -58,6 +59,7 @@
% TDS:doc/latex/oberdiek/example-mycolorsetup.sty
% TDS:doc/latex/oberdiek/test/kvoptions-test1.tex
% TDS:doc/latex/oberdiek/test/kvoptions-test2.tex
+% TDS:doc/latex/oberdiek/test/kvoptions-test3.tex
% TDS:source/latex/oberdiek/kvoptions.dtx
%
%<*ignore>
@@ -73,7 +75,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: kvoptions 2009/08/13 v3.4 Keyval support for LaTeX options (HO)}
+\Msg{* Package: kvoptions 2009/12/08 v3.6 Keyval support for LaTeX options (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -103,7 +105,8 @@ This work consists of the main source file kvoptions.dtx
and the derived files
kvoptions.sty, kvoptions.pdf, kvoptions.ins, kvoptions.drv,
kvoptions-patch.sty, example-mycolorsetup.sty,
- kvoptions-test1.tex, kvoptions-test2.tex.
+ kvoptions-test1.tex, kvoptions-test2.tex,
+ kvoptions-test3.tex.
\endpreamble
\let\MetaPrefix\DoubleperCent
@@ -119,6 +122,7 @@ and the derived files
\usedir{doc/latex/oberdiek/test}%
\file{kvoptions-test1.tex}{\from{kvoptions.dtx}{test1}}%
\file{kvoptions-test2.tex}{\from{kvoptions.dtx}{test2}}%
+ \file{kvoptions-test3.tex}{\from{kvoptions.dtx}{test3}}%
}
\obeyspaces
@@ -148,7 +152,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{kvoptions.drv}%
- [2009/08/13 v3.4 Keyval support for LaTeX options (HO)]%
+ [2009/12/08 v3.6 Keyval support for LaTeX options (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -157,7 +161,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{2121}
+% \CheckSum{2208}
%
% \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
@@ -178,7 +182,7 @@ and the derived files
% \GetFileInfo{kvoptions.drv}
%
% \title{The \xpackage{kvoptions} package}
-% \date{2009/08/13 v3.4}
+% \date{2009/12/08 v3.6}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -582,10 +586,10 @@ and the derived files
%
% The package/class author can wish the end of the option
% already during the package loading, then he will have
-% static behaviour. In case of dynamic options \cs{DisableKeyvalOptions}
+% static behaviour. In case of dynamic options \cs{DisableKeyvalOption}
% can be executed everywhere, also outside the package. Therefore
% the family name and the package/class name is usually unknown for
-% \cs{DisableKeyvalOptions}. Therefore the argument for the family
+% \cs{DisableKeyvalOption}. Therefore the argument for the family
% name is mandatory and for some actions the package/class name
% must be provided.
%
@@ -621,6 +625,15 @@ and the derived files
%\end{verbatim}
%\end{quote}
%
+% \subsubsection{\cs{AddToKeyvalOption}}
+%
+% \begin{declcs}{AddToKeyvalOption}\,\M{family}\,\M{key}\,\M{code}\\
+% \cs{AddToKeyvalOption} \*\,\M{key}\,\M{code}
+% \end{declcs}
+% The code for an existing key \meta{key} of family \meta{family} is
+% extended by code \meta{code}. In the starred form the current
+% family setting is used, see \cs{ProcessKeyvalOptions*}.
+%
% \subsection{Global vs. local options}
%
% Options that are given for \cs{documentclass} are called
@@ -715,7 +728,7 @@ and the derived files
% Package identification
% -----------------------
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{example-mycolorsetup}[2009/08/13 Managing my colors]
+\ProvidesPackage{example-mycolorsetup}[2009/12/08 Managing my colors]
\RequirePackage{ifpdf}
\RequirePackage{kvoptions}
@@ -1088,7 +1101,7 @@ and the derived files
\fi
\expandafter\x\csname ver@kvoptions.sty\endcsname
\ProvidesPackage{kvoptions}%
- [2009/08/13 v3.4 Keyval support for LaTeX options (HO)]
+ [2009/12/08 v3.6 Keyval support for LaTeX options (HO)]
% \end{macrocode}
%
% \paragraph{Catcodes}
@@ -1189,7 +1202,7 @@ and the derived files
% \begin{macrocode}
\DeclareOption{patch}{%
\AtEndOfPackage{%
- \RequirePackage{kvoptions-patch}[2009/08/13]%
+ \RequirePackage{kvoptions-patch}[2009/12/08]%
}%
}
% \end{macrocode}
@@ -1719,6 +1732,58 @@ and the derived files
}
% \end{macrocode}
%
+% \subsection{Change option code}
+%
+% \subsubsection{\cs{AddToKeyvalOption}}
+%
+% \begin{macro}{\AddToKeyvalOption}
+% \begin{macrocode}
+\newcommand*{\AddToKeyvalOption}{%
+ \@ifstar{%
+ \begingroup
+ \edef\x{\endgroup
+ \noexpand\KVO@AddToKeyvalOption{\KVO@family}%
+ }%
+ \x
+ }%
+ \KVO@AddToKeyvalOption
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\KVO@AddToKeyvalOption}
+% \begin{macrocode}
+\def\KVO@AddToKeyvalOption#1#2{%
+ \@ifundefined{KV@#1@#2}{%
+ \PackageWarning{kvoptions}{%
+ Key `#2' of family `#1' does not exist.\MessageBreak
+ Ignoring \string\AddToKeyvalOption
+ }%
+ \@gobble
+ }{%
+ \edef\KVO@next{%
+ \noexpand\KVO@@AddToKeyvalOption
+ \expandafter\noexpand\csname KV@#1@#2\endcsname
+ }%
+ \afterassignment\KVO@next
+ \def\KVO@temp##1%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\KVO@@AddToKeyvalOption}
+% \begin{macrocode}
+\def\KVO@@AddToKeyvalOption#1{%
+ \begingroup
+ \toks@\expandafter{#1{##1}}%
+ \toks@\expandafter{\the\expandafter\toks@\KVO@temp{##1}}%
+ \edef\x{\endgroup
+ \noexpand\def\noexpand#1####1{\the\toks@}%
+ }%
+ \x
+}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Process options}
%
% \subsubsection{\cs{ProcessKeyvalOptions}}
@@ -1808,21 +1873,28 @@ and the derived files
KV@#1@\expandafter\KVO@getkey\CurrentOption=\@nil
}{%
% \end{macrocode}
-% A class puts not used options in the unused option list.
+% A class puts not used options in the unused option list
+% unless there is a default handler.
% \begin{macrocode}
- \ifx\KVO@Patch Y%
- \@onelevel@sanitize\CurrentOption
- \fi
- \ifx\@unusedoptionlist\@empty
- \global\let\@unusedoptionlist\CurrentOption
- \else
- \expandafter\expandafter\expandafter\gdef
- \expandafter\expandafter\expandafter\@unusedoptionlist
- \expandafter\expandafter\expandafter{%
- \expandafter\@unusedoptionlist
- \expandafter,\CurrentOption
+ \@ifundefined{KVO@default@\@currname.\@currext}{%
+ \ifx\KVO@Patch Y%
+ \@onelevel@sanitize\CurrentOption
+ \fi
+ \ifx\@unusedoptionlist\@empty
+ \global\let\@unusedoptionlist\CurrentOption
+ \else
+ \expandafter\expandafter\expandafter\gdef
+ \expandafter\expandafter\expandafter\@unusedoptionlist
+ \expandafter\expandafter\expandafter{%
+ \expandafter\@unusedoptionlist
+ \expandafter,\CurrentOption
+ }%
+ \fi
+ }{%
+ \toks\tw@\expandafter{%
+ \the\toks\expandafter\tw@\expandafter,\CurrentOption
}%
- \fi
+ }%
}{%
\toks@\expandafter{%
\the\expandafter\toks@\expandafter,\CurrentOption
@@ -2078,7 +2150,7 @@ and the derived files
\noexpand\endinput
}
\ProvidesPackage{kvoptions-patch}%
- [2009/08/13 v3.4 LaTeX patch for keyval options (HO)]%
+ [2009/12/08 v3.6 LaTeX patch for keyval options (HO)]%
% \end{macrocode}
%
% Check for \eTeX.
@@ -2723,6 +2795,47 @@ and the derived files
%</test2>
% \end{macrocode}
%
+% \begin{macrocode}
+%<*test3>
+\NeedsTeXFormat{LaTeX2e}
+\makeatletter
+\RequirePackage{kvoptions}[2009/12/08]
+\def\msg#{\immediate\write16}
+\define@key{testfamily}{testkey}{%
+ \msg{[testfamily/testkey/#1]}%
+}
+\define@key{testfamily}{testdefaultkey}[testdefault]{%
+ \msg{[testfamily/testdefaultkey/#1]}%
+}
+\AddToKeyvalOption{testfamily}{testkey}{%
+ \msg{[addition/#1]}%
+}
+\AddToKeyvalOption{testfamily}{testdefaultkey}{%
+ \msg{[addition/#1]}%
+}
+\setkeys{testfamily}{%
+ testkey=testA,%
+ testdefaultkey=testB,%
+ testdefaultkey,%
+}
+\SetupKeyvalOptions{%
+ family=testfamily%
+}
+\AddToKeyvalOption*{testkey}{%
+ \msg{[star addition/#1]}%
+}
+\AddToKeyvalOption*{testdefaultkey}{%
+ \msg{[star addition/#1]}%
+}
+\setkeys{testfamily}{%
+ testkey=testA,%
+ testdefaultkey=testB,%
+ testdefaultkey,%
+}
+\@@end
+%</test3>
+% \end{macrocode}
+%
% \section{Installation}
%
% \subsection{Download}
@@ -2788,6 +2901,7 @@ and the derived files
% example-mycolorsetup.sty & doc/latex/oberdiek/example-mycolorsetup.sty\\
% test/kvoptions-test1.tex & doc/latex/oberdiek/test/kvoptions-test1.tex\\
% test/kvoptions-test2.tex & doc/latex/oberdiek/test/kvoptions-test2.tex\\
+% test/kvoptions-test3.tex & doc/latex/oberdiek/test/kvoptions-test3.tex\\
% kvoptions.dtx & source/latex/oberdiek/kvoptions.dtx\\
% \end{tabular}^^A
% }^^A
@@ -3044,6 +3158,15 @@ and the derived files
% \item
% Documentation addition: local/global options.
% \end{Version}
+% \begin{Version}{2009/12/04 v3.5}
+% \item
+% \cs{AddToKeyvalOption} added.
+% \end{Version}
+% \begin{Version}{2009/12/08 v3.6}
+% \item
+% Fix: If a default handler is configured, it is now also
+% called for classes.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/luatex.dtx b/Master/texmf-dist/source/latex/oberdiek/luatex.dtx
index ae2eac484fb..f62dd833343 100644
--- a/Master/texmf-dist/source/latex/oberdiek/luatex.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/luatex.dtx
@@ -75,7 +75,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: luatex 2009/04/10 v0.2 LuaTeX basic definition package (HO)}
+\Msg{* Package: luatex 2009/12/02 v0.3 LuaTeX basic definition package (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -160,7 +160,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{luatex.drv}%
- [2009/04/10 v0.2 LuaTeX basic definition package (HO)]%
+ [2009/12/02 v0.3 LuaTeX basic definition package (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\usepackage{paralist}
@@ -170,7 +170,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1218}
+% \CheckSum{1237}
%
% \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
@@ -191,7 +191,7 @@ and the derived files
% \GetFileInfo{luatex.drv}
%
% \title{The \xpackage{luatex} package}
-% \date{2009/04/10 v0.2}
+% \date{2009/12/02 v0.3}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -547,7 +547,7 @@ and the derived files
\fi
\expandafter\x\csname ver@luatex.sty\endcsname
\ProvidesPackage{luatex}%
- [2009/04/10 v0.2 LuaTeX basic definition package (HO)]
+ [2009/12/02 v0.3 LuaTeX basic definition package (HO)]
% \end{macrocode}
%
% \subsection{Catcodes}
@@ -888,8 +888,14 @@ and the derived files
% \end{macro}
% \begin{macro}{\unsetattribute}
% \begin{macrocode}
+\ifnum\luatexversion<37
+ \LuT@newcommand\LuT@UnsetAttributeValue[0]{}%
+ \let\LuT@UnsetAttributeValue\m@ne
+\else
+ \LuT@newcommand\LuT@UnsetAttributeValue[0]{-2147483647 }%
+\fi
\LuT@newcommand\unsetattribute[1]{%
- #1=\m@ne
+ #1=\LuT@UnsetAttributeValue
}
% \end{macrocode}
% \end{macro}
@@ -1090,7 +1096,7 @@ and the derived files
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input luatex-loader.sty\relax
\else
- \RequirePackage{luatex-loader}[2009/04/10]%
+ \RequirePackage{luatex-loader}[2009/12/02]%
\fi
% \end{macrocode}
% \begin{macrocode}
@@ -1167,7 +1173,7 @@ and the derived files
\fi
\expandafter\x\csname ver@luatex-loader.sty\endcsname
\ProvidesPackage{luatex-loader}%
- [2009/04/10 v0.2 Lua module loader (HO)]
+ [2009/12/02 v0.3 Lua module loader (HO)]
% \end{macrocode}
% \begin{macrocode}
\begingroup
@@ -1253,7 +1259,7 @@ table.insert(package.loaders, kpse_module_loader)
%<*test2>
\documentclass{article}
\def\LoadCommand{%
- \RequirePackage{luatex}[2009/04/10]%
+ \RequirePackage{luatex}[2009/12/02]%
}
%</test2>
% \end{macrocode}
@@ -1261,7 +1267,7 @@ table.insert(package.loaders, kpse_module_loader)
%<*test3>
\documentclass{article}
\def\LoadCommand{%
- \RequirePackage{luatex-loader}[2009/04/10]%
+ \RequirePackage{luatex-loader}[2009/12/02]%
}
%</test3>
% \end{macrocode}
@@ -1372,7 +1378,7 @@ table.insert(package.loaders, kpse_module_loader)
\advance\count0 by 1 %
\repeat
\documentclass{minimal}
-\usepackage{luatex}[2009/04/10]
+\usepackage{luatex}[2009/12/02]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -1510,7 +1516,7 @@ table.insert(package.loaders, kpse_module_loader)
\endgroup
\Expect*{\the\allocationnumber}{0}%
\Expect*{\meaning\TestAttr}*{\string\attribute1}%
- \Expect*{\the\TestAttr}{-1}%
+ \Expect*{\the\TestAttr}*{\number\LuT@UnsetAttributeValue}%
\def\Test#1{%
\setattribute\TestAttr{#1}%
\Expect*{\the\TestAttr}{#1}%
@@ -1520,12 +1526,12 @@ table.insert(package.loaders, kpse_module_loader)
\Test{-1}%
\Test{123}%
\unsetattribute\TestAttr
- \Expect*{\the\TestAttr}{-1}%
+ \Expect*{\the\TestAttr}*{\number\LuT@UnsetAttributeValue}%
\begingroup
- \Expect*{\the\TestAttr}{-1}%
+ \Expect*{\the\TestAttr}*{\number\LuT@UnsetAttributeValue}%
\Test{1234}%
\endgroup
- \Expect*{\the\TestAttr}{-1}%
+ \Expect*{\the\TestAttr}*{\number\LuT@UnsetAttributeValue}%
\end{qstest}
% \end{macrocode}
%
@@ -1765,6 +1771,10 @@ table.insert(package.loaders, kpse_module_loader)
% Updates the call of \cs{directlua}, the syntax has changed
% in \LuaTeX\ 0.36.
% \end{Version}
+% \begin{Version}{2009/12/02 v0.3}
+% \item
+% Unsetting of attributes updated for \LuaTeX\ 0.37.
+% \end{Version}
% \end{History}
%
% \PrintIndex
diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
index 8b8f0aa5c1e..def585ac048 100644
--- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
+++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.ins
@@ -1,5 +1,5 @@
% oberdiek.ins
-% 2009/10/17
+% 2009/12/10
%
% Copyright (C) 1999, 2001, 2006 by
% Heiko Oberdiek <oberdiek@uni-freiburg.de>
@@ -29,6 +29,7 @@
\batchinput{atbegshi.dtx}
\batchinput{atenddvi.dtx}
\batchinput{attachfile2.dtx}
+\batchinput{atveryend.dtx}
\batchinput{auxhook.dtx}
\batchinput{bigintcalc.dtx}
\batchinput{bitset.dtx}
@@ -45,6 +46,7 @@
\batchinput{epstopdf.dtx}
\batchinput{etexcmds.dtx}
\batchinput{flags.dtx}
+\batchinput{gettitlestring.dtx}
\batchinput{grfext.dtx}
\batchinput{grffile.dtx}
\batchinput{holtxdoc.dtx}
@@ -72,6 +74,7 @@
\batchinput{luatex.dtx}
\batchinput{magicnum.dtx}
\batchinput{makerobust.dtx}
+\batchinput{pagegrid.dtx}
\batchinput{pagesel.dtx}
\batchinput{pdfcol.dtx}
\batchinput{pdfcolfoot.dtx}
@@ -85,6 +88,8 @@
\batchinput{picture.dtx}
\batchinput{pmboxdraw.dtx}
\batchinput{refcount.dtx}
+\batchinput{rerunfilecheck.dtx}
+\batchinput{resizegather.dtx}
\batchinput{scrindex.dtx}
\batchinput{selinput.dtx}
\batchinput{setouterhbox.dtx}
diff --git a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
index 72ffd1efdfb..ea2ea564beb 100644
--- a/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
+++ b/Master/texmf-dist/source/latex/oberdiek/oberdiek.tex
@@ -6,7 +6,7 @@
\newcommand*{\Subject}{CTAN:\CTANdir}
\newcommand*{\Author}{Heiko Oberdiek}
\newcommand*{\Email}{oberdiek@uni-freiburg.de}
-\newcommand*{\Date}{2009/10/17}
+\newcommand*{\Date}{2009/12/10}
% Copyright (C) 2006 by
% Heiko Oberdiek <oberdiek@uni-freiburg.de>
@@ -169,12 +169,14 @@
[\entrysep]
\entry{askinclude}{2008/08/11}{2.1}{Interactive asking of included files}%
[\entrysep]
-\entry{atbegshi}{2008/07/31}{1.9}{At begin shipout hook}%
+\entry{atbegshi}{2009/12/02}{1.10}{At begin shipout hook}%
[\entrysep]
\entry{atenddvi}{2007/04/17}{1.1}{At end DVI hook}%
[\entrysep]
\entry{attachfile2}{2009/09/25}{2.5}{attach files into PDF}%
[\entrysep]
+\entry{atveryend}{2009/12/09}{1.2}{Hooks at very end of document}%
+[\entrysep]
\entry{auxhook}{2007/04/06}{1.1}{Hooks for auxiliary files}%
[\entrysep]
\entry{bigintcalc}{2007/11/11}{1.1}{Expandable big integer calculations}%
@@ -183,7 +185,7 @@
[\entrysep]
\entry{bmpsize}{2009/09/04}{1.6}{Extract size and resolution data from bitmap files}%
[\entrysep]
-\entry{bookmark}{2009/08/13}{1.5}{PDF bookmarks}%
+\entry{bookmark}{2009/12/07}{1.7}{PDF bookmarks}%
[\entrysep]
\entry{catchfile}{2007/11/11}{1.2}{Catches the contents of a file}%
[\entrysep]
@@ -207,11 +209,13 @@
[\entrysep]
\entry{flags}{2007/09/30}{0.4}{Flag setting in bit fields}%
[\entrysep]
+\entry{gettitlestring}{2009/12/08}{1.0}{Cleanup strings for title referencing}%
+[\entrysep]
\entry{grfext}{2007/09/30}{1.0}{Managing graphics extensions}%
[\entrysep]
\entry{grffile}{2009/09/25}{1.10}{Extended file name support for graphics}%
[\entrysep]
-\entry{holtxdoc}{2009/08/07}{0.12}{Private additional ltxdoc support}%
+\entry{holtxdoc}{2009/12/02}{0.13}{Private additional ltxdoc support}%
[\entrysep]
\entry{hycolor}{2009/10/02}{1.5}{Code for color options of hyperref/bookmark}%
[\entrysep]
@@ -221,7 +225,7 @@
[\entrysep]
\entry{hypdestopt}{2008/08/08}{2.2}{Hyperref destination optimizer}%
[\entrysep]
-\entry{hypdoc}{2007/11/12}{1.6}{Hyper extensions for doc.sty}%
+\entry{hypdoc}{2009/12/10}{1.7}{Hyper extensions for doc.sty}%
[\entrysep]
\entry{hypgotoe}{2007/10/30}{0.1}{Experimental links to embedded files}%
[\entrysep]
@@ -243,7 +247,7 @@
[\entrysep]
\entry{intcalc}{2007/09/27}{1.1}{Expandable integer calculations}%
[\entrysep]
-\entry{kvoptions}{2009/08/13}{3.4}{Keyval support for \LaTeX{} options}%
+\entry{kvoptions}{2009/12/08}{3.6}{Keyval support for \LaTeX{} options}%
[\entrysep]
\entry{kvsetkeys}{2009/07/30}{1.5}{Key value parser with default handler support}%
[\entrysep]
@@ -255,12 +259,14 @@
[\entrysep]
\entry{luacolor}{2009/04/10}{1.1}{Coloring based on LuaTeX's node attributes}%
[\entrysep]
-\entry{luatex}{2009/04/10}{0.2}{LuaTeX basic definition package}%
+\entry{luatex}{2009/12/02}{0.3}{LuaTeX basic definition package}%
[\entrysep]
\entry{magicnum}{2009/04/10}{1.1}{Magic numbers}%
[\entrysep]
\entry{makerobust}{2006/03/18}{1.0}{Making a macro robust}%
[\entrysep]
+\entry{pagegrid}{2009/12/04}{1.4}{Print page grid in background}%
+[\entrysep]
\entry{pagesel}{2008/08/11}{1.8}{Selecting shipout output pages}%
[\entrysep]
\entry{pdfcol}{2007/12/12}{1.2}{Maintaining additional color stacks for pdfTeX}%
@@ -287,6 +293,10 @@
[\entrysep]
\entry{refcount}{2008/08/11}{3.1}{Data extraction from references}%
[\entrysep]
+\entry{rerunfilecheck}{2009/12/10}{1.0}{Checksum based rerun checks on auxiliary files}%
+[\entrysep]
+\entry{resizegather}{2009/12/05}{1.1}{Automatically resizing of too large equations}%
+[\entrysep]
\entry{scrindex}{2008/08/11}{1.1}{Package index with scr* classes}%
[\entrysep]
\entry{selinput}{2007/09/09}{1.2}{Select input encoding}%
@@ -315,7 +325,7 @@
[\entrysep]
\entry{uniquecounter}{2009/09/11}{1.0}{Provides unlimited unique counter}%
[\entrysep]
-\entry{zref}{2009/08/07}{2.4}{New reference scheme for \LaTeXe{}}%
+\entry{zref}{2009/12/08}{2.7}{New reference scheme for \LaTeXe{}}%
\end{overview}
\section{Packages}
@@ -396,6 +406,19 @@ the attached files.
\tocinclude{attachfile2}
\newpage
+\subsection{\pkgsectformat{atveryend}}
+\label{atveryend}
+\begin{abstract}
+This \LaTeX\ package provides two hooks for \verb|\end{document}|
+that are executed after the hook of \cs{AtEndDocument}.
+\cs{AfterLastShipout} can be used for code that is to be executed
+right after the last \cs{clearpage} before the \xext{.aux} file
+is closed. \cs{AtVeryEndDocument} is used for code after closing
+and final reading of the \xext{.aux} file.
+\end{abstract}
+\tocinclude{atveryend}
+
+\newpage
\subsection{\pkgsectformat{auxhook}}
\label{auxhook}
\begin{abstract}
@@ -561,6 +584,17 @@ decimal number. Currently the bit field is limited to 31 bits.
\tocinclude{flags}
\newpage
+\subsection{\pkgsectformat{gettitlestring}}
+\label{gettitlestring}
+\begin{abstract}
+The \LaTeX\ package addresses packages that are dealing with
+references to titles (\cs{section}, \cs{caption}, \dots).
+The package tries to remove \cs{label} and other
+commands from title strings.
+\end{abstract}
+\tocinclude{gettitlestring}
+
+\newpage
\subsection{\pkgsectformat{grfext}}
\label{grfext}
\begin{abstract}
@@ -839,6 +873,14 @@ that converts an existing macro to a robust one.
\tocinclude{makerobust}
\newpage
+\subsection{\pkgsectformat{pagegrid}}
+\label{pagegrid}
+\begin{abstract}
+The \LaTeX\ package prints a page grid in the background.
+\end{abstract}
+\tocinclude{pagegrid}
+
+\newpage
\subsection{\pkgsectformat{pagesel}}
\label{pagesel}
\begin{abstract}
@@ -971,6 +1013,28 @@ from references. Packages \xpackage{hyperref}, \xpackage{nameref},
\tocinclude{refcount}
\newpage
+\subsection{\pkgsectformat{rerunfilecheck}}
+\label{rerunfilecheck}
+\begin{abstract}
+The package provides additional rerun warnings if some
+auxiliary files have changed. It is based on MD5 checksum,
+provided by \pdfTeX.
+\end{abstract}
+\tocinclude{rerunfilecheck}
+
+\newpage
+\subsection{\pkgsectformat{resizegather}}
+\label{resizegather}
+\begin{abstract}
+Equations that are too large are resized to fit the available
+space. The environment \textsf{gather} of package \xpackage{amsmath}
+is supported. Also the environments \textsf{equation} and
+\textsf{displaymath} are redefined using \textsf{gather}
+and its starred version.
+\end{abstract}
+\tocinclude{resizegather}
+
+\newpage
\subsection{\pkgsectformat{scrindex}}
\label{scrindex}
\begin{abstract}
diff --git a/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx b/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx
new file mode 100644
index 00000000000..a6617b1e440
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/pagegrid.dtx
@@ -0,0 +1,1044 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Heiko Oberdiek.
+%
+% This work consists of the main source file pagegrid.dtx
+% and the derived files
+% pagegrid.sty, pagegrid.pdf, pagegrid.ins, pagegrid.drv,
+% pagegrid-test1.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/pagegrid.dtx
+% CTAN:macros/latex/contrib/oberdiek/pagegrid.pdf
+%
+% Unpacking:
+% (a) If pagegrid.ins is present:
+% tex pagegrid.ins
+% (b) Without pagegrid.ins:
+% tex pagegrid.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{pagegrid.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If pagegrid.drv is present:
+% latex pagegrid.drv
+% (b) Without pagegrid.drv:
+% latex pagegrid.dtx; ...
+% The class ltxdoc loads the configuration file ltxdoc.cfg
+% if available. Here you can specify further options, e.g.
+% use A4 as paper format:
+% \PassOptionsToClass{a4paper}{article}
+%
+% Programm calls to get the documentation (example):
+% pdflatex pagegrid.dtx
+% makeindex -s gind.ist pagegrid.idx
+% pdflatex pagegrid.dtx
+% makeindex -s gind.ist pagegrid.idx
+% pdflatex pagegrid.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/pagegrid.sty
+% TDS:doc/latex/oberdiek/pagegrid.pdf
+% TDS:doc/latex/oberdiek/test/pagegrid-test1.tex
+% TDS:source/latex/oberdiek/pagegrid.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: pagegrid 2009/12/04 v1.4 Print page grid in background (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+This Current Maintainer of this work is Heiko Oberdiek.
+
+This work consists of the main source file pagegrid.dtx
+and the derived files
+ pagegrid.sty, pagegrid.pdf, pagegrid.ins, pagegrid.drv,
+ pagegrid-test1.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{pagegrid.ins}{\from{pagegrid.dtx}{install}}%
+ \file{pagegrid.drv}{\from{pagegrid.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{pagegrid.sty}{\from{pagegrid.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{pagegrid-test1.tex}{\from{pagegrid.dtx}{test1}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* pagegrid.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `pagegrid.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{pagegrid.drv}%
+ [2009/12/04 v1.4 Print page grid in background (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\begin{document}
+ \DocInput{pagegrid.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{624}
+%
+% \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 \~}
+%
+% \GetFileInfo{pagegrid.drv}
+%
+% \title{The \xpackage{pagegrid} package}
+% \date{2009/12/04 v1.4}
+% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% The \LaTeX\ package prints a page grid in the background.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% The package puts a grid on the paper. It was written for
+% developers of a class or package
+% who have to put elements on definite locations on a page
+% (e.g. letter class). The grid allows a faster optical check,
+% whether the positions are correct. If the previewer already
+% offers features for measuring, the the package might be obsolete.
+% Otherwise it saves the developer from printing the page and
+% measuring by hand.
+%
+% \subsection{Options}
+%
+% Options are evaluated in the following order:
+% \begin{enumerate}
+% \item
+% Configuration file \xfile{pagegrid.cfg} using \cs{pagegridsetup}
+% if the file exists.
+% \item
+% Package options given for \cs{usepackage}.
+% \item
+% Later calls of \cs{pagegridsetup}.
+% \end{enumerate}
+% \begin{declcs}{pagegridsetup}\M{option list}
+% \end{declcs}
+% The options are key value options. Boolean options are enabled by
+% default (without value) or by using the explicit value \texttt{true}.
+% Value \texttt{false} disable the option.
+%
+% \subsubsection{Options \xoption{enable}, \xoption{disable}}
+%
+% \begin{description}
+% \item[\xoption{enable}:] This boolean option controls whether the page grid
+% is drawn. As default the page grid drawing is activated.
+% \item[\xoption{disable}:] It is the opposite
+% of option \xoption{enable}. It was added for convenience and
+% allows the abbreviation \texttt{disable} for \texttt{enable=false}.
+% \end{description}
+%
+% \subsubsection{Grid origins}
+%
+% The package supports up to two grids on a page allowing
+% measurement from opposite directions. As default two grids are drawn,
+% the first from bottom left to top right. The origin of the second
+% grid is at the opposite top right corner.
+% The origins are controlled by the following options.
+% The number of grids (one or two) depend on the number of these options
+% in one call of \cs{pagegridsetup}.
+% The following frame shows a paper and in its corners are the
+% corresponding options. At the left and right side alias names
+% are given for the options inside the paper.
+% \begin{quote}
+% \begin{tabular}{@{}r|@{\,}l@{\qquad}r@{\,}|l@{}}
+% \cline{2-3}
+% \xoption{left-top}, \xoption{lt}, \xoption{top-left}
+% & \vphantom{\"U}\xoption{tl} & \xoption{tr}
+% & \xoption{top-right}, \xoption{rt}, \xoption{right-top}\\
+% &&&\\
+% \xoption{left-bottom}, \xoption{lb}, \xoption{bottom-left}
+% & \xoption{bl} & \xoption{br}
+% & \xoption{bottom-right}, \xoption{rb}, \xoption{right-bottom}\\
+% \cline{2-3}
+% \end{tabular}
+% \end{quote}
+% Examples:
+% \begin{quote}
+% |\pagegridsetup{bl,tr}|
+% \end{quote}
+% This is the default setting with two grids as described previously.
+% The following setups one grid only. Its origin is the upper left
+% corner:
+% \begin{quote}
+% |\pagegridsetup{top-left}|
+% \end{quote}
+%
+% \subsubsection{Grid unit}
+%
+% \begin{description}
+% \item[\xoption{step}] This option takes a length and
+% setups the unit for the grid. The page width and page height
+% should be multiples of this unit.
+% Currently the default is \texttt{1mm}. But this might change
+% later by a heuristic based on the paper size.
+% \end{description}
+%
+% \subsubsection{Color options}
+%
+% The basic grid lines are drawn as ultra thin help lines and is only
+% drawn for the first grid.
+% Each tenth and fiftyth line of the basic net is drawn thicker in a special
+% color for the two grids.
+% \begin{description}
+% \item[\xoption{firstcolor}:] Color for the thicker lines and the arrows
+% of the first grid. Default value is \texttt{red}.
+% \item[\xoption{secondcolor}:] Color for the thicker lines and the arrows
+% of the second grid. Default value is \texttt{blue}.
+% \end{description}
+% Use a color specification that package \xpackage{tikz} understands.
+% (The grid is drawn with \xpackage{pgf}/\xpackage{tikz}.)
+%
+% \subsubsection{Arrow options}
+%
+% Arrows are put at the origin at the grid to show the grid start
+% and the direction of the grid.
+% \begin{description}
+% \item[\xoption{arrows}:] This boolean option turns the arrows on or off.
+% As default arrows are enabled.
+% \item[\xoption{arrowlength}:] The length given as value is the
+% length of the edge of a square at the origin within the
+% arrow is put as diagonal. Default is 10 times the grid unit (10\,mm).
+% The real arrow length is this length multiplied by $\sqrt2$.
+% \end{description}
+%
+% \subsubsection{Miscellaneous options}
+%
+% \begin{description}
+% \item[\xoption{double}:] The output page is doubled, one without page
+% grid and the other with page grid. Possible values are shown in the
+% following table:
+% \begin{quote}
+% \begin{tabular}{ll}
+% Option & Meaning\\
+% \hline
+% |false| & Turns option off.\\
+% |first| & Grid page comes first.\\
+% |last| & Grid page comes after the page without grid.\\
+% |true| & Same as |last|.\\
+% \meta{no value} & Same as |true|.\\
+% \end{tabular}
+% \end{quote}
+% \textbf{Note:}
+% The double output of the page has side effects.
+% All whatits are executed twice, for example: file writing
+% and anchor setting. Some unwanted actions are catched such
+% as multiple \cs{label} definitions, duplicate entries in
+% the table of contents. For bookmarks, use package \xpackage{bookmarks}.
+% \item[\xoption{foreground}:] Boolean option, default is \texttt{false}.
+% Sometimes there might be elements on the page (e.g. large images)
+% that hide the grid. Then option \xoption{foreground} puts the grids
+% over the current output page.
+% \end{description}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\let\expandafter\x\csname ver@pagegrid.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \else
+ \catcode35 6 % #
+ \expandafter\ifx\csname PackageInfo\endcsname\relax
+ \def\x#1#2{%
+ \immediate\write-1{Package #1 Info: #2.}%
+ }%
+ \else
+ \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
+ \fi
+ \x{pagegrid}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode91 12 % [
+ \catcode93 12 % ]
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1#2#3[#4]{\endgroup
+ \immediate\write-1{Package: #3 #4}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@pagegrid.sty\endcsname
+\ProvidesPackage{pagegrid}%
+ [2009/12/04 v1.4 Print page grid in background (HO)]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname pagegrid@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\pagegrid@AtEnd{%
+ \pagegrid@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{9}{10}% (tab)
+\TMP@EnsureCode{10}{12}% ^^J
+\TMP@EnsureCode{33}{12}% !
+\TMP@EnsureCode{34}{12}% "
+\TMP@EnsureCode{36}{3}% $
+\TMP@EnsureCode{38}{4}% &
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{59}{12}% ;
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{63}{12}% ?
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{94}{7}% ^ (superscript)
+\TMP@EnsureCode{96}{12}% `
+\TMP@EnsureCode{124}{12}% |
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{tikz}
+\RequirePackage{atbegshi}[2009/12/02]
+\RequirePackage{kvoptions}[2009/07/17]
+% \end{macrocode}
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname stockwidth\endcsname\relax
+ \def\pagegrid@width{\paperwidth}%
+ \def\pagegrid@height{\paperheight}%
+\else
+ \def\pagegrid@width{\stockwidth}%
+ \def\pagegrid@height{\stockheight}%
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\SetupKeyvalOptions{%
+ family=pagegrid,%
+ prefix=pagegrid@,%
+}
+\def\pagegrid@init{%
+ \let\pagegrid@origin@a\@empty
+ \let\pagegrid@origin@b\@empty
+ \let\pagegrid@init\relax
+}
+\let\pagegrid@@init\pagegrid@init
+\def\pagegrid@origin@a{bl}
+\def\pagegrid@origin@b{tr}
+\def\pagegrid@SetOrigin#1{%
+ \pagegrid@init
+ \ifx\pagegrid@origin@a\@empty
+ \def\pagegrid@origin@a{#1}%
+ \else
+ \ifx\pagegrid@origin@b\@empty
+ \else
+ \let\pagegrid@origin@a\pagegrid@origin@b
+ \fi
+ \def\pagegrid@origin@b{#1}%
+ \fi
+}
+\def\pagegrid@temp#1{%
+ \DeclareVoidOption{#1}{\pagegrid@SetOrigin{#1}}%
+ \@namedef{pagegrid@N@#1}{#1}%
+}
+\pagegrid@temp{bl}
+\pagegrid@temp{br}
+\pagegrid@temp{tl}
+\pagegrid@temp{tr}
+\def\pagegrid@temp#1#2{%
+ \DeclareVoidOption{#2}{\pagegrid@SetOrigin{#1}}%
+}%
+\pagegrid@temp{bl}{lb}
+\pagegrid@temp{br}{rb}
+\pagegrid@temp{tl}{lt}
+\pagegrid@temp{tr}{rt}
+\pagegrid@temp{bl}{bottom-left}
+\pagegrid@temp{br}{bottom-right}
+\pagegrid@temp{tl}{top-left}
+\pagegrid@temp{tr}{top-right}
+\pagegrid@temp{bl}{left-bottom}
+\pagegrid@temp{br}{right-bottom}
+\pagegrid@temp{tl}{left-top}
+\pagegrid@temp{tr}{right-top}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareBoolOption[true]{enable}
+\DeclareComplementaryOption{disable}{enable}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareBoolOption{foreground}
+% \end{macrocode}
+% \begin{macrocode}
+\newlength{\pagegrid@step}
+\define@key{pagegrid}{step}{%
+ \setlength{\pagegrid@step}{#1}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareStringOption[red]{firstcolor}
+\DeclareStringOption[blue]{secondcolor}
+% \end{macrocode}
+% \begin{macrocode}
+\DeclareBoolOption[true]{arrows}
+\newlength\pagegrid@arrowlength
+\pagegrid@arrowlength=\z@
+\define@key{pagegrid}{arrowlength}{%
+ \setlength{\pagegrid@arrowlength}{#1}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\define@key{pagegrid}{double}[true]{%
+ \@ifundefined{pagegrid@double@#1}{%
+ \PackageWarning{pagegrid}{%
+ Unsupported value `#1' for option `double'.\MessageBreak
+ Known values are:\MessageBreak
+ `false', `first', `last', `true'.\MessageBreak
+ Now `false' is used%
+ }%
+ \chardef\pagegrid@double\z@
+ }{%
+ \chardef\pagegrid@double\csname pagegrid@double@#1\endcsname\relax
+ }%
+}
+\@namedef{pagegrid@double@false}{0}
+\@namedef{pagegrid@double@first}{1}
+\@namedef{pagegrid@double@last}{2}
+\@namedef{pagegrid@double@true}{2}
+\chardef\pagegrid@double\z@
+% \end{macrocode}
+% \begin{macrocode}
+\newcommand*{\pagegridsetup}{%
+ \let\pagegrid@init\pagegrid@@init
+ \setkeys{pagegrid}%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\pagegridsetup{%
+ step=1mm%
+}
+\InputIfFileExists{pagegrid.cfg}{}%
+\ProcessKeyvalOptions*\relax
+\AtBeginDocument{%
+ \ifdim\pagegrid@arrowlength>\z@
+ \else
+ \pagegrid@arrowlength=10\pagegrid@step
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\pagegridShipoutDoubleBegin{%
+ \begingroup
+ \let\newlabel\@gobbletwo
+ \let\zref@newlabel\@gobbletwo
+ \let\@writefile\@gobbletwo
+ \let\select@language\@gobble
+}
+\def\pagegridShipoutDoubleEnd{%
+ \endgroup
+}
+\def\pagegrid@WriteDouble#1#2{%
+ \immediate\write#1{%
+ \@backslashchar csname %
+ pagegridShipoutDouble#2%
+ \@backslashchar endcsname%
+ }%
+}
+\def\pagegrid@ShipoutDouble#1{%
+ \begingroup
+ \if@filesw
+ \pagegrid@WriteDouble\@mainaux{Begin}%
+ \ifx\@auxout\@partaux
+ \pagegrid@WriteDouble\@partaux{Begin}%
+ \def\pagegrid@temp{%
+ \pagegrid@WriteDouble\@mainaux{End}%
+ \pagegrid@WriteDouble\@partaux{End}%
+ }%
+ \else
+ \def\pagegrid@temp{%
+ \pagegrid@WriteDouble\@mainaux{End}%
+ }%
+ \fi
+ \else
+ \def\pagegrid@temp{}%
+ \fi
+ \let\protect\noexpand
+ \AtBeginShipoutOriginalShipout\copy#1\relax
+ \pagegrid@temp
+ \endgroup
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AtBeginShipout{%
+ \ifdim\pagegrid@step>\z@
+ \else
+ \pagegrid@enablefalse
+ \fi
+ \ifpagegrid@enable
+ \ifnum\pagegrid@double=\@ne
+ \pagegrid@ShipoutDouble\AtBeginShipoutBox
+ \else
+ \ifnum\pagegrid@double=\tw@
+ \@ifundefined{pagegrid@DoubleBox}{%
+ \newbox\pagegrid@DoubleBox
+ }{}%
+ \setbox\pagegrid@DoubleBox=\copy\AtBeginShipoutBox
+ \fi
+ \fi
+ \ifpagegrid@foreground
+ \expandafter\AtBeginShipoutUpperLeftForeground
+ \else
+ \expandafter\AtBeginShipoutUpperLeft
+ \fi
+ {%
+ \put(0,0){%
+ \makebox(0,0)[lt]{%
+ \begin{tikzpicture}[%
+ bl/.style={},%
+ br/.style={xshift=\pagegrid@width,xscale=-1},%
+ tl/.style={yshift=\pagegrid@height,yscale=-1},%
+ tr/.style={xshift=\pagegrid@width,%
+ yshift=\pagegrid@height,scale=-1}%
+ ]%
+ \useasboundingbox
+ (0mm,\pagegrid@height) rectangle (0mm,\pagegrid@height);%
+ \draw[%
+ \pagegrid@origin@a,%
+ step=\pagegrid@step,%
+ style=help lines,%
+ ultra thin%
+ ] (0mm,0mm) grid (\pagegrid@width,\pagegrid@height);%
+ \ifx\pagegrid@origin@b\@empty
+ \else
+ \draw[%
+ \pagegrid@origin@b,%
+ step=10\pagegrid@step,%
+ {\pagegrid@secondcolor},%
+ very thin%
+ ] (0mm,0mm) grid (\pagegrid@width,\pagegrid@height);%
+ \fi
+ \draw[%
+ \pagegrid@origin@a,%
+ step=10\pagegrid@step,%
+ {\pagegrid@firstcolor},%
+ very thin%
+ ] (0mm,0mm) grid (\pagegrid@width,\pagegrid@height);%
+ \ifx\pagegrid@origin@b\@empty
+ \else
+ \draw[%
+ \pagegrid@origin@b,%
+ step=50\pagegrid@step,%
+ {\pagegrid@secondcolor},%
+ thick%
+ ] (0mm,0mm) grid (\pagegrid@width,\pagegrid@height);%
+ \fi
+ \draw[%
+ \pagegrid@origin@a,%
+ step=50\pagegrid@step,%
+ {\pagegrid@firstcolor},%
+ thick%
+ ] (0mm,0mm) grid (\pagegrid@width,\pagegrid@height);%
+ \ifpagegrid@arrows
+ \ifx\pagegrid@origin@b\@empty
+ \else
+ \draw[%
+ \pagegrid@origin@b,%
+ {\pagegrid@secondcolor},%
+ stroke,%
+ line width=1pt,%
+ line cap=round%
+ ] (0mm,0mm) %
+ -- (\pagegrid@arrowlength,\pagegrid@arrowlength) %
+ (\pagegrid@arrowlength,.5\pagegrid@arrowlength) %
+ -- (\pagegrid@arrowlength,\pagegrid@arrowlength) %
+ -- (.5\pagegrid@arrowlength,\pagegrid@arrowlength);%
+ \fi
+ \draw[%
+ \pagegrid@origin@a,%
+ {\pagegrid@firstcolor},%
+ stroke,%
+ line width=1pt,%
+ line cap=round%
+ ] (0mm,0mm) %
+ -- (\pagegrid@arrowlength,\pagegrid@arrowlength) %
+ (\pagegrid@arrowlength,.5\pagegrid@arrowlength) %
+ -- (\pagegrid@arrowlength,\pagegrid@arrowlength) %
+ -- (.5\pagegrid@arrowlength,\pagegrid@arrowlength);%
+ \fi
+ \end{tikzpicture}%
+ }%
+ }%
+ }%
+ \ifnum\pagegrid@double=\tw@
+ \pagegrid@ShipoutDouble\pagegrid@DoubleBox
+ \fi
+ \fi
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\pagegrid@AtEnd
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@ 1 %
+ \repeat
+}
+\expandafter\ifx\csname LoadCommand\endcsname\relax
+ \def\LoadCommand{\input pagegrid.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \LoadCommand
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/oberdiek/pagegrid.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/pagegrid.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+% |unzip oberdiek.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \paragraph{Script installation.}
+% Check the directory \xfile{TDS:scripts/oberdiek/} for
+% scripts that need further installation steps.
+% Package \xpackage{attachfile2} comes with the Perl script
+% \xfile{pdfatfi.pl} that should be installed in such a way
+% that it can be called as \texttt{pdfatfi}.
+% Example (linux):
+% \begin{quote}
+% |chmod +x scripts/oberdiek/pdfatfi.pl|\\
+% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+% \verb|tex pagegrid.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% pagegrid.sty & tex/generic/oberdiek/pagegrid.sty\\
+% pagegrid.pdf & doc/latex/oberdiek/pagegrid.pdf\\
+% test/pagegrid-test1.tex & doc/latex/oberdiek/test/pagegrid-test1.tex\\
+% pagegrid.dtx & source/latex/oberdiek/pagegrid.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \teTeX\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Attached source.}
+%
+% The PDF documentation on CTAN also includes the
+% \xfile{.dtx} source file. It can be extracted by
+% AcrobatReader 6 or higher. Another option is \textsf{pdftk},
+% e.g. unpack the file into the current directory:
+% \begin{quote}
+% \verb|pdftk pagegrid.pdf unpack_files output .|
+% \end{quote}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+% \verb|latex \let\install=y\input{pagegrid.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+% \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex pagegrid.dtx
+%makeindex -s gind.ist pagegrid.idx
+%pdflatex pagegrid.dtx
+%makeindex -s gind.ist pagegrid.idx
+%pdflatex pagegrid.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \section{Acknowledgement}
+%
+% \begin{description}
+% \item[Klaus Braune:]
+% He provided the idea and the first \xpackage{tikz} code.
+% \end{description}
+%
+% \begin{History}
+% \begin{Version}{2009/11/06 v1.0}
+% \item
+% The first version.
+% \end{Version}
+% \begin{Version}{2009/11/06 v1.1}
+% \item
+% Option \xoption{foreground} added.
+% \end{Version}
+% \begin{Version}{2009/12/02 v1.2}
+% \item
+% Color options, arrow options added.
+% \item
+% Names for origin options changed.
+% \end{Version}
+% \begin{Version}{2009/12/03 v1.3}
+% \item
+% Option \xoption{double} added.
+% \item
+% First CTAN release.
+% \end{Version}
+% \begin{Version}{2009/12/04 v1.4}
+% \item
+% Option \xoption{double}: Some unwanted side effects removed.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx b/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx
new file mode 100644
index 00000000000..04c79a1d79e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/rerunfilecheck.dtx
@@ -0,0 +1,1031 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Heiko Oberdiek.
+%
+% This work consists of the main source file rerunfilecheck.dtx
+% and the derived files
+% rerunfilecheck.sty, rerunfilecheck.pdf, rerunfilecheck.ins,
+% rerunfilecheck.drv, rerunfilecheck-example.cfg,
+% rerunfilecheck-test1.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/rerunfilecheck.dtx
+% CTAN:macros/latex/contrib/oberdiek/rerunfilecheck.pdf
+%
+% Unpacking:
+% (a) If rerunfilecheck.ins is present:
+% tex rerunfilecheck.ins
+% (b) Without rerunfilecheck.ins:
+% tex rerunfilecheck.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{rerunfilecheck.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If rerunfilecheck.drv is present:
+% latex rerunfilecheck.drv
+% (b) Without rerunfilecheck.drv:
+% latex rerunfilecheck.dtx; ...
+% The class ltxdoc loads the configuration file ltxdoc.cfg
+% if available. Here you can specify further options, e.g.
+% use A4 as paper format:
+% \PassOptionsToClass{a4paper}{article}
+%
+% Programm calls to get the documentation (example):
+% pdflatex rerunfilecheck.dtx
+% makeindex -s gind.ist rerunfilecheck.idx
+% pdflatex rerunfilecheck.dtx
+% makeindex -s gind.ist rerunfilecheck.idx
+% pdflatex rerunfilecheck.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/rerunfilecheck.sty
+% TDS:doc/latex/oberdiek/rerunfilecheck.pdf
+% TDS:doc/latex/oberdiek/rerunfilecheck-example.cfg
+% TDS:doc/latex/oberdiek/test/rerunfilecheck-test1.tex
+% TDS:source/latex/oberdiek/rerunfilecheck.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: rerunfilecheck 2009/12/10 v1.0 Checksum based rerun checks on auxiliary files (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+This Current Maintainer of this work is Heiko Oberdiek.
+
+This work consists of the main source file rerunfilecheck.dtx
+and the derived files
+ rerunfilecheck.sty, rerunfilecheck.pdf, rerunfilecheck.ins,
+ rerunfilecheck.drv, rerunfilecheck-example.cfg,
+ rerunfilecheck-test1.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{rerunfilecheck.ins}{\from{rerunfilecheck.dtx}{install}}%
+ \file{rerunfilecheck.drv}{\from{rerunfilecheck.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{rerunfilecheck.sty}{\from{rerunfilecheck.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{rerunfilecheck-test1.tex}{\from{rerunfilecheck.dtx}{test1}}%
+ \nopreamble
+ \nopostamble
+ \usedir{doc/latex/oberdiek}%
+ \file{rerunfilecheck-example.cfg}{\from{rerunfilecheck.dtx}{cfg}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* rerunfilecheck.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `rerunfilecheck.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{rerunfilecheck.drv}%
+ [2009/12/10 v1.0 Checksum based rerun checks on auxiliary files (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\begin{document}
+ \DocInput{rerunfilecheck.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{634}
+%
+% \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 \~}
+%
+% \GetFileInfo{rerunfilecheck.drv}
+%
+% \title{The \xpackage{rerunfilecheck} package}
+% \date{2009/12/10 v1.0}
+% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% The package provides additional rerun warnings if some
+% auxiliary files have changed. It is based on MD5 checksum,
+% provided by \pdfTeX.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% \LaTeX\ informs the user, when to run \LaTeX\ again, if the
+% references have changed. It has the old references from the
+% first reading of the \xext{.aux} files already in memory, thus
+% it compares them with the new version of the \xext{.aux} file
+% at the end of the document. However this rerun warnings are
+% not given for the table of contents and other data stored
+% in the \xext{.aux} files or other auxiliary files.
+% Usually many of these data as the table of contents is not keep
+% in memory. If someone wants to detect changes, he has either
+% to keep the data in memory. This does not scale well with huge
+% documents. Or he copies the file before they are changed. Slow
+% I/O operations cost time.
+%
+% Since version 1.30.0 \pdfTeX\ provides \cs{pdfmdfivesum}
+% and \cs{pdffilesize}.
+% These features are also available in \LuaTeX, provided by package
+% \xpackage{pdftexcmds}.
+% Thus this package \xpackage{rerunfilecheck} uses these features to
+% detect file changes. This saves the packages from keeping
+% the whole files in memory or in file copies.
+% The drawback are different files with the same size and the
+% same MD5 checksum (seldom, hopefully).
+%
+% \subsection{Options}
+%
+% All options are key value options of boolean type.
+% No option or |true| turns an option on, |false| disables
+% an option.
+% \begin{description}
+% \item[\xoption{mainaux}:]
+% Check the main \xext{.aux} file.
+% \item[\xoption{partaux}:]
+% Check the \xext{.aux} files from \cs{include} files.
+% \item[\xoption{starttoc}:]
+% Add the rerun checks in \cs{@starttoc} that is called by
+% \cs{tableofcontents}, \cs{listoffigures}, \dots
+% \item[\xoption{index}, \xoption{glossary}:]
+% \LaTeX's original \cs{makeindex} and \cs{makeglossary} are
+% redefined to add the rerun checks. The options do not have
+% an effect, if \cs{makeindex}/\cs{makeglossary} are already
+% called or if a package or class had redefined or will
+% redefine them.
+% \item[\xoption{aux}:]
+% This option turns all previous options on or off.
+% ``aux'' means auxiliary file.
+% \end{description}
+% The default for the options is |false|, because
+% some internals must be redefined to insert the
+% rerun checks.
+% The options can be set in \cs{usepackage} or
+% the configuration file \xfile{rerunfilecheck.cfg}.
+%
+% \begin{declcs}{RerunFileCheckSetup} \M{key value list}
+% \end{declcs}
+% Options can also be set using \cs{RerunFileCheckSetup}.
+% Currently all options are disabled after the package
+% is loaded. Thus \cs{RerunFileCheckSetup} makes sense in
+% the configuration file only.
+%
+% Example for the configuration file:
+% \begin{macrocode}
+%<*cfg>
+\ProvidesFile{rerunfilecheck.cfg}[2009/12/10 Default configuration]%
+\RerunFileCheckSetup{aux}
+%</cfg>
+% \end{macrocode}
+%
+% \subsection{Interface for class/package authors}
+%
+% \begin{declcs}{RerunFileCheck} \M{file} \M{file closing action} \M{rerun warning}
+% \end{declcs}
+% If you want to add a rerun check, call \cs{RerunFileCheck} right before
+% an output file is opened for writing. The macro first remembers
+% the current checksum of \meta{file}.
+% The file is checked again right before the end of the job.
+% Macro \cs{AtVeryEndDocument} of package \xpackage{atveryend}
+% is used to place the check after the main aux file is closed
+% in |\end{document}|. Before reading the file again, it must be
+% closed. Provide the code for closing in argument \meta{file closing action}.
+% Do not forget \cs{immediate} before \cs{openout}. Otherwise the
+% closing action would be delayed to the next shipout that never happens
+% (the last page is already shipped out).
+% If the file has changed, \cs{RerunFileCheck} informs the user with
+% a warning that the file has changed and says the magic word ``Rerun''.
+% If the last argument \meta{rerun warning} is not empty, then
+% the rerun sentence is replaced by it. Usually the phrase
+% ``to get something right'' is added.
+% As example the relevant part of the redefined \cs{makeindex}
+% is shown, see package code:
+%\begin{quote}
+%\begin{verbatim}
+%\newwrite\@indexfile
+%\RerunFileCheck{\jobname.idx}{%
+% \immediate\closeout\@indexfile
+%}{%
+% Rerun LaTeX/makeindex to get index right%
+%}%
+%\immediate\openout\@indexfile=\jobname.idx %
+%\end{verbatim}
+%\end{quote}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\let\expandafter\x\csname ver@rerunfilecheck.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \else
+ \catcode35 6 % #
+ \expandafter\ifx\csname PackageInfo\endcsname\relax
+ \def\x#1#2{%
+ \immediate\write-1{Package #1 Info: #2.}%
+ }%
+ \else
+ \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
+ \fi
+ \x{rerunfilecheck}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode91 12 % [
+ \catcode93 12 % ]
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1#2#3[#4]{\endgroup
+ \immediate\write-1{Package: #3 #4}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@rerunfilecheck.sty\endcsname
+\ProvidesPackage{rerunfilecheck}%
+ [2009/12/10 v1.0 Checksum based rerun checks on auxiliary files (HO)]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname ReFiCh@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\ReFiCh@AtEnd{%
+ \ReFiCh@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{59}{12}% ;
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{96}{12}% `
+\g@addto@macro\ReFiCh@AtEnd{\endinput}
+% \end{macrocode}
+%
+% \subsection{Options}
+%
+% \begin{macrocode}
+\RequirePackage{kvoptions}[2009/07/17]
+\SetupKeyvalOptions{%
+ family=rerunfilecheck,%
+ prefix=ReFiCh@%
+}
+% \end{macrocode}
+% \begin{macro}{\RerunFileCheckSetup}
+% \begin{macrocode}
+\newcommand*{\RerunFileCheckSetup}{%
+ \setkeys{rerunfilecheck}%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\DeclareBoolOption{mainaux}
+\DeclareBoolOption{partaux}
+\DeclareBoolOption{starttoc}
+\DeclareBoolOption{index}
+\DeclareBoolOption{glossary}
+\define@key{rerunfilecheck}{aux}[true]{%
+ \RerunFileCheckSetup{%
+ mainaux={#1},%
+ partaux={#1},%
+ starttoc={#1},%
+ index={#1},%
+ glossary={#1}%
+ }%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\InputIfFileExists{rerunfilecheck.cfg}{}{}
+\ProcessKeyvalOptions*
+% \end{macrocode}
+%
+% \begin{macro}{\ReFiCh@DisableOption}
+% \begin{macrocode}
+\def\ReFiCh@DisableOption{%
+ \DisableKeyvalOption[%
+ action=warning,%
+ package=rerunfilecheck%
+ ]{rerunfilecheck}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Check for checksum feature}
+%
+% \begin{macrocode}
+\RequirePackage{infwarerr}[2007/09/09]
+\RequirePackage{pdftexcmds}[2009/04/10]
+% \end{macrocode}
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdf@filemdfivesum\endcsname\relax
+ \@PackageInfoNoLine{rerunfilecheck}{%
+ Feature \string\pdfmdfivesum\space is not available\MessageBreak
+ (e.g. pdfTeX or LuaTeX with package `pdftexcmds').\MessageBreak
+ Therefore file contents cannot be checked efficiently\MessageBreak
+ and the loading of the package is aborted%
+ }%
+ \newcommand*{\RerunFileCheck}[3]{}%
+ \renewcommand*{\RerunFileCheckSetup}[1]{}%
+ \expandafter\ReFiCh@AtEnd
+\fi
+% \end{macrocode}
+%
+% \subsection{Standard \xext{.aux} files}
+%
+% \begin{macrocode}
+\ifReFiCh@partaux
+ \let\ReFiCh@org@include\@include
+ \def\@include#1 {%
+ \if@filesw
+ \RerunFileCheck{#1.aux}{}{}%
+ \fi
+ \ReFiCh@org@include{#1} %
+ }%
+\fi
+\ifReFiCh@mainaux
+ \AtBeginDocument{%
+ \ReFiCh@mainauxfalse
+ }%
+ \ifReFiCh@mainaux
+ \AtEndOfPackage{%
+ \RerunFileCheck{\jobname.aux}{}{}%
+ }%
+ \else
+ \if@filesw
+ \@PackageWarningNoLine{rerunfilecheck}{%
+ Main aux file check is disabled,\MessageBreak
+ because the file is already opened.\MessageBreak
+ Load the package before \string\begin{document}%
+ }%
+ \fi
+ \fi
+\fi
+\ifReFiCh@starttoc
+ \let\ReFiCh@org@starttoc\@starttoc
+ \def\@starttoc#1{%
+ \if@filesw
+ \RerunFileCheck{\jobname.#1}{%
+ \@ifundefined{tf@#1}{%
+ }{%
+ \immediate\closeout\csname tf@#1\endcsname
+ }%
+ }{}%
+ \fi
+ \ReFiCh@org@starttoc{#1}%
+ }%
+\fi
+\ifReFiCh@index
+ \ifx\makeindex\@empty
+ \@PackageWarningNoLine{rerunfilecheck}{%
+ Option `index' ignored,\MessageBreak
+ because \string\makeindex\space has already been called%
+ }%
+ \else
+ \def\ReFiCh@temp{%
+ \newwrite\@indexfile
+ \immediate\openout\@indexfile=\jobname.idx %
+ \def\index{%
+ \@bsphack
+ \begingroup
+ \@sanitize
+ \@wrindex
+ }%
+ \typeout{Writing index file \jobname.idx}%
+ \let\makeindex\@empty
+ }%
+ \ifx\ReFiCh@temp\makeindex
+ \def\makeindex{%
+ \newwrite\@indexfile
+ \RerunFileCheck{\jobname.idx}{%
+ \immediate\closeout\@indexfile
+ }{%
+ Rerun LaTeX/makeindex to get index right%
+ }%
+ \immediate\openout\@indexfile=\jobname.idx %
+ \def\index{%
+ \@bsphack
+ \begingroup
+ \@sanitize
+ \@wrindex
+ }%
+ \typeout{Writing index file \jobname.idx}%
+ \let\makeindex\@empty
+ }%
+ \else
+ \@PackageInfoNoLine{rerunfilecheck}{%
+ Option `index': unsupported version of \string\makeindex
+ }%
+ \fi
+ \fi
+\fi
+\ifReFiCh@glossary
+ \ifx\makeglossary\@empty
+ \@PackageWarningNoLine{rerunfilecheck}{%
+ Option `glossary' ignored,\MessageBreak
+ because \string\makeglossary\space has already been called%
+ }%
+ \else
+ \def\ReFiCh@temp{%
+ \newwrite\@glossaryfile
+ \immediate\openout\@glossaryfile=\jobname.glo %
+ \def\glossary{%
+ \@bsphack
+ \begingroup
+ \@sanitize
+ \@wrglossary
+ }%
+ \typeout{Writing glossary file \jobname.glo }%
+ \let\makeglossary\@empty
+ }%
+ \ifx\ReFiCh@temp\makeglossary
+ \def\ReFiCh@temp{%
+ \newwrite\@glossaryfile
+ \RerunFileCheck{\jobname.glo}{%
+ \immediate\closeout\@glossaryfile
+ }{%
+ Rerun LaTeX/makeindex to get glossary right%
+ }%
+ \immediate\openout\@glossaryfile=\jobname.glo %
+ \def\glossary{%
+ \@bsphack
+ \begingroup
+ \@sanitize
+ \@wrglossary
+ }%
+ \typeout{Writing glossary file \jobname.glo}%
+ \let\makeglossary\@empty
+ }%
+ \else
+ \@PackageInfoNoLine{rerunfilecheck}{%
+ Option `glossary': unsupported version of \string\makeglossary
+ }%
+ \fi
+ \fi
+\fi
+\ReFiCh@DisableOption{mainaux}
+\ReFiCh@DisableOption{partaux}
+\ReFiCh@DisableOption{starttoc}
+\ReFiCh@DisableOption{index}
+\ReFiCh@DisableOption{glossary}
+\ReFiCh@DisableOption{aux}
+% \end{macrocode}
+%
+% \subsection{Rerun check}
+%
+% \begin{macrocode}
+\RequirePackage{atveryend}[2009/12/07]
+\RequirePackage{uniquecounter}[2009/09/11]
+% \end{macrocode}
+%
+% \begin{macro}{\ReFiCh@CheckSum}
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname pdf@filesize\endcsname\relax
+ \def\ReFiCh@CheckSum{%
+ \pdf@filemdfivesum
+ }%
+\else
+ \def\ReFiCh@CheckSum#1{%
+ \pdf@filemdfivesum{#1}%
+ \ReFiCh@Separator
+ \pdf@filesize{#1}%
+ }%
+\fi
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ReFiCh@NoFile}
+% \begin{macrocode}
+\def\ReFiCh@Separator{;}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ReFiCh@NoFile}
+% \begin{macrocode}
+\def\ReFiCh@NoFile{<no file>}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\UniqueCounterNew{rerunfilecheck}
+% \end{macrocode}
+%
+% \begin{macro}{\RerunFileCheck}
+% \begin{macrocode}
+\newcommand*{\RerunFileCheck}{%
+ \UniqueCounterCall{rerunfilecheck}\ReFiCh@RerunFileCheck
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ReFiCh@RerunFileCheck}
+% \begin{macrocode}
+\def\ReFiCh@RerunFileCheck#1{%
+ \expandafter\ReFiCh@@RerunFileCheck\csname ReFiCh@#1\endcsname
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ReFiCh@@RerunFileCheck}
+% \begin{macrocode}
+\def\ReFiCh@@RerunFileCheck#1#2#3#4{%
+ \xdef#1{\ReFiCh@CheckSum{#2}}%
+ \ifx#1\ReFiCh@Separator
+ \global\let#1\ReFiCh@NoFile
+ \fi
+ \AtVeryEndDocument{%
+ \begingroup
+ #3%
+ \edef\x{\ReFiCh@CheckSum{#2}}%
+ \ifx\x\ReFiCh@Separator
+ \let\x\ReFiCh@NoFile
+ \fi
+ \ifx#1\x
+ \@PackageInfoNoLine{rerunfilecheck}{%
+ File `#2' has not changed.\MessageBreak
+ Checksum: \x
+ }%
+ \else
+ \ifnum
+ \ReFiCh@IsAux#2\relax.aux\relax\@nil
+ \ifx#1\ReFiCh@NoFile 1\else 0\fi
+ \ifx\x\ReFiCh@AuxEmptyUnix 1%
+ \else
+ \ifx\x\ReFiCh@AuxEmptyDos 1\fi
+ \fi
+ =111 %
+ \@PackageInfoNoLine{rerunfilecheck}{%
+ File `#2' is empty .aux file.\MessageBreak
+ Before: #1\MessageBreak
+ After: \space\x
+ }%
+ \else
+ \@PackageWarningNoLine{rerunfilecheck}{%
+ File `#2' has changed.%
+ \ifx\\#4\\%
+ \space Rerun%
+ \else
+ \MessageBreak
+ #4%
+ \fi
+ }%
+ \@PackageInfoNoLine{rerunfilecheck}{%
+ Checksums for `#2':\MessageBreak
+ Before: #1\MessageBreak
+ After: \space\x
+ }%
+ \fi
+ \fi
+ \endgroup
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\def\ReFiCh@IsAux#1.aux\relax#2\@nil{%
+ \ifx\hbox#2\hbox
+ 0%
+ \else
+ 1%
+ \fi
+}
+% \end{macrocode}
+% \begin{macrocode}
+\def\ReFiCh@AuxEmptyUnix{A94A2480D3289E625EEA47CD1B285758;8}%
+\@onelevel@sanitize\ReFiCh@AuxEmptyUnix
+% \end{macrocode}
+% \begin{macrocode}
+\def\ReFiCh@AuxEmptyDos{A62A15ECE803E2EBE94952FCC9933BC0;9}%
+\@onelevel@sanitize\ReFiCh@AuxEmptyDos
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ReFiCh@AtEnd
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@ 1 %
+ \repeat
+}
+\expandafter\ifx\csname LoadCommand\endcsname\relax
+ \def\LoadCommand{\input rerunfilecheck.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \LoadCommand
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/oberdiek/rerunfilecheck.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/rerunfilecheck.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+% |unzip oberdiek.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \paragraph{Script installation.}
+% Check the directory \xfile{TDS:scripts/oberdiek/} for
+% scripts that need further installation steps.
+% Package \xpackage{attachfile2} comes with the Perl script
+% \xfile{pdfatfi.pl} that should be installed in such a way
+% that it can be called as \texttt{pdfatfi}.
+% Example (linux):
+% \begin{quote}
+% |chmod +x scripts/oberdiek/pdfatfi.pl|\\
+% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+% \verb|tex rerunfilecheck.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% rerunfilecheck.sty & tex/generic/oberdiek/rerunfilecheck.sty\\
+% rerunfilecheck.pdf & doc/latex/oberdiek/rerunfilecheck.pdf\\
+% rerunfilecheck-example.cfg & doc/latex/oberdiek/rerunfilecheck-example.cfg\\
+% test/rerunfilecheck-test1.tex & doc/latex/oberdiek/test/rerunfilecheck-test1.tex\\
+% rerunfilecheck.dtx & source/latex/oberdiek/rerunfilecheck.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \teTeX\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Attached source.}
+%
+% The PDF documentation on CTAN also includes the
+% \xfile{.dtx} source file. It can be extracted by
+% AcrobatReader 6 or higher. Another option is \textsf{pdftk},
+% e.g. unpack the file into the current directory:
+% \begin{quote}
+% \verb|pdftk rerunfilecheck.pdf unpack_files output .|
+% \end{quote}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+% \verb|latex \let\install=y\input{rerunfilecheck.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+% \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex rerunfilecheck.dtx
+%makeindex -s gind.ist rerunfilecheck.idx
+%pdflatex rerunfilecheck.dtx
+%makeindex -s gind.ist rerunfilecheck.idx
+%pdflatex rerunfilecheck.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \begin{History}
+% \begin{Version}{2009/12/10 v1.0}
+% \item
+% The first version.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx b/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
new file mode 100644
index 00000000000..f3703d6b1e6
--- /dev/null
+++ b/Master/texmf-dist/source/latex/oberdiek/resizegather.dtx
@@ -0,0 +1,936 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+%
+% This work may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either
+% version 1.3 of this license or (at your option) any later
+% version. The latest version of this license is in
+% http://www.latex-project.org/lppl.txt
+% and version 1.3 or later is part of all distributions of
+% LaTeX version 2005/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% This Current Maintainer of this work is Heiko Oberdiek.
+%
+% This work consists of the main source file resizegather.dtx
+% and the derived files
+% resizegather.sty, resizegather.pdf, resizegather.ins, resizegather.drv,
+% resizegather-test1.tex.
+%
+% Distribution:
+% CTAN:macros/latex/contrib/oberdiek/resizegather.dtx
+% CTAN:macros/latex/contrib/oberdiek/resizegather.pdf
+%
+% Unpacking:
+% (a) If resizegather.ins is present:
+% tex resizegather.ins
+% (b) Without resizegather.ins:
+% tex resizegather.dtx
+% (c) If you insist on using LaTeX
+% latex \let\install=y\input{resizegather.dtx}
+% (quote the arguments according to the demands of your shell)
+%
+% Documentation:
+% (a) If resizegather.drv is present:
+% latex resizegather.drv
+% (b) Without resizegather.drv:
+% latex resizegather.dtx; ...
+% The class ltxdoc loads the configuration file ltxdoc.cfg
+% if available. Here you can specify further options, e.g.
+% use A4 as paper format:
+% \PassOptionsToClass{a4paper}{article}
+%
+% Programm calls to get the documentation (example):
+% pdflatex resizegather.dtx
+% makeindex -s gind.ist resizegather.idx
+% pdflatex resizegather.dtx
+% makeindex -s gind.ist resizegather.idx
+% pdflatex resizegather.dtx
+%
+% Installation:
+% TDS:tex/generic/oberdiek/resizegather.sty
+% TDS:doc/latex/oberdiek/resizegather.pdf
+% TDS:doc/latex/oberdiek/test/resizegather-test1.tex
+% TDS:source/latex/oberdiek/resizegather.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: resizegather 2009/12/05 v1.1 Automatically resizing of too large equations (HO)}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2009 by Heiko Oberdiek <oberdiek@uni-freiburg.de>
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status "maintained".
+
+This Current Maintainer of this work is Heiko Oberdiek.
+
+This work consists of the main source file resizegather.dtx
+and the derived files
+ resizegather.sty, resizegather.pdf, resizegather.ins, resizegather.drv,
+ resizegather-test1.tex.
+
+\endpreamble
+\let\MetaPrefix\DoubleperCent
+
+\generate{%
+ \file{resizegather.ins}{\from{resizegather.dtx}{install}}%
+ \file{resizegather.drv}{\from{resizegather.dtx}{driver}}%
+ \usedir{tex/generic/oberdiek}%
+ \file{resizegather.sty}{\from{resizegather.dtx}{package}}%
+ \usedir{doc/latex/oberdiek/test}%
+ \file{resizegather-test1.tex}{\from{resizegather.dtx}{test1}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* file into a directory searched by TeX:}
+\Msg{*}
+\Msg{* resizegather.sty}
+\Msg{*}
+\Msg{* And install the following script file:}
+\Msg{*}
+\Msg{* }
+\Msg{*}
+\Msg{* To produce the documentation run the file `resizegather.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{resizegather.drv}%
+ [2009/12/05 v1.1 Automatically resizing of too large equations (HO)]%
+\documentclass{ltxdoc}
+\usepackage{holtxdoc}[2008/08/11]
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\usepackage{lmodern}
+\begin{document}
+ \DocInput{resizegather.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{492}
+%
+% \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 \~}
+%
+% \GetFileInfo{resizegather.drv}
+%
+% \title{The \xpackage{resizegather} package}
+% \date{2009/12/05 v1.1}
+% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% Equations that are too large are resized to fit the available
+% space. The environment \textsf{gather} of package \xpackage{amsmath}
+% is supported. Also the environments \textsf{equation} and
+% \textsf{displaymath} are redefined using \textsf{gather}
+% and its starred version.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \makeatletter
+% \def\env#1{^^A
+% \textsf{\@env#1*\@nil}^^A
+% }%
+% \def\@env#1*#2\@nil{^^A
+% #1^^A
+% \ifx\\#2\\^^A
+% \expandafter\@gobble
+% \else
+% \textasteriskcentered
+% \expandafter\@firstofone
+% \fi
+% {\@env#2\@nil}^^A
+% }
+% \makeatother
+%
+% \section{Documentation}
+%
+% Sometimes an equation is just a little to large to fit in the
+% line. And breaking the equation across lines might be worse
+% than downscaling the equation. This package implements this
+% for the environments \env{gather} and \env{gather*} of
+% package \xpackage{amsmath}. That package already measures
+% the equations and simplifies the implementation of \xpackage{resizegather}
+% that only needs to hook into \xpackage{amsmath}'s code to add
+% the resizing feature.
+%
+% Resized equations are recorded in the \xext{.log} file
+% for small exceeds (default setting is smaller than five percent).
+% Otherwise a warning is given.
+%
+% Also environments \env{equation} and \env{displaymath}
+% are supported by redefining them using \env{gather}
+% and \env{gather*}.
+%
+% \cs{[} and \cs{]} are not supported, because these macros
+% are not in environment form that is required for
+% \xpackage{amsmath}. The environment body is collected
+% first to be able to process the body twice for measuring
+% first.
+%
+% Also the environments using alignments are not supported.
+% If a single equation line would be resized, the alignment
+% would get lost. And resizing all equations of the alignment
+% does not seem appropriate either.
+%
+% \subsection{Options}
+%
+% \begin{description}
+% \item[\xoption{warningthreshold}:]
+% Print a warning if the original equation line exceeds
+% its available width by the given fraction.
+% Default is |0.05|: A warning is given if the equation
+% is too large by five percent.
+% Otherwise the exceed is recorded in the \xext{.log} file
+% only.
+% \end{description}
+% The next options are boolean options. They are enabled
+% by value |true| or if no value is given. They are switched
+% off by value |false|.
+% \begin{description}
+% \item[\xoption{enable}:] The resize feature is active (default).
+% \item[\xoption{disable}:] The complementary option for \xoption{enable},
+% added for convenience: |disable| (or |disable=true|) is the same
+% as |enable=false|.
+% \item[\xoption{equations}:]
+% \LaTeX\ environments \textsf{equation} and \textsf{displaymath}
+% environments are redefined. These equations
+% are now using environment \env{gather} and
+% \env{gather*}. This is the default.
+% \end{description}
+% The following table shows additional options if you
+% want to have finer control for the redefined
+% environments:
+% \begin{quote}
+% \def\unchanged{\textit{unchanged}}
+% \def\notprovided{\textit{not provided}}
+% \begin{tabular}{l|ll}
+% &\multicolumn{2}{c}{Environments}\\
+% Option & \env{equation} & \env{displaymath}\\
+% \hline
+% \xoption{equations} & \env{gather} & \env{gather*}\\
+% \xoption{equation} & \env{gather} & \unchanged\\
+% \xoption{displaymath} & \unchanged & \env{gather*}\\
+% \end{tabular}
+% \end{quote}
+% If such an option is switched off, the original meaning
+% of the affected environments is restored.
+%
+% Options are evaluated in the following order:
+% \begin{enumerate}
+% \item
+% Configuration file \xfile{resizegather.cfg} using \cs{resizegathersetup}
+% if the file exists.
+% \item
+% Package options given for \cs{usepackage}.
+% \item
+% Later calls of \cs{resizegathersetup}.
+% \end{enumerate}
+% \begin{declcs}{resizegathersetup}\M{option list}
+% \end{declcs}
+% The options are key value options. Boolean options are enabled by
+% default (without value) or by using the explicit value \texttt{true}.
+% Value \texttt{false} disable the option.
+%
+% \subsection{Options for packages \xpackage{amsmath} or \xpackage{graphics}}
+%
+% The package loads the package \xpackage{amsmath} because is internally
+% measures the equations first. Thus this package hooks into this code
+% in order to resize the equations if they are too large.
+% The resizing itself is done by \cs{resizebox} of package \xpackage{graphics}.
+% If you need special options for these packages, just load them first or
+% use global options when appropriate. Example:
+% \begin{quote}
+%\begin{verbatim}
+%\usepackage[dvipdfm]{graphicx}% or graphics
+%\usepackage[fleqn]{amsmath}
+%\usepackage{resizegather}
+%\end{verbatim}
+%\end{quote}
+%
+% \StopEventually{
+% }
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+% \end{macrocode}
+% Reload check, especially if the package is not used with \LaTeX.
+% \begin{macrocode}
+\begingroup
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\let\expandafter\x\csname ver@resizegather.sty\endcsname
+ \ifx\x\relax % plain-TeX, first loading
+ \else
+ \def\empty{}%
+ \ifx\x\empty % LaTeX, first loading,
+ % variable is initialized, but \ProvidesPackage not yet seen
+ \else
+ \catcode35 6 % #
+ \expandafter\ifx\csname PackageInfo\endcsname\relax
+ \def\x#1#2{%
+ \immediate\write-1{Package #1 Info: #2.}%
+ }%
+ \else
+ \def\x#1#2{\PackageInfo{#1}{#2, stopped}}%
+ \fi
+ \x{resizegather}{The package is already loaded}%
+ \aftergroup\endinput
+ \fi
+ \fi
+\endgroup
+% \end{macrocode}
+% Package identification:
+% \begin{macrocode}
+\begingroup
+ \catcode35 6 % #
+ \catcode40 12 % (
+ \catcode41 12 % )
+ \catcode44 12 % ,
+ \catcode45 12 % -
+ \catcode46 12 % .
+ \catcode47 12 % /
+ \catcode58 12 % :
+ \catcode64 11 % @
+ \catcode91 12 % [
+ \catcode93 12 % ]
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1#2#3[#4]{\endgroup
+ \immediate\write-1{Package: #3 #4}%
+ \xdef#1{#4}%
+ }%
+ \else
+ \def\x#1#2[#3]{\endgroup
+ #2[{#3}]%
+ \ifx#1\@undefined
+ \xdef#1{#3}%
+ \fi
+ \ifx#1\relax
+ \xdef#1{#3}%
+ \fi
+ }%
+ \fi
+\expandafter\x\csname ver@resizegather.sty\endcsname
+\ProvidesPackage{resizegather}%
+ [2009/12/05 v1.1 Automatically resizing of too large equations (HO)]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \def\x{\endgroup
+ \expandafter\edef\csname ResizeGather@AtEnd\endcsname{%
+ \catcode35 \the\catcode35\relax
+ \catcode64 \the\catcode64\relax
+ \catcode123 \the\catcode123\relax
+ \catcode125 \the\catcode125\relax
+ }%
+ }%
+\x
+\catcode35 6 % #
+\catcode64 11 % @
+\catcode123 1 % {
+\catcode125 2 % }
+\def\TMP@EnsureCode#1#2{%
+ \edef\ResizeGather@AtEnd{%
+ \ResizeGather@AtEnd
+ \catcode#1 \the\catcode#1\relax
+ }%
+ \catcode#1 #2\relax
+}
+\TMP@EnsureCode{10}{12}% ^^J
+\TMP@EnsureCode{33}{12}% !
+\TMP@EnsureCode{36}{3}% $
+\TMP@EnsureCode{38}{4}% &
+\TMP@EnsureCode{39}{12}% '
+\TMP@EnsureCode{40}{12}% (
+\TMP@EnsureCode{41}{12}% )
+\TMP@EnsureCode{42}{12}% *
+\TMP@EnsureCode{43}{12}% +
+\TMP@EnsureCode{44}{12}% ,
+\TMP@EnsureCode{45}{12}% -
+\TMP@EnsureCode{46}{12}% .
+\TMP@EnsureCode{47}{12}% /
+\TMP@EnsureCode{58}{12}% :
+\TMP@EnsureCode{59}{12}% ;
+\TMP@EnsureCode{60}{12}% <
+\TMP@EnsureCode{61}{12}% =
+\TMP@EnsureCode{62}{12}% >
+\TMP@EnsureCode{63}{12}% ?
+\TMP@EnsureCode{91}{12}% [
+\TMP@EnsureCode{93}{12}% ]
+\TMP@EnsureCode{94}{7}% ^ (superscript)
+\TMP@EnsureCode{96}{12}% `
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{kvoptions}[2009/12/04]
+\SetupKeyvalOptions{%
+ family=resizegather,%
+ prefix=ResizeGather@,%
+}
+% \end{macrocode}
+% \begin{macrocode}
+\@for\ResizeGather@option:=%
+ centertags,%
+ tbtags,%
+ sumlimits,%
+ nosumlimits,%
+ intlimits,%
+ nointlimits,%
+ nonamelimits,%
+ leqno,%
+ reqno,%
+ fleqn%
+\do{%
+ \edef\ResizeGather@temp{%
+ \noexpand\DeclareVoidOption{\ResizeGather@option}{%
+ \noexpand\PassOptionsToPackage{amsmath}{\ResizeGather@option}%
+ }%
+ \noexpand\AtEndOfPackage{%
+ \noexpand\DisableKeyvalOption[%
+ action=error,%
+ package=resizegather,%
+ ]{resizegather}{\ResizeGather@option}%
+ }%
+ }%
+ \ResizeGather@temp
+}
+\@for\ResizeGather@option:=%
+ draft,%
+ final,%
+ hiderotate,%
+ hidescale,%
+ hiresbb,%
+ demo,%
+ dvips,xdvi,dvipdf,dvipdfm,dvipdfmx,pdftex,dvipsone,%
+ dviwindo,emtex,dviwin,pctexps,pctexwin,pctexhp,pctex32,%
+ truetex,tcidvi,vtex,oztex,textures,xetex%
+\do{%
+ \edef\ResizeGather@temp{%
+ \noexpand\DeclareVoidOption{\ResizeGather@option}{%
+ \noexpand\PassOptionsToPackage{graphics}{\ResizeGather@option}%
+ }%
+ \noexpand\AtEndOfPackage{%
+ \noexpand\DisableKeyvalOption[%
+ action=error,%
+ package=resizegather,%
+ ]{resizegather}{\ResizeGather@option}%
+ }%
+ }%
+ \ResizeGather@temp
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareBoolOption[true]{enable}
+\DeclareComplementaryOption{disable}{enable}
+\DeclareStringOption[.05]{warningthreshold}
+\newif\ifResizeGather@NeedInit
+\DeclareBoolOption[true]{equations}
+\DeclareBoolOption[true]{equation}
+\DeclareBoolOption[true]{displaymath}
+\AddToKeyvalOption*{equations}{%
+ \ResizeGather@NeedInittrue
+ \ifResizeGather@equations
+ \ResizeGather@equationtrue
+ \ResizeGather@displaymathtrue
+ \else
+ \ResizeGather@equationfalse
+ \ResizeGather@displaymathfalse
+ \fi
+}
+\AddToKeyvalOption*{equation}{%
+ \ResizeGather@NeedInittrue
+}
+\AddToKeyvalOption*{displaymath}{%
+ \ResizeGather@NeedInittrue
+}
+% \end{macrocode}
+%
+% \begin{macro}{\resizegathersetup}
+% \begin{macrocode}
+\newcommand*{\resizegathersetup}[1]{%
+ \ResizeGather@NeedInitfalse
+ \setkeys{resizegather}{#1}%
+ \ifResizeGather@NeedInit
+ \ResizeGather@init
+ \fi
+}
+\let\ResizeGather@init\relax
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+\InputIfFileExists{resizegather.cfg}{}{}%
+\ProcessKeyvalOptions*\relax
+% \end{macrocode}
+% \begin{macrocode}
+\RequirePackage{amsmath}
+\RequirePackage{graphics}
+% \end{macrocode}
+% \begin{macro}{\ResizeGather@redefine}
+% \begin{macrocode}
+\def\ResizeGather@redefine#1#2#3#4#5{%
+ \csname ifResizeGather@#1\endcsname
+ \@ifundefined{ResizeGather@org@#2}{%
+ \expandafter\let\csname ResizeGather@org@#2\expandafter\endcsname
+ \csname #2\endcsname
+ }{}%
+ \@ifundefined{ResizeGather@org@#3}{%
+ \expandafter\let\csname ResizeGather@org@#3\expandafter\endcsname
+ \csname #3\endcsname
+ }{}%
+ \expandafter\edef\csname #2\endcsname{%
+ \expandafter\noexpand\csname#4\endcsname
+ }%
+ \expandafter\edef\csname #3\endcsname{%
+ \expandafter\noexpand\csname#5\endcsname
+ }%
+ \else
+ \@ifundefined{ResizeGather@org@#2}{}{%
+ \expandafter\let\csname #2\expandafter\endcsname
+ \csname ResizeGather@org@#2\endcsname
+ \expandafter\let\csname #3\expandafter\endcsname
+ \csname ResizeGather@org@#3\endcsname
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ResizeGather@init}
+% \begin{macrocode}
+\def\ResizeGather@init{%
+ \ResizeGather@redefine{equation}{equation}{endequation}%
+ {gather}{endgather}%
+ \ResizeGather@redefine{displaymath}{displaymath}{enddisplaymath}%
+ {gather*}{endgather*}%
+}
+\ResizeGather@init
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\ResizeGather@ResizeGather}
+% \begin{macrocode}
+\def\ResizeGather@ResizeGather{%
+ \ifResizeGather@enable
+ \dimen@\displaywidth
+ \if@fleqn
+ \advance\dimen@-\@mathmargin
+ \fi
+ \ifdim\wdz@>\dimen@
+ \begingroup
+ \advance\dimen@ -\wdz@
+ \dimen@ -\dimen@
+ \ifdim\ResizeGather@warningthreshold\wdz@>\dimen@
+ \expandafter\PackageInfo
+ \else
+ \expandafter\PackageWarning
+ \fi
+ {resizegather}{%
+ Equation line \the\row@\space is too large %
+ by \the\dimen@\MessageBreak
+ in environment `\@currenvir'%
+ }%
+ \endgroup
+ \setboxz@h to\dimen@{%
+ \resizebox{\dimen@}{!}{\boxz@}%
+ \hss
+ }%
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\calc@shift@gather}
+% \begin{macrocode}
+\expandafter\def\expandafter\calc@shift@gather\expandafter{%
+ \expandafter\ResizeGather@ResizeGather
+ \calc@shift@gather
+}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ResizeGather@org@gmeasure@}
+% \begin{macrocode}
+\let\ResizeGather@org@gmeasure@\gmeasure@
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\gmeasure@}
+% \begin{macrocode}
+\def\gmeasure@#1{%
+ \ResizeGather@org@gmeasure@{#1}%
+ \ifResizeGather@enable
+ \ifdim\totwidth@>\displaywidth
+ \totwidth@=\displaywidth
+ \fi
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\ResizeGather@AtEnd
+%</package>
+% \end{macrocode}
+%
+% \section{Test}
+%
+% \subsection{Catcode checks for loading}
+%
+% \begin{macrocode}
+%<*test1>
+% \end{macrocode}
+% \begin{macrocode}
+\catcode`\{=1 %
+\catcode`\}=2 %
+\catcode`\#=6 %
+\catcode`\@=11 %
+\expandafter\ifx\csname count@\endcsname\relax
+ \countdef\count@=255 %
+\fi
+\expandafter\ifx\csname @gobble\endcsname\relax
+ \long\def\@gobble#1{}%
+\fi
+\expandafter\ifx\csname @firstofone\endcsname\relax
+ \long\def\@firstofone#1{#1}%
+\fi
+\expandafter\ifx\csname loop\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \expandafter\@gobble
+\fi
+{%
+ \def\loop#1\repeat{%
+ \def\body{#1}%
+ \iterate
+ }%
+ \def\iterate{%
+ \body
+ \let\next\iterate
+ \else
+ \let\next\relax
+ \fi
+ \next
+ }%
+ \let\repeat=\fi
+}%
+\def\RestoreCatcodes{}
+\count@=0 %
+\loop
+ \edef\RestoreCatcodes{%
+ \RestoreCatcodes
+ \catcode\the\count@=\the\catcode\count@\relax
+ }%
+\ifnum\count@<255 %
+ \advance\count@ 1 %
+\repeat
+
+\def\RangeCatcodeInvalid#1#2{%
+ \count@=#1\relax
+ \loop
+ \catcode\count@=15 %
+ \ifnum\count@<#2\relax
+ \advance\count@ 1 %
+ \repeat
+}
+\expandafter\ifx\csname LoadCommand\endcsname\relax
+ \def\LoadCommand{\input resizegather.sty\relax}%
+\fi
+\def\Test{%
+ \RangeCatcodeInvalid{0}{47}%
+ \RangeCatcodeInvalid{58}{64}%
+ \RangeCatcodeInvalid{91}{96}%
+ \RangeCatcodeInvalid{123}{255}%
+ \catcode`\@=12 %
+ \catcode`\\=0 %
+ \catcode`\{=1 %
+ \catcode`\}=2 %
+ \catcode`\#=6 %
+ \catcode`\[=12 %
+ \catcode`\]=12 %
+ \catcode`\%=14 %
+ \catcode`\ =10 %
+ \catcode13=5 %
+ \LoadCommand
+ \RestoreCatcodes
+}
+\Test
+\csname @@end\endcsname
+\end
+% \end{macrocode}
+% \begin{macrocode}
+%</test1>
+% \end{macrocode}
+%
+% \section{Installation}
+%
+% \subsection{Download}
+%
+% \paragraph{Package.} This package is available on
+% CTAN\footnote{\url{ftp://ftp.ctan.org/tex-archive/}}:
+% \begin{description}
+% \item[\CTAN{macros/latex/contrib/oberdiek/resizegather.dtx}] The source file.
+% \item[\CTAN{macros/latex/contrib/oberdiek/resizegather.pdf}] Documentation.
+% \end{description}
+%
+%
+% \paragraph{Bundle.} All the packages of the bundle `oberdiek'
+% are also available in a TDS compliant ZIP archive. There
+% the packages are already unpacked and the documentation files
+% are generated. The files and directories obey the TDS standard.
+% \begin{description}
+% \item[\CTAN{install/macros/latex/contrib/oberdiek.tds.zip}]
+% \end{description}
+% \emph{TDS} refers to the standard ``A Directory Structure
+% for \TeX\ Files'' (\CTAN{tds/tds.pdf}). Directories
+% with \xfile{texmf} in their name are usually organized this way.
+%
+% \subsection{Bundle installation}
+%
+% \paragraph{Unpacking.} Unpack the \xfile{oberdiek.tds.zip} in the
+% TDS tree (also known as \xfile{texmf} tree) of your choice.
+% Example (linux):
+% \begin{quote}
+% |unzip oberdiek.tds.zip -d ~/texmf|
+% \end{quote}
+%
+% \paragraph{Script installation.}
+% Check the directory \xfile{TDS:scripts/oberdiek/} for
+% scripts that need further installation steps.
+% Package \xpackage{attachfile2} comes with the Perl script
+% \xfile{pdfatfi.pl} that should be installed in such a way
+% that it can be called as \texttt{pdfatfi}.
+% Example (linux):
+% \begin{quote}
+% |chmod +x scripts/oberdiek/pdfatfi.pl|\\
+% |cp scripts/oberdiek/pdfatfi.pl /usr/local/bin/|
+% \end{quote}
+%
+% \subsection{Package installation}
+%
+% \paragraph{Unpacking.} The \xfile{.dtx} file is a self-extracting
+% \docstrip\ archive. The files are extracted by running the
+% \xfile{.dtx} through \plainTeX:
+% \begin{quote}
+% \verb|tex resizegather.dtx|
+% \end{quote}
+%
+% \paragraph{TDS.} Now the different files must be moved into
+% the different directories in your installation TDS tree
+% (also known as \xfile{texmf} tree):
+% \begin{quote}
+% \def\t{^^A
+% \begin{tabular}{@{}>{\ttfamily}l@{ $\rightarrow$ }>{\ttfamily}l@{}}
+% resizegather.sty & tex/generic/oberdiek/resizegather.sty\\
+% resizegather.pdf & doc/latex/oberdiek/resizegather.pdf\\
+% test/resizegather-test1.tex & doc/latex/oberdiek/test/resizegather-test1.tex\\
+% resizegather.dtx & source/latex/oberdiek/resizegather.dtx\\
+% \end{tabular}^^A
+% }^^A
+% \sbox0{\t}^^A
+% \ifdim\wd0>\linewidth
+% \begingroup
+% \advance\linewidth by\leftmargin
+% \advance\linewidth by\rightmargin
+% \edef\x{\endgroup
+% \def\noexpand\lw{\the\linewidth}^^A
+% }\x
+% \def\lwbox{^^A
+% \leavevmode
+% \hbox to \linewidth{^^A
+% \kern-\leftmargin\relax
+% \hss
+% \usebox0
+% \hss
+% \kern-\rightmargin\relax
+% }^^A
+% }^^A
+% \ifdim\wd0>\lw
+% \sbox0{\small\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\footnotesize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\scriptsize\t}^^A
+% \ifdim\wd0>\linewidth
+% \ifdim\wd0>\lw
+% \sbox0{\tiny\t}^^A
+% \ifdim\wd0>\linewidth
+% \lwbox
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \else
+% \lwbox
+% \fi
+% \else
+% \usebox0
+% \fi
+% \end{quote}
+% If you have a \xfile{docstrip.cfg} that configures and enables \docstrip's
+% TDS installing feature, then some files can already be in the right
+% place, see the documentation of \docstrip.
+%
+% \subsection{Refresh file name databases}
+%
+% If your \TeX~distribution
+% (\teTeX, \mikTeX, \dots) relies on file name databases, you must refresh
+% these. For example, \teTeX\ users run \verb|texhash| or
+% \verb|mktexlsr|.
+%
+% \subsection{Some details for the interested}
+%
+% \paragraph{Attached source.}
+%
+% The PDF documentation on CTAN also includes the
+% \xfile{.dtx} source file. It can be extracted by
+% AcrobatReader 6 or higher. Another option is \textsf{pdftk},
+% e.g. unpack the file into the current directory:
+% \begin{quote}
+% \verb|pdftk resizegather.pdf unpack_files output .|
+% \end{quote}
+%
+% \paragraph{Unpacking with \LaTeX.}
+% The \xfile{.dtx} chooses its action depending on the format:
+% \begin{description}
+% \item[\plainTeX:] Run \docstrip\ and extract the files.
+% \item[\LaTeX:] Generate the documentation.
+% \end{description}
+% If you insist on using \LaTeX\ for \docstrip\ (really,
+% \docstrip\ does not need \LaTeX), then inform the autodetect routine
+% about your intention:
+% \begin{quote}
+% \verb|latex \let\install=y\input{resizegather.dtx}|
+% \end{quote}
+% Do not forget to quote the argument according to the demands
+% of your shell.
+%
+% \paragraph{Generating the documentation.}
+% You can use both the \xfile{.dtx} or the \xfile{.drv} to generate
+% the documentation. The process can be configured by the
+% configuration file \xfile{ltxdoc.cfg}. For instance, put this
+% line into this file, if you want to have A4 as paper format:
+% \begin{quote}
+% \verb|\PassOptionsToClass{a4paper}{article}|
+% \end{quote}
+% An example follows how to generate the
+% documentation with pdf\LaTeX:
+% \begin{quote}
+%\begin{verbatim}
+%pdflatex resizegather.dtx
+%makeindex -s gind.ist resizegather.idx
+%pdflatex resizegather.dtx
+%makeindex -s gind.ist resizegather.idx
+%pdflatex resizegather.dtx
+%\end{verbatim}
+% \end{quote}
+%
+% \section{Acknowledgement}
+%
+% \begin{description}
+% \item[Dieter Jurzitza:]
+% He wanted the resizing feature at the \TeX\ table
+% in Karlsruhe of December 2009. Thus this package is a kind of
+% Christmas present.
+% \end{description}
+%
+% \begin{History}
+% \begin{Version}{2009/12/04 v1.0}
+% \item
+% The first version.
+% \end{Version}
+% \begin{Version}{2009/12/05 v1.1}
+% \item
+% Options \xoption{enable} and \xoption{disable} added.
+% \end{Version}
+% \end{History}
+%
+% \PrintIndex
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/source/latex/oberdiek/zref.dtx b/Master/texmf-dist/source/latex/oberdiek/zref.dtx
index 3e379094994..44d5fc19cda 100644
--- a/Master/texmf-dist/source/latex/oberdiek/zref.dtx
+++ b/Master/texmf-dist/source/latex/oberdiek/zref.dtx
@@ -89,7 +89,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: zref 2009/08/07 v2.4 New reference scheme for LaTeX2e (HO)}
+\Msg{* Package: zref 2009/12/08 v2.7 New reference scheme for LaTeX2e (HO)}
\Msg{************************************************************************}
\keepsilent
@@ -184,7 +184,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{zref.drv}%
- [2009/08/07 v2.4 New reference scheme for LaTeX2e (HO)]%
+ [2009/12/08 v2.7 New reference scheme for LaTeX2e (HO)]%
\documentclass{ltxdoc}
\usepackage{holtxdoc}[2008/08/11]
\begin{document}
@@ -193,7 +193,7 @@ and the derived files
%</driver>
% \fi
%
-% \CheckSum{1697}
+% \CheckSum{1668}
%
% \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
@@ -214,7 +214,7 @@ and the derived files
% \GetFileInfo{zref.drv}
%
% \title{The \xpackage{zref} package}
-% \date{2009/08/07 v2.4}
+% \date{2009/12/08 v2.7}
% \author{Heiko Oberdiek\\\xemail{oberdiek@uni-freiburg.de}}
%
% \maketitle
@@ -1244,13 +1244,13 @@ the height difference of the two baselines is
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref}
- [2009/08/07 v2.4 New reference scheme for LaTeX2e (HO)]%
+ [2009/12/08 v2.7 New reference scheme for LaTeX2e (HO)]%
% \end{macrocode}
%
% \subsubsection{Load basic module}
%
% \begin{macrocode}
-\RequirePackage{zref-base}[2009/08/07]
+\RequirePackage{zref-base}[2009/12/08]
% \end{macrocode}
% Abort package loading if \xpackage{zref-base} could not be
% loaded successfully.
@@ -1265,7 +1265,7 @@ the height difference of the two baselines is
\def\ZREF@temp#1{%
\DeclareOption{#1}{%
\AtEndOfPackage{%
- \RequirePackage{zref-#1}[2009/08/07]%
+ \RequirePackage{zref-#1}[2009/12/08]%
}%
}%
}
@@ -1325,7 +1325,7 @@ the height difference of the two baselines is
%<*base>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-base}%
- [2009/08/07 v2.4 Module base for zref (HO)]%
+ [2009/12/08 v2.7 Module base for zref (HO)]%
% \end{macrocode}
%
% \subsubsection{Utilities}
@@ -2084,8 +2084,8 @@ the height difference of the two baselines is
%<*user>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-user}%
- [2009/08/07 v2.4 Module user for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module user for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -2159,8 +2159,8 @@ the height difference of the two baselines is
%<*abspage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-abspage}%
- [2009/08/07 v2.4 Module abspage for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module abspage for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -2204,8 +2204,8 @@ the height difference of the two baselines is
%<*counter>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-counter}%
- [2009/08/07 v2.4 Module counter for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module counter for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -2241,8 +2241,9 @@ the height difference of the two baselines is
%<*lastpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-lastpage}%
- [2009/08/07 v2.4 Module lastpage for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module lastpage for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
+\RequirePackage{atveryend}[2009/12/07]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -2254,22 +2255,19 @@ the height difference of the two baselines is
% the main property list are used.
% \begin{macrocode}
\zref@newlist{LastPage}
-\AtBeginDocument{%
- \AtEndDocument{%
- \if@filesw
- \clearpage
- \begingroup
- \advance\c@page\m@ne
- \toks@\expandafter\expandafter\expandafter{%
- \expandafter\Z@L@main
- \Z@L@LastPage
- }%
- \expandafter\zref@wrapper@immediate\expandafter{%
- \expandafter\ZREF@label\expandafter{\the\toks@}{LastPage}%
- }%
- \endgroup
- \fi
- }%
+\AfterLastShipout{%
+ \if@filesw
+ \begingroup
+ \advance\c@page\m@ne
+ \toks@\expandafter\expandafter\expandafter{%
+ \expandafter\Z@L@main
+ \Z@L@LastPage
+ }%
+ \expandafter\zref@wrapper@immediate\expandafter{%
+ \expandafter\ZREF@label\expandafter{\the\toks@}{LastPage}%
+ }%
+ \endgroup
+ \fi
}
% \end{macrocode}
% \begin{macrocode}
@@ -2283,16 +2281,16 @@ the height difference of the two baselines is
%<*totpages>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-totpages}%
- [2009/08/07 v2.4 Module totpages for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module totpages for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
% The absolute page number of the last page is the total
% page number.
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2009/08/07]
-\RequirePackage{zref-lastpage}[2009/08/07]
+\RequirePackage{zref-abspage}[2009/12/08]
+\RequirePackage{zref-lastpage}[2009/12/08]
% \end{macrocode}
%
% \begin{macro}{\ztotpages}
@@ -2325,7 +2323,7 @@ the height difference of the two baselines is
%<*runs>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-runs}%
- [2009/08/07 v2.4 Module runs for zref (HO)]%
+ [2009/12/08 v2.7 Module runs for zref (HO)]%
% \end{macrocode}
%
% \begin{macro}{\zruns}
@@ -2357,8 +2355,8 @@ the height difference of the two baselines is
%<*perpage>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-perpage}%
- [2009/08/07 v2.4 Module perpage for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module perpage for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -2370,7 +2368,7 @@ the height difference of the two baselines is
% For detecting changed pages module \xmodule{abspage}
% is loaded.
% \begin{macrocode}
-\RequirePackage{zref-abspage}[2009/08/07]
+\RequirePackage{zref-abspage}[2009/12/08]
% \end{macrocode}
%
% We group the properties for the needed references
@@ -2514,9 +2512,10 @@ the height difference of the two baselines is
%<*titleref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-titleref}%
- [2009/08/07 v2.4 Module titleref for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module titleref for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
+\RequirePackage{gettitlestring}[2009/12/08]
% \end{macrocode}
%
% \subsubsection{Implementation}
@@ -2617,26 +2616,13 @@ the height difference of the two baselines is
% previous switches.
% \begin{macrocode}
\def\zref@titleref@setcurrent#1{%
- \def\zref@titleref@current{#1}%
\ifzref@titleref@expand
- \begingroup
- \let\label\@gobble
- \let\index\@gobble
- \let\glossary\@gobble
- \let\markboth\@gobbletwo
- \let\@mkboth\@gobbletwo
- \let\markright\@gobble
- \let\protect\@unexpandable@protect
- \ZREF@titleref@hook
- \edef\x{\endgroup
- \noexpand\def\noexpand\zref@titleref@current{%
- \zref@titleref@current
- }%
- }%
- \x
+ \GetTitleStringExpand{#1}%
+ \else
+ \GetTitleStringNonExpand{#1}%
\fi
\edef\zref@titleref@current{%
- \detokenize\expandafter{\zref@titleref@current}%
+ \detokenize\expandafter{\GetTitleStringResult}%
}%
\ifzref@titleref@stripperiod
\edef\zref@titleref@current{%
@@ -2645,6 +2631,9 @@ the height difference of the two baselines is
}%
\fi
}%
+\GetTitleStringDisableCommands{%
+ \ZREF@titleref@hook
+}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\ZREF@stripperiod}
@@ -2841,8 +2830,8 @@ the height difference of the two baselines is
%<*xr>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-xr}%
- [2009/08/07 v2.4 Module xr for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module xr for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
% \begin{macrocode}
@@ -3185,8 +3174,8 @@ the height difference of the two baselines is
%<*hyperref>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-hyperref}%
- [2009/08/07 v2.4 Module hyperref for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module hyperref for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -3214,8 +3203,8 @@ the height difference of the two baselines is
%<*savepos>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-savepos}%
- [2009/08/07 v2.4 Module savepos for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module savepos for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
@@ -3320,15 +3309,15 @@ the height difference of the two baselines is
%<*dotfill>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zref-dotfill}%
- [2009/08/07 v2.4 Module dotfill for zref (HO)]%
-\RequirePackage{zref-base}[2009/08/07]
+ [2009/12/08 v2.7 Module dotfill for zref (HO)]%
+\RequirePackage{zref-base}[2009/12/08]
\@ifundefined{ZREF@baseok}{\endinput}{}
% \end{macrocode}
%
% For measuring the width of \cs{zdotfill} we use the features
% provided by module \xmodule{savepos}.
% \begin{macrocode}
-\RequirePackage{zref-savepos}[2009/08/07]
+\RequirePackage{zref-savepos}[2009/12/08]
% \end{macrocode}
% For automatically generated label names we use the unique
% counter of module \xmodule{base}.
@@ -3417,7 +3406,7 @@ the height difference of the two baselines is
\NeedsTeXFormat{LaTeX2e}
\nofiles
\documentclass{article}
-\usepackage{zref-base}[2009/08/07]
+\usepackage{zref-base}[2009/12/08]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -3447,7 +3436,7 @@ the height difference of the two baselines is
%<*test-runs>
\NeedsTeXFormat{LaTeX2e}
\documentclass{article}
-\usepackage{zref-runs}[2009/08/07]
+\usepackage{zref-runs}[2009/12/08]
\usepackage{qstest}
\IncludeTests{*}
\LogTests{log}{*}{*}
@@ -3781,6 +3770,21 @@ the height difference of the two baselines is
% \item
% Module \xmodule{runs} added.
% \end{Version}
+% \begin{Version}{2009/12/06 v2.5}
+% \item
+% Module \xmodule{lastpage}: Uses package \xpackage{atveryend}.
+% \item
+% Module \xmodule{titleref}: Further commands are disabled
+% during string expansion, imported from package \xpackage{nameref}.
+% \end{Version}
+% \begin{Version}{2009/12/07 v2.6}
+% \item
+% Version date added for package \xpackage{atveryend}.
+% \end{Version}
+% \begin{Version}{2009/12/08 v2.7}
+% \item
+% Module \xmodule{titleref}: Use of package \xpackage{gettitlestring}.
+% \end{Version}
% \end{History}
%
% \PrintIndex