[NTG-context] vertically centered aligment of different sized texts

Taco Hoekwater taco at elvenkind.com
Thu May 18 08:48:23 CEST 2006


frantisek holop wrote:
> hmm, on Wed, May 17, 2006 at 06:53:47PM +0200, Taco Hoekwater said that
> 
>>Abusing math mode is easiest:
>>
>>   \def\vcentered#1%
>>     {\dontleavehmode\mathematics{\vcenter{\hbox{#1}}}}
>>   \starttext
>>   {\tfc The \vcentered{{\BigFont 7}\high{th}} Seal}
>>   \stoptext
> 
> 
> thanks a lot.
> but if this is the "easiest" then what is the hardest? :)

The mathematical center of the line is not necesarily the
optical center, so a somewhat more correct approach would
put all the stuff in an \hbox and then compute manually
how far it has to drop down.

For a more pleasing look, it would perhaps be even better
to line up a normal '7' as if it was an oldstyle numeral,
and then enlarging it while keeping the same vertical
alignment ratio.

Cheers, Taco


More information about the ntg-context mailing list