* theorem environment
@ 2011-07-13 5:15 Andreas Richter
2011-07-13 13:11 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Richter @ 2011-07-13 5:15 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: theorem environment
2011-07-13 5:15 theorem environment Andreas Richter
@ 2011-07-13 13:11 ` Wolfgang Schuster
2011-07-24 22:59 ` theorem environment: Is *enumeration* or the `annotation` module recommended? Paul Menzel
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2011-07-13 13:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: theorem environment: Is *enumeration* or the `annotation` module recommended?
2011-07-13 13:11 ` Wolfgang Schuster
@ 2011-07-24 22:59 ` Paul Menzel
0 siblings, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2011-07-24 22:59 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1: Type: text/plain, Size: 1470 bytes --]
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
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-24 22:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 5:15 theorem environment Andreas Richter
2011-07-13 13:11 ` Wolfgang Schuster
2011-07-24 22:59 ` theorem environment: Is *enumeration* or the `annotation` module recommended? Paul Menzel
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).