summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-rulethk.html
blob: 469e996c22a7e6acecd5781f03ba194d65329a2f (plain)
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
42
43
44
45
46
47
48
49
50
51
52
<head>
<title>UK TeX FAQ -- question label rulethk</title>
</head><body>
<h3>The thickness of rules in LaTeX tables</h3>
<p/>The rules in a LaTeX table are by default <code>0.4pt</code> thick;
this is in fact a default built in at the lowest level, and applies to
all rules (including those separating blocks of running text).
<p/>Sometimes, however, we look at a table and find we want the rules to
stand out &mdash; perhaps to separate the text from the rest of the body
text, or to make the sections of the table stand out from one another.
However, a quick review of any LaTeX manual will reveal no
technique for making any one rule stand out, and a little
experimentation shows that it is indeed pretty difficult to prevent
a change &ldquo;bleeding&rdquo; out to affect other rules in the same table.
<p/>If you look at what we have to say on the 
<a href="FAQ-destable.html">design of tables</a>, elsewhere
among these FAQs, and you may sense that the design of LaTeX
simply skipped the issues surrounding table design: <em>that&rsquo;s</em>
presumably why there&rsquo;s no facilities to help you.
<p/>Specifically, the length <code>\</code><code>arrayrulewidth</code> affects the thickness of
the rules (both horizontal and vertical) within both
<code>tabular</code> and <code>array</code> environments.  If you
change from the default (see above) only as far as
<blockquote>
<pre>
\setlength{\arrayrulewidth}{1pt}
</pre>
</blockquote><p>
the change is remarkably striking.  However, really quite subtle user
level programming proves incapable of changing just <em>one</em> rule:
it&rsquo;s necessary to delve into the (rather tricky) code of <code>\</code><code>hline</code>
and <code>\</code><code>cline</code> themselves.
<p/>Fortunately, this job has already been done for the community: the
<i>booktabs</i> package defines three different classes of rule
(<code>\</code><code>toprule</code>, <code>\</code><code>midrule</code> and <code>\</code><code>bottomrule</code>), and the package
documentation offers hints on how to use them.  You are
<em>strongly</em> advised to read the documentation pretty carefully.
<p/>The <i>memoir</i> class includes the <i>booktabs</i> package, and
repeats the documentation in its compendious manual.
<p/>Note that none of the above mentions the issue of the weight of
vertical rules (except in passing).  For the reasons, see the
documentation of the <i>booktabs</i> package (again); vertical
rules in tables are in any case even more trickily coded than are
horizontal rules, and if their lack of configurability makes them
still less attractive, so much the better for the design of your
document.
<dl>
<dt><tt><i>booktabs.sty</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/booktabs.zip">macros/latex/contrib/booktabs</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/booktabs/">browse the directory</a>)
<dt><tt><i>memoir.cls</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (or <a href="http://www.tex.ac.uk/www.tex.ac.uk  tex-archive/macros/latex/contrib/memoir/">browse the directory</a>)
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=rulethk">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=rulethk</a>
</body>