Add Blank Pages before end
Posted: Fri Jan 16, 2026 3:17 pm
I have a backmatter topic (an address page) at the end of my bookmap
I have a custom page style for the backmatter to add a date to the footer
I want to insert 3 blank pages before the final page so I added the following to my CSS:
If I have only one 'before' statement, it adds a single blank page that matches the 'my-blank-page' template.
If I use the code above, the first blank page takes on the 'back-cover' template (with the date), then it's followed by 2 blank pages using the 'my-blank-page' template and finally the address topic.
This is more difficult to debug as the blank pages don't show up at all in the html file.
Have I set this up right? Is this even possible? How can I avoid it using the backmatter footer on the first blank page?
Code: Select all
<backmatter><topicref href="addresses.dita" toc="no"></topicref></backmatter>Code: Select all
@page back-cover{
@top-left { content:none !important;}
@top-right { content:none !important;}
@bottom-center { content:none !important;}
@bottom-right { content: oxy_xpath('format-date( current-date(), "[Y0001]-[M01]-[D01]", "en", (), ())'); }
}
*[class ~= "map/map"] > *[class ~= "topic/topic"][is-backmatter] {
page: back-cover;
}
Code: Select all
/* add blank pages before back page */
@page my-blank-page {
/* Hide the page numbers */
@top-left {content: none;}
@top-right {content: none;}
@bottom-left {content: none;}
@bottom-right {content: none;}
}
*[class ~= "map/map"] > *[class ~= "topic/topic"][is-backmatter]:before(2){
page:my-blank-page;
display:block;
content: '\2002';
break-after:always;
}
*[class ~= "map/map"] > *[class ~= "topic/topic"][is-backmatter]:before(1){
page:my-blank-page;
display:block;
content: '\2002';
break-after:always;
}If I use the code above, the first blank page takes on the 'back-cover' template (with the date), then it's followed by 2 blank pages using the 'my-blank-page' template and finally the address topic.
This is more difficult to debug as the blank pages don't show up at all in the html file.
Have I set this up right? Is this even possible? How can I avoid it using the backmatter footer on the first blank page?