3.5 Tables and Arrays

  3.5.1 LaTeX Tabular and Array
  3.5.2 LaTeX Tabule
  3.5.3 multirow
  3.5.4 tabulary
  3.5.5 Mdwtab

3.5.1 LaTeX Tabular and Array

<..32,4 latex..>
 \:CheckOption{pic-tabular}  \if:Option
    \ConfigureEnv{tabular}
      {\IgnorePar\EndP\Tg<div class="pic-tabular">\Picture*{}}
      {\EndPicture\Tg</div>}{}{}
    \Css{div.pic-tabular {text-align:center;}}
 \else
    \Log:Note{for pictorial tabular,
                       use the command line option ‘pic-tabular’}
 \fi
-_-_-

<..math html latex array/tabular..>
 \:CheckOption{pic-array}  \if:Option \else
    \Log:Note{for pictorial array,
                       use the command line option ‘pic-array’}
    \ConfigureEnv{array}
      {\IgnorePar\EndP\PushStack\Col:Marg\AllColMargins
           \HCode{<div class="array">}}
      {\HCode{</div>}\PopStack\Col:Marg\AllColMargins\ShowPar}{}{}
    \Css{div.array {text-align:center;}}
 \fi
-_-_-

<..html latex array/tabular Config 4.0t..>
 \:CheckOption{pic-tabular}  \if:Option \else
    \ConfigureEnv{tabular}
      {<.configure tabular noalign.>%
       \IgnorePar<.inline comment.>\EndP\HCode{<div class="tabular">}%
       \PushStack\Col:Marg\AllColMargins
      }
      {\HCode{</div>}\PopStack\Col:Marg\AllColMargins\ShowPar
       <.configure clear noalign.>%
       <.try env inline par.>%
      }{}{}
    \Css{div.tabular, div.center div.tabular {text-align: center;
            margin-top:0.5em; margin-bottom:0.5em;  }}
    \Css{table.tabular td  p{margin-top:0em;}}
    \Css{table.tabular {margin-left: auto;
                        margin-right: auto;}}     centering 
 \fi
 \Css{td p:first-child{ margin-top:0em; }}
 \Css{td p:last-child{ margin-bottom:0em; }}
-_-_-

3.5.2 LaTeX Tabule

<..article,report,book..>
 \ConfigureEnv{table}
    {\ifvmode \IgnorePar\fi \EndP \HCode{<div class="table">}}
    {\ifvmode \IgnorePar\fi \EndP \HCode{</div>}\par\ShowPar}
    {}{}
-_-_-

3.5.3 multirow

<..configure html4 multirow..>
 \Configure{multirow}
     {\HCode{<div class="multirow"><!-- rows=\the\@tempcnta\space -->}}
     {\HCode{</div>}}
-_-_-

3.5.4 tabulary

<..configure html4 tabulary..>
 \Configure{halignTD} {}{}
    {<}{\HCode{ style="white-space:nowrap; text-align:left;"}}
    {-}{\HCode{ style="white-space:nowrap; text-align:center;"}}
    {>}{\HCode{ style="white-space:nowrap; text-align:right;"}}
    {l}{\HCode{ style="white-space:nowrap; text-align:left;"}}
    {c}{\HCode{ style="white-space:nowrap; text-align:center;"}}
    {r}{\HCode{ style="white-space:nowrap; text-align:right;"}}
    {^}{\HCode{ style="white-space:nowrap; vertical-align:top";}}
    {=}{\HCode{ style="vertical-align:baseline; white-space:nowrap;"}}
    {|}{\HCode{ style="vertical-align:middle; white-space:nowrap;"}}
    {_}{\HCode{ style="vertical-align:bottom; white-space:nowrap;"}}
    {p}{\HCode{ style="white-space:wrap; text-align:left;"}}
    {m}{\HCode{ style="white-space:nowrap; text-align:left; vertical-align:middle;"}}
    {b}{\HCode{ style="white-space:wrap; text-align:left; vertical-align:baseline;"}}
    {L}{\HCode{ style="white-space:wrap; text-align:left;"}}
    {R}{\HCode{ style="white-space:wrap; text-align:right;"}}
    {C}{\HCode{ style="white-space:wrap; text-align:center;"}}
    {J}{\HCode{ style="white-space:wrap;"}}
    {}
-_-_-

<..configure html4 tabulary..>+
 \ConfigureEnv{tabulary}
   {<.configure tabular noalign.>%
    \IgnorePar<.inline comment.>\EndP\HCode{<div class="tabular">}%
    \PushStack\Col:Marg\AllColMargins
   }
   {\HCode{</div>}\PopStack\Col:Marg\AllColMargins\ShowPar
       <.configure clear noalign.>%
       <.try env inline par.>%
   }{}{}
-_-_-

<..configure html4 tabulary..>+
    \Configure{tabulary}
       {\ifvmode \IgnorePar\fi \EndP \halignTB{tabulary}\putVBorder }
       {<.insert Clr.>\HCode{</table>}}
       {\HCode{<tr \Hnewline}\halignTR
                             \HCode{ id="TBL-\TableNo-\HRow-">}}
       {\r:HA}
       {\HCode{<td \ifnum \HMultispan>1 colspan="\HMultispan"\fi}%
          \halignTD \HCode{ id="TBL-\TableNo-\HRow-\HCol"
          \Hnewline class="td}<.tabular td align.>%
          \HCode{">}<.start array par box.>\PushStack\Table:Stck\TableNo}
       {<.end array par box.>\PopStack\Table:Stck\TableNo \d:HA}
-_-_-

<..tabular td align..>
 \NoFonts
            \bgroup
               \ifx \ttfamily\:UnDef \else \ttfamily\fi
               \ColMargins
            \egroup
 \EndNoFonts
-_-_-

<..configure html4 tabulary..>+
 \Configure{halignTB<>}{tabulary}{\HCode{id="TBL-\TableNo" class="tabulary"\Hnewline
    cellspacing="0" cellpadding="0" \GROUPS\Hnewline
    }<>\HAlign}
 \Css{table[rules] {border-left:solid black 0.4pt;
                    border-right:solid black 0.4pt; }}
-_-_-

3.5.5 Mdwtab

<..configure html4 mdwtab..>
 \Configure{smarray}
    {\ifvmode \IgnorePar\fi \EndP\halignTB{smarray}\putVBorder}
    {<.insert Clr.>\HCode{</table>}}
    {\R:HA}
    {\r:HA}
    {\D:HA\HCode{<div class="td}<.tabular td align.>%
          \HCode{">}<.start array par box.>\pic:env}
    {<.end array par box.>\HCode{</div>}\d:HA}
 \Configure{halignTB<>}
    {smarray}
    {\HCode{id="TBL-\TableNo" class="smarray"\Hnewline
            cellpadding="0"
            cellspacing="0" \GROUPS\Hnewline
           }<>\HAlign
    }
-_-_-

<..configure html4 mdwtab..>+
 \Configure{tabular*}
    {\a:tabular}
    {\b:tabular}
    {\c:tabular}
    {\d:tabular}
    {\e:tabular}
    {\f:tabular}
-_-_-