I have a use-case where i want to split the document up in named pages as chapters and where i need a custom counter to count pages from the beginning of a chapter (not the beginning of the entire document) so I can access a chapter page with nth(custom counter).
I am trying to target page 2 of chapter 1 and insert content in a margin-box no matter if the number of chapters or chapter pages expand.
Right now the chapter-1-counter always shows “1”:
#chapter-1 {
page: chapter-1;
counter-increment: chapter-1-counter;
}
@page chapter-1:nth(2) {
@bottom-right{
content: counter(chapter-1-counter);
}
}
Is this possible or should there be used some workaround?
I am trying to target page 2 of chapter 1 and insert content in a margin-box no matter if the number of chapters or chapter pages expand.
Right now the chapter-1-counter always shows “1”:
#chapter-1 {
page: chapter-1;
counter-increment: chapter-1-counter;
}
@page chapter-1:nth(2) {
@bottom-right{
content: counter(chapter-1-counter);
}
}
Is this possible or should there be used some workaround?