Re: Footer trap in a A4 PDF

2023-08-27 Thread Matteo Bini
Hello again groffers! I want to thank Tadziu, Deri and Bjarni for their insights on how groff works. The different behaviour between measurement systems reported by Bjarni is not something I expected, nor something that makes any sense. Nonetheless I managed to understand a couple of new things

Re: Footer trap in a A4 PDF

2023-08-26 Thread Bjarni Ingi Gislason
The groff software is tuned to the imperial measurement system (inch etc.). Using another measurement system: A text line normally never touches exactly a trap but goes beyond it. Therefore a footer starts nearer the bottom edge than the measurement in metric (SI) units indicates.

Re: Footer trap in a A4 PDF

2023-08-25 Thread Tadziu Hoffmann
> A slight change and you can colour the margins with pure troff > so it works for both postscript and pdf:- Very good! Your example also demonstrates how setting the vertical spacing to zero allows directly positioning the baseline (which is the reference position for "\D" drawing commands)

Re: Footer trap in a A4 PDF

2023-08-25 Thread Deri
On Friday, 25 August 2023 17:00:23 BST Tadziu Hoffmann wrote: > I have attached a demonstration file you can use for experimenting. > (I have used 3 cm margins for this. Coloring the margins with XX > (for debugging purposes) only works with the PS device; you can > safely remove this.) A slight

Re: Footer trap in a A4 PDF

2023-08-25 Thread G. Branden Robinson
Hi Matteo, At 2023-08-25T18:32:02+0200, Matteo Bini wrote: > On 2023-08-25 10:20, G. Branden Robinson wrote: > > Attaching screenshots of Evince viewing the document in "Dual" mode, > > when produced with Debian's groff 1.22.4 and stock groff 1.23.0 > > I hate to be that meticulous, but if you

Re: Footer trap in a A4 PDF

2023-08-25 Thread G. Branden Robinson
At 2023-08-25T12:46:49-0400, Peter Schaffter wrote: > On Fri, Aug 25, 2023, G. Branden Robinson wrote: > > (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. > > Twenty-five years ago, I started running KDE

Re: Footer trap in a A4 PDF

2023-08-25 Thread Peter Schaffter
On Fri, Aug 25, 2023, G. Branden Robinson wrote: > (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. Twenty-five years ago, I started running KDE just to get its screen ruler. It's still around. Kruler. I use

Re: Footer trap in a A4 PDF

2023-08-25 Thread Matteo Bini
Hello again Branden, On 2023-08-25 10:20, G. Branden Robinson wrote: > Attaching screenshots of Evince viewing the document in "Dual" mode, > when produced with Debian's groff 1.22.4 and stock groff 1.23.0 I hate to be that meticulous, but if you open those images with GIMP, you can see that the

Re: Footer trap in a A4 PDF

2023-08-25 Thread Tadziu Hoffmann
> How should I proceed to achieve precise margin sizes? There's two things to consider here. One: the trap is sprung when a line is output that reaches OR SWEEPS PAST the trap position. If you set your trap at -2 cm, then an output line may nevertheless still intrude into the bottom margin of

Re: Footer trap in a A4 PDF

2023-08-25 Thread G. Branden Robinson
Hi Matteo, At 2023-08-25T16:51:15+0200, Matteo Bini wrote: > Thanks for the answer Branden, > it's an honour to get a reply directly from you! It's an honor to have users who care enough to submit reports against a package, rather than casting it aside as unsatisfactory! > I've compiled your

Re: Footer trap in a A4 PDF

2023-08-25 Thread Matteo Bini
Thanks for the answer Branden, it's an honour to get a reply directly from you! I've compiled your ROFF file and I've attached the resulting PDF. My groff version is 1.22.4. I'm on Debian 12, stable. Not only the word footer does not show up in the same place on the two pages, but it's not at

Re: Footer trap in a A4 PDF

2023-08-25 Thread Tadziu Hoffmann
> 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. It is working as intended. When you say ".sp |0c" in troff, that does not mean

Re: Footer trap in a A4 PDF

2023-08-25 Thread G. Branden Robinson
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

Footer trap in a A4 PDF

2023-08-25 Thread Matteo Bini
Hello groffers! I'm writing some documents that will be exported in PDF with A4 paper size. I'm using my own macro package. My macro package is very very simple: it's just for defining paragraphs and titles style. Then I've decided to add an empty footer, which is more like a bottom margin for my