-
Notifications
You must be signed in to change notification settings - Fork 36
/
bigstrut.sty
42 lines (40 loc) · 1.99 KB
/
bigstrut.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
%
%% bigstrut.sty V1.0 (31-May-94)
%%
%% Author: Jerry Leichter <[email protected]>
%%
%% V1.0 Split out as a separate style file.
%%
%% This file may be distributed under the terms of the LaTeX Project Public
%% License, as described in lppl.txt in the base LaTeX distribution.
%% Either version 1 or, at your option, any later version.
%%
% \bigstrut[x] produces a strut which is \bigstrutjot (2pt by default) higher,
% lower, or both than the standard array/table strut. Use it in table entries
% that are adjacent to \hline's to leave an extra bit of space - according to
% the TeXbook (page 246), "This is a little touch that improves the appearance
% of boxed tables; look for it as a mark of quality."
%
% Although you could use \bigstrut in an array, there isn't normally much
% point since arrays are "opened up" by \jot anyway.
%
% \bigstrut[t] adds height; \bigstrut[b] adds depth. Just \bigstrut adds
% both. So: Use \bigstrut[t] in the row just *after* an \hline; \bigstrut[b]
% in the row just *before*; and \bigstrut if there are \hline's both before
% and after.
%
% Spaces after the \bigstrut are ignored, even if it has an optional argument.
% Spaces before the \bigstrut are generally ignored (by a single \unskip).
%
% Note: The multirow style file makes use of \bigstrutjot. If both styles
% are used, they can be used in either order, as each checks to see if the
% other has already defined \bigstrutjot. However, the default values they
% set are different: If only multirow is used, \bigstrutjot will be set to
% 3pt. If bigstrut is used, with or without multirow, \bigstrutjot will be
% 2pt.
\@ifundefined{bigstrutjot}{\newdimen\bigstrutjot}{}\bigstrutjot2pt
\def\bigstrut{\relax\@ifnextchar [{\@bigstrut}{\@bigstrut[x]}}
\def\@bigstrut[#1]{\unskip\@tempdima\ht\@arstrutbox \@tempdimb\dp\@arstrutbox
\ifx #1b\else \advance\@tempdima by \bigstrutjot\fi
\ifx #1t\else \advance\@tempdimb by \bigstrutjot\fi
\hbox{\vrule \@height\@tempdima \@depth\@tempdimb \@width\z@}\ignorespaces}