1 |
pippijn |
1.1 |
% local.sty should give a right format for your thesis. |
2 |
|
|
% written by T.Bulik and modified by B. Thomas for the playbook |
3 |
|
|
|
4 |
|
|
% TEXT DEFINITIONS |
5 |
|
|
\def\etal{{\it et al.}} |
6 |
|
|
\def\cf{{\sl Crossfire}} |
7 |
|
|
\def\playbook{{\sl Crossfire} player's handbook} |
8 |
|
|
\def\spoiler{{\sl Crossfire} {\bf spoiler}} |
9 |
|
|
\def\divinemagic{divine magic} |
10 |
|
|
\def\wizardry{wizardry} |
11 |
|
|
\def\incantation{incantation} |
12 |
|
|
% this is the case a/an for 'incantation' def |
13 |
|
|
\def\ina{n} |
14 |
|
|
% using this caus Klaus yelled at me ;) |
15 |
|
|
\def\emdash{{\em $-$}} |
16 |
|
|
% here are some names |
17 |
|
|
\def\angband{{\sl Angband}} |
18 |
|
|
\def\ragnarok{{\sl Ragnarok}} |
19 |
|
|
\def\gauntlet{{\sl Gauntlet (TM)}} |
20 |
|
|
\def\rogue{{\sl Rogue}} |
21 |
|
|
\def\hack{{\sl NetHack}} |
22 |
|
|
\def\moria{{\sl Moria}} |
23 |
|
|
\def\sngc#1{\multicolumn{1}{c}{#1}} |
24 |
|
|
\def\snglc#1{\multicolumn{1}{|c}{#1}} |
25 |
|
|
\def\sngLc#1{\multicolumn{1}{|c|}{#1}} |
26 |
|
|
\def\tplc#1{\multicolumn{3}{c|}{#1}} |
27 |
|
|
|
28 |
|
|
% Define the command \mychapter{<head1>}{<head2>}. <head1> |
29 |
|
|
% is the text to put in the chapter head if there is a |
30 |
|
|
% chapter number; <head2>, if not. |
31 |
|
|
|
32 |
|
|
\def\@chapapp{Chapter} |
33 |
|
|
\def\chapapp{\@chapapp} |
34 |
|
|
|
35 |
|
|
\def\mychapter#1#2{ |
36 |
|
|
\def\@chaphead##1{#1} |
37 |
|
|
\def\@schaphead##1{#2} |
38 |
|
|
} |
39 |
|
|
|
40 |
|
|
\def\@makechapterhead#1{ \vspace*{\chaptopsep} { \parindent 0pt \raggedright |
41 |
|
|
\ifnum \c@secnumdepth >\m@ne \@chaphead{#1} \else \@schaphead{#1} \fi |
42 |
|
|
\par \nobreak \vskip \chapaftersep } } |
43 |
|
|
|
44 |
|
|
\def\@makeschapterhead#1{ \vspace*{\chaptopsep} { \parindent 0pt \raggedright |
45 |
|
|
\@schaphead{#1}\par |
46 |
|
|
\nobreak \vskip \chapaftersep } } |
47 |
|
|
|
48 |
|
|
% \chaptopsep is the space between the top of the text page and the |
49 |
|
|
% chapter head. \chapaftersep is the space between the chapter |
50 |
|
|
% head and the text. |
51 |
|
|
|
52 |
|
|
\newlength{\chaptopsep} |
53 |
|
|
\setlength{\chaptopsep}{.1in} |
54 |
|
|
\newlength{\chapaftersep} |
55 |
|
|
\setlength{\chapaftersep}{.5in} |
56 |
|
|
|
57 |
|
|
% Default chapter headings. |
58 |
|
|
|
59 |
|
|
% \mychapter{\LARGE \sc \thechapter. #1}{\LARGE \sc #1} |
60 |
|
|
% \mychapter{\LARGE \sc . #1}{\LARGE \sc #1} |
61 |
|
|
% |
62 |
|
|
% This defines the chapter headings as required by you know who. |
63 |
|
|
% |
64 |
|
|
% \mychapter{\large\bf \begin{center} \chapapp\ \thechapter \end{center} |
65 |
|
|
% \mychapter{\large\bf \thechapter . #1 $-$ } |
66 |
|
|
\mychapter{\large\bf Chapter \thechapter . #1 } |
67 |
|
|
{\large\bf \begin{center} #1 \end{center}} |
68 |
|
|
|
69 |
|
|
|
70 |
|
|
|
71 |
|
|
% Define the command \mysection{<sec>}{<style>}{<prefix>}. |
72 |
|
|
% <sec> is the section level--section, subsection, etc. <style> |
73 |
|
|
% is the style in which the section head is to be set; e.g., |
74 |
|
|
% \large\bf. <prefix> is what proceeds the head text, usually |
75 |
|
|
% \the<sec> followed by some putctuation. |
76 |
|
|
|
77 |
|
|
|
78 |
|
|
\def\@startsection#1#2#3#4#5#6{\if@noskipsec \leavevmode \fi |
79 |
|
|
\par \@tempskipa #4\relax |
80 |
|
|
\@afterindenttrue |
81 |
|
|
\ifdim \@tempskipa <\z@ \@tempskipa -\@tempskipa \@afterindentfalse\fi |
82 |
|
|
\if@nobreak \everypar{}\else |
83 |
|
|
\addpenalty{\@secpenalty}\addvspace{\@tempskipa}\fi \@ifstar |
84 |
|
|
{\@ssect{#3}{#4}{#5}{#1}}{\@dblarg{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}}} |
85 |
|
|
|
86 |
|
|
|
87 |
|
|
\def\@sect#1#2#3#4#5#6[#7]#8{\ifnum #2>\c@secnumdepth |
88 |
|
|
\def\@svsec{}\else |
89 |
|
|
\refstepcounter{#1} |
90 |
|
|
\edef\@svsec{\expandafter\relax\csname @pre#1\endcsname}\fi |
91 |
|
|
\@tempskipa #5\relax |
92 |
|
|
\ifdim \@tempskipa>\z@ |
93 |
|
|
\begingroup \expandafter\relax\csname @#1style\endcsname\relax |
94 |
|
|
\@hangfrom{\hskip #3\relax\@svsec}{\interlinepenalty \@M #8\par} |
95 |
|
|
\endgroup |
96 |
|
|
\csname #1mark\endcsname{#7}\addcontentsline |
97 |
|
|
{toc}{#1}{\ifnum #2>\c@secnumdepth \else |
98 |
|
|
\protect\numberline{\csname the#1\endcsname}\fi |
99 |
|
|
#7}\else |
100 |
|
|
\def\@svsechd{ |
101 |
|
|
\expandafter\relax\csname @#1style\endcsname\relax |
102 |
|
|
\hskip #3\@svsec #8\csname #1mark\endcsname |
103 |
|
|
{#7}\addcontentsline |
104 |
|
|
{toc}{#1}{\ifnum #2>\c@secnumdepth \else |
105 |
|
|
\protect\numberline{\csname the#1\endcsname}\fi |
106 |
|
|
#7}}\fi |
107 |
|
|
\@xsect{#5}} |
108 |
|
|
|
109 |
|
|
|
110 |
|
|
\def\@ssect#1#2#3#4#5{\@tempskipa #3\relax |
111 |
|
|
\ifdim \@tempskipa>\z@ |
112 |
|
|
\begingroup \expandafter\relax\csname @#4style\endcsname\relax |
113 |
|
|
\@hangfrom{\hskip #1}{\interlinepenalty \@M #5\par}\endgroup |
114 |
|
|
\else \def\@svsechd{#4\hskip #1\relax #5}\fi |
115 |
|
|
\@xsect{#3}} |
116 |
|
|
|
117 |
|
|
\def\mysection#1#2#3{ |
118 |
|
|
\expandafter\def\csname @#1style\endcsname{#2} |
119 |
|
|
\expandafter\def\csname @pre#1\endcsname{#3} |
120 |
|
|
} |
121 |
|
|
|
122 |
|
|
% Default section heads. |
123 |
|
|
|
124 |
|
|
\mysection{section}{\normalsize\bf}{Section \thesection .~} |
125 |
|
|
\mysection{subsection}{\normalsize\bf}{\thesubsection.~} |
126 |
|
|
% Line added by me follows |
127 |
|
|
\mysection{subsubsection}{\normalsize\bf}{\thesubsubsection.~} |
128 |
|
|
|
129 |
|
|
\renewcommand{\listoffigures}{\@restonecolfalse \if@twocolumn |
130 |
|
|
\@restonecoltrue \onecolumn \fi |
131 |
|
|
\chapter*{\listfigurename \@mkboth {\uppercase {\listfigurename } |
132 |
|
|
\addcontentsline{toc}{chapter}{\listfigurename}}{\uppercase {\listfigurename |
133 |
|
|
}}\addcontentsline{toc}{chapter}{\listfigurename} } |
134 |
|
|
\@starttoc{lof}\if@restonecol \twocolumn \fi } |
135 |
|
|
|
136 |
|
|
|
137 |
|
|
\renewcommand{\listoftables}{\@restonecolfalse \if@twocolumn |
138 |
|
|
\@restonecoltrue \onecolumn \fi |
139 |
|
|
\chapter*{\listtablename \@mkboth {\uppercase {\listtablename } |
140 |
|
|
\addcontentsline{toc}{chapter}{\listtablename}}{\uppercase {\listtablename |
141 |
|
|
}}\addcontentsline{toc}{chapter}{\listtablename} } |
142 |
|
|
\@starttoc{lot}\if@restonecol \twocolumn \fi } |
143 |
|
|
|
144 |
|
|
|
145 |
|
|
%----new margins from 12/89 |
146 |
|
|
\advance\textheight by 1.1in |
147 |
|
|
\advance\voffset by -0.4in |
148 |
|
|
\advance\textwidth by 0.5in |
149 |
|
|
\advance\oddsidemargin by -0.05in |
150 |
|
|
|
151 |
|
|
% |
152 |
|
|
% LINE SPACING for single space |
153 |
|
|
\newcommand{\snglsp}{\baselineskip=14pt plus .1pt} |
154 |
|
|
% LINE SPACING for double space |
155 |
|
|
\newcommand{\dblesp}{\baselineskip=28pt plus .1pt} |
156 |
|
|
% |
157 |
|
|
\newcommand{\bequ}{\begin{equation}} |
158 |
|
|
\newcommand{\eequ}{\end{equation}} |
159 |
|
|
\newcommand{\beqn}{\begin{eqnarray}} |
160 |
|
|
\newcommand{\eeqn}{\end{eqnarray}} |
161 |
|
|
% |
162 |
|
|
% |
163 |
|
|
\newcommand{\omc}{\mbox{$\omega_c$}} |
164 |
|
|
\newcommand{\gray}{\mbox{$\gamma$-ray}} |
165 |
|
|
\newcommand{\ctg}{\mathop{\rm ctg}\nolimits} |
166 |
|
|
|
167 |
|
|
% |
168 |
|
|
% INPUTTING MONGO FILES: |
169 |
|
|
% see psfig.tex for more detail . |
170 |
|
|
% |
171 |
|
|
%\input psfig.tex |
172 |
|
|
%\pssilent |
173 |
|
|
\def\mongovaryheight#1 #2 {\psfig{bbllx=36pt,bblly=36pt,bburx=576pt,bbury=756pt,file=#1,height=#2,angle=-90}} |
174 |
|
|
\def\mongovarywidth#1 #2 {\psfig{bbllx=36pt,bblly=36pt,bburx=576pt,bbury=756pt,file=#1,width=#2,angle=-90}} |
175 |
|
|
\def\mongovaryboth#1 #2 #3 {\psfig{bbllx=36pt,bblly=36pt,bburx=576pt,bbury=756pt,file=#1,height=#2,width=#3,angle=-90}} |
176 |
|
|
\def\mongovarybothside#1 #2 #3 {\psfig{bbllx=36pt,bblly=36pt,bburx=576pt,bbury=756pt,file=#1,height=#2,width=#3,angle=0}} |
177 |
|
|
\def\mongovary5height#1 #2 {\psfig{bbllx=36pt,bblly=36pt,bburx=756pt,bbury=576pt,file=#1,height=#2}} |
178 |
|
|
|
179 |
|
|
% |
180 |
|
|
% This command creates bibliography and adds an entry to the table of |
181 |
|
|
% contents. |
182 |
|
|
% |
183 |
|
|
\def\bibname{References} |
184 |
|
|
\renewcommand{\thebibliography}[1] |
185 |
|
|
{\chapter *{\bibname \@mkboth |
186 |
|
|
{\uppercase {\bibname }}{\uppercase {\bibname }}} |
187 |
|
|
\addcontentsline{toc}{chapter}{\bibname} |
188 |
|
|
\list {\@biblabel {\arabic {enumiv}}}{\settowidth \labelwidth {\@biblabel {#1}} |
189 |
|
|
\leftmargin \labelwidth |
190 |
|
|
\advance \leftmargin \labelsep |
191 |
|
|
\usecounter {enumiv} |
192 |
|
|
\let \p@enumiv \@empty |
193 |
|
|
\def \theenumiv {\arabic {enumiv}}} |
194 |
|
|
\def \newblock {\hskip .11em plus.33em minus.07em} |
195 |
|
|
\sloppy \clubpenalty 4000\widowpenalty 4000 |
196 |
|
|
\sfcode`\.=\@m } |
197 |
|
|
|
198 |
|
|
% |
199 |
|
|
% STUFF ADDED BY ME, RJT |
200 |
|
|
% |
201 |
|
|
|
202 |
|
|
\def\references{\section*{REFERENCES} |
203 |
|
|
\bgroup\parindent=\z@\parskip=\itemsep |
204 |
|
|
\def\reference{\par\noindent \hangafter=1 \hangindent 22.76pt}} |
205 |
|
|
\def\endreferences{\reference\egroup} |
206 |
|
|
|
207 |
|
|
\def\plotone#1{\centering \leavevmode |
208 |
|
|
\epsfxsize=\textwidth \epsfbox{#1}} |
209 |
|
|
|
210 |
|
|
\def\plottwo#1#2{\centering \leavevmode |
211 |
|
|
\epsfxsize=.45\textwidth \epsfbox{#1} \hfil |
212 |
|
|
\epsfxsize=.45\textwidth \epsfbox{#2}} |
213 |
|
|
|
214 |
|
|
\def\plotfiddle#1#2#3#4#5#6#7{\centering \leavevmode |
215 |
|
|
\vbox to#2{\rule{0pt}{#2}} |
216 |
|
|
\special{psfile=#1 voffset=#7 hoffset=#6 vscale=#5 hscale=#4 angle=#3}} |
217 |
|
|
|
218 |
|
|
|
219 |
|
|
\newif\if@topcaption \@topcaptiontrue |
220 |
|
|
\def\topcaption{\@topcaptiontrue\tablecaption} |
221 |
|
|
\def\bottomcaption{\@topcaptionfalse\tablecaption} |
222 |
|
|
|
223 |
|
|
% |
224 |
|
|
% Added the command \tablecaption, with the use of the definition |
225 |
|
|
% of the \caption and \@caption commands from latex.tex. |
226 |
|
|
% This command has to function exactly like \caption does except it |
227 |
|
|
% has to store its argument (and the optional argument) for later |
228 |
|
|
% processing WITHIN the supertabular environment |
229 |
|
|
% JB |
230 |
|
|
% |
231 |
|
|
\long\def\tablecaption{\refstepcounter{table} \@dblarg{\@xtablecaption}} |
232 |
|
|
\long\def\@xtablecaption[#1]#2{% |
233 |
|
|
\long\def\@process@tablecaption{\@stcaption{table}[#1]{#2}}} |
234 |
|
|
\let\@process@tablecaption\relax |
235 |
|
|
|
236 |
|
|
% |
237 |
|
|
% This is a redefinition of LaTeX's \@caption, \@makecaption is |
238 |
|
|
% called within a group so as not to return to \normalsize globally. |
239 |
|
|
% also a fix is made for the `feature' of the \@makecaption of article.sty and |
240 |
|
|
% friends that a caption ALWAYS gets a \vskip 10pt at the top and NONE at the |
241 |
|
|
% bottom. If a user wants to precede his table with a caption this results |
242 |
|
|
% in a collision. |
243 |
|
|
% |
244 |
|
|
|
245 |
|
|
\long\def\@stcaption#1[#2]#3{\par% |
246 |
|
|
\addcontentsline{\csname ext@#1\endcsname}{#1}% |
247 |
|
|
{\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}} |
248 |
|
|
\begingroup |
249 |
|
|
\@parboxrestore |
250 |
|
|
\normalsize |
251 |
|
|
\if@topcaption \vskip -10pt \fi % 'fix' |
252 |
|
|
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par |
253 |
|
|
\if@topcaption \vskip 10pt \fi % 'fix' |
254 |
|
|
\endgroup} |
255 |
|
|
|
256 |
|
|
|
257 |
|
|
% \tablehead activates the new tabular \cr |
258 |
|
|
% commands |
259 |
|
|
\def\@tablehead{} |
260 |
|
|
\def\tablehead#1{\gdef\@tablehead{#1}} |
261 |
|
|
\def\tablefirsthead#1{\gdef\@table@first@head{#1}} |
262 |
|
|
|
263 |
|
|
%+ |
264 |
|
|
% If the user uses an extra amount of tabular-data (like \multicolumn) |
265 |
|
|
% in \verb=\tabletail= \TeX\ starts looping because of the definition |
266 |
|
|
% of \verb=\nextline=. So make \verb=\\= act like just a \verb=\cr= |
267 |
|
|
% inside this tail to prevent the loop. |
268 |
|
|
% Save and restore the value of \verb=\\= |
269 |
|
|
%- |
270 |
|
|
\def\@tabletail{} |
271 |
|
|
\def\tabletail#1{% |
272 |
|
|
\gdef\@tabletail{\noalign{\global\let\@savcr=\\\global\let\\=\cr}% |
273 |
|
|
#1\noalign{\global\let\\=\@savcr}}} |
274 |
|
|
\def\tablelasttail#1{\gdef\@table@last@tail{#1}} |
275 |
|
|
|
276 |
|
|
\newdimen\maxsize % maximum pagesize |
277 |
|
|
\newdimen\actsize % actual pagesize |
278 |
|
|
\newdimen\twocolsize % needed for correct max height if twocolumn |
279 |
|
|
\newdimen\parboxheight % height plus depth of a parbox-argument |
280 |
|
|
\newdimen\addspace % stores the value of \\[#1] |
281 |
|
|
\newdimen\midlineheight % estimated size of a normal line |
282 |
|
|
\newdimen\pargcorrection % to set page height tolerance if p-arg |
283 |
|
|
\newdimen\computedimens % computation variable |
284 |
|
|
\newbox\tabparbox |
285 |
|
|
|
286 |
|
|
%%%% Redefine original LaTeX tabular \cr commands. %%%% |
287 |
|
|
%%%% New tabular \cr commands get a leading `s' %%%% |
288 |
|
|
|
289 |
|
|
% Insert \nextline command for counting |
290 |
|
|
\def\@stabularcr{{\ifnum0=`}\fi\@ifstar{\@sxtabularcr}{\@sxtabularcr}} |
291 |
|
|
\def\@sxtabularcr{\@ifnextchar[{\@sargtabularcr}% |
292 |
|
|
{\ifnum0=`{\fi}\cr\nextline}} |
293 |
|
|
|
294 |
|
|
% contents of command unchanged |
295 |
|
|
\def\@sargtabularcr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@ |
296 |
|
|
\unskip\@sxargarraycr{#1}\else \@syargarraycr{#1}\fi} |
297 |
|
|
|
298 |
|
|
% here copy the value #1 of [ ] of \\ |
299 |
|
|
% to \addspace |
300 |
|
|
\def\@sxargarraycr#1{\@tempdima #1\advance\@tempdima \dp \@arstrutbox% |
301 |
|
|
\vrule \@height\z@ \@depth\@tempdima \@width\z@ \cr% |
302 |
|
|
\noalign{\global\addspace=#1}\nextline} |
303 |
|
|
|
304 |
|
|
% command will be called when \\[0pt] |
305 |
|
|
\def\@syargarraycr#1{\cr\noalign{\vskip #1\global\addspace=#1}\nextline} |
306 |
|
|
|
307 |
|
|
%%%% Redefine original LaTeX p-arg commands. %%%% |
308 |
|
|
%%%% New commands get a leading `s' %%%% |
309 |
|
|
|
310 |
|
|
% reduce maximum pagesize to have |
311 |
|
|
% a small tolerance for last entry |
312 |
|
|
\def\@sstartpbox#1{\global\advance\maxsize by -\pargcorrection |
313 |
|
|
\global\pargcorrection=0pt |
314 |
|
|
% put text into box to save height |
315 |
|
|
\setbox\tabparbox% |
316 |
|
|
\vtop\bgroup\hsize#1\@arrayparboxrestore} |
317 |
|
|
\def\@sendpbox{\par\vskip\dp\@arstrutbox\egroup% |
318 |
|
|
\computedimens=\ht\tabparbox% |
319 |
|
|
\advance\computedimens by \dp\tabparbox% |
320 |
|
|
\ifnum\parboxheight<\computedimens |
321 |
|
|
\global\parboxheight=\computedimens |
322 |
|
|
\fi |
323 |
|
|
\computedimens=0pt |
324 |
|
|
\box\tabparbox\hfil} |
325 |
|
|
|
326 |
|
|
%%%% Here start really new supertabular commands %%%% |
327 |
|
|
|
328 |
|
|
% estimate height of normal line |
329 |
|
|
% regarding \array- and \baselinestretch |
330 |
|
|
\def\calmidlineheight{\midlineheight=\arraystretch \baslineskp |
331 |
|
|
\global\advance\midlineheight by 1pt |
332 |
|
|
\global\pargcorrection=4\midlineheight} |
333 |
|
|
|
334 |
|
|
\def\calpage{\global\actsize=\pagetotal % where am I on the actual page? |
335 |
|
|
\twocolsize=\textheight % added 06.06.89 |
336 |
|
|
\advance\twocolsize by -\@colroom % " |
337 |
|
|
\advance\actsize by \twocolsize % " |
338 |
|
|
\global\advance\actsize by \midlineheight |
339 |
|
|
\maxsize=\textheight % start a new page when 90% of |
340 |
|
|
\multiply \maxsize by 9 % the page are used |
341 |
|
|
\divide\maxsize by 10 |
342 |
|
|
\ifnum\actsize > \maxsize |
343 |
|
|
\clearpage |
344 |
|
|
\global\actsize=\pagetotal |
345 |
|
|
\fi |
346 |
|
|
\maxsize=\textheight % now set \maxsize with tolerance |
347 |
|
|
\global\advance\maxsize by -\midlineheight} % of one lines |
348 |
|
|
% Here is the definition of supertabular |
349 |
|
|
|
350 |
|
|
% modified JB (15.2.91) |
351 |
|
|
\def\supertabular#1 {% % before it was \edef\tableformat, |
352 |
|
|
% but gave error with @{\hspace{..}} ! |
353 |
|
|
\def\tableformat{\string#1} % store preamble |
354 |
|
|
\global\starfalse % remember this is the normal version |
355 |
|
|
|
356 |
|
|
% Check if we have to insert a caption |
357 |
|
|
\if@topcaption\@process@tablecaption |
358 |
|
|
\fi |
359 |
|
|
|
360 |
|
|
\def\baslineskp{\baselineskip} |
361 |
|
|
\calmidlineheight% estimate height of a normal line |
362 |
|
|
\calpage % calculate max. pagesize and startpoint |
363 |
|
|
|
364 |
|
|
% save old \@tabularcr |
365 |
|
|
\let\@@tabularcr\@tabularcr% Added JB 4/2/91 |
366 |
|
|
% Now insert the definition of \@stabularcr |
367 |
|
|
\let\@tabularcr\@stabularcr |
368 |
|
|
% save old \\ |
369 |
|
|
\global\let\@oldcr=\\ |
370 |
|
|
|
371 |
|
|
% activate new parbox algorithm |
372 |
|
|
\let\@@startpbox=\@sstartpbox |
373 |
|
|
\let\@@endpbox=\@sendpbox |
374 |
|
|
% |
375 |
|
|
% Moved the check for the use of \tablefirsthead to befor the start of |
376 |
|
|
% the tabular environment in order to make the \futurelet inside \hline |
377 |
|
|
% do its work correctly (15.02.91) |
378 |
|
|
% |
379 |
|
|
\ifx\@table@first@head\undefined |
380 |
|
|
\let\@@tablehead=\@tablehead |
381 |
|
|
\else |
382 |
|
|
\let\@@tablehead=\@table@first@head |
383 |
|
|
\fi% Added JB 4/2/91 |
384 |
|
|
% start normal tabular environment |
385 |
|
|
\begin{tabular}{\tableformat}% |
386 |
|
|
\@@tablehead}% Added JB 15/2/91 |
387 |
|
|
|
388 |
|
|
% this is \end{supertabular} |
389 |
|
|
\def\endsupertabular{% |
390 |
|
|
\ifx\@table@last@tail\undefined% |
391 |
|
|
\@tabletail% |
392 |
|
|
\else% |
393 |
|
|
\@table@last@tail% |
394 |
|
|
\fi% Added JB 4/2/91 |
395 |
|
|
%removed JB \noalign{\global\let\\=\@oldcr}% |
396 |
|
|
% \let\@@startpbox=\@startpbox% |
397 |
|
|
% \let\@@endpbox=\@endpbox% |
398 |
|
|
\end{tabular} |
399 |
|
|
% restore old \@tabularcr |
400 |
|
|
\let\@tabularcr\@@tabularcr % Added JB 4/2/91 |
401 |
|
|
% Check if we have to insert a caption |
402 |
|
|
\if@topcaption |
403 |
|
|
\else |
404 |
|
|
\@process@tablecaption |
405 |
|
|
% resore to default behaviour |
406 |
|
|
\@topcaptiontrue |
407 |
|
|
\fi |
408 |
|
|
%+ |
409 |
|
|
% Restore the meaning of \verb=\\= to the one it had before the start |
410 |
|
|
% of this environment. Also re-initialize some control-sequences |
411 |
|
|
%- |
412 |
|
|
\global\let\\=\@oldcr |
413 |
|
|
\let\@table@first@head\undefined % For the next ocurrence |
414 |
|
|
\let\@table@last@tail\undefined % of this environment |
415 |
|
|
\let\@process@tablecaption\relax |
416 |
|
|
} |
417 |
|
|
% Here is the definition of supertabular* |
418 |
|
|
\newif\ifstar |
419 |
|
|
\newdimen\tabularwidth |
420 |
|
|
\@namedef{supertabular*}#1#2 {% modified JB (15.2.91) |
421 |
|
|
% before it was \edef\tableformat, |
422 |
|
|
% but gave error with @{\hspace{..}} ! |
423 |
|
|
\def\tableformat{\string#2} % store preamble |
424 |
|
|
\tabularwidth=#1 % The total width of the tabular |
425 |
|
|
\global\startrue % remember this is the *-version |
426 |
|
|
|
427 |
|
|
% Check if we have to insert a caption |
428 |
|
|
\if@topcaption\@process@tablecaption\fi |
429 |
|
|
|
430 |
|
|
\def\baslineskp{\baselineskip} |
431 |
|
|
\calmidlineheight% estimate height of a normal line |
432 |
|
|
\calpage % calculate max. pagesize and startpoint |
433 |
|
|
|
434 |
|
|
|
435 |
|
|
% save old \@tabularcr |
436 |
|
|
\let\@@tabularcr\@tabularcr% Added JB 4/2/91 |
437 |
|
|
% Now insert the definition of \@stabularcr |
438 |
|
|
\let\@tabularcr\@stabularcr% Added JB 4/2/91 |
439 |
|
|
% save old \\ |
440 |
|
|
\global\let\@oldcr=\\ |
441 |
|
|
|
442 |
|
|
% activate new parbox algorithm |
443 |
|
|
\let\@@startpbox=\@sstartpbox |
444 |
|
|
\let\@@endpbox=\@sendpbox |
445 |
|
|
% |
446 |
|
|
% The same modification as for \tabular 15.2.91 |
447 |
|
|
\ifx\@table@first@head\undefined |
448 |
|
|
\let\@@tablehead\@tablehead |
449 |
|
|
\else |
450 |
|
|
\let\@@tablehead\@table@first@head |
451 |
|
|
\fi% Added JB 4/2/91 |
452 |
|
|
% start normal tabular environment |
453 |
|
|
\begin{tabular*}{\tabularwidth}{\tableformat}% |
454 |
|
|
% |
455 |
|
|
%removed JB \noalign{\global\let\\=\@stabularcr} |
456 |
|
|
\@@tablehead}% |
457 |
|
|
% this is \end{supertabular*} |
458 |
|
|
\@namedef{endsupertabular*}{% |
459 |
|
|
\ifx\@table@last@tail\undefined% |
460 |
|
|
\@tabletail% |
461 |
|
|
\else% |
462 |
|
|
\@table@last@tail% |
463 |
|
|
\fi% Added JB 4/2/91 |
464 |
|
|
%removed JB \noalign{\global\let\\=\@oldcr}% |
465 |
|
|
\end{tabular*} |
466 |
|
|
% restore old \@tabularcr |
467 |
|
|
\let\@tabularcr\@@tabularcr |
468 |
|
|
% \let\@@startpbox=\@startpbox% |
469 |
|
|
% \let\@@endpbox=\@endpbox% |
470 |
|
|
% Check if we have to insert a caption |
471 |
|
|
\if@topcaption |
472 |
|
|
\else |
473 |
|
|
\@process@tablecaption |
474 |
|
|
% resore to default behaviour |
475 |
|
|
\@topcaptiontrue |
476 |
|
|
\fi |
477 |
|
|
%+ |
478 |
|
|
% Restore the meaning of \verb=\\= to the one it had before the start |
479 |
|
|
% of this environment. Also re-initialize some control-sequences |
480 |
|
|
%- |
481 |
|
|
\global\let\\=\@oldcr |
482 |
|
|
\let\@table@first@head\undefined % For the next ocurrence |
483 |
|
|
\let\@table@last@tail\undefined % of this environment |
484 |
|
|
\let\@process@tablecaption\relax} |
485 |
|
|
\def\nextline{% %%% algorithm to calculate the pagebreaks %%% |
486 |
|
|
\noalign{\ifnum\parboxheight=0 |
487 |
|
|
% if no p-arg add `normal' line height |
488 |
|
|
\advance\actsize by \midlineheight |
489 |
|
|
% \addspace is value #1 of \\[#1] |
490 |
|
|
\global\advance\actsize by \addspace |
491 |
|
|
\else |
492 |
|
|
% if p-arg add height of box and more |
493 |
|
|
\global\advance\actsize by \parboxheight |
494 |
|
|
\divide\parboxheight by 11\relax |
495 |
|
|
\global\advance\actsize by \parboxheight% |
496 |
|
|
\global\parboxheight=0pt |
497 |
|
|
\fi |
498 |
|
|
\global\addspace=0pt}% |
499 |
|
|
% when page becomes full: |
500 |
|
|
\ifnum\actsize<\maxsize |
501 |
|
|
% |
502 |
|
|
% This line is necessary because the tablehead has to be inserted *after* |
503 |
|
|
% the \if\else\fi-clause. For this purpose \next is used. In the middle |
504 |
|
|
% of tableprocessing it shoud be an *empty* macro (*not* \relax). |
505 |
|
|
% (15.2.91) |
506 |
|
|
\noalign{\global\let\next\@empty} |
507 |
|
|
\else |
508 |
|
|
% output \tabletail, close tabular |
509 |
|
|
% output all material and start a |
510 |
|
|
% fresh new page |
511 |
|
|
\@tabletail |
512 |
|
|
\ifstar% % Added 16-10-90 |
513 |
|
|
\end{tabular*}% |
514 |
|
|
\else% |
515 |
|
|
\end{tabular}% |
516 |
|
|
\fi |
517 |
|
|
\if@twocolumn% % added 10.05.89 |
518 |
|
|
\if@firstcolumn% % |
519 |
|
|
\newpage% % |
520 |
|
|
\else% % |
521 |
|
|
\clearpage% % |
522 |
|
|
\fi% % |
523 |
|
|
\twocolsize=\textheight% % added 06.06.89 |
524 |
|
|
\advance\twocolsize by -\@colroom% % " |
525 |
|
|
\global\actsize=\twocolsize% % " |
526 |
|
|
\else % |
527 |
|
|
\clearpage % |
528 |
|
|
\global\actsize=\midlineheight% |
529 |
|
|
\fi % |
530 |
|
|
\let\next\@tablehead% % Added 15.2.91 |
531 |
|
|
\ifstar% % Added 16-10-90 |
532 |
|
|
\begin{tabular*}{\tabularwidth}{\tableformat}% |
533 |
|
|
\else% |
534 |
|
|
\begin{tabular}{\tableformat}% |
535 |
|
|
\fi% |
536 |
|
|
%removed JB \noalign{\global\let\\=\@stabularcr} % added 10.05.89 |
537 |
|
|
%removed JB \@tablehead% |
538 |
|
|
\fi\next}% % Added \next 15.2.91 |
539 |
|
|
|
540 |
|
|
% stuff for table footnotes |
541 |
|
|
\def\tablenotemark#1{\rlap{$^{\rm #1}$}} |
542 |
|
|
\newtoks\@temptokenb |
543 |
|
|
\def\tblnote@list{} |
544 |
|
|
\def\tablenotetext#1#2{ |
545 |
|
|
\@temptokena={\vspace{.5ex}{\noindent\llap{$^{#1}$}#2}\par} |
546 |
|
|
\@temptokenb=\expandafter{\tblnote@list} |
547 |
|
|
\xdef\tblnote@list{\the\@temptokenb\the\@temptokena}} |
548 |
|
|
\def\spew@tblnotes{ |
549 |
|
|
\ifx\tblnote@list\@empty\relax |
550 |
|
|
\else |
551 |
|
|
\vspace{4.5ex} |
552 |
|
|
\footnoterule |
553 |
|
|
\vspace{.5ex} |
554 |
|
|
{\footnotesize\tblnote@list} |
555 |
|
|
\gdef\tblnote@list{} |
556 |
|
|
\fi} |
557 |
|
|
\def\endtable{\spew@tblnotes\end@float} |
558 |
|
|
\@namedef{endtable*}{\spew@tblnotes\end@dblfloat} |
559 |
|
|
\let\tableline=\hline |
560 |
|
|
\long\def\@makecaption#1#2{\vskip 2ex\noindent #1 #2\par} |
561 |
|
|
\def\tablenum#1{\def\thetable{#1}\let\@currentlabel\thetable |
562 |
|
|
\addtocounter{table}{\m@ne}} |
563 |
|
|
|