| 1 |
%% poligraf.sty generic macros |
| 2 |
%% Copyright (C) 1996, 2001 Janusz Marian Nowacki. Public domain. |
| 3 |
%% [Polish:] | [English:] |
| 4 |
% ,,Mi/edzy \TeX-em a drukarni/a'' | ``Between \TeX{} and the printing house'' |
| 5 |
% wersja 2.0, kwiecie/n 2001 r. | version 2.0, April 2001 |
| 6 |
%--- |
| 7 |
% Cel: obs/luga strony dokumentu | Purpose: preparation of pages for |
| 8 |
% dla cel/ow drukarskich, separacje | prepress, color separation, cropmarks, |
| 9 |
% barwne, pasery, ,,lustro''. | color and gray scale bars, mirror print. |
| 10 |
%--- |
| 11 |
% Author: Janusz Marian Nowacki |
| 12 |
% 86-300 Grudzi/adz |
| 13 |
% ul. /Sniadeckich 82/46 |
| 14 |
% tel. +48 +56 46-218-37 |
| 15 |
% Poland |
| 16 |
% e-mail: [email protected] |
| 17 |
%% Wsp/o/lpraca i komentarze: | Cooperation and comments: |
| 18 |
%% BOP s.c. & Staszek Wawrykiewicz |
| 19 |
% |
| 20 |
%------------------------------------------------------------------ |
| 21 |
\catcode`\@=11 |
| 22 |
% |
| 23 |
\newdimen\bigpoint \bigpoint 1pt |
| 24 |
\newdimen\Voffsetdim \Voffsetdim\voffset \advance\Voffsetdim by 1in |
| 25 |
\newcount\Voffset \Voffset\Voffsetdim \divide\Voffset by \bigpoint |
| 26 |
\newdimen\Hoffsetdim \Hoffsetdim\hoffset \advance\Hoffsetdim by 1in |
| 27 |
\newcount\Hoffset \Hoffset\Hoffsetdim \divide\Hoffset by \bigpoint |
| 28 |
\newcount\overprintblack \overprintblack=1 |
| 29 |
% |
| 30 |
\def\cropmarkdistance #1{% |
| 31 |
\special{!userdict begin /cropmarkdistance #1 def end}} |
| 32 |
\def\cropmarksize #1{% |
| 33 |
\special{!userdict begin /cropmarksize #1 def end}} |
| 34 |
\def\barsize #1{% |
| 35 |
\special{!userdict begin /barsize #1 def end}} |
| 36 |
\def\nocolorbars{% |
| 37 |
\special{!userdict begin /colorbars 0 def end}} |
| 38 |
\def\onlycolorbars{% |
| 39 |
\special{!userdict begin /colorbars 3 def end}} |
| 40 |
\def\onlycolorsteps{% |
| 41 |
\special{!userdict begin /colorbars 2 def end}} |
| 42 |
\def\mirror{% |
| 43 |
\special{!userdict begin /mirror 1 def end}} |
| 44 |
\def\xoffset #1{% |
| 45 |
\special{!userdict begin /xoffset #1 def end}} |
| 46 |
\def\yoffset #1{% |
| 47 |
\special{!userdict begin /yoffset #1 def end}} |
| 48 |
\def\labeloff{% |
| 49 |
\special{!userdict begin /marglabel 0 def end}} |
| 50 |
% |
| 51 |
\def\CYAN {1 0 0 0} |
| 52 |
\def\MAGENTA{0 1 0 0} |
| 53 |
\def\YELLOW {0 0 1 0} |
| 54 |
\def\BLACK {0 0 0 1} |
| 55 |
\def\sepcolor{} |
| 56 |
\def\NoOverPrintBlack{\overprintblack=0} |
| 57 |
% |
| 58 |
\def\Separate #1{% |
| 59 |
\input cmyk-hax |
| 60 |
\edef\projectcolor{#1}% |
| 61 |
\ifx\projectcolor\CYAN |
| 62 |
\def\sepcolor{\projectCMYK\cyan} |
| 63 |
\special{!userdict begin /color_sep 0 def /setsep 1 def end} |
| 64 |
\ifnum\overprintblack>0 \delblacktrue \fi |
| 65 |
\else \ifx\projectcolor\MAGENTA |
| 66 |
\def\sepcolor{\projectCMYK\magenta} |
| 67 |
\special{!userdict begin /color_sep 1 def /setsep 2 def end} |
| 68 |
\ifnum\overprintblack>0 \delblacktrue \fi |
| 69 |
\else \ifx\projectcolor\YELLOW |
| 70 |
\def\sepcolor{\projectCMYK\yellow} |
| 71 |
\special{!userdict begin /color_sep 2 def /setsep 3 def end} |
| 72 |
\ifnum\overprintblack>0 \delblacktrue \fi |
| 73 |
\else \ifx\projectcolor\BLACK |
| 74 |
\def\sepcolor{\projectCMYK\black} |
| 75 |
\special{!userdict begin /color_sep 3 def /setsep 4 def end} |
| 76 |
\fi \fi \fi \fi |
| 77 |
} |
| 78 |
% |
| 79 |
\def\add@makeheadline#1{% |
| 80 |
\let\oriheadline\makeheadline% |
| 81 |
\def\makeheadline{#1\oriheadline}% |
| 82 |
} |
| 83 |
\def\add@begindvi#1{% |
| 84 |
\def\PoligrafHook{#1}% |
| 85 |
\def\@begindvi{% |
| 86 |
\PoligrafHook% |
| 87 |
\unvbox \@begindvibox% |
| 88 |
\gdef\@begindvi{\PoligrafHook}% |
| 89 |
}} |
| 90 |
% |
| 91 |
\ifx\documentclass\@undefined |
| 92 |
\add@makeheadline{\sepcolor} % for Plain |
| 93 |
\else |
| 94 |
\add@begindvi{\sepcolor} % for LaTeX |
| 95 |
\fi |
| 96 |
% |
| 97 |
\catcode`\@=12 |
| 98 |
% |
| 99 |
\special{header=crops.pro} |
| 100 |
% |
| 101 |
\endinput |