From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/61190 Path: news.gmane.org!not-for-mail From: Michael Goerz Newsgroups: gmane.comp.tex.context Subject: Re: varying headers, footers, page numbers Date: Tue, 24 Aug 2010 19:28:31 -0400 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282692540 32284 80.91.229.12 (24 Aug 2010 23:29:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2010 23:29:00 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Wed Aug 25 01:28:59 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.69) (envelope-from ) id 1Oo2vJ-0005X6-79 for gctc-ntg-context-518@m.gmane.org; Wed, 25 Aug 2010 01:28:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 5A7E0CA611; Wed, 25 Aug 2010 01:28:56 +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 SjnEukkMUNhX; Wed, 25 Aug 2010 01:28:52 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 689B5CA604; Wed, 25 Aug 2010 01:28:52 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 2503ECA604 for ; Wed, 25 Aug 2010 01:28:51 +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 3bV9UD0idzdi for ; Wed, 25 Aug 2010 01:28:49 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 01DAACA59E for ; Wed, 25 Aug 2010 01:28:48 +0200 (CEST) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter3-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o7ONSloZ020731 for ; Wed, 25 Aug 2010 01:28:47 +0200 Original-Received: by wwd20 with SMTP id 20so18785wwd.2 for ; Tue, 24 Aug 2010 16:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=2a4EtAYsmakB8K9LlX3D3FDHF0D975WV9Pq3wObJWkE=; b=I2WsoJtDwolak4oc/0zUi2iCAwJHO5ZS9y5EJHRtHdjeJ5xlBDrBreDU7Q5CxFPgeb zszNgWlt9glLw2S0yDBu1unwxeCDwaQPU1u7gvf9LP5lMHbxjf+EQ2t9uSMZMXJCbWLm Mb+iLVbvP0BG5pTv5o2yt/5+jW4pskHg0pI1Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=Qalbig4iKo6ITYwAFcLFlpZHoGfz77GE3F1mhkxLwoQllUVtPAJh+haNDBT/gAp2j0 6rUF0A4kcYX1s6DpAl5141U+AvP4VsdMiZN01Mr6plp5BeUABb+XiioLZEYFV9pAYWSv geQ8gTzaG5qL0rFG+zkTdIdOwfXnZkmRyrN4g= Original-Received: by 10.216.166.203 with SMTP id g53mr98012wel.54.1282692511281; Tue, 24 Aug 2010 16:28:31 -0700 (PDT) Original-Received: by 10.216.132.9 with HTTP; Tue, 24 Aug 2010 16:28:31 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: uR-4e-V7oNS1Bky9WkFYlnZZ8FE X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0dCWnsLpR - 8edd8226c668 - 20100825 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:61190 Archived-At: On Tue, Aug 24, 2010 at 6:01 PM, Michael Goerz wrote: > I'm trying to create a book where the front matter has no > headers/footers, except roman numeral page numbers at the top outside of = the > page. The main matter should have Arabic numeral page numbers > (restarting with '1') at the top outside of each page, plus the name of > the book in the header of each even page and the name of the chapter in > the header of each odd page, with no footer. However, on the pages > where a new chapter starts (which is set to always be an odd page), > there should be no header, and the page number should appear centered > at the bottom of the page. > > I'm quite confused about how to achieve this in ConTeXt. > > An excerpt from the project structure is > =A0 ./env.tex > =A0 ./project.tex > =A0 ./book/book.tex > =A0 ./book/chapters/chapter1.tex > > The following is a shortened excerpt from book.tex: > =A0 \startfrontmatter > =A0 \setuppagenumbering[state=3Dstop] % nothing for now, should be roman = page > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 % num= bers later > =A0 \component book/frontmatter > =A0 % ToC ... > =A0 \stopfrontmatter > > =A0 \startbodymatter > =A0 \setuppagenumber[number=3D1] > =A0 \setupheadertexts > =A0 =A0 =A0 [{Name of Chapter}] =A0 =A0 =A0 =A0 =A0 [{}] > =A0 =A0 =A0 [{}] =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[{Nam= e of Book}] > =A0 \setuppagenumbering[ > =A0 alternative=3Ddoublesided, =A0 % mirrored even/odd pages > =A0 location=3D{header,margin}, > =A0 style=3Dsmall] > =A0 \component vol04_1/articles/azimov > =A0 \stopbodymatter > This leads to my first question: I generally try to keep all formatting > definitions in env.tex. However, it seems to me that since I want to have > different settings in the frontmatter compared to the mainmatter, I need = to put > the \setuppagenumbering and \setupheadertexts in book.tex, which slightly > bothers me. The way I intuitively feel it should work is that I would def= ine > various headertexts and pagenumberings under some label in env.tex, and t= hen > activate the different configurations in book.tex via that label. Is there > anything in ConTeXt that I may have overlooked that makes something like = that > (centrally defining several alternative header/footer/pagenumber > configurations) possible? > > Next, the problem of having a different header/footer/pagenumber on pages= where > a new chapter starts. In env.tex, I have > > =A0 \setuphead[chapter][ > =A0 =A0 =A0 page=3Dmychapterpagebreak, > =A0 =A0 =A0 number=3Dno, > =A0 =A0 =A0 alternative=3Dc, > =A0 =A0 =A0 align=3D{center, nothyphenated, verytolerant}, > =A0 =A0 =A0 style=3D{\switchtobodyfont[16pt]}, > =A0 =A0 =A0 header=3Dhigh, > =A0 =A0 =A0 footer=3Dnone, > =A0 ] > > This causes the chapter pages to have no header/footer/pagenumber at all,= which > is halfway what I want. But actually, I don't really understands why that= works > either. My understanding is that "header=3Dhigh" means there should be no= header > on the first page and the normal header on all subsequent pages. The way = I've > set it up though, the page number is not really part of the header (it's > separately set up through \setuppagenumbering). So why does the page numb= er > disappear as well? And, of course, the main question: How do I get the pa= ge > number centered in the bottom of that page? Again, I feel if there was so= me way > to define different configurations for the header/footer/pagenumbers under > different labels, e.g. a label 'chapterfooter', it would then make sense = to do > something like 'footer=3Dchapterfooter', instead of 'footer=3Dnone'. But = I guess > that's not the way it works -- so how *does* it work? Digging deeper in the reference manual, it seems that \definetext[chapter][footer][pagenumber] together with \setuphead[chapter][ page=3Dmychapterpagebreak, number=3Dno, alternative=3Dc, align=3D{center, nothyphenated, verytolerant}, style=3D{\switchtobodyfont[16pt]}, header=3Dhigh, footer=3Dchapter, ] is the answer. Do I understand it correctly that \definetext[chapter][footer]... is exactly the same as \setupfootertext... but with the extra label "chapter"? So that would be exactly what my intuition said should exist. Can I only use the "chapter" label inside of \setuphead, like in the above example, or could I also somehow use \definetext to setup different headers/footers for the frontmatter/mainmatter, for example? Thanks, Michael ___________________________________________________________________________= ________ 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 ___________________________________________________________________________= ________