Am 13.07.2011 um 07:15 schrieb Andreas Richter:

> Hello,
> 
> Using ConTeXt, I would like to define environments to appear
> like
> 
> ----------------------------------------------
> Theorem 1.4 (Pythagoras)
> In any right triangle, $c^2 = a^2 + b^2$ holds
> where ...
> ----------------------------------------------
> 
> and
> 
>  --- Example 1.1 -------------------
>  Let $a=2$ ...
>  -----------------------------------
> 
> and (e. g. small, slanted or whatever)
> 
> Remark 1.3
> ----------
>  | Euclidean ...
>  | ...
> .
> 
> After browsing the documentation on the web, focussing
> on \defineenummeration, I'm still nowhere near the solution.
> Could anyone please give examples of how to do this?

You can change the style, color and spacing with \setupenumerations
but for the rules etc. you need other commands.

\defineenumeration[theorem][text=Theorem,title=yes]
\defineenumeration[example][text=Example]
\defineenumeration[remark] [text=Remark]

\setupenumerations
  [theorem]
  [   
before={\startframedtext[frame=off,topframe=on,bottomframe=on,width=broad,offset=.5ex]},
       after=\stopframedtext,
   inbetween={\blank[small]}]

\setupenumerations
  [example]
  [  command=\textrule,
       after=\textrule,
   inbetween={\blank[nowhite]}]

\setupenumerations
  [remark]
  [style=italic]

\starttext

\starttheorem{Pythagoras}
In any right triangle, $c^2 = a^2 + b^2$ holds where …
\stoptheorem

\startexample
Let $a=2$ ...
\stopexample

\startremark
Euclidean ...
\stopremark

\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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to