ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Peter Münster" <pmlists@free.fr>
Subject: Re: new command question
Date: Tue, 5 Apr 2005 19:38:32 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0504051929300.26156@gaston.free.fr> (raw)
In-Reply-To: <42530DBA@webmail.colostate.edu>

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/

  reply	other threads:[~2005-04-05 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-04 20:42 Idris Samawi Hamid
2005-04-05 17:38 ` Peter Münster [this message]
2005-04-05 21:42   ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0504051929300.26156@gaston.free.fr \
    --to=pmlists@free.fr \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).