File: array.4ht

package info (click to toggle)
tex4ht 20011214-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,272 kB
  • ctags: 992
  • sloc: xml: 17,548; ansic: 9,389; makefile: 129; sh: 43; sed: 8
file content (142 lines) | stat: -rw-r--r-- 5,048 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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