%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% array.4ht                            2001-12-14-17:07 %
% Copyright (C) 1997--2001      Eitan M. Gurari         %
%                                                       %
% This program can redistributed and/or modified under  %
% the terms of the LaTeX Project Public License         %
% Distributed from CTAN archives in directory           %
% macros/latex/base/lppl.txt; either version 1 of the   %
% License, or (at your option) any later version.       %
%                                                       %
% However, you are allowed to modify this program       %
% without changing its name, if you modify its          %
% signature. Changes to the signature can be introduced %
% with a directive of the form                          %
%            \message{signature}                        %
%                                                       %
%                             gurari@cis.ohio-state.edu %
%                 http://www.cis.ohio-state.edu/~gurari %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2001-12-14-17:07}


\def\@tabular{\leavevmode
  \hbox \bgroup \:@tabular:
      $\col@sep\tabcolsep \let\d@llarbegin\begingroup
                                    \let\d@llarend\endgroup
  \@tabarray}
\pend:def\@tabular{\let\@array:a\a:tabular \let\@array:b\b:tabular
   \let\@array:c\c:tabular \let\@array:d\d:tabular
   \let\@array:e\e:tabular \let\@array:f\f:tabular }
\def\:temp[#1]#2{%
  \def\Clr{#2}\a:VBorder
\HAssign\ar:cnt0
\let\HAlign\empty
%
  \@tempdima \ht \strutbox
  \advance \@tempdima by\extrarowheight
  \setbox \@arstrutbox \hbox{\vrule
             \@height \arraystretch \@tempdima
             \@depth \arraystretch \dp \strutbox
             \@width \z@}%
  \begingroup
    \@mkpream{#2}%
    \xdef\@preamble{%
        \everycr{}\tabskip\z@skip\noexpand\MkHalign\noexpand\@sharp
   {\@arstrut \@preamble \tabskip\z@skip}%
}%
  \endgroup
  \@arrayleft
  \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
  \bgroup
    \let \protect \relax  \lineskip \z@
    \baselineskip \z@ \m@th
    \let\\\@arraycr \let\tabularnewline\\\let\par\@empty
    \ifx \EndPicture\:UnDef
       \SaveMkHalignConfig  \let\sv:ALIGN\HAlign
       \ifx \recall:ar\:UnDef
   \pend:def\@array{\recall:ar}%
   \edef\recall:ar{%
      \noexpand\ifx \noexpand\EndPicture\noexpand\:UnDef \noexpand\else
         \arrayrulewidth\the\arrayrulewidth
         \doublerulesep\the\doublerulesep
         \arraycolsep\the\arraycolsep
         \tabcolsep\the\tabcolsep
      \noexpand\fi }%
\fi
\arrayrulewidth\z@  \doublerulesep\z@
\arraycolsep\z@     \tabcolsep\z@
\Configure{MkHalign}{\@array:a}{\@array:b}\@array:c
   \@array:d{\@array:e\RecallMkHalignConfig\recall:ar}\@array:f
%
       \Configure{MkHalign}{\@array:a}{\@array:b}\@array:c
     \@array:d{\@array:e \global \let\HAlign\sv:ALIGN
          \RecallMkHalignConfig\recall:ar}\@array:f
%
    \else \let\@sharp##\fi  
    \@preamble}
\HLet\@array\:temp
\HLet\@@array\@array
\def\endarray{\enda:rray}
\def\endtabular{\enda:rray $\egroup}
\def\enda:rray{\crcr\ifx \EndPicture\:UnDef \EndMkHalign
   \else \egroup\fi  \egroup \@arrayright \gdef\@preamble{}}
\expandafter \let \csname endtabular*\endcsname\endtabular
\def\:tempc{\@chclass
 \ifnum \@lastchclass=6 \@ne \@chnum \@ne \else
  \ifnum \@lastchclass=7 5 \else
   \ifnum \@lastchclass=8 \tw@ \else
    \ifnum \@lastchclass=9 \thr@@
   \else \z@
   \ifnum \@lastchclass = 10 \else
   \edef\@nextchar{\expandafter\string\@nextchar}%
   \@chnum
   \if \@nextchar c\z@ \add:ar-\else
    \if \@nextchar l\@ne \add:ar<\else
     \if \@nextchar r\tw@ \add:ar>\else
   \z@ \@chclass
   \if\@nextchar |\@ne \b:VBorder\else
    \if \@nextchar !6 \else
     \if \@nextchar @7 \d:VBorder\else
      \if \@nextchar <8 \else
       \if \@nextchar >9 \else
  10
  \@chnum
  \if \@nextchar m\thr@@ \add:ar m\else
   \if \@nextchar p4 \add:ar p\else
    \if \@nextchar b5 \add:ar b\else
   \z@ \@chclass \z@ \@preamerr \z@ \fi \fi \fi \fi
   \fi \fi  \fi  \fi  \fi  \fi  \fi \fi \fi \fi \fi \fi}
\HLet\@testpach\:tempc
\def\add:ar#1{\gHAdvance\ar:cnt by 1
   \def\ch:class{#1}%
\c:VBorder
   \xdef\HAlign{\HAlign 0 \ar:cnt\space #1 }}
\def\HColAlign{\expandafter \ifx\csname
   \expandafter\string\ch:class :T:D\endcsname\relax \else \csname
   \expandafter\string\ch:class :T:D\endcsname\fi}

\long\def\:temp#1#2#3{%
   \multispan{#1}\begingroup
     \let\sv:ALIGN\HAlign \let\ar:cnt:\ar:cnt
     \def\@addamp{\if@firstamp \@firstampfalse \else
                \@preamerr 5\fi}%
     \let\HAlign\empty  \@mkpream{#2}%
\ifx \EndPicture\:UnDef
   \def\:temp##1 ##2 ##3 {##3}%
   \xdef\new:span{\new:span\HRow.\HCol\expandafter\:temp\HAlign;}%
\fi
\@addtopreamble\@empty
     \global\let\HAlign\sv:ALIGN  \global\let\ar:cnt\ar:cnt:
     \global\let\ch:class\ch:class
   \endgroup
   \def\@sharp{\a:multicolumn#3\b:multicolumn}%
   \@arstrut \@preamble
   \null
   \ignorespaces}
\HLet\multicolumn\:temp


\Hinput{array}
\endinput

