From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/2454 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: list-like environments Date: Wed, 09 Aug 2000 13:13:07 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <3.0.6.32.20000809131307.0155cce0@pop.wxs.nl> References: <14736.27198.108274.270886@bitmuis.thuis.nl> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: main.gmane.org 1035393246 8989 80.91.224.250 (23 Oct 2002 17:14:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 17:14:06 +0000 (UTC) Cc: ntg-context@let.uu.nl Original-To: Siep Kroonenberg In-Reply-To: <14736.27198.108274.270886@bitmuis.thuis.nl> Xref: main.gmane.org gmane.comp.tex.context:2454 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:2454 At 10:14 PM 8/8/00 +0200, siepo@client44-3.kabelA.oprit.rug.nl wrote: >What is the Context analogue for the LaTeX \newenvironment? And is There is \definestartstop; for usage see the exampe i made for wybo. \setuplayout[width=100mm] \let\normalbegin\begin \let\complexbegin\normalbegin \def\simplebegin#1% {\getvalue{start#1}\bgroup \def\end##1{\egroup\getvalue{stop##1}}} \definecomplexorsimple \begin \definedescription [description] [location=hanging, margin=standard, headstyle=bold] \definestartstop [descriptions] [before=\blank\startpacked, after=\stoppacked\blank, commands=\let\item\description] \starttext \dorecurse{10}{This one is for Wybo. } \startdescriptions \description {aap:} is a monkey, but much more can be told about this animal;s for example they are hairy, mostly brown or black and they resemble people a lot. \item {noot:} is a vegetable; again there are many kinds and you will get very fat if you eat lots of them. \startdescription {this is a rather long item:} it is not very interesting in itself, but gives me the opportunity to tell you something about the description environment: it is like an itemize, but with user-supplied labels which are printed bold. \stopdescription \stopdescriptions \dorecurse{10}{This one is for Wybo. } \begin{descriptions} \item {aap:} is a monkey, but much more can be told about this animal;s for example they are hairy, mostly brown or black and they resemble people a lot. \item {noot:} is a vegetable; again there are many kinds and you will get very fat if you eat lots of them. \item {this is a rather long item:} it is not very interesting in itself, but gives me the opportunity to tell you something about the description environment: it is like an itemize, but with user-supplied labels which are printed bold. \end{descriptions} \dorecurse{10}{This one is for Wybo. } \stoptext >there something like defineitemize[name][parameters]? Not yet, but it's on my to do list, since I sometimes need it too. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com -------------------------------------------------------------------------