URL:
  <https://savannah.gnu.org/bugs/?68671>

                 Summary: [PATCH] gropdf default line width is wrong
                   Group: GNU roff
               Submitter: deri
               Submitted: Wed 02 Sep 2026 10:54:41 PM UTC
                Category: Driver gropdf
                Severity: 3 - Normal
              Item Group: Incorrect behaviour
                  Status: Confirmed
                 Privacy: Public
             Assigned to: deri
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 02 Sep 2026 10:54:41 PM UTC By: Deri James <deri>
Jeff Conrad wrote on
https://lists.gnu.org/archive/html/groff/2026-08/msg00016.html

By default, gropdf(1) seems to set very thick lines.  Moreover,
linesize() global options in tables seem to be ignored unless the
line thickness has been set with a ‘\D't <whatever>'’ command
(the value of <whatever> doesn’t seem to matter) for linesize()
to kick into action.  This isn’t difficult, but the command
generates vertical space even when contained in a \Z'...' escape.
The only solution I’ve found is to put something like

.if '\*[.T]'pdf'  \{\
\Z@\D't -1'@
.  sp -(\n[PD]u+1)
.\}

into the file before the first call of SH (I’m obviously assuming
-man).  It works, but it’s kinda ugly; is there a cleaner way of
doing this that I’ve somehow failed to see?

Decades ago, I had similar issues with Elan Eroff.  But Eroff had
a simple solution: the ‘\D't...'’ escape set register ‘th’ to the
value in the escape; that register could be set to the desired
value at beginning of the file, with no addition of vertical
space.

I suspect this is happening in gropdf, but I’ve tried——without
success——to figure out just what’s causing it.  I’m running groff
1.23.0 on Windows.

This seems mighty similar to Ralph Corderoy’s comment on
2018-07-28; I’m not quite sure what the final resolution there was.

Jeff

There is a problem, of which I was not fully aware, thanks for your report.

The issue is that groff has 2 ways of setting the line width:-

Mode 1 (the original - used by tbl if you include linesize(n)) is to make 
lines proportional to the current font size.

Mode 2 (a groff extension) is to use the drawing command \D't n' 
(millipoints).

grops starts up in mode 1 (lines are proportional to current font size) the
first time you used \D't nnn' it switched to mode 2 and font size changes do
not affect line width. The only way to switch back to mode 1 is to issue \D't
-1'.

gropdf starts up in mode 2.

The attached patch fixes gropdf to behave like grops. The attached pdf shows
the result of tests with postscript and pdf side by side after the patch
applied. As we are currently in code freeze it will be applied after 1.24.0.






    _______________________________________________________
File Attachments:

Name: LineThk-examples2.pdf.         Size: 24KiB
    <https://file.savannah.gnu.org/file/LineThk-examples2.pdf.?file_id=58940>

Name: LineThk.patch                  Size: 2.4KiB
    <https://file.savannah.gnu.org/file/LineThk.patch?file_id=58939>



    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-16e566e40609935a34195c2fa79072f4115fb9b6.tar.gz

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68671>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to