ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* A few puzzling problems (bugs?) with enumerations
@ 2010-10-13 10:08 Mathieu Boespflug
  2010-10-13 10:57 ` Mathieu Boespflug
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Boespflug @ 2010-10-13 10:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2010-10-16  8:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13 10:08 A few puzzling problems (bugs?) with enumerations Mathieu Boespflug
2010-10-13 10:57 ` Mathieu Boespflug
2010-10-15  8:20   ` Mathieu Boespflug
2010-10-15 11:19     ` Wolfgang Schuster
2010-10-15 14:39       ` Mathieu Boespflug
2010-10-15 15:09         ` Arthur Reutenauer
2010-10-16  0:29     ` Aditya Mahajan
2010-10-16  6:48       ` Peter Münster
2010-10-16  8:59       ` Hans Hagen

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).