From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/18761 Path: news.gmane.org!not-for-mail From: Duncan Hothersall Newsgroups: gmane.comp.tex.context Subject: Re: Current text width? Date: Tue, 08 Mar 2005 08:30:48 +0000 Message-ID: <422D62B8.9010606@capdm.com> References: <20050307215318.4572E12800@ronja.ntg.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1110270692 28863 80.91.229.2 (8 Mar 2005 08:31:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 8 Mar 2005 08:31:32 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue Mar 08 09:31:31 2005 Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1D8a7G-0000Rx-U8 for gctc-ntg-context-518@m.gmane.org; Tue, 08 Mar 2005 09:31:00 +0100 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2C6EB127B4; Tue, 8 Mar 2005 09:31:01 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21877-01; Tue, 8 Mar 2005 09:30:58 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9D68212799; Tue, 8 Mar 2005 09:30:57 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6C7C912799 for ; Tue, 8 Mar 2005 09:30:55 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (ronja.vet.uu.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21192-03 for ; Tue, 8 Mar 2005 09:30:54 +0100 (CET) Original-Received: from liszt-09.ednet.co.uk (liszt-09.ednet.co.uk [212.20.226.21]) by ronja.ntg.nl (Postfix) with ESMTP id 9704F12793 for ; Tue, 8 Mar 2005 09:30:54 +0100 (CET) Original-Received: from [192.168.254.41] (unknown [212.20.255.162]) by liszt-09.ednet.co.uk (Postfix) with ESMTP id 55AFD225D8F for ; Tue, 8 Mar 2005 08:30:54 +0000 (GMT) User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en Original-To: ntg-context@ntg.nl In-Reply-To: <20050307215318.4572E12800@ronja.ntg.nl> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime X-Virus-Scanned: by amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.5 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 X-Virus-Scanned: by amavisd-new at ntg.nl X-MailScanner-From: ntg-context-bounces@ntg.nl X-MailScanner-To: gctc-ntg-context-518@m.gmane.org Xref: news.gmane.org gmane.comp.tex.context:18761 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:18761 I said: > So - is there a parameter which represents the current width of the > layout area, taking into account itemisations, textbackgrounds and > anything else? Thanks. I came up with a rather ugly kludge which solves my immediate problem but might not be best. I created a new dimen, \RealWidth, and before each table I set it to the value of \textwidth minus leftskip minus rightskip. In other words, I did this: -- \newdimen\RealWidth \definetextbackground[TestBackground] [leftoffset=1em,rightoffset=1em,topoffset=8pt, bottomoffset=8pt,frame=on,location=paragraph] \starttext \starttextbackground[TestBackground] Some text first, which behaves perfectly, and then a table: \leavevmode\RealWidth=\textwidth\advance\RealWidth by-\leftskip\advance\RealWidth by-\rightskip\bTABLE \setupTABLE[column][1][width=0.3\RealWidth] \setupTABLE[column][2][width=0.7\RealWidth] \bTR\bTD I was hoping\eTD \bTD that this table would make itself narrower according to the background offsets, like the text does. And now it does!\eTD\eTR \eTABLE} \stoptextbackground \stoptext -- This produces what I want as far as I have tested it. I'm not sure it's the best or most comprehensive solution though. Duncan dh@capdm.com