diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/core-ntb.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/core-ntb.tex | 83 |
1 files changed, 58 insertions, 25 deletions
diff --git a/Master/texmf-dist/tex/context/base/core-ntb.tex b/Master/texmf-dist/tex/context/base/core-ntb.tex index 4e7f0d8a4cd..75c3b55405e 100644 --- a/Master/texmf-dist/tex/context/base/core-ntb.tex +++ b/Master/texmf-dist/tex/context/base/core-ntb.tex @@ -110,7 +110,9 @@ \def\@@tblprefix{tbl:} \let\@@rawtblprefix\@@tblprefix -%D This should be done more efficient: +%D This should be done more efficient: soon + +% \let as well as \expandafter\edef's \def\settbltag#1#2#3{\setevalue{\@@tblprefix#1:#2:s}{#3}} % \number#3 \def\settblcol#1#2#3{\setevalue{\@@tblprefix#1:#2:c}{#3}} @@ -253,54 +255,85 @@ \let\setupTBLsection\relax +% \setupTABLE [y] [first][background=color,backgroundcolor=blue,frame=off,bottomframe=on,topframe=on,framecolor=white] +% \setupTABLE [first][first][backgroundcorner=2,corner=10,frame=on] +% \setupTABLE [last] [first][backgroundcorner=4,corner=12,frame=on] + +% \setupTABLE [row] [each] [background=color,backgroundcolor=blue,frame=on,framecolor=white] +% \setupTABLE [first][2] [corner=8] +% \setupTABLE [last] [2] [corner=5] +% \setupTABLE [first][last] [corner=7] +% \setupTABLE [last] [last] [corner=6] + +% \startTEXpage +% \bTABLE[frame=off,align=middle] +% \bTR \bTD one \eTD \bTD two \eTD \bTD three \eTD \eTR +% \bTR \bTD first \eTD \bTD second \eTD \bTD third \eTD \eTR +% \bTR \bTD alpha \eTD \bTD beta \eTD \bTD gamma \eTD \eTR +% \eTABLE +% \stopTEXpage + \def\setupTBLcell#1#2% cell over col over row {\setupTBLsection % already forgotten \edef\positiverow{\number#1}% \edef\positivecol{\number#2}% - \scratchcounter-\maximumrow\advance\scratchcounter#1\advance\scratchcounter\minusone - \edef\negativerow{\number\scratchcounter}% - \scratchcounter-\maximumcol\advance\scratchcounter#2\advance\scratchcounter\minusone - \edef\negativecol{\number\scratchcounter}% - \getvalue{\@@tblprefix\v!each\v!each}% - \getvalue{\@@tblprefix\c!y\v!each}% - \getvalue{\@@tblprefix\c!x\v!each}% - \getvalue{\@@tblprefix\c!y\v!oddeven\positiverow}% - \getvalue{\@@tblprefix\c!x\v!oddeven\positivecol}% - \getvalue{\@@tblprefix\c!x\v!oddeven\positivecol\c!y\v!oddeven\positiverow}% + \edef\negativerow{\the\numexpr-\maximumrow+#1+\minusone\relax}% + \edef\negativecol{\the\numexpr-\maximumcol+#2+\minusone\relax}% + % each each + \csname\@@tblprefix\c!x\v!each\c!y\v!each\endcsname + \csname\@@tblprefix\c!y\v!each\endcsname + \csname\@@tblprefix\c!x\v!each\endcsname + % odd even + \csname\@@tblprefix\c!y\v!oddeven\positiverow\endcsname + \csname\@@tblprefix\c!x\v!oddeven\positivecol\endcsname + \csname\@@tblprefix\c!x\v!oddeven\positivecol\c!y\v!oddeven\positiverow\endcsname + % row/col number combinations + \executeifdefined{\@@tblprefix\c!y\positiverow}\donothing + \executeifdefined{\@@tblprefix\c!y\negativerow}\donothing + \csname\@@tbl\@@tbl\c!extras\endcsname + \letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo + \executeifdefined{\@@tblprefix\c!x\positivecol}\donothing + \executeifdefined{\@@tblprefix\c!x\negativecol}\donothing + \csname\@@tbl\@@tbl\c!extras\endcsname + \letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo + % first/last combinations \ifnum\positiverow=\plusone - \getvalue{\@@tblprefix\c!y\v!first}% + \csname\@@tblprefix\c!y\v!first\endcsname \executeifdefined{\@@tblprefix\c!x\positivecol\c!y\v!first}\donothing \fi \ifnum\positivecol=\plusone - \getvalue{\@@tblprefix\c!x\v!first}% + \csname\@@tblprefix\c!x\v!first\endcsname \executeifdefined{\@@tblprefix\c!x\v!first\c!y\positiverow}\donothing \fi \ifnum\positiverow=\maximumrow\relax - \getvalue{\@@tblprefix\c!y\v!last}% + \csname\@@tblprefix\c!y\v!last\endcsname \executeifdefined{\@@tblprefix\c!x\positivecol\c!y\v!last}\donothing \fi \ifnum\positivecol=\maximumcol\relax - \getvalue{\@@tblprefix\c!x\v!last}% + \csname\@@tblprefix\c!x\v!last\endcsname \executeifdefined{\@@tblprefix\c!x\v!last\c!y\positiverow}\donothing \fi - \ifnum\positiverow=\maximumrow\relax\ifnum\positivecol=\maximumcol\relax - \getvalue{\@@tblprefix\c!x\v!last\c!y\v!last}% + \ifnum\positiverow=\maximumrow\relax \ifnum\positivecol=\maximumcol\relax + \csname\@@tblprefix\c!x\v!last\c!y\v!last\endcsname \fi\fi \ifnum\positiverow=\plusone \ifnum\positivecol=\plusone - \getvalue{\@@tblprefix\c!x\v!first\c!y\v!first}% + \csname\@@tblprefix\c!x\v!first\c!y\v!first\endcsname \fi\fi + \ifnum\positiverow=\plusone \ifnum\positivecol=\maximumcol\relax + \csname\@@tblprefix\c!x\v!last\c!y\v!first\endcsname + \fi\fi + \ifnum\positiverow=\maximumrow\relax \ifnum\positivecol=\plusone + \csname\@@tblprefix\c!x\v!first\c!y\v!last\endcsname + \fi\fi + % header things \ifnum#1>\noftblhdnxlines\else - \executeifdefined{\@@tblprefix\v!header\v!each}\donothing + \executeifdefined{\@@tblprefix\v!header\v!each }\donothing \executeifdefined{\@@tblprefix\v!header\positivecol}\donothing \fi - \executeifdefined{\@@tblprefix\c!y\positiverow}\donothing - \executeifdefined{\@@tblprefix\c!y\negativerow}\donothing - \getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo - \executeifdefined{\@@tblprefix\c!x\positivecol}\donothing - \executeifdefined{\@@tblprefix\c!x\negativecol}\donothing - \getvalue{\@@tbl\@@tbl\c!extras}\letvalue{\@@tbl\@@tbl\c!extras}\relax % new, see x-fo + % explicit cells \executeifdefined{\@@tblprefix\c!x\positivecol\c!y\positiverow}\donothing \executeifdefined{\@@tblprefix\c!x\negativecol\c!y\negativerow}\donothing + % done \global\letcscsname\@@tblsplitafter\csname\@@tbl\@@tbl\c!after\endcsname \relax} |