ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Enumeration numbering broken
@ 2005-07-13 16:06 David Antos
  2005-07-14  9:11 ` Taco Hoekwater
  0 siblings, 1 reply; 5+ messages in thread
From: David Antos @ 2005-07-13 16:06 UTC (permalink / raw)



Hello,

in the following example, I'm pretty sure that it should produce Lemmas and
Theorems numbered continuously (i.e., one common counter for both of them)
and moreover, the numbers should (due to bychapter) be preceded by chapter
number. In ConTeXt 2005.06.27, the enumerations are counted separately and
chapter number prefix is missing.

Interestingly, if Lemma and Theorem blocks are swapped, they become really
Theorem 1 and Lemma 2. The chapter number is still missing.

Has the mechanism been changed or am I doing anything wrong?

***
\defineenumeration
  [Theorem]
  [text=Theorem~,
   way=bychapter,
   inbetween=\noindent]

\defineenumeration
  [Lemma]
  [Theorem]
  [text=Lemma~]

\starttext

\chapter{chapter}

\startLemma
This should be Lemma 1.1
\stopLemma

\startTheorem
This should be Theorem 1.2
\stopTheorem

\stoptext
***

Thanks,
D.A.

-- 
Many rewrites, a hard-drive crash, a laptop being stolen, a couple of
corrupted filesystems and one broken screen later, here it is.
-- Rusty Russel: Linux 2.4 Packet Filtering HOWTO

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enumeration numbering broken
  2005-07-13 16:06 Enumeration numbering broken David Antos
@ 2005-07-14  9:11 ` Taco Hoekwater
  2005-07-14 11:47   ` David Antos
  0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2005-07-14  9:11 UTC (permalink / raw)




David Antos wrote:
> Hello,
> 
> in the following example, I'm pretty sure that it should produce Lemmas and
> Theorems numbered continuously (i.e., one common counter for both of them)
> and moreover, the numbers should (due to bychapter) be preceded by chapter
> number. In ConTeXt 2005.06.27, the enumerations are counted separately and
> chapter number prefix is missing.
> 
> Interestingly, if Lemma and Theorem blocks are swapped, they become really
> Theorem 1 and Lemma 2. The chapter number is still missing.
> 
> Has the mechanism been changed or am I doing anything wrong?

I believe your example is right, and that there is a bug/unintended 
functionality change.

There has been a rather large set of changes to code core-des.tex
for the 2005.05.25 release, and that seems the likely cause of this
change. I do not understand this bit of ConTeXt good enough to come
up with a patch, sorry.

Taco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enumeration numbering broken
  2005-07-14  9:11 ` Taco Hoekwater
@ 2005-07-14 11:47   ` David Antos
  2005-07-20 19:49     ` Hans Hagen
  0 siblings, 1 reply; 5+ messages in thread
From: David Antos @ 2005-07-14 11:47 UTC (permalink / raw)


On Thu, Jul 14, 2005 at 11:11:42AM +0200, Taco Hoekwater wrote:
> >in the following example, I'm pretty sure that it should produce Lemmas and
> >Theorems numbered continuously (i.e., one common counter for both of them)
> There has been a rather large set of changes to code core-des.tex
> for the 2005.05.25 release, and that seems the likely cause of this
> change. I do not understand this bit of ConTeXt good enough to come
> up with a patch, sorry.

Hello,

yes, I've upgraded from an older release (something like 2005.01.xx) and it
worked before.

Hans, could you please have a look?

Thanks,
D.A.

-- 
Trust no man, not even your brother
With hair one colour and beard another
-- Ty Semaka (The Plaid Tongued Devils): never drown a cat

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enumeration numbering broken
  2005-07-14 11:47   ` David Antos
@ 2005-07-20 19:49     ` Hans Hagen
  2005-07-20 20:39       ` David Antos
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2005-07-20 19:49 UTC (permalink / raw)


David Antos wrote:

>On Thu, Jul 14, 2005 at 11:11:42AM +0200, Taco Hoekwater wrote:
>  
>
>>>in the following example, I'm pretty sure that it should produce Lemmas and
>>>Theorems numbered continuously (i.e., one common counter for both of them)
>>>      
>>>
>>There has been a rather large set of changes to code core-des.tex
>>for the 2005.05.25 release, and that seems the likely cause of this
>>change. I do not understand this bit of ConTeXt good enough to come
>>up with a patch, sorry.
>>    
>>
>
>Hello,
>
>yes, I've upgraded from an older release (something like 2005.01.xx) and it
>worked before.
>
>Hans, could you please have a look?
>  
>
i found the cause ... (quick hack for your doc: set way=bychapter for both); when i cleaned up the code i let numbers inherit in the wrong way 

btw what exactly was you problem with inbetween? 

Hans 



-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Enumeration numbering broken
  2005-07-20 19:49     ` Hans Hagen
@ 2005-07-20 20:39       ` David Antos
  0 siblings, 0 replies; 5+ messages in thread
From: David Antos @ 2005-07-20 20:39 UTC (permalink / raw)


On Wed, Jul 20, 2005 at 09:49:54PM +0200, Hans Hagen wrote:
> i found the cause ... (quick hack for your doc: set way=bychapter for 
> both); when i cleaned up the code i let numbers inherit in the wrong way 
> btw what exactly was you problem with inbetween? 

Hello,

no problem with inbetween; the inbetween setting was necessary just because
I used paragraph indents (and no vertical space) and I wanted the Theorems
to be

Theorem x.y
No indent is here

and not

Theorem x.y
   Paragraph indent here
looks really ugly

So my example was small, but not really minimal :-)

Thanks,
D.A.

-- 
Jim Hacker: "You are the Cabinet Secretary. You must insist that we get
papers circulated earlier."
Sir Humphrey: "Alas, there are grave problems about circulating papers
before they are written."
-- Yes, Prime Minister

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-20 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-13 16:06 Enumeration numbering broken David Antos
2005-07-14  9:11 ` Taco Hoekwater
2005-07-14 11:47   ` David Antos
2005-07-20 19:49     ` Hans Hagen
2005-07-20 20:39       ` David Antos

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