home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / bbs / programs / amiga / pastex13.lha / Macros / SUPERTAB / supertabular.doc < prev    next >
Text File  |  1992-07-10  |  23KB  |  507 lines

  1. % @stylefile{Super tabular
  2. % shortpackagename = {supertab},
  3. % longpackagename  = {supertabular},
  4. % baseformats      = {\LaTeX 2.09},
  5. % version          = {3.6h},
  6. % date             = {1992-07-03},
  7. % author           = {Theo Jurriens, 
  8. %                     TAJ@HGRRUG5, 
  9. %                     P.O Box 800, 
  10. %                     9700 AV Groningen},
  11. % abstract         = {This file provides the supertabular environment, which
  12. %                     is an extension to the standard tabular environment.
  13. %                     Large tabulars are automatically split across pages.
  14. %                     Seperate commands for the table-head and table-tail
  15. %                     are provided, in order to repeat these on each page.}
  16. % infauthor        = {Johannes Braams,
  17. %                     J.L.Braams@research.ptt.nl,
  18. %                     PTT Research,
  19. %                     P.O. Box 421,
  20. %                     2260 AK Leidschendam}
  21. % infdate           = {1990-10-16}}
  22. %
  23. %----------------------------------------------------------------------------
  24. %
  25. % supertabular sty
  26. % original idea:  Theo Jurriens 1988
  27. %                 TAJ@hgrrug5        P.O Box 800, 9700 AV Groningen
  28. %
  29. % revised by:     Johannes Braams
  30. %                 J.L.Braams@research.ptt.nl   PTT Research Leidschendam (NL)
  31. %
  32. % 10.07.92  - Still a problem in the combination of supertabular with array.sty
  33. % V 3.6h      I overlooked the fact that array doesn't use \@tabulacr anymore
  34. %             and it behaves differently with respect to \@startparbox.
  35. % 03.07.92  - A problem in the combination of supertabular with array.sty
  36. % V 3.6g      It can be solved by removing the \string from \def\tableformat
  37. %             and passing \tableformat expanded to \tabular.
  38. % 11.02.92  - Bug found by Michael Heissmeier when p{...} is used.
  39. % V 3.6f      A change in LaTeX.tex didn't find its way into supertabular.
  40. % 01.08.91  - Take height of tabletail into account when computing the
  41. % V 3.6e      maximum tableheight; add tolerance on first (partial) page
  42. %             of the supertabular.
  43. % 27.06.91  - Cured bug that made the first part of the table one line
  44. % V 3.6d      shorter than the others. Appeared when supertabular was
  45. %             used in a twocolumn environment.
  46. % 26.06.91  - Made \@process@tablecaption a global macro. Previous caption
  47. % V 3.6c      turned up on a table without one.
  48. % 27.05.91  - Replaced \clearpage with \newpage to make supertabulars work
  49. % V 3.6b      in a twocolumn environment. This also prevents all floats
  50. %             from being printed.
  51. % 15.02.91  - Because of the check for the use of tablefirsthead the
  52. % V 3.6a      combination of an \hline in the head and an \hline as the first
  53. %             thing in the data went wrong. The \futurelet in the definition
  54. %             of \hline found \fi instead of \hline, so no \doublerulesep
  55. %             was added.
  56. %             Also had to modify the way the environments were defined.
  57. %             The blank space (from the CR after the argument of \supertabular)
  58. %             has to be gobbled. This can only be done using a construction
  59. %             like \def\command#1 {...}. So removed the use of \newenvironment
  60. % 04.02.91  - Added the commands \topcaption, \bottomcaption and \tablecaption 
  61. % V 3.6       to include a caption within the supertabular environment. The
  62. %             default behaviour is to put the caption before the actual start
  63. %             of the table.
  64. %           - Also added \tablefirsthead and \tablelasttail to let the
  65. %             user specify a different head for the first page of the table
  66. %             and for consecutive pages as well as different tails for first
  67. %             pages and the last one. If these commands are not used, the
  68. %             default behaviour will be to use the value of \tablehead end
  69. %             \tabletail
  70. %           - Removed the need for the \noalign{\global\let\\=\@stabularcr}
  71. %             commands by storing and resetting \@stabularcr
  72. %
  73. % 16.10.90  Added the supertabular* environment that was in an earlier
  74. % V 3.5     version (2.0) by the original author
  75. %           Reintroduced the version numbering
  76. %
  77. % revised by:     Gabriele Kruljac
  78. %                 kruljac@ds0mpi11   Max-Planck-Institute Stuttgart
  79. %
  80. %
  81. % 06.06.89  Correction: now care is taken of probably existing onecolumn
  82. %           head (title or tables ...) in twocolumn sty.
  83. %
  84. % 10.05.89  Correction: the new \\ definition has been added to the
  85. %           begin of each `sub'-tabular
  86. %           Added: algorithm to produce the tabulars in twocolumn style
  87. %
  88. % 06.04.89  Correction: put \global statement in \end{supertabular}
  89. %           into \noalign
  90. %
  91. % 22.02.89  Correction: restore the original meaning of \\ with
  92. %           \end{supertabular}
  93. %
  94. % (Feb 89) The whole algorithm has been changed, so that I can use
  95. %          the most features of a normal tabular:
  96. %          \\  for new line, including  \\[#1]
  97. %          p{...} in the preamble ...
  98. %          Account is taken to \baselinestretch and \arraystretch
  99. %         -I'm not counting the lines because of too much rounding errors
  100. %          but instead I add the (estimated) used space in pt.
  101. %         -The tablehead is taken into this algorithm of proofing, so
  102. %          I really know how much space the head uses.
  103. %         -When no p-arg is given I add a variable \midlineheight to
  104. %          calculate the used space. To calculate \midlineheight I
  105. %          take the \baselineskip, which is active when the supertabular
  106. %          starts (\baselineskip includes the \value of \baselinestretch)
  107. %          and multiply it with \arraystretch.
  108. %         -When a p-arg is given the text will be stored in a box. So
  109. %          I know the height I have to add. Also I reduce the maximum
  110. %          pagesize, so that the last parbox on a page can get up to
  111. %          max 4 lines without producing an overfull vbox.
  112. %         -To do so I had to make some additions to LaTeX's tabular
  113. %          commands. These new commands got a leading `s'.
  114. %
  115. %          Weak points:
  116. %          -When the material of a normal entry (not a p-arg) becomes
  117. %           larger than the estimated \midlineheight, overfull vboxes
  118. %           will be produced at all.
  119. %          -When the last p-arg on a page gets more than 4 lines
  120. %           (probably even more than 3 lines) it will result in an
  121. %           overfull vbox.
  122. %           Also some combinations of \baselinestretch \arraystretch and
  123. %           a large font may lead to one line too much.
  124. %          -if accidentally the last line of the tabular produces
  125. %           a newpage, on the next page the tabletail will be written
  126. %           immediately after the tablehead. Depending on the contents
  127. %           this may result in an error message regarding misplaced
  128. %           \noalign.
  129. %
  130. %           A quick but not very elegant solution: shrink \maxsize by
  131. %           \noalign{\global\maxsize=...pt} after the first \\ of the
  132. %           supertabular.
  133. %
  134. %------------------------------------------------------------------------------ 
  135. % Added the user-commands \topcaption and \bottomcaption which set the boolean
  136. % @topcaption to determine where to put the tablecaption. The default
  137. % is to put the caption on the top of the table
  138. %
  139. \newif\if@topcaption \@topcaptiontrue
  140. \def\topcaption{\@topcaptiontrue\tablecaption}
  141. \def\bottomcaption{\@topcaptionfalse\tablecaption}
  142. %
  143. % Added the command \tablecaption, with the use of the definition
  144. % of the \caption and \@caption commands from latex.tex.
  145. % This command has to function exactly like \caption does except it
  146. % has to store its argument (and the optional argument) for later
  147. % processing WITHIN the supertabular environment
  148. % JB
  149. %
  150. \long\def\tablecaption{\refstepcounter{table} \@dblarg{\@xtablecaption}}
  151. \long\def\@xtablecaption[#1]#2{%
  152.   \long\gdef\@process@tablecaption{\@stcaption{table}[#1]{#2}}}
  153. \global\let\@process@tablecaption\relax
  154. %
  155. %
  156. % This is a redefinition of LaTeX's \@caption, \@makecaption is
  157. % called within a group so as not to return to \normalsize globally.
  158. % also a fix is made for the `feature' of the \@makecaption of article.sty and
  159. % friends that a caption ALWAYS gets a \vskip 10pt at the top and