Open teythoon opened 9 months ago
To clarify: I think there are two issues here:
\*(Aq
workaround which doesn't sit well with pandoc.I have no idea what to do about either issue, but I wanted to report it.
Thanks for the report!
I just noticed the documentation of Roff::to_roff says:
Without special handling, apostrophes get typeset as right single quotes, including in words like “don’t”. In most situations, such as in manual pages, that’s unwanted.
That comment gets it wrong. In contractions, like "don't", you do want to allow renderers to use fancy glyphs, and in fact that is what rustdoc renders it to in the example:
$ echo -n don’t | hd
00000000 64 6f 6e e2 80 99 74 |don...t|
00000007
Glyph e2 80 99
is RIGHT SINGLE QUOTATION MARK
. Where you don't want that kind of fancy glyphs is code samples, which you expect people to copy and paste and have them work right.
You probably want render or to_writer instead of this method.
In fact, I switched to using this method, and this yields perfect results for me: both Debian's man
and pandoc render apostrophes as 27
i.e. APOSTROPHE
both in text as well as code blocks.
We produce manual pages using roff-rs, then render them as HTML for our web site. I have noticed that apostrophes in contractions and marking of possessive cases area not present in the produced HTML:
Now, I'm not an expert on roff, but one of the manual pages that I consult for advice on writing manual pages says not to use
\(aq
to escape ordinary apostrophes. https://man7.org/linux/man-pages/man7/groff_man_style.7.html says:Through experimentation I discovered that pandoc renders both
'
and\(aq
just fine.