ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Wolfgang Schuster" <schuster.wolfgang@googlemail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: TOC: page headers
Date: Thu, 15 Nov 2007 12:02:40 +0100	[thread overview]
Message-ID: <115224fb0711150302q8ade6dck9b5b7673009ee551@mail.gmail.com> (raw)
In-Reply-To: <2e8813a0711141809t35b0e59bpae2b472ecb8a2378@mail.gmail.com>

2007/11/15, Jeff Smith <ascarel@gmail.com>:
> On Nov 14, 2007 8:15 PM, Idris Samawi Hamid <ishamid@colostate.edu> wrote:
>
> > If possible, post a minimal example that illustrates the problem; use
> > \input's like ward.tex, knuth.tex, zapf.tex etc. (in the distro) so some
> > of us can run the test file and report back. Sometimes someone will know
> > the answer without such an example but for even faster service ;-) always
> > try to include a minimal example when possible.
>
> Indeed. I'm truly sorry. I attach a sample document with the relevant
> stuff. I made the TOC start a little lower on the page just to provoke
> the page switching, instead of adding an unwieldy amount of dummy
> chapters to acheive the same result.
>
> Thanks, and sorry again!
> Jeff

Hi Jeff,

you can use dummy chapters next time without problems. I changed a few
of your settings because this should be a nice example I could use myself
in the future (it's to easy to forgot many of the necessary settings).

\usemodule[visual] % example with faked text

\setuplayout
  [width=middle,
  footer=2cm,
  topspace=2cm,
  header=1.3em,
  height=middle,
  backspace=3cm,
  headerdistance=0.3cm,
  footerdistance=0cm]

\startsetups header:bodymatter

\setupbackgrounds[header][text][frame=off,bottomframe=on]

% Hans mentioned this method long ago on the list

\setupheader
  [text]
  [lefttext={\it\getmarking[chapternumber].\space\getmarking[chapter]},
   righttext=\pagenumber]

\stopsetups

\startsetups header:frontmatter

\setupheader
  [text]
  [righttext=\pagenumber]

\stopsetups

\setupsectionblock
  [frontpart]
  [page=yes, % else problem with last page of the table of contents
   before=\setups{header:frontmatter}]

\setupsectionblock
  [bodypart]
  [page=no,
   before=\setups{header:bodymatter}]

\setupsectionblock[appendix] [page=no]
\setupsectionblock[backpart] [page=no]

\setuppagenumbering
  [state=start,
   location=, % already set with \setupheadertexts
   way=bytext,
   partnumber=no,
   conversion=numbers] % default

\definetext[chapter][footer][pagenumber]
\setuphead[chapter][header=high,footer=chapter]

\setuphead
  [part]
  [%header=high, % already done for the chapter header
   %footer=high, % overloads the chapter setting, footer=pagenumber
   placehead=no,
   resetnumber=no]

\setupheadtext[fr][content=Table des mati\egrave res]
\mainlanguage[fr]

\starttext

\startfrontmatter

\completecontent

\stopfrontmatter

\startbodymatter

\dorecurse{3}
  {\part{\fakewords{5}{10}}
   \dorecurse{3}
     {\chapter{\fakewords{5}{10}}
      \dorecurse{2}
        {\section{\fakewords{5}{10}}
         \fakewords{150}{200}
         \dorecurse{2}
           {\subsection{\fakewords{5}{10}}
            \fakewords{150}{200}}}}}

\stopbodymatter

\stoptext

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:[~2007-11-15 11:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-15  1:03 Jeff Smith
2007-11-15  1:15 ` Idris Samawi Hamid
2007-11-15  2:09   ` Jeff Smith
2007-11-15 11:02     ` Wolfgang Schuster [this message]
2007-11-16 16:17       ` Jeff Smith
2007-11-16 18:31         ` luigi scarso
2007-11-17 12:56         ` Wolfgang Schuster
2007-11-29  0:35       ` Jeff Smith
2007-11-29  9:12         ` Hans Hagen
2007-11-29 10:41           ` Wolfgang Schuster
2007-11-30  2:51             ` Jeff Smith

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=115224fb0711150302q8ade6dck9b5b7673009ee551@mail.gmail.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).