From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/369 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \definehead with some extra's Date: Thu, 01 Apr 1999 16:49:44 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <37038788.46534F65@wxs.nl> References: <000901be7c43$0ca44da0$0c01a8c1@worf.login-bv.com> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035391234 23544 80.91.224.250 (23 Oct 2002 16:40:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:40:34 +0000 (UTC) Cc: context Original-To: Gilbert van den Dobbelsteen Xref: main.gmane.org gmane.comp.tex.context:369 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:369 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 -----------------------------------------------------------------