Re: "troff -a" is now communicating less information

"G. Branden Robinson" <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <20251217160634.xyqruogxcncndsdo@illithid>
At 2025-12-16T17:25:52+0000, Deri wrote:
> I had difficulty understanding Branden's response, particularly the claim 
> "<--->" is "meaningful" (by claiming it is not meaningless).

It tells you that the device's glyph for the special character that
renders at that point in the input has no name.

...a significant fact, in my opinion, since most fonts' glyphs _do_ have
names.

> The output from '-a' previously was a diagnostic tool concerning the
> users input, rather than what groff will send to the output driver.

I dispute this.  '-a' never told you which of the user's macros or
string definitions were being interpolated at any point, either.  If you
look at DWB 3.3 troff's '-a' output for documents that employ device
extension commands, you find telltale disclosures thereof.

$ pwd
/home/branden/src/GIT/DWB3.3
$ dwb troff -a -mm tests/mm_tests/mm02 | grep -C1 '^\\X' | head -n 20

\XINFO:[SECTION: LEVEL = 1, NUMBER = 1.  , HEADING = PARAGRAPHS AND HEADINGS] 1.  PARAGRAPHS AND HEADINGS

--

\XINFO:[SECTION: LEVEL = 2, NUMBER = 1.1  , HEADING = Paragraphs] 1.1  Paragraphs

--

\XINFO:[SECTION: LEVEL = 2, NUMBER = 1.2  , HEADING = Numbered Headings] 1.2  Numbered Headings

--

\XINFO:[SECTION: LEVEL = 3, NUMBER = 1.2.1  , HEADING = Normal Appearance.] 1.2.1  Normal Appearance. The normal appearance of headings is as shown in this document. The effect
of .H varies according to the level argument. First-level headings are preceded by two blank lines (one
--

\XINFO:[SECTION: LEVEL = 3, NUMBER = 1.2.2  , HEADING = Altering Appearance of Headings.] 1.2.2  Altering Appearance of Headings. Users satisfied with the default appearance of headings may skip
to the section titled ``Unnumbered Headings''. One can modify the appearance of headings quite easily by
--

DWB and Heirloom do similarly with drawing commands.  First I'll use
nroff to demonstrate that the input is not ill-formed.

$ printf '.nf\n.sp\nbefore line and circle\n\\D!l1m1m!\\D!c1m0!\nafter line and circle\n' | heirloom nroff | cat -s

before line and circle

after line and circle

$ printf '.nf\n.sp\nbefore line and circle\n\\D!l1m1m!\\D!c1m0!\nafter line and circle\n' | dwb troff -a

before line and circle
\Dl.  \D\Dc0  \D
after line and circle

$ printf '.nf\n.sp\nbefore line and circle\n\\D!l1m1m!\\D!c1m0!\nafter line and circle\n' | heirloom troff -a

before line and circle
\Dl.  \D\Dc.  \D
after line and circle

My view is that "approximate output" is an effort to present the
interested user with something easier to digest than the
device-independent output format--which is nevertheless a pretty simple
format.  I've nursed ambitions to make it _more_ readable, meeting some
resistance from you.

https://savannah.gnu.org/bugs/?64360

That ticket has been awaiting your feedback for over two years.

> This is another example of the 
> change:-
[snip]
> The first example (1.23.0) is showing the input and the second (git
> HEAD) shows what would be sent to the output driver. Given this change
> in behaviour, Branden's claim that "trademark" (in Dave's original
> example) has no sense to an output driver is correct (so has to be
> shown as '---'), but -a has always reported the input side, before
> groff converts to the groff font glyph name.

In 2019, Dave considered that a bug, and once I developed sufficient
understanding of GNU troff internals to form an opinion, I agreed with
him.

> I don't know whether reverting to reporting the input is
> insurmountably difficult, but Branden's example of using .pline to
> discover the input shows that the information is certainly still held
> and could be output within the "<> rather than "---".

Output how?  Can you contrive an unambiguous syntax that can represent
both the name of the special character (at this point "a composite
node") expanded and the representations of its contents?

Don't forget that every printable ASCII character is valid in a troff
identifier.

Regards,
Branden
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmlC1PoACgkQ0Z6cfXEm
bc4mFA//b0Yjjku8TC4DZClHSIRwKtzvLVElAlvWj2jKgDDZycfcbikGZNwvocHj
x7oLa+gOa2Lb807RmU5f5Eh23PqNIaOxsO6pzCNvL2zhGJ3GLOjY+wrpj4MRfvcB
s3/+I+AsNqvHs1DBIvqVDAadTKlxetDUKA2I+4+J0YLlPMsD/zz5ggX23PvT/Awy
xWn+DCQv9wJzCExZU2gBkCWk8mJtIR+M/jsfZID4vqLtPklet0oepy+tzHIumFdN
Ntk17hfyyBMmdttrQz4vDii+1wgUnowtqauQy7dKmqmCzrJXnSd3FUnCqHxvEftz
+bubgKP2fkFF8wrDZvQEXvAObKo/B3pd5XtAJwRAOjuz0wSZOhI2tCJo7L0WWlWf
YokzseEXjMaGwd4MB4hiVKUDTMykWubW5PfPTi4D9IaCCsCYCLeDUO5FNOia2+nx
NodaHMUkS7EDtjh7PdP1NCs2J3isztVDriGAoWJUwn9L7g9qFRkslkAm3zmTmDGo
cHswYc1jru3fi/bxYkloU5WIBzvqL1S91Xyq2mgs0fWzsOPmtqNcB/wTCh8QtKWC
t52xNlPc9lgIf99FmZuOkLZBNLyhQJjzXMzDMWkzM06AXXZKyu0OBZspKrIh+c7Q
CUu+6mMllwiRjWU5MhFR+A5wh8WUuZ1MUmydMM7Xg8pILqHq2hw=
=lF+R
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.