ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: wie helpt met gekleurde tabel...
Date: Thu, 23 Jul 1998 17:45:03 +0200	[thread overview]
Message-ID: <35B75A7F.65A3BDC5@wxs.nl> (raw)

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
-----------------------------------------------------------------


             reply	other threads:[~1998-07-23 15:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-23 15:45 Hans Hagen [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-07-23 13:18 W.H. Dekker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=35B75A7F.65A3BDC5@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).