ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: custom header/footer for 1st/other pages of section
Date: Thu, 6 Aug 2020 22:58:08 +0200	[thread overview]
Message-ID: <8fecbc57-9082-17ea-6457-036ba9d51513@gmail.com> (raw)
In-Reply-To: <SN6PR11MB2576D0C15A070F204859E54ABD480@SN6PR11MB2576.namprd11.prod.outlook.com>

Mike Cooper schrieb am 06.08.2020 um 17:15:
> Hola,
> 
> I imagine this is probably simple but I can’t find it…
> 
> I want the first page only of each section to have particular content in 
> header/footer, then all the following pages to different specific 
> content.Right now, I am manually entering it in each section.I’m hoping 
> there’s a way to automate this; put it into the environment file for all 
> sections.

Of course you can set different header/footer layouts for chapter pages.

With  \setupheadertexts and \setupfootertexts you set first the text 
which should appear on regular pages.

To have a different text on a chapter page you can use the \definetext 
command to set them (third first argument is the name of the setup and 
the second argument the location). These setups than can applied to the 
chapter with the header and footer key in \setuphead.

%%%% begin example
\setupheadertexts
   [Page \userpagenumber\ of \lastuserpagenumber]

\definetext
   [chapterheader]         % name
   [header]                 % vertical position
   [This is a chapter page] % content

\definetext
   [chapterfooter]
   [footer]
   [pagenumber]

\setuphead
   [chapter]
   [header=chapterheader,
    footer=chapterfooter]

\starttext

\dorecurse{10}
   {\expanded{\chapter{Chapter \recurselevel}}
    \dorecurse{\numexpr2*\recurselevel\relax}{\samplefile{knuth}}}

\stoptext
%%%% end example

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2020-08-06 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 15:15 Mike Cooper
2020-08-06 20:58 ` Wolfgang Schuster [this message]
2020-08-10 21:40   ` Mike Cooper
2020-08-11  6:37     ` Henning Hraban Ramm
2020-08-11 17:01       ` Mike Cooper
2020-08-11 17:14         ` Wolfgang Schuster
2020-08-11 17:45           ` Mike Cooper
2020-08-11 16:07     ` Wolfgang Schuster
2020-08-11 17:20       ` Mike Cooper
2020-08-11 18:06         ` Wolfgang Schuster
2020-08-20 17:37           ` Mike Cooper

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=8fecbc57-9082-17ea-6457-036ba9d51513@gmail.com \
    --to=wolfgang.schuster.lists@gmail.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).