| 1 |
%% |
| 2 |
%% This is file `float.sty', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% float.dtx (with options: `package') |
| 8 |
%% |
| 9 |
%% IMPORTANT NOTICE: |
| 10 |
%% This file is a stripped version of `float.dtx', |
| 11 |
%% copyright (c) 1991-2000 Anselm Lingnau |
| 12 |
%% ([email protected]) |
| 13 |
%% |
| 14 |
%% This file may only be distributed together with the corresponding |
| 15 |
%% `float.dtx' file. See `float.dtx' for distribution conditions on |
| 16 |
%% the original source. |
| 17 |
%% |
| 18 |
%% Package `float' to use with LaTeX 2e |
| 19 |
%% Copyright (C) 1991-2000 Anselm Lingnau, all rights reserved |
| 20 |
%% |
| 21 |
\NeedsTeXFormat{LaTeX2e}[1999/12/01] |
| 22 |
\ProvidesPackage{float} |
| 23 |
[2001/11/08 v1.3d Float enhancements (AL)] |
| 24 |
\newcounter{float@type} |
| 25 |
\@ifundefined{c@figure}% |
| 26 |
{\setcounter{float@type}{1}}% |
| 27 |
{\setcounter{float@type}{4}} |
| 28 |
\newcommand\floatstyle[1]{\@ifundefined{fs@#1}% |
| 29 |
{\float@error{#1}}% |
| 30 |
{\def\float@style{#1}}} |
| 31 |
\newcommand\float@error[1]{\PackageError{float}{% |
| 32 |
Unknown float style `#1' |
| 33 |
}{\@eha}} |
| 34 |
\newcommand\floatname[2]{\@namedef{fname@#1}{#2}} |
| 35 |
\newcommand\floatplacement[2]{\@namedef{fps@#1}{#2}} |
| 36 |
\newcommand\floatevery[2]{\csname @float@every@#1\endcsname={#2}} |
| 37 |
\newcommand\restylefloat{\@ifstar\float@restyle@\float@restyle} |
| 38 |
\newcommand\float@restyle@[1]{\float@restyle{#1}% |
| 39 |
\expandafter\let\csname @float@c@#1\endcsname=\@caption} |
| 40 |
\newcommand\float@restyle[1]{\expandafter\edef\csname |
| 41 |
fst@#1\endcsname{\expandafter\noexpand\csname |
| 42 |
fs@\float@style\endcsname}% |
| 43 |
\@namedef{#1}{\@nameuse{fst@#1}% |
| 44 |
\@float@setevery{#1}\@float{#1}}% |
| 45 |
\@namedef{#1*}{\@nameuse{fst@#1}% |
| 46 |
\@float@setevery{#1}\@dblfloat{#1}}% |
| 47 |
\expandafter\let\csname end#1\endcsname\float@end |
| 48 |
\expandafter\let\csname end#1*\endcsname\float@dblend |
| 49 |
\expandafter\let\csname @float@c@#1\endcsname=\float@caption |
| 50 |
\@ifundefined{@float@every@#1}{% |
| 51 |
\expandafter\newtoks\csname @float@every@#1\endcsname}{}% |
| 52 |
\@nameuse{@float@every@#1}={}} |
| 53 |
\newtoks\float@exts |
| 54 |
\newcommand\newfloat[3]{\@namedef{ext@#1}{#3} |
| 55 |
\let\float@do=\relax |
| 56 |
\xdef\@tempa{\noexpand\float@exts{\the\float@exts \float@do{#3}}}% |
| 57 |
\@tempa |
| 58 |
\floatplacement{#1}{#2}% |
| 59 |
\@ifundefined{fname@#1}{\floatname{#1}{#1}}{} |
| 60 |
\expandafter\edef\csname ftype@#1\endcsname{\value{float@type}}% |
| 61 |
\addtocounter{float@type}{\value{float@type}} |
| 62 |
\restylefloat{#1}% |
| 63 |
\expandafter\edef\csname fnum@#1\endcsname% |
| 64 |
{\expandafter\noexpand\csname fname@#1\endcsname{} |
| 65 |
\expandafter\noexpand\csname the#1\endcsname} |
| 66 |
\@ifnextchar[{\float@newx{#1}}% |
| 67 |
{\@ifundefined{c@#1}{\newcounter{#1}\@namedef{the#1}{\arabic{#1}}}% |
| 68 |
{}}} |
| 69 |
\def\float@newx#1[#2]{\@ifundefined{c@#1}{\newcounter{#1}[#2]% |
| 70 |
\expandafter\edef\csname the#1\endcsname{% |
| 71 |
\expandafter\noexpand\csname |
| 72 |
the#2\endcsname.\noexpand\arabic{#1}}}% |
| 73 |
{\PackageWarning{float}{Can't redefine counter variable for #1.}}} |
| 74 |
\let\@float@Hx\@xfloat |
| 75 |
\def\@xfloat#1[{\@ifnextchar{H}{\@float@HH{#1}[}{\@float@Hx{#1}[}} |
| 76 |
\newsavebox\float@box |
| 77 |
\newif\if@flstyle |
| 78 |
\def\@float@HH#1[H]{% |
| 79 |
\expandafter\let\csname end#1\endcsname\float@endH |
| 80 |
\let\@currbox\float@box |
| 81 |
\def\@captype{#1}\setbox\@floatcapt=\vbox{}% |
| 82 |
\expandafter\ifx\csname fst@#1\endcsname\relax |
| 83 |
\@flstylefalse\else\@flstyletrue\fi |
| 84 |
\setbox\@currbox\color@vbox\normalcolor |
| 85 |
\vbox\bgroup \hsize\columnwidth \@parboxrestore |
| 86 |
\@floatboxreset \@setnobreak |
| 87 |
\ignorespaces} |
| 88 |
\newtoks\@float@everytoks |
| 89 |
\let\@float@boxreset=\@floatboxreset |
| 90 |
\def\@floatboxreset{\@float@boxreset\the\@float@everytoks} |
| 91 |
\def\@float@setevery#1{\@float@everytoks=\@nameuse{@float@every@#1}} |
| 92 |
\newcommand\float@makebox[1]{% |
| 93 |
\vbox{\hsize=#1 \@parboxrestore |
| 94 |
\@fs@pre\@fs@iftopcapt |
| 95 |
\ifvoid\@floatcapt\else\unvbox\@floatcapt\par\@fs@mid\fi |
| 96 |
\unvbox\@currbox |
| 97 |
\else\unvbox\@currbox |
| 98 |
\ifvoid\@floatcapt\else\par\@fs@mid\unvbox\@floatcapt\fi |
| 99 |
\fi\par\@fs@post\vskip\z@}} |
| 100 |
\newcommand\float@end{\@endfloatbox |
| 101 |
\global\setbox\@currbox\float@makebox\columnwidth |
| 102 |
\let\@endfloatbox\relax\end@float} |
| 103 |
\newcommand\float@endH{\@endfloatbox\vskip\intextsep |
| 104 |
\if@flstyle\setbox\@currbox\float@makebox\columnwidth\fi |
| 105 |
\box\@currbox\vskip\intextsep\relax} |
| 106 |
\newcommand\float@dblend{\@endfloatbox |
| 107 |
\global\setbox\@currbox\float@makebox\textwidth |
| 108 |
\let\@endfloatbox\relax\end@dblfloat} |
| 109 |
\newsavebox\@floatcapt |
| 110 |
\renewcommand\caption{% |
| 111 |
\ifx\@captype\@undefined |
| 112 |
\@latex@error{\noexpand\caption outside float}\@ehd |
| 113 |
\expandafter\@gobble |
| 114 |
\else |
| 115 |
\refstepcounter\@captype |
| 116 |
\let\@tempf\@caption |
| 117 |
\expandafter\ifx\csname @float@c@\@captype\endcsname\relax\else |
| 118 |
\expandafter\expandafter\let |
| 119 |
\expandafter\@tempf\csname @float@c@\@captype\endcsname\fi\fi |
| 120 |
\@dblarg{\@tempf\@captype}} |
| 121 |
\long\def\float@caption#1[#2]#3{\addcontentsline{\@nameuse{ext@#1}}{#1}% |
| 122 |
{\protect\numberline{\@nameuse{the#1}}{\ignorespaces #2}} |
| 123 |
\global\setbox\@floatcapt\vbox\bgroup\@parboxrestore |
| 124 |
\normalsize\@fs@capt{\@nameuse{fnum@#1}}{\ignorespaces #3}% |
| 125 |
\@ifnextchar[{\float@ccon}{\egroup}} |
| 126 |
\long\def\float@ccon[#1]{#1\par\egroup} |
| 127 |
\newcommand*{\listof}[2]{% |
| 128 |
\@ifundefined{ext@#1}{\float@error{#1}}{% |
| 129 |
\@namedef{l@#1}{\@dottedtocline{1}{1.5em}{2.3em}}% |
| 130 |
\float@listhead{#2}% |
| 131 |
\begingroup\setlength{\parskip}{\z@}% |
| 132 |
\@starttoc{\@nameuse{ext@#1}}% |
| 133 |
\endgroup}} |
| 134 |
\providecommand*{\float@listhead}[1]{% |
| 135 |
\@ifundefined{chapter}{\def\@tempa{\section*}}% |
| 136 |
{\def\@tempa{\chapter*}}% |
| 137 |
\@tempa{#1\@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}}% |
| 138 |
\newcommand\float@addtolists[1]{% |
| 139 |
\def\float@do##1{\addtocontents{##1}{#1}} \the\float@exts} |
| 140 |
\newcommand\floatc@plain[2]{\setbox\@tempboxa\hbox{{\@fs@cfont #1:} #2}% |
| 141 |
\ifdim\wd\@tempboxa>\hsize {\@fs@cfont #1:} #2\par |
| 142 |
\else\hbox to\hsize{\hfil\box\@tempboxa\hfil}\fi} |
| 143 |
\newcommand\fs@plain{\def\@fs@cfont{\rmfamily}\let\@fs@capt\floatc@plain |
| 144 |
\def\@fs@pre{}\def\@fs@post{}% |
| 145 |
\def\@fs@mid{\vspace\abovecaptionskip\relax}% |
| 146 |
\let\@fs@iftopcapt\iffalse} |
| 147 |
\newcommand\fs@plaintop{\fs@plain |
| 148 |
\def\@fs@mid{\vspace\belowcaptionskip\relax}% |
| 149 |
\let\@fs@iftopcapt\iftrue} |
| 150 |
\let\floatc@plaintop=\floatc@plain |
| 151 |
\newcommand\floatc@ruled[2]{{\@fs@cfont #1} #2\par} |
| 152 |
\newcommand\fs@ruled{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@ruled |
| 153 |
\def\@fs@pre{\hrule height.8pt depth0pt \kern2pt}% |
| 154 |
\def\@fs@post{\kern2pt\hrule\relax}% |
| 155 |
\def\@fs@mid{\kern2pt\hrule\kern2pt}% |
| 156 |
\let\@fs@iftopcapt\iftrue} |
| 157 |
\newcommand\fs@boxed{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@plain |
| 158 |
\def\@fs@pre{\setbox\@currbox\vbox{\hbadness10000 |
| 159 |
\moveleft3.4pt\vbox{\advance\hsize by6.8pt |
| 160 |
\hrule \hbox to\hsize{\vrule\kern3pt |
| 161 |
\vbox{\kern3pt\box\@currbox\kern3pt}\kern3pt\vrule}\hrule}}}% |
| 162 |
\def\@fs@mid{\kern2pt}% |
| 163 |
\def\@fs@post{}\let\@fs@iftopcapt\iffalse} |
| 164 |
\floatstyle{plain} |
| 165 |
\endinput |
| 166 |
%% |
| 167 |
%% End of file `float.sty'. |