?SPAM? - Re:[texhax] superscripts and spacing problem
Philip TAYLOR
P.Taylor at Rhul.Ac.Uk
Tue Nov 29 18:58:46 CET 2005
OK, hope you get there : all that I am doing is to
set AV in one box (unkerned), AV in a second box (kerned),
and measuring the difference of the width of the two
boxes. This gives me a measure of how much closer the
font designer felt that a V could be placed to an A than
would be the case if the A were a perfect rectangle.
I then use this as a correction factor to negatively
kern before typesetting the superscript 7. In practice,
this amount is insuffient, and a better algorithm
pre-scales it by 2, as in :
\def \domsev #1%
{\setbox 0 = \hbox {#1{}V}%
\setbox 2 = \hbox {#1V}
\dimen 0 = \wd 0
\advance \dimen 0 by -\wd 2
\dimen 0 = 0 pt %%% pretend we did none of the above
$\hbox {#1}\kern -\dimen 0 ^7$
}
\def \DomSev #1%
{\setbox 0 = \hbox {#1{}V}%
\setbox 2 = \hbox {#1V}
\dimen 0 = \wd 0
\advance \dimen 0 by -\wd 2
$\hbox {#1}\kern -2\dimen 0 ^7$
}
\domsev {C}
\domsev {A}
\DomSev {C}
\DomSev {A}
\end
** Phil.
--------
Joey Coyle wrote:
> Thanks Philip,
>
> This is is taking the next step for me in my Latex learning curve...
> Your examples contain commands I have never used, so it's going to take
> a little studying on my part to truly understand them... I'll be
> back... ;-}
>
> thanks again,
> joey
More information about the texhax
mailing list