Hi Dave, At 2026-08-04T23:45:50-0500, Dave Kemper wrote: > On Sun, Aug 2, 2026 at 7:42 PM G. Branden Robinson > <[email protected]> wrote: > > GNU troff, the formatter, _doesn't_ emit output in such cases. > > > > But any file that the formatter loads, from a macro package to the > > troffrc to the input, can cause output to start. > > True, and if the sentence in the manual read "GNU 'troff' does not > emit output if its input does not cause output to start," I'd have no > quibble. > > But the sentence says "GNU 'troff' does not emit output if it has > nothing to format." The command "echo . | groff -mom" has nothing to > format, but it emits output. So this sentence in the manual is not > true as an absolute. > > But this counterexample is a corner case. A modified phrasing like > "typically does not emit output" allows for such corner cases while > making a useful point about normal behavior, and not getting bogged > down in the esoterica of what "causes output to start" means.
To further/over- qualify this point, mom(7) is giving the formatter something to format by generating some embedded PostScript. It's possible for a stray blank line in a troffrc or a macro file to do the same thing. This is such a difficult hazard to track down that for groff 1.24.0 I added logic to detect it. (This required no changes to the formatter; it was a simple matter of macro programming.) $ echo >> ./tmac/troffrc $ echo foobar | ./build/test-groff -a troffrc:/home/branden/src/GIT/groff/build/../tmac/troffrc:86: text line in startup file <beginning of page> foobar Regards, Branden
signature.asc
Description: PGP signature
