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

2010-10-16 Thread Hans Hagen

On 16-10-2010 2:29, Aditya Mahajan wrote:


content. You could simulaneously add the appropriate keys to cont-en.xml
and send the diff file to Hans. (There were plans to reimplement that in
lua, but I do not know what is the current state of it).


definitely not soon and the xml file will stay around anyway

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
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
___


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

2010-10-15 Thread Peter Münster
On Fri, Oct 15 2010, Aditya Mahajan wrote:

> cont-en.xml and send the diff file to Hans. (There were plans to
> reimplement that in lua, but I do not know what is the current state
> of it).

Early beginning stage. See also:
http://foundry.supelec.fr/svn/contextman/context-commands
Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


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


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

2010-10-15 Thread Aditya Mahajan

On Fri, 15 Oct 2010, Mathieu Boespflug wrote:


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.


Partly my fault. I requested some of the features that are in that article 
but haven't really tested them in MkIV.



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.


Adding the missing options to the wiki is a good start. Currently, there 
is no syncing between the wiki and the cont-en.xml file (in 
texmf-context/tex/context/interface) that was used to generate that 
content. You could simulaneously add the appropriate keys to cont-en.xml 
and send the diff file to Hans. (There were plans to reimplement that in 
lua, but I do not know what is the current state of it).


It will be nice to have a comprehensive wiki page on enumerations.

Aditya
___
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
___


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

2010-10-15 Thread Arthur Reutenauer
> But I wonder, how does this kind of user generated documentation
> on the wiki get synchronized with the ConTeXt Reference manual hosted
> at Supelec?

  How do you think?  There are little dwarves collecting the data and doing 
semantic analysis on it in order to update the reference manual periodically 
(every hour during business days, every third hours on week-ends and holidays, 
and once a day when the griffins are on strike protesting about their 
retirement plan).

  Seriously, it is manually edited, which is the only way to make a consistent 
document.  For several years, there has been one single person writing it, 
namely Taco, and very few proofreaders, despite his repeated requests for 
feedback.  This makes any progress verry difficult.  And Taco is more of the 
elven kind anyway.

Arthur
___
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
___


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

2010-10-15 Thread Mathieu Boespflug
Wow, thank you very much for your fix, Wolfgang! I can confirm that it
works. I hope this fix makes it into the next beta?

Abount documenting these extra parameters that \setupenumerations has
over \setupdefinitions, I figure that I should contribute that to the
wiki. But I wonder, how does this kind of user generated documentation
on the wiki get synchronized with the ConTeXt Reference manual hosted
at Supelec?

-- Mathieu


On Fri, Oct 15, 2010 at 1:19 PM, Wolfgang Schuster
 wrote:
>
> Am 15.10.2010 um 10:20 schrieb Mathieu Boespflug:
>
>> 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.
>
> \unprotected\def\doenumerationextratext
>  {\doif{\descriptionparameter\c!title}\v!yes
>     {\doifsomething\@@dodoenumerationtext % WS: added this test
>        {\begingroup
>         \dosetdescriptionattributes\c!titlestyle\c!titlecolor
>         \hskip\descriptionparameter\c!titledistance
>         \descriptionparameter\c!titlecommand
>            {\descriptionparameter\c!titleleft
>             \begstrut\@@dodoenumerationtext\endstrut
>             \descriptionparameter\c!titleright}%
>         \endgroup}}}
>
> \unprotected\def\doenumerationfullnumber#1% text, title
>  {\begingroup
>   \dosetdescriptionattributes\c!headstyle\c!headcolor
>   \the\everyenumeration
>  %\descriptionparameter\c!command{\strut#1\doenumerationnumber\doenumerationextratext}%
>   
> \descriptionparameter\c!command{\strut#1\ifconditional\enumerationnumberenabled\doenumerationnumber\fi\doenumerationextratext}%
>   \endgroup}
>
> Wolfgang
>
>
> ___
> 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
> ___
>
___
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
___


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

2010-10-15 Thread Wolfgang Schuster

Am 15.10.2010 um 10:20 schrieb Mathieu Boespflug:

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

\unprotected\def\doenumerationextratext
  {\doif{\descriptionparameter\c!title}\v!yes
 {\doifsomething\@@dodoenumerationtext % WS: added this test
{\begingroup
 \dosetdescriptionattributes\c!titlestyle\c!titlecolor
 \hskip\descriptionparameter\c!titledistance
 \descriptionparameter\c!titlecommand
{\descriptionparameter\c!titleleft
 \begstrut\@@dodoenumerationtext\endstrut
 \descriptionparameter\c!titleright}%
 \endgroup}}}

\unprotected\def\doenumerationfullnumber#1% text, title
  {\begingroup
   \dosetdescriptionattributes\c!headstyle\c!headcolor
   \the\everyenumeration
  
%\descriptionparameter\c!command{\strut#1\doenumerationnumber\doenumerationextratext}%
   
\descriptionparameter\c!command{\strut#1\ifconditional\enumerationnumberenabled\doenumerationnumber\fi\doenumerationextratext}%
   \endgroup}

Wolfgang


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


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

2010-10-15 Thread Mathieu Boespflug
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 <0xbadc...@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 <0xbadc...@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
___


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

2010-10-13 Thread Mathieu Boespflug
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 <0xbadc...@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
___


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

2010-10-13 Thread Mathieu Boespflug
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
___