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
|
% memlays.sty % extra layouts for membook, extension to layouts package
\ProvidesPackage{memlays}[2002/08/10 v1.0 Extra membook layouts]
\usepackage{layouts}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CHAPTER HEADING
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\drawchapter}{%
% Some default values first
\l@yltoc{0.85\textwidth}{\l@youthdi} % textwidth
\l@yltoc{\baselineskip}{\l@youtvdi} % baselineskip
\ifdrawparameters
% When drawparameters is TRUE, use a generic layout.
% Set dimensions and coordinates.
\Huge \l@youtvdii=\baselineskip \normalsize % Heading baselineskip
\divide\l@youtvdii by \l@yonepoint
\l@yltoc{50pt}{\l@youtvpiii} % beforeskip
\l@yltoc{20pt}{\l@youtvpi} % midskip
\l@yltoc{40pt}{\l@youtvpii} % afterskip
\fi
% Now continue setting all the other drawing lengths and coordinates.
\l@youtvdiii=\l@youtvpii % afterskip
\advance\l@youtvdiii by \l@youtparskip
\advance\l@youtvdiii by \l@youtvdi
\l@youtvdiv=\l@youtvpi % midskip
% \advance\l@youtvdiv by \l@youtparskip
\advance\l@youtvdiv by \l@youtvdii
\l@youtvdv=\l@youtvpiii % beforeskip
% \advance\l@youtvdv by \l@youtparskip
\advance\l@youtvdv by \l@youtvdii
\l@youtyci=\l@youtvdi % Y coord of base of after text
\l@youtycii=\l@youtyci % Y coord of base of heading text
\advance\l@youtycii by \l@youtvdiii
%% \l@youthdiv=\z@ % 0 or abs(-afterskip)
% Continue.
\l@youtyciii=\l@youtycii % Y coord of base Chapter N
\advance\l@youtyciii by \l@youtvdiv
\l@youtyciv=\l@youtyciii % Y coord of top of typeblock
\advance\l@youtyciv by \l@youtvdv
\l@youtycvi=\l@youtyciv % 3*l@youtvdi + l@youtyciv
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\l@youthdii=\l@youtvdi % a small amount
\l@youthdiii=\l@youthdii % half a small amount
\divide\l@youthdiii by \tw@
%
% Draw the picture!
%
\begin{center}
\setlength{\unitlength}{\l@youtunitlength}
\begin{picture}(\l@youthdi,\l@youtycvi)
\put(0,\l@youtyci){\begin{picture}(\l@youthdi,\l@youtyciv)
%
% Draw the two after heading text lines
\put(0,0){\l@ylabelfont second line of text following the heading \ldots}
\put(0,\l@youtyci){\l@ylabelfont This is the start of the after-heading text
which continues on \ldots}
% Draw the heading
\put(0,\l@youtycii){{\Huge The title}}
% Draw the Chapter
\put(0,\l@youtyciii){{\huge Chapter 3}}
% Top of the typeblock
\put(0,\l@youtyciv){\l@ylabelfont \_\_\_\_ top of the typeblock}
\testdrawdimensions
\ifl@ytempif
% Draw the dimensions if required. First the before skips.
\put(0,\l@youtyciv){\vector(0,-1){\l@youtvdv}}
\put(0,\l@youtyciv){\begin{picture}(\l@youthdii,\l@youthdii)
\put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
{\l@yparamfont \l@ypcmd{beforechapskip}}}
\end{picture}}
% The midskip
%% \put(0,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
\put(-\l@youthdiii,\l@youtyciii){\vector(0,-1){\l@youtvdiv}}
\put(0,\l@youtyciii){\begin{picture}(\l@youthdii,\l@youthdii)
\put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
{\l@yparamfont \l@ypcmd{midchapskip}}}
\end{picture}}
% And finish with the afterskip
\put(0,\l@youtycii){\vector(0,-1){\l@youtvdiii}}
\put(0,\l@youtycii){\begin{picture}(\l@youthdii,\l@youthdii)
\put(\l@youthdiii,-\l@youthdii){\makebox(0,0)[tl]%
{\l@yparamfont \l@ypcmd{afterchapskip}}}
\end{picture}}
\fi
\end{picture}}
% Draw rules.
\put(0,0){\line(1,0){\l@youthdi}}
\put(0,\l@youtycvi){\line(1,0){\l@youthdi}}
\end{picture}
\end{center}
\setlength{\unitlength}{1pt}
% The end of the definition of |\drawheading|.
}
% Shorthands.
\newcommand{\chapterdiagram}{\drawparameterstrue\drawchapter}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% HEADERS AND FOOTERS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\headerfooterdiagram}{%
% some initial values
\l@yltoc{0.85\textwidth}{\l@youthdi} % textwidth
\l@yltoc{\baselineskip}{\l@youtvdi} % baselineskip
% we need 4 x coordinates
\l@youtxci=\z@
\l@youtxciii=\l@youthdi
\l@youtxciv=\l@youtxciii
\advance\l@youtxciv by \l@youtvdi
\l@youtxcii=\l@youtxciii % midway between xci and xciii
\advance\l@youtxcii by \l@youtxci
\divide\l@youtxcii by \tw@
% we need 8 y coordinates
\l@youtycii=\l@youtvdi
\l@youtyciii=\l@youtycii
\advance\l@youtyciii by \l@youtvdi
\l@youtyciv=\l@youtyciii
\advance\l@youtyciv by \l@youtvdi
\l@youtycvi=\l@youtyciv
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\advance\l@youtycvi by \l@youtvdi
\l@youtycv=\l@youtyciv % midway between yciv and ycvi
\advance\l@youtycv by \l@youtycvi
\divide\l@youtycv by \tw@
\l@youtycvii=\l@youtycvi
\advance\l@youtycvii by \l@youtvdi
\l@youtycviii=\l@youtycvii
\advance\l@youtycviii by \l@youtvdi
\l@youtyci=\l@youtycviii
\advance\l@youtyci by \l@youtvdi
% we need 1 horizontal distance, which is the diagram width
% (i.e., \l@youthdi)
% and one vertical distance, total picture height
\l@youtvdii=\l@youtycviii
\advance\l@youtvdii by \l@youtvdi
\advance\l@youtvdii by \l@youtvdi
\advance\l@youtvdii by \l@youtvdi
% and a (half) small amount
\l@youthdii=\l@youtvdi
\l@youthdiii=\l@youthdii
\divide\l@youthdiii by \tw@
%
% Draw the picture
%
\begin{center}
\setlength{\unitlength}{\l@youtunitlength}
\begin{picture}(\l@youthdi,\l@youtvdii)
\thinlines
% draw the horizontals
\put(0,0){\line(1,0){\l@youthdi}}
\put(0,\l@youtvdii){\line(1,0){\l@youthdi}}
% the footer texts
\put(0,\l@youtyciii){\makebox(0,0)[bl]{left}}
\put(\l@youtxcii,\l@youtyciii){\makebox(0,0)[b]{center}}
\put(\l@youtxciii,\l@youtyciii){\makebox(0,0)[br]{right}}
% the footrule
\thicklines
\put(0,\l@youtyciv){\line(1,0){\l@youthdi}}
\put(\l@youtxciv,\l@youtyciv){\begin{picture}(\l@youthdii,\l@youthdii)
\put(0,\l@youthdiii){\makebox(0,0)[br]%
{\l@yparamfont \l@ypcmd{footrule}}}
\end{picture}}
% the TYPE BLOCK
\put(\l@youtxcii,\l@youtycv){\makebox(0,0){THE TYPE BLOCK}}
% the headrule
\put(0,\l@youtycvi){\line(1,0){\l@youthdi}}
\put(\l@youtxciv,\l@youtycvi){\begin{picture}(\l@youthdii,\l@youthdii)
\put(0,-\l@youthdiii){\makebox(0,0)[tr]%
{\l@yparamfont \l@ypcmd{headrule}}}
\end{picture}}
\thinlines
% the header texts
\put(0,\l@youtycvii){\makebox(0,0)[tl]{left}}
\put(\l@youtxcii,\l@youtycvii){\makebox(0,0)[t]{center}}
\put(\l@youtxciii,\l@youtycvii){\makebox(0,0)[tr]{right}}
% the runningwidth
\put(0,\l@youtycviii){\vector(1,0){\l@youthdi}}
\put(0,\l@youtycviii){\vector(-1,0){0}}
\put(\l@youtxcii,\l@youtyci){\makebox(0,0)%
{\l@yparamfont \l@ypcmd{runningwidth}}}
\end{picture}
\setlength{\unitlength}{1pt}
\end{center}
}
\endinput
|