ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@googlemail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: \define was: Section format using /def
Date: Thu, 5 Feb 2009 20:06:26 +0100	[thread overview]
Message-ID: <F7169F2E-C3AB-4213-8BE9-945DD5FAE4D2@gmail.com> (raw)
In-Reply-To: <bc3554890902051045i7da9b06ax7347aa14829d7759@mail.gmail.com>


Am 05.02.2009 um 19:45 schrieb Michael Bynum:

> Ah, I think I see. So "\define[1]\mysectionhead{\bfa
> \WORD{\underbar{#1}}}" would also be valid.  Is \define a context
> equivalent to the \def command for tex?  I couldn't find much
> documentation on it.

\define is ConTeXt's equivalent to \newcommand in LaTeX, you can set
with the optional parameter the number of arguments. It makes a check
if the command you create is already defined and writes a message to
the terminal.

Usage:

\define\commanda   {First Command}
\define[1]\commandb{Second command: #1}
\define[2]\commandc{Third command: #1 #2}

\starttext
\commanda
\commandb{text}
\commandc{text}{text}
\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2009-02-05 19:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-05 17:37 Michael Bynum
2009-02-05 17:55 ` Wolfgang Schuster
2009-02-05 18:45   ` Michael Bynum
2009-02-05 19:06     ` Wolfgang Schuster [this message]
2009-02-05 17:59 ` Aditya Mahajan
2009-02-05 18:48   ` Michael Bynum

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=F7169F2E-C3AB-4213-8BE9-945DD5FAE4D2@gmail.com \
    --to=schuster.wolfgang@googlemail.com \
    --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).