For a book, an Indian publisher wants me to include what they call "forma numbers" (not sure what the standard term is, if there is one) with the book name abbreviation on every sixteenth absolute page, starting from absolute page number 17, irrespective of the page style (e.g. even on a blank page which has \thispagestyle{empty}). Needless to say, these will all be recto pages, on which book chapters may begin (so the page can have no header or footer, as the first pages of my chapter have \thispagestyle{empty}). This is what I want to achieve.
- Page 1 of the PDF: Nothing to be printed on the left in the footer
- Page 17 of the PDF: "2 KKS" to be printed on the left in the footer
- Page 33 of the PDF: "3 KKS" to be printed on the left in the footer
- Page 49 of the PDF: "4 KKS" to be printed on the left in the footer
- and so on, on every sixteenth page
On all other pages, the left side of the footer will be empty.
I figured out that I need to use \usepackage{zref-user,zref-abspage} and \arabic{abspage} to get the absolute page numbers (which start with zero).
I also figured out that I need \intcalcMod from intcalc modulo division, as pointed out here
So now I need two things
- Check whether
\arabic{abspage}mod 16 is 0 (as\arabic{abspage}begins with 0 and not 1). This should be something like\ifthenelse{\equal{\intcalcMod{\value{abspage}}{16}}{0}}. If it is then I print\intcalcDiv{\value{abspage}}{16}and the abbreviation on the left side of the footer. - This needs to override
\thispagestyle{empty}which could be in force for pages on which a chapter begins.
How do I achieve (1) and (2) above?
For (1), the following works but gives the absolute page number (which is not what I want)
\fancyfoot[L]{
\ifthenelse{\equal{\intcalcMod{\value{abspage}}{16}}{0}}{\arabic{abspage} KKS}{}
}
I tried integer division with the following but it fails
\fancyfoot[L]{
\ifthenelse{\equal{\intcalcMod{\value{abspage}}{16}}{0}}{\arabic{\intcalcDiv{\value{abspage}}{16}} KKS}{}
}
For (2), I can probably redefine pagestyle{empty} to include the solution from (1).


