source: docs/HPCA2012/latex/eso-pic.sty @ 4787

Last change on this file since 4787 was 1326, checked in by ashriram, 8 years ago

New Intro New title

File size: 9.2 KB
Line 
1%%
2%% This is file `eso-pic.sty',
3%% generated with the docstrip utility.
4%%
5%% The original source files were:
6%%
7%% eso-pic.dtx  (with options: `package')
8%%
9%% This is a generated file.
10%%
11%% Copyright (C) 1998-2002 by Rolf Niepraschk <niepraschk@ptb.de>
12%%
13%% This file may be distributed and/or modified under the conditions of
14%% the LaTeX Project Public License, either version 1.2 of this license
15%% or (at your option) any later version.  The latest version of this
16%% license is in:
17%%
18%%    http://www.latex-project.org/lppl.txt
19%%
20%% and version 1.2 or later is part of all distributions of LaTeX version
21%% 1999/12/01 or later.
22%%
23\NeedsTeXFormat{LaTeX2e}[1999/12/01]
24\ProvidesPackage{eso-pic}
25   [2002/11/16 v1.1b eso-pic (RN)]
26\input{iccv_eso.sty}
27\newcommand\LenToUnit[1]{#1\@gobble}
28
29\newcommand\AtPageUpperLeft[1]{%
30  \begingroup
31    \@tempdima=0pt\relax\@tempdimb=\ESO@yoffsetI\relax
32    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}%
33  \endgroup
34}
35\newcommand\AtPageLowerLeft[1]{\AtPageUpperLeft{%
36  \put(0,\LenToUnit{-\paperheight}){#1}}}
37\newcommand\AtPageCenter[1]{\AtPageUpperLeft{%
38  \put(\LenToUnit{.5\paperwidth},\LenToUnit{-.5\paperheight}){#1}}%
39}
40\newcommand\AtTextUpperLeft[1]{%
41  \begingroup
42    \setlength\@tempdima{1in}%
43    \ifodd\c@page%
44      \advance\@tempdima\oddsidemargin%
45    \else%
46      \advance\@tempdima\evensidemargin%
47    \fi%
48    \@tempdimb=\ESO@yoffsetI\relax\advance\@tempdimb-1in\relax%
49    \advance\@tempdimb-\topmargin%
50    \advance\@tempdimb-\headheight\advance\@tempdimb-\headsep%
51    \put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdimb}){#1}%
52  \endgroup
53}
54\newcommand\AtTextLowerLeft[1]{\AtTextUpperLeft{%
55  \put(0,\LenToUnit{-\textheight}){#1}}}
56\newcommand\AtTextCenter[1]{\AtTextUpperLeft{%
57  \put(\LenToUnit{.5\textwidth},\LenToUnit{-.5\textheight}){#1}}}
58\newcommand{\ESO@HookI}{} \newcommand{\ESO@HookII}{}
59\newcommand{\ESO@HookIII}{}
60\newcommand{\AddToShipoutPicture}{%
61  \@ifstar{\g@addto@macro\ESO@HookII}{\g@addto@macro\ESO@HookI}}
62\newcommand{\ClearShipoutPicture}{\global\let\ESO@HookI\@empty}
63\newcommand\ESO@isMEMOIR[1]{}
64\@ifclassloaded{memoir}{\renewcommand\ESO@isMEMOIR[1]{#1}}{}
65\newcommand{\@ShipoutPicture}{%
66  \bgroup
67    \@tempswafalse%
68    \ifx\ESO@HookI\@empty\else\@tempswatrue\fi%
69    \ifx\ESO@HookII\@empty\else\@tempswatrue\fi%
70    \ifx\ESO@HookIII\@empty\else\@tempswatrue\fi%
71    \if@tempswa%
72      \@tempdima=1in\@tempdimb=-\@tempdima%
73      \advance\@tempdimb\ESO@yoffsetI%
74      \ESO@isMEMOIR{%
75        \advance\@tempdima\trimedge%
76        \advance\@tempdima\paperwidth%
77        \advance\@tempdima-\stockwidth%
78        \if@twoside\ifodd\c@page\else%
79          \advance\@tempdima-2\trimedge%
80          \advance\@tempdima-\paperwidth%
81          \advance\@tempdima\stockwidth%
82        \fi\fi%
83        \advance\@tempdimb\trimtop}%
84      \unitlength=1pt%
85      \global\setbox\@cclv\vbox{%
86        \vbox{\let\protect\relax
87          \pictur@(0,0)(\strip@pt\@tempdima,\strip@pt\@tempdimb)%
88            \ESO@HookIII\ESO@HookI\ESO@HookII%
89            \global\let\ESO@HookII\@empty%
90          \endpicture}%
91          \nointerlineskip%
92        \box\@cclv}%
93    \fi
94  \egroup
95}
96\EveryShipout{\@ShipoutPicture}
97\RequirePackage{keyval}
98\newif\ifESO@dvips\ESO@dvipsfalse \newif\ifESO@grid\ESO@gridfalse
99\newif\ifESO@texcoord\ESO@texcoordfalse
100\newcommand*\ESO@gridunitname{}
101\newcommand*\ESO@gridunit{}
102\newcommand*\ESO@labelfactor{}
103\newcommand*\ESO@griddelta{}\newcommand*\ESO@griddeltaY{}
104\newcommand*\ESO@gridDelta{}\newcommand*\ESO@gridDeltaY{}
105\newcommand*\ESO@gridcolor{}
106\newcommand*\ESO@subgridcolor{}
107\newcommand*\ESO@subgridstyle{dotted}% ???
108\newcommand*\ESO@gap{}
109\newcommand*\ESO@yoffsetI{}\newcommand*\ESO@yoffsetII{}
110\newcommand*\ESO@gridlines{\thinlines}
111\newcommand*\ESO@subgridlines{\thinlines}
112\newcommand*\ESO@hline[1]{\ESO@subgridlines\line(1,0){#1}}
113\newcommand*\ESO@vline[1]{\ESO@subgridlines\line(0,1){#1}}
114\newcommand*\ESO@Hline[1]{\ESO@gridlines\line(1,0){#1}}
115\newcommand*\ESO@Vline[1]{\ESO@gridlines\line(0,1){#1}}
116\newcommand\ESO@fcolorbox[4][]{\fbox{#4}}
117\newcommand\ESO@color[1]{}
118\newcommand\ESO@colorbox[3][]{%
119  \begingroup
120    \fboxrule=0pt\fbox{#3}%
121  \endgroup
122}
123\newcommand\gridSetup[6][]{%
124  \edef\ESO@gridunitname{#1}\edef\ESO@gridunit{#2}
125  \edef\ESO@labelfactor{#3}\edef\ESO@griddelta{#4}
126  \edef\ESO@gridDelta{#5}\edef\ESO@gap{#6}}
127\define@key{ESO}{texcoord}[true]{\csname ESO@texcoord#1\endcsname}
128\define@key{ESO}{pscoord}[true]{\csname @tempswa#1\endcsname
129  \if@tempswa\ESO@texcoordfalse\else\ESO@texcoordtrue\fi}
130\define@key{ESO}{dvips}[true]{\csname ESO@dvips#1\endcsname}
131\define@key{ESO}{grid}[true]{\csname ESO@grid#1\endcsname
132  \setkeys{ESO}{gridcolor=black,subgridcolor=black}}
133\define@key{ESO}{colorgrid}[true]{\csname ESO@grid#1\endcsname
134  \setkeys{ESO}{gridcolor=red,subgridcolor=green}}
135\define@key{ESO}{gridcolor}{\def\ESO@gridcolor{#1}}
136\define@key{ESO}{subgridcolor}{\def\ESO@subgridcolor{#1}}
137\define@key{ESO}{subgridstyle}{\def\ESO@subgridstyle{#1}}%
138\define@key{ESO}{gridunit}{%
139  \def\@tempa{#1}
140  \def\@tempb{bp}
141  \ifx\@tempa\@tempb
142    \gridSetup[\@tempa]{1bp}{1}{10}{50}{2}
143  \else
144    \def\@tempb{pt}
145    \ifx\@tempa\@tempb
146      \gridSetup[\@tempa]{1pt}{1}{10}{50}{2}
147    \else
148      \def\@tempb{in}
149      \ifx\@tempa\@tempb
150        \gridSetup[\@tempa]{.1in}{.1}{2}{10}{.5}
151      \else
152        \gridSetup[mm]{1mm}{1}{5}{20}{1}
153      \fi
154    \fi
155  \fi
156}
157\setkeys{ESO}{subgridstyle=solid,pscoord=true,gridunit=mm}
158\def\ProcessOptionsWithKV#1{%
159  \let\@tempc\@empty
160  \@for\CurrentOption:=\@classoptionslist\do{%
161    \@ifundefined{KV@#1@\CurrentOption}%
162    {}{\edef\@tempc{\@tempc,\CurrentOption,}}}%
163  \edef\@tempc{%
164    \noexpand\setkeys{#1}{\@tempc\@ptionlist{\@currname.\@currext}}}%
165  \@tempc
166  \AtEndOfPackage{\let\@unprocessedoptions\relax}}%
167\ProcessOptionsWithKV{ESO}%
168\newcommand\ESO@div[2]{%
169  \@tempdima=#1\relax\@tempdimb=\ESO@gridunit\relax
170  \@tempdimb=#2\@tempdimb\divide\@tempdima by \@tempdimb%
171  \@tempcnta\@tempdima\advance\@tempcnta\@ne}
172\AtBeginDocument{%
173  \IfFileExists{color.sty}
174  {%
175    \RequirePackage{color}
176    \let\ESO@color=\color\let\ESO@colorbox=\colorbox
177    \let\ESO@fcolorbox=\fcolorbox
178  }{}
179  \@ifundefined{Gin@driver}{}%
180  {%
181    \ifx\Gin@driver\@empty\else%
182      \filename@parse{\Gin@driver}\def\reserved@a{dvips}%
183      \ifx\filename@base\reserved@a\ESO@dvipstrue\fi%
184    \fi
185  }%
186  \ifx\pdfoutput\undefined\else
187    \ifx\pdfoutput\relax\else
188      \ifcase\pdfoutput\else
189        \ESO@dvipsfalse%
190      \fi
191    \fi
192  \fi
193  \ifESO@dvips\def\@tempb{eepic}\else\def\@tempb{epic}\fi
194  \def\@tempa{dotted}%\def\ESO@gap{\LenToUnit{6\@wholewidth}}%
195  \ifx\@tempa\ESO@subgridstyle
196    \IfFileExists{\@tempb.sty}%
197    {%
198      \RequirePackage{\@tempb}
199      \renewcommand*\ESO@hline[1]{\ESO@subgridlines\dottedline{\ESO@gap}%
200        (0,0)(##1,0)}
201      \renewcommand*\ESO@vline[1]{\ESO@subgridlines\dottedline{\ESO@gap}%
202        (0,0)(0,##1)}
203    }{}
204  \else
205    \ifx\ESO@gridcolor\ESO@subgridcolor%
206      \renewcommand*\ESO@gridlines{\thicklines}
207    \fi
208  \fi
209}
210\ifESO@texcoord
211  \def\ESO@yoffsetI{0pt}\def\ESO@yoffsetII{-\paperheight}
212  \edef\ESO@griddeltaY{-\ESO@griddelta}\edef\ESO@gridDeltaY{-\ESO@gridDelta}
213\else
214  \def\ESO@yoffsetI{\paperheight}\def\ESO@yoffsetII{0pt}
215  \edef\ESO@griddeltaY{\ESO@griddelta}\edef\ESO@gridDeltaY{\ESO@gridDelta}
216\fi
217\newcommand\ESO@gridpicture{%
218  \begingroup
219    \setlength\unitlength{\ESO@gridunit}%
220    \ESO@color{\ESO@subgridcolor}%
221    \ESO@div{\paperheight}{\ESO@griddelta}%
222    \multiput(0,0)(0,\ESO@griddeltaY){\@tempcnta}%
223      {\ESO@hline{\LenToUnit{\paperwidth}}}%
224    \ESO@div{\paperwidth}{\ESO@griddelta}%
225    \multiput(0,\LenToUnit{\ESO@yoffsetII})(\ESO@griddelta,0){\@tempcnta}%
226      {\ESO@vline{\LenToUnit{\paperheight}}}%
227    \ESO@color{\ESO@gridcolor}%
228    \ESO@div{\paperheight}{\ESO@gridDelta}%
229    \multiput(0,0)(0,\ESO@gridDeltaY){\@tempcnta}%
230      {\ESO@Hline{\LenToUnit{\paperwidth}}}%
231    \ESO@div{\paperwidth}{\ESO@gridDelta}%
232    \multiput(0,\LenToUnit{\ESO@yoffsetII})(\ESO@gridDelta,0){\@tempcnta}%
233      {\ESO@Vline{\LenToUnit{\paperheight}}}%
234    \fontsize{10}{12}\normalfont%
235    \ESO@div{\paperwidth}{\ESO@gridDelta}%
236    \multiput(0,\ESO@gridDeltaY)(\ESO@gridDelta,0){\@tempcnta}{%
237      \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt%
238      \ifnum\@tempcntb>1\relax
239        \multiply\@tempcntb by \ESO@gridDelta\relax%
240        \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima%
241        \@tempcntb=\@tempdima%
242        \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}%
243      \fi}%
244    \ifx\ESO@gridunitname\@empty\def\@tempa{0}\else\def\@tempa{1}\fi%
245    \ESO@div{\paperheight}{\ESO@gridDelta}%
246    \multiput(\ESO@gridDelta,0)(0,\ESO@gridDeltaY){\@tempcnta}{%
247      \@tempcntb=\@tempcnta\advance\@tempcntb-\@multicnt%
248      \ifnum\@tempcntb>\@tempa\relax
249        \multiply\@tempcntb by \ESO@gridDelta\relax%
250        \@tempdima=\@tempcntb sp\@tempdima=\ESO@labelfactor\@tempdima%
251        \@tempcntb=\@tempdima%
252        \makebox(0,0)[c]{\ESO@colorbox{white}{\the\@tempcntb}}%
253      \fi
254    }%
255    \ifx\ESO@gridunitname\@empty\else%
256      \thicklines\fboxrule=\@wholewidth%
257      \put(\ESO@gridDelta,\ESO@gridDeltaY){\makebox(0,0)[c]{%
258        \ESO@fcolorbox{\ESO@gridcolor}{white}{%
259          \textbf{\ESO@gridunitname}}}}%
260    \fi
261    \normalcolor%
262  \endgroup
263}
264\ifESO@grid\g@addto@macro\ESO@HookIII{\ESO@gridpicture}\fi
265\endinput
266%%
267%% End of file `eso-pic.sty'.
Note: See TracBrowser for help on using the repository browser.