[NTG-context] A few puzzling problems (bugs?) with enumerations

Mathieu Boespflug 0xbadcode at gmail.com
Wed Oct 13 12:57:34 CEST 2010


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


More information about the ntg-context mailing list