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
.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

Attachment: mwe_rfc1345_additional_space.pdf
Description: Adobe PDF document

Reply via email to