4 \ifcat a\noexpand @\let\next\relax\else \def\next{%
5 \documentclass{kluwer}\usepackage{doc}\MakePercentIgnore}\fi\next
6 \def\filedate{1998/03/13}
7 %\changes{1997/07/10}{Fixes in @klu@caption: inserted [b] and moved
8 % kaprotate code from the else to after the fi.}
9 \def\filename{klufloa.sty}
10 %\DoNotIndex{\@M,\def,\c@secnumdepth,\baselineskip,\@pnumwidth,\else,\fi}
11 %\DoNotIndex{\newcommand,\z@,\relax,\renewcommand,\ifnum,\csname,\endcsname}
12 %\DoNotIndex{\baselineskip,\vskip,\hskip,\relax,\secdef,\gdef,\@cla,\@clb}
13 %\DoNotIndex{\normalsize,\protect,\global,\setbox,\hbox,\vbox,\endinput}
14 %\DoNotIndex{\egroup,\endgroup,\bgroup,\begingroup,\let}
16 %\newcommand{\Bs}{$\backslash$}
21 %\setlength{\marginparwidth}{0in}
22 %\addtolength{\textwidth}{4pc}
27 %\author{T. \surname{Hoekwater}}
28 %\institute{Kluwer Academic Publishers, Dordrecht}
30 % This internal stylefile takes care of floats and the |kaprotate| macro's \\
33 %{\bf Disclaimer:} This stylefile is to be used by Kluwer Academic
34 % Publishers in the contruction of full class files. Therefore, the
35 % user interface is not very high-level, and is definately not meant
36 % for normal usage. This stylefile is provided {\bf as is}, i.e. we
37 % accept no responsibilities whatsoever. You are free to use this file
38 % in any way you like, provided you do not make {\it any\/} changes.
39 % If you {\it do\/} make changes, you have to rename the changed file.
43 %\newpage\section{Usage}
44 % At this moment, there are three float environments done here:
45 % |table|, |figure| (with their starred and sub... forms) and |algorithm|.
48 % In order to facilitate customization, the following commands are
51 % \def\pitem[#1]{\item[\ttfamily\string #1]\SpecialUsageIndex{#1}}
53 %\pitem[\tabwidth] Allows setting the width of a table that has to be
54 %centered, but does not contain a |tabular| or |TABULAR|. Also,
55 %it might be handy for tables that contain more than one |tabular|.
56 %(e.g. |\tabwidth{20pc}|)
57 %\pitem[\tabfont] Font specification for the main text of tables.\\
58 % (default value |\footnotesize|)
59 %\pitem[\tabcapfont] Font specification for table captions.
60 % (default value |\footnotesize|)
61 %\pitem[\figcapfont] Font specification for caption of figures. There is no
62 % definition for the font of the text of figures.
63 % (defaultvalue |\footnotesize|)
64 %\pitem[\tableindent] Indentation for tables.
65 % (default given by stylefile)
66 % Tables and figures can be either indented over a specified width, or
67 % centered. This can be done independent of each other, but both
68 % always use the same indentation. i.e: You cannot
69 % have figures indented 4 picas and tables 2 picas, but you can have
70 % indented tables with centered figures.
71 %\pitem[\figindent] Indentation for figures. From the note above for these
72 %two commands it follows that if both are given, they have to set the same
73 % value. If they don't, the last given value will prevail.
74 % (default given by stylefile)
75 %\pitem[\figtabdot] The dot after the number. (default value |.|)
76 %\pitem[\captionskip] Vertical skip between caption and main body of float.
78 %\pitem[\tabcapspace] Space between heading of caption and
79 %text of caption. This is a vertical or horizontal skip, depending on
80 %whether captions are split or not. Default value .5em.
81 %\pitem[\splittabcaptions] Splits the table captions in two parts.
82 %\pitem[\splitfigcaptions] Splits the figure captions in two parts.
83 %\pitem[\splitcaptions] Combines both.
84 %\pitem[\indentedcaptions] Ordinarily, captions are centered above or below
85 %the float. This setting allows you to specify a specific indentation.
86 %\pitem[\captionindent] Value used for the previous option The default value
87 %is 0pt (appears to make most sense).
92 %\newpage\section{Implementation}
94 % The |klutab| is necesarry here, because we need the definitions
95 % of tabular \& co that set the correct widths. It also makes sure that
96 % these two are nicely tied in to eachother (version control problems).
99 \NeedsTeXFormat{LaTeX2e}
100 \ProvidesPackage{klufloa}[\filedate ]
101 \RequirePackage{klutab}[1997/05/30]
103 %\subsection{Float parameters}
104 % These are standard as in \LaTeXe.
106 \setcounter{topnumber}{2}
107 \setcounter{bottomnumber}{1}
108 \setcounter{totalnumber}{3}
109 \setcounter{dbltopnumber}{2}
111 % The parameters below try to ensure that there are not so many float
112 % pages. (prevents empty white space).
114 % In the old stylefiles,
115 % |\topfraction| was $.99$, but that was bit to much, resulting in
116 % pages with a huge float and only two text lines. Now a float has
117 % to be $>.85$|\textheight| before it will result in a float page.
118 % (oversimplified, but this is the general idea). This leaves
119 % space on the page for a few more textlines.
121 % |\bottomfraction| used to be $.3$, but that is to small for almost
122 % any float this style generates; there are split captions and tabnotes
123 % to account for, so the value has increased a bit.
125 \renewcommand{\topfraction}{.85}
126 \renewcommand{\textfraction}{.01}
127 \renewcommand{\bottomfraction}{.4}
128 \renewcommand{\floatpagefraction}{.84}
129 \renewcommand{\dblfloatpagefraction}{.84}
130 \renewcommand{\dbltopfraction}{.7}
133 % \subsection{Helper macros}
134 % |\figtabdot| serves the same purpose as |\sectiondot| elsewhere,
136 % names of various strings.
139 \def\tablename{Table}%
140 \def\figurename{Figure}%
141 \def\algorithmname{Algorithm}%
143 % |\maxfloatwidth| is the allowed width of the table.\\
144 % (If this is a rotated table or figure, it will use all of the
145 % page. Of course, |\maxfloatwidth| then is |\textheight|.)\\
146 % |\figtabbox| will contain the total float as a vbox.
147 % |\floatindent| is the indentation skip for indented tables \& figures.
148 % The last defined value will overwrite the previous one.\\
149 % |\@tabskip| is an aid in helping to decide indentation of rotated tables.\\
150 % |\cap@type| is an aid in keeping track of caption types\\
151 % |\captionskip| is the vertical skip between caption and main body.
153 \newdimen\maxfloatwidth
155 \newdimen\floatindent
158 \newdimen\captionskip
159 \setlength\captionskip{6pt}
164 % supposed to contain the width of the table. (the width of |\figtabbox| is
165 % probably either |\textwidth| or zero.) |tabular| and |TABULAR| from
167 % this value automatically, but so should every |table|. If your table
168 % does not contain a |tabular|, you can set this value yourself:
169 % just say |\tabwidth{..}| somewhere in your table. Your text will
170 % be typeset inside a |\vbox| with width |\maxfloatwidth|.
173 \setlength\@tabwidth{\textwidth}
174 \def\tabwidth#1{\global\setlength\@tabwidth{#1}}
177 % |\@getindent| calculates the value of |\maxfloatwidth|,
178 % It is called from figure and table.
180 % For rotated floats, |\maxfloatwidth| == |\vsize|. The use
181 % of |\vsize| here is probably
182 % better than |\textheight|, because it allows use of minipages and
183 % |\vbox|es to get special effects (where |\textheight| $>$ |\vsize|).
185 % |\@floatcorrect| fixes indentation for rotated floats. This and\\
186 % |\hbox@to@floatwidth| are just shortcuts.
188 \def\@getmaxwidth{\maxfloatwidth=\hsize
189 \if@kaprotate \maxfloatwidth=\textheight \fi }
190 \def\@floatcorrect{\if@kaprotate\else
191 \advance\maxfloatwidth -\floatindent \fi }
192 \def\hbox@to@floatwidth#1{\leavevmode
193 \hbox to \@tabwidth{#1}}
196 % |\@getindent| calculates the values for |\@tabskip| and
197 % |\@floatindent|. The first check initializes |\@tabwidth| for
198 % anything except tables. The macro\\ |\@centeredfloat| does the
199 % hard work for centered floats, where |\floatindent| is not given
203 \ifnum\cap@type=2 \else
204 \@tabwidth=\if@kaprotate \textheight \else \hsize \fi
205 \if@figindent\advance \@tabwidth -\floatindent \fi\fi
207 \if@figindent \@tabskip\floatindent
208 \else \@centeredfloat \fi
209 \else \ifnum\cap@type=2
210 \if@tabindent \@tabskip\floatindent
211 \else \@centeredfloat \fi
212 \ifdim \@tabwidth > \maxfloatwidth
223 % |\@centeredfloat|\\
224 % Calculate |\@tabskip| for centering. In this macro, we know the
225 % float will be centered. We calculate |\floatindent| ourselves from
228 % We need to maintain this indentation for rotated floats (so they
229 % will be vertically centered), but |\@tabskip| needs to be re-done.
232 \def\@centeredfloat{%
233 \floatindent\maxfloatwidth
234 \advance\floatindent by -\@tabwidth
235 \divide\floatindent by 2
236 \@tabskip\floatindent
239 \advance\@tabskip by -\ht\figtabbox
240 \advance\@tabskip by -\dp\figtabbox
241 \divide\@tabskip by 2
246 % \subsection{Table caption commands}
247 % Here is the code for the captions.
250 % |\indentedcaptions| is a user option that indents captions instead
251 % (over a default value of 0pt).
253 \newif\if@centeredfigcaption
254 \newif\if@centeredtabcaption
255 \@centeredtabcaptiontrue
256 \@centeredfigcaptiontrue
257 \def\indentedtabcaptions{\global\@centeredtabcaptionfalse }
258 \def\indentedfigcaptions{\global\@centeredfigcaptionfalse }
259 \def\indentedcaptions{\global\@centeredtabcaptionfalse
260 \global\@centeredfigcaptionfalse}
261 \newdimen\captionindent
262 \setlength\captionindent{0pt}
263 \newtoks\@floatcaption
264 \def\tabcapspace{.5em}
265 \def\tabcapfont{\footnotesize }
266 \long\def\@maketabcaption#1#2{\global\@floatcaption={#2}%
267 \message{\tablename\space\thetable \if@kaprotate
268 \space(rotated) \fi}}
271 % Captions are centered above the table by default.\footnote{
272 % In real life, {\tt @klu@caption} would be called {\tt make@caption},
273 % since these do the typesetting}. This code is called from |\endtable|.
276 \setbox1=\hbox{\tabcapfont\fnum@table\hskip\tabcapspace
279 \ifdim\wd1 >\@tabwidth
280 {\if@centeredtabcaption\centering\else \hskip \captionindent\fi
281 \parbox[b]{\@tabwidth}{\tabcapfont\unhbox1}}%
283 \hbox to \@tabwidth{%
284 \if@centeredtabcaption \hfil \else \hskip \captionindent\fi
285 \tabcapfont\fnum@table
286 \hskip\tabcapspace{\tabcapfont\the\@floatcaption}\hfil }%
288 \if@kaprotate \else \par \vskip -\baselineskip \fi
291 \def\@klu@figcaption{%
292 \setbox1=\hbox{\figcapfont\fnum@figure\hskip\tabcapspace
295 \ifdim\wd1 >\@tabwidth
296 {\if@centeredfigcaption\centering\else \hskip \captionindent\fi
297 \parbox{\@tabwidth}{\figcapfont\unhbox1}}%
299 \hbox to \@tabwidth{%
300 \if@centeredfigcaption \hfil\else \hskip \captionindent\fi
301 \tabcapfont\fnum@figure
302 \hskip\tabcapspace{\figcapfont\the\@floatcaption}\hfil}%
308 % |\splitcaptions| is a user option to generate a caption in which the
309 % `Table 1' is separated from the caption text. The resulting
310 % definitions depend on being inside a
313 \def\splitcaptions{\splittabcaptions\splitfigcaptions}
314 \def\splittabcaptions{
316 \setbox1=\hbox{\tabcapfont\the\@floatcaption}%
318 \ifdim\wd1 >\@tabwidth
319 \hbox to \@tabwidth{\if@centeredtabcaption\hss\else
320 \hskip\captionindent\fi
321 \tabcapfont\fnum@table\hss}\vskip \tabcapspace
323 {\if@centeredtabcaption\centering\fi
324 \hskip \captionindent
325 \parbox{\@tabwidth}{\tabcapfont\unhbox1}}%
327 \hbox to \@tabwidth{%
328 \if@centeredtabcaption \hfil\else \hskip\captionindent\fi
329 \tabcapfont\fnum@table\strut\hfil }\vskip \tabcapspace
330 \hbox to \@tabwidth{%
331 \if@centeredtabcaption \hfil\else \hskip\captionindent \fi
332 \tabcapfont\the\@floatcaption \hfil }%
333 \if@kaprotate \else \par \vskip -\baselineskip \fi
337 \def\splitfigcaptions{\def\@klu@figcaption{%
338 \setbox1=\hbox{\figcapfont\the\@floatcaption}%
340 \ifdim\wd1 >\@tabwidth
341 \hbox to \@tabwidth{\if@centeredfigcaption\hfil\else
342 \hskip\captionindent\fi
343 \figcapfont\fnum@figure\hfil}\vskip \tabcapspace
345 {\if@centeredfigcaption\centering\fi \hskip \captionindent
346 \parbox{\@tabwidth}{\figcapfont\unhbox1}}%
348 \hbox to \@tabwidth{%
349 \if@centeredfigcaption \hfil\else \hskip\captionindent\fi
350 \figcapfont\fnum@figure\strut\hfil }\vskip \tabcapspace
351 \hbox to \@tabwidth{%
352 \if@centeredfigcaption \hfil\else \hskip\captionindent\fi
353 \figcapfont\the\@floatcaption \hfil }%
360 % Standard \LaTeX\ definitions first:
362 % |\newcounter| removed 7/6/96 to prevent errors when used as package.
363 % (`counter |\c@table| already defined')
365 \@ifundefined{thetable}{\newcounter{table}}{}
366 \def\thetable{\arabic{table}}
370 \def\fnum@table{\tablename~\thetable\figtabdot}
372 % Now the switch to control indentation.
375 \newif\if@tabindent \@tabindentfalse
377 \global\floatindent= #1\global\@tabindenttrue }
379 % Default font for tables.
380 % This could also be used to redefine the font
381 % defaults like family and shape.
383 \def\tabfont{\footnotesize}
385 % |\tabnotes| is intended to be used as `footnote' to a tabular
386 % environment. |\@tabnotes| will be cleared before every table.
390 \def\tabnotemark{\ensuremath{^{\thetabnote}}}
391 \def\thetabnote{\arabic{tabnote}}
392 \def\tabnotesep{\par}
393 \def\tabnote#1{\stepcounter{tabnote}%
394 \rlap{\tabnotemark }%
396 \let\tabnotesep\relax
397 \xdef\@tabnotes{\@tabnotes\tabnotesep \tabnotemark #1\par}%
399 \long\def\tabnotes#1{\gdef\@tabnotes{{\tabfont\noindent #1\par}}}
401 % Now for the macro's that set the table itself. Just to recall: \\[6pt]
402 %|\maxfloatwidth|== max. width of table\\
403 %|\@tabskip|== horizontal offset\\
404 %|\floatindent|==indent before table proper\\
405 %|\@tabnotes|==macro containing tabnotes (in Tabfont)\\
406 %|\figtabbox|==vbox containing table (minus caption \& tabnotes)
408 % Non-rotated version:\\
409 % Check width of caption. If it is too wide to fit on one line, put it
410 % in a |\parbox| with proper |\floatindent| before it.
413 \def\@setnotrotatedtabbox{%
414 \setbox4=\hbox to \maxfloatwidth{\vbox{\hsize=\maxfloatwidth
416 \vskip\captionskip \leavevmode
417 \unvbox\figtabbox\par
418 \noindent\parbox{\@tabwidth}{\tabfont\@tabnotes}\par}}%
419 \if@fixedfloat\calc@fixedspace4\fi
420 \noindent\kern \floatindent\box4
423 % Rotated version. We are inside a |\vbox| here, so we typeset 3
424 % hboxes (and a |\vskip|).
426 % |\maxfloatwidth| is |\textheight| here, causing overfull boxes.
429 \def\@setrotatedtabbox{\begingroup \hfuzz=\vsize
430 \setbox2\hbox to \textheight{\hfil
431 \vbox to \hsize{\hsize=\vsize
433 \hbox{\hbox@to@floatwidth{\vbox{\@klu@caption }}}
435 \hbox{\hbox@to@floatwidth{\box\figtabbox\hss}}%
436 \hbox{\hbox@to@floatwidth{\parbox{\@tabwidth}{\tabfont\@tabnotes}\hfil }}%
438 }\hss}\rotl{2}\endgroup
441 % |\@makecaption| will be |\let| to |\@maketabcaption| in for the
442 % duration of the table.
444 % This is quite simple code, apart from handling the optional argument
445 % ourselves. |kaprotate| effectively kills Overfull and Underfull
446 % hbox-es. I don't like that, but I also don't like the messages I
447 % always get (Overfull hbox with width = |\textheight| $-$ |\textwidth|).
449 \def\table{\let\@makecaption\@maketabcaption
450 \global\@floatcaption={}%
451 \gdef\@tabnotes{}\setcounter{tabnote}{0}\gdef\cap@type{2}%
452 \@ifnextchar[{\t@blewithoptions}{\t@blewithoptions[tbp]}}
453 \def\t@blewithoptions[#1]{%
454 \if H#1\@fixedtable \else \@float{table}[#1]\fi
455 \@getmaxwidth \if@tabindent \@floatcorrect \fi
456 \setbox\figtabbox\vbox\bgroup\tabfont
457 \if@kaprotate\hfuzz=\vsize\fi }%
460 % This |\hfuzz| is a bit more precise. At least ik will warn if the
461 % tabular itself is too large.
463 \def\endtable{\egroup \@getindent
464 \gdef\cap@type{0}\noindent
466 \if@kaprotate \@setrotatedtabbox
467 \else \@setnotrotatedtabbox \fi
468 \if@fixedfloat \vskip\intextsep \@fixedfloatfalse
472 %\subsection{Table starred}
473 % This code is basically identical to the code above.
474 % Multicolumn `Here' floats in twocolumn layout don't work, for obvious
475 % reasons. If you need something like that, fake it with the
478 \@namedef{table*}{\let\@makecaption\@maketabcaption
479 \global\@floatcaption={}%
480 \gdef\@tabnotes{}\setcounter{tabnote}{0}\gdef\cap@type{2}%
481 \@ifnextchar[{\dt@blewithoptions}{\dt@blewithoptions[tbp]}}
482 \def\dt@blewithoptions[#1]{%
483 \if H#1\if@twocolumn \@dblfloat{table}[t]\else \@fixedtable\fi
484 \else \@dblfloat{table}[#1]\fi
485 \@getmaxwidth \if@tabindent \@floatcorrect \fi
486 \setbox\figtabbox\vbox\bgroup\tabfont
487 \if@kaprotate \hfuzz=\vsize \fi }%
491 \@namedef{endtable*}{\egroup \@getindent
492 \gdef\cap@type{0}\noindent
494 \if@kaprotate \@setrotatedtabbox
495 \else \@setnotrotatedtabbox \fi
496 \if@fixedfloat \vskip\intextsep \@fixedfloatfalse
497 \else \end@dblfloat \fi
500 % \subsection{fixed point tables and figures}
501 % The fixedtable option. If there is enough room on the page, the
502 % box is typeset right away. If there is not enough space, the page is
503 % ended and the box is typeset at the top of the next page. This may
504 % conflict with following `top' floats, but the exact location in
505 % the text is maintained.
507 % Don't try to use |[H]| on rotated tables, and twocolumn will produce
508 % overlapping text in the second column, also, these will not appear
509 % in a `list of tables' unless you specifically ask that.
512 \def\@fixedtable{\vskip\intextsep \@fixedfloattrue
513 \def\caption{\@ifnextchar[{\f@xedcap{table}}%
514 {\f@xedcap{table}[]}}}
515 \def\@fixedfigure{\vskip\intextsep \@fixedfloattrue
516 \def\caption{\@ifnextchar[{\f@xedcap{figure}}%
517 {\f@xedcap{figure}[]}}}
518 \def\f@xedcap#1[#2]#3{\refstepcounter{#1}\def\@tempa{#2}%
520 \else \addcontentsline{\csname ext@#1\endcsname}{#1}{#2}\fi
521 \message{#1\space\csname the#1\endcsname \space (fixed)}%
522 \global\@floatcaption={#3}}
523 \def\calc@fixedspace#1{%
526 \advance\@tempdimb \ht#1
527 \advance\@tempdima -\pagetotal
528 \advance\@tempdima -2\intextsep
529 \wlog{pageleft= \the\@tempdima,
530 size= \the\@tempdimb }%
531 \ifdim\@tempdima>\@tempdimb \else \newpage \fi}
534 %\newpage \subsection{Figure}
535 % Now we are going to do this all over again for
536 % figures. Documentation will only mark important differences.
541 \@ifundefined{thefigure}{\newcounter{figure}}{}
542 \def\thefigure{\arabic{figure}}
546 \def\fnum@figure{\figurename~\thefigure\figtabdot}
548 % Indentation, font and caption.
550 \newif\if@figindent \@figindentfalse
552 \global\floatindent #1
553 \global\@figindenttrue }
554 \def\figcapfont{\footnotesize}
555 \long\def\@makefigcaption#1#2{%
556 \message{\figurename\space\thefigure
557 \if@kaprotate \space (rotated)\fi }%
558 \global\@floatcaption={#2}}
561 % The |fixed| option.
565 % The figure environment itself.
569 \let\@makecaption\@makefigcaption
570 \global\@floatcaption={}%
571 \@ifnextchar[{\f@gurewithoptions}{\f@gurewithoptions[tbp]}}%
572 \def\f@gurewithoptions[#1]{%
573 \let\saved@centerline\centerline
574 \if H#1\@fixedfigure \else \@float{figure}[#1]\fi
575 \@getmaxwidth \if@figindent \@floatcorrect
576 \def\centerline##1{##1}\fi
577 \setbox\figtabbox\vbox\bgroup }%
578 \def\endfigure{\egroup
579 \@getindent \gdef\cap@type{0}%
581 \if@kaprotate \@setrotatedfigbox \pagebreak
582 \else \@setnotrotatedfigbox \fi
583 \let\centerline\saved@centerline
584 \if@fixedfloat \vskip\intextsep \@fixedfloatfalse
588 % \subsection{figure starred}
592 \let\@makecaption\@makefigcaption
593 \global\@floatcaption={}%
594 \@ifnextchar[{\df@gurewithoptions}{\df@gurewithoptions[ttp]}}
595 \def\df@gurewithoptions[#1]{%
596 \let\saved@centerline\centerline
597 \if H#1 \@fixedfigure \else \@dblfloat{figure}[#1]\fi
598 \@getmaxwidth \if@figindent \@floatcorrect
599 \def\centerline##1{##1}\fi
600 \setbox\figtabbox\vbox\bgroup }%
601 \@namedef{endfigure*}{\egroup
602 \@getindent \gdef\cap@type{0}%
604 \if@kaprotate \@setrotatedfigbox
605 \else \@setnotrotatedfigbox \fi
606 \let\centerline\saved@centerline
607 \if@fixedfloat \vskip\intextsep \@fixedfloatfalse
608 \else \end@dblfloat \fi
611 % Non-rotated version (in figures |\caption| is done last):
613 \def\@setnotrotatedfigbox{%
614 \setbox4=\hbox to \maxfloatwidth{\vbox{\hsize=\maxfloatwidth
618 \if@fixedfloat\calc@fixedspace4 \fi
619 \noindent\kern \floatindent\box4
625 \def\@setrotatedfigbox{%
626 \setbox2\vbox to \hsize{\hsize=\textheight
628 \vrule width \textheight height 0pt depth 0pt\par
630 \hbox to \textheight{\hss\box\figtabbox\hss}%
632 \hbox to \textheight{\vbox{\@klu@figcaption }}
636 %\newpage \subsection{Algorithm}
637 % This is a `standard' float.
639 \newcounter{algorithm}
640 \def\thealgorithm{\arabic{algorithm}}
641 \def\fps@algorithm{tbp}
642 \def\ftype@algorithm{4}
643 \def\ext@algorithm{lof}
644 \long\def\@makealgocaption#1#2{%
645 \hbox to \hsize{\parbox[t]{\hsize}{{\vskip 1ex \tabcapfont
647 \def\fnum@algorithm{\algorithmname\space \thealgorithm}
648 \def\algorithm{\let\@makecaption\@makealgocaption
649 \@float{algorithm}\footnotesize\obeyspaces\obeylines}
650 \let\endalgorithm\end@float
652 %\subsection{subtable and subfigure}
653 % These are the sub... environments. If you need comment on what
654 % happens, please see |kluthm.sty|, definition of |subequation|.
656 \def\subtable{\@ifnextchar[{\@subtable}{\@subtable[alph]}}
657 \def\@subtable[#1]{\refstepcounter{table}%
658 \def\@testoption{arabic}\def\@testparam{#1}%
660 \edef\old@table{\the\c@table}%
661 \edef\old@thetable{\thetable}%
662 \setcounter{table}{0}%
663 \ifx\@testoption\@testparam
664 \def\thetable{\old@thetable.\csname #1\endcsname{table}}%
666 \def\thetable{\old@thetable\csname #1\endcsname{table}}%
668 \def\endsubtable{\setcounter{table}{\old@table}%
669 \endgroup \global\@ignoretrue}
670 \def\subfigure{\@ifnextchar[{\@subfigure}{\@subfigure[alph]}}
671 \def\@subfigure[#1]{\refstepcounter{figure}%
672 \def\@testoption{arabic}\def\@testparam{#1}%
674 \edef\old@figure{\the\c@figure}%
675 \edef\old@thefigure{\thefigure}%
676 \setcounter{figure}{0}%
677 \ifx\@testoption\@testparam
678 \def\thefigure{\old@thefigure.\csname #1\endcsname{figure}}%
680 \def\thefigure{\old@thefigure\csname #1\endcsname{figure}}%
682 \def\endsubfigure{\setcounter{figure}{\old@figure}%
683 \endgroup \global\@ignoretrue}
685 % \subsection{kaprotate}
686 % This appears to be an afterthought now, but in fact it is a quite
687 % handy command. The environment is defined in this file, because
688 % this reflects common usage, and this allows loading as a package
693 \newif\if@kaprotate \@kaprotatefalse
694 \def\kaprotate{\global\@kaprotatetrue}
695 \def\endkaprotate{\global\@kaprotatefalse}
699 % \subsubsection{Rotation macros}
700 % These are used in the |kaprotate| environment. Note that these
701 % macros depend on PostScript output at this moment. Later,
702 % I might include commands for (at least) Tpic.
704 % These are just a few macro's, so it isn't really worth including |graphicx|
707 % |\rotl| and |\rotr| rotate a given box over resp. 270 and 90 degrees
708 % while typesetting that box. The new box has $wd_{new}=dp_1 + ht_1$ and
709 % $ht_{new}=wd_1$, with $dp_{new} ==0$.
712 \def\rotstart#1{\special{ps: gsave currentpoint currentpoint translate
713 #1 neg exch neg exch translate}}
714 \def\rotfinish{\special{ps: currentpoint grestore moveto}}
715 \def\rotl#1{\rotdimen=\ht#1\advance\rotdimen by \dp#1
716 \hbox to \rotdimen{\vbox to\wd#1{\vskip \wd#1
717 \rotstart{270 rotate}\box #1\vss}\hss}\rotfinish}
718 \def\rotr#1{\rotdimen=\ht #1\advance\rotdimen by \dp#1
719 \hbox to \rotdimen{\vbox to \wd#1{\vskip \wd#1
720 \rotstart{90 rotate}\box #1\vss}\hss}\rotfinish}
724 %\def\IndexParms{\hbadness=10000}