summaryrefslogtreecommitdiff
path: root/macros/text1/cms_help_files/strut.helpmark
blob: 582344ae8a2a4001ab44d215277c974a5f23bf1e (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
+-----------------------------------------------------------------------------+
|                                    strut                                    |
+-----------------------------------------------------------------------------+
 
Abbreviation:  ã|noneã%
 
Parameters:    ã|noneã%
 
    ã|Description:ã%
There are  times when it is  necessary to have the  baselineskip between two
lines be the  same, especially if  you are building a  table that uses rules
between columns.   The \strut markup  can be used in  an \halign to maintain
consistent distance  between lines  of a table.    The \strut markup  has no
parameters.   Its height is  1.8 times the  height of an "x"  in the current
point size.  Its depth is .6 times the height of an "x" in the current point
size.
 
    ã|Example:ã%
Consider this table created without the use of \strut,
 
\sfs{cm8}{eightpt}{default}
 
\twelvept
 
 
\tabletitle{Comparison of the composition of goat's
milk and that of two common breeds of dairy cows}
{\offinterlineskip\eightpt
\halign{\vrule\hs{3pt}\lft{#}\hs{3pt}\vrule&&
    \hs{3pt}\ctr{#}\hs{3pt}\vrule\cr
\noalign{\hrule}
&&\bd Total&&&\cr
\bd Source of milk&\bd Water&\bd Solids&
     \bd Fat&\bd Protein&\bd Lactose\cr
\noalign{\hrule height 1pt}
Goats&82.02\%&11.98\%&3.50\%&3.13\%&4.55\%\cr
\noalign{\hrule}
Holstein-Friesian&87.50\%&12.50\%&3.55\%&3.42\%&4.86\%\cr
\noalign{\hrule}
Jersey&85.31\%&14.69\%&5.18\%&3.86\%&4.94\%\cr
\noalign{\hrule}
 
}}
\twelvept
 
which prints as:
+-----------------------------------------------------------------------------+
|                                                                             |
|                                   Table 1                                   |
| Comparison of the composition of goat's milk and that of two common breeds  |
| of dairy cows                                                               |
| ......................................................                      |
| .......................................................                     |
| .......................................................                     |
| .Jersey...........85.31%..14.69%5.18%..3.86%...4.94%...                     |
| ......................................................                      |
+-----------------------------------------------------------------------------+
 
Now add \strut to the \halign preamble,
 
\halign{\strut\vrule\hs{3pt}\lft{#}\hs{3pt}\vrule&&
     \hs{3pt}\ctr{#}\hs{3pt}\vrule\cr
 
and notice the uniform distance between lines:
+-----------------------------------------------------------------------------+
|                                                                             |
|                                   Table 2                                   |
| Comparison of the composition of goat's milk and that of two common breeds  |
| of dairy cows                                                               |
| ......................................................                      |
| .                  .     Total .      .      .        .                     |
| .......................................................                     |
|  Goats             82.02%11.98% 3.50%  3.13%   4.55%                        |
| ..Holstein-Friesia87.50%..12.50%3.55%..3.42%...4.86%..                      |
| .......................................................                     |
| .......................................................                     |
+-----------------------------------------------------------------------------+
 
    ã|Notes:ã%
The size of the strut changes as the interline skip changes.  \twelvept will
have a longer \strut than will \tenpt.
    See The TEXbook for more on \offinterlineskip.