The eso-pic package^{∗}

Rolf Niepraschk

                (email: niepraschk@ptb.de)

Abstract

This package makes it easy to add some picture commands to every page.

Contents

1 Introduction 1

2 Usage 1

3 Implementation 1

1 Introduction

This package is an extension to Martin Schröder’s everyshi package. Using everyshi’s \EveryShipout command eso-pic adds one or more userdefined picture commands to L^{A}TEX’s shipout routine.

2 Usage

AddToShipoutPicture All the picture commands which are parameters of an \AddToShipoutPicture command will be added to the internal macro \ESO@HookI. This macro is part of a zero-length picture environment with basepoint at the lower left corner of the page (similar to postscript). The picture environment will be shipped

ClearShipoutPicture out at every new page. A call of \ClearShipoutPicture clears the contents

AddToShipoutPicture* of \ESO@HookI. \AddToShipoutPicture* works like \AddToShipoutPicture but

only for the current page. It used the internal macro \ESO@HookII which contents will be removed automaticaly.

3 Implementation

1 ⟨∗package⟩

 2 %
 3 \NeedsTeXFormat{LaTeX2e}[1995/01/25]

4

 5 \ProvidesPackage{eso-pic}[2001/07/20 v0.7 eso-pic (RN)]

∗This file has version number v0.7, last revised 2001/07/20.

 7 \RequirePackage{everyshi}[1995/01/25]

8

 9 \newcommand{\ESO@HookI}{}\newcommand{\ESO@HookII}{}
10 \newcommand{\AddToShipoutPicture}{%
11 \@ifstar{\g@addto@macro\ESO@HookII}{\g@addto@macro\ESO@HookI}}
12 \newcommand{\ClearShipoutPicture}{\let\ESO@HookI\@empty}
13 \newcommand{\@ShipoutPicture}{%
14 \bgroup
15  \@tempswafalse%
16  \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
17  \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
18  \if@tempswa%
19  \@tempdima=1in\@tempdimb=-\@tempdima%
20  \advance\@tempdimb\paperheight\unitlength=1pt%
21  \global\setbox\@cclv\vbox{%
22  \vbox{%
23  \let\protect\relax
24  \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)%
25  \ESO@HookI\ESO@HookII\global\let\ESO@HookII\@empty%
26  \endpicture}%
27  \box\@cclv%
28  }%
29  \fi
30 \egroup

31 }

32

33 \EveryShipout{\@ShipoutPicture}

34 ⟨/package⟩