]> git.sur5r.net Git - bacula/docs/blob - docs/latex/atxy.sty
Clarifications + next release
[bacula/docs] / docs / latex / atxy.sty
1 %%%%%% atxy.sty  V1.1
2 % at.sty     Colin Hogben (chah@jet.uk)
3 % 12-Aug-91  First version
4 % 20-Mar-92  Fixed to allow for \headheight
5 % 06-Jul-93  \@useat only used in case of any \at material (B.gaulle)
6 % 07-Jul-93  at -> atxy, reset of \par added to \output (Y. Delmas)
7 % 08-Jul-93  \global setting of \atxytrue. 
8 %            Reset @ original \catcode (letter or other).
9 %            \kerning of \voffset & \hoffset required.   (B.Gaulle) 
10 % 25-Jan-94  \atxy printed nothing at all (pointed by Ph. Louarn)
11 %            when one \atxy was specified between \begingroup and \endgroup.
12 %            The \setbox nedded to be \global.  This will be V1.1 (B. Gaulle) 
13 %
14 % \atxy(HPOS,VPOS){TEXT}         % Y
15 % Positions TEXT at an absolute distance of HPOS from the left edge
16 % and VPOS from the top edge of the current page.
17 %
18 % Example:
19 %   \atxy(2cm,5cm){\parbox[t]{10cm}{
20 %       Name\\          % Recipient's name and address positioned
21 %       Address\\etc.}} % suitably for a windowed envelope
22 % -----------------------------------------------------------------
23 %%
24 %%      checksum        = "19479 77 357 2869"
25 %%
26 % -----------------------------------------------------------------
27 %
28 % First create a box in which to store absolute positioned material.
29 %
30 \ifcat/@ \makeatletter\let\resetat\makeatother% save @ \catcode
31                       \else\let\resetat\relax\fi% (letter or other only)
32 \newbox\@atxybox%
33 \newif\if@atxy\@atxyfalse% --bg
34 %
35 % atxy(HPOS,VPOS){TEXT}
36 % Add the TEXT to the box with suitable offsets applied.
37 %
38 \long\def\atxy(#1,#2)#3{\global\setbox\@atxybox=\hbox% --bg
39  {\unhbox\@atxybox
40   \vtop to 0pt{\kern #2\hbox to 0pt{\kern #1\relax #3\hss}\vss}}%
41  \global\@atxytrue}% --bg
42 %
43 % Unload the saved absolute-positioned material.
44 % Teleport to the actual top corner of the page by undoing the header
45 % separation, the top and side margins, and the mysterious 1 inch
46 % offset applied to each. Then make it look like a singularity (zero
47 % height, depth and width).
48 %
49 \def\@useatxy{\if@atxy% --bg
50   \vtop to 0pt{\kern-\headsep \kern-\topmargin \kern-\headheight 
51                \kern-1in \kern-\voffset
52     \hbox to 0pt{\kern-\@themargin \kern-1in \kern-\hoffset
53 \unhbox\@atxybox \hss}\vss}%
54             \fi\global\@atxyfalse}% --bg
55 %
56 % The following is a copy of the latex.tex \output routine except for
57 % line 1: this prepends the shifted absolute material to the current
58 % page. A little unsafe to copy code like this, but I couldn't work
59 % out where else to insert the box.
60 %
61 \output{\setbox255=\vbox{\@useatxy \unvbox255}\let\par\@@par%
62   \ifnum\outputpenalty <-\@M\@specialoutput\else%
63   \@makecol\@opcol\@floatplacement\@startcolumn%
64   \@whilesw\if@fcolmade \fi{\@opcol\@startcolumn}\fi%
65   \global\vsize\ifnum\outputpenalty >-\@Miv \@colroom%
66                   \else \maxdimen\fi}%
67 %
68 \resetat% reset @ original \catcode
69 \endinput% --bg
70 \1a