ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* decriptions
@ 1999-06-25 11:39 Hans Hagen
  1999-06-25 13:48 ` decriptions Taco Hoekwater
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hans Hagen @ 1999-06-25 11:39 UTC (permalink / raw)


Hi all and Wybo in particular, 

I suppose this is what you want: 

\setuplayout[width=100mm]

\definedescription
  [description]
  [location=hanging,        % implemented recently 
   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. }

\stoptext 

I think it makes sense to add such latex counterparts to a specific
module m-latex or so. If needed, with some \begin \end alike
substitutes, like 

\let\normalbegin\begin

\let\complexbegin\normalbegin

\def\simplebegin#1%
  {\getvalue{start#1}\bgroup
   \def\end##1{\egroup\getvalue{stop##1}}}

\definecomplexorsimple \begin

So, that one can now also say: 

\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}

But, keep in mind that \begin \end is used for different purposes in
context (block moves/reuse), although the definition given here is
supposed to take care of that (untested). So, consider this a last
resort. 

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1999-06-26 23:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-25 11:39 decriptions Hans Hagen
1999-06-25 13:48 ` decriptions Taco Hoekwater
1999-06-25 11:53   ` decriptions Hans Hagen
1999-06-26 10:37 ` decriptions Wybo Dekker
1999-06-26 15:54   ` decriptions Hans Hagen
1999-06-26 21:09 ` decriptions Wybo Dekker
1999-06-26 23:03   ` decriptions Hans Hagen

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