From: "Derek CORDEIRO" <derekcordeiro@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: PDF page numbers
Date: Tue, 16 Dec 2008 15:07:00 +0530 [thread overview]
Message-ID: <33c64e670812160137h34304636tab9128adfa2c907c@mail.gmail.com> (raw)
In-Reply-To: <769ba7780812160110l3eda4882r947bc2f6e491a921@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2945 bytes --]
On Tue, Dec 16, 2008 at 2:40 PM, Zhichu Chen <zhichu.chen@gmail.com> wrote:
> 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
> ----------------------------------------------------------------
>
>
>
> On Tue, Dec 16, 2008 at 4:33 PM, Taco Hoekwater <taco@elvenkind.com>
> wrote:
> >
> >
> > Mohamed Bana wrote:
> >> Derek CORDEIRO wrote:
> >>> In latex + book/memoir + hyperref, if \frontmatter \mainmatter are
> >>> used, the pdf files generated use the roman numbers in the pdf itself.
> >>> It appears as ii (2 of 500) in the pdfviewer. Is it possible to do the
> >>> same with ConTeXt?
> >>
> >> It would be great if ConTeXt could.
> >
> > Doesn't sound like rocket science. Perhaps someone could dig up the
> > latex code that does this ?
>
> Does the following code work for you?
> ==============================================
> \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
> ==============================================
>
Works Perfectly!
Regards,
Derek
--
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Blog: http://www.derekcordeiro.com
Follow Me: http://twitter.com/derekcordeiro
[-- Attachment #1.2: Type: text/html, Size: 4219 bytes --]
[-- Attachment #2: Type: text/plain, Size: 487 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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2008-12-16 9:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 10:53 Derek CORDEIRO
2008-12-09 12:27 ` Mojca Miklavec
2008-12-10 16:05 ` Marcin Borkowski
2008-12-10 16:20 ` Derek CORDEIRO
2008-12-10 17:28 ` Taco Hoekwater
2008-12-10 19:00 ` Mojca Miklavec
2008-12-09 13:00 ` Zhichu Chen
2008-12-09 15:00 ` Aditya Mahajan
2008-12-15 22:10 ` Mohamed Bana
2008-12-16 8:33 ` Taco Hoekwater
2008-12-16 8:47 ` Hans Hagen
2008-12-16 9:10 ` Zhichu Chen
2008-12-16 9:37 ` Derek CORDEIRO [this message]
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=33c64e670812160137h34304636tab9128adfa2c907c@mail.gmail.com \
--to=derekcordeiro@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).