ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: context <ntg-context@ntg.nl>
Subject: Re: \definehead with some extra's
Date: Thu, 01 Apr 1999 16:49:44 +0200	[thread overview]
Message-ID: <37038788.46534F65@wxs.nl> (raw)
In-Reply-To: <000901be7c43$0ca44da0$0c01a8c1@worf.login-bv.com>

Gilbert van den Dobbelsteen wrote:
> 
> I have a nice problem:
> ...
> Ok, that works, but it has an expected side effect: The heads don't show up
> in the contents. After studying several things I found out that #2 contains
> the commands for putting things in the .tui file. So I want to execute the
> commands to create the correct entries in the .tui file, but I do not want
> to typeset anything at all. Can I do something like:
> 
>   \writetolist[MYMONTH][blahblah]
> 
> Or do I need to hand-code the stuff, something like this:
> 
> \definelist[MYLIST]
> 
>   \def\MYMONTH#1{%
>     \writetolist[MYLIST][#1]}
> 
> (Sorry about the syntax, it is probably not correct CONTeXt, and the
> arguments are probably not in the correct order).

This feature is already built in for quite some years:

\definelist[MyMonth]

\writetolist     [MyMonth]{a}{b}  % two entries 
\writebetweenlist[MyMonth]{a}     % one entry, e.g. \blank or \page

\placelist[MyMonth]               % or [MyMonth,MyDay,..]

You can set up lists (assign commands to handle the entries). Lists obey
the section numbering mechanism, so you can ask for local ones.
Actually, this is how tables of contents etc are produced. 

Lots of surprises still waiting for you ...

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.nl
-----------------------------------------------------------------


  reply	other threads:[~1999-04-01 14:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-01 13:25 Gilbert van den Dobbelsteen
1999-04-01 14:49 ` Hans Hagen [this message]
1999-04-01 16:10 ` Bug in \defineenumeration Taco Hoekwater
1999-04-01 15:41   ` Hans Hagen
1999-04-01 17:46 ` Taco Hoekwater
1999-04-01 16:36   ` Hans Hagen
1999-04-02 11:24 ` Taco Hoekwater
1999-04-02 11:58   ` Hans Hagen
1999-04-02 12:00   ` Hans Hagen
1999-04-02 13:14   ` 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=37038788.46534F65@wxs.nl \
    --to=pragma@wxs.nl \
    --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).