ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Page Numbering Hell
Date: Fri, 23 Oct 2009 16:41:28 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.0910231624460.30510@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <alpine.LNX.2.00.0910230340560.18286@ybpnyubfg.ybpnyqbznva>

On Fri, 23 Oct 2009, Aditya Mahajan wrote:

> On Wed, 21 Oct 2009, Bryant Eastham wrote:
>
>> And I would still love a short, working example based on previous
>> request.
>
> It seems that my previous reply was eaten by the server downtime. Here it is 
> again, completing the missing step suggested by Alan.
>
> % missing setups to:
> % 1. frontmatter pagenumbering conversion=romannumerals
> \setupuserpagenumber[way=byblock]
> \definestructureconversionset[frontpart:pagenumber][][romannumerals]
> \definestructureconversionset[bodypart:pagenumber] [][numbers]
> \setupuserpagenumber[numberconversionset=pagenumber]
>
> % 2. bodymatter pagenumbering "chapter-page"
> % 3. reset pagenumber for each chapter
> \setupuserpagenumber
>  [way=bychapter,
>   prefix=yes,
>   prefixset=chapter,
>   prefixsegments=2:2, % so that numbers come correctly in TOC
>   prefixconnector=-,
> ]
>
> % 4. add blank pages if necessary to start chapters on odd pages.
> % 5. Page number in top margin
> \setuppagenumbering[location={header,margin},alternative=doublesided]

The above solution was for MkIV. For completeness, this is how you will do 
the same with MkII. I don't know how to get the page numbers correct in 
the TOC in this case.

% 1. frontmatter pagenumbering conversion=romannumerals
\startsectionblockenvironment[frontpart]
   \setuppagenumbering[conversion=romannumerals]
\stopsectionblockenvironment

% 2. bodymatter pagenumbering "chapter-page"
% 3. reset pagenumber for each chapter
\startsectionblockenvironment[bodypart]
   \setuppagenumber[number=1]
   \setuppagenumbering[way=bychapter, chapternumber=yes]
\stopsectionblockenvironment


% 4. add blank pages if necessary to start chapters on odd pages.
% 5. Page number in top margin
\setuppagenumbering[location={header,margin},alternative=doublesided]

Aditya
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-10-23 20:41 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-21  6:36 Bryant Eastham
2009-10-21  7:13 ` Alan BRASLAU
2009-10-21  7:46   ` luigi scarso
2009-10-21 14:24   ` Bryant Eastham
2009-10-21 16:00     ` Alan BRASLAU
2009-10-21 16:52       ` Bryant Eastham
2009-10-21 17:42         ` Alan BRASLAU
2009-10-23  7:19         ` Taco Hoekwater
2009-10-23  7:38           ` luigi scarso
2009-10-23  7:45         ` Aditya Mahajan
2009-10-23 20:41           ` Aditya Mahajan [this message]
2009-10-26  6:42             ` Thomas Floeren
2009-10-23  7:57         ` luigi scarso
2009-10-24 11:48         ` Spam:*****, " Hans Hagen
2009-10-22  8:03     ` Boštjan Vesnicer
2009-10-25 14:57       ` Hans Hagen
2009-10-21 15:49 ` Aditya Mahajan
2009-10-23 16:34   ` Bryant Eastham
2009-10-21 20:57 ` Thomas A. Schmitz
2009-10-23  8:30   ` Bryant Eastham
2009-10-23  8:49     ` luigi scarso
2009-10-23  9:39     ` Alan BRASLAU
2009-10-24 11:57     ` Spam:*****, " Hans Hagen
2009-10-23 19:57 ` Page Numbering Hell (SOLVED) Bryant Eastham

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=alpine.LNX.2.00.0910231624460.30510@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --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).