Hi Bjarni, I find your bug report to be of poor quality due to its lack of clarity.
As a reminder, here is how groff_diff(7) documents the `lf` request.
.lf input‐line‐number [["]file‐identifier]
In GNU troff, the first argument becomes the input line
number of the next line the formatter reads. It also
removes a leading neutral double quote from file‐identifier,
permitting initial embedded spaces in it, and reads it to
the end of the input line in copy mode.[1]
At 2026-09-13T23:07:18+0000, Bjarni Ingi Gislason wrote:
> '.lf 1 "-' was added as the first line to all man pages for the use in
> "batch mode".
You illustrate one of the hazards of the passive voice. You're not
alone; much software documentation is burdened by its writers by a false
analogy to report writing for engineering lab courses, where the passive
voice is thought to be dispassionate and professional. (See? I'm using
it right here.) It's also obvious to the teaching assistant grading the
report who is responsible for submitting it. Software systems strongly
contrast: they tend to comprise many components, each of which has
_responsibility_ for undertaking a computation or transformation of
inputs. Software modules have _agency_. Those who write documentation
or defect reports must, consequently, _clearly identify_ the component
of the system under consideration, or openly admit that they are unable
to isolate the responsible component (which can itself reveal a
documentary, or even design, defect).
So:
_Who_ “added '.lf 1 "-' as the first line to all man pages for the use in
"batch mode".”?
And why was that done by the unidentified person or tool? You don't
need to do this for "batch mode". Since version 1.24.0, groff
batch-renders all of its own man pages as a PDF, and yet finds it
unnecessary to apply the technique you describe.
$ vi src/preproc/tbl/tbl.1.man
$ git diff
diff --git a/src/preproc/tbl/tbl.1.man b/src/preproc/tbl/tbl.1.man
index 658dffc0e..4662d6311 100644
--- a/src/preproc/tbl/tbl.1.man
+++ b/src/preproc/tbl/tbl.1.man
@@ -1,5 +1,6 @@
'\" t
.TH @g@tbl @MAN1EXT@ "@MDATE@" "groff @VERSION@"
+.tm GBR: Hi Bjarni, this is line 3 of tbl(1): .c=\n[.c].
.SH Name
@g@tbl \- prepare tables for
.I groff
$ make -C build
make: Entering directory '/home/branden/src/GIT/groff/build'
make all-recursive
make[1]: Entering directory '/home/branden/src/GIT/groff/build'
make[2]: Entering directory '/home/branden/src/GIT/groff/build'
GEN src/preproc/tbl/tbl.1
GROFF doc/groff-man-pages.pdf
GBR: Hi Bjarni, this is line 3 of tbl(1): .c=3.
troff: backtrace: file '<standard input>':1075
troff:<standard input>:1075: warning: special character '.j' not defined [-w
char]
troff: backtrace: file '<standard input>':1481
troff:<standard input>:1481: warning: special character 'vA' not defined [-w
char]
troff: backtrace: file '<standard input>':1611
troff:<standard input>:1611: warning: special character 'bs' not defined [-w
char]
troff: backtrace: file '<standard input>':1784
troff:<standard input>:1784: warning: special character '-+' not defined [-w
char]
troff: backtrace: file '<standard input>':1833
troff:<standard input>:1833: warning: special character 'coproduct' not defined
[-w char]
troff: backtrace: file '<standard input>':1933
troff:<standard input>:1933: warning: special character '+e' not defined [-w
char]
GROFF doc/groff-man-pages.utf8.txt
GBR: Hi Bjarni, this is line 3 of tbl(1): .c=3.
make[2]: Leaving directory '/home/branden/src/GIT/groff/build'
make[1]: Leaving directory '/home/branden/src/GIT/groff/build'
make: Leaving directory '/home/branden/src/GIT/groff/build'
We can verify that doc/doc.am does not inject '.lf 1 "-' into the files
by simply grepping it.
$ grep -n lf doc/doc.am || echo NO MATCH
369:# It appears to be dumb luck that this works; the rigamarole by itself
443:# image format does not itself end up in the document.
Those are, of course, false positives.
> But the input line numbers shift then by 1 instead be 2, as the
> original first line is now number 2.
This statement reveals another defect in your bug report. Which version
of groff are you using? Is it your private fork, "bjarnigroff"?
"groff --version" exists for this and other reasons. Include its output
when reporting a bug.
> Tested by changing macro call '.I' to '.IR' in a man page.
I've tested it too, as shown above, and with the following technique.
First, let's establish a basline expectation of behavior, formatting a
man(7) document without manipulating its line numbering.
$ for V in 1.24.1 1.24.0 1.23.0 1.22.4 1.22.3; \
do printf '.TH foo 1 2026-09-14 "groff test suite"\n.tm testing line number:
expected 2, got \\n[.c]\n' \
| ~/groff-$V/bin/nroff -man >/dev/null; done
testing line number: expected 2, got 2
testing line number: expected 2, got 2
testing line number: expected 2, got 2
testing line number: expected 2, got 2
testing line number: expected 2, got 2
Now let's see what happens if we add “.lf 1 "-” as the first line.
$ for V in 1.24.1 1.24.0 1.23.0 1.22.4 1.22.3; \
do printf '.lf 1 "-\n.TH foo 1 2026-09-14 "groff test suite"\n.tm testing
line number: expected 2, got \\n[.c]\n' \
| ~/groff-$V/bin/nroff -man >/dev/null; done
testing line number: expected 2, got 2
testing line number: expected 2, got 2
testing line number: expected 2, got 2
testing line number: expected 2, got 2
testing line number: expected 2, got 2
I find your report unfounded for GNU groff.
Regards,
Branden
[1] groff(7) is similar, but requires more context.
Syntax reference conventions
In the following request and escape sequence specifications, most
argument names were chosen to be descriptive. GNU troff reads
arguments named character‐sequence, command, contents, file, and
message in copy mode (see section “Copy Mode” below) until the end
of the input line. A character‐sequence comprises one or more
ordinary, special, or indexed characters; spaces; or escape
sequences that interpolate only these. We name the remaining
arguments for clarity; they are also character‐sequences. A
neutral double quote ‘"’ can optionally prefix a character‐
sequence; the formatter discards one if present, permitting initial
embedded spaces in the argument. input refers to arbitrary
character sequences (up to a newline or delimiter) that GNU troff
fully interprets, in contrast to copy mode.
...
.lf input‐line‐number
Set the input line number the formatter uses when
reporting diagnostics. The argument becomes the input
line number of the next line the formatter reads.
.lf input‐line‐number character‐sequence
As lf with one argument, but also update the reported
file name to character‐sequence.
signature.asc
Description: PGP signature
