Hello again, just trying to understand some remaining issues with my latest project. --- startcode --- \starttext % Setups \setuppagenumbering[ alternative=doublesided, location={header,right}, strut=yes, state=stop] % chapter title in the header, % but not on first page of chapter % pagina also in the header, always \setupheader[text][state=stop] \setupheadertexts[text][chapter][pagenumber] \setuphead[chapter][header=high] % Content % some firstmatter stuff left out \setuppagenumbering[state=start] % table of contents % without header, without pagina % but page numbering starts here { \setuppagenumbering[location=] \title{Inhalt} \placecontent \page } %\page % too late! \setupheader[text][state=start] \chapter{10 \times\ Tufte} \dorecurse{10}{\input tufte} \stoptext --- stopcode --- (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. (2) How can I leave out the chapter header on the first page of a chapter, but keep the page number? (Probably simple?) (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? Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
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
Am 2008-05-03 um 07:54 schrieb Wolfgang Schuster:
(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.
Yes, I got it now, hoepfully, thank you! !!
\setupheader disables it only on the current page, it is a local value. !!
I didn't understand how \setupheader works - now it's clear that \setupheader[chapter] affects only the first page of the chapter and \setupheader[text] affects the rest. But if I add "header=high" to my \setupheader[chapter], my last component=chapter in bodymatter (only one page) breaks with: ----%%%---- systems : end file c_14_kirchen at line 54 structure : end of sectionblock bodymatter ! Missing \endcsname inserted. <to be read again> \currentsectionworldname <argument> \??ko \currentsectionworldname \c!header \getvalue #1->\csname #1 \endcsname \doifelselayoutsomeline ... #1\c!state \endcsname }\ifx \!!stringa \v!none \... \calculatereducedvsizes ...youtsomeline \v!header {\advance \textheight -\di... \gettextboxes ...complain \calculatereducedvsizes \swapmargins \offinterline... ... l.56 \stopbodymatter ----%%%---- If I comment out this last component or move it in front of the second-last, everything is well. The file itself contains no errors (at least I couldn't find any). Don't know how to get a failing minimal for such a problem... Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer)
participants (2)
-
Henning Hraban Ramm
-
Wolfgang Schuster