groff
[Top][All Lists]
Advanced

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

[Groff] Problem with italic/roman transition spacing


From: Steve Izma
Subject: [Groff] Problem with italic/roman transition spacing
Date: Tue, 05 Jun 2001 13:09:30 -0400

I'm having a problem getting the italic/roman space adjustment to work
the way I'd like. I'm using groff 1.15 from the latest Debian stable
distribution. If this problem goes away in newer versions of groff,
I'll gladly switch.

Consider the following examples for the text "1910; spacing" where
"1910" is in italics but the "; spacing" is in roman:

[example 1]
.ft I
\&1910\c
.ft R
\&; spacing\c

troff produces the output:

x font 18 TI
f18
s10000
V12000
H72000
t1910
x font 17 TR
f17
t;
wh2500
tspacing

which will result in the ";" crowding the 0 (especially in the font
family I'm using, Baskerville; in Times the effect is not so bad).

If I use the "\/" spacing request I get appropriate results:

[example 2]
.ft I
\&1910\/\c
.ft R
\&; spacing\c


x font 18 TI
f18
s10000
V12000
H72000
t1910
x font 17 TR
f17
h470
t;
wh2500
tspacing

Note the h470, which gives some padding between the "0" and ";".
However, if I try to put the "\/" elsewhere, the effect disappears.

[example 3]
.ft I
\&1910\c
.ft R
\&\/; spacing\c

x font 18 TI
f18
s10000
V12000
H72000
t1910
x font 17 TR
f17
t;
wh2500
tspacing

or:

[example 4]
.ft I
\&1910\c
\&\/\c
.ft R
\&; spacing\c

x font 18 TI
f18
s10000
V12000
H72000
t1910
x font 17 TR
f17
t;
wh2500
tspacing

I need to run the text like this because I'm not entering groff
commands manually -- I'm using groff as a filter for processing xml
text. In this case my conversion program doesn't know when italic ends
(because it would need to know every tag that produces italics, which
would make it a less independent program from DTD to DTD), therefore
I want to build the "\/" into the macros that are called to end
italic. From what I can gather from the above examples, the "\/"
doesn't work if it's not on the same input line as the last character
of italic. Of course in my situation, when the end-of-italic macro is
called, the last italic character is already in the buffer (although
presumably not with and end-of-line character). So, using macros, I
can only produce code analagous to examples 3 and 4 above.

Is there a way around this or should the troff behaviour be changed?

Thanks in advance for any ideas.

        -- Steve

Steve Izma,                               (519) 884-0710 ext. 6125
    Wilfrid Laurier University Press      FAX: (519) 725-1399
    Waterloo, Ont., Canada N2L 3C5        address@hidden

reply via email to

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