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? Regards, Andreas
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
Dear Wolfgang, Am Mittwoch, den 13.07.2011, 15:11 +0200 schrieb Wolfgang Schuster:
Am 13.07.2011 um 07:15 schrieb Andreas Richter:
[…]
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]}]
the first off topic question is, what editor do you use and what commands to align the options at the »=«?
\setupenumerations [example] [ command=\textrule, after=\textrule, inbetween={\blank[nowhite]}]
\setupenumerations [remark] [style=italic]
[…] My second question is, what is the recommended way to define theorems? The Wiki [1] says `\setupenumarations` as you did, but if I am not mistaken there was a thread where your module `annotations` was used. What is more “future proof” and recommended? Thanks, Paul [1] http://wiki.contextgarden.net/Latex_Packages#theorem
participants (3)
-
Andreas Richter
-
Paul Menzel
-
Wolfgang Schuster