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
|
%%
%% This is file `layout.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% layout.dtx (with options: `package')
%%
%% This is a generated file.
%%
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%%
%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
%% --------------------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This file may only be distributed together with a copy of the LaTeX
%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
%% without such generated files.
%%
%% The list of all files belonging to the LaTeX `Tools Bundle' is
%% given in the file `manifest.txt'.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{layout}
[2000/09/25 v1.2c Show layout parameters]
\DeclareOption{dutch}{%
\def\Headertext{Kopregel}
\def\Bodytext{Broodtekst}
\def\Footertext{Voetregel}
\def\MarginNotestext{Marge\\Notities}
\def\oneinchtext{een inch}
\def\notshown{niet getoond}
}
\DeclareOption{german}{%
\def\Headertext{Kopfzeile}
\def\Bodytext{Haupttext}
\def\Footertext{Fu{\ss}zeile}
\def\MarginNotestext{Rand-\\ notizen}
\def\oneinchtext{ein Zoll}
\def\notshown{ohne Abbildung}
}
\DeclareOption{ngerman}{\ExecuteOptions{german}}
\DeclareOption{english}{%
\def\Headertext{Header}
\def\Bodytext{Body}
\def\Footertext{Footer}
\def\MarginNotestext{Margin\\Notes}
\def\oneinchtext{one inch}
\def\notshown{not shown}
}
\DeclareOption{french}{%
\def\Headertext{Ent\^{e}te}
\def\Bodytext{Corps}
\def\Footertext{Pied de page}
\def\MarginNotestext{Marge\\Notes}
\def\oneinchtext{un pouce}
\def\notshown{non affich\'{e}}
}
\DeclareOption{francais}{\ExecuteOptions{french}}
\DeclareOption{spanish}{%
\def\Headertext{Encabezamiento}
\def\Bodytext{Cuerpo}
\def\Footertext{Pie de p\'agina}
\def\MarginNotestext{Notas\\ Marginales}
\def\oneinchtext{una pulgada}
\def\notshown{no mostradas}
}
\DeclareOption{portuguese}{%
\def\Headertext{Cabe\c{c}alho}
\def\Bodytext{Corpo}
\def\Footertext{Rodap\'e}
\def\MarginNotestext{Notas\\ Marginais}
\def\oneinchtext{uma polegada}
\def\notshown{n\~ao mostradas}
}
\DeclareOption{brazilian}{%
\def\Headertext{Cabe\c{c}alho}
\def\Bodytext{Corpo}
\def\Footertext{Rodap\'e}
\def\MarginNotestext{Notas\\ Marginais}
\def\oneinchtext{uma polegada}
\def\notshown{n\~ao mostradas}
}
\DeclareOption{italian}{%
\def\Headertext{Testatina}
\def\Bodytext{Corpo}
\def\Footertext{Piedino}
\def\MarginNotestext{Note\\ Marginali}
\def\oneinchtext{un pollice}
\def\notshown{non mostrato}
}
\DeclareOption{verbose}{\let\LayOuttype\typeout}
\DeclareOption{silent}{\let\LayOuttype\@gobble}
\def\lay@value{}
\DeclareOption{integers}{%
\renewcommand*{\lay@value}[2]{%
\expandafter\number\csname #1@#2\endcsname pt}}
\DeclareOption{reals}{%
\renewcommand*{\lay@value}[2]{\the\csname #2\endcsname}}
\ExecuteOptions{english,silent,integers}
\ProcessOptions
\newcommand\LayOutbs{}
\chardef\LayOutbs`\\
\def\ConvertToCount#1#2{%
#1=#2
\divide #1 by 65536}
\def\SetToHalf#1#2{#1=#2\relax\divide#1by\tw@}
\def\SetToQuart#1#2{#1=#2\relax\divide#1by4}
\def\Identify#1{%
\put(\PositionX,\PositionY){\circle{20}}
\put(\PositionX,\PositionY){\makebox(0,0){\tiny #1}}
}
\def\InsideHArrow#1{{%
\ArrowLength = #1
\divide\ArrowLength by \tw@
\advance\ArrowLength by -10
\advance\PositionX by -10
\ifnum\ArrowLength<\z@
\put(\PositionX,\PositionY){\vector(1,0){-\ArrowLength}}
\advance\PositionX by 20
\put(\PositionX,\PositionY){\vector(-1,0){-\ArrowLength}}
\else
\put(\PositionX,\PositionY){\vector(-1,0){\ArrowLength}}
\advance\PositionX by 20
\put(\PositionX,\PositionY){\vector(+1,0){\ArrowLength}}
\fi
}}
\def\InsideVArrow#1{{%
\ArrowLength = #1
\divide\ArrowLength by \tw@
\advance\ArrowLength by -10
\advance\PositionY by -10
\put(\PositionX,\PositionY){\vector(0,-1){\ArrowLength}}
\advance\PositionY by 20
\put(\PositionX,\PositionY){\vector(0,+1){\ArrowLength}}
}}
\def\OutsideHArrow#1#2#3{{%
\PositionX = #1
\advance\PositionX by #3
\put(\PositionX,\PositionY){\vector(-1,0){#3}}
\PositionX = #1 \advance\PositionX-#2
\advance\PositionX by -#3
\put(\PositionX,\PositionY){\vector(+1,0){#3}}
}}
\def\OutsideVArrow#1#2#3#4{{%
\PositionY = #1
\advance\PositionY by -#3
\put(\PositionX,\PositionY){\vector(0,+1){#3}}
\PositionY = #1
\advance\PositionY#2
\advance\PositionY#4
\put(\PositionX,\PositionY){\vector(0,-1){#4}}
}}
\def\Show#1#2{\LayOutbs #2 = \lay@value{#1}{#2}}
\def\Type#1#2{%
\LayOuttype{#2 = \lay@value{#1}{#2}}}
\newcount\oneinch
\oneinch=72
\newcount\cnt@paperwidth
\newcount\cnt@paperheight
\ConvertToCount\cnt@paperwidth\paperwidth
\ConvertToCount\cnt@paperheight\paperheight
\newcount\cnt@hoffset
\newcount\cnt@voffset
\ConvertToCount\cnt@hoffset\hoffset
\ConvertToCount\cnt@voffset\voffset
\newcount\cnt@textheight
\newcount\cnt@textwidth
\newcount\cnt@topmargin
\newcount\cnt@oddsidemargin
\newcount\cnt@evensidemargin
\newcount\cnt@headheight
\newcount\cnt@headsep
\newcount\cnt@marginparsep
\newcount\cnt@marginparwidth
\newcount\cnt@marginparpush
\newcount\cnt@footskip
\newcount\fheight
\fheight=12
\newcount\ref@top
\ref@top=\cnt@paperheight \advance\ref@top by -\oneinch
\newcount\ref@hoffset
\newcount\ref@voffset
\ref@hoffset=\cnt@hoffset \advance\cnt@hoffset by \oneinch
\ref@voffset=\cnt@voffset
\cnt@voffset=\ref@top
\advance\cnt@voffset by -\ref@voffset
\newcount\ref@head
\newcount\ref@body
\newcount\ref@foot
\newcount\ref@margin
\newcount\ref@marginwidth
\newcount\ref@marginpar
\newcount\Interval
\newcount\ExtraYPos
\newcount\PositionX
\newcount\PositionY
\newcount\ArrowLength
\def\lay@getvalues{%
\ConvertToCount\cnt@textheight\textheight
\ConvertToCount\cnt@textwidth\textwidth
\ConvertToCount\cnt@topmargin\topmargin
\ConvertToCount\cnt@oddsidemargin\oddsidemargin
\ConvertToCount\cnt@evensidemargin\evensidemargin
\ConvertToCount\cnt@headheight\headheight
\ConvertToCount\cnt@headsep\headsep
\ConvertToCount\cnt@marginparsep\marginparsep
\ConvertToCount\cnt@marginparwidth\marginparwidth
\ConvertToCount\cnt@marginparpush\marginparpush
\ConvertToCount\cnt@footskip\footskip
\ref@head=\ref@top
\advance\ref@head by -\ref@voffset
\advance\ref@head by -\cnt@topmargin
\advance\ref@head by -\cnt@headheight
\ref@body=\ref@head
\advance\ref@body by -\cnt@headsep
\advance\ref@body by -\cnt@textheight
\ref@foot=\ref@body
\advance\ref@foot by -\cnt@footskip
}
\AtBeginDocument{\lay@getvalues}
\newcommand\layout{%
\@ifstar{\lay@getvalues\lay@xlayout}{\lay@xlayout}}
\def\lay@xlayout{%
\lay@layout
\if@twoside
\lay@layout
\fi}
\newcommand\lay@layout{%
\thispagestyle{empty}
\if@twoside
\ifodd\count\z@
\typeout{Two-sided document style, odd page.}
\ref@marginwidth=\cnt@oddsidemargin
\ref@marginpar=\oneinch
\advance\ref@marginpar by \ref@hoffset
\advance\ref@marginpar by \cnt@oddsidemargin
\ref@margin\ref@marginpar
\if@reversemargin
\advance\ref@marginpar by -\cnt@marginparsep
\advance\ref@marginpar by -\cnt@marginparwidth
\else
\advance\ref@marginpar by \cnt@textwidth
\advance\ref@marginpar by \cnt@marginparsep
\fi
\else
\typeout{Two-sided document style, even page.}
\ref@marginwidth=\cnt@evensidemargin
\ref@marginpar=\oneinch
\advance\ref@marginpar by \ref@hoffset
\advance\ref@marginpar by \cnt@evensidemargin
\ref@margin\ref@marginpar
\if@reversemargin
\advance\ref@marginpar by \cnt@textwidth
\advance\ref@marginpar by \cnt@marginparsep
\else
\advance\ref@marginpar by -\cnt@marginparsep
\advance\ref@marginpar by -\cnt@marginparwidth
\fi
\fi
\else
\typeout{One-sided document style.}
\ref@marginwidth=\cnt@oddsidemargin
\ref@marginpar=\oneinch
\advance\ref@marginpar by \ref@hoffset
\advance\ref@marginpar by \cnt@oddsidemargin
\ref@margin\ref@marginpar
\if@reversemargin
\advance\ref@marginpar by -\cnt@marginparsep
\advance\ref@marginpar by -\cnt@marginparwidth
\else
\advance\ref@marginpar by \cnt@textwidth
\advance\ref@marginpar by \cnt@marginparsep
\fi
\fi
\setlength{\unitlength}{.5pt}
\begin{picture}(\cnt@paperwidth,\cnt@paperheight)
\centering
\thicklines
\put(0,0){\framebox(\cnt@paperwidth,\cnt@paperheight){\mbox{}}}
\put(0,\cnt@voffset){\dashbox{10}(\cnt@paperwidth,0){\mbox{}}}
\put(\cnt@hoffset,0){\dashbox{10}(0,\cnt@paperheight){\mbox{}}}
\put(\ref@margin,\ref@head){%
\framebox(\cnt@textwidth,\cnt@headheight)%
{\footnotesize\Headertext}}
\put(\ref@margin,\ref@body){%
\framebox(\cnt@textwidth,\cnt@textheight){\Bodytext}}
\put(\ref@margin,\ref@foot){%
\framebox(\cnt@textwidth,\fheight){\footnotesize\Footertext}}
\put(\ref@marginpar,\ref@body){%
\framebox(\cnt@marginparwidth,\cnt@textheight)%
{\footnotesize\shortstack{\MarginNotestext}}}
\thinlines
\SetToHalf\PositionX\cnt@textwidth
\advance\PositionX by \ref@margin
\PositionY = \ref@body
\advance\PositionY by 50
\Identify{8}
\InsideHArrow\cnt@textwidth
\SetToHalf\PositionY\cnt@textheight
\advance\PositionY by \ref@body
\PositionX = \cnt@textwidth
\divide\PositionX by 5
\multiply \PositionX by 4
\advance\PositionX by \ref@margin
\Identify{7}
\InsideVArrow\cnt@textheight
\PositionY = 50
\SetToHalf\PositionX\cnt@hoffset
\Identify{1}
\InsideHArrow\cnt@hoffset
\SetToQuart\PositionY\cnt@textheight
\advance\PositionY by \ref@body
\ifnum\ref@marginwidth > 0
\OutsideHArrow\ref@margin\ref@marginwidth{20}
\PositionX = \cnt@hoffset
\else
\OutsideHArrow\cnt@hoffset{-\ref@marginwidth}{20}
\PositionX = \ref@margin
\fi
\advance\PositionX by -30
\Identify{3}
\SetToQuart\PositionY\cnt@textheight
\advance\PositionY by \ref@body
\advance\PositionY by 30
\SetToHalf\PositionX\cnt@marginparwidth
\advance\PositionX by \ref@marginpar
\Identify{10}
\InsideHArrow\cnt@marginparwidth
\advance\PositionY by 30
\if@twoside
\if@reversemargin
\ifodd\count\z@
\OutsideHArrow\ref@margin\cnt@marginparsep{20}
\PositionX = \ref@margin
\else
\OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
\PositionX = \ref@marginpar
\fi
\else
\ifodd\count\z@
\OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
\PositionX = \ref@marginpar
\else
\OutsideHArrow\ref@margin\cnt@marginparsep{20}
\PositionX = \ref@margin
\fi
\fi
\else
\if@reversemargin
\OutsideHArrow\ref@margin\cnt@marginparsep{20}
\PositionX = \ref@margin
\else
\OutsideHArrow\ref@marginpar\cnt@marginparsep{20}
\PositionX = \ref@marginpar
\fi
\fi
\advance\PositionX by -\cnt@marginparsep
\advance\PositionX by -30
\Identify{9}
\PositionX = \cnt@textwidth
\divide\PositionX by 8
\advance\PositionX by \ref@margin
\OutsideVArrow\ref@foot\cnt@footskip{20}{20}
\PositionY = \ref@foot
\advance\PositionY by \cnt@footskip
\advance\PositionY by 30
\Identify{11}
\PositionX = \cnt@paperwidth
\advance\PositionX by -50
\PositionY = \cnt@paperheight
\ExtraYPos = \PositionY
\advance\ExtraYPos by -\cnt@voffset
\advance\PositionY by \cnt@voffset
\divide\PositionY by \tw@
\Identify{2}
\InsideVArrow\ExtraYPos
\Interval = \cnt@textwidth
\divide\Interval by 8
\PositionX = \ref@margin
\advance\PositionX by \Interval
\ifnum\cnt@topmargin > \z@
\ExtraYPos = \ref@head
\advance\ExtraYPos\cnt@headheight
\OutsideVArrow\ExtraYPos\cnt@topmargin{20}{20}
\PositionY = \ExtraYPos
\advance\PositionY by \cnt@topmargin
\else
\ExtraYPos = \cnt@voffset
\OutsideVArrow\ExtraYPos{-\cnt@topmargin}{20}{20}
\PositionY = \ExtraYPos
\advance\PositionY by -\cnt@topmargin
\fi
\advance\PositionY by 30
\Identify{4}
\advance\PositionX by \Interval
\OutsideVArrow\ref@head\cnt@headheight{20}{20}
\PositionY = \ref@head
\advance\PositionY by \cnt@headheight
\advance\PositionY by 30
\Identify{5}
\advance\PositionX by \Interval
\ExtraYPos=\ref@body
\advance\ExtraYPos\cnt@textheight
\OutsideVArrow\ExtraYPos\cnt@headsep{20}{20}
\PositionY = \ref@body
\advance\PositionY by \cnt@textheight
\advance\PositionY by -30
\Identify{6}
\end{picture}
\medskip
\vtop to 0pt{%
\@minipagerestore\footnotesize\ttfamily
\begin{tabular}{@{}rl@{\hspace{20pt}}rl}
1 & \oneinchtext\ + \LayOutbs\texttt{hoffset}
& 2 & \oneinchtext\ + \LayOutbs\texttt{voffset} \\
3 & \if@twoside
\ifodd\count\z@ \Show{cnt}{oddsidemargin}
\else \Show{cnt}{evensidemargin}
\fi
\else
\Show{cnt}{oddsidemargin}
\fi & 4 & \Show{cnt}{topmargin} \\
5 & \Show{cnt}{headheight} & 6 & \Show{cnt}{headsep} \\
7 & \Show{cnt}{textheight} & 8 & \Show{cnt}{textwidth} \\
9 & \Show{cnt}{marginparsep}&10& \Show{cnt}{marginparwidth} \\
11& \Show{cnt}{footskip} & & \Show{cnt}{marginparpush}
\rlap{(\notshown)}\\
& \Show{ref}{hoffset} & & \Show{ref}{voffset} \\
& \Show{cnt}{paperwidth} & & \Show{cnt}{paperheight} \\
\end{tabular}\vss}
\Type{ref}{hoffset}
\Type{ref}{voffset}
\Type{cnt}{textheight}
\Type{cnt}{textwidth}
\newpage
}
\endinput
%%
%% End of file `layout.sty'.
|