Ok so after reading the source code of strc-des.mkiv, I found that contrary to earlier documentation such as http://www.ntg.nl/maps/36/09.pdf it is not the 'number' parameter that should be used to share numbering but the 'counter' parameter. After fixing that in my code, theorems now have proper numbers and references to theorems work properly too. However, \starttheorem[number=no] blah \stoptheorem and \starttheorem[-] blih \stoptheorem still don't work as expected inside sections, and I still have problem 1 listed in one of my previous emails, namely Any ideas? On a sidenote, I would like to contribute to the wiki or whatever is the main documentation source of the ConTeXt project something to document those parameters that are specific de \setupenumerations. The context reference manual and the wiki both just refer to \setupdescriptions yet there are a number of parameters that don't exist for \setupdescriptions, such as number, counter, prefix, prefixcomponents, etc. Many thanks, Mathieu On Wed, Oct 13, 2010 at 12:57 PM, Mathieu Boespflug <0xbadcode@gmail.com> wrote:
Also, I notice that the context reference manual from the svn repository at supelec has the same problem when built with the latest beta (p 241).
-- Mathieu
On Wed, Oct 13, 2010 at 12:08 PM, Mathieu Boespflug <0xbadcode@gmail.com> wrote:
Hi,
using the latest beta, I've had a bunch of problems using enumerations in mkiv. Earlier betas have had the same problems. Consider the following document:
\defineenumeration [definition] [ text=Definition, title=yes, list=all, listtext={Definition }]
\defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, number=definition, listtext={Theorem }]
\defineenumeration [proof] [ text=Proof, number=no, headstyle=italic, title=no, closesymbol={\mathematics{\square}}, style=normal]
\starttext
blah blah
\startdefinition{foo} body1 \stopdefinition
\startdefinition body2 \stopdefinition
\startdefinition[-] body3 \stopdefinition
\starttheorem $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof
\section{Inside sections}
\subsection{Inside subsections}
\startdefinition{foo} body1 \stopdefinition
\startdefinition body2 \stopdefinition
\startdefinition[-] body3 \stopdefinition
\starttheorem[thm:pnp] $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof
Let's talk about \in{theorem}[thm:pnp].
\stoptext
I see five problems :
1. Even when the enumeration has no title, the parentheses appear. Judging by Aditya's code in his MyWay on theorems, it used to be that when there is no title, the parens don't appear. How do I recover this behaviour?
2. I want the "theorem" enumeration to share its number with the "definition" environment. That doesn't seem to work. Outside of any section, the theorem just doesn't have any number. Inside a section, the theorem very oddly displays the section number.
3. I want the "proof" enumeration to have no number. That doesn't work inside a section. As for the "theorem" enumeration, the section number is printed even though here i requested no number at all!
4. Suppressing the number for a specific enumeration using the [-] switch doesn't work. As before, inside a section, the section number appears instead of no number.
5. Citing a specific theorem using \in{theorem}[thm:pnp] doesn't show the number of a theorem.
I'm guessing the last four points are all related.
Best regards,
Mathieu