%PDF- %PDF-
| Direktori : /proc/self/root/usr/share/texlive/texmf-dist/tex/latex/crop/ |
| Current File : //proc/self/root/usr/share/texlive/texmf-dist/tex/latex/crop/crop.sty |
%%
%% This is file `crop.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% crop.dtx (with options: `package')
%%
%% IMPORTANT NOTICE:
%%
%% For the copyright see the source file.
%%
%% Any modified versions of this file must be renamed
%% with new filenames distinct from crop.sty.
%%
%% For distribution of the original source see the terms
%% for copying and modification in the file crop.dtx.
%%
%% This generated file may be distributed as long as the
%% original source files, as listed above, are part of the
%% same distribution. (The sources need not necessarily be
%% in the same archive or directory.)
%% File: crop.dtx Copyright (C) 1998--2003 Melchior FRANZ
%% $Id: crop.dtx,v 1.92 2003/05/19 20:05:17 m Rel $
%% $Version: 1.9 $
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{crop}[2003/05/20 v1.9 crop marks (mf)]
\expandafter\ifx\csname stockwidth\endcsname\relax
\newdimen\stockwidth
\stockwidth\paperwidth
\fi
\expandafter\ifx\csname stockheight\endcsname\relax
\newdimen\stockheight
\stockheight\paperheight
\fi
\newcount\CROP@index
\CROP@index\z@
\newcommand*\CROP@font{}
\let\CROP@stockcolor\@empty
\let\CROP@pagecolor\@empty
\IfFileExists{color.sty}{%
\RequirePackage{color}%
\let\CROP@needscolor\@empty
}{%
\newcommand*\CROP@needscolor{%
\PackageError{crop}{%
The `invert' and `notext' options require the\MessageBreak
`color' package, which doesn't seem to be installed%
}{%
Install the `color' package or don't use the `invert'
\MessageBreak or `notext' option.
}%
\let\CROP@needscolor\relax
}%
\let\current@color\relax
}
\let\CROP@detdriver\@empty
\IfFileExists{graphics.sty}{%
\RequirePackage{graphics}%
\let\CROP@Ginclude@graphics\Ginclude@graphics
\ifx\Gin@driver\@empty\else
\filename@parse{\Gin@driver}%
\edef\CROP@detdriver{\filename@base}%
\fi
\let\CROP@ps\Gin@PS@raw
}{%
\PackageWarning{crop}{I couldn't find the `graphics' package, so
I'll use\MessageBreak my internal PostScript interface%
}%
\newcommand*\CROP@ps[1]{\special{ps: ##1}}%
}
\let\CROP@reqdriver\@empty
\DeclareOption{vtex}{\def\CROP@reqdriver{vtex}}
\DeclareOption{pdftex}{\def\CROP@reqdriver{pdftex}}
\DeclareOption{pdflatex}{\def\CROP@reqdriver{pdftex}}
\DeclareOption{dvips}{\def\CROP@reqdriver{dvips}}
\let\CROP@driver\@empty
\DeclareOption{vtex!}{\def\CROP@driver{vtex}}
\DeclareOption{pdftex!}{\def\CROP@driver{pdftex}}
\DeclareOption{pdflatex!}{\def\CROP@driver{pdftex}}
\DeclareOption{dvips!}{\def\CROP@driver{dvips}}
\DeclareOption{nodriver}{\def\CROP@driver{none}}
\DeclareOption{!}{\def\CROP@driver{none}}
\newcommand*\CROP@evaldriver{%
\ifx\CROP@driver\@empty
\PackageInfo{crop}{requested driver: `\CROP@reqdriver'}%
\ifx\pdfoutput\@undefined\else
\ifx\pdfoutput\relax\else
\ifcase\pdfoutput\else
\def\CROP@detdriver{pdftex}%
\fi
\fi
\fi
\ifx\VTeXversion\@undefined\else
\ifx\VTeXversion\relax\else
\def\CROP@detdriver{vtex}%
\fi
\fi
\PackageInfo{crop}{detected driver: `\CROP@detdriver'}%
\ifx\CROP@reqdriver\@empty\else
\ifx\CROP@reqdriver\@empty\else
\ifx\CROP@reqdriver\CROP@detdriver\else
\PackageWarningNoLine{crop}{%
You requested the `\CROP@reqdriver' driver
but I think that\MessageBreak the
`\CROP@detdriver' driver works better in the
current\MessageBreak context. You can force
me to respect your decision\MessageBreak
by adding an exclamation point as in
[\CROP@reqdriver!]%
}%
\fi
\fi
\fi
\ifx\CROP@detdriver\@empty
\let\CROP@driver\CROP@reqdriver
\else
\let\CROP@driver\CROP@detdriver
\fi
\fi
\let\CROP@evaldriver\relax
}
\AtBeginDocument{\CROP@evaldriver}
\newcommand*\CROP@init@dvips{%
\PackageInfo{crop}{using `dvips' graphics driver}%
\AtBeginDvi{%
\special{papersize=\the\stockwidth,\the\stockheight}%
}%
}
\newcommand*\CROP@init@pdftex{%
\PackageInfo{crop}{using `pdftex' graphics driver}%
\pdfpagewidth\stockwidth
\pdfpageheight\stockheight
\let\CROP@reflect\CROP@genreflect
\let\CROP@rotate\CROP@genrotate
}
\newcommand*\CROP@init@vtex{%
\PackageInfo{crop}{using `vtex' graphics driver}%
\mediawidth\stockwidth
\mediaheight\stockheight
\let\CROP@reflect\CROP@genreflect
\let\CROP@rotate\CROP@genrotate
}
\newcommand*\CROP@init@none{%
\PackageInfo{crop}{not using any graphics driver}%
}
\newcommand*\CROP@size[2]{\stockwidth#1 \stockheight#2 }
\DeclareOption{landscape}{%
\def\CROP@size#1#2{\stockheight#1 \stockwidth#2 }%
}
\DeclareOption{a0}{\CROP@size{841truemm}{1189truemm}}
\DeclareOption{a1}{\CROP@size{595truemm}{841truemm}}
\DeclareOption{a2}{\CROP@size{420truemm}{595truemm}}
\DeclareOption{a3}{\CROP@size{297truemm}{420truemm}}
\DeclareOption{a4}{\CROP@size{210truemm}{297truemm}}
\DeclareOption{a5}{\CROP@size{149truemm}{210truemm}}
\DeclareOption{a6}{\CROP@size{105truemm}{149truemm}}
\DeclareOption{b0}{\CROP@size{1000truemm}{1414truemm}}
\DeclareOption{b1}{\CROP@size{707truemm}{1000truemm}}
\DeclareOption{b2}{\CROP@size{500truemm}{707truemm}}
\DeclareOption{b3}{\CROP@size{353truemm}{500truemm}}
\DeclareOption{b4}{\CROP@size{250truemm}{353truemm}}
\DeclareOption{b5}{\CROP@size{176truemm}{250truemm}}
\DeclareOption{b6}{\CROP@size{125truemm}{176truemm}}
\DeclareOption{letter}{\CROP@size{8.5truein}{11truein}}
\DeclareOption{legal}{\CROP@size{8.5truein}{14truein}}
\DeclareOption{executive}{\CROP@size{7.25truein}{10.5truein}}
\newcommand\CROP@opt@width{\stockwidth\CROP@@}
\newcommand\CROP@opt@height{\stockheight\CROP@@}
\DeclareOption{center}{\AtBeginDocument{\CROP@center}}
\newcommand*\CROP@center{%
\voffset\stockheight
\advance\voffset-\paperheight
\voffset.5\voffset
\hoffset\stockwidth
\advance\hoffset-\paperwidth
\hoffset.5\hoffset
}
\DeclareOption*{\CROP@execopt\CurrentOption}
\newcommand*\crop[1][cam,noaxes]{%
\@for\CROP@@:=#1\do{\CROP@execopt\CROP@@}%
}
\newcommand*\CROP@execopt[1]{%
\def\CROP@##1=##2=##3\@nil{\def\CROP@{##1}\def\CROP@@{##2}}%
\expandafter\CROP@#1==\@nil%
\@ifundefined{CROP@opt@\CROP@}{%
\PackageError{crop}{%
Requested option `#1' not provided%
}{%
Note that the `*center' options are obsolete. You have to
request\MessageBreak e.g. [a4,center] instead of
[a4center].
}%
}{%
\@nameuse{CROP@opt@\CROP@}%
}%
}
\newcommand*\cropdef[6][\CROP@@info]{%
\@namedef{CROP@opt@#6}{%
\def\CROP@info{#1}%
\let\CROP@ulc#2
\let\CROP@urc#3
\let\CROP@llc#4
\let\CROP@lrc#5
\let\CROP@@@marks\CROP@marks
}%
}
\newcommand*\CROP@@laxis{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(-2,0){\line(-1,0){11}}
\end{picture}%
}
\newcommand*\CROP@@raxis{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(2,0){\line(1,0){11}}
\end{picture}%
}
\newcommand*\CROP@@upaxis{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(0,2){\line(0,1){11}}
\end{picture}%
}
\newcommand*\CROP@@loaxis{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(0,-2){\line(0,-1){11}}
\end{picture}%
}
\newcommand*\CROP@time{}
\bgroup
\count@\time
\divide\time60
\count\@ne\time
\multiply\time60
\advance\count@-\time
\xdef\CROP@time{\the\count\@ne:\two@digits{\count@}}
\egroup
\newcommand*\CROP@@info{{%
\global\advance\CROP@index\@ne
\def\x{\discretionary{}{}{\hbox{\kern.5em---\kern.5em}}}%
\advance\paperwidth-20\p@
\dimen@4pt
\ifx\CROP@pagecolor\@empty
\else
\advance\dimen@\CROP@overlap
\fi
\hb@xt@\z@{%
\hss
\vbox to\z@{%
\centering
\hsize\paperwidth
\vss
\normalfont
\normalsize
\expandafter\csname\CROP@font\endcsname{%
``\jobname''\x
\the\year/\the\month/\the\day\x
\CROP@time\x
page\kern.5em\thepage\x
\#\the\CROP@index
\strut
}%
\vskip\dimen@
}%
\hss
}%
}}
\newcommand*\CROP@opt@font{\let\CROP@font\CROP@@}
\newcommand*\CROP@@ulc{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(-30,0){\circle{10}}
\put(-30,-5){\line(0,1){10}}
\put(-35,0){\line(1,0){30}}
\put(0,30){\circle{10}}
\put(-5,30){\line(1,0){10}}
\put(0,35){\line(0,-1){30}}
\end{picture}%
}
\newcommand*\CROP@@urc{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(30,0){\circle{10}}
\put(30,-5){\line(0,1){10}}
\put(35,0){\line(-1,0){30}}
\put(0,30){\circle{10}}
\put(-5,30){\line(1,0){10}}
\put(0,35){\line(0,-1){30}}
\end{picture}%
}
\newcommand*\CROP@@llc{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(-30,0){\circle{10}}
\put(-30,-5){\line(0,1){10}}
\put(-35,0){\line(1,0){30}}
\put(0,-30){\circle{10}}
\put(-5,-30){\line(1,0){10}}
\put(0,-35){\line(0,1){30}}
\end{picture}%
}
\newcommand*\CROP@@lrc{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(30,0){\circle{10}}
\put(30,-5){\line(0,1){10}}
\put(35,0){\line(-1,0){30}}
\put(0,-30){\circle{10}}
\put(-5,-30){\line(1,0){10}}
\put(0,-35){\line(0,1){30}}
\end{picture}%
}
\cropdef\CROP@@ulc\CROP@@urc\CROP@@llc\CROP@@lrc{cam}
\newcommand*\CROP@@cross{%
\begin{picture}(0,0)
\unitlength1cm\thinlines
\put(-2,0){\line(1,0){4}}
\put(0,-2){\line(0,1){4}}
\end{picture}%
}
\cropdef\CROP@@cross\CROP@@cross\CROP@@cross\CROP@@cross{cross}
\newcommand*\CROP@@frame{%
\begin{picture}(0,0)
\unitlength\p@\thinlines
\put(0,0){\line(1,0){\strip@pt\paperwidth}}
\put(0,0){\line(0,-1){\strip@pt\paperheight}}
\put(\strip@pt\paperwidth,0){\line(0,-1){\strip@pt\paperheight}}
\put(0,-\strip@pt\paperheight){\line(1,0){\strip@pt\paperwidth}}
\end{picture}%
}
\cropdef\CROP@@frame\relax\relax\relax{frame}
\let\CROP@shipout\shipout
\renewcommand*\shipout{%
\afterassignment\CROP@ship
\setbox\@cclv=%
}
\newcommand*\CROP@ship{%
\ifvoid\@cclv
\expandafter\aftergroup
\fi
\CROP@@ship
}
\newcommand*\CROP@shiplist{%
\lineskip\z@
\lineskiplimit\z@
\baselineskip\z@
\CROP@kernel
\box\@cclv
}
\newcommand*\CROP@@ship{%
\CROP@shipout\vbox{\CROP@shiplist}%
}
\newcommand*\CROP@shipadd[1]{%
\bgroup
\toks@\expandafter{\expandafter#1\expandafter{\CROP@shiplist}}%
\xdef\CROP@shiplist{\the\toks@}%
\egroup
}
\newcommand*\CROP@kernel{%
\vbox to\z@{%
\vskip\CROP@vorigin
\hb@xt@\z@{%
\hskip\CROP@horigin
\vbox to\paperheight{%
\let\protect\relax
\hsize\paperwidth
\CROP@hook
\CROP@user@a
\CROP@drawstockcolor
\CROP@drawpagecolor
\CROP@@@marks
}%
\hss
}%
\vss
}%
}
\newcommand*\CROP@marks{%
\CROP@setmarkcolor
\CROP@user@b
\CROP@ulc\null\hfill\CROP@@@info\CROP@upedge\hfill\null\CROP@urc
\vfill
\CROP@ledge\hfill\CROP@redge
\vfill
\CROP@llc\null\hfill\CROP@loedge\hfill\null\CROP@lrc
}
\let\CROP@@@marks\CROP@marks
\newcommand*\CROP@setmarkcolor{%
\let\current@color\CROP@markcolor
\set@color
}
\let\CROP@user@a\relax
\let\CROP@user@b\relax
\newcommand*\CROP@opt@horigin{\let\CROP@horigin\CROP@@}
\newcommand*\CROP@opt@vorigin{\let\CROP@vorigin\CROP@@}
\newcommand*\CROP@opt@off{%
\let\CROP@@@marks\vfil
}
\newcommand*\CROP@opt@odd{%
\def\CROP@@@marks{\ifodd\c@page\CROP@marks\else\vfil\fi}%
}
\newcommand*\CROP@opt@even{%
\def\CROP@@@marks{\ifodd\c@page\vfil\else\CROP@marks\fi}%
}
\newcommand*\CROP@@@info{}
\newcommand*\CROP@opt@info{\def\CROP@@@info{\CROP@info}}
\newcommand*\CROP@opt@noinfo{\let\CROP@@@info\relax}
\newcommand*\CROP@opt@axes{%
\let\CROP@ledge\CROP@@laxis
\let\CROP@redge\CROP@@raxis
\let\CROP@upedge\CROP@@upaxis
\let\CROP@loedge\CROP@@loaxis
}
\newcommand*\CROP@opt@noaxes{%
\let\CROP@ledge\relax
\let\CROP@redge\relax
\let\CROP@upedge\relax
\let\CROP@loedge\relax
}
\expandafter\newcommand\expandafter*\csname CROP@opt@mount1\endcsname{%
\let\CROP@hook\relax
}
\newcount\CROP@offset
\expandafter\newcommand\expandafter*\csname CROP@opt@mount2\endcsname{%
\CROP@offset=\ifx\CROP@@\@empty\z@\else\CROP@@\fi
\def\CROP@hook{%
\count@\c@page
\advance\count@\CROP@offset
\ifodd\count@
\let\CROP@ulc\relax
\let\CROP@llc\relax
\let\CROP@ledge\relax
\else
\let\CROP@urc\relax
\let\CROP@lrc\relax
\let\CROP@redge\relax
\fi
}%
}
\DeclareOption{mirror}{%
\AtBeginDocument{\CROP@shipadd\CROP@reflect}
}
\newcommand*\CROP@reflect[1]{%
\vbox to\z@{%
\vskip\CROP@vorigin
\hb@xt@\z@{%
\hskip\CROP@horigin
\CROP@ps{gsave currentpoint}%
\kern\paperwidth
\CROP@ps{currentpoint}%
\hss
}%
\vss
}%
\CROP@ps{translate -1 1 scale neg exch neg exch translate}%
\vbox{#1}%
\CROP@ps{grestore}%
}
\newcommand*\CROP@genreflect[1]{%
\leavevmode
\dimen0\CROP@horigin
\kern2\dimen0
\reflectbox{%
\hb@xt@\paperwidth{%
\vbox to\paperheight{%
#1%
\vss
}%
\hss
}%
}%
}
\DeclareOption{rotate}{%
\AtBeginDocument{\CROP@shipadd\CROP@rotate}
}
\newcommand*\CROP@rotate[1]{%
\hb@xt@\z@{%
\hskip\CROP@horigin
\vbox to\z@{%
\vskip\CROP@vorigin
\CROP@ps{gsave currentpoint}%
\kern\paperheight
\hb@xt@\z@{%
\kern\paperwidth
\CROP@ps{currentpoint}%
\hss
}%
\vss
}%
\hss
}%
\CROP@ps{translate 180 rotate neg exch neg exch translate}%
\vbox{#1}%
\CROP@ps{grestore}%
}
\newcommand*\CROP@genrotate[1]{%
\dimen0\CROP@vorigin
\kern2\dimen0
\leavevmode
\dimen0\CROP@horigin
\kern2\dimen0
\rotatebox{180}{%
\hb@xt@\paperwidth{%
\vbox to\paperheight{%
#1%
\vss
}%
\hss
}%
}%
}
\newcommand*\CROP@defmarkcolor[1]{{%
\def\set@color{\global\let\CROP@markcolor\current@color}%
\@declaredcolor{#1}%
}}
\ifx\CROP@needscolor\@empty
\renewcommand*\set@page@color{%
\global\let\CROP@stockcolor\current@color
}%
\AtBeginDocument{%
\def\set@page@color{%
\global\let\CROP@pagecolor\current@color
}%
}%
\CROP@defmarkcolor{black}%
\let\CROP@needscolor\relax
\fi
\newcommand*\CROP@opt@color{%
\CROP@needscolor
\expandafter\CROP@defmarkcolor\expandafter{\CROP@@}%
}
\newcommand*\CROP@drawstockcolor{%
\ifx\CROP@stockcolor\@empty
\else
\rlap{%
\smash{%
\raise\voffset\hbox{%
\let\current@color\CROP@stockcolor
\set@color
\hskip-\hoffset
\vrule width\stockwidth height\z@ depth\stockheight
}%
}%
}%
\fi
}
\newcommand*\CROP@drawpagecolor{%
\ifx\CROP@pagecolor\@empty
\else
\rlap{%
\smash{%
\dimen@\CROP@overlap
\advance\paperwidth2\dimen@
\advance\paperheight2\dimen@
\raise\dimen@\hbox{%
\let\current@color\CROP@pagecolor
\set@color
\hskip-\dimen@
\vrule width\paperwidth height\z@ depth\paperheight
}%
}%
}%
\fi
}
\def\CROP@overlap{3truemm}
\newcommand*\CROP@opt@overlap{\let\CROP@overlap\CROP@@}
\newcommand*\CROP@invert[1]{%
\CROP@needscolor
\AtBeginDvi{%
\pagecolor{#1}%
\global\let\set@page@color\relax
\global\let\CROP@setpagecolor\relax
}%
\color{white}%
\DeclareRobustCommand*\color[2][]{}%
\let\pagecolor\color
\let\textcolor\color
\let\CROP@invert\@gobble
}
\DeclareOption{invert}{%
\CROP@invert{black}%
\let\CROP@setmarkcolor\relax
}
\DeclareOption{notext}{%
\CROP@invert{white}%
}
\newcommand*\CROP@opt@nographics{%
\def\Ginclude@graphics##1{%
\phantom{%
\CROP@Ginclude@graphics{##1}%
}%
}%
}%
\newcommand*\CROP@opt@graphics{%
\let\Ginclude@graphics\CROP@Ginclude@graphics
}
\newcommand*\CROP@horigin{-1truein}
\newcommand*\CROP@vorigin{-1truein}
\crop[cam,off,noaxes,info,mount1]
\InputIfFileExists{crop.cfg}{%
\PackageInfo{crop}{Local config file crop.cfg used}
}{}
\ProcessOptions
\AtBeginDocument{\@nameuse{CROP@init@\CROP@driver}}
\endinput
%%
%% End of file `crop.sty'.