From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/66 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: colored tables work... almost Date: Fri, 24 Jul 1998 19:16:01 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <35B8C151.B0B562D0@wxs.nl> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035390927 20868 80.91.224.250 (23 Oct 2002 16:35:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:35:27 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: "W.H. Dekker" Xref: main.gmane.org gmane.comp.tex.context:66 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:66 Hello Wybo, First your table: \starttext \unexpanded\def\Check#1 {\setupframed % let op de spatie achter #1 [frame=off, % let op het gebruik van \inlijnd height=fit, offset=1pt, width=2.5em, align=left, background=color]% \hfill \doifnot{#1}{*} % see 'm ? {\ifdim#1pt<-3pt \inframed[backgroundcolor=unsat]{\strut$#1$}% \else\ifdim#1pt<-2pt \inframed[backgroundcolor=quest]{\strut$#1$}% \else\ifdim#1pt>3pt \inframed[backgroundcolor=unsat]{\strut$#1$}% \else\ifdim#1pt>2pt \inframed[backgroundcolor=quest]{\strut$#1$}% \else \inframed[background=]{\strut$#1$} \fi\fi\fi\fi}} \def\JC{\JustCenter} \setupcolors[state=start] \definecolor[unsat][r=1,g=.7,b=.7] \definecolor[quest][r=1,g=.9,b=.9] % \setuptables[VL=none] % Of course this should also be obeyed. \starttable[|l|f{\Check}|f{\Check}|f{\Check}|] \HL \VL \LOW{method} \VL \use3 \JC Laboratory no. \VL\SR \DV \DL[3] \DR \VL \VL \JC 1 \VL \JC 2 \VL \JC 3 \VL\SR \HL \VL PO \VL 25.5 \VL -0.0 \VL -2.8 \VL\FR \VL FFA \VL 2.2 \VL -0.3 \VL 3.3 \VL\MR \VL Ranci \VL 2.3 \VL 0.7 \VL 0.6 \VL\MR \VL NMR 20 \VL 1.9 \VL 0.7 \VL -1.0 \VL\LR \HL \VL \LOW{method} \VL \use3 \JC Laboratory no. \VL\SR \DV \DL[3] \DR \VL \VL \JC 6 \VL \JC 5 \VL \JC 6 \VL\SR \HL \VL PO \VL 1.4 \VL 2.4 \VL * \VL\FR \VL FFA \VL 0.5 \VL -0.8 \VL * \VL\MR \VL Ranci \VL -0.5 \VL * \VL * \VL\MR \VL NMR 20 \VL -0.4 \VL * \VL * \VL\LR \HL \stoptable \stoptext Here is the patch, change this section in core-tab.tex (in fact only a few lines changed): %D \startopsomming[3*ruim] %D \sym{\type{\DL}} %D \sym{\type{\DV}} (\type{\VD}) %D \sym{\type{\DC}} %D \sym{\type{\DR}} %D \stopopsomming \newif\ifTABLEdivision \def\defineTABLEdivisions% {\global\TABLEdivisionfalse % in start \let\DL=\TableDL \let\DC=\TableDC \let\DV=\TableDV \let\VD=\TableDV \let\DR=\TableDR} \def\checkTABLEdivision% {\ifTABLEdivision \else \chuckTABLEautorow \global\currentTABLEcolumn=0 \global\TABLEdivisiontrue \fi} \def\TableDL% {\checkTABLEdivision \complexorsimpleTable{DL}} \def\simpleTableDL% {\complexTableDL[1]} \def\complexTableDL[#1]% {\ifnum\TABLEaction=\TABLErule \writestatus{TABLE}{skipping \string\DL}% \else \ifnum\TABLEaction=\TABLEmidrow \writestatus{TABLE}{change \string\MR\space into \string\LR/\string\SR}% \else\ifnum\TABLEaction=\TABLEfirstrow \writestatus{TABLE}{change \string\MR\space into \string\SR}% \fi\fi \setTABLEaction=\TABLEunknown \ifnum\currentTABLEcolumn>\maxTABLEcolumn \setTABLEerror\TABLEmissingrow \handleTABLEerror \fi %\startHLcommand \ifnum#1=1 \global\advance\currentTABLEcolumn by 2 \let\next=\normalTABLEsinglerule \else \ifnum#1<\maxTABLEcolumn \global\advance\currentTABLEcolumn by 1 % was 2 \def\next{\normalTABLEmultirule{#1}}% \else \setTABLEerror\TABLEdivisionoverflow \let\next=\handleTABLEerror \fi \fi \next %\stopHLcommand %\global\let\startHLcommand=\empty %\global\let\stopHLcommand =\empty \fi} \def\TableDV% {\TableDCV {\edef\@@tiVLwidth{\getvalue{wVL\the\currentTABLEcolumn}}% \expanded{\normalTABLEcomplexbar{\@@tiVLwidth}}}} \def\TableDC% {\TableDCV\normalTABLEquote} \def\TableDCV#1% {\checkTABLEdivision \checkTABLEautorow \ifnum\currentTABLEcolumn>\maxTABLEcolumn \setTABLEerror\TABLEmissingrow \handleTABLEerror \else \global\advance\currentTABLEcolumn by 1 #1% \fi} \def\TableDR% {\ifnum\currentTABLEcolumn<\maxTABLEcolumn % silent recovery \setTABLEerror\TABLEmissingcolumn % some day warning \handleTABLEerror \else \global\currentTABLEcolumn=0 % nog check \normalTABLElineending \fi \TABLEnoalign {\nobreak \global\TABLEdivisionfalse \accountTABLElinewidth % temporary solution \setTABLEaction\TABLErule}} \def\accountTABLElinewidth% {\scratchdimen=\LineThicknessUnit \global\advance\TABLEheight by \@@tiHLheight\scratchdimen} You see, the new command is \DV (or \VD). Unfortunately we cannot support this kind of things automatically. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | mail: pragma@wxs.nl -----------------------------------------------------------------