2 %% This is file `booktabs.sty',
3 %% generated with the docstrip utility.
5 %% The original source files were:
7 %% booktabs.dtx (with options: `package')
9 %% -----------------------------------------------------------------
11 %% Maintainer: Danie Els (dnjels@sun.ac.za)
13 %% This file is part of the booktabs package for publication
14 %% quality tables for LaTeX
16 %% Copyright (C) 1995--2005 Simon Fear
18 %% This program is free software; you can redistribute it and/or
19 %% modify it under the terms of the GNU General Public License as
20 %% published by the Free Software Foundation; either version 2 of
21 %% the License, or (at your option) any later version.
23 %% This program is distributed in the hope that it will be useful,
24 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
25 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 %% GNU General Public License for more details.
28 %% You should have received a copy of the GNU General Public
29 %% License along with this program; if not, write to the Free
30 %% Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 %% -----------------------------------------------------------------
33 \NeedsTeXFormat{LaTeX2e
}[1999/
12/
01]
34 \ProvidesPackage{booktabs
}
35 [2005/
04/
14 v1.61803 publication quality tables
]
36 \newdimen\heavyrulewidth
37 \newdimen\lightrulewidth
38 \newdimen\cmidrulewidth
39 \newdimen\belowrulesep
40 \newdimen\belowbottomsep
41 \newdimen\aboverulesep
44 \newdimen\cmidrulekern
45 \newdimen\defaultaddspace
53 \cmidrulesep=
\doublerulesep
58 \newdimen\@aboverulesep
59 \newdimen\@belowrulesep
60 \newcount\@thisruleclass
61 \newcount\@lastruleclass
63 \newdimen\@thisrulewidth
64 \def\futurenonspacelet#1{\def\@BTcs
{#1}%
65 \afterassignment\@BTfnslone
\let\nexttoken=
}
66 \def\@BTfnslone
{\expandafter\futurelet\@BTcs\@BTfnsltwo
}
67 \def\@BTfnsltwo
{\expandafter\ifx\@BTcs\@sptoken
\let\next=\@BTfnslthree
68 \else\let\next=
\nexttoken\fi \next}
69 \def\@BTfnslthree
{\afterassignment\@BTfnslone
\let\next=
}
70 \def\toprule{\noalign{\ifnum0=`
}\fi
71 \@aboverulesep=
\abovetopsep
72 \global\@belowrulesep=
\belowrulesep %global cos for use in the next noalign
73 \global\@thisruleclass=\@ne
74 \@ifnextchar
[{\@BTrule
}{\@BTrule
[\heavyrulewidth]}}
75 \def\midrule{\noalign{\ifnum0=`
}\fi
76 \@aboverulesep=
\aboverulesep
77 \global\@belowrulesep=
\belowrulesep
78 \global\@thisruleclass=\@ne
79 \@ifnextchar
[{\@BTrule
}{\@BTrule
[\lightrulewidth]}}
80 \def\bottomrule{\noalign{\ifnum0=`
}\fi
81 \@aboverulesep=
\aboverulesep
82 \global\@belowrulesep=
\belowbottomsep
83 \global\@thisruleclass=\@ne
84 \@ifnextchar
[{\@BTrule
}{\@BTrule
[\heavyrulewidth]}}
85 \def\specialrule#1#2#3{\noalign{\ifnum0=`
}\fi
86 \@aboverulesep=
#2\global\@belowrulesep=
#3\global\@thisruleclass=
\tw@
88 \def\addlinespace{\noalign{\ifnum0=`
}\fi
89 \@ifnextchar
[{\@addspace
}{\@addspace
[\defaultaddspace]}}
90 \def\@addspace
[#1]{\global\@belowrulesep=
#1\global\@thisruleclass=
\tw@
91 \futurelet\@tempa\@BTendrule
}
93 \global\@thisrulewidth=
#1\relax
94 \ifnum\@thisruleclass=
\tw@
\vskip\@aboverulesep
\else
95 \ifnum\@lastruleclass=
\z@
\vskip\@aboverulesep
\else
96 \ifnum\@lastruleclass=\@ne
\vskip\doublerulesep\fi\fi\fi
97 \ifx\longtable\undefined
98 \let\@BTswitch\@BTnormal
99 \else\ifx\hline\LT@hline
100 \let\@BTswitch\@BLTrule
102 \let\@BTswitch\@BTnormal
106 \providecommand*
\CT@arc@
{}}%% colortbl support
108 {\CT@arc@
\hrule\@height\@thisrulewidth
}%
109 \futurenonspacelet\@tempa\@BTendrule
}
110 \def\@BLTrule
{\@ifnextchar(
{\@@BLTrule
}{\@@BLTrule()
}}
111 \def\@@BLTrule(
#1)
{\@setrulekerning
{#1}%
112 \global\@cmidlb
\LT@cols
115 \noalign{\ifnum0=`
}\fi
116 \futurenonspacelet\@tempa\@BTendrule
}
117 \def\@BTendrule
{\ifx\@tempa
\toprule\global\@lastruleclass=\@thisruleclass
118 \else\ifx\@tempa
\midrule\global\@lastruleclass=\@thisruleclass
119 \else\ifx\@tempa
\bottomrule\global\@lastruleclass=\@thisruleclass
120 \else\ifx\@tempa
\cmidrule\global\@lastruleclass=\@thisruleclass
121 \else\ifx\@tempa
\specialrule\global\@lastruleclass=\@thisruleclass
122 \else\ifx\@tempa
\addlinespace\global\@lastruleclass=\@thisruleclass
123 \else\global\@lastruleclass=
\z@
\fi\fi\fi\fi\fi\fi
124 \ifnum\@lastruleclass=\@ne
\relax\else\vskip\@belowrulesep
\fi
126 \def\@setrulekerning
#1{%
127 \global\let\cmrkern@l
\z@
128 \global\let\cmrkern@r
\z@
129 \@tfor\@tempa :=
#1\do
132 \global\let\cmrkern@r
\cmidrulekern
133 \def\cmrsideswitch{\cmrkern@r
}%
137 \global\let\cmrkern@l
\cmidrulekern
138 \def\cmrsideswitch{\cmrkern@l
}%
140 \global\expandafter\let\cmrsideswitch\@tempa
143 \def\cmidrule{\noalign{\ifnum0=`
}\fi
144 \@ifnextchar
[{\@cmidrule
}{\@cmidrule
[\cmidrulewidth]}}
145 \def\@cmidrule
[#1]{\@ifnextchar(
{\@@cmidrule
[#1]}{\@@cmidrule
[#1]()
}}
146 \def\@@cmidrule
[#1](
#2)
#3{\@@@cmidrule
[#3]{#1}{#2}}
147 \def\@@@cmidrule
[#1-
#2]#3#4{\global\@cmidla
#1\relax
148 \global\advance\@cmidla
\m@ne
149 \ifnum\@cmidla>
0\global\let\@gtempa\@cmidrulea
\else
150 \global\let\@gtempa\@cmidruleb
\fi
151 \global\@cmidlb
#2\relax
152 \global\advance\@cmidlb-\@cmidla
153 \global\@thisrulewidth=
#3
155 \ifnum\@lastruleclass=
\z@
\vskip \aboverulesep\fi
156 \ifnum0=`
{\fi}\@gtempa
157 \noalign{\ifnum0=`
}\fi\futurenonspacelet\@tempa\@xcmidrule
}
160 \vskip-\@thisrulewidth
161 \global\@lastruleclass=\@ne
162 \else \ifx\@tempa
\morecmidrules
164 \global\@lastruleclass=\@ne
\else
166 \global\@lastruleclass=
\z@
170 \multispan\@cmidla&
\multispan\@cmidlb
171 \unskip\hskip\cmrkern@l
%
172 {\CT@arc@
\leaders\hrule \@height\@thisrulewidth
\hfill}%
173 \hskip\cmrkern@r
\cr}%
176 \unskip\hskip \cmrkern@l
%
177 {\CT@arc@
\leaders\hrule \@height\@thisrulewidth
\hfill}%
178 \hskip\cmrkern@r
\cr}%
179 \def\morecmidrules{\noalign{\relax}}
182 %% End of file `booktabs.sty'.