Alan Stone wrote:
Ahoi,
Following a previous discussion, I've been advised to "try to avoid \switchtobodyfont and use \definedfont or \definefont instead".
what is better depends on the situation - for a structured document using \switchtobodyfont is ok - for special layout elements (headers, title pages, keywords) \definefont might be handier (esp when funny sizes are used) - when using \definefont it can be handy to use the symbolic names (Serif, SansBold etc) and sizes (sa 1.2) because that makes redefinition easier
(1) What's the difference between \definefont and \definedfont ?
\definefont defines a macro that represents a font, and \definedfont just switches to a font (the forst one is more efficient when you switch often)
(2) In the underneath example...
(2a) how to implement \define(d)font for font switching ?
(2b) how to define \myFontHook ?
Thanks, Alan
\usemodule[t-lettrine]
\usetypescriptfile[tps_arial] \usetypescript[arial]
... just look how gyre typefaces are defined
\setupbodyfont[myFont,\myFontSize]
just \setupbodyfont[myFont,12pt] and an occasional \definefont[BigFont][SerifBold sa 3.5] which gives you \BigFont
\setuphead[chapter][style={\switchtobodyfont[myOtherFont,\myOtherFontSize]}]
it depends on what can occur in a title, if there's math and monospaced and whatever being used mixed, then best use a typeface (apart from the one time definition it's quite fast to switch a typeface) ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------