Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to start page numbering after first page of body #560

Closed
cascer1 opened this issue Sep 16, 2016 · 4 comments
Closed

Add ability to start page numbering after first page of body #560

cascer1 opened this issue Sep 16, 2016 · 4 comments
Assignees
Milestone

Comments

@cascer1
Copy link

cascer1 commented Sep 16, 2016

I would like support to reset page numbers from an arbitrary position in the document. I would also like to be able to use roman numerals as page numbers.

for example, my document has an introduction that I would like to give a separate numbering scheme, so the final page numbers should be something like

i, ii, iii, iv, 1, 2, 3... 20, 21

@barspi
Copy link

barspi commented Jan 9, 2017

I was looking for exactly that. (roman numeral section, followed by the normal section where I choose which one is "page 1")

@nicolas33
Copy link

I need something similar. The page numbering must be like:

1, 2, 3.. 20, 21, i, ii, iii, iv

where the roman numbering is for the appendices.

@chuck-confluent
Copy link

chuck-confluent commented Nov 6, 2019

Adding my voice to the choir, although I'm not sure if my requirement is slightly different.

I have a single document that includes other documents to make a book. I would like each includeed part to have its own page numbering in the footer. Something like {chapter-number} - {chapter page number}. From experimentation, modifying a custom {chapter-number} attribute throughout doesn't work because the footer appears to happen last, and so only uses the final value of custom attributes.

Perhaps better would be to have a "progress indicator" like

{chapter-number} - {chapter page number}/{total number of pages in chapter}

Let me know if this makes sense.

@mojavelinux
Copy link
Member

If we focus on the initial request of allowing the arabic page numbering to start beyond the first page of the body, I think we can achieve it. Something like:

page:
  numbering:
    start_at: 4

The value is assumed to be a physical body number. In other words, the keyword body is 1, and here the 4th physical body page will be virtual page number 1. All pages before are in roman numerals.

1, 2, 3.. 20, 21, i, ii, iii, iv

This is outside the scope of the design of this converter.

@chuck-confluent what you are asking about would be an entirely different request. I have already been thinking about setting an implicit attribute in the running content to hold the chapter number. There may be room to store the page-number-of-chapter as well, but I'm not sure.

From experimentation, modifying a custom {chapter-number} attribute throughout doesn't work

No, it would not. The running content should only be accessing implicit attributes or attributes defined in the document header.

@mojavelinux mojavelinux added this to the v1.5.0 milestone Nov 7, 2019
@mojavelinux mojavelinux changed the title Add ability to arbitrarily reset page numbering Add ability to start page numbering after first page of body Nov 7, 2019
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Dec 30, 2019
…ge of body

* set page_numbering_start_at theme key to an integer value
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Dec 30, 2019
…ge of body

* interpret integer value of page_numbering_start_at theme key as body page number
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Dec 30, 2019
…ge of body

* interpret integer value of page_numbering_start_at theme key as body page number
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Dec 30, 2019
…ge of body

* interpret integer value of page_numbering_start_at theme key as body page number
@mojavelinux mojavelinux self-assigned this Dec 30, 2019
@mojavelinux mojavelinux modified the milestones: v1.5.0, v1.5.0.rc.1 Jan 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants