Dear musketeers, Instead of, say, \usetypescriptfile[type-ugm] \usetypescript[URWGaramond] \setupbodyfont[urwgaramond,10pt] I would like to define a single command as follows, using the ConTeXt option method instead of \def{}{}{}: \globalbodyfont[type-ugm][URWGaramond][urwgaramond,10pt] I would like to learn how to do this. Thnx in advance for your help. [Does ConTeXt already have a one line global command for this? or is there a better way?] Best Idris ============================ Professor Idris Samawi Hamid Department of Philosophy Colorado State University Fort Collins, CO 80523
On Mon, 4 Apr 2005, Idris Samawi Hamid wrote:
Instead of, say,
\usetypescriptfile[type-ugm] \usetypescript[URWGaramond] \setupbodyfont[urwgaramond,10pt]
I would like to define a single command as follows, using the ConTeXt option method instead of \def{}{}{}:
\globalbodyfont[type-ugm][URWGaramond][urwgaramond,10pt]
I would like to learn how to do this. Thnx in advance for your help.
Hello Idris, there are some good pages on the wiki about this subject. I don't know, if the option method is the best way to realize your \globalbodyfont command. I would do it as simple as this: \def\globalbodyfont[#1][#2][#3]{% \usetypescriptfile[#1] \usetypescript[#2] \setupbodyfont[#3]} I my opinion, the \globalbodyfont command is not that much better for the end-user, than the other 3 commands. I would rather make an environment-file: \startenvironment e-garamond \usetypescriptfile[type-ugm] \usetypescript[URWGaramond] \setupbodyfont[urwgaramond] \stopenvironment And then just "\environment e-garamond" in the document-file. Cheers, Peter -- http://pmrb.free.fr/contact/
Peter Münster wrote:
I don't know, if the option method is the best way to realize your \globalbodyfont command. I would do it as simple as this: \def\globalbodyfont[#1][#2][#3]{% \usetypescriptfile[#1] \usetypescript[#2] \setupbodyfont[#3]}
the name \globalbodyfont is likely to clash (either now or in the future)
I my opinion, the \globalbodyfont command is not that much better for the end-user, than the other 3 commands. I would rather make an environment-file: \startenvironment e-garamond \usetypescriptfile[type-ugm] \usetypescript[URWGaramond] \setupbodyfont[urwgaramond] \stopenvironment And then just "\environment e-garamond" in the document-file.
indeed the rpefered way; an alternative is: \startenvironment my-fonts \startmode[garamond] \usetypescriptfile[type-ugm] \usetypescript[URWGaramond] \setupbodyfont[urwgaramond] \stopmode \stopenvironment and then \enablemode[garamond] \environment my-fonts that way you can collect all your special stuff in one file Hans ----------------------------------------------------------------- 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Idris Samawi Hamid
-
Peter Münster