* new command question
@ 2005-04-04 20:42 Idris Samawi Hamid
2005-04-05 17:38 ` Peter Münster
0 siblings, 1 reply; 3+ messages in thread
From: Idris Samawi Hamid @ 2005-04-04 20:42 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: new command question
2005-04-04 20:42 new command question Idris Samawi Hamid
@ 2005-04-05 17:38 ` Peter Münster
2005-04-05 21:42 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2005-04-05 17:38 UTC (permalink / raw)
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: new command question
2005-04-05 17:38 ` Peter Münster
@ 2005-04-05 21:42 ` Hans Hagen
0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2005-04-05 21:42 UTC (permalink / raw)
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
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-05 21:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-04 20:42 new command question Idris Samawi Hamid
2005-04-05 17:38 ` Peter Münster
2005-04-05 21:42 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).