From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13224 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Table with metapost framing and colors Date: Sat, 13 Sep 2003 23:48:20 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5.2.0.9.1.20030913230718.02740448@localhost> References: <3F6085A0.7000805@econ.muni.cz> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: sea.gmane.org 1063492190 19856 80.91.224.253 (13 Sep 2003 22:29:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 13 Sep 2003 22:29:50 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Sep 14 00:29:48 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19yIto-0006DR-00 for ; Sun, 14 Sep 2003 00:29:48 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 644DE10B23; Sun, 14 Sep 2003 00:29:46 +0200 (MEST) Original-Received: from mail.solcon.net (mail.solcon.net [212.45.33.5]) by ref.ntg.nl (Postfix) with ESMTP id 1F30C10ACC for ; Sat, 13 Sep 2003 23:48:36 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.net (8.11.6/8.9.3) with ESMTP id h8DLmOw27403 for ; Sat, 13 Sep 2003 23:48:24 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id DC89921F26; Sat, 13 Sep 2003 23:48:28 +0200 (CEST) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.1]) by server-1.pragma-net.nl (Postfix) with ESMTP id B76FC1801E for ; Sat, 13 Sep 2003 21:48:24 +0000 (UTC) X-Sender: hagen-mail@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Original-To: ntg-context@ntg.nl In-Reply-To: <3F6085A0.7000805@econ.muni.cz> Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:13224 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13224 At 16:24 11/09/2003 +0200, Michal Kvasnicka wrote: >Dear Mr. Hagen. > >I apologize that I bother you once more, but I really need your help >(deadline for my document is quite soon). :-( > >I have to follow a rather complex document design. According to it tables >must be framed with two different lines: The outer frame must be thick and >the inner thin. Moreover, a part of the header (the first row) must be >black. I didn't know how to do it, so I used Metapost in a company with >the overlay mechanism provided with the ConTeXt. It works well, but: > >1) When a cell has black background, it turns its frame from black to >white. It's awfull. How can I switch this behavior off? >2) The frame of the first and last row doesn't fit precisely to frames of >the rest rows. What's wrong? Are those cell of a different sizes? How can >I improve it? > >Many thanks for your kind help. >Your sincerely >Michal Kvasnicka > >P.S. I include a minimal (but not a small, I apologize) example. you can avoid the ugly def by : \startsetups[table] \setupTABLE[frame=off, background={color,tabulka5}, backgroundcolor=white] \setupTABLE[column][1][background={color,tabulka2}] \setupTABLE[row][1,2][background={color,tabulka4}] \setupTABLE[column][last][background={color,tabulka8}] \setupTABLE[row][last][background={color,tabulka6}] \setupTABLE[1][1,2][background={color,tabulka1}] \setupTABLE[last][1,2][background={color,tabulka7}] \setupTABLE[last][last][background={color,tabulka9}] \setupTABLE[1][last][background={color,tabulka3}] \setupTABLE[column][2,4,6,8,10,12,14,16,18,20][backgroundcolor=svetleseda] \setupTABLE[column][3,5,7,9,11,13,15,17,19][backgroundcolor=tmaveseda] \setupTABLE[2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20][1][backgroundcolor=black,color=white] \setupTABLE[1][1,2][backgroundcolor=white, color=black] \stopsetups \placetable[here][tab:spotrceny]{A Time Serie}{\setups[table]...} however, i wonder if you really need all that mp code: \defineframedcontent[SomeTable][offset=1pt,rulethickness=2pt] \startframedcontent[SomeTable] \setupTABLE[2][1][background=color,backgroundcolor=black,foregroundcolor=white] \bTABLE \bTR\bTD Date \eTD\bTD Index CPI \eTD\eTR \bTR\bTD jan 1991 \eTD\bTD 59.4 \eTD\eTR \bTR\bTD feb 1991 \eTD\bTD 63.1 \eTD\eTR \bTR\bTD mar 1991 \eTD\bTD 65.7 \eTD\eTR \bTR\bTD $\vdots$ \eTD\bTD $\vdots$ \eTD\eTR \bTR\bTD dec 1995 \eTD\bTD 112.5 \eTD\eTR \eTABLE \stopframedcontent (\defineframedcontent is just a kind of preset framed text) ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------