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