Does anyone have a solution for retrieving the page number as defined by the document section numbering?
I have a large document (~350pp) with multiple sections including:
- title pages (half title, frontispiece, full title, colophon etc)
- front matter numbered i,ii,iii ...
- content number 1,2,3 ...
- back matter (continues content numbering)
In the main content I auto-create pages with multiple frames on every page each with indexing attributes - all of which means I can auto-create multiple indexes in the back matter.
In scripter when getting the frame and the attributes - the only page number I can get is via
currentPage() - which gives the number of the page in the document ... not the section defined page number (which is added via the master page footers).
The only ways I can see to get round this when building my indexes:
- Prompt the user to enter the offset when they run the indexing script .. not so keen on this one, seems like it should not be needed
- Drop a hidden named framed on to the end of the frontmatter with a count of pages - find the frame, use the content or page number as the offset (uggh!)
- Use a master page type that only applies to the main content .. find the first page with that master page .. get the page number and use that as the offset
Is there a better way to get the value of the section page number in scripter?
thanks!
Yes I'm using document sections to define the page numbers. Inserting a page at a specific location with scripter adds it to the pre-existing section which means the page number defined by the section is picked up. I also specify the appropriate master page for that content - which has the appropriate page furniture .. including page number control character in the footer if that is needed (I have some master pages which don't display a page number as the content is a full page images)
I understand your approach (which would definitely work) but had hoped to accomplish this in my current scripts rather than going off into XML processing ..
Finding the index of the first master page of a given type and using that as the offset when building the index entries appears to be the best solution at the moment.
thanks
Rob