From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/20396 Path: news.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: centering framed boxes Date: Tue, 17 May 2005 09:30:35 +0200 Message-ID: <42899D9B.7090305@wxs.nl> References: <42DF4ABB@webmail.colostate.edu> 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 1116315005 26755 80.91.229.2 (17 May 2005 07:30:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 May 2005 07:30:05 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Tue May 17 09:30:02 2005 Return-path: 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 1DXwWM-0004Gw-Q7 for gctc-ntg-context-518@m.gmane.org; Tue, 17 May 2005 09:29:42 +0200 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CEDDF127EA; Tue, 17 May 2005 09:30:14 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09234-09-3; Tue, 17 May 2005 09:30:11 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1D439127EB; Tue, 17 May 2005 09:30:11 +0200 (CEST) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 15E7F127EB for ; Tue, 17 May 2005 09:30:10 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09234-09-2 for ; Tue, 17 May 2005 09:30:09 +0200 (CEST) Original-Received: from mailrelay01.solcon.nl (maillb.solcon.nl [212.45.32.200]) by ronja.ntg.nl (Postfix) with ESMTP id 41877127EA for ; Tue, 17 May 2005 09:30:09 +0200 (CEST) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mailrelay01.solcon.nl (8.12.11/SQL-8.12.11-5/8.12.11) with ESMTP id j4H7U7Te008913 for ; Tue, 17 May 2005 09:30:07 +0200 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id BC9AD2197E; Tue, 17 May 2005 09:03:21 +0200 (CEST) Original-Received: from [10.100.1.53] (unknown [10.100.1.53]) by server-1.pragma-net.nl (Postfix) with ESMTP id 074C117A31 for ; Tue, 17 May 2005 07:03:20 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <42DF4ABB@webmail.colostate.edu> X-Virus-Scanned: ClamAV 0.83/879/Sun May 15 15:43:45 2005 on mailrelay01 X-Virus-Status: Clean X-Virus-Scanned: 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-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on smtp.ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:20396 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:20396 Idris Samawi Hamid wrote: > Dear gang, > > I need a way to overlay four framed boxes so that each inner box is exactly in > the center of its respective outer box. So far I have the following, but > careful inspection will show that the boxes are not precisely centered with > respect to each other. I could go on by trial and error but I'm sure there is > a direct way to do this. > > The text should also be precisely centered between frames. > > Thank you in advance! > Idris > ========================================================= > \setupoutput[pdftex]% > > \setuppagenumbering[state=stop] > \starttext > > \setupfloats[location=middle] > \placefigure > [here][tab:enclosure]{4 Stages.} > { > \midaligned{ > \framed > [width=12\baselineskip,height=12\baselineskip,strut=yes] > {\midaligned{Stage 1} > \midaligned% > {\framed[width=9\baselineskip,height=9\baselineskip,strut=yes] > {\midaligned{Stage 2} > \midaligned% > {\framed[width=6\baselineskip,height=6\baselineskip,strut=yes] > {\midaligned{Stage 3} > \midaligned% > {\framed[width=3\baselineskip,height=3\baselineskip,strut=yes] > {\midaligned{Stage 4}} > } > \midaligned{\null}}% > } > \midaligned{\null}}% > } > \midaligned{\null}} > } > } > > \stoptext \starttext \definelayer[test][width=12\bodyfontsize,height=12\bodyfontsize] \setlayerframed[test][preset=middle][width=12\bodyfontsize,height=12\bodyfontsize]{one} \setlayerframed[test][preset=middle][width= 9\bodyfontsize,height= 9\bodyfontsize]{two} \setlayerframed[test][preset=middle][width= 6\bodyfontsize,height= 6\bodyfontsize]{three} \setlayerframed[test][preset=middle][width= 3\bodyfontsize,height= 3\bodyfontsize]{four} \tightlayer[test] \stoptext -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------