URL: <https://savannah.gnu.org/bugs/?67992>
Summary: [me,mm,ms] janky output seen when user breaks
initialization rules with device extension command
Group: GNU roff
Submitter: gbranden
Submitted: Sat 31 Jan 2026 03:49:21 AM UTC
Category: Macro package - others/general
Severity: 3 - Normal
Item Group: Rendering/Cosmetics
Status: Postponed
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Unlocked
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sat 31 Jan 2026 03:49:21 AM UTC By: G. Branden Robinson <gbranden>
Spawned off of bug #67990.
The _ms_, _me_, and _mm_ macro packages all expect the user to call one of
their macros before attempting to format any text.
This fact is documented prominently for _ms_...
groff_ms(7):
Document structure
The ms macro package expects a certain amount of structure: a well‐
formed document contains at least one paragraphing or heading macro
call. To compose a simple document from scratch, begin it by
calling LP or PP. ...
$ eqn -Tutf8 ./build/doc/ms.ms | nroff -rLL=80n -pt -ms | sed -n '43,46p'
1.1. Basic information
Prepare an ms document with your preferred text editor. Call an ms macro
early
in the document to initialize the package. A macro is a formatting
instruction
...
"Typing Documents on the Unix System: Using the -ms macros with Troff
and Nroff", M.E. Lesk, 13 November 1978:
Warning: You can't just begin a document with a line of text. Some
-ms command must precede any text input.
...and _mm_...
groff_mm(7):
Call an mm macro at the beginning of a document to initialize the
package. A simple mm document might use only P for paragraphing.
...but _me_ doesn't seem to.
However there is *copious* evidence that this was always the package's
intention. See:
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/doc/as/asdocs0.me
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/doc/courier/courier.tbl.me
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/doc/sccs.me
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.1cBSD/usr/src/usr.lib/sendmail/doc/intro.me
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Reno/share/doc/ps1/07.ipctut/tutor.me
https://minnie.tuhs.org/cgi-bin/utree.pl?file=4.3BSD-Reno/share/doc/usd/22.memacros/intro.me
...and others.
Here's how to produce some jank:
$ printf '\\X"pdf: xrev"' | ./build/test-groff -ms -a
$ printf '\\X"pdf: xrev"' | ./build/test-groff -me -a
$ printf '\\X"pdf: xrev"' | ./build/test-groff -mm -a
$ echo '.device pdf: xrev' | ./build/test-groff -ms -a
$ echo '.device pdf: xrev' | ./build/test-groff -me -a
$ echo '.device pdf: xrev' | ./build/test-groff -mm -a
In every case we get a worrisome diagnostic:
troff:<standard input>:1: error: spurious end trap token detected!
...sometimes others, and a never simple, pleasant empty document as we might
expect from this input.
Not a gate for _groff_ 1.24.0. Born postponed.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?67992>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
