From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73162 Path: news.gmane.org!not-for-mail From: Andreas Harder Newsgroups: gmane.comp.tex.context Subject: Re: \definelayout Date: Tue, 13 Dec 2011 19:20:00 +0100 Message-ID: <565DD034-13F3-401E-9964-F2D2ACC6278D@uni-koblenz.de> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1323800431 15848 80.91.229.12 (13 Dec 2011 18:20:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2011 18:20:31 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Dec 13 19:20:27 2011 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.69) (envelope-from ) id 1RaWxm-00055y-RV for gctc-ntg-context-518@m.gmane.org; Tue, 13 Dec 2011 19:20:26 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C05EFCB167; Tue, 13 Dec 2011 19:20:25 +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 BxNCEdFt6oJf; Tue, 13 Dec 2011 19:20:25 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 41580CB145; Tue, 13 Dec 2011 19:20:19 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3B0C2CB145 for ; Tue, 13 Dec 2011 19:20:17 +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 H4dI71ANlaWe for ; Tue, 13 Dec 2011 19:20:03 +0100 (CET) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by balder.ntg.nl (Postfix) with ESMTP id 0C699CABBD for ; Tue, 13 Dec 2011 19:20:03 +0100 (CET) Original-Received: from deliver.uni-koblenz.de (deliver.uni-koblenz.de [141.26.64.15]) by filter4-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pBDIK2NA004135 for ; Tue, 13 Dec 2011 19:20:02 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 66FCCD238F for ; Tue, 13 Dec 2011 19:20:02 +0100 (CET) X-Virus-Scanned: amavisd-new at uni-koblenz.de Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FYl+7KkmQW14 for ; Tue, 13 Dec 2011 19:20:02 +0100 (CET) X-CHKRCPT: Envelopesender noch aharder@uni-koblenz.de Original-Received: from [192.168.1.112] (91-67-184-190-dynip.superkabel.de [91.67.184.190]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id C3490D238E for ; Tue, 13 Dec 2011 19:20:01 +0100 (CET) In-Reply-To: X-Mailer: Apple Mail (2.1251.1) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=141.26.64.15; country=DE; region=08; city=Koblenz; latitude=50.3500; longitude=7.6000; http://maps.google.com/maps?q=50.3500,7.6000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 05G8Gk2zW - e0b8f4755ab8 - 20111213 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 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:73162 Archived-At: On 13.12.2011, at 16:44, Wolfgang Schuster wrote: > = > Am 13.12.2011 um 16:26 schrieb Andreas Harder: > = >> Hi all, >> = >> would someone please enlighten me. What is the correct usage of \definel= ayout? >> = >> \definelayout[default][width=3Dmiddle,height=3Dmiddle,header=3D0pt,foote= r=3D0pt] >> % \setuplayout[default] % needed? >> \definelayout[first] [default][header=3D2cm] >> \definelayout[unknown][default]%[reset] >> % \definelayout[2] [default]%[reset] >> \definelayout[last] [default][footer=3D2cm] >> = >> \starttext \showframe % \checkcurrentlayout >> %% Variant A: fails with \default[unknown] >> first\page unknown=3D(2)\page \page unknown=3D(3)\page last >> = >> %% Variant B: fails with \definelayout[2] >> % first\page unknown=3D(2)=3Dlast >> \stoptext >> = >> By the way the output differs with the latest beta in comparison with th= e latest experimental. > = > Hans changed part of the \setuplayout code in the last betas (there are m= ore than you can see in the ctx suite). > = > When context checks the layout (happens with \starttext and when it start= s a new page) it test for the following defined layouts: > = > =95 =93=94 > =95 =93-=94 > =95 =93last=94 (is only used for the last page of the document) > =95 =93first=94 (is only used for the first page of the document) > =95 =93unknown=94 > =95 =93current=94 > =95 =93odd=94 and =93even=94 (used for left and right pages) > = > All entries in this list are reserved names but you can also define your = own layout but in this case > you have to enable it with \setuplayout[]. > = > One of the new features in MkIV is that layout parameters can be inherite= d, e.g. when > you define a layout with the name =93one=94 {\definelayout[one][..,..=3D.= .,..]) and another one with > the name two (\definelayout[two][one][..,..=3D..,..]) this will take the = values from one of there > are nothing set for a value from one and when there is also nothing set f= or one the global > values are used (\setuplayout[..,..=3D..,..]). Hi Wolfgang, I modified the example (hopefully in a meaningful manner). I get the desire= d output with the old beta, but it still fails with todays beta. \setuplayout [width=3Dmiddle,height=3Dmiddle,header=3D0pt,footer=3D0pt] \definelayout[first] [header=3D2cm] \definelayout[last] [footer=3D2cm] \definelayout[current] \starttext \showframe % \checkcurrentlayout % \dorecurse{2}{test\page} % last is wrong \dorecurse{5}{test\page} % page 2 and =84last=93 are wrong \stoptext Andreas ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________