Debian Codegraph @

texmf-dist/tex/latex/booktabs/booktabs.sty

raw
1 %%
2 %% This is file `booktabs.sty',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% booktabs.dtx (with options: `package')
8 %%
9 %% Copyright (C) 1995--2020 Simon Fear
10 %% Maintained by Danie Els <[email protected]>
11 %%
12 %% -----------------------------------------------------------------
13 %% The booktabs package for publication quality tables for LaTeX
14 %% -----------------------------------------------------------------
15 %%
16 %% This work may be distributed and/or modified under the conditions
17 %% of the LaTeX Project Public License, either version 1.3c of this
18 %% license or (at your option) any later version. The latest version
19 %% of this license is in
20 %% http://www.latex-project.org/lppl.txt
21 %% and version 1.3c or later is part of all distributions of LaTeX
22 %% version 2008/05/04 or later.
23 %%
24 %% -----------------------------------------------------------------
25 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
26 \ProvidesPackage{booktabs}
27 [2020/01/12 v1.61803398 Publication quality tables]
28 \newdimen\heavyrulewidth
29 \newdimen\lightrulewidth
30 \newdimen\cmidrulewidth
31 \newdimen\belowrulesep
32 \newdimen\belowbottomsep
33 \newdimen\aboverulesep
34 \newdimen\abovetopsep
35 \newdimen\cmidrulesep
36 \newdimen\cmidrulekern
37 \newdimen\defaultaddspace
38 \heavyrulewidth=.08em
39 \lightrulewidth=.05em
40 \cmidrulewidth=.03em
41 \belowrulesep=.65ex
42 \belowbottomsep=0pt
43 \aboverulesep=.4ex
44 \abovetopsep=0pt
45 \cmidrulesep=\doublerulesep
46 \cmidrulekern=.5em
47 \defaultaddspace=.5em
48 \newcount\@cmidla
49 \newcount\@cmidlb
50 \newdimen\@aboverulesep
51 \newdimen\@belowrulesep
52 \newcount\@thisruleclass
53 \newcount\@lastruleclass
54 \@lastruleclass=0
55 \newdimen\@thisrulewidth
56 \def\futurenonspacelet#1{\def\@BTcs{#1}%
57 \afterassignment\@BTfnslone\let\nexttoken= }
58 \def\@BTfnslone{\expandafter\futurelet\@BTcs\@BTfnsltwo}
59 \def\@BTfnsltwo{\expandafter\ifx\@BTcs\@sptoken\let\next=\@BTfnslthree
60 \else\let\next=\nexttoken\fi \next}
61 \def\@BTfnslthree{\afterassignment\@BTfnslone\let\next= }
62 \def\toprule{\noalign{\ifnum0=`}\fi
63 \@aboverulesep=\abovetopsep
64 \global\@belowrulesep=\belowrulesep %global cos for use in the next noalign
65 \global\@thisruleclass=\@ne
66 \@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}}
67 \def\midrule{\noalign{\ifnum0=`}\fi
68 \@aboverulesep=\aboverulesep
69 \global\@belowrulesep=\belowrulesep
70 \global\@thisruleclass=\@ne
71 \@ifnextchar[{\@BTrule}{\@BTrule[\lightrulewidth]}}
72 \def\bottomrule{\noalign{\ifnum0=`}\fi
73 \@aboverulesep=\aboverulesep
74 \global\@belowrulesep=\belowbottomsep
75 \global\@thisruleclass=\@ne
76 \@ifnextchar[{\@BTrule}{\@BTrule[\heavyrulewidth]}}
77 \def\specialrule#1#2#3{\noalign{\ifnum0=`}\fi
78 \@aboverulesep=#2\global\@belowrulesep=#3\global\@thisruleclass=\tw@
79 \@BTrule[#1]}
80 \def\addlinespace{\noalign{\ifnum0=`}\fi
81 \@ifnextchar[{\@addspace}{\@addspace[\defaultaddspace]}}
82 \def\@addspace[#1]{\global\@belowrulesep=#1\global\@thisruleclass=\tw@
83 \futurelet\@tempa\@BTendrule}
84 \def\@BTrule[#1]{%
85 \ifx\longtable\undefined
86 \let\@BTswitch\@BTnormal
87 \else\ifx\hline\LT@hline
88 \nobreak
89 \let\@BTswitch\@BLTrule
90 \else
91 \let\@BTswitch\@BTnormal
92 \fi\fi
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 \@BTswitch}
98 \AtBeginDocument{%
99 \providecommand*\CT@arc@{}}%% colortbl support
100 \def\@BTnormal{%
101 {\CT@arc@\hrule\@height\@thisrulewidth}%
102 \futurenonspacelet\@tempa\@BTendrule}
103 \def\@BLTrule{\@ifnextchar({\@@BLTrule}{\@@BLTrule()}}
104 \def\@@BLTrule(#1){\@setrulekerning{#1}%
105 \global\@cmidlb\LT@cols
106 \ifnum0=`{\fi}%
107 \@cmidruleb
108 \noalign{\ifnum0=`}\fi
109 \futurenonspacelet\@tempa\@BTendrule}
110 \def\@BTendrule{\ifx\@tempa\toprule\global\@lastruleclass=\@thisruleclass
111 \else\ifx\@tempa\midrule\global\@lastruleclass=\@thisruleclass
112 \else\ifx\@tempa\bottomrule\global\@lastruleclass=\@thisruleclass
113 \else\ifx\@tempa\cmidrule\global\@lastruleclass=\@thisruleclass
114 \else\ifx\@tempa\specialrule\global\@lastruleclass=\@thisruleclass
115 \else\ifx\@tempa\addlinespace\global\@lastruleclass=\@thisruleclass
116 \else\global\@lastruleclass=\z@\fi\fi\fi\fi\fi\fi
117 \ifnum\@lastruleclass=\@ne\relax\else\vskip\@belowrulesep\fi
118 \ifnum0=`{\fi}}
119 \def\@setrulekerning#1{%
120 \global\let\cmrkern@l\z@
121 \global\let\cmrkern@r\z@
122 \@tfor\@tempa :=#1\do
123 {\def\@tempb{r}%
124 \ifx\@tempa\@tempb
125 \global\let\cmrkern@r\cmidrulekern
126 \def\cmrsideswitch{\cmrkern@r}%
127 \else
128 \def\@tempb{l}%
129 \ifx\@tempa\@tempb
130 \global\let\cmrkern@l\cmidrulekern
131 \def\cmrsideswitch{\cmrkern@l}%
132 \else
133 \global\expandafter\let\cmrsideswitch\@tempa
134 \fi
135 \fi}}
136 \def\cmidrule{\noalign{\ifnum0=`}\fi
137 \@ifnextchar[{\@cmidrule}{\@cmidrule[\cmidrulewidth]}}
138 \def\@cmidrule[#1]{\@ifnextchar({\@@cmidrule[#1]}{\@@cmidrule[#1]()}}
139 \def\@@cmidrule[#1](#2)#3{\@@@cmidrule[#3]{#1}{#2}}
140 \def\@@@cmidrule[#1-#2]#3#4{\global\@cmidla#1\relax
141 \global\advance\@cmidla\m@ne
142 \ifnum\@cmidla>0\global\let\@gtempa\@cmidrulea\else
143 \global\let\@gtempa\@cmidruleb\fi
144 \global\@cmidlb#2\relax
145 \global\advance\@cmidlb-\@cmidla
146 \global\@thisrulewidth=#3
147 \@setrulekerning{#4}
148 \ifnum\@lastruleclass=\z@\vskip \aboverulesep\fi
149 \ifnum0=`{\fi}\@gtempa
150 \noalign{\ifnum0=`}\fi\futurenonspacelet\@tempa\@xcmidrule}
151 \def\@xcmidrule{%
152 \ifx\@tempa\cmidrule
153 \vskip-\@thisrulewidth
154 \global\@lastruleclass=\@ne
155 \else \ifx\@tempa\morecmidrules
156 \vskip \cmidrulesep
157 \global\@lastruleclass=\@ne\else
158 \vskip \belowrulesep
159 \global\@lastruleclass=\z@
160 \fi\fi
161 \ifnum0=`{\fi}}
162 \def\@cmidrulea{%
163 \multispan\@cmidla&\multispan\@cmidlb
164 \unskip\hskip\cmrkern@l%
165 {\CT@arc@\leaders\hrule \@height\@thisrulewidth\hfill\kern\z@}%
166 \hskip\cmrkern@r\cr}%
167 \def\@cmidruleb{%
168 \multispan\@cmidlb
169 \unskip\hskip \cmrkern@l%
170 {\CT@arc@\leaders\hrule \@height\@thisrulewidth\hfill\kern\z@}%
171 \hskip\cmrkern@r\cr}%
172 \def\morecmidrules{\noalign{\relax}}
173 \endinput
174 %%
175 %% End of file `booktabs.sty'.