Unintentional additional space after rfc1345 escape sequences?

"Alexis (surryhill)" <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <zzlmbjhrxsvtweatru4ppixwc6fvasokvb3i7aabagdckso7nz@3awzj4z4k5hs>
Hello everyone,

when using escape sequences from contrib/rfc1345/rfc1345.tmac,
additional spaces appear after the character for me, which
seems unintentional.

Given the following example:

  echo '\(Fo\(mc\(Fc vs. \(Fo\[My]\(Fc' | groff -mrfc1345 -Tutf8 | head -1
  «µ» vs. «µ    »

I'd rather expect the following than the above:
  «µ» vs. «µ»

Possibly the issue lies elsewhere in groff, yet removing the additional
spaces before the comment at the end of each character definition in
rfc1345.tmac also removes the additional spaces from the output, e.g.:

  sed -i -Ee 's/\]  +\\/]\\/' contrib/rfc1345/rfc1345.tmac

Please find attached a slightly more elaborate minimal working example
that demonstrates the issue. To produce the attached PDF I ran:

  groff -Tpdf -mrfc1345 mwe_rfc1345_additional_space.t \
    > mwe_rfc1345_additional_space.pdf

What am I possibly missing or doing wrong?


Best
Alexis



—————
P.S: I'm using a groff built from the latest changeset; as of this
writing that is 2542eb3f2ef12be6696e0e305937f82f87549df5
from Fri Dec 5 07:02:13 2025 -0600 and have the following environment
variables set:
GROFF_ENCODING=utf-8
GROFF_TYPESETTER=pdf
mwe_rfc1345_additional_space.t (text/troff, 206 B)
.sp |2.7c
.po 2.5c
The width of the groff_char(7) character \(Fo\[mc]\(Fc (\[rs][mc]) is: \w'\[mc]'
.sp
.mso rfc1345.tmac
The width of the rfc1345.tmac character \(Fo\[Db]\(Fc (\[rs][My]) is: \w'\[My]'
.ex
mwe_rfc1345_additional_space.pdf (application/pdf, 2.1 KB) - not displayed
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.