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

                 Summary: [troff] initial "previous" value of page offset
inconsistent with other troffs in nroff mode
                   Group: GNU roff
               Submitter: gbranden
               Submitted: Sun 21 Dec 2025 05:04:17 PM UTC
                Category: Core
                Severity: 2 - Minor
              Item Group: Incorrect behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: gbranden
             Open/Closed: Open
         Discussion Lock: Unlocked
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 21 Dec 2025 05:04:17 PM UTC By: G. Branden Robinson <gbranden>

input='.
.nf
foo
.po
bar
.po 5n
baz
.po
qux
.'


Giving that document to DWB 3.3, Heirloom, or Plan 9 _nroff_ produces the
following output.


$ ../src/roff/groff/tests/po-request-works.sh
foo
bar
     baz
qux


Here's what _groff_ produces.


$ ../src/roff/groff/tests/po-request-works.sh
foo
          bar
     baz
          qux


That's because GNU _troff_'s initial page offset is one inch, for the sake of
_troff_-mode devices.  (Unlike other troffs, we don't have a separate
formatter program for terminals and line printers.)  The macro files for the
_nroff_-mode devices update the page offset to zero, leaving "1i" as the
"previous" page offset.

I suspect the easiest fix for this is simply to have the macro files set the
same page offset explicitly twice in a row, to clobber the previous value to
zero.  An explanatory comment will be in order.







    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to