From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/13200 Path: main.gmane.org!not-for-mail From: Michal Kvasnicka Newsgroups: gmane.comp.tex.context Subject: Table with metapost framing and colors Date: Thu, 11 Sep 2003 16:24:32 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <3F6085A0.7000805@econ.muni.cz> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050803010607050204080404" X-Trace: sea.gmane.org 1063291574 31318 80.91.224.253 (11 Sep 2003 14:46:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2003 14:46:14 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu Sep 11 16:46:13 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 19xSi5-00067k-00 for ; Thu, 11 Sep 2003 16:46:13 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 8808010B31; Thu, 11 Sep 2003 16:46:10 +0200 (MEST) Original-Received: from anor.ics.muni.cz (anor.ics.muni.cz [147.251.4.35]) by ref.ntg.nl (Postfix) with ESMTP id 4941110B25 for ; Thu, 11 Sep 2003 16:25:53 +0200 (MEST) Original-Received: from merkur.econ.muni.cz (merkur.econ.muni.cz [147.251.189.10]) by anor.ics.muni.cz (8.12.1/8.12.1) with ESMTP id h8BEPqTP021062 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 11 Sep 2003 16:25:52 +0200 Original-Received: from econ.muni.cz (ke-kvasnicka.econ.muni.cz [147.251.224.167]) by merkur.econ.muni.cz (8.12.3/8.11.2/SuSE Linux 8.11.1-0.5) with ESMTP id h8BEPqCR022676 for ; Thu, 11 Sep 2003 16:25:52 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en, cs Original-To: ConTeXt X-Muni-Spam-TestIP: 147.251.189.10 X-Muni-Virus-Test: Clean 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:13200 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:13200 This is a multi-part message in MIME format. --------------050803010607050204080404 Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit 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. --------------050803010607050204080404 Content-Type: application/x-tex; name="tableexample.tex" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="tableexample.tex" \setupcolors[state=start] % typ 1 \startuniqueMPgraphic{tabulka1} path p[]; p1:=(\overlaywidth,\overlayheight)--(0,\overlayheight); p2:=(0,\overlayheight)--(0,0); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 2pt; \stopuniqueMPgraphic \defineoverlay[tabulka1][\uniqueMPgraphic{tabulka1}] % typ 2 \startuniqueMPgraphic{tabulka2} path p[]; p1:=(0,\overlayheight)--(0,0); p2:=(\overlaywidth,\overlayheight)--(0,\overlayheight); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka2][\uniqueMPgraphic{tabulka2}] % typ 3 \startuniqueMPgraphic{tabulka3} path p[]; p1:=(0,\overlayheight)--(0,0)--(\overlaywidth,0); p2:=(\overlaywidth,\overlayheight)--(0,\overlayheight); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka3][\uniqueMPgraphic{tabulka3}] % typ 4 \startuniqueMPgraphic{tabulka4} path p[]; p1:=(\overlaywidth,\overlayheight)--(0,\overlayheight); p2:=(0,\overlayheight)--(0,0); draw p1 withpen pensquare scaled 2pt withcolor black; draw p2 withpen pensquare scaled 1pt withcolor black; \stopuniqueMPgraphic \defineoverlay[tabulka4][\uniqueMPgraphic{tabulka4}] % typ 5 \startuniqueMPgraphic{tabulka5} path p; p:=(\overlaywidth,\overlayheight)--(0,\overlayheight)--(0,0); draw p withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka5][\uniqueMPgraphic{tabulka5}] % typ 6 \startuniqueMPgraphic{tabulka6} path p[]; p1:=(\overlaywidth,0)--(0,0); p2:=(0,0)--(0,\overlayheight)--(\overlaywidth,\overlayheight); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka6][\uniqueMPgraphic{tabulka6}] % typ 7 \startuniqueMPgraphic{tabulka7} path p[]; p1:=(0,\overlayheight)--(\overlaywidth,\overlayheight)--(\overlaywidth,0); p2:=(0,0)--(0,\overlayheight); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka7][\uniqueMPgraphic{tabulka7}] % typ 8 \startuniqueMPgraphic{tabulka8} path p[]; p1:=(\overlaywidth,\overlayheight)--(\overlaywidth,0); p2:=(0,0)--(0,\overlayheight)--(\overlaywidth,\overlayheight); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka8][\uniqueMPgraphic{tabulka8}] % typ 9 \startuniqueMPgraphic{tabulka9} path p[]; p1:=(0,0)--(\overlaywidth,0)--(\overlaywidth,\overlayheight); p2:=(0,0)--(0,\overlayheight)--(\overlaywidth,\overlayheight); draw p1 withpen pensquare scaled 2pt; draw p2 withpen pensquare scaled 1pt; \stopuniqueMPgraphic \defineoverlay[tabulka9][\uniqueMPgraphic{tabulka9}] % setting \def\ordtab{% \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] } \starttext \placetable[here][tab:spotrceny]{A Time Serie}{% {\ordtab \setupTABLE[1][6][background=tabulka3] \setupTABLE[2][6][background={color,tabulka9}] \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}} \stoptext --------------050803010607050204080404--