summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/draftcopy/draftcopy.doc
blob: 3da283d5f297331049ef2c226bf1d879738c5ca8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
\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,\DisableCrossrefs}
% \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 bug-reports
% 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@micropress-inc.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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%