I currently use the following directives to alternate the positioning of my page numbers on left and right pages.
After generating sample PDFs of each article, the managing editor creates a custom CSS file to offset the page numbering appropriately. For example:
The article-specific CSS is linked in the XHTL as follows:
What we want is to have the page numbers always show on the right for odd-numbered pages, and always on the left for even-numbered pages—but because the page counter could be reset to any number, we're getting the page numbers positioned on "right" and "left" pages relative to first page of each article, instead of relative to the even or odd page number.
Is there a way to fix this with logic in the main CSS file and/or in my XHTML template? I don't want to add logic to the article-specific CSS, because that would be a burden to my editors.
Thank you!
@page :left {
@bottom-left {
content: counter(page);
}
}
@page :right {
@bottom-right {
content: counter(page);
}
}
After generating sample PDFs of each article, the managing editor creates a custom CSS file to offset the page numbering appropriately. For example:
body { counter-reset: page 422; }
The article-specific CSS is linked in the XHTL as follows:
<link rel="stylesheet" type="text/css" media="print" href="path/to/main.css" />
<link rel="stylesheet" type="text/css" media="print" href="path/to/article-specific.css" />
What we want is to have the page numbers always show on the right for odd-numbered pages, and always on the left for even-numbered pages—but because the page counter could be reset to any number, we're getting the page numbers positioned on "right" and "left" pages relative to first page of each article, instead of relative to the even or odd page number.
Is there a way to fix this with logic in the main CSS file and/or in my XHTML template? I don't want to add logic to the article-specific CSS, because that would be a burden to my editors.
Thank you!