| 1 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 2 |
% |
| 3 |
% Module: ZzTeX Page Overlay Facilities |
| 4 |
% |
| 5 |
% Synopsis: This file provides the ability to overlay text and rules |
| 6 |
% on each page. |
| 7 |
% |
| 8 |
% Author: Paul C. Anagnostopoulos |
| 9 |
% Created: 29 March 2006 |
| 10 |
% |
| 11 |
% Copyright 1989--2020 by Paul C. Anagnostopoulos |
| 12 |
% under The MIT License (opensource.org/licenses/MIT) |
| 13 |
% |
| 14 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 15 |
|
| 16 |
% Overlay & Proof Identification |
| 17 |
% ------- - ----- -------------- |
| 18 |
|
| 19 |
|
| 20 |
\setflag \zoverlayset = \false |
| 21 |
\definetoks{\zoverlay} |
| 22 |
\zoverlay = {blind} |
| 23 |
\definetoks{\zproofid} |
| 24 |
\zproofid = {} |
| 25 |
|
| 26 |
\def \setpageoverlay #1{% {name} |
| 27 |
\global\setflag \zoverlayset = \true |
| 28 |
\global\zoverlay = {#1}} |
| 29 |
|
| 30 |
\def \proofidentification #1{% {text} |
| 31 |
\zproofid = {#1}} |
| 32 |
|
| 33 |
\def \zproofidfile {% |
| 34 |
\immediate\openout \zwritea = \jobname.zzq\relax |
| 35 |
\immediate\write \zwritea {\the\zproofid}% |
| 36 |
\immediate\closeout \zwritea} |
| 37 |
|
| 38 |
% Builtin Overlays |
| 39 |
% ------- -------- |
| 40 |
|
| 41 |
|
| 42 |
\definedimen{\zoverlaythickness}{.4pt} |
| 43 |
|
| 44 |
|
| 45 |
\def \pageoverlayblind {} |
| 46 |
|
| 47 |
\def \pageoverlaytrimbox {% |
| 48 |
\smashbox{% |
| 49 |
\vbox to \trimheight{% |
| 50 |
\topcornermarks{\trimwidth}{.5\trimheight}{\zoverlaythickness}% |
| 51 |
\vss |
| 52 |
\bottomcornermarks{\trimwidth}{.5\trimheight}{\zoverlaythickness}}}% |
| 53 |
\zpagelengthmarks |
| 54 |
\zslugline} |
| 55 |
|
| 56 |
\def \pageoverlaytrimmarks {% |
| 57 |
\smashbox{% |
| 58 |
\vbox to \trimheight{% |
| 59 |
\topcornermarks{\trimwidth}{.75pc}{\zoverlaythickness}% |
| 60 |
\vss |
| 61 |
\bottomcornermarks{\trimwidth}{.75pc}{\zoverlaythickness}}}% |
| 62 |
\zpagelengthmarks |
| 63 |
\zslugline} |
| 64 |
|
| 65 |
% Page Length Marks |
| 66 |
% ---- ------ ----- |
| 67 |
|
| 68 |
|
| 69 |
\def \zpagelengthmarks {% |
| 70 |
\smashbox{% |
| 71 |
\calculate \tdimena = {\headmargin,+,\typeareaheight,-,\footerheight}% |
| 72 |
\vskip \tdimena |
| 73 |
\hbox to \trimwidth{% |
| 74 |
\llap{\vrule height \zoverlaythickness width .75pc}\hfil |
| 75 |
\rlap{\vrule height \zoverlaythickness width .75pc}}}} |
| 76 |
|
| 77 |
% Slug Line |
| 78 |
% ---- ---- |
| 79 |
|
| 80 |
|
| 81 |
\definedimen{\zslugindent}{.25in} |
| 82 |
|
| 83 |
|
| 84 |
\def \zslugline {% |
| 85 |
\if \notp{\emptytoksp{\zproofid}}% |
| 86 |
\kern \trimheight |
| 87 |
\if \dimgtrp{\trimheight}{10.75in}\kern -.25in \fi |
| 88 |
\kern -8pt |
| 89 |
\hbox to \trimwidth{% |
| 90 |
\hspace{\zslugindent}% |
| 91 |
\zannofont |
| 92 |
\the\zproofid \quad |
| 93 |
\number\year/\number\month/\number\day\space \formattime \quad |
| 94 |
p. \folio \hspace{5pt}% |
| 95 |
\if \notp{\emptytoksp{\divisionname}}(\the\divisionname)\fi |
| 96 |
\hfill |
| 97 |
\inicompositor, \iniinitials \quad |
| 98 |
\ZzTeX\ \ZzTeXversion |
| 99 |
\hspace{\zslugindent}}% |
| 100 |
\fi} |