[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Groff] Getting properly rendered single quotes in groff
From: |
Michael Kerrisk |
Subject: |
[Groff] Getting properly rendered single quotes in groff |
Date: |
Fri, 6 Jun 2008 11:05:05 +0200 |
Hello all
I'm the maintainer of the Linux man-pages package (~800 pages in
sections 2, 3, 4, 5, 7 of the Linux man pages).
Stuart Brady pointed out to me some inconsistencies in the use of
single quotes in the man-pages package, and also some problems in the
groff rendering of single quotes in UTF-8. I''d like to clean things
up, but I'm not 100% sure of the right approach.
What I'm most concerned about is rendering of character consnats ('c')
when written as part of normal text (i.e., not program code examples).
For example, in a sentence like:
Trialing '/' characters are not counted as part of
the pathname.
Here's how I currently understand things:
1) Using the form
'x'
is rendered by groff in an ugly way (as two closing quotes) in UTF-8,
but looks okay in ASCII.
2) Using the form
`x'
is rendered nicely by groff for UTF-8 (proper opening and closing
single quotes), but looks ugly in ASCII, since ` and ' are not
visually balanced. (I see that this usage is common, and wonder
whether it rendered differently for ASCII in historical roff systems?)
3) Using the form
\'x\'
renders acceptably (in my opinion) in UTF-8, since \' is rendered as
a "vertical apostrophe quote"; and it renders in ASCII in the same way as
'x'
(which is acceptable).
So, I was starting to think that option 3 might be the way to go, but
Andries pointed out:
[[
The definition of \' is unambiguous: it is defined to be the
acute accent, to be equivalent to \(aa in groff(7).
But you do not want to get an acute accent. You want the ASCII single quote.
The definition of ' in groff(7) as I have it here is wrong:
it says "apostrophe, right quotation mark, single quote",
but "right quotation mark" is entirely wrong, as Markus Kuhn documented.
So, ' is *not* right quotation mark, and if groff today shows it as one,
then this bug will be fixed next week or next year.
]]
Stuart pointed out that \(aq probably gets around Andries's objection,
so now I'm wondering if the solution is
4) Using the form
\(aqx\(aq
renders acceptably in UTF-8, since \(aq is rendered as a "vertical
apostrophe quote"; and it renders in ASCII in the same way as
'x'
(which is acceptable).
I'd appreciate some input on what the best solution is (which of
course might be something other than one of the solutions above).
Cheers,
Michael
- [Groff] Getting properly rendered single quotes in groff,
Michael Kerrisk <=
Re: [Groff] Getting properly rendered single quotes in groff, Ralph Corderoy, 2008/06/07