I use \definestructureconversionset [frontpart:pagenumber][][romannumerals] to make sure the numbering of my pages in frontmatter use Roman numerals. Not only are the pages numbered with Roman numerals, but the PDF index links and PDF page numbers use this as well. I would like to do something similar for the backmatter, but I would like both the page numbers and the PDF index links and PDF page numbers look like A1, A2, ... (for appendix). How can this be done? Thanks, Troy Henderson
To give an idea of what I am wanting, the attached screenshot is from Evince for a particular PDF that was created with some other program other than ConTeXt. Notice the custom page number names such as "Statement", "P-1", "P-5", ..., "P-25", "APP-1", "APP-3", ... How can I get this with ConTeXt? Troy
Am 06.02.2014 um 04:17 schrieb Troy Henderson
To give an idea of what I am wanting, the attached screenshot is from Evince for a particular PDF that was created with some other program other than ConTeXt. Notice the custom page number names such as "Statement", "P-1", "P-5", ..., "P-25", "APP-1", "APP-3", ...
How can I get this with ConTeXt?
\defineconversionset[frontpart:pagenumber][][romannumerals] \definesectionblock[project][projectmatter] \startsectionblockenvironment[project] \setcounter[userpage][1] \setuppagenumber[numberstarter=P-] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setcounter[userpage][1] \stopsectionblockenvironment \startsectionblockenvironment[appendix] \setcounter[userpage][1] \setuppagenumber[numberstarter=APP-] \stopsectionblockenvironment \starttext \startfrontmatter \dorecurse{10}{\dontleavehmode\page} \stopfrontmatter \startprojectmatter \dorecurse{10}{\dontleavehmode\page} \stopprojectmatter \startbodymatter \dorecurse{10}{\dontleavehmode\page} \stopbodymatter \startappendices \dorecurse{10}{\dontleavehmode\page} \stopappendices \stoptext Wolfgang
Wolfgang, Thank you for your response. Unfortunately, this does not quite work. The page numbers are correct, but they're not showing up like the previous screenshot in Evince's index. I've attached my ConTeXt source as well as the output PDF and a screenshot of Evince's Index view. Troy
Any thoughts on getting these "custom PDF bookmark/index" entries? Thanks in advance, Troy
Andreas, Thank you for the reply. I'm afraid that I don't know how to manually manipulate the PDF Catalog. I was able to successfully build the code on this page http://www.ntg.nl/pipermail/ntg-context/2008/036947.html but I had to add \placebookmarks[chapter,section][chapter][force=yes] and although I have Evince's "Index" visible, all of the PageLabels are "1" and when I click on the entry it doesn't change to the correct page. I do get an error from Evince that says "failed to look up aut:3" or another number. I'm not sure what my options are. Troy
On 2/13/2014 1:39 PM, Troy Henderson wrote:
Andreas,
Thank you for the reply. I'm afraid that I don't know how to manually manipulate the PDF Catalog. I was able to successfully build the code on this page
http://www.ntg.nl/pipermail/ntg-context/2008/036947.html
but I had to add
\placebookmarks[chapter,section][chapter][force=yes]
and although I have Evince's "Index" visible, all of the PageLabels are "1" and when I click on the entry it doesn't change to the correct page. I do get an error from Evince that says "failed to look up aut:3" or another number.
I'm not sure what my options are.
mkiv: \nopdfcompression \setupinteraction [state=start] \defineconversionset[frontpart:pagenumber][][romannumerals] \defineconversionset[bodypart:pagenumber] [][numbers] \defineconversionset[appendix:pagenumber] [][Characters] \setupuserpagenumber[numberconverionset=pagenumber,way=byblock] \setupheadertexts[Page \userpagenumber\ of \lastuserpagenumber] \starttext \startfrontmatter \startchapter[title=Fontpart] \dorecurse{20}{\input knuth \footnote{test}\par} \stopchapter \stopfrontmatter \startbodymatter \startchapter[title=Bodypart] \dorecurse{20}{\input tufte\par} \stopchapter \stopbodymatter \startappendices \startchapter[title=Appendix] \dorecurse{20}{\input zapf\par} \stopchapter \stopappendices \stoptext gigves in the pdf: /PageLabels << /Nums [ 0 << /S /r >> 6 << /S /D >> 11 << /S /A >> ] >> ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Hans, Attached is a screenshot of what your output looks like in Evince. I am trying to get the "Page Number" listed as "A" for the Appendix. Troy
On 2/13/2014 4:28 PM, Troy Henderson wrote:
Hans,
Attached is a screenshot of what your output looks like in Evince. I am trying to get the "Page Number" listed as "A" for the Appendix.
It shows ok in Okular and Sumatrapdf (both on windows) so it's probably a bug in Evince then. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Thu, 13 Feb 2014, Troy Henderson wrote:
Hans,
Attached is a screenshot of what your output looks like in Evince. I am trying to get the "Page Number" listed as "A" for the Appendix.
If I add \placebookmarks[chapter,section][chapter][force=yes] to Hans's example and compile it (using the old ConTeXt ver 2013.12.24), I see the bookmarks in Evince (ver 3.10.3 on Linux). See the attached figure. Aditya
I do have an older version of Evince on this machine (v. 2.32.0). I have a new version installed on another machine. I will check it there. Thank you very much. My only question now would be how to remove the "1" and "A" PRECEDING the chapter names (as indicated in the attached editing of Aditya's screenshot). Troy
My desired PDF PageLabels are in the attached PNG. I have also attached a ConTeXt source file that attempts attempts this, but clearly I am missing a bit. I would appreciate any help in accomplishing this effect. Troy
On 2/13/2014 11:16 PM, Troy Henderson wrote:
My desired PDF PageLabels are in the attached PNG. I have also attached a ConTeXt source file that attempts attempts this, but clearly I am missing a bit. I would appreciate any help in accomplishing this effect.
it's not that trivial to come up with an interface for that which also can be wikified and remembered well anyhow, i'll add this: \setupuserpagenumber[viewerprefix=titlepage] \startstandardmakeup The first page \stopstandardmakeup \setupuserpagenumber[viewerprefix=p ] so it's a semi-manual job Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
\setupuserpagenumber[viewerprefix=titlepage] \startstandardmakeup The first page \stopstandardmakeup \setupuserpagenumber[viewerprefix=p ]
I'm clearly missing something. Troy \setupinteraction[state=start] \defineconversionset[frontpart:pagenumber][][romannumerals] \defineconversionset[bodypart:pagenumber][][numbers] \defineconversionset[appendix:pagenumber][][Characters] \setupuserpagenumber[numberconverionset=pagenumber,way=byblock] \placebookmarks[chapter,section][chapter][force=yes] \starttext \startfrontmatter \startchapter[title={Cover}]\stopchapter \dorecurse{2}{\mbox{}\page} \setupuserpagenumber[viewerprefix=titlepage] \startstandardmakeup \startchapter[title={Title Page}] \stopchapter \stopstandardmakeup \setupuserpagenumber[viewerprefix=p ] \stopfrontmatter \startbodymatter \stopbodymatter \stoptext http://www.ntg.nl/mailman/listinfo/ntg-context
Am 15.02.2014 um 02:30 schrieb Troy Henderson
\setupuserpagenumber[viewerprefix=titlepage] \startstandardmakeup The first page \stopstandardmakeup \setupuserpagenumber[viewerprefix=p ]
I'm clearly missing something.
Have you updated you installation because the viewerprefix key was added yesterday.
\dorecurse{2}{\mbox{}\page}
\dorecurse{2}{\dontleavehmode\page} Wolfgang
anyhow, i'll add this:
\setupuserpagenumber[viewerprefix=titlepage] \startstandardmakeup The first page \stopstandardmakeup \setupuserpagenumber[viewerprefix=p ]
Thanks Hans. That works great. Is it possible to have ONLY the prefix (not followed by the corresponding page number) with this implementation? If not, is that a feature that can also be added? Troy
Is it possible to have ONLY the prefix (not followed by the corresponding page number) with this implementation? If not, is that a feature that can also be added?
I tried to create a custom label called "viewercustom" (which operates like "viewerprefix" but omits the userpage counter value), but I have been unsuccessful . I modified the following four files (which were the only files that I could find containing "viewerprefix") ./tex/texmf-context/tex/context/base/strc-pag.mkiv ./tex/texmf-context/tex/context/base/strc-pag.lua ./tex/texmf-context/tex/context/base/mult-def.mkiv ./tex/texmf-context/tex/context/base/lpdf-mis.lua Is there something else that needs to be modified that I am missing? Troy
On Tue, 25 Feb 2014, Troy Henderson wrote:
Is it possible to have ONLY the prefix (not followed by the corresponding page number) with this implementation? If not, is that a feature that can also be added?
I tried to create a custom label called "viewercustom" (which operates like "viewerprefix" but omits the userpage counter value), but I have been unsuccessful . I modified the following four files (which were the only files that I could find containing "viewerprefix")
./tex/texmf-context/tex/context/base/strc-pag.mkiv ./tex/texmf-context/tex/context/base/strc-pag.lua ./tex/texmf-context/tex/context/base/mult-def.mkiv ./tex/texmf-context/tex/context/base/lpdf-mis.lua
Is there something else that needs to be modified that I am missing?
Did you regenerate the format? context --make. Aditya
I have now :-) which now reflects may changes, but now I have to figure out why my changes aren't working as expected. :-/
After trying for quite some time, I believe it's safe to say that someone with more knowledge of Lua and the internals of ConTeXt may have to look into this as I may be underqualified. Troy
participants (5)
-
Aditya Mahajan
-
Andreas Schneider
-
Hans Hagen
-
Troy Henderson
-
Wolfgang Schuster