groff
[Top][All Lists]
Advanced

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

RE: [Groff] Best way to have small capitals with groff ?


From: Ted Harding
Subject: RE: [Groff] Best way to have small capitals with groff ?
Date: Wed, 09 Aug 2000 12:11:00 +0100 (BST)

On 09-Aug-00 baruchel wrote:
> Hi,
> 
> this is a question I very often ask to myself. What is the best way to
> have small capps? I mean, if I have no special font for it, of course,
> say with the \f(TR font
> 
> I did it 'til now with two ways:
> 
> a) First, I wrote a macro for:
>    - writing the initial letter normal
>    - having a smaller size, write the end of the word
>    - writing it a second time with a very tiny decalage
>      (to have the font not as thin as it would be with the smaller
> size)
> Since it was a little complicated, I now use:
> b) G\H'-1'ROFF\H'0'
>    (rather than G\s-1ROFF\s0 for the same reason)
> 
> What do you personnaly do ? Do you have special habits ?

My own approach is to have two macros, .smallcaps and ./smallcaps:

.de smallcaps
.nr .sc.ps (\\n[.s]*75/100)
.nr .cap.PS \\n[.s]
.char a \s[\\n[.sc.ps]]A\s[\\n[.cap.PS]]
.char b \s[\\n[.sc.ps]]B\s[\\n[.cap.PS]]
.char c \s[\\n[.sc.ps]]C\s[\\n[.cap.PS]]
........
.char x \s[\\n[.sc.ps]]X\s[\\n[.cap.PS]]
.char y \s[\\n[.sc.ps]]Y\s[\\n[.cap.PS]]
.char z \s[\\n[.sc.ps]]Z\s[\\n[.cap.PS]]
.char \(i. \s[\\n[.sc.ps]]I\s[\\n[.cap.PS]]
..
.de /smallcaps
.rchar a b c d e f g h i j k l m n o p q r s t u v w x y z \(i.
.rr .sc.ps
.rr .cap.PS
..

(where \(i. is the "dotless i"). I found that this had the unexpected
but welcome side-effect that it does the right thing in composite
characters such as \(a` -> small \(A` (a-grave -> small A-grave).
(This, once I thought about it, was a consequence of the definition
of \(a` etc as

  .char \(a` a\*`

where \*` results from an acc*over-def (see .AM in ms-macros).)

Your very valid point about the lighter weight of the small capitals
(in a non-small-cap font) is not taken account of in the above;
however, I have tried the following:

.de smallcaps
.nr .sc.ps (\\n[.s]*75/100)
.nr .cap.PS \\n[.s]
.char a \s[\\n[.sc.ps]]\Z'A'\h'0.025n'A\s[\\n[.cap.PS]]
.char b \s[\\n[.sc.ps]]\Z'B'\h'0.025n'B\s[\\n[.cap.PS]]
.char c \s[\\n[.sc.ps]]\Z'C'\h'0.025n'C\s[\\n[.cap.PS]]
etc,

which gives a satisfactory result overall (though the diagonal
strokes of M and N in Times Roman look a little heavy; maybe
a slight adjustment of the 0.025n, per character, would help).

In principle I'm not happy with your G\H'-1'ROFF\H'0' solution,
since this distorts the shapes of the letters. However, as with
all such things, beauty is in the eye of the beholder!

Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 284 7749
Date: 09-Aug-00                                       Time: 12:11:00
------------------------------ XFMail ------------------------------

reply via email to

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