From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/40867 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: headers and pagenumbering Date: Sat, 3 May 2008 07:54:41 +0200 Message-ID: <20080503075441.1f055b9f.schuster.wolfgang@googlemail.com> References: <329D086A-EAE8-4B6A-960F-68424982EEDB@fiee.net> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1209794175 24413 80.91.229.12 (3 May 2008 05:56:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 3 May 2008 05:56:15 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sat May 03 07:56:50 2008 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1JsAjp-0003Pk-O5 for gctc-ntg-context-518@m.gmane.org; Sat, 03 May 2008 07:56:49 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4713B1FC01; Sat, 3 May 2008 07:56:06 +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 01311-04; Sat, 3 May 2008 07:55:23 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6FF311FBCC; Sat, 3 May 2008 07:55:23 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9D7DF1FBCC for ; Sat, 3 May 2008 07:55:21 +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 01783-02-9 for ; Sat, 3 May 2008 07:54:46 +0200 (CEST) Original-Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by ronja.ntg.nl (Postfix) with ESMTP id 7ABEB1FB8F for ; Sat, 3 May 2008 07:54:46 +0200 (CEST) Original-Received: by fg-out-1718.google.com with SMTP id e21so1350283fga.8 for ; Fri, 02 May 2008 22:54:46 -0700 (PDT) Original-Received: by 10.86.90.13 with SMTP id n13mr6459776fgb.3.1209794086192; Fri, 02 May 2008 22:54:46 -0700 (PDT) Original-Received: from rover ( [91.41.116.164]) by mx.google.com with ESMTPS id e32sm6639266fke.15.2008.05.02.22.54.43 (version=SSLv3 cipher=OTHER); Fri, 02 May 2008 22:54:44 -0700 (PDT) In-Reply-To: <329D086A-EAE8-4B6A-960F-68424982EEDB@fiee.net> X-Mailer: Sylpheed 2.5.0beta2 (GTK+ 2.10.14; i686-pc-mingw32) X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:40867 Archived-At: On Wed, 30 Apr 2008 17:28:09 +0200 Henning Hraban Ramm wrote: > Hello again, > just trying to understand some remaining issues with my latest project. [long example] > (1) % or 0? ;-) > I struggled how to leave out the pagina on the ToC page, no setups > seemed to work. > I just reckognized that I need the \page inside of the braced area. I will use a simple example ti explain where you need to insert a pagebreak to get the desired output. You have short document with two pages and the header on the first page should be empty, let's us try the following code. \starttext \setupheader[state=stop] \input knuth \setupheader[state=start] \page \input knuth \stoptext The first \setupheader disables the header for the document, to enable it for the second page we write another \setupheader before our \page the command. If you take a look at the output this is not what we wanted because there is also a pagenumber on the first. Let's try us again with a slightly modified example. \starttext \setupheader[state=stop] \input knuth \page \setupheader[state=start] \input knuth \stoptext We moved now the \page command before the second \setupheader settings and voila, there is no pagenumber on the first page, but why is it important to move the \page command before the \setupheader setting. THis is very simple, TeX makes the decision to put a header/ footer on the when it shippes out a page which will happen either with a full page or with a manual \page command. In our first example the last value for the header was to enable it because the headervalue was start before the page was shipped out while in the second example the value was stop and we enable the header *after* the page was shipped out. > (3) > One can "hide" the page number with "location=", but the header on > the first page of a chapter with "header=high". Is there any logic > behind that? I will give you a answer to this questions before the second one because it makes more sense to answer both in this order. The pagenumber could be hidden with the location keyon all pages in the document, it is a global value whereas the header value for \setupheader disables it only on the current page, it is a local value. You could use the header key to format the header on footer lines on part/chapter/... pages than the rest of your document, e.g. the complete document has the pagenumber at the right side in the header but you want it on the chapter page in the middle of the bottom etc. > (2) > How can I leave out the chapter header on the first page of a > chapter, but keep the page number? (Probably simple?) You could define individual headers for part/chapter/... pages with \definetext, I will show here Hans example from page-txt. The command has nearly the same syntax as \setupheadertexts and \setupfootertexts but the first argument is a identifier you use in \setupheader for the header or footer key and the second argument is for the position of the text. \starttyping \definetext[chapter][footer][pagenumber] \setuphead[chapter][header=high,footer=chapter] \setupheadertexts[pagenumber] \setupfootertexts[left][right] \chapter{eerste} \dorecurse{20}{\input tufte \relax} \chapter{tweede} \dorecurse{20}{\input tufte \relax} \stoptyping 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________