On Saturday, 5 August 2023 11:12:07 BST Alexis wrote: > In brief: The \X'papersize=paper-format' control command seems to > read the paper-format parameter as width,length as opposed to the > gropdf -p option and the referenced documentation (groff_font(5)) > which specifies length,width for the paper-format argument.
The \X'papersize=' command was first implemented in groff's DVI driver (grodvi) where it is defined as:- ============================================================================== By design, the DVI format doesn’t care about the physical dimensions of the output medium. Instead, grodvi emits the equivalent to TEX’s \special{papersize=width,length} on the first page; dvips (or another DVI driver) then sets the page size accordingly. If either the page width or length is not positive, no papersize special is output. A device control escape sequence \X'anything' is translated to the same DVI file instructions as would be produced by \special{anything} in TEX; anything cannot contain a newline. ============================================================================== So I followed the same order, since this is an older API and I wanted to allow the same source to run on either dvi or pdf [1]. So it is the documentation in the gropdf man page which is wrong. I agree it is a little crazy to reverse the normal groff ordering but I was retaining compatibility with grodvi. I will fix the man page, thanks for the report. Cheers Deri [1] I have subsequently discovered that TeX uses "in" and "cm" as units rather than groff's "i" and "c" so the new gropdf will allow either for the papersize command.