groff
[Top][All Lists]
Advanced

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

Re: [Groff] About numerical precision


From: Thomas Baruchel
Subject: Re: [Groff] About numerical precision
Date: Wed, 2 Apr 2003 17:05:12 +0200
User-agent: Mutt/1.2.5i

OK, found a solution by computing separately the integer and the
fractional part of the division. Very ugly, but seems to give exactly
what I want. Could you check and test the macro ? It is intended to
write with smallcaps with Adobe specifications, and intelligent kerning.
Here is my code with a small postscript code in order to check the
initial kerning. Any improvement is welcome.

.de SMALLCAPS
.nr x \\w'x'-\\w'x'+\\n[rst] \" x regular
.nr X \\w'X'-\\w'X'+\\n[rst] \" X regular
.nr x (\\nX-\\nx)/3+\\nx     \" X smallcaps
.nr x \\nx*\\n(.s
.nr y \\nx/\\nX
.nr z \\ny*\\nX
.nr z \\nx-\\nz
.nr z \\nzz/\\nX
\\$1\h'\w'\\$1\\$2'u-\w'\\$1'u-\w'\\$2'u'\H'\\nz/1z+\\ny'\
\s[9*\\n(.s/10]\\$2\h'\w'\\$2\\$3'u-\w'\\$2'u-\w'\\$3'u'\s0\H'0'\\$3
..
.ps 72
.sp 48p
\h'\w'VA'u-\w'A'u'\X'ps: exec gsave 1 .25 .25 setrgbcolor .25 setlinewidth \
0 200 rlineto stroke grestore'
.br
.vs 76p
.SMALLCAPS V AN
.SMALLCAPS G OGH ,
.br
VAN GOGH,

reply via email to

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