\iffalse % %% Package draftcopy to use with LaTeX2e

advertisement

\iffalse

%<*package>

%% Package draftcopy to use with LaTeX2e

%% This package is used to print on some pages the word `DRAFT'

%% (or the language dependend analogon) ``behind'' the intended stuff.

%%

%% Copyright (C) 1995 Dr. Juergen Vollmer

%% Viktoriastrasse 15, D-76133 Karlsruhe, Germany

%% Juergen.Vollmer@acm.org

%%

%% This program can be redistributed and/or modified under the terms

%% of the LaTeX Project Public License Distributed from CTAN

%% archives in directory macros/latex/base/lppl.txt; either

%% version 1 of the License, or any later version.

%%

%% If you find this software useful, please send me a postcard:

%</package>

\fi

%

%

\DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossref s}

%

\DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo}

%

\DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage}

%

\DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage

}

% \DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage}

%

\DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions

}

%

\DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument

}

% \DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError}

% \DoNotIndex{\if,\else,\fi,\emph,\footnotesize,\footrulewidth,\let}

%

\DoNotIndex{\newcount,\newif,\number,\or,\parindent,\plainfootrulewidth}

% \DoNotIndex{\PrintChanges,\PrintIndex,\relax,\setlength,\space}

% \DoNotIndex{\the,\textwidth,\thepage,\newcommand,\texttt,\verb,\vfill}

% \DoNotIndex{\input,\newpage,\setcounter,\newcounter,\\,\

,\typeout,\today}

%

% \changes{v1.00}{}{The initial sty was written by somebody.}

% \changes{v2.00}{1995/08/10}{Upgrade to LaTeX2e added all the new

% functionality.}

% \changes{v2.01}{1995/08/15}{Changed translation position, lower left corner.}

% \changes{v2.02}{1995/08/30}{Added README and Makefile.}

% \changes{v2.03}{1995/10/16}{Use all BABEL languages, and use DRAFT for them.}

% \changes{v2.04}{1996/02/24}{More translations of the word DRAFT.}

% \changes{v2.05}{1996/02/28}{Added \emph{dvips} and \emph{dvipsone} options.}

% \changes{v2.06}{1996/03/01}{Added fix for old dvips.}

% \changes{v2.07}{1996/03/12}{Support for the \emph{textures} graphics

% driver,\\

% use \emph{gracpics.cfg} configuration file.}

% \changes{v2.08}{1996/05/20}{Added \emph{none}, \emph{bottom} and

% \emph{bottomafter} options.}

% \changes{v2.09}{1996/05/22}{Added \emph{outline} option.}

% \changes{v2.10}{1996/10/04}{New address.}

% \changes{v2.11}{1998/06/05}{Added the file \emph{draftcopy.cfg}, save

% and execute previous defined bop-hook.}

% \changes{v2.12}{1999/03/02}{Added macros:\\

% \texttt{draftcopySetScale} and\\

% \texttt{draftcopyFirstPage}.\\

% Put \texttt{draftcopy} under the same

% license as \LaTeX.}

% \changes{v2.12.4}{1999/04/26}{Corrected typoo in catalan translation of

% draft\\

% added -- between bottom DRAFT words\\

% Corrected typoo Makefile\\

% Corrected Y\&Y stuff, thanks to the Help

Line

% of Y\&Y}

% \changes{v2.12.5}{1999/04/30}{Now \texttt{today} can be used as draftcopy

% name, even for languages like german.}

% \changes{v2.12.6}{1999/04/30}{Use \texttt{space} instead of

% \texttt{@draftcopySpace}}

% \changes{v2.13}{2000/04/16}{New options portrait and landscape, thanks to

% Ross Moore \texttt{ross@ics.mq.edu.au}

% providing the Postscript code for them.}

% \changes{v2.14}{2001/08/24}{Added \texttt{conditional}, \texttt{final} and

% \texttt{draft} options.\\

% Added \texttt{draftcopyPageX}, etc.\ and

% \texttt{draftcopySetScaleFactor} macros.\\

% Added the \texttt{timestamp} option and

% \texttt{draftcopyVersion} macro.\\

% Added the \texttt{greek} language option.

% }

% \changes{v2.15}{2001/09/07}{Added support for the vtex DVI graphics driver.

% The generated |draftcopy.cfg| will set the vtex

% dvips driver automatically.\\

% Fix for MikTeX / YAP: the DVI didn't show up

% propperly.}

% \changes{v2.16}{2002/02/25}{Replace count99 by count@}

% \title{The \texttt{draftcopy} package\thanks{This not a DRAFT

% version of this document.

% Its simply documentation and demonstration of the package in

% one document.}}

% \author{Dr.~J{\"u}rgen Vollmer\\Viktoriastra{\ss}e 15\\

% D-76133 Karlsruhe, Germany\\

% {\footnotesize Juergen.Vollmer@acm.org}}

% \date{February 25, 2002; Version 2.16}

%

% \maketitle

%

% \begin{abstract}

% This package is used to print on some pages the word \emph{DRAFT}

% (or the language dependend analogon) ``behind'' the intended stuff.

% \end{abstract}

%

% \section{Introduction}

% %%%%%%%%%%%%%%%%%%%%%%%

% Before releasing a document you may wish to give it to others to proof read

% it. But it should be clear to the reader that it is still a draft version

% of that document. To mark this, so it could not be overseen, you can print

% the word \emph{DRAFT} with big and light grey letters onto some pages.

% This can be done with this package.

% You can specify the intensity of the gray, the range of pages onto which

% the word \emph{DRAFT} is printed and where it is printed (across the page

% or at the bottom). The word \emph{DRAFT} is replaced according to the

% language you are using, e.g.\ in german you get \emph{ENTWURF}. You may

% also specify any word to be used instead of \emph{DRAFT}. From now on in

% this document \emph{DRAFT} stands for that word.

% Credits go the the Unkown, who started this as a \LaTeX\ style file

% containing only the central \texttt{special} Postscript command printing

% english word \emph{DRAFT} on each page of the document. Credits also to

% those, who send me translations of the word \emph{DRAFT} and bugreports

% and bug-fixes as well ideas for more functionality (see in the sources).

% For \emph{italian}, \emph{dutch}, \emph{finnish} and \emph{french} two

% proposals exists. Have a look and change it (in the file

% \texttt{draftcopy.sty}, or by using \verb+\draftcopyName+) according to

% your mind.

%

% \section{User Interface}

% %%%%%%%%%%%%%%%%%%%%%%%%

%\subsection{Options}

%

% Options for this package are:

%

%\begin{center}

%\begin{tabular}{|l|p{0.75\textwidth}|}\hline\MakeShortVerb{\|}

% english, &

\\

% german, $\dots$

% & This package accepts the language options of the

% |babel| package\footnotemark. The |babel| package is not

% loaded by |draftcopy|.

\\\hline

% none & Don't print \emph{DRAFT} across of any page.

\\

% first & Prints \emph{DRAFT} across only on the first page.

\\

% firsttwo & Prints \emph{DRAFT} across only on the first two pages.

\\

% all & Prints \emph{DRAFT} across on all pages of the document.

\\

% bottom & Prints \emph{DRAFT} on all pages at the bottom of the page. \\

% bottomafter & Prints \emph{DRAFT} at the bottom of the pages following the

% pages which have \emph{DRAFT} across them.

\\

% outline & The word \emph{DRAFT} is printed with outlined letters.

\\

% light & The word \emph{DRAFT} is printed with a light grey.

\\

% dark & The word \emph{DRAFT} is printed with a dark grey.

\\\hline

% dvips, vtex, &

\\

% textures, $\dots$

% & This package accepts the options of the |graphics|

% package\footnotemark. The |graphics| package is not loaded

% by |draftcopy|.

\\\hline

% portrait & Page is in portrait shape.\\

% landscape & Page is in landscape shape.\\\hline

% conditional & Obey the (global) |draft| and |final| options.

% If |conditional| and |draft| are given, then the

% \emph{DRAFT} text is printed. If |conditional| and

|final|

% are given, \emph{DRAFT} is not printed. Only

|conditional|

% is given, \emph{DRAFT} is not printed.

% If |conditional| is not given then |draft| and |final| are

% ignored, and the \emph{DRAFT} text is printed always.\\

% draft & Print the \emph{DRAFT} text.\\

% final & Don't print any \emph{DRAFT} text.\\\hline

% timestamp & Print together with the word \emph{DRAFT} a timestamp and the

% text given by the |draftcopyVersion| macro.\\\hline

%\end{tabular}

%\end{center}

% \addtocounter{footnote}{-1}

% \footnotetext{Currently

% not all languages are supported, I still need volunteers to send me

% translation

% of the word \emph{DRAFT} into the other languages \LaTeX2e with its

% babel package supports.}

% \addtocounter{footnote}{+1}

% \footnotetext{Currently only |dvips|, |dvipsone|, |dvipswindo|, and

% |textures| are

% supported. All others are mapped to |dvips|. If you are using another driver,

% let me know what to.}

% The default options are: \emph{dvips,english,all,dark,portrait}, which

% corresponds to the

% behaviour of the old implementation of this package.

% The file |draftcopy.cfg| specifies the default Postscript driver.

% This specification is overruled, if the driver option is given explicitly.

%

% \subsection{Commands}

%

% Additionally to the options, each feature may be set by commands, which

% must be placed in the preamble of the document.

%

% \begin{itemize}

% \item \DescribeMacro{\draftcopySetGrey}

% Set the intensity of the gray. The argument value range from

$0.0$

% to $1.0$, where the smaller values darker.

% \item \DescribeMacro{\draftcopyFirstPage}

% The argument specifies the first page onto which

% \emph{DRAFT} will be printed. This is the physical page number.

% \item \DescribeMacro{\draftcopyLastPage}

% The argument specifies the last page onto which

% \emph{DRAFT} will be printed. This is the physical page number.

% \item \DescribeMacro{\draftcopyName}

% The first argument specifies the word to be printed instead

% of \emph{DRAFT}, the second, gives the scale factor for the font

% to be used.

% E.g.\ the english word \emph{DRAFT} needs 215, the german

% \emph{ENTWURF} needs 155.

% To add spaces in the word use the |\space| macro.

% \item \DescribeMacro{\draftcopySetScale}

% Change the default size of the word \emph{DRAFT}.

% \item \DescribeMacro{\draftcopySetScaleFactor}

% Change the multipiler of the scale.

% \item \DescribeMacro{\draftcopyPageTransform} and

% \item \DescribeMacro{\draftcopyBottomTransform} take raw PostScript

% to set the LL-corner of the \emph{DRAFT} string

% Use them \emph{before} the |\begin{document}|.

% For code examples: Have a look to the definition of the

|portrait| and

% |landscape| options.

% \item \DescribeMacro{\draftcopyPageX} and

% \item \DescribeMacro{\draftcopyPageY} are integer values specifying the

% coorinates starting the \emph{DRAFT} string on the page

(default 0).

% \item \DescribeMacro{\draftcopyBottomX} and

% \item \DescribeMacro{\draftcopyBottomY} are integer values specifying

% the coorinates starting the \emph{DRAFT} string on the bootom line

% (default 0).

% \item \DescribeMacro{\draftcopyVersion} The argument is printed together

% with the timestamp.

% \end{itemize}

%

% \section{A Few Warnings}

% %%%%%%%%%%%%%%%%%%%%%%%%

%

% The result of printing \emph{DRAFT} onto the page will be visible only in

% the Postscript output, not in the DVI output. The other text will be

% visible always. Sometimes

% \emph{ghostview} has problems in presenting the correct result, use

% \emph{ghostscript (gs)} instead. The printed result should always meet

% your intension.

%

% Currently this package works only for Postscript and not for PDF, sorry.

%

% \section{Copyright}

% %%%%%%%%%%%%%%%%%%%

%

% Copyright (C) 1995 Dr.\ Juergen Vollmer, Karlsruhe,

% Germany\\

% \texttt{Juergen.Vollmer@acm.org}

%

% This program can be redistributed and/or modified under the terms

% of the LaTeX Project Public License Distributed from CTAN

% archives in directory macros/latex/base/lppl.txt; either

% version 1 of the License, or any later version.

%

% If you find this software useful, please send me a postcard.

%

% \section{The Documentation Driver File}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%

% The next bit of code contains the documentation driver file for

% \TeX{}, i.e., the file that will produce the documentation you are

% currently reading. It will be extracted from this file by the

% \texttt{docstrip} program.

% \begin{macrocode}

%<*driver>

\documentclass[english,a4paper]{article}

\usepackage{doc}

\usepackage[latin1]{inputenc}

\usepackage{babel}

\usepackage[light,first,bottomafter]{draftcopy}

\RecordChanges

\EnableCrossrefs

\CodelineIndex

\begin{document}

\DocInput{draftcopy.doc}

\PrintChanges

\setcounter{IndexColumns}{2}

\PrintIndex

\end{document}

%</driver>

% \end{macrocode}

%

%

% \section{Configuration}

% %%%%%%%%%%%%%%%%%%%%%%%

%

% You should set up the default Postscript driver in the file

|draftcopy.cfg|.

% For a reasonable value have a look to the file |graphics.cfg| from the

% |graphics|

% package. The distributed default is |dvips|.

% \begin{macrocode}

%<*config>

\ifx\OpMode\undefined

\ExecuteOptions{dvips}

\else

\ExecuteOptions{vtex}

\fi

%</config>

% \end{macrocode}

%

% \section{The Implementation}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%

%

% The implementation is based on manipulating the Postscript output,

% using the \texttt{special} command.

%

% What do we need, and who we are:

% \begin{macrocode}

%<*package>

\NeedsTeXFormat{LaTeX2e}

\ProvidesPackage{draftcopy}[2002/02/25 v2.16]

% \end{macrocode}

% Declaration of the conditional handling options (based on an idea of

% Warren Smith \texttt{<wds@research.nj.nec.com>}).

% \begin{macrocode}

\newif\ifdraftcopy@conditional

\newif\ifdraftcopy@draft

\newif\ifdraftcopy@final

\DeclareOption{conditional}{

\draftcopy@conditionaltrue

}

\DeclareOption{draft}{

\draftcopy@drafttrue

}

\DeclareOption{final}{

\draftcopy@finaltrue

}

% \end{macrocode}

% Declaration of the the timestamp option.

% \begin{macrocode*}

% Compute the timestamp based on an idea of

% Tim Piessens \texttt{<Tim.Piessens@esat.kuleuven.ac.be>}.

% \begin{macrocode*}

\def\draftcopy@Timestamp{}

\def\draftcopy@version{}

\newcount\draftcopy@hour \newcount\draftcopy@minute

\draftcopy@hour=\time

\divide \draftcopy@hour by 60

\draftcopy@minute=\time

\count@=\draftcopy@hour

\multiply \count@ by -60

\advance \draftcopy@minute by \count@

\newcommand{\draftcopy@daytime}{%

\ifnum\draftcopy@hour=0 00\else\ifnum\draftcopy@hour<10 0\fi%

\number\draftcopy@hour\fi:%

\ifnum\draftcopy@minute<10 0\fi\number\draftcopy@minute%

}

\DeclareOption{timestamp}{

\def\draftcopy@Timestamp{%

\draftcopy@Show

\draftcopy@PageX \draftcopy@PageY -40 add moveto

/Times-Roman findfont 50 \draftcopy@ScaleFactor mul scalefont setfont

(\draftcopy@version \today -- \draftcopy@daytime)

}

}

% \end{macrocode*}

% Declaration of various graphic driver options.

% Different DVI driver use different names \verb+:-(+

% \begin{macrocode}

% VTEX-support: Thanks to "MicroPress Inc." <support@micropressinc.com>

\let\immediate@special=\special

\DeclareOption{vtex}{

\def\immediate@special{\immediate\special}

\immediate@special{!bophook bop-hook}

\def\draftcopy@BOPhook{/bop-hook}

\def\draftcopy@UserDictCmd{pS: userdict }

% MV & AK <mv@micropress-inc.com>

}

\DeclareOption{dvips}{

\def\draftcopy@BOPhook{/bop-hook}

\def\draftcopy@UserDictCmd{! userdict }

}

\DeclareOption{dvipsone}{

% thanks to V. P. Stokes <virgil.stokes@neuro.ki.se>

% thanks to Y&Y Help Line <support@YandY.com>

% thanks to "H. Salehfar" <hsalehfa@sage.und.nodak.edu>

\def\draftcopy@BOPhook{/bphook}

\def\draftcopy@UserDictCmd{! dvidict}

}

\DeclareOption{textures}{

% thanks to Jerome LAURENS \texttt{laurens@u-bourgogne.fr>

\def\draftcopy@BOPhook{/bop-hook}

\def\draftcopy@UserDictCmd{prepostscript userdict}

}

\DeclareOption{dviwindo}{\ExecuteOptions{dvipsone}}

% For the following |dvips| will be used. I don't know it better.

\DeclareOption{xdvi}{\ExecuteOptions{dvips}}

\DeclareOption{dvi2ps}{\ExecuteOptions{dvips}}

\DeclareOption{dvialw}{\ExecuteOptions{dvips}}

\DeclareOption{dvilaser}{\ExecuteOptions{dvips}}

\DeclareOption{dvitops}{\ExecuteOptions{dvips}}

\DeclareOption{emtex}{\ExecuteOptions{dvips}}

\DeclareOption{dviwin}{\ExecuteOptions{dvips}}

\DeclareOption{oztex}{\ExecuteOptions{dvips}}

\DeclareOption{psprint}{\ExecuteOptions{dvips}}

\DeclareOption{pubps}{\ExecuteOptions{dvips}}

\DeclareOption{pctexps}{\ExecuteOptions{dvips}}

\DeclareOption{pctexwin}{\ExecuteOptions{dvips}}

\DeclareOption{pctexhp}{\ExecuteOptions{dvips}}

\DeclareOption{ln}{\ExecuteOptions{dvips}}

% \end{macrocode}

% To printed the word \emph{DRAFT} in outlined letter or normal letters

% we use different methods of showing text:

% Normal letters are printed using the PostScript \texttt{show} command.

% Outlined letters are printed using \texttt{charpath} and

\texttt{stroke}

% (See the example in the \emph{red} PostScipt book).

% The idea for this option is from Harriet B.\ Borton

% \texttt{<bortonh@rpi.edu>}

% \begin{macrocode*}

\def\draftcopy@Show{show }

\DeclareOption{outline}{

\def\draftcopy@Show{false charpath 2 setlinewidth stroke }

}

% \end{macrocode*}

% Here we define the options for setting the intensity of the gray.

% Smaller values mean darker.

% \begin{macrocode}

\DeclareOption{light}{

\def\draftcopy@GrayValue{0.90}

}

\DeclareOption{dark}{

\def\draftcopy@GrayValue{0.85}

}

% \end{macrocode}

% Here we define the options, which specify the range of pages where

% \emph{DRAFT} will be printed across pages. We use the Postcript variable

% \texttt{draftcopy-LastPage} to store the number.

% \begin{macrocode}

\DeclareOption{none}{

\def\draftcopy@LastPage{0}

}

\DeclareOption{first}{

\def\draftcopy@LastPage{1}

}

\DeclareOption{firsttwo}{

\def\draftcopy@LastPage{2}

}

\DeclareOption{all}{

\def\draftcopy@LastPage{99999}

}

% \end{macrocode}

% The option to print \emph{DRAFT} at the bottom of all pages. The idea for the

% \texttt{bottom} options and the corresponding PostScript code is from

% Paolo Ienne \texttt{<Paolo.Ienne@di.epfl.ch>}.

% \begin{macrocode}

\newif\ifdraftcopy@bottom

\DeclareOption{bottom}{

\draftcopy@bottomtrue

}

% \end{macrocode}

% The option to print \emph{DRAFT} at the bottom of the page, after the

% initial pages containing \emph{DRAFT} printed across of a page.

% \begin{macrocode}

\newif\ifdraftcopy@bottomAfter

\DeclareOption{bottomafter}{

\draftcopy@bottomAftertrue

}

% \end{macrocode}

% Define the word \emph{DRAFT} and its scaling, in case no language option

% is given.

% The Postscript variable \texttt{draftcopy@Name} holds the word for

% \emph{DRAFT} of that language and \texttt{draftcopy@Scale} is a font

% scale factor, it must be determined

% empirically.

% \begin{macrocode}

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

% \end{macrocode}

%

% The babel language options are honored, even currently not all of them have a

% translation for the word \emph{DRAFT}.

% Most of them use latin characters, hence we use |Times-Roman|. The macro

% |draftcopy@Font| holds the font name.

% \begin{macrocode*}

\def\draftcopy@Font{/Times-Roman}

\DeclareOption{american}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{austrian}{

\def\draftcopy@Name{ENTWURF}\def\draftcopy@Scale{155}

}

\DeclareOption{bahasa}{

% thanks to Glenn G. Chappell <gchappell@semovm.semo.edu>

\def\draftcopy@Name{DRAF}\def\draftcopy@Scale{217}

}

\DeclareOption{brazil}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{brazilian}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{breton}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{british}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{catalan}{

% thanks to Dav <davpuig@mx3.redestb.es>

% thanks to Xavier <xml@mat.upc.es>

\def\draftcopy@Name{ESBORRANY}\def\draftcopy@Scale{110}

}

\DeclareOption{croatian}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{czech}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{danish}{

% thanks to Ejnar Zacho Rath <ezr@md-oss.dk>,

% thanks to Bjarne Vestergaard <bvbruder@dfi.aau.dk>

% thanks to Joergen Larsen <JL@mmf.ruc.dk>

\def\draftcopy@Name{UDKAST}\def\draftcopy@Scale{175}

}

\DeclareOption{dutch}{

% thanks to Kees Leune <C.J.Leune@kub.nl>

% \def\draftcopy@Name{CONCEPT}\def\draftcopy@Scale{150}

% thanks to Anton Stoorvogel <wscoas@as.win.tue.nl> porposed

\def\draftcopy@Name{ONTWERP}\def\draftcopy@Scale{150}

}

\DeclareOption{english}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{esperanto}{

% thanks to Stephan B. Webanck <webanck@mpiz-koeln.mpg.de>

\def\draftcopy@Name{MALNETO}\def\draftcopy@Scale{160}

}

\DeclareOption{estonian}{

% thanks to DAVID FEEST <mirka!mausgoe.central.de!

% gOe.maus.de!David_Feest@uranus.central.de>

\def\draftcopy@Name{VISAND}\def\draftcopy@Scale{215}

}

\DeclareOption{finnish}{

% thanks to Jaakko Ruohio <jjruohio@boojum.hut.fi>

\def\draftcopy@Name{LUONNOS}\def\draftcopy@Scale{200}

% thanks to Mika Grundstroem <mikagr@spittari.cs.tut.fi>

\def\draftcopy@Name{VEDOS}\def\draftcopy@Scale{220}

}

\DeclareOption{francais}{

% thanks to Christophe Couvreur <couvreur@Thor.fpms.ac.be>

\def\draftcopy@Name{BROUILLON}\def\draftcopy@Scale{120}

}

\DeclareOption{french}{

% thanks to Christophe Couvreur <couvreur@Thor.fpms.ac.be>

\def\draftcopy@Name{BROUILLON}\def\draftcopy@Scale{120}

% thanks to Marc Torzynski <marc@snoopy.u-strasbg.fr>

%\def\draftcopy@Name{EPREUVE}\def\draftcopy@Scale{120}

}

\DeclareOption{galician}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{german}{

\def\draftcopy@Name{ENTWURF}\def\draftcopy@Scale{155}

}

\DeclareOption{germanb}{

\def\draftcopy@Name{ENTWURF}\def\draftcopy@Scale{155}

}

\DeclareOption{greek}{

% thanks to Apostolos Syropoulos <apostolo@ocean1.ee.duth.gr>

\def\draftcopy@Name{PROSCEDIO}\def\draftcopy@Scale{85}

\def\draftcopy@Font{/Symbol}

}

\DeclareOption{hungarian}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{icelandic}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

% DRЦG

% Erlendur S Thorsteinsson <esth@cmu.edu>

% does anybody knows how to create PostScript for that letter Ц?

}

\DeclareOption{irish}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

% DRЙACHT

% Breanndбn У Nuallбin <bon@kotona.demon.nl>

% does anybody knows how to create PostScript for that letter Й?

}

\DeclareOption{italian}{

% thanks to Fabio Massacci <Fabio.Massacci@cl.cam.ac.uk>

% thanks to Paolo Dell'Aquila <dlle07k1@mo.nettuno.it>

\def\draftcopy@Name{BOZZA}\def\draftcopy@Scale{215}

% thanks to Giuseppe De Arcangelis <gdearc@serifos.caspur.it>

% \def\draftcopy@Name{brutta copia}\def\draftcopy@Scale{80}

}

\DeclareOption{lowersorbian}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{magyar}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{norsk}{

% thanks to: Dag Langmyhr <dag@ifi.uio.no>

\def\draftcopy@Name{UTKAST}\def\draftcopy@Scale{178}

}

\DeclareOption{nynorsk}{

% thanks to: Dag Langmyhr <dag@ifi.uio.no>

\def\draftcopy@Name{FRAMLEGG}\def\draftcopy@Scale{129}

}

\DeclareOption{polish}{

% thanks to Piotr Chrusciel <piotr@gargan.math.univ-tours.fr>

\def\draftcopy@Name{BRUDNOPIS}\def\draftcopy@Scale{120}

}

\DeclareOption{portuges}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{portuguese}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{romanian}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{scottish}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{spanish}{

% thanks to: Tomas Bautista <bautista@cma.ulpgc.es>

\def\draftcopy@Name{BORRADOR}\def\draftcopy@Scale{120}

}

\DeclareOption{slovak}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{slovene}{

% thanks to brodnik@pegam.mat.uni-lj.si <Andrej Brodnik>

\def\draftcopy@Name{OSNUTEK}\def\draftcopy@Scale{120}

}

\DeclareOption{swedish}{

% thanks to <matsd@physchem.kth.se>

\def\draftcopy@Name{UTKAST}\def\draftcopy@Scale{185}

}

\DeclareOption{turkish}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

\DeclareOption{uppersorbian}{

\def\draftcopy@Name{DRAFT}\def\draftcopy@Scale{215}

}

% \end{macrocode*}

% Declare the page orientation options.

% \begin{macrocode}

\DeclareOption{portrait}{

% thanks to Ross MOORE \texttt{ross@maths.mq.edu.au>}

\def\draftcopy@PageTranslate{200 70 translate 65 rotate}

\def\draftcopy@BottomTranslate{0 25 translate}

\def\draftcopy@ScaleFactor{1 }

}

\DeclareOption{landscape}{

% thanks to Ross MOORE \texttt{ross@maths.mq.edu.au>}

\def\draftcopy@PageTranslate{70 450 translate 25 neg rotate}

\def\draftcopy@BottomTranslate{25 650 translate 90 neg rotate}

\def\draftcopy@ScaleFactor{0.6 }

}

% \end{macrocode}

% Use these default options,

% \begin{macrocode}

\ExecuteOptions{dark,all,english,portrait}

% \end{macrocode}

%

% instead of |dvips| use the graphics driver specified in the configuration file,

% \begin{macrocode}

\input{draftcopy.cfg}

% \end{macrocode}

%

% and the process the user options.

% \begin{macrocode}

\ProcessOptions

% \end{macrocode}

%

% Tell the user what's ongoing.

% \begin{macrocode}

\typeout{Prints \draftcopy@Name\space on pages; does not show in your DVI viewer}

% \end{macrocode}

%

%\begin{macro}{\draftcopyVersion}

% Set the Version text to be printed together with a timestamp

% \begin{macrocode}

\newcommand{\draftcopyVersion}[1]{

\def\draftcopy@version{#1}

}

% \end{macrocode}

%\end{macro}

%\begin{macro}{\draftcopySetGrey}

% Set the intensity of the gray, values range from $0.0$

% to $1.0$, where the smaller values darker.

% If used, it must be conatined in the preamble of the document.

% \begin{macrocode}

\newcommand{\draftcopySetGrey}[1]{

\def\draftcopy@GrayValue{#1}

}

% \end{macrocode}

%\end{macro}

%\begin{macro}{\draftcopySetScale}

% Set the size (scale) of the word \emph{DRAFT}.

% You may need this, if you use another paper format.

% The default scales are for A4 paper.

% If used, it must be conatined in the preamble of the document.

% \begin{macrocode}

\newcommand{\draftcopySetScale}[1]{

\def\draftcopy@Scale{#1}

}

% \end{macrocode}

%\end{macro}

%\begin{macro}{\draftcopySetScaleFactor}

% Set the scale muliplier of the scale.

% \begin{macrocode*}

\newcommand{\draftcopySetScaleFactor}[1]{

\def\draftcopy@ScaleFactor{#1 }

}

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\draftcopyFirstPage}

% The argument specifies the first page onto which

% \emph{DRAFT} will be printed. This is the physical page number.

% If used, it must be conatined in the preamble of the document.

% \begin{macrocode}

\def\draftcopy@FirstPage{0}

\newcommand{\draftcopyFirstPage}[1]{

\def\draftcopy@FirstPage{#1}

}

% \end{macrocode}

%\end{macro}

%\begin{macro}{\draftcopyLastPage}

% The argument specifies the last page onto which

% \emph{DRAFT} will be printed. This is the physical page number.

% If used, it must be conatined in the preamble of the document.

% \begin{macrocode}

\newcommand{\draftcopyLastPage}[1]{

\def\draftcopy@LastPage{#1}

}

% \end{macrocode}

%\end{macro}

%\begin{macro}{\draftcopyName}

% The first argument specifies the word to be printed instead

% of \emph{DRAFT}, the second, gives the scale factor for the font to

% be used. E.g. the english word \emph{DRAFT} needs 215, the german

% \emph{ENTWURF} needs 155.

% Note we need the blank after the \#2.

% If used, it must be conatined in the preamble of the document.

% \begin{macrocode*}

\newcommand{\draftcopyName}[2]{

\def\draftcopy@Name{#1}

\def\draftcopy@Scale{#2}

}

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\@draftcopyTilde}

% If a \~ is used as argument of |\draftcopyName|, we have to supress

% expansion of it. We replace it by a simple space.

% Here we store the original meaning of \~, so that it can be restored

% after setting up the Postscript code.

% \begin{macrocode*}

\let\@draftcopyTilde~

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\draftcopyPageTransform}

% These next 2 commands take raw PostScript

% to set the LL-corner of the \emph{DRAFT} string

% \begin{macrocode*}

\newcommand{\draftcopyPageTransform}[1]{%

\def\draftcopy@PageTranslate{#1}%

}

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\draftcopyBottomTransform}

% \begin{macrocode*}

\newcommand{\draftcopyBottomTransform}[1]{%

\def\draftcopy@BottomTranslate{#1}%

}

% \end{macrocode*}

%\end{macro}

% Based on an idea or Sergio Polini \texttt{<s.polini@mclink.it>}:

%\begin{macro}{\draftcopyPageX}

% \begin{macrocode*}

\def\draftcopy@PageX{0 }

\newcommand{\draftcopyPageX}[1]{%

\def\draftcopy@PageX{#1 }%

}

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\draftcopyPageY}

% \begin{macrocode*}

\def\draftcopy@PageY{0 }

\newcommand{\draftcopyPageY}[1]{%

\def\draftcopy@PageY{#1 }%

}

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\draftcopyBottomX}

% \begin{macrocode*}

\def\draftcopy@BottomX{0 }

\newcommand{\draftcopyBottomX}[1]{%

\def\draftcopy@BottomX{#1 }%

}

% \end{macrocode*}

%\end{macro}

%\begin{macro}{\draftcopyBottomY}

% \begin{macrocode*}

\def\draftcopy@BottomY{0 }

\newcommand{\draftcopyBottomY}[1]{%

\def\draftcopy@BottomY{#1 }%

}

% \end{macrocode*}

%\end{macro}

% Compute, wether we should show the \texttt{DRAFT} text:

% \begin{macrocode*}

\newif\ifdraftcopy@showit

\ifdraftcopy@conditional

\ifdraftcopy@draft

\draftcopy@showittrue

\else

\draftcopy@showitfalse

\fi

\ifdraftcopy@final

\draftcopy@showitfalse

\fi

\else

\draftcopy@showittrue

\fi

% \end{macrocode*}

% Here we introduce some Postscript code.

% The dictionary \emph{userdict} is extended with the page counter

% \texttt{draftcopy-CurrentPage}. Printing of \emph{DRAFT}

% starts after page |\draftcopy@FirstPage|.

% Each time a new page starts |\draftcopy@BOPhook| is called

% (if it's defined). Hence we define it. First we increment the current

% page counter.

% If then the current page counter is smaller than the

% last page counter |\draftcopy@LastPage| we print the word

% contained in the \LaTeX macro \texttt{draftcopy@Name}

% with the font scaled with \LaTeX macro \texttt{draftcopy@Scale}.

%

% This must be done at the beginning of the document |\AtBeginDocument|,

% so that the preamble commands take effect.

%

% We redfefine and restore the meaning of \~, which may be used in the

% |\draftcopy@Name|, using |\let|. This allows to use |\today| as

% |\draftcopy@Name| for languages like e.g.~ german, which separates the

% day and the month by \~.

%

% The size of the word \emph{DRAFT} is given by |\draftcopy@Scale| and

% multiplied by |\draftcopy@ScaleFactor|, which is needed to different

% page hights of cover landscape and portrait orientation.

%

% Thanks to Glenn G. Chappell \texttt{gchappell@semovm.semo.edu} for

% providing the

% |/draftcopy-old-BOPhook| suggestion, which saves a previous definition of

% |\draftcopy@BOPhook| and executes it too.

%

% \begin{macrocode}

% Thanks to Ross Moore \texttt{ross@ics.mq.edu.au} for adding the code to

% preserve kine-end in the PostScript file.

% \begin{macrocode}

\ifdraftcopy@showit

{\obeyspaces

\ifdraftcopy@bottomAfter

\AtBeginDocument{

\let~\space

\immediate@special{\draftcopy@UserDictCmd

begin

/draftcopy-CurrentPage 0 def

/draftcopy-old-BOPhook { } def

currentdict \draftcopy@BOPhook\space known{

/draftcopy-old-BOPhook \draftcopy@BOPhook\space load def

} if

\draftcopy@BOPhook{

draftcopy-old-BOPhook

/draftcopy-CurrentPage draftcopy-CurrentPage 1 add def

draftcopy-CurrentPage \draftcopy@FirstPage ge

draftcopy-CurrentPage \draftcopy@LastPage le

and

{ gsave \draftcopy@PageTranslate

\draftcopy@Font findfont

\draftcopy@Scale \draftcopy@ScaleFactor mul scalefont setfont

\draftcopy@PageX \draftcopy@PageY moveto

\draftcopy@GrayValue setgray

(\draftcopy@Name) \draftcopy@Timestamp \draftcopy@Show

grestore

} if

draftcopy-CurrentPage \draftcopy@LastPage gt

{ gsave \draftcopy@BottomTranslate

\draftcopy@Font findfont

25 scalefont setfont

\draftcopy@BottomX \draftcopy@BottomY moveto

\draftcopy@GrayValue setgray

(\draftcopy@Name\space\space--\space\space)

0 1 15 { pop dup show } for

grestore

} if

} def

end

}

\let~\@draftcopyTilde

}

\else\ifdraftcopy@bottom

\AtBeginDocument{

\let~\space

\immediate@special{\draftcopy@UserDictCmd

begin

/draftcopy-CurrentPage 0 def

/draftcopy-old-BOPhook { } def

currentdict \draftcopy@BOPhook\space known{

/draftcopy-old-BOPhook \draftcopy@BOPhook\space load def

} if

\draftcopy@BOPhook{

draftcopy-old-BOPhook

/draftcopy-CurrentPage draftcopy-CurrentPage 1 add def

draftcopy-CurrentPage \draftcopy@FirstPage ge

draftcopy-CurrentPage \draftcopy@LastPage le

and

{ gsave \draftcopy@PageTranslate

\draftcopy@Font findfont

\draftcopy@Scale \draftcopy@ScaleFactor mul scalefont setfont

\draftcopy@PageX \draftcopy@PageY moveto

\draftcopy@GrayValue setgray

(\draftcopy@Name) \draftcopy@Timestamp \draftcopy@Show

grestore

}if

gsave \draftcopy@BottomTranslate

\draftcopy@Font findfont

25 scalefont setfont

\draftcopy@BottomX \draftcopy@BottomY moveto

\draftcopy@GrayValue setgray

(\draftcopy@Name\space\space--\space\space)

0 1 15 { pop dup show } for

grestore

} def

end

}

\let~\@draftcopyTilde

}

\else

\AtBeginDocument{

\let~\space

\immediate@special{\draftcopy@UserDictCmd

begin

/draftcopy-CurrentPage 0 def

/draftcopy-old-BOPhook { } def

currentdict \draftcopy@BOPhook\space known{

/draftcopy-old-BOPhook \draftcopy@BOPhook\space load def

} if

\draftcopy@BOPhook{

draftcopy-old-BOPhook

/draftcopy-CurrentPage draftcopy-CurrentPage 1 add def

draftcopy-CurrentPage \draftcopy@FirstPage ge

draftcopy-CurrentPage \draftcopy@LastPage le

and

{ gsave \draftcopy@PageTranslate

\draftcopy@Font findfont

\draftcopy@Scale \draftcopy@ScaleFactor mul scalefont setfont

\draftcopy@PageX \draftcopy@PageY moveto

\draftcopy@GrayValue setgray

(\draftcopy@Name) \draftcopy@Timestamp \draftcopy@Show

grestore

} if

} def

end

}

\let~\@draftcopyTilde

}

\fi\fi

}

\fi

%</package>

% \end{macrocode}

%

% \section{Some Test Input Files}

% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%

% The next bit of code contains the some \LaTeX\ input files with various options set.

% They will be extracted from this file by the \texttt{docstrip} program, using

% the \texttt{test1, ... test12} option.

% \begin{macrocode}

%<*test1>

\documentclass[a4paper]{article}

\usepackage{draftcopy}

\newcommand{\xx}{

Test 1\\This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print DRAFT over all pages, quite dark.\\

\verb|\usepackage{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test1>

% \end{macrocode}

% \begin{macrocode}

%<*test2>

\documentclass[a4paper,german]{article}

\usepackage[light,first]{draftcopy}

\newcommand{\xx}{

Test2: Should print ENTWURF on the first page, light.\\

This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

\verb|\usepackage[light,first]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test2>

% \end{macrocode}

%

% \begin{macrocode}

%<*test3>

\documentclass[a4paper,french]{article}

\usepackage[light,firsttwo]{draftcopy}

\newcommand{\xx}{

Test3: This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print BROUILLON on the first two pages, light.\\

\verb|\usepackage[light,firsttwo]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test3>

% \end{macrocode}

%

% \begin{macrocode}

%<*test4>

\documentclass[a4paper,danish]{article}

\usepackage[light,firsttwo]{draftcopy}

\newcommand{\xx}{

Test4: This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\draftcopyFirstPage{2}

\draftcopyLastPage{3}

\begin{document}

Should print UDKAST on the second and third pages, light.\\

\verb|\usepackage[light,firsttwo]{draftcopy}|\\

\verb|\draftcopyFirstPage{2}|\\

\verb|\draftcopyLastPage{3}|\\

\xx\xx\xx\xx

\end{document}

%</test4>

% \end{macrocode}

%

% \begin{macrocode}

%<*test5>

\documentclass[a4paper,dutch]{article}

\usepackage[none,bottom]{draftcopy}

\newcommand{\xx}{

Test5: This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print ONTWERP only at the bottom each page.\\

\verb|\usepackage[none,bottom]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test5>

% \end{macrocode}

%

% \begin{macrocode}

%<*test6>

\documentclass[a4paper,finnish]{article}

\usepackage[firsttwo,light,bottom]{draftcopy}

\newcommand{\xx}{ test6: This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print VEDOS on the first two pages, light.\\

Should print VEDOS at the bottom each page.\\

\verb|\usepackage[firsttwo,light,bottom]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test6>

% \end{macrocode}

%

% \begin{macrocode}

%<*test7>

\documentclass[a4paper,norsk]{article}

\usepackage[light,bottomafter]{draftcopy}

\newcommand{\xx}{

Test7: This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\draftcopyFirstPage{2}

\draftcopyLastPage{3}

\begin{document}

Should print UTKAST on the on the pages 2 and 3, light.\\

Should print UTKAST on bottom of the page after the third page.\\

\verb|\usepackage[light,bottomafter]{draftcopy}|\\

\verb|\draftcopyFirstPage{2}|\\

\verb|\draftcopyLastPage{3}|\\

\xx\xx\xx\xx

\end{document}

%</test7>

% \end{macrocode}

%

%

% \begin{macrocode}

%<*test8>

\documentclass[a4paper,nynorsk]{article}

\usepackage[light,firsttwo,outline,bottomafter]{draftcopy}

\newcommand{\xx}{

Test8: This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print FRAMLEGG on the first two pages, light, outlined.\\

Should print FRAMLEGG on bottom of the page after the second page.\\

\verb|\usepackage[light,firsttwo,outline,bottomafter]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test8>

% \end{macrocode}

%

%

% \begin{macrocode}

%<*test9>

\documentclass{article}

\usepackage[light,firsttwo,outline,bottomafter]{draftcopy}

\newcommand{\xx}{

Test9: This is a test page \thepage\\ test~the~tilde~tilde~tilde (1 fixed space (\~{}) between the words)\\ test~~the~~tilde~~tilde~~tilde (2 fixed spaces (\~{}) between the words)\\ test~~~the~~~tilde~~~tilde~~~tilde (3 fixed spaces (\~{}) between the words)

\vfill

This is a testpage \thepage \newpage

}

\draftcopyName{Release\space\space\space\today}{130}

\draftcopySetScale{80}

\begin{document}

Should print the word \verb+Release+ and the current date \verb|\today|

(in english) on the first two pages, light, outlined.\\

Should print the word \verb+Release+ and current date \verb|\today|

(in english) on bottom of the page after the second page.\\

Check that the lines with \~{} have correct spacing.\\

\verb|\usepackage[light,firsttwo,outline,bottomafter]{draftcopy}|\\ and \\

\verb|\draftcopyName{Release\space\space\space\today}{130}|\\

\verb|\draftcopySetScale{80}|\\ in the preamble

\xx\xx\xx\xx

\end{document}

%</test9>

% \end{macrocode}

%

% \begin{macrocode}

%<*test10>

\documentclass[german]{article}

\usepackage{babel}

\usepackage[light,firsttwo,outline,bottomafter]{draftcopy}

\newcommand{\xx}{

Test10: This is a test page \thepage \\ test~the~tilde~tilde~tilde (1 fixed space (\~{}) between the words)\\ test~~the~~tilde~~tilde~~tilde (2 fixed spaces (\~{}) between the words)\\ test~~~the~~~tilde~~~tilde~~~tilde (3 fixed spaces (\~{}) between the words)

\vfill

This is a testpage \thepage \newpage

}

\draftcopyName{\today}{130}

\draftcopySetScale{80}

\begin{document}

Should print the current date \verb|\today| (in german) on the first two pages, light, outlined.\\

Should print the current date \verb|\today| (in german) on bottom of the page after the second page.\\

Check that the lines with \~{}) have correct spacing.\\

\verb|\usepackage[light,firsttwo,outline,bottomafter]{draftcopy}|\\ and \\

\verb|\draftcopyName{\today}{130}|\\

\verb|\draftcopySetScale{80}|\\

in the preamble

\xx\xx\xx\xx

\end{document}

%</test10>

% \end{macrocode}

%

% \begin{macrocode}

%<*test11>

\documentclass[landscape,a4paper]{article}

\usepackage[landscape]{draftcopy}

\newcommand{\xx}{

Test 11\\This is a test page with landscape option \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print DRAFT over all pages, quite dark.\\

\verb|\usepackage[landscape]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test11>

% \end{macrocode}

%

% \begin{macrocode}

%<*test12>

\documentclass[landscape,german,a4paper]{article}

\usepackage[landscape,bottom]{draftcopy}

\newcommand{\xx}{

Test 12\\This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print ENTWURF over all pages, quite dark and on the bottom and with landscape orientation.\\

\verb|\usepackage[landscape,bottom]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test12>

% \end{macrocode}

%

%

% \begin{macrocode}

%<*test13>

\documentclass[a4paper]{article}

\usepackage[conditional]{draftcopy}

\newcommand{\xx}{

Test 13\\This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should \emph{NOT} print DRAFT since, conditional is used.\\

\verb|\usepackage[conditional]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test13>

% \end{macrocode}

%

%

% \begin{macrocode}

%<*test14>

\documentclass[draft,a4paper]{article}

\usepackage[conditional]{draftcopy}

\newcommand{\xx}{

Test 14\\This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should print DRAFT since, conditional and draft are used.\\

\verb|\usepackage[conditional]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test14>

% \end{macrocode}

%

%

% \begin{macrocode}

%<*test15>

\documentclass[final,a4paper]{article}

\usepackage[conditional]{draftcopy}

\newcommand{\xx}{

Test 15\\This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\begin{document}

Should \emph{NOT} print DRAFT since, final is used (as global option).\\

\verb|\usepackage{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test15>

% \end{macrocode}

%

%

% \begin{macrocode}

%<*test16>

\documentclass[a4paper,greek]{article}

\usepackage[timestamp,bottom]{draftcopy}

\newcommand{\xx}{

Test 16\\This is a test page \thepage \vfill

This is a testpage \thepage \newpage

}

\draftcopyPageX{300}

\draftcopyPageY{100}

\draftcopyBottomX{300}

\draftcopyBottomY{100}

\draftcopySetScaleFactor{0.5}

\draftcopyVersion{Version 2.14: }

\begin{document}

Should print DRAFT (in greek translation and greek letters) on a moved position.\\

\verb|\usepackage[timestamp,bottom,greek]{draftcopy}|\\

\xx\xx\xx\xx

\end{document}

%</test16>

% \end{macrocode}

%

% \Finale

\endinput

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%

Download