% cropmark.sty, for use with LaTeX 2.09 % ver. 1 % January 11, 1990 % Dominik Wujastyk % Wellcome Institute for the History of Medicine % 183 Euston Road % London NW1 2BP % England % JANET: wujastyk@uk.ac.ucl.euclid % Internet: dow@wjh12.harvard.edu % % % | | % | | % --- --- % This is a LaTeX style that % prints crop marks (or corner % rules) at the four corners of % the page, to help with % cutting and pasting. % Loosely based on Knuth's % \setcornerrules (TeXbook, % pp.416f.). % --- --- % | | % | | % % % % Usage: set the two parameters \@@@paperheight and \@@@paperwidth below % to the size you wish: these are the distances between the rules. % % Then include this style as a LaTeX style option: % \documentstyle[cropmarks]{book (or whatever)} % % That's it. Enjoy. Bug reports and improvements, please. % % \newdimen\@@@paperwidth \newdimen\@@@paperhmargin \newdimen\@@@paperheight \newdimen\@@@papervmargin % % Set the desired paper size here: % \@@@paperheight=7.5in \@@@paperwidth=4.5in % \def\@@@line{\hbox to \textwidth} % % Definition of \topticks and \botticks % \def\topticks{\vbox to 0pc{% \vskip-36.2pt % = the depth of the following vertical list \vskip-\@@@papervmargin \@@@line{\llap{\vrule width.2pt height2pc depth0pt\kern\@@@paperhmargin}\hfil \rlap{\kern\@@@paperhmargin\vrule width.2pt height2pc depth0pt}}\nointerlineskip \kern1pc \@@@line{\llap{\vrule width2pc height.2pt depth0pt\kern1pc\kern\@@@paperhmargin}\hfil \rlap{\kern\@@@paperhmargin\kern1pc\vrule width2pc height.2pt depth0pt}}% \kern\@@@papervmargin}} \def\botticks{\vbox to 0pt{% \vskip\@@@papervmargin \@@@line{\llap{\vrule width2pc height.0pt depth.2pt\kern1pc\kern\@@@paperhmargin}\hfil \rlap{\kern\@@@paperhmargin\kern1pc\vrule width2pc height0pt depth.2pt}}\nointerlineskip \kern1pc \@@@line{\llap{\vrule width.2pt height0pt depth2pc\kern\@@@paperhmargin}\hfil \rlap{\kern\@@@paperhmargin\vrule width.2pt height0pt depth2pc}}% \vskip-\@@@papervmargin \vskip-36.2pt}} % = the depth of the preceding vertical list % % Modified LaTeX output routine: % \def\@outputpage{\begingroup\catcode`\ =10 % Do the following calculations inside \@ouputpage so that the % most current values of the page dimensions are used. \advance\@@@paperwidth by -\textwidth \divide\@@@paperwidth by 2 \@@@paperhmargin=\@@@paperwidth % \advance\@@@paperheight by -\headheight \advance\@@@paperheight by -\headsep \advance\@@@paperheight by -\textheight \advance\@@@paperheight by -\footskip \divide\@@@paperheight by 2 \@@@papervmargin=\@@@paperheight % \let\-\@dischyph \let\'\@acci \let\`\@accii \let\=\@acciii \if@specialpage \global\@specialpagefalse\@nameuse{ps@\@specialstyle}\fi \if@twoside \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot \let\@themargin\oddsidemargin \else \let\@thehead\@evenhead \let\@thefoot\@evenfoot \let\@themargin\evensidemargin \fi\fi \shipout \vbox{\normalsize \baselineskip\z@ \lineskip\z@ \let\par\@@par %% 15 Sep 87 \vskip \topmargin \moveright\@themargin \vbox{\topticks \setbox\@tempboxa \vbox to\headheight{\vfil \hbox to\textwidth {\let\label\@gobble \let\index\@gobble \@thehead}} %% 22 Feb 87 \dp\@tempboxa\z@ \box\@tempboxa \vskip \headsep \box\@outputbox \baselineskip\footskip \hbox to\textwidth{\let\label\@gobble \let\index\@gobble %% 22 Feb 87 \@thefoot}% \nointerlineskip\botticks}}% \global\@colht\textheight \endgroup\stepcounter{page}\let\firstmark\botmark}