diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-03-29 04:32:58 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-29 04:32:58 -0600 |
| commit | 41054730ae05b0d99b0a15c8872b95c28489ff31 (patch) | |
| tree | 0271f81d31bf116a98b8503ca6ec9be5be0cc36b /lib | |
| parent | 0cfa84c2b82ea727edfd99324e6e6d144d73d7f9 (diff) | |
resolves #2398 use first recto page after toc when media is prepress and page numbering or running content start-at value is after-toc (PR #2413)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index 2a374941..6006cf79 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -299,8 +299,12 @@ module Asciidoctor if (toc_extent = @toc_extent) if title_page_on && !insert_toc - num_front_matter_pages[0] = toc_extent.to.page if @theme.running_content_start_at == 'after-toc' - num_front_matter_pages[1] = toc_extent.to.page if @theme.page_numbering_start_at == 'after-toc' + if @theme.running_content_start_at == 'after-toc' || @theme.page_numbering_start_at == 'after-toc' # rubocop:disable Style/SoleNestedConditional + last_toc_page = toc_extent.to.page + last_toc_page += 1 if @ppbook && (recto_page? last_toc_page) + num_front_matter_pages[0] = last_toc_page if @theme.running_content_start_at == 'after-toc' + num_front_matter_pages[1] = last_toc_page if @theme.page_numbering_start_at == 'after-toc' + end end toc_page_nums = ink_toc doc, toc_num_levels, toc_extent.from.page, toc_extent.from.cursor, num_front_matter_pages[1] else |
