ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Page numbering in Adobe Reader
@ 2008-10-16 17:48 Zhichu Chen
  2010-06-27 18:52 ` Steffen Wolfrum
  0 siblings, 1 reply; 5+ messages in thread
From: Zhichu Chen @ 2008-10-16 17:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-28  7:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-16 17:48 Page numbering in Adobe Reader Zhichu Chen
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

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).