From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55478 Path: news.gmane.org!not-for-mail From: Curiouslearn Newsgroups: gmane.comp.tex.context Subject: Re: Natural Tables Cell Borders Date: Wed, 6 Jan 2010 12:07:41 -0500 Message-ID: <3b4b12311001060907n624bf6f6pa526a265461169ef@mail.gmail.com> References: <3b4b12310912311404t159ee4cbu80c155173a25d317@mail.gmail.com> <3B693046-848E-4307-A137-34704FB9C401@googlemail.com> <3b4b12311001041902w306989eeta83f62963ee31564@mail.gmail.com> <301282A4-11B3-416F-BFB0-818BFB2B1A2D@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1262797686 16588 80.91.229.12 (6 Jan 2010 17:08:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jan 2010 17:08:06 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 06 18:07:59 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1NSZMV-0000zG-6w for gctc-ntg-context-518@m.gmane.org; Wed, 06 Jan 2010 18:07:59 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DABD5C9CA3; Wed, 6 Jan 2010 18:07:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VZkbnDHWxhWm; Wed, 6 Jan 2010 18:07:57 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 62AF7C9C92; Wed, 6 Jan 2010 18:07:57 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2C736C9C92 for ; Wed, 6 Jan 2010 18:07:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bCWEcPaaLR4D for ; Wed, 6 Jan 2010 18:07:44 +0100 (CET) Original-Received: from mail-qy0-f188.google.com (mail-qy0-f188.google.com [209.85.221.188]) by balder.ntg.nl (Postfix) with ESMTP id 148FBC9C91 for ; Wed, 6 Jan 2010 18:07:43 +0100 (CET) Original-Received: by qyk26 with SMTP id 26so8315417qyk.5 for ; Wed, 06 Jan 2010 09:07:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4ijat3T7HbqVT2t7rhhbbFg3PIDe6KDXp602yDOuNH0=; b=V0o9c/XR5PUSUjlU6c1QLovFIFUWwDIX03nht8QxcpRycKJj7/Cf7Ie6q36DV6AS7V 52Oe2LknZa2nOtXAC2WHLa/oEpl5YGbLYTRI8y6BNuPF7QBNqc8VprDt79Ap7WQdf4Hl JYoyGWmIn6OsaHqmPqRLkcrkGfjguOGGcBDXg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=YwP91fM/gaffGBoCPJBEjaUC5wqc+NiUJfjotYq3QDJIuAswvhLGvEe7EqFKmz6F2m nmNiPIu5+MICNx37dh6c63aNMtTQj4J9clrDm9W4Ea2oNrYdbHcmjLG41dXYjBPpGthd 9OeaZqEGqgamKzJ4sSUp7P8fqmzCv92Q2ohPQ= Original-Received: by 10.224.1.229 with SMTP id 37mr10096656qag.127.1262797661607; Wed, 06 Jan 2010 09:07:41 -0800 (PST) In-Reply-To: <301282A4-11B3-416F-BFB0-818BFB2B1A2D@googlemail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:55478 Archived-At: Thanks very much Wolfgang. Will try to play with this during this week. On Wed, Jan 6, 2010 at 6:54 AM, Wolfgang Schuster wrote: > > Am 05.01.2010 um 04:02 schrieb Curiouslearn: > >> Thanks Wolfgang. I am not yet proficient enough in Metapost or Context >> to understand your code. But will look at it more carefully later. >> >> Meanwhile, is there any further work going on on Natural Tables? Are >> there plans to introduce the ability to have borders of different >> thickness for the same cell through simple options. > > > A TeX based solution won't be possible without Hans but you can set > the values in TeX (\framed, \setupTABLE) and use them in MetaPost. > > The following example show you what can be done. > > \unprotect > > \startuseMPgraphic{tableborder} > > %linecap :=3D butt ; > > numeric FrameOffset, LeftRuleThickness, RightRuleThickness, TopRuleThickn= ess, BottomRuleThickness ; > > FrameOffset =A0 =A0 =A0 =A0 :=3D \frameddimension{frameoffset} =A0 =A0 = =A0 =A0 ; > LeftRuleThickness =A0 :=3D \frameddimension{leftrulethickness} =A0 ; > RightRuleThickness =A0:=3D \frameddimension{rightrulethickness} =A0; > TopRuleThickness =A0 =A0:=3D \frameddimension{toprulethickness} =A0 =A0; > BottomRuleThickness :=3D \frameddimension{bottomrulethickness} ; > > pair lt, rt, lb, rb ; > > lt =3D (FrameOffset/2,OverlayHeight-FrameOffset/2) ; > rt =3D (OverlayWidth-FrameOffset/2,OverlayHeight-FrameOffset/2) ; > lb =3D (FrameOffset/2,FrameOffset/2) ; > rb =3D (OverlayWidth-FrameOffset/2,FrameOffset/2) ; > > draw lt--rt withpen pencircle scaled TopRuleThickness =A0 =A0; > draw lb--rb withpen pencircle scaled BottomRuleThickness ; > draw lb--lt withpen pencircle scaled LeftRuleThickness =A0 ; > draw rb--rt withpen pencircle scaled RightRuleThickness =A0; > > setbounds currentpicture to OverlayBox ; > > \stopuseMPgraphic > > \defineoverlay > =A0[tableborder] > =A0[%\edef\topframeparameter =A0 {\framedparameter\c!topframe =A0 }% > =A0 %\edef\bottomframeparameter{\framedparameter\c!bottomframe}% > =A0 %\edef\leftframeparameter =A0{\framedparameter\c!leftframe =A0}% > =A0 %\edef\rightframeparameter {\framedparameter\c!rightframe }% > =A0 \useMPgraphic{tableborder}] > > \setupTABLE > =A0[ =A0 toprulethickness=3D\framedparameter{rulethickness}, > =A0 bottomrulethickness=3D\framedparameter{rulethickness}, > =A0 =A0 leftrulethickness=3D\framedparameter{rulethickness}, > =A0 =A0rightrulethickness=3D\framedparameter{rulethickness}, > % =A0 =A0 =A0 =A0 =A0 =A0 =A0topframe=3Don, > % =A0 =A0 =A0 =A0 =A0 bottomframe=3Don, > % =A0 =A0 =A0 =A0 =A0 =A0 leftframe=3Don, > % =A0 =A0 =A0 =A0 =A0 =A0rightframe=3Don, > =A0 =A0 =A0 =A0 =A0 =A0background=3Dtableborder, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 frame=3Doff] > > \protect > > \starttext > > \start > > \setupTABLE[y][1][bottomrulethickness=3D2pt] > \setupTABLE[3][3][bottomrulethickness=3D2pt,rightrulethickness=3D2pt] > \setupTABLE[1][3][bottomframe=3Doff] > > \bTABLE > =A0 =A0\bTR > =A0 =A0 =A0 =A0\bTD 1 \eTD > =A0 =A0 =A0 =A0\bTD 2 \eTD > =A0 =A0 =A0 =A0\bTD 3 \eTD > =A0 =A0\eTR > =A0 =A0\bTR > =A0 =A0 =A0 =A0\bTD 4 \eTD > =A0 =A0 =A0 =A0\bTD 5 \eTD > =A0 =A0 =A0 =A0\bTD 6 \eTD > =A0 =A0\eTR > =A0 =A0\bTR > =A0 =A0 =A0 =A0\bTD 7 \eTD > =A0 =A0 =A0 =A0\bTD 8 \eTD > =A0 =A0 =A0 =A0\bTD 9 \eTD > =A0 =A0\eTR > \eTABLE > > \stop > > \stoptext > > Wolfgang > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to= the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-co= ntext > webpage =A0: http://www.pragma-ade.nl / http://tex.aanhet.net > archive =A0: http://foundry.supelec.fr/projects/contextrev/ > wiki =A0 =A0 : http://contextgarden.net > _________________________________________________________________________= __________ > ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________