It's not proving as easy as the manual would have it. I've spent several hours over recent evenings trying to discover how to move page numbers from the header default to alternating footers, using -ms. In my hands, both .OF and .EF fail to produce any output, and .OH & .EH fix \n% at 1 for all pages, when given the attached test input.
The groff commandline appears at the end of the input file. (For convenience, I invoke it with a keystroke in the editor.) These results are on: GNU groff version 1.22.4 as 1.23.0 on the new devuan install gives: groff: fatal error: cannot load 'DESC' description file for device 'pdf' (That's something else I'll have to figure out along the way.) I'll attach the pdf, as it might squeak through at 7564 bytes. Any hints on how to hold my mouth right would hopefully reduce the number of hair tufts needing to be vacuumed up off the carpet here. Erik
groff_test2.pdf
Description: Adobe PDF document
.LP \" Some initialisation up front. No observable effect. \".ds CH " " \" Can clobber -ms page numbering default, but prints a '"'. .OF ’ ’Pno test’\n%’ \" ### These two lines produce no output, .EF ’\n%’Pno test’ ’ \" ### with or without .OH &.EH also present. .OH ’ ’Pno test’\n%’ \" ### These two lines print "Pno test 1", .EH ’\n%’Pno test’ ’ \" ### on pages 2 & 3. That's not page numbering. \".ds CF - \n% - \" Heck, this also does nothing. .LP Let's see if -ms can number pages in the header or footer, using .OF & .EF or .OH & .EH. .bp .LP How hard can it be? After all, it's described in the manual, innit? .bp .LP Oh-oh, not off-by-one, but off-by-n. Fruit-loops! :!groff -Tpdf -dpaper=a5 -P-pa5 -P-l -ms /home/erik/misc/typsetting/src/test2.ms > /tmp/groff_test2.pdf
