* No/broken handling of backspaces in the source?
@ 2022-09-17 17:03 наб
2022-09-23 1:39 ` Mingye Wang
0 siblings, 1 reply; 2+ messages in thread
From: наб @ 2022-09-17 17:03 UTC (permalink / raw)
To: discuss
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]
Hi!
A common pattern in very old (especially pre-troff) manuals I read often
is "aecn^H^H^H^H____" used to underline aecn ‒ this is a trivial
consequence of being made for typewriters.
[In the following examples a diacriticised character is used to
represent that character but underlined.]
groff handles this correctly, i.e.
printf 'aecn\b\b\b\b____ ____\b\b\b\bAECN\n.br\na\b_\t_\bA'
is rendered by groff as
ąęćń ĄĘĆŃ
ą Ą
and by less as
ą___ ĄECN
.br
ą Ą
but by mandoc (1.14.5-1 and current CVS) as
aecn????____ ____????AECN
a?_ _?A
It's unclear to me if this is supposed to happen, but I didn't see it in
the TODO, so.
Best,
наб
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: No/broken handling of backspaces in the source?
2022-09-17 17:03 No/broken handling of backspaces in the source? наб
@ 2022-09-23 1:39 ` Mingye Wang
0 siblings, 0 replies; 2+ messages in thread
From: Mingye Wang @ 2022-09-23 1:39 UTC (permalink / raw)
To: discuss
наб wrote:
> It's unclear to me if this is supposed to happen, but I didn't see it in
> the TODO, so.
I believe this is intended behavior for mandoc, at least with regard
to terminal output. Consult the "ASCII Output" and "Locale Output"
sections of mandoc(1), and you shall see:
>Font styles are applied by using back-spaced encoding such that [...] > This markup is typically converted to appropriate terminal
> sequences by the pager or ul(1). To remove the markup, pipe the
> output to col(1) -b instead.
In other words, mandoc output is not for direct consumption by the
terminal. Try using `-T html` instead -- that should tell you whether
mandoc has really interpreted the thing.
Regards,
Artoria2e5
--
To unsubscribe send an email to discuss+unsubscribe@mandoc.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-23 1:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-17 17:03 No/broken handling of backspaces in the source? наб
2022-09-23 1:39 ` Mingye Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).