summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tools/afterpage.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:09:38 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:09:38 +0000
commit8317c14a3982d615f40eba6278e7c0b9cc791e9b (patch)
treee839394711865dad74bb146db408e3b05eb0ce93 /Master/texmf-dist/tex/latex/tools/afterpage.sty
parenta685525d941d96390acfd6fb1f0da1c66d54d123 (diff)
tools
git-svn-id: svn://tug.org/texlive/trunk@1402 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/tools/afterpage.sty')
-rw-r--r--Master/texmf-dist/tex/latex/tools/afterpage.sty132
1 files changed, 132 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/tools/afterpage.sty b/Master/texmf-dist/tex/latex/tools/afterpage.sty
new file mode 100644
index 00000000000..90634f67ef2
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/tools/afterpage.sty
@@ -0,0 +1,132 @@
+%%
+%% This is file `afterpage.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% afterpage.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
+%% --------------------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2003/12/01 or later.
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%%
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%% File: afterpage.dtx Copyright (C) 1994 1994 1995 David Carlisle
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{afterpage}
+ [1995/10/27 v1.08 After-Page Package (DPC)]
+\newtoks\AP@output
+\global\AP@output\expandafter{\the\output}
+\newbox\AP@partial
+\newbox\AP@footins
+\def\AP@savetop{%
+ \ifvmode
+ \let\AP@noindent\empty
+ \else\ifhmode
+ \setbox\z@\lastbox
+ \edef\AP@noindent
+ {{\everypar{}\ifvoid\z@\noindent\else\indent\fi}}%
+ \par
+ \else
+ \abovedisplayshortskip\z@\abovedisplayskip\z@
+ \belowdisplayshortskip\z@\belowdisplayskip\z@
+ \xdef\AP@disp{%
+ \predisplaysize\the\predisplaysize
+ \prevgraf\the\prevgraf\relax}%
+ $$\vskip-\baselineskip\vskip-\parskip
+ \edef\AP@noindent{%
+ \toks@{\the\everydisplay}\everydisplay{}%
+ {\everypar{}\noindent}$$\AP@disp\aftergroup\noexpand\AP@ed}%
+ \fi\fi
+ \begingroup
+ \nointerlineskip\null
+ \output{%
+ \global\setbox\AP@partial\vbox{%
+ \unvbox\@cclv
+ \global\setbox\@ne\lastbox}%
+ \global\setbox\AP@footins\box\footins}%
+ \eject
+ \endgroup}
+\let\AP@\relax
+\def\AP@ed{\everydisplay\expandafter{\the\toks@}\ignorespaces}
+\def\AP@@{%
+ \AP@savetop
+ \global\expandafter\let\expandafter\AP@\expandafter\relax\AP@
+ \par
+ \addboxcontents\AP@partial
+ \ifvoid\AP@footins\else
+ \insert\footins{\unvbox\AP@footins}\fi
+ \AP@noindent}
+\long\def\afterpage#1{%
+ \ifx\AP@\relax
+ \gdef\AP@{{#1\par}}%
+ \global\output{%
+ \the\AP@output
+ \ifnum\outputpenalty>-\@Mi
+ \global\output\expandafter{\the\AP@output}%
+ \aftergroup\AP@@
+ \fi}%
+ \else
+ \expandafter\gdef\expandafter\AP@\expandafter{\AP@{#1\par}}%
+ \fi}
+\let\AP@clearpage\clearpage
+\def\clearpage{%
+ \ifx\AP@\relax
+ \AP@clearpage
+ \else
+ \global\output\expandafter{\the\AP@output}%
+ \AP@clearpage
+ \global\expandafter\let\expandafter\AP@\expandafter\relax
+ \expandafter\expandafter\AP@
+ \fi}
+\let\AP@enddocument\enddocument
+\def\enddocument{%
+ \ifx\AP@\relax\else
+ \global\output\expandafter{\the\AP@output}%
+ \AP@clearpage
+ \global\expandafter\let\expandafter\AP@\expandafter\relax
+ \expandafter\expandafter\AP@
+ \fi
+ \AP@enddocument}
+
+\def\addboxcontents#1{{%
+ \splittopskip\z@
+ \splitmaxdepth\maxdimen
+ \setbox#1\vbox{\break\unvbox#1}%
+ \setbox\z@\vsplit#1to\z@
+ \setbox#1\vbox{\break\unvbox#1}%
+ \skip@\ht#1%
+ \splittopskip\vsize
+ \setbox\z@\vsplit#1to\z@
+ \advance\skip@-\ht#1%
+ \skip\tw@\skip@
+ \advance\skip@\splittopskip
+ \advance\skip@\prevdepth
+ \advance\skip@-\baselineskip
+ \advance\skip\tw@\ifdim-\skip@<\lineskiplimit\lineskip\else-\skip@\fi
+ \vskip\skip\tw@
+ \global\dimen@i\dp#1%
+ \unvbox#1}%
+ \prevdepth\dimen@i}
+\endinput
+%%
+%% End of file `afterpage.sty'.