groff
[Top][All Lists]
Advanced

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

Re: [Groff] Bugs in mm, accents, multi-line macros and font glyp


From: Ted Harding
Subject: Re: [Groff] Bugs in mm, accents, multi-line macros and font glyp
Date: Sun, 13 Jan 2002 08:48:47 -0000 (GMT)

On 13-Jan-02 P. Alejandro Lopez-Valencia wrote:
> Yes, but I was referring to the digraphs used in
> postscript metrics files, e.g.:
> 
> ha  606,740 2   0000    -- asciicircum
> ti  606,319 0   0001    -- asciitilde
> vS  498,927,13  2   0002    -- Scaron
> vZ  480,927 2   0003    -- Zcaron
> vs  388,764,13  2   0004    -- scaron
> vz  425,764 2   0005    -- zcaron
> 
> I guess the expected way to call these 8bit chars
> is \(<digraph>, say \(vS, but \[vS] works equally well;
> perhaps this is an unexpected side-effect?

Not really; it's intended! This arises "for historical
reasons", as they say.

Originally troff only had two types of escape sequence.
"\X" was an escape named by a single character "X",
and "\(XY" an escape named "XY", and (as with macros)
no name could be longer than two characters.

It wasn't long before this resource ran out of space,
and a mechanism for longer names was needed. The one
adopted in groff was that "\[...]" allowed a name
"..." of arbitrary length: whatever was between "["
and "]" was the name; so this allows "\[X]", "\[XY]"
as well as "\[XYZ]" etc. Of course, "\[X]" is inefficient
for typing, as (marginally) is "\[XY]", but even so
it aids visual clarity since it is easier to see where
it ends. At the same time, the original "\X" and "\(XY"
conventions are retained since they are unambiguous
anyway.

Less trivially, the "[...]" convention allows a much-needed
extension of the "\sN" mechanism for changing point size.
Groff still follows the original troff convention that
"\sMN" (where M and N are integers from 0 to 9) changes
point size to "MN" provided M<4; if M>3 then it changes
point size to M followed by printing "N". So the largest
point size you can get with "\sMN" is 39. So you can get
point sizes from 4 to 39 this way.

This really did arise for historical reasons: there was an
upper limit on font sizes available on the old typesetters.
And there is a hidden assumption that you don't need point
sizes smaller than 4: "\s45" prints "5" in 4-point; "\s35"
switches to point size 35, and with the original convention
you couldn't print "5" in 3-point using "\s".

But with "\s[M...]" in groff you can now get a change to
point size "M...", e.g. "\s[99]", or even "\s[360]" (a
five-inch letter) if you want it! And "\s[3]5" gives
you "5" in 3-point.

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 167 1972
Date: 13-Jan-02                                       Time: 08:48:47
------------------------------ XFMail ------------------------------

reply via email to

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