From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/88727 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: perfect centering of layers in a text area Date: Sat, 20 Sep 2014 12:31:14 +0200 Message-ID: <0FDD1CF8-7C16-44A1-8306-193014476B4D@gmail.com> References: <201409200256.19305.Bernd.Donner@gmx.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1411209099 11050 80.91.229.3 (20 Sep 2014 10:31:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Sep 2014 10:31:39 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Sep 20 12:31:35 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XVHx0-0004Ew-8t for gctc-ntg-context-518@m.gmane.org; Sat, 20 Sep 2014 12:31:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A4D4010218 for ; Sat, 20 Sep 2014 12:31:33 +0200 (CEST) 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 Im4z0F4G-fz7 for ; Sat, 20 Sep 2014 12:31:33 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id CD15910223 for ; Sat, 20 Sep 2014 12:31:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A51DA101E7 for ; Sat, 20 Sep 2014 12:31:21 +0200 (CEST) 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 EKHKd8QD28Fs for ; Sat, 20 Sep 2014 12:31:19 +0200 (CEST) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by balder.ntg.nl (Postfix) with ESMTP id 63547101E1 for ; Sat, 20 Sep 2014 12:31:19 +0200 (CEST) Original-Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) by filter3-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id s8KAVIQp001983 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 20 Sep 2014 12:31:18 +0200 Original-Received: by mail-wi0-f179.google.com with SMTP id d1so710067wiv.0 for ; Sat, 20 Sep 2014 03:31:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to; bh=0cTFB+nT5BRTpJEt+ahx9VCspi+2oFFsRUBrzPM1NyY=; b=wAPjuohYmAy02f8uKp8FaUQGGRMAQDjSdXKGz0NC/S/mLn22S6lZY3YfDoaMr3p+ek dxgVHWvfO1KUKi7nAshjeUX4ZaL+o6XOBIGLzBfFfYPIx4gDfShTTm+wTkDhWyOnHfOP 9aiuEo7Qb/obr1WjT00FAJZFEj5cTtBqriL4d1Ss48H1wSBo1aBW47Qf8ahpEG3wQ+f8 6b4LeftspkcPeIFGauxZrF5mJ3cVspSzt6D5H6UFCcE3CCi3YpriKz+dkQVPgo1Ex368 V0qnLCD2aFQIetiGR1OQ6VEofLiZvPd5gV6IqX9AJQwItm0s4qWQ+2JcsNd7J8CHnK2u ofqA== X-Received: by 10.180.96.161 with SMTP id dt1mr2552477wib.1.1411209078332; Sat, 20 Sep 2014 03:31:18 -0700 (PDT) Original-Received: from keima.localdomain (x2f266a5.dyn.telefonica.de. [2.242.102.165]) by mx.google.com with ESMTPSA id ny6sm4907280wic.22.2014.09.20.03.31.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 20 Sep 2014 03:31:17 -0700 (PDT) In-Reply-To: <201409200256.19305.Bernd.Donner@gmx.net> X-Mailer: Apple Mail (2.1878.6) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::233; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 03MRmviEw - bf987cc515fa - 20140920 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:88727 Archived-At: Am 20.09.2014 um 02:56 schrieb Bernd Donner : > Hello, > > I'm converting some context from mkii to mkiv. Since the definelogo is > depreciated I try to use layers to get the same result. > > The problem in the example below is, the text in the header - which is a > table - is not perfectly centered with respect to the bottomframe. What is > the reason that the table is not perfectly centered with respect to the line > and what is the correct solution? > > Thank you, > Bernd > > > > > \setuppapersize[A4] > > \language[de] > \enableregime[utf] > > \setuplayout[backspace=2.0cm, height=fit, width=fit, rightmarginwidth=0.0cm, > leftmargin=1.8cm, footerdistance=0.0cm, > rightmargindistance=0.2cm, rightmargin=1.8cm, bottom=0.5cm, > leftmargindistance=0.2cm, header=0.4cm, headerdistance=0.5cm, > footer=0.5cm, top=0.0cm, topspace=0.0cm, bottomspace=0.0cm] > > \definelayer[sabel] > [x=0mm, y=0mm, width=\paperwidth, height=\paperheight, preset=lefttop] > > \startsetups layer > > \setlayer[sabel] > [hoffset=0mm, voffset=0mm] > {\tfx{\vbox > {\bTABLE[option=stretch] > \setupTABLE[rulethickness=0pt] > \setupTABLE[column][1][align={right}, width=.4\textwidth] > \setupTABLE[column][2][align={center}] > \setupTABLE[column][3][align={left}, width=.4\textwidth] > \bTR \bTD I want to be \eTD \bTD \eTD \bTD perfectly centered \eTD \eTR > \eTABLE}}} > > \stopsetups > > \setupbackgrounds[header][text][bottomframe=on, setups=layer, > background=sabel] > \setuppagenumbering[location=] > > \starttext > thx > \stoptext \mainlanguage[de] \setuplayout [backspace=2.0cm, height=middle, width=middle, leftmargin=1.8cm, footerdistance=0.0cm, rightmargindistance=0.2cm, rightmargin=1.8cm, bottom=0.5cm, leftmargindistance=0.2cm, header=0.4cm, headerdistance=0.5cm, footer=0.5cm, top=0.0cm, topspace=0.0cm, bottomspace=0.0cm] \definelayer[sabel] \startsetups[sabel] \setlayerframed[sabel][x=0mm,y=0mm][frame=on,offset=none] {\setupTABLE[column][1][align=right, width=.4\textwidth]% \setupTABLE[column][2][align=center,width=.2\textwidth]% \setupTABLE[column][3][align=left, width=.4\textwidth]% \bTABLE[frame=off,style=\tfx] \bTR \bTD I want to be \eTD \bTD \eTD \bTD perfectly centered \eTD \eTR \eTABLE} \stopsetups \setupbackgrounds[header][text][bottomframe=on,setups=sabel,background=sabel] \setuppagenumbering[location=] \starttext thx \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 ___________________________________________________________________________________