From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/63 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: wie helpt met gekleurde tabel... Date: Thu, 23 Jul 1998 17:45:03 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <35B75A7F.65A3BDC5@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 1035390922 20820 80.91.224.250 (23 Oct 2002 16:35:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:35:22 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: "W.H. Dekker" Xref: main.gmane.org gmane.comp.tex.context:63 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:63 Hello Wybo, > Colored table are too difficult for me, yet. I'm tryin g to generate a > table from Perl with cells containing numbers >2 colored light gray, > and cells with numbers >3 colored dark gray. Coloring is very difficult in Tables, and depends on a lot of trickery. > Can anybody explain? I'll look at it later. > Another problem: the second column is numerical, and this works. But > if I replace the next c-key with N[00.0], things go wrong. Hm. I'll look at it. ======================= Now how about this one ==================== \unexpanded\def\Check#1 {\stelomlijndin % let op de spatie achter #1 [kader=uit, % let op het gebruik van \inlijnd hoogte=passend, offset=1pt, breedte=2.5em, uitlijnen=links, achtergrond=raster]% \hfill \ifdim#1pt=0pt % forget about it \else\ifdim#1pt>2pt \inlijnd[achtergrondraster=.9]{\strut$#1$}% \else\ifdim#1pt>8pt \inlijnd[achtergrondraster=.7]{\strut$#1$}% \else \inlijnd[achtergrond=]{\strut$#1$}% \fi\fi\fi} \def\JC{\JustCenter} \starttabel[|l|f{\Check}|f{\Check}|f{\Check}|] \HL \VL \LOW{method} \VL \use3 \JC Laboratory no. \VL\SR \DC \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 \DC \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 0 \VL\FR \VL FFA \VL 0.5 \VL -0.8 \VL 0 \VL\MR \VL Ranci \VL -0.5 \VL 0 \VL 0 \VL\MR \VL NMR 20 \VL -0.4 \VL 0 \VL 0 \VL\LR \HL \stoptabel ================================================================= Knowing you, you can also generate this by your script. (Putting \Check for each entry is also possible, or putting whatever command in a cell; ask if you don't understand what I'm saying.) That way you can also put rules around an entry or even pictures behind them. Hans 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 -----------------------------------------------------------------