groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Getting properly rendered single quotes in groff


From: brian m. carlson
Subject: Re: [Groff] Getting properly rendered single quotes in groff
Date: Fri, 6 Jun 2008 20:24:12 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Jun 06, 2008 at 11:05:05AM +0200, Michael Kerrisk wrote:
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?)

This is correct.  troff maps ` to an opening single quotation mark (‘),
and ' to a closing single quotation mark (’).  Use the -Tps option to
man and look at the result, if you don't believe me.  The fact that they
look ugly in ASCII is a function of your font and the fact that ASCII
cannot properly represent even standard English text.

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.

Markus Kuhn discusses the usage of the proper characters when using
Unicode.  The Unicode U+0027 (') is not appropriate as a quotation mark,
I agree.  However, when groff typesets a document, it translates ' to ’.
If an ASCII output device is present, ’ is replaced by ', since ASCII is
obviously lacking the correct character.  This is an unfortunate
limitation of ASCII, and since UTF-8 is firmly entrenched as *the*
standard character encoding, the limitations of plain ASCII become less
and less relevant.

I'd appreciate some input on what the best solution is (which of
course might be something other than one of the solutions above).

My suggestion, in case it wasn't apparent already, is to use the `' pair
in the source which will be mapped onto ‘’ in UTF-8 output, and to give
up on anything approaching decent output in ASCII.

--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 713 440 7475 | http://crustytoothpaste.ath.cx/~bmc | My opinion only
troff on top of XML: http://crustytoothpaste.ath.cx/~bmc/code/thwack
OpenPGP: RSA v4 4096b 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]