ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mathieu Boespflug <0xbadcode@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: A few puzzling problems (bugs?) with enumerations
Date: Fri, 15 Oct 2010 10:20:58 +0200	[thread overview]
Message-ID: <AANLkTi=m=av+g174vf6fwacEqCe_2xHDFzDvgvNAo_nq@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimSEFE-S2bt_vNN9m=8aMzEWzcupUJweEUYgvps@mail.gmail.com>

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

  reply	other threads:[~2010-10-15  8:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-13 10:08 Mathieu Boespflug
2010-10-13 10:57 ` Mathieu Boespflug
2010-10-15  8:20   ` Mathieu Boespflug [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=m=av+g174vf6fwacEqCe_2xHDFzDvgvNAo_nq@mail.gmail.com' \
    --to=0xbadcode@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).