Hi Matteo, At 2023-08-25T14:25:06+0200, Matteo Bini wrote: > I'm writing some documents that will be exported in PDF with A4 paper > size. I'm using my own macro package. [...] > This is how I output to PDF: > groff -K utf8 -m mymacro -M . -P -pa4 -T pdf in.roff > out.pdf > > I would expect the word "footer" to pop up at -2c from the page bottom, > then a page break. Footer does pop up, and there's the page break too, > however it does not show up at -2c from the bottom. It's lower. > > What am I doing wrong?
I couldn't reproduce your problem with groff 1.23.0. I used the attached input document, very similar to yours, but combining the page layout and page content stuff. With the `pl` request commented and the `-P -pa4` option sequence omitted, I get a page that numbers 54 lines before springing the footer trap, which writes the word "footer" and breaks the page. $ groff -K utf8 -T pdf ATTIC/bini.roff >| ATTIC/bini.pdf If I uncomment the `pl` request and restore the option sequence... $ groff -K utf8 -P -pa4 -T pdf ATTIC/bini.roff >| ATTIC/bini.pdf ...I get a page that is noticeably longer, numbering 58 lines before the footer trap springs. The visible bottom margin sizes _look_, to my eyeballs, about the same size. (Once upon a time, like 25 years ago, there was a tool called xruler or similar that made it easy to measure distances on the screen. Unfortunately, I guess as parcel of "making Linux ready for the desktop", this sort of practical application was discarded as being too ugly. Didn't help with that streamlined, configuration-free experience Sun was going for by taking over GNOME development, and didn't promote TrollTech's private dialect of C++, so it got consigned to the flames.) ...but I digress. Please verify that you can reproduce the results I'm getting. If you can, we'll look into the matter of achieving precise margin sizes, an area I have recently come to feel is under-documented in groff. If you _can't_ reproduce my results, we need to sort that out; there may be a bug somewhere wanting squashing. Regards, Branden
.pl 29.7c .de FO footer . bp .. .wh -2c FO Hello, world! .sp I've set the page length to 29.7c (A4). .sp I've set up a trap at -2c with my macro FO. .sp Now I'm going to make a bunch of lines. .nf 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 .fi All done\(embye!
signature.asc
Description: PGP signature