summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/calendar/autofilo.dtx
blob: 34151b19e02ea1d4e80192f2966a9c8acc596612 (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
%\iffalse
%
% file: autofilo.dtx
% Copyright (C) 1997 by Frank Bennett.  All rights reserved.
%
% IMPORTANT NOTICE:
% 
% You are not allowed to change this file.  You may however copy
% this file to a file with a different name and then change the
% copy if (a) you do not charge for the modified code, (b) you
% acknowledge the author of this file in the new file, if it
% is distributed to others, and (c) you attach these same
% conditions to the new file.
% 
% You are not allowed to distribute this file alone.  You are not
% allowed to take money for the distribution or use of this file
% (or a changed version) except for a nominal charge for copying
% etc.
% 
% You are allowed to distribute this file under the condition that
% it is distributed with all of its contents, intact.
% 
% For error reports, or offers to help make this a more powerful,
% friendlier, and altogether more thrilling package, please contact me on
% fb@soas.ac.uk.  Better yet, make a contribution to
% my pension.  Account details available on request.
%
%\fi
%
% \def\fileversion{3.1.1.1}
% \def\filedate{1998/01/17 18:13:42}
%
% \iffalse
%
%<*driver>
\documentclass{ltxdoc}
%\CodelineIndex
%\EnableCrossrefs
\begin{document}
\OnlyDescription    % Comment out for implementation details
\DocInput{autofilo.dtx}
\end{document}
%</driver>
%\fi
%
%\iffalse
% Source tree moved under RCS
% ---------------------------
% autofilo.dtx,v
% Revision 3.1.1.1  1998/01/17 18:13:42  root
% Release code, checksum verified
%
% Revision 3.1  1998/01/17 16:56:58  root
% Release code
%
% Revision 2.8  1998/01/16 11:52:55  root
% *** empty log message ***
%
% Revision 2.7  1998/01/15 10:45:24  root
% Filofax page now comes out centered on the physical page.
% Just fold the thing in half and cut.
%
% Revision 2.6  1997/12/05 17:01:48  root
% Added zero width vrule to force left-hand cut rule to right
% position even when jawline has no width.
%
% Revision 2.5  1997/12/05 13:47:40  root
% Fixed quandary of overlapping revisions.
%
% Revision 2.4  1997/12/05 12:14:08  root
% Fixed missing brace in af@circle, and added RequirePackage
% for keyval parser.
% Revision 2.2.1.5  1997/11/26 11:07:51  bennett
% Final change to documentation.
%
% Revision 2.2.1.4  1997/11/07 16:27:06  root
% Fixed checksum, added some documentation for the jawmarks
% code.
%
% Revision 2.2.1.3  1997/11/07 16:15:14  root
% Final fixes to jawmark code, maybe.
%
% Revision 2.2.1.2  1997/11/07 16:10:59  root
% Patched up code for jaw marks.
%
% Revision 2.2.1.1  1997/11/07 14:57:37  root
% Trial code for jaw marks.
%
% Revision 2.4  1997/12/05 12:14:08  root
% Fixed missing brace in af@circle, and added RequirePackage
% for keyval parser.
%
% Revision 2.3  1997/11/07 14:52:50  root
% Added trial code for jaw marks.
%
% Revision 2.2  1997/11/07 10:44:05  root
% Release code.
%
% Revision 2.1.1.1  1997/11/04 05:06:07  root
% Development branch
%
% Revision 2.1  1997/11/01 15:17:06  bennett
% Release code.
%
% Revision 1.2  1997/10/29 20:03:07  bennett
% *** empty log message ***
%
% Revision 1.1  1997/10/29 08:17:52  root
% Initial revision
%
%\fi
%
% \title{User's Guide to the \texttt{autofilo} 
%    package\thanks{This file is version number
%    \fileversion{}.  It was last revised on
%    \filedate{}.}}
%
% \author{Frank G. Bennett, Jr.}
%
% \maketitle
%
% \setcounter{StandardModuleDepth}{1}
% \DeleteShortVerb{\|}
% \MakeShortVerb{\"}
%
% \begin{abstract}
% \noindent This package provides an environment
% within which pages are framed with cut lines and
% printed with punch-marks, so that printed text can
% easily be inserted into a filofax or binder.
% \end{abstract}
%
% \CheckSum{692}
%
% \section{About the Style}
%
% This style provides a rough solution to the design
% problem it addresses, but it does work.  Pages are
% always printed in landscape, rotated using the "lscape"
% package from the "graphics" bundle, and centered on the
% physical paper.\footnote{As a technical note, the frame itself
% is not rotated, because it is inserted independently of
% the output boxes controlled by the \LaTeX{} output routine.
% The output modes (two-column,
% and a hacked-together four-column mode) have
% been modified to understand blocks of text as \cs{hbox}es
% to be laid atop one another, rather than as \cs{vbox}es
% to be set alongside one another.}  It accepts two options,
% "twocolumn" (the default) and "fourcolumn".
%
% The style provides an environment called "autofilo".
% Most often, users of this package will be style
% authors who want to incorporate it into other
% environments that do more specific things.  Because
% "autofilo" accepts several "keyval"-style parameters,
% style authors may have a use for documentation for those
% optional parameters.  So here is some sample documentation:
%
% \begin{description}
% \item[\texttt{punchcluster}] Most filofaxes have two or
%   or more clusters or groups of punches to hold the
%   pages in place.  This option sets the number of punches
%   in each cluster.  The default is three.
% \item[\texttt{intraspace}]  This governs the space
%   between punchouts within a group.  The default is
%   19.25mm.
% \item[\texttt{punchgroups}] This option sets the number
%   of groups of punches.  The default is two groups.
% \item[\texttt{interspace}]  This option sets the
%   distance between the groups of punches.  The default
%   is 51.25mm.
% \item[\texttt{pageheight}]  This fixes the height
%   of a filofax page (not the physical paper on
%   which it is printed).  The default is 172mm.
% \item[\texttt{pagewidth}]  This fixes the width of an individual
%   page.  The physical printed area will be twice this figure.
%   The default is 95mm, for a 190mm printed area. 
% \item[\texttt{grip}]  This adjusts the distance from the
%   edge of the page to the outer edge of the punchouts.
%   Defaults to 5mm.
% \item[\texttt{punchmargin}]  This adjusts the distance from the
%   edge of the text to the inner edge of the punchouts.
%   Defaults to 2mm.
% \item[\texttt{punchsize}]  Size, in points, of punchouts.
%   Defaults to 15.
% \item[\texttt{topspace}]  Gap between top of filofax page
%   and top of text page.
% \item[\texttt{bottomspace}]  Gap between bottom of filofax page
%   and bottom of text page.
% \item[\texttt{jawspread}] If set to a positive length, this places a set
%   of rules the width of the punchmarks on either side of each
%   punchhole, centered on its center and spread the distance specified.
%   This can be useful as a guide with some one-hole punches that are
%   designed to be used ``blind''.
% \item[\texttt{jawline}] Sets the width of the lines used to make
%   jawmarks.  The default value is \texttt{0.4pt}.
% \end{description}
%
% \StopEventually{\PrintIndex}
%
% \section{The Class File}
%
%    \begin{macrocode}
%<*style>
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{autofilo}
          [1997/12/05 12:14:08 2.4 Filofax page outlines (Frank Bennett)]
%    \end{macrocode}
% We need a boolean to process our sole option.
%    \begin{macrocode}
\newif\if@usequadruplecolumn
%    \end{macrocode}
% We provide four columns as an option.  Two columns (one for
% each side of what will be the filofax page) will be the
% default.
%    \begin{macrocode}
\DeclareOption{fourcolumn}{\@usequadruplecolumntrue}
%    \end{macrocode}
% Process the option if present, and load a supporting package.
%    \begin{macrocode}
\ProcessOptions
\RequirePackage{lscape}
\RequirePackage{keyval}
%    \end{macrocode}
% Declare some variables.
%    \begin{macrocode}
\newif\if@quadruplecolumn
\newbox\@leftleftcolumn
\newbox\@leftrightcolumn
\newbox\@rightleftcolumn
\newbox\@rightrightcolumn
\newcount\af@punchcluster
\newcount\af@punchgroups
\newlength\af@interspace
\newlength\af@intraspace
\newlength\af@grip
\newlength\af@punchmargin
\newcount\af@punchsize
\newlength\af@punchwidth
\newlength\af@halfpunchwidth
\newcount\af@subtempcount
\newcount\af@tempcount
\newlength\af@textwidth
\newlength\af@marginrel
\newlength\af@halftextwidth
\newlength\af@textheight
\newlength\af@topmargin
\newlength\af@bottommargin
\newcount\col@no
\newlength\af@jawspread
\newlength\af@halfjawspread
\newlength\af@jawline
%    \end{macrocode}
% We'll need a macro to turn on the four-column mode.
% This is just a modified version of \cs{twocolumn} in
% the \LaTeX{} distribution.
%    \begin{macrocode}
\def\quadruplecolumn{%
  \clearpage
  \global\columnwidth\textwidth
  \global\advance\columnwidth-3\columnsep
  \global\divide\columnwidth by4\relax
  \global\hsize\columnwidth
  \global\linewidth\columnwidth
  \global\@twocolumntrue
  \global\@quadruplecolumntrue
  \global\@firstcolumntrue
  \col@number=4\relax}
%    \end{macrocode}
% Catch the output routine when the new mode is in effect.
%    \begin{macrocode}
\def \@opcol {%
  \if@twocolumn
    \if@quadruplecolumn
      \@outputqdrplcol
    \else
      \@outputdblcol
    \fi
  \else
    \@outputpage
  \fi
  \global \@mparbottom \z@ \global \@textfloatsheight \z@
  \@floatplacement}
%    \end{macrocode}
% Add a new output routine for the new mode, and a modified
% version of the two-column output routine.  Note that these
% work \textit{only} inside the \texttt{landscape} environment.
%    \begin{macrocode}
\def\@outputqdrplcol{%
  \ifcase\col@no
    \global\@firstcolumnfalse
    \global \setbox\@leftleftcolumn \box\@outputbox
  \or
    \global \setbox\@leftrightcolumn \box\@outputbox
  \or
    \global \setbox\@rightleftcolumn \box\@outputbox
  \or
    \global \@firstcolumntrue
    \global\setbox\@rightrightcolumn\box\@outputbox
    \setbox\@outputbox \vbox to\textwidth{%
                           \hb@xt@\textheight {%
         \vrule height\columnwidth depth0pt width0pt
                          \box\@rightrightcolumn \hss}%
                           \vfill
                           \hrule \@width\columnseprule
                           \vfill
                         \hb@xt@\textheight {%
         \vrule height\columnwidth depth0pt width0pt
                             \box\@rightleftcolumn \hss}%
                           \vfill
                           \hrule \@width\columnseprule
                           \vfill
                         \hb@xt@\textheight {%
         \vrule height\columnwidth depth0pt width0pt
                             \box\@leftrightcolumn \hss}%
                           \vfill
                           \hrule \@width\columnseprule
                           \vfill
                         \hb@xt@\textheight {%
                             \box\@leftleftcolumn \hss}%
                              }%
    \@combinedblfloats
    \@outputpage
    \begingroup
      \@dblfloatplacement
      \@startdblcolumn
      \@whilesw\if@fcolmade \fi
        {\@outputpage
         \@startdblcolumn}%
    \endgroup
  \fi
  \global\advance\col@no by1\relax
  \ifnum\col@no=4\relax\global\col@no=0\fi}
\def\@outputdblcol{%
  \if@firstcolumn
    \global \@firstcolumnfalse
    \global \setbox\@leftcolumn \box\@outputbox
  \else
    \global \@firstcolumntrue
    \setbox\@outputbox \vbox to\textwidth{%
                         \hbox to\textheight{%
                             \box\@outputbox}%
                           \vfil
                           \hrule \@width\columnseprule
                           \vfil
                           \hbox to\textheight{%
                             \box\@leftcolumn}}%
    \@combinedblfloats
    \@outputpage
    \begingroup
      \@dblfloatplacement
      \@startdblcolumn
      \@whilesw\if@fcolmade \fi
        {\@outputpage
         \@startdblcolumn}%
    \endgroup
  \fi
}
%    \end{macrocode}
% We use circles to make punchmarks.
% When making circles, \TeX{} will put the center of the
% circle at point, but consume horizontal space equal
% to the full diameter of the circle.  To compensate,
% we need to skip forward by radius, and back again
% after laying each circle.
%    \begin{macrocode}
\def\af@circle{\hbox{\hskip\af@halfpunchwidth%
                     \ifnum\af@jawspread>0\relax%
                       \hskip-\af@halfjawspread%
                       \hskip-\af@jawline%
                         \vrule depth\af@halfpunchwidth%
                                height\af@halfpunchwidth%
                                width\af@jawline%
                       \hskip\af@halfjawspread%
                     \else%
                       \vrule depth\af@halfpunchwidth%
                              height\af@halfpunchwidth%
                              width0pt%
                     \fi%
                     \circle{\af@punchsize}%
                     \hskip-\af@punchwidth%
                     \ifnum\af@jawspread>0\relax%
                       \hskip\af@halfjawspread%
                         \vrule depth\af@halfpunchwidth%
                                height\af@halfpunchwidth
                                width\af@jawline%
                       \hskip-\af@halfjawspread%
                       \hskip-\af@jawline%
                     \fi%
                     \hskip-\af@halfpunchwidth}}
%    \end{macrocode}
% We define a looping command that lays down a cluster
% of circles.  Grouping allows this loop to be nested
% in another.
%    \begin{macrocode}
\def\af@group{%
  \bgroup%
    \af@tempcount=0%
    \af@circle%
    \loop\advance\af@tempcount by1\relax%
    \ifnum\af@tempcount<\af@punchcluster%
      \hskip\af@intraspace\relax\af@circle%
    \repeat%
  \egroup}
%    \end{macrocode}
% We define a command that lays down a set of clusters
% (groups).
%    \begin{macrocode}
\def\af@circles{%
  \af@tempcount=0\relax%
  \af@group%
  \loop\advance\af@tempcount by1\relax%
  \ifnum\af@tempcount<\af@punchgroups%
    \hskip\af@interspace\relax\af@group%
  \repeat%
  \af@tempcount=0}
%    \end{macrocode}
% The following command creates a set of punchmarks.
%    \begin{macrocode}
\def\af@punches{%
  \hbox to\af@textheight{\hfil\af@circles\hskip\af@halfpunchwidth\relax\hfil}}
%    \end{macrocode}
% The following creates a frame.  The model was lifted from the "geometry"
% package.
%    \begin{macrocode}
\def\@@@innerframe{%
  \moveright-\af@topmargin%
  \vbox to 0pt{%
    \vskip\topmargin%
    \vbox to0pt{\hrule width\af@textheight\vss}%
    \hbox to\af@textheight{\llap{\vrule height\af@textwidth}%
      \hfil\vrule height\af@textwidth}%
    \vskip-\af@halftextwidth%
    \vbox to0pt{\hrule width\af@textheight\vss}%
    \vskip-\af@halftextwidth%
    \vskip\af@grip%
    \nointerlineskip\af@punches\nointerlineskip%
    \vskip-\af@punchwidth%
    \vskip-\af@grip%
    \vskip\af@textwidth%
    \vskip-\af@punchwidth%
    \vskip-\af@grip%
    \nointerlineskip\af@punches\nointerlineskip%
    \vskip\af@grip%
    \vbox to0pt{\hrule width\af@textheight\vss}%
    \vss}}%
%    \end{macrocode}
% A further modification of the output routine,
% this time to put the frame in place.  This, too, is
% lifted from "geometry".  It has been modified only
% slightly, but we drop \LaTeX 2.09 support altogether.
%    \begin{macrocode}
\newif\if@latextwoe
\@ifundefined{if@compatibility}{\@latextwoefalse}{\@latextwoetrue}
\if@latextwoe
\def\@outputpage{%
\begingroup           % the \endgroup is put in by \aftergroup
  \let \protect \noexpand
  \@resetactivechars
  \let\-\@dischyph
  \let\'\@acci\let\`\@accii\let\=\@acciii
  \let\\\@normalcr
  \let\par\@@par          %% 15 Sep 87
  \shipout \vbox{%
    \set@typeset@protect
    \aftergroup \endgroup
    \aftergroup \set@typeset@protect
  \if@specialpage
    \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
  \fi
  \if@twoside
    \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
         \let\@themargin\oddsidemargin
    \else \let\@thehead\@evenhead
       \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
    \fi
  \fi
  \reset@font
  \normalsize
  \baselineskip\z@skip \lineskip\z@skip \lineskiplimit\z@
    \@begindvi
    \moveright\@themargin %<<<<<<<<<<<<<<<<<<<<< added
    \vtop{\@@@innerframe  %<<<<<<<<<<<<<<<<<<<<< added
    \vskip \topmargin
    \vskip \af@marginrel
%  \moveright\@themargin \vbox OPENBRACE %<<<<<<<<<<<< original
      \moveright\af@topmargin%     <<<<<<<<<<<< Bennett
      \vbox{%             %<<<<<<<<<<<<<<<<<<<<< modified
      \setbox\@tempboxa \vbox to\headheight{%
        \vfil
        \color@hbox
          \normalcolor
          \hb@xt@\textwidth {%
            \let \label \@gobble
            \let \index \@gobble
            \let \glossary \@gobble %% 21 Jun 91
            \@thehead
            }%
        \color@endbox
        }%                        %% 22 Feb 87
      \dp\@tempboxa \z@
      \box\@tempboxa
      \vskip \headsep
      \box\@outputbox
      \baselineskip \footskip
      \color@hbox
        \normalcolor
        \hb@xt@\textwidth{%
          \let \label \@gobble
          \let \index \@gobble      %% 22 Feb 87
          \let \glossary \@gobble   %% 21 Jun 91
          \@thefoot
          }%
      \color@endbox
      }}%<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< One more close bracket added 
    }%
\global \@colht \textheight
\stepcounter{page}%
\let\firstmark\botmark
}
\else
\message{Sorry, autofilo.sty works only with LaTeX2e}
\fi
%    \end{macrocode}
% Set some global parameters.
%    \begin{macrocode}
\headheight=0pt
\headsep=0pt
\footskip=0pt
\marginparwidth=0pt
\marginparsep=0pt
\pagestyle{empty}
\parindent=0pt
\raggedbottom
\columnseprule=0.0pt%
\raggedright
%    \end{macrocode}
% Some option definitions.
%    \begin{macrocode}
\define@key{opt}{pageheight}{%
  \af@textheight=#1\relax}
\define@key{opt}{pagewidth}{%
  \af@halftextwidth=#1\relax}
\define@key{opt}{columnsep}{%
  \columnsep=#1\relax}
\define@key{opt}{punchcluster}{%
  \af@punchcluster=#1}
\define@key{opt}{punchgroups}{%
  \af@punchgroups=#1}
\define@key{opt}{interspace}{%
  \af@interspace=#1}
\define@key{opt}{intraspace}{%
  \af@intraspace=#1}
\define@key{opt}{grip}{%
  \af@grip=#1}
\define@key{opt}{punchmargin}{%
  \af@punchmargin=#1}
\define@key{opt}{punchpoints}{%
  \af@punchsize=#1}
\define@key{opt}{topspace}{%
  \af@topmargin=#1}
\define@key{opt}{bottomspace}{%
  \af@bottommargin=#1}
\define@key{opt}{jawspread}{%
  \af@jawspread=#1}
\define@key{opt}{jawline}{%
  \af@jawline=#1}
%    \end{macrocode}
% The default values for the options.
%    \begin{macrocode}
\af@textheight=172mm
\af@halftextwidth=95mm
\columnsep=14pt
\af@punchcluster=3
\af@punchgroups=2
\af@interspace=51.25mm
\af@intraspace=19.25mm
\af@grip=5mm
\af@punchmargin=2mm
\af@punchsize=15
\af@topmargin=2pt
\af@bottommargin=0pt\relax
\af@jawline=0.4pt%
%    \end{macrocode}
% The remaining dimensions must be calculated inside
% the landscape environment.  We define that now.
%    \begin{macrocode}
\def\autofilo#1{%
  \setkeys{opt}{#1}%
  \oddsidemargin=-1in\relax%
   \af@textwidth\paperwidth%
   \advance\af@textwidth by-\af@textheight%
   \divide\af@textwidth by2\relax%
   \advance\oddsidemargin by\af@textwidth%
  \evensidemargin=-1in\relax%
   \advance\evensidemargin by\af@textwidth%
  \topmargin=-1in\relax%
   \af@textwidth\paperheight%
   \advance\af@textwidth by-\af@halftextwidth%
   \advance\af@textwidth by-\af@halftextwidth%
   \divide\af@textwidth by2\relax%
   \advance\topmargin by\af@textwidth\relax%
  \landscape%
  \af@halfjawspread\af@jawspread%
  \divide\af@halfjawspread by2\relax%
  \af@punchwidth=\af@punchsize pt%
  \af@halfpunchwidth\af@punchwidth%
  \divide\af@halfpunchwidth by2%
  \textheight\af@textheight%
  \advance\textheight by-\af@topmargin%
  \advance\textheight by-\af@bottommargin%
  \af@textwidth\af@halftextwidth%
  \multiply\af@textwidth by2\relax%
  \textwidth=\af@textwidth%
  \advance\textwidth by-2\af@punchwidth%
  \advance\textwidth by-2\af@grip%
  \advance\textwidth by-2\af@punchmargin%
  \af@marginrel\af@grip%
  \advance\af@marginrel by\af@punchmargin%
  \advance\af@marginrel by\af@punchwidth%
  \vsize\textheight%
  \hsize\textwidth%
  \@colroom\vsize%
  \@colht\vsize%
  \if@usequadruplecolumn%
    \quadruplecolumn%
  \else%
    \twocolumn%
  \fi}
%    \end{macrocode}
% The end of the environment is a simple thing.
%    \begin{macrocode}
\def\endautofilo{%
  \endlandscape}
%</style>
%    \end{macrocode}
% \Finale \PrintChanges