ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Zhichu Chen" <zhichu.chen@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Page numbering in Adobe Reader
Date: Thu, 16 Oct 2008 17:48:38 +0000	[thread overview]
Message-ID: <769ba7780810161048m3d0a61e7o855b75e3422fd8e8@mail.gmail.com> (raw)

Hi Hans and Taco,

Some guy think it's cool to use romannumeral numbers in the
preface and so is in the Adobe Reader. I searched the source
but apparently it is not provided. I made a very dirty test file so
could you make a switch in the \setupinteraction officially?

My test file is like:
==============================================
\pdfcompresslevel 0

\setupinteraction
  [state=start,
   focus=width,
   page=yes,
   openaction=firstpage,
   click=no,
   title=TEST,
   author=Neals,
   subtitle=Test,
   keyword={test}]

\setupcolors
  [state=start]

\newcount\FrontPageNumbers

\setupsubpagenumber[way=bytext,state=start]
\setuppagenumbering[location=]

\startsectionblockenvironment[frontpart]
 \setupfootertexts[pagenumber]
 \setuppagenumbering[conversion=romannumerals]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
 \global\FrontPageNumbers=\pagenumber
 \global\advance\FrontPageNumbers\minusone
 \setuppagenumber[number=1]
 \resetsubpagenumber
%  \setupfootertexts[\the\FrontPageNumbers]
 \setupfootertexts[pagenumber]
\stopsectionblockenvironment

\startsectionblockenvironment[backpart]
 \resetsubpagenumber
\stopsectionblockenvironment

\def\PageLabels{\pdfcatalog{/PageLabels << /Nums [ 0 << /S /r >>
\the\FrontPageNumbers << /S /D >> ] >>  >>}}


\prependtoks
  \PageLabels
\to \everystoptext

\starttext



\startfrontmatter
% \chapter{Table of Contents}
\completecontent[interaction=all]
\chapter{Preface}
\dorecurse{10}{\input zapf\par}
% \chapter{Preface}
% \dorecurse{10}{\input zapf\par}
% \chapter{Preface}
% \dorecurse{10}{\input zapf\par}
\stopfrontmatter

\startbodymatter
\chapter{Test}
\dorecurse{15}{\input tufte\par}
\chapter{TestAgain}
\dorecurse{15}{\input ward\par}
\stopbodymatter

\startbackmatter
Index maybe.
\stopbackmatter


\stoptext
==============================================

A lot of the code to setup the main layout is stolen from Wolfgang :)


-- 
Best Regards
Chen
----------------------------------------------------------------

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
----------------------------------------------------------------
___________________________________________________________________________________
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-10-16 17:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-16 17:48 Zhichu Chen [this message]
2010-06-27 18:52 ` Steffen Wolfrum
2010-06-27 20:45   ` Wolfgang Schuster
2010-06-28  5:45     ` Steffen Wolfrum
2010-06-28  7:42       ` Steffen Wolfrum

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=769ba7780810161048m3d0a61e7o855b75e3422fd8e8@mail.gmail.com \
    --to=zhichu.chen@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).