diff options
Diffstat (limited to 'macros/text1/cms_help_files/strut.helpmark')
-rw-r--r-- | macros/text1/cms_help_files/strut.helpmark | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/macros/text1/cms_help_files/strut.helpmark b/macros/text1/cms_help_files/strut.helpmark new file mode 100644 index 0000000000..582344ae8a --- /dev/null +++ b/macros/text1/cms_help_files/strut.helpmark @@ -0,0 +1,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. |