ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Scott Steele <scottlsteele@gmail.com>
To: ntg-context <ntg-context@ntg.nl>
Subject: Frontmatter page numbers and using ifodd / pageno
Date: Mon, 31 May 2010 18:32:31 -0400	[thread overview]
Message-ID: <AANLkTikKqjo71o7Cqpz9OjUhJUzeLR8VoQ86JM7kPhT4@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2007 bytes --]

With the page layout setups I'm using, the first table of contents entry on
each page (except for the first page) is formatted as if it were on the
preceding page. I assume that the page number is not advancing until some
number of objects are placed on the page. When I compiled the example
included below, it was the first three entries on each page (after the first
page) that were formatted as if they were on the previous page.

Related to this, I need "invisible" page numbers on the table of contents
pages to enable different formatting by odd/even page number (which I
accomplish now by using \phantom as a style command for page numbering), but
I'd like for the page numbering of the body matter to start at 1.

Also, how can I number the front matter backward? Like: xi, x, ix, viii,
vii, vi, v, iv, iii, ii, i.

\def\SectionListEntry#1#2#3%
{
\noindent
 \noexpand{\ifodd\pageno
\simplealignedbox{left}{.63667\textwidth}{#2}
\simplealignedbox{middle}{.06\textwidth}{·}
 \simplealignedbox{right}{.30333\textwidth}{#3}
\else
\simplealignedbox{left}{.30333\textwidth}{#3}
 \simplealignedbox{middle}{.06\textwidth}{·}
\simplealignedbox{right}{.63667\textwidth}{#2}
 \fi}
\par\blank
}

\setuplist[section]
[alternative=command,
 command=\SectionListEntry]

\def\TableOfContents%
{
\page[empty]
 \page[odd]
\setuppagenumbering[style=command,
command=\phantom]
 \setuppagenumber[state=start]
\placelist[section]
\setuppagenumber[state=stop]
 \page[empty]
\page[odd]
}
\startfrontmatter
\TableOfContents
\stopfrontmatter

\startbodymatter
\setuppagenumber[state=start]
\dorecurse{45}{\section{Section title}\input tufte}
\stopbodymatter





Thanks,
Scott

-----
This is a work of fiction.  Names, characters, places, and incidents either
are the product of the writer's imagination or are used fictitiously, and any
resemblance to actual persons, living or dead, businesses, companies,
events, or locales is entirely coïncidental.

[-- Attachment #1.2: Type: text/html, Size: 3924 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
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:[~2010-05-31 22:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=AANLkTikKqjo71o7Cqpz9OjUhJUzeLR8VoQ86JM7kPhT4@mail.gmail.com \
    --to=scottlsteele@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).