I'm producing a document (book class) that will ultimately be produced using offset lithography. It's therefore useful to ensure the total number of pages is a multiple of four by adding as many blank pages to the end as is appropriate.
This answer deals with adding a page if necessary to make the total number even. I can't figure out how to adapt it to deal with multiples of four. Is there a way?
Best Answer
\numexpr
divisions round, so they are not so good in this case:The same in
expl3
syntax:With
\frontmatter
and\mainmatter
the situation is a bit more complicated.The
\checkmultipleoffour
has also an optional argument where specifying possible pages before\frontmatter
(an unnumbered frontispiece, for instance).Note that a couple of LaTeX runs may be needed, because these macros require the
\label
-\ref
system to synchronize.