On Wed, 30 Apr 2008 17:28:09 +0200
Henning Hraban Ramm
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