home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fonts 1 / freshfonts1.bin / programs / amiga / pastex / macros / misc / array.sty < prev    next >
Text File  |  1994-05-20  |  13KB  |  362 lines

  1. %% 
  2. %% This is file `array.sty', generated 
  3. %% on <1994/5/20> with the docstrip utility (2.0r).
  4. %% 
  5. %% The original source files were:
  6. %% 
  7. %% array.doc  (with options: `style,ncols')
  8. %% 
  9. %% Copyright (C) 1989-1992 by Frank Mittelbach. All rights reserved. 
  10. %% 
  11. %% This file is part of the array package. 
  12. %% 
  13. %% IMPORTANT NOTICE: 
  14. %% 
  15. %% You are not allowed to change this file. You may however copy 
  16. %% this file to a file with a different name and then change the copy 
  17. %% if you obey the restrictions on file changes described in 
  18. %% readme.mz. 
  19. %% 
  20. %% You are NOT ALLOWED to distribute this file alone. You are NOT 
  21. %% ALLOWED to take money for the distribution or use of this file (or 
  22. %% a changed version) except for a nominal charge for copying etc. 
  23. %% 
  24. %% You are allowed to distribute this file under the condition that 
  25. %% it is distributed together with all files mentioned in readme.mz5. 
  26. %% 
  27. %% If you receive only some of these files from someone, complain! 
  28. %% 
  29. %% However, if these files are distributed by established suppliers 
  30. %% as part of a complete TeX distribution, and the structure of the 
  31. %% distribution would make it difficult to distribute the whole set 
  32. %% of files, *those parties* are allowed to distribute only some of 
  33. %% the files provided that it is made clear that the user will get a 
  34. %% complete distribution-set upon request to that supplier (not me). 
  35. %% Notice that this permission is not granted to the end user. 
  36. %% 
  37. %% 
  38. %% For error reports in case of UNCHANGED versions see readme.mz 
  39. %% 
  40.  
  41. \def\fileversion{v2.1b}
  42. \def\filedate{92/07/06}
  43. \def\docdate {92/09/12}
  44.  
  45. %% \CheckSum{1070}
  46. %% \CharacterTable
  47. %%  {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
  48. %%   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
  49. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  50. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  51. %%   Dollar        \$     Percent       \%     Ampersand     \&
  52. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  53. %%   Asterisk      \*     Plus          \+     Comma         \,
  54. %%   Minus         \-     Point         \.     Solidus       \/
  55. %%   Colon         \:     Semicolon     \;     Less than     \<
  56. %%   Equals        \=     Greater than  \>     Question mark \?
  57. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  58. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  59. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  60. %%   Right brace   \}     Tilde         \~}
  61. %%
  62. %% Style-option `array' to use with LaTeX v2.09
  63. %% Copyright (C) 1989-1992 Frank Mittelbach, all rights reserved.
  64. \@ifundefined{d@llarbegin}{}{\endinput}
  65. \typeout{Style-Option: `array' \fileversion
  66.          \space\space <\filedate> (F.M.)}
  67. \typeout{English documentation dated \space <\docdate> (F.M.)}
  68. \def\@addtopreamble#1{\xdef\@preamble{\@preamble #1}}
  69. \def\@testpach{\@chclass
  70.  \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  71.   \ifnum \@lastchclass=7 5 \else
  72.    \ifnum \@lastchclass=8 \tw@ \else
  73.     \ifnum \@lastchclass=9 \thr@@
  74.    \else \z@
  75.    \ifnum \@lastchclass = 10 \else
  76.    \edef\@nextchar{\expandafter\string\@nextchar}%
  77.    \@chnum
  78.    \if \@nextchar c\z@ \else
  79.     \if \@nextchar l\@ne \else
  80.      \if \@nextchar r\tw@ \else
  81.    \z@ \@chclass
  82.    \if\@nextchar |\@ne \else
  83.     \if \@nextchar !6 \else
  84.      \if \@nextchar @7 \else
  85.       \if \@nextchar <8 \else
  86.        \if \@nextchar >9 \else
  87.   10
  88.   \@chnum
  89.   \if \@nextchar m\thr@@\else
  90.    \if \@nextchar p4 \else
  91.     \if \@nextchar b5 \else
  92.    \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
  93.    \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
  94. \def\@xexpast#1*#2#3#4\@@{%
  95.    \@tempcnta #2
  96.    \toks@={#1}\@temptokena={#3}%
  97.    \let\the@toksz\relax \let\the@toks\relax
  98.    \def\@tempa{\the@toksz}%
  99.    \ifnum\@tempcnta >0 \@whilenum\@tempcnta >0\do
  100.      {\edef\@tempa{\@tempa\the@toks}\advance \@tempcnta \m@ne}%
  101.        \let \@tempb \@xexpast \else
  102.        \let \@tempb \@xexnoop \fi
  103.    \def\the@toksz{\the\toks@}\def\the@toks{\the\@temptokena}%
  104.    \edef\@tempa{\@tempa}%
  105.    \expandafter \@tempb \@tempa #4\@@}
  106. \def\prepnext@tok{\advance \count@ \@ne
  107.    \toks\count@{}}
  108. \def\save@decl{\toks\count@ \expandafter{\@nextchar}}
  109. \def\insert@column{%
  110.    \the@toks \the \@tempcnta
  111.    \ignorespaces \@sharp \unskip
  112.    \the@toks \the \count@ \relax}
  113. \newdimen\col@sep
  114. \def\@acol{\@addtopreamble{\hskip\col@sep}}
  115. \def\@mkpream#1{\gdef\@preamble{}\@lastchclass 4 \@firstamptrue
  116.    \let\@sharp\relax \let\@startpbox\relax \let\@endpbox\relax
  117.    \@xexpast #1*0x\@@
  118.    \count@\m@ne
  119.    \let\the@toks\relax
  120.    \prepnext@tok
  121.    \expandafter \@tfor \expandafter \@nextchar
  122.     \expandafter :\expandafter =\@tempa \do
  123.    {\@testpach
  124.    \ifcase \@chclass \@classz \or \@classi \or \@classii
  125.      \or \save@decl \or \or \@classv \or \@classvi
  126.      \or \@classvii \or \@classviii  \or \@classix
  127.      \or \@classx \fi
  128.    \@lastchclass\@chclass}%
  129.    \ifcase\@lastchclass
  130.    \@acol \or
  131.    \or
  132.    \@acol \or
  133.    \@preamerr \thr@@ \or
  134.    \@preamerr \tw@ \@addtopreamble\@sharp \or
  135.    \or
  136.    \else  \@preamerr \@ne \fi
  137.    \def\the@toks{\the\toks}}
  138. \def\@classx{%
  139.   \ifcase \@lastchclass
  140.   \@acolampacol \or
  141.   \@addamp \@acol \or
  142.   \@acolampacol \or
  143.   \or
  144.   \@acol \@firstampfalse \or
  145.   \@addamp
  146.   \fi}
  147. \def\@classz{\@classx
  148.    \@tempcnta \count@
  149.    \prepnext@tok
  150.    \@addtopreamble{\ifcase \@chnum
  151.       \hfil
  152.       \d@llarbegin
  153.       \insert@column
  154.       \d@llarend \hfil \or
  155.       \d@llarbegin \insert@column \d@llarend \hfil \or
  156.       \hfil\kern\z@ \d@llarbegin \insert@column \d@llarend \or
  157.    $\vcenter
  158.    \@startpbox{\@nextchar}\insert@column \@endpbox $\or
  159.    \vtop \@startpbox{\@nextchar}\insert@column \@endpbox \or
  160.    \vbox \@startpbox{\@nextchar}\insert@column \@endpbox
  161.   \fi}\prepnext@tok}
  162. \def\@classix{\ifnum \@lastchclass = \thr@@
  163.        \@preamerr \thr@@ \fi
  164.        \@classx}
  165. \def\@classviii{\ifnum \@lastchclass >\z@
  166.       \@preamerr 4\@chclass 6 \@classvi \fi}
  167. \def\@arrayrule{\@addtopreamble \vline}
  168. \def\@classvii{\ifnum \@lastchclass = \thr@@
  169.    \@preamerr \thr@@ \fi}
  170. \def\@classvi{\ifcase \@lastchclass
  171.       \@acol \or
  172.       \@addtopreamble{\hskip \doublerulesep}\or
  173.       \@acol \or
  174.       \@classvii
  175.       \fi}
  176. \def\@classii{\advance \count@ \m@ne
  177.    \save@decl\prepnext@tok}
  178. \def\@classv{\save@decl
  179.    \@addtopreamble{\d@llarbegin\the@toks\the\count@\relax\d@llarend}%
  180.    \prepnext@tok}
  181. \def\@classi{\@classvi
  182.    \ifcase \@chnum \@arrayrule \or
  183.       \@classv \fi}
  184. \def\@startpbox#1{\bgroup
  185.   \hsize #1 \@arrayparboxrestore
  186.    \vrule \@height \ht\@arstrutbox \@width \z@}
  187. \def\@endpbox{\vrule \@width \z@ \@depth \dp \@arstrutbox \egroup}
  188. \def\@array[#1]#2{%
  189.   \@tempdima \ht \strutbox
  190.   \advance \@tempdima by\extrarowheight
  191.   \setbox \@arstrutbox \hbox{\vrule
  192.              \@height \arraystretch \@tempdima
  193.              \@depth \arraystretch \dp \strutbox
  194.              \@width \z@}%
  195.   \begingroup
  196.   \@mkpream{#2}%
  197.   \xdef\@preamble{\ialign \@halignto
  198.                   \bgroup \@arstrut \@preamble
  199.                           \tabskip \z@ \cr}%
  200.   \endgroup
  201.   \@arrayleft
  202.   \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
  203.   \bgroup
  204.   \let \@sharp ##\let \protect \relax
  205.   \lineskip \z@
  206.   \baselineskip \z@
  207.   \m@th
  208.   \let\\ \@arraycr  \let\par\@empty \@preamble}
  209. \newdimen \extrarowheight
  210. \extrarowheight=0pt
  211. \def\@arstrut{\unhcopy\@arstrutbox}
  212. \def\@arraycr{{\ifnum 0=`}\fi
  213.   \@ifstar \@xarraycr \@xarraycr}
  214. \def\@xarraycr{\@ifnextchar [%
  215.   \@argarraycr {\ifnum 0=`{\fi}\cr}}
  216. \def\@argarraycr[#1]{\ifnum0=`{\fi}\ifdim #1>\z@
  217.   \@xargarraycr{#1}\else \@yargarraycr{#1}\fi}
  218. \def\@xargarraycr#1{\unskip
  219.   \@tempdima #1\advance\@tempdima \dp\@arstrutbox
  220.   \vrule \@depth\@tempdima \@width\z@ \cr}
  221. \def\@yargarraycr#1{\cr\noalign{\vskip #1}}
  222. \def\multicolumn#1#2#3{%
  223.    \multispan{#1}\begingroup
  224.    \def\@addamp{\if@firstamp \@firstampfalse \else
  225.                 \@preamerr 5\fi}%
  226.    \@mkpream{#2}\@addtopreamble\@empty
  227.    \endgroup
  228.    \def\@sharp{#3}%
  229.    \@arstrut \@preamble \ignorespaces}
  230. \let\d@llarbegin\begingroup
  231. \let\d@llarend\endgroup
  232. \def\array{\col@sep\arraycolsep
  233.   \def\d@llarbegin{$}\let\d@llarend\d@llarbegin\gdef\@halignto{}%
  234.   \@tabarray}
  235. \def\@tabarray{\@ifnextchar[{\@array}{\@array[c]}}
  236. \def\tab