home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / programs / amiga / pastex / macros / distribs / array / hhline.doc (.txt) < prev    next >
LaTeX Document  |  1992-09-06  |  13KB  |  336 lines

  1. % \iffalse
  2. % This file is part of the array package.
  3. % ---------------------------------------
  4. % This file was contributed. In case of error please inform the
  5. % original author.
  6. % \fi
  7. %\iffalse
  8. %%% ====================================================================
  9. %%%  @LaTeX-style-file{
  10. %%%     author          = "David Carlisle",
  11. %%%     version         = "2.01",
  12. %%%     date            = "26 June 1992",
  13. %%%     time            = "14:59:06 BST",
  14. %%%     filename        = "hhline.sty",
  15. %%%     address         = "Computer Science Department
  16. %%%                        Manchester University
  17. %%%                        Oxford Road
  18. %%%                        Manchester
  19. %%%                        England
  20. %%%                        M13 9PL",
  21. %%%     telephone       = "+44 61 275 6139",
  22. %%%     FAX             = "+44 61 275 6236",
  23. %%%     checksum        = "35688 370 1639 13144",
  24. %%%     email           = "carlisle@cs.man.ac.uk (Internet)",
  25. %%%     codetable       = "ISO/ASCII",
  26. %%%     keywords        = "LaTeX, array, tabular, hline",
  27. %%%     supported       = "yes",
  28. %%%     docstring       = "
  29. %%%     hhline.sty
  30. %%%     LaTeX style option defining an alternative to \hline for
  31. %%%     producing horizontal lines in tables. This allows user level
  32. %%%     control over the interaction with vertical lines.
  33. %%%     The checksum field above was produced by
  34. %%%     Robert Solovay's checksum utility.",
  35. %%%  }
  36. %%% ====================================================================
  37. \def\fileversion{v2.01}
  38. \def\filedate{92/06/26}
  39. \def\docdate {92/06/26}
  40. % \CheckSum{285}
  41. % \CharacterTable
  42. %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  43. %   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  44. %   Digits        \0\1\2\3\4\5\6\7\8\9
  45. %   Exclamation   \!     Double quote  \"     Hash (number) \#
  46. %   Dollar        \$     Percent       \%     Ampersand     \&
  47. %   Acute accent  \'     Left paren    \(     Right paren   \)
  48. %   Asterisk      \*     Plus          \+     Comma         \,
  49. %   Minus         \-     Point         \.     Solidus       \/
  50. %   Colon         \:     Semicolon     \;     Less than     \<
  51. %   Equals        \=     Greater than  \>     Question mark \?
  52. %   Commercial at \@     Left bracket  \[     Backslash     \\
  53. %   Right bracket \]     Circumflex    \^     Underscore    \_
  54. %   Grave accent  \`     Left brace    \{     Vertical bar  \|
  55. %   Right brace   \}     Tilde         \~}
  56. % \arrayrulewidth=1pt
  57. % \doublerulesep=3pt
  58. % \title{hhline.sty\thanks
  59. %   {Version \fileversion, revised \filedate, documentation dated
  60. %   \docdate}}
  61. % \author{D. P. Carlisle}
  62. % \date{26 June 1992}
  63. % \maketitle
  64. % \begin{abstract}
  65. % "\hhline" produces a line like "\hline", or a double line like
  66. % "\hline\hline", except for its interaction with vertical lines.
  67. % Version 1: 4 June 91
  68. % Version 2: 6 November 1991
  69. % Adds the "~" token which allows "\cline"-like constructions in which
  70. % the hlines do not cross all the columns.
  71. % Version 2.01: Re-issue for the new {\tt doc} and {\tt docstrip}.
  72. % \end{abstract}
  73. % \section{Introduction}
  74. % The argument to "\hhline" is similar to the preamble of an {\tt
  75. % array} or {\tt tabular}. It consists of a list of tokens with the
  76. % following meanings:
  77. % \begin{tabular}{cl}
  78. %   "="   & A double hline the width of a column.\\
  79. %   "-"   & A single hline the width of a column.\\[10pt]
  80. %   "~"   & A column with no hline.\\[10pt]
  81. %   "|"   & A vline which `cuts' through a double (or single) hline.\\
  82. %   ":"   & A vline which is broken by a double hline.\\[10pt]
  83. %   "#"   & A double hline segment between two vlines.\\
  84. %   "t"   & The top half of a double hline segment.\\
  85. %   "b"   & The bottom half of a double hline segment.\\
  86. %   "*"   & "*{3}{==#}" expands to "==#==#==#",
  87. %                   as in the {\tt*}-form for the preamble.
  88. % \end{tabular}
  89. % If a double vline is specified ("||" or "::") then the hlines
  90. % produced by "\hhline" are broken. To obtain the effect of an hline
  91. % `cutting through'the double vline, use a "#" or omit the vline
  92. % specifiers, depending on whether or not you wish the double vline to
  93. % break.
  94. % The tokens {\tt t} and {\tt b} must be used between two vertical
  95. % rules. "|tb|" produces the same lines  as "#", but is much less
  96. % efficient. The main use for these are to make constructions like
  97. % "|t:" (top left corner) and ":b|" (bottom right corner).
  98. % If "\hhline" is used to make a single hline, then the argument
  99. % should only contain the tokens "-", "~"  and "|" (and
  100. % {\tt*}-expressions).
  101. % An example using most of these features is:
  102. % \vcenter{\hsize=2in\begin{verbatim}
  103. % \begin{tabular}{||cc||c|c||}
  104. % \hhline{|t:==:t:==:t|}
  105. % a&b&c&d\\
  106. % \hhline{|:==:|~|~||}
  107. % 1&2&3&4\\
  108. % \hhline{#==#~|=#}
  109. % i&j&k&l\\
  110. % \hhline{||--||--||}
  111. % w&x&y&z\\
  112. % \hhline{|b:==:b:==:b|}
  113. % \end{tabular}
  114. % \end{verbatim}
  115. % \qquad
  116. % \begin{tabular}{||cc||c|c||}
  117. % \hhline{|t:==:t:==:t|}
  118. % a&b&c&d\\
  119. % \hhline{|:==:|~|~||}
  120. % 1&2&3&4\\
  121. % \hhline{#==#~|=#}
  122. % i&j&k&l\\
  123. % \hhline{||--||--||}
  124. % w&x&y&z\\
  125. % \hhline{|b:==:b:==:b|}
  126. % \end{tabular}
  127. % The lines produced by \LaTeX's "\hline" consist of a single (\TeX\
  128. % primitive) "\hrule". The lines produced by "\hhline" are made
  129. % up of lots of small line segments. \TeX\ will place these very
  130. % accurately in the {\tt .dvi} file, but the program that you use to
  131. % print the {\tt .dvi} file may not line up these segments exactly. (A
  132. % similar problem can occur with diagonal lines in the {\tt picture}
  133. % environment.)
  134. % If this effect causes a problem, you could try a different driver
  135. % program, or if this is not possible, increasing "\arrayrulewidth"
  136. % may help to reduce the effect.
  137. % \StopEventually{}
  138. % \section{The Macros}
  139. %    \begin{macrocode}
  140. %<*style>
  141. \@ifundefined{hhline}{}{\endinput}
  142. \wlog{Style-Option: `hhline' \fileversion
  143.          \space\space <\filedate> (D.P.C.)}
  144. \wlog{English documentation dated \space <\docdate> (D.P.C.)}
  145. %    \end{macrocode}
  146. % \begin{macro}{\HH@box}
  147. % Makes a box containing a double hline segment. The most common case,
  148. % both rules of length "\doublerulesep" will be stored in "\box1", this
  149. % is not initialised until "\hhline" is called as the user may change
  150. % the parameters "\doublerulesep" and "\arrayrulewidth". The two
  151. % arguments to "\HH@box" are the widths (ie lengths) of the top and
  152. % bottom rules.
  153. %    \begin{macrocode}
  154. \def\HH@box#1#2{\vbox{%
  155.   \hrule \@height \arrayrulewidth \@width #1
  156.   \vskip \doublerulesep
  157.   \hrule \@height \arrayrulewidth \@width #2}}
  158. %    \end{macrocode}
  159. % \end{macro}
  160. % \begin{macro}{\HH@add}
  161. % Build up the preamble in the register "\toks@".
  162. %    \begin{macrocode}
  163. \def\HH@add#1{\toks@\expandafter{\the\toks@#1}}
  164. %    \end{macrocode}
  165. % \end{macro}
  166. % \begin{macro}{\HH@xexpast}
  167. % \begin{macro}{\HH@xexnoop}
  168. % We `borrow' the version of "\@xexpast" from Mittelbach's array.sty,
  169. % as this allows "#" to appear in the argument list.
  170. %    \begin{macrocode}
  171. \def\HH@xexpast#1*#2#3#4\@@{%
  172.    \@tempcnta #2
  173.    \toks@={#1}\@temptokena={#3}%
  174.    \let\the@toksz\relax \let\the@toks\relax
  175.    \def\@tempa{\the@toksz}%
  176.    \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
  177.      {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
  178.        \let \@tempb \HH@xexpast \else
  179.        \let \@tempb \HH@xexnoop \fi
  180.    \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
  181.    \edef\@tempa{\@tempa}%
  182.    \expandafter \@tempb \@tempa #4\@@}
  183. \def\HH@xexnoop#1\@@{}
  184. %    \end{macrocode}
  185. % \end{macro}
  186. % \end{macro}
  187. % \begin{macro}{\hhline}
  188. % Use a simplified version of "\@mkpream" to break apart the argument
  189. % to "\hhline". Actually it is oversimplified, It assumes that the
  190. % vertical rules are at the end of the column. If you were to specify
  191. % "c|@{xx}|" in the array argument, then "\hhline" would not be
  192. % able to access the first vertical rule. (It ought to have an "@"
  193. % option, and add "\leaders" up to the width of a box containing the
  194. % "@"-expression. We use a loop made with "\futurelet" rather
  195. % than "\@tfor" so that we can use "#" to denote the crossing of
  196. % a double hline with a double vline.\\
  197. % "\if@firstamp" is true in the first column and false otherwise.\\
  198. % "\if@tempswa"  is true if the previous entry was a vline
  199. %                     (":",