ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: ntg-context@ntg.nl
Subject: Re: headers and pagenumbering
Date: Sat, 3 May 2008 07:54:41 +0200	[thread overview]
Message-ID: <20080503075441.1f055b9f.schuster.wolfgang@googlemail.com> (raw)
In-Reply-To: <329D086A-EAE8-4B6A-960F-68424982EEDB@fiee.net>

On Wed, 30 Apr 2008 17:28:09 +0200
Henning Hraban Ramm <hraban@fiee.net> 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
___________________________________________________________________________________


  reply	other threads:[~2008-05-03  5:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 15:28 Henning Hraban Ramm
2008-05-03  5:54 ` Wolfgang Schuster [this message]
2008-05-03 19:29   ` Henning Hraban Ramm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080503075441.1f055b9f.schuster.wolfgang@googlemail.com \
    --to=schuster.wolfgang@googlemail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).