[NTG-context] “bodyfont %s is defined (can better be done global)”

Philipp Gesang gesang at stud.uni-heidelberg.de
Sun Jun 3 16:27:23 CEST 2012


Hi Wolfgang!

···<date: 2012-06-03, Sunday>···<from: Wolfgang Schuster>···
> > ········································································
> > \definebodyfontenvironment[42.0pt] %% a dozen times
> > \starttext
> > \switchtobodyfont[42.0pt]          %% hundreds of times
> > %\switchtobodyfont[42pt]           %% <- this works, though
> > foo
> > \stoptext
> > ········································································
> > 
> > Which then results in this warning:
> > ········································································
> > fonts           > bodyfont 42.0pt is defined (can better be done global)
> > ········································································
> > 
> > Although the size has been „defined“. My problem appears to be
> > that I’m abusing dimensions as makeshift floats to calculate
> > relative font sizes, interlinespace etc. via \dimexpr.
> 
> ???

It’s about decrementing font size and interlinespace until the
content fits a predefined box.
https://bitbucket.org/phg/context-stellen/src/3568dc7470fa/tex/context/third/bstellen/t-bibelstellen.mkiv#cl-158

> > Hadn’t thought about \switchtobodyfont expecting integers.
> 
> Don’t know what’s the problem but the message doesn’t appear
> when you use for example 42.1pt.

That’s odd. But this way it seems to do the right thing as
performance improves drastically (as much as 30%).

Thanks
Philipp

> 
> Wolfgang
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context at ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20120603/196f8a1c/attachment-0001.pgp>


More information about the ntg-context mailing list