I am trying to produce two copies of a training course workbook: One for delegates and one for the trainer. The trainer one should have additional "secret sauce" notes in it, but I want the page numbers to be consistent across both.
My plan is to add some padding in to the delegate workbook - "this page intentionally left blank" or "write your own notes here" to keep the page numbers the same in both copies. I'll use `ifdef` conditionals to render one or the other.
What I'd like to do is add some kind of check to the CI build for the book so that if this padding, which will have to be done by hand, isn't right, the build will fail. I'd basically like to be able to compare the ToC from each copy and check that the main headings are on the same pages in both workbooks.
Is there a place I can hook into the PDF rendering cycle to do this? Or do I need to write something to read the PDF again afterwards, outside of asciidoctor?
Re: Is there a way to intercept the PDF rendering?
I am assuming you are using asciidoctor-pdf.
You are not saying how often these "secret sauce" notes change or how large they are. If they don't change often and fit on a single page, why not do something like this:
// Use :trainer_copy: to create a copy for the trainer.
// Use :trainer_copy!: to create a copy for the delegates.
This is the introduction to the training course.
Here are the secret sauce notes.
Space for delegates to write their notes.
If it needs to fit on multiple pages, you may need to use additional page breaks.
That way, you will end up with the same number of pages and the same ToC.