From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/55471 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Natural Tables Cell Borders Date: Wed, 6 Jan 2010 12:54:23 +0100 Message-ID: <301282A4-11B3-416F-BFB0-818BFB2B1A2D@googlemail.com> References: <3b4b12310912311404t159ee4cbu80c155173a25d317@mail.gmail.com> <3B693046-848E-4307-A137-34704FB9C401@googlemail.com> <3b4b12311001041902w306989eeta83f62963ee31564@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262778886 15862 80.91.229.12 (6 Jan 2010 11:54:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Jan 2010 11:54:46 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Jan 06 12:54:36 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 1NSUTD-0000Jr-Kj for gctc-ntg-context-518@m.gmane.org; Wed, 06 Jan 2010 12:54:35 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CF89CC9C1A; Wed, 6 Jan 2010 12:54:34 +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 y1yngUItcEOA; Wed, 6 Jan 2010 12:54:31 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 89954C9BB9; Wed, 6 Jan 2010 12:54:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E4ACFC9BB9 for ; Wed, 6 Jan 2010 12:54:30 +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 uEYk6w8yVsXj for ; Wed, 6 Jan 2010 12:54:28 +0100 (CET) Original-Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com [209.85.220.218]) by balder.ntg.nl (Postfix) with ESMTP id 7FB96C9B66 for ; Wed, 6 Jan 2010 12:54:28 +0100 (CET) Original-Received: by fxm10 with SMTP id 10so3931109fxm.34 for ; Wed, 06 Jan 2010 03:54:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=ect6sPS+ys9J2Ip9DiGg7dTbqReNYvITFoUuCJBCt/E=; b=pjMwFyAVjrlUSPX1FvNz6GTxiusJB+bo1OAUBU5o6T20Be0mR5KubESnGdFrnWxj0x oK2Jmu3TN9ZMehdYK3b0mogDlKf+58FuXBUiK7TOfznCZ0D8EL66owGrWGbCqJyyGdLL PqF4UaNHSZSxiC3FCnmXJQrAmD+lxsmIJS7x8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=J0WF+Uhteo2FHSCQ0RQq9EUXxugp1DXdStgpU5T3CvrtAAjsp+ISxhfl5Y+CJmyKri 903T8ytD9sDUyVyf3eOrGp226A21dWfBrbVuqpePFq0w494wWUSZYthovXdG/978X6FX xZ18VB70EtNDBJVHb3kp/mNwsT52zVA3MStwI= Original-Received: by 10.223.14.20 with SMTP id e20mr10326628faa.16.1262778868175; Wed, 06 Jan 2010 03:54:28 -0800 (PST) Original-Received: from ?192.168.2.23? (p5B296ACD.dip.t-dialin.net [91.41.106.205]) by mx.google.com with ESMTPS id 22sm30153586fkr.27.2010.01.06.03.54.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 06 Jan 2010 03:54:27 -0800 (PST) In-Reply-To: <3b4b12311001041902w306989eeta83f62963ee31564@mail.gmail.com> X-Mailer: Apple Mail (2.1077) 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:55471 Archived-At: 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 := butt ; numeric FrameOffset, LeftRuleThickness, RightRuleThickness, TopRuleThickness, BottomRuleThickness ; FrameOffset := \frameddimension{frameoffset} ; LeftRuleThickness := \frameddimension{leftrulethickness} ; RightRuleThickness := \frameddimension{rightrulethickness} ; TopRuleThickness := \frameddimension{toprulethickness} ; BottomRuleThickness := \frameddimension{bottomrulethickness} ; pair lt, rt, lb, rb ; lt = (FrameOffset/2,OverlayHeight-FrameOffset/2) ; rt = (OverlayWidth-FrameOffset/2,OverlayHeight-FrameOffset/2) ; lb = (FrameOffset/2,FrameOffset/2) ; rb = (OverlayWidth-FrameOffset/2,FrameOffset/2) ; draw lt--rt withpen pencircle scaled TopRuleThickness ; draw lb--rb withpen pencircle scaled BottomRuleThickness ; draw lb--lt withpen pencircle scaled LeftRuleThickness ; draw rb--rt withpen pencircle scaled RightRuleThickness ; setbounds currentpicture to OverlayBox ; \stopuseMPgraphic \defineoverlay [tableborder] [%\edef\topframeparameter {\framedparameter\c!topframe }% %\edef\bottomframeparameter{\framedparameter\c!bottomframe}% %\edef\leftframeparameter {\framedparameter\c!leftframe }% %\edef\rightframeparameter {\framedparameter\c!rightframe }% \useMPgraphic{tableborder}] \setupTABLE [ toprulethickness=\framedparameter{rulethickness}, bottomrulethickness=\framedparameter{rulethickness}, leftrulethickness=\framedparameter{rulethickness}, rightrulethickness=\framedparameter{rulethickness}, % topframe=on, % bottomframe=on, % leftframe=on, % rightframe=on, background=tableborder, frame=off] \protect \starttext \start \setupTABLE[y][1][bottomrulethickness=2pt] \setupTABLE[3][3][bottomrulethickness=2pt,rightrulethickness=2pt] \setupTABLE[1][3][bottomframe=off] \bTABLE \bTR \bTD 1 \eTD \bTD 2 \eTD \bTD 3 \eTD \eTR \bTR \bTD 4 \eTD \bTD 5 \eTD \bTD 6 \eTD \eTR \bTR \bTD 7 \eTD \bTD 8 \eTD \bTD 9 \eTD \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-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________