We use Prince to publish long textbooks that have a couple of page groups (frontmatter and chapter) and multiple instances of those groups (many chapters). We are trying to implement changebars in a new way but we are having a hard time targeting individual pages because our page groups restart multiple times throughout the book.
We’ve been using this resource: https://www.princexml.com/forum/topic/3516/changebars
This is the CSS that is causing our changebars to be duplicated across every nth page of a chapter:
This is how we’re using page groups:
We’ve been using this resource: https://www.princexml.com/forum/topic/3516/changebars
- Can we use the nth page selector to target an absolute page regardless of page groups?
- Are we using the nth selector incorrectly?
This is the CSS that is causing our changebars to be duplicated across every nth page of a chapter:
@page:nth(1) { @left { content: flow(bars1) } }
@page:nth(2) { @left { content: flow(bars2) } }
This is how we’re using page groups:
chapter {
page: chapter;
page-break-before: right;
prince-page-group: start;
}
@page chapter {
margin: 0;
margin-bottom: 0.5in;
margin-top: 0.875in;
}
@page chapter:first {
margin-top: 0;
@top {
content: none;
}
@top-left {
content: none;
}
@top-right {
content: none;
}
@bottom-right {
content: none;
}
}