78.12 Tables

[c]   \cc:table \c:tableCell ##\d:tableCell \tabskip \LeftTabskip & 
[g-|] \g:tableCell \hfil \startglobalTABLEcolor \vrule \!thWidth 4\!taLTU 
       ##\hfil \s topglobalTABLEcolor 
       \tabskip 8.81241pt plus 1.5fil minus 4.4062pt\relax \d:tabl eCell & 
[a-R] \hfil \a:tableCell \raggedleft ##\b:tableCell \empty & 
[g-|] \g:tableCell \hf il \startglobalTABLEcolor 
      \vrule \!thWidth 4\!taLTU ##\hfil 
      \stopglobalTABLEcol or \relax \h:tableCell & 
[a-R] \hfil \a:tableCell \raggedleft ##\b:tableCell \empty & 
[g-|] \g:tableCell \hfil \startglobalTABLEcolor 
      \vrule \!thWidth 4\!taLTU ##\hfil \s topglobalTABLEcolor \relax 
      \h:tableCell & 
[a-L] \empty \a:tableCell \raggedright ##\f :tableCell \hfil & 
[g-|] \g:tableCell \hfil \startglobalTABLEcolor \vrule 
      \!thWidth 4 \!taLTU ##\hfil \stopglobalTABLEcolor \relax \h:tableCell & 
[a-P] \hfil \a:tableCell  \BeginTableParBox {1.25in}##\EndTableParBox 
      \b:tableCell \hfil & 
[g-|] \g:tableCell \ hfil \startglobalTABLEcolor \vrule 
      \!thWidth 4\!taLTU ##\hfil 
      \stopglobalTABLEc olor \relax 
      \h:tableCell \tabskip \RightTabskip & 
[e]   \e:tableCell ##\f:tableCell \ tabskip 0pt \cr 
 
a: cell-1 
c: cell-2 
e: cell-3 
g: cell-4 

THe c-cells seem to be ignored

<..context with special chars..>
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \def\putVBorder{\expandafter\put:VBorder\VBorder</>!*?: }
 \def\put:VBorder#1</#2>#3!*?: {\def\:temp{#2}\ifx\:temp\empty
      \HCode{\VBorder}%
      \def\:temp{#1}\ifx\:temp\empty \else\HCode{</colgroup>}\fi
      \HCode{<colgroup><col/></colgroup>}%
   \else  \def\:temp{\put:VBorder#3!*?: }\expandafter\:temp\fi
 }
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 -_-_-

currentTABLEcolumn, maxTABLEcolumn

<..context thrd-tab, core-tab..>
 \gdef\cc:table{\c:table}
 
 \NewConfigure{tableCell}{5}
 \def\showbaselines
   {\testrulewidth\defaulttestrulewidth
    \EveryPar{\HtmlPar\ruledbaseline}}
 
 \NewConfigure{table}{6}
 \def\:tempc{%
    \ifnum \!taColumnNumber>0
        \expandafter\!taDataColumnTemplate\expandafter
           {\expandafter\a:tableCell
            \the\!taDataColumnTemplate\x:tableCell}%
 \expandafter\let\expandafter\:temp
                      \csname preamble-\the\!taColumnNumber\endcsname
        \expandafter\expandafter\expandafter\!taDataColumnTemplate
        \expandafter\expandafter\expandafter
           {\expandafter\:temp
            \the\!taDataColumnTemplate\x:tableCell}%
 \expandafter\let\csname preamble-\the\!taColumnNumber\endcsname\:UnDef
    \fi
    \o:!tfAdjoinPriorColumn:
 }
 \HLet\!tfAdjoinPriorColumn=\:tempc
 
 \def\!ttDoHalign
   {\baselineskip \zeropoint
    \lineskiplimit\zeropoint
    \lineskip     \zeropoint
    \tabskip      \zeropoint
    \HRestore\noalign
    \a:table
    \TeXhalign \the\!taTableSpread \bgroup
    \span\the\!taPreamble }
 
 \def\finishTABLE
   {\chuckTABLEautorow
    \unskip\dd:table\crcr
    \egroup \b:table \expandafter\:gobble
    \EndTable
    \global\intablefalse
    \egroup}
 
 \def\finishTABLErow
   {\dd:table\crcr
    \TABLEnoalign
      {\nobreak
       \setTABLEaction\TABLEunknown
       \setTABLEerror\TABLEunknown
       \globalletempty\checkTABLEautorow
       \globalletempty\chuckTABLEautorow
       \global\currentTABLEcolumn\zerocount}}
 
 
 \def\endofTABLEline[#1][#2->#3]#4#5%
   {\ifx#2#3\else
      \writestatus\m!TABLE{\string#2\space changed into \string#3}%
    \fi
    \iftracetables
      \bgroup
      \tttf\space
      \ifnum\TABLEerror=\TABLEunknown
        \ifx#2#3\else\string#2->\fi
      \else
        ->%
      \fi
      \color[#1]{\string#3}%
      \ifsplittables\space\the\TABLEmaxheight/\the\TABLEheight\fi
      \ifx\TABLEgraylineerror\empty
        \space\TABLEgraylinestatus
      \else
        \space\TABLEgraylineerror
      \fi
      \egroup
    \else\ifx\TABLEgraylineerror\empty \else   \fi\fi
    \globalletempty\TABLEgraylinestatus
    \globalletempty\TABLEgraylineerror
    \expandafter\normalTABLElineformat#4#5\dd:table\crcr
    \TABLEnoalign{\nobreak\global\setTABLEactiontrue}}
 
 
 
 \def\!ttDoZero#1{\dd:table\cr}
 
 \def\!ttDoPlus#1#2#3{% #1 eats the +
   \AugmentedTableStrut{#2}{#3}%
   \dd:table\cr}
 
 % DO STANDARD: Insert standard table strut
 \def\!ttDoStandard{%
   \StandardTableStrut
   \dd:table\cr}
 
 
 \def\!tfFinishFormat{%
   \ifnum \TracingFormats>0
     \!thMessage{%
       \space \space r: \the\!taOldRuleColumnTemplate
         \tabskip \the\RightTabskip}%
     \!thMessage{%
       \space *c: ##\tabskip 0pt}
   \fi
   \ifnum \!taColumnNumber<2
     \!thError{%
       \ifnum \!taColumnNumber=0
         No
       \else
         Only 1
       \fi
       "|"}%
       {\!thReadErrorMsg\!tfTooFewBarsA
        ^^J\!thReadErrorMsg\!tfTooFewBarsB
        ^^J\!thReadErrorMsg\!tkFixIt}%
   \fi
   \!thToksEdef\!taPreamble={%
     \noexpand\cc:table \noexpand
     \b:tableCell ####\noexpand\x:tableCell\tabskip\LeftTabskip
     &
     \the\!taPreamble \tabskip\RightTabskip
     &
     \noexpand\c:tableCell ####\noexpand\x:tableCell
                                        \tabskip 0pt \noexpand\cr}%
   \ifnum \TracingFormats>1
     \!thMessage{Preamble=\the\!taPreamble}
   \fi
   \ifnum \TracingFormats>2
     \!thMessage{Row Of Widths="\!tfRowOfWidths"}
   \fi
   \!taBeginFormatfalse % Intercepts "|", tabskips, and "."
   \catcode‘\|=13
   \catcode‘\"=13
   \!ttDoHalign}
 
 
 
 
 \def\!tfSetVrule
   {\!thToksEdef\!taRuleColumnTemplate=
       {\noexpand\d:tableCell
        \noexpand\hfil
        \noexpand\startglobalTABLEcolor % added
        \noexpand\vrule
        \noexpand\!thWidth
        \ifnum\!tgCode=\plusone
          \ifx\!tgValue\empty
            \the\LineThicknessFactor
          \else
            \!tgValue
          \fi
          \!taLTU
        \else
          \!tgValue
        \fi
        ####%
        \noexpand\hfil
        \noexpand\stopglobalTABLEcolor % added
        \the\!taRuleColumnTemplate
        \relax \noexpand\x:tableCell
    }%
   \!tfAdjoinPriorColumn}
 
 
 \NewConfigure{VBorder}{4}
 
 \HAssign\NewGroup=0
 \HAssign\Next:TableNo=0
 \HAssign\ar:cnt=0
 
 
 \let\:mALIGN\empty \let\hT:D\empty
 
 \pend:defI\ReadFormatKeys{%
    \expandafter\ifx\csname preamble-\the\!taColumnNumber\endcsname\relax
    \expandafter\def\csname preamble-\the\!taColumnNumber\endcsname{%
         \let\:mALIGN\empty \def\hT:D{\csname \string ##1:T:D\endcsname}}%
    \fi
    \:FormatKey
 }
 
 \let\:FormatKey=\empty
 \NewConfigure{FormatKey}[2]{%
    \def\:temp{#1#2}\ifx \:temp\empty  \let\:FormatKey=\empty
    \else
       \append:def\:FormatKey{\def\:tempa{#1}\ifx \:temp\:tempa
          #2%
       \fi }%
    \fi
 }
 
 \Configure{FormatKey}{l}{\add:ar<}
 \Configure{FormatKey}{r}{\add:ar>}
 \Configure{FormatKey}{c}{\add:ar-}
 \Configure{FormatKey}{p}{\d:VBorder}
 \Configure{FormatKey}{|}{\b:VBorder}
 \pend:def\BeginFormat{\add:ar-}
 
 \let\HAlign=\empty
 \def\add:ar#1{\HAdvance\ar:cnt by 1
    \def\ch:class{#1}%
    \c:VBorder
    \edef\HAlign{\HAlign 0 \ar:cnt\space #1 }}
 
 \def\!ttDoZero#1{\dd:table\cr}
 \def\!ttDoPlus#1#2#3{%
   \AugmentedTableStrut{#2}{#3}%
   \dd:table \cr}
 \def\!ttDoStandard{%
   \StandardTableStrut
   \dd:table \cr}
 
 \def\normalTABLElongrule{\a:TABLElongrule}
 \NewConfigure{TABLElongrule}{1}
 
 \def\simpleTableHL{\a:TableHL}
 \NewConfigure{TableHL}{1}
 -_-_-