[Top][All Lists]

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

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

From: Ted Harding
Subject: Re: [Groff] Getting properly rendered single quotes in groff
Date: Wed, 11 Jun 2008 11:54:42 +0100 (BST)

On 11-Jun-08 10:05:59, Ralph Corderoy wrote:
> Hi again Stuart,
> I wrote:
>> So it seems clear that man pages should use \` or its verbose \(ga
>> equivalent when they mean a shell backtick operator, ASCII character
>> 96.
> Interestingly, this is the opposite to the ", \(lq, and \(rq
> characters.
> With these, the one for pasting into the shell is the simple " and if
> you want the typographically orientated ones, you use \(lq and \(rq.
> I guess it's like this because keyboards offer `, ', and " characters
> so
> troff makes it easy to enter sexy single quotes and sexless double
> quotes.
> On a related note, although I've seen doubling up of ` and ' to give ``
> and '', like TeX IIRC, they don't produce the same output as using \(lq
> and \(rq so I guess they're not the right way to do that.

I've used this myself in the past (until I learnt better ... ).
In Times font, "``" and "\[lq]," are difficult to distinguish visually,
likewise "''" and "\[rq]", so you can get away with using "``" and "''"
if you do it consistently. However, this can change for other font
families! Unfortunately, groff's ligatures are hard-wired, so you cannot
define custom ligatures. If you could, then "''" could be defined to
generate "\[rq]", etc.; and you could also define for instance
",," to denote "continental-style" (on the baseline) opening quotes.

Nothing of course stands in the way of re-naming \[lq] and \[rq] as
.char \[``] \[lq]
.char \[''] \[rq]
if you want to keep the "mnemonic" feature; but it does not gain
anything in conciseness.

This has been an interesting dicsussion. My own views on the questions
raised can be summed up on the following lines.

When you create a document in groff, you will (broadly) be doing
so with one of two objectives.

A: The document may be printed/displayed on anything, and you want
to keep it device-independent. In that case, all the conflicts and
clashes which people have been discussing can arise, and have to
be resolved as best you can. One approach might be to have a Preamble
(or perhaps an auxiliary macro package) in the groff source document
which tests \*[.T] and then defines various things appropriately, e.g.

  .char \[lq] "

etc. if \*[T] is "ascii".

B: The document is intended to be printed/displayed exactly as the
author visualises it, and is not device-independent (at any rate,
is only device-independent to the extent that all admissible devices
have the capability to produce exactly the glyphs intended). In that
case, the author can use the groff names for the glyphs desired,
and need not worry about the issues which have been discussed.

Best wishes to all,

> Cheers,
> Ralph.

E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 11-Jun-08                                       Time: 11:54:39
------------------------------ XFMail ------------------------------

reply via email to

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