asciidoctor-web-pdf icon indicating copy to clipboard operation
asciidoctor-web-pdf copied to clipboard

page-counter does not work in Paged.js

Open henriette-einstein opened this issue 4 years ago • 2 comments

The counter() function is Paged.js does not work as expected.

The following document uses the counter "page" that is initially set to 0 in the body selector

      body {
        counter-reset: page;
      }

It is then again set to 1 when the div with id "#content' is found in the document

      #content {
        counter-reset: page 1;
        hyphens: auto;
      }

The counter is used to display the page number on the bottom of the content pages.

Expected behavior: The content pages should be numbered starting with 1 on the bottom of the content pages.

Actual behavior: The page numbers are incorrect. Look at the test document attached to this issue.

test-pagenumber.html.zip

This issue is not related to asciidoctor-web-pdf directly but instead to the underlying paged.js library.

henriette-einstein avatar Jun 15 '20 10:06 henriette-einstein

A new version of Paged.js is out with fixes on counter-reset and counter-increment. I will try to upgrade as soon as I get the chance. Hopefully, this issue should be fixed.

ggrossetie avatar Jun 22 '20 09:06 ggrossetie

Just gave it a try but this issue is not fixed. Upstream issue: https://gitlab.pagedmedia.org/tools/pagedjs/issues/220

ggrossetie avatar Jun 22 '20 16:06 ggrossetie