* Strange bug with reversed itemize
@ 2012-09-13 0:34 Aditya Mahajan
2012-09-13 3:30 ` burwoad
2012-09-13 7:59 ` Otared Kavian
0 siblings, 2 replies; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-13 0:34 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
For some reason, the numbering in itemize is affected by the value of
userpage!
\setupuserpagenumber[start=12]
\starttext
\startitemize[n,reverse]
\item One
\item Two
\stopitemize
\stoptext
With ConTeXt 2012.09.11 20:36 I get
13. One
12. Two
Any ideas?
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 0:34 Strange bug with reversed itemize Aditya Mahajan
@ 2012-09-13 3:30 ` burwoad
2012-09-13 3:36 ` Aditya Mahajan
2012-09-13 7:59 ` Otared Kavian
1 sibling, 1 reply; 12+ messages in thread
From: burwoad @ 2012-09-13 3:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1056 bytes --]
What your got is already reversed, isn't it?
On Thu, Sep 13, 2012 at 8:34 AM, Aditya Mahajan <adityam@umich.edu> wrote:
> Hi,
>
> For some reason, the numbering in itemize is affected by the value of
> userpage!
>
> \setupuserpagenumber[start=12]
> \starttext
> \startitemize[n,reverse]
> \item One
> \item Two
> \stopitemize
> \stoptext
>
> With ConTeXt 2012.09.11 20:36 I get
>
> 13. One
> 12. Two
>
> Any ideas?
>
> 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 <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/<http://foundry.supelec.fr/projects/contextrev/>
> wiki : http://contextgarden.net
> ______________________________**______________________________**
> _______________________
>
[-- Attachment #1.2: Type: text/html, Size: 1689 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 3:30 ` burwoad
@ 2012-09-13 3:36 ` Aditya Mahajan
0 siblings, 0 replies; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-13 3:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
> On Thu, Sep 13, 2012 at 8:34 AM, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> Hi,
>>
>> For some reason, the numbering in itemize is affected by the value of
>> userpage!
>>
>> \setupuserpagenumber[start=12]
>> \starttext
>> \startitemize[n,reverse]
>> \item One
>> \item Two
>> \stopitemize
>> \stoptext
>>
>> With ConTeXt 2012.09.11 20:36 I get
>>
>> 13. One
>> 12. Two
>>
>> Any ideas?
> What your got is already reversed, isn't it?
Yes, but setting the page number to 12 should not start the item numbers
from 12!
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 0:34 Strange bug with reversed itemize Aditya Mahajan
2012-09-13 3:30 ` burwoad
@ 2012-09-13 7:59 ` Otared Kavian
2012-09-13 16:18 ` Aditya Mahajan
1 sibling, 1 reply; 12+ messages in thread
From: Otared Kavian @ 2012-09-13 7:59 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 814 bytes --]
Hi Aditya,
Yes it is a strange behaviour and it appears only when using mkiv and reversed itemize, even with
\setuppagenumber[start=12]
instead of
\setupuserpagenumber[start=12]
Also the pagenumber remains unchanged with either of these commands, which means that it's a bug.
I tested your example with Context version 2011.11.29, mkiv and there everything is correct.
Best regards: OK
On 13 sept. 2012, at 02:34, Aditya Mahajan <adityam@umich.edu> wrote:
> Hi,
>
> For some reason, the numbering in itemize is affected by the value of userpage!
>
> \setupuserpagenumber[start=12]
> \starttext
> \startitemize[n,reverse]
> \item One
> \item Two
> \stopitemize
> \stoptext
>
> With ConTeXt 2012.09.11 20:36 I get
>
> 13. One
> 12. Two
>
> Any ideas?
>
> Aditya
[-- Attachment #1.2: Type: text/html, Size: 13686 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 7:59 ` Otared Kavian
@ 2012-09-13 16:18 ` Aditya Mahajan
2012-09-13 22:36 ` Aditya Mahajan
0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-13 16:18 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 13 Sep 2012, Otared Kavian wrote:
> On 13 sept. 2012, at 02:34, Aditya Mahajan <adityam@umich.edu> wrote:
>
>> For some reason, the numbering in itemize is affected by the value of userpage!
>>
>> \setupuserpagenumber[start=12]
>> \starttext
>> \startitemize[n,reverse]
>> \item One
>> \item Two
>> \stopitemize
>> \stoptext
>>
>> With ConTeXt 2012.09.11 20:36 I get
>>
>> 13. One
>> 12. Two
>>
>> Any ideas?
>
> Yes it is a strange behaviour and it appears only when using mkiv and reversed itemize, even with
> \setuppagenumber[start=12]
> instead of
> \setupuserpagenumber[start=12]
> Also the pagenumber remains unchanged with either of these commands, which means that it's a bug.
>
> I tested your example with Context version 2011.11.29, mkiv and there everything is correct.
Thanks for testing. I also tested with 2012.07.
\setupserpagenumber does not change the page number (but
\setcounter[userpage][start=12] does!)
The item numbers come out correctly. So, the bug with wrong item numbers
was introduced recently; the bug with \setupuserpagenumber not working
came sometime earlier.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 16:18 ` Aditya Mahajan
@ 2012-09-13 22:36 ` Aditya Mahajan
2012-09-13 22:49 ` Aditya Mahajan
2012-09-13 23:11 ` Wolfgang Schuster
0 siblings, 2 replies; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-13 22:36 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 13 Sep 2012, Aditya Mahajan wrote:
> On Thu, 13 Sep 2012, Otared Kavian wrote:
>
>> On 13 sept. 2012, at 02:34, Aditya Mahajan <adityam@umich.edu> wrote:
>>
>>> For some reason, the numbering in itemize is affected by the value of
>>> userpage!
>>>
>>> \setupuserpagenumber[start=12]
>>> \starttext
>>> \startitemize[n,reverse]
>>> \item One
>>> \item Two
>>> \stopitemize
>>> \stoptext
>>>
>>> With ConTeXt 2012.09.11 20:36 I get
>>>
>>> 13. One
>>> 12. Two
>>>
>>> Any ideas?
>>
>> Yes it is a strange behaviour and it appears only when using mkiv and
>> reversed itemize, even with
>> \setuppagenumber[start=12]
>> instead of
>> \setupuserpagenumber[start=12]
>> Also the pagenumber remains unchanged with either of these commands, which
>> means that it's a bug.
>>
>> I tested your example with Context version 2011.11.29, mkiv and there
>> everything is correct.
>
> Thanks for testing. I also tested with 2012.07.
I have been able to isolate the bug to the update on 2012.07.09;
specifically to this commit.
http://repo.or.cz/w/context.git/blobdiff/6f124794f7dc253f8b83f2517c26ce17e50d66ff..refs/heads/origin:/tex/context/base/strc-num.mkiv
If I replace the current version of strc-num.mkiv with the version from
2012.07.09:
http://repo.or.cz/w/context.git/blob_plain/6f124794f7dc253f8b83f2517c26ce17e50d66ff:/tex/context/base/strc-num.mkiv
then the numbering is correct.
However, I cannot figure out what is causing the bug in that change.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 22:36 ` Aditya Mahajan
@ 2012-09-13 22:49 ` Aditya Mahajan
2012-09-13 23:11 ` Wolfgang Schuster
1 sibling, 0 replies; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-13 22:49 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 13 Sep 2012, Aditya Mahajan wrote:
> On Thu, 13 Sep 2012, Aditya Mahajan wrote:
>
>> On Thu, 13 Sep 2012, Otared Kavian wrote:
>>
>>> On 13 sept. 2012, at 02:34, Aditya Mahajan <adityam@umich.edu> wrote:
>>>
>>>> For some reason, the numbering in itemize is affected by the value of
>>>> userpage!
>>>>
>>>> \setupuserpagenumber[start=12]
>>>> \starttext
>>>> \startitemize[n,reverse]
>>>> \item One
>>>> \item Two
>>>> \stopitemize
>>>> \stoptext
>>>>
>>>> With ConTeXt 2012.09.11 20:36 I get
>>>>
>>>> 13. One
>>>> 12. Two
>>>>
>>>> Any ideas?
>>>
>>> Yes it is a strange behaviour and it appears only when using mkiv and
>>> reversed itemize, even with
>>> \setuppagenumber[start=12]
>>> instead of
>>> \setupuserpagenumber[start=12]
>>> Also the pagenumber remains unchanged with either of these commands, which
>>> means that it's a bug.
>>>
>>> I tested your example with Context version 2011.11.29, mkiv and there
>>> everything is correct.
>>
>> Thanks for testing. I also tested with 2012.07.
>
> I have been able to isolate the bug to the update on 2012.07.09; specifically
> to this commit.
>
> http://repo.or.cz/w/context.git/blobdiff/6f124794f7dc253f8b83f2517c26ce17e50d66ff..refs/heads/origin:/tex/context/base/strc-num.mkiv
>
> If I replace the current version of strc-num.mkiv with the version from
> 2012.07.09:
> http://repo.or.cz/w/context.git/blob_plain/6f124794f7dc253f8b83f2517c26ce17e50d66ff:/tex/context/base/strc-num.mkiv
>
> then the numbering is correct.
>
> However, I cannot figure out what is causing the bug in that change.
The bug disappears if I add
\setupstructurecounting[start=0]
or
\setupstructurecounting[start=\zerocount]
in the test file!
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 22:36 ` Aditya Mahajan
2012-09-13 22:49 ` Aditya Mahajan
@ 2012-09-13 23:11 ` Wolfgang Schuster
2012-09-14 22:06 ` Aditya Mahajan
1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2012-09-13 23:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 14.09.2012 um 00:36 schrieb Aditya Mahajan <adityam@umich.edu>:
> I have been able to isolate the bug to the update on 2012.07.09; specifically to this commit.
>
> http://repo.or.cz/w/context.git/blobdiff/6f124794f7dc253f8b83f2517c26ce17e50d66ff..refs/heads/origin:/tex/context/base/strc-num.mkiv
>
> If I replace the current version of strc-num.mkiv with the version from 2012.07.09:
> http://repo.or.cz/w/context.git/blob_plain/6f124794f7dc253f8b83f2517c26ce17e50d66ff:/tex/context/base/strc-num.mkiv
>
> then the numbering is correct.
>
> However, I cannot figure out what is causing the bug in that change.
Part of the problem is this code block:
\def\strc_counters_check_setup#1% does it have to happen here?
{% this can be done at the lua end / a bit messy here ... todo ...
\ifcsname\??counter#1\c!number\endcsname
\doifelsevalue {\??counter#1\c!number}{#1} {\letbeundefined{\??counter#1\c!number}}%
{\doifvaluenothing{\??counter#1\c!number} {\letbeundefined{\??counter#1\c!number}}}%
\fi
\ifcsname\??counter#1\c!number\endcsname
% it's a clone
\else
\edef\currentcounterlevel{\thenamedcounterlevel{#1}}%
\edef\p_start{\counterparameter{#1}\c!start}%
\ctxcommand{checkcountersetup("#1",\currentcounterlevel,\ifx\p_start\empty0\else\number\p_start\fi,"\counterparameter{#1}\c!state")}%
\fi}
ConTeXt uses \p_start to store the current value of the start parameter.
When you set now a value for start in \setuppagenumber the value is kept
in \p_start (because there are no groups). When you start now the itemize
environment the same code is loaded and the start parameter (which hasn’t
been set yet) expands to a very stupid default value which is by another
helper function.
\def\strc_counter_setup_using_parameter#1#2% name \someparameter
{\edef\p_start{#2\c!start}%
\setupcounter
[#1]
[ \c!start=\ifx\p_start\empty0\else\number\p_start\fi,
...
\c!numbersegments=#2\c!numbersegments]}
As you can see here the start parameter expands to \p_start when it isn’t empty
what is the case here and because of this you get a wrong value for the item numbers.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-13 23:11 ` Wolfgang Schuster
@ 2012-09-14 22:06 ` Aditya Mahajan
2012-09-15 8:03 ` Wolfgang Schuster
0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-14 22:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2575 bytes --]
On Fri, 14 Sep 2012, Wolfgang Schuster wrote:
>
> Am 14.09.2012 um 00:36 schrieb Aditya Mahajan <adityam@umich.edu>:
>
>> I have been able to isolate the bug to the update on 2012.07.09; specifically to this commit.
>>
>> http://repo.or.cz/w/context.git/blobdiff/6f124794f7dc253f8b83f2517c26ce17e50d66ff..refs/heads/origin:/tex/context/base/strc-num.mkiv
>>
>> If I replace the current version of strc-num.mkiv with the version from 2012.07.09:
>> http://repo.or.cz/w/context.git/blob_plain/6f124794f7dc253f8b83f2517c26ce17e50d66ff:/tex/context/base/strc-num.mkiv
>>
>> then the numbering is correct.
>>
>> However, I cannot figure out what is causing the bug in that change.
>
> Part of the problem is this code block:
>
> \def\strc_counters_check_setup#1% does it have to happen here?
> {% this can be done at the lua end / a bit messy here ... todo ...
> \ifcsname\??counter#1\c!number\endcsname
> \doifelsevalue {\??counter#1\c!number}{#1} {\letbeundefined{\??counter#1\c!number}}%
> {\doifvaluenothing{\??counter#1\c!number} {\letbeundefined{\??counter#1\c!number}}}%
> \fi
> \ifcsname\??counter#1\c!number\endcsname
> % it's a clone
> \else
> \edef\currentcounterlevel{\thenamedcounterlevel{#1}}%
> \edef\p_start{\counterparameter{#1}\c!start}%
> \ctxcommand{checkcountersetup("#1",\currentcounterlevel,\ifx\p_start\empty0\else\number\p_start\fi,"\counterparameter{#1}\c!state")}%
> \fi}
>
> ConTeXt uses \p_start to store the current value of the start parameter.
> When you set now a value for start in \setuppagenumber the value is kept
> in \p_start (because there are no groups). When you start now the itemize
> environment the same code is loaded and the start parameter (which hasn’t
> been set yet) expands to a very stupid default value which is by another
> helper function.
>
> \def\strc_counter_setup_using_parameter#1#2% name \someparameter
> {\edef\p_start{#2\c!start}%
> \setupcounter
> [#1]
> [ \c!start=\ifx\p_start\empty0\else\number\p_start\fi,
> ...
> \c!numbersegments=#2\c!numbersegments]}
>
>
> As you can see here the start parameter expands to \p_start when it isn’t empty
> what is the case here and because of this you get a wrong value for the item numbers.
Thanks for the diagnosis. What will be a good way to fix this? I think
that
\expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else\number\p_start\fi.,...]}
should work (but I haven't tested it yet).
Aditya
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-14 22:06 ` Aditya Mahajan
@ 2012-09-15 8:03 ` Wolfgang Schuster
2012-09-15 18:06 ` Aditya Mahajan
0 siblings, 1 reply; 12+ messages in thread
From: Wolfgang Schuster @ 2012-09-15 8:03 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 15.09.2012 um 00:06 schrieb Aditya Mahajan <adityam@umich.edu>:
> Thanks for the diagnosis. What will be a good way to fix this? I think that
>
> \expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else\number\p_start\fi.,...]}
>
> should work (but I haven't tested it yet).
I would do the expansion here but with \normalexpanded.
\def\strc_counter_setup_using_parameter#1#2% name \someparameter
{\edef\p_start{#2\c!start}%
%\setupcounter
\normalexpanded{\setupcounter
[#1]
[ \c!start=\ifx\p_start\empty0\else\number\p_start\fi,
\c!state=#2\c!state, % beware, "" == start
\c!way=#2\c!way,
%
\c!prefix=#2\c!prefix,
\c!prefixseparatorset=#2\c!prefixseparatorset,
\c!prefixconversion=#2\c!prefixconversion,
\c!prefixconversionset=#2\c!prefixconversionset,
\c!prefixstarter=#2\c!prefixstarter,
\c!prefixstopper=#2\c!prefixstopper,
\c!prefixset=#2\c!prefixset,
\c!prefixsegments=#2\c!prefixsegments,
\c!prefixset=#2\c!prefixset,
\c!prefixconnector=#2\c!prefixconnector,
%
\c!numberseparatorset=#2\c!numberseparatorset,
\c!numberconversion=#2\c!numberconversion,
\c!numberconversionset=#2\c!numberconversionset,
\c!numberstarter=#2\c!numberstarter,
\c!numberstopper=#2\c!numberstopper,
% \c!numbersegments=#2\c!numbersegments]}
\c!numbersegments=#2\c!numbersegments]}}
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-15 8:03 ` Wolfgang Schuster
@ 2012-09-15 18:06 ` Aditya Mahajan
2012-09-16 10:52 ` Hans Hagen
0 siblings, 1 reply; 12+ messages in thread
From: Aditya Mahajan @ 2012-09-15 18:06 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sat, 15 Sep 2012, Wolfgang Schuster wrote:
>
> Am 15.09.2012 um 00:06 schrieb Aditya Mahajan <adityam@umich.edu>:
>
>> Thanks for the diagnosis. What will be a good way to fix this? I think that
>>
>> \expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else\number\p_start\fi.,...]}
>>
>> should work (but I haven't tested it yet).
>
>
> I would do the expansion here but with \normalexpanded.
>
> \def\strc_counter_setup_using_parameter#1#2% name \someparameter
> {\edef\p_start{#2\c!start}%
> %\setupcounter
> \normalexpanded{\setupcounter
> [#1]
> [ \c!start=\ifx\p_start\empty0\else\number\p_start\fi,
> \c!state=#2\c!state, % beware, "" == start
> \c!way=#2\c!way,
> %
> \c!prefix=#2\c!prefix,
> \c!prefixseparatorset=#2\c!prefixseparatorset,
> \c!prefixconversion=#2\c!prefixconversion,
> \c!prefixconversionset=#2\c!prefixconversionset,
> \c!prefixstarter=#2\c!prefixstarter,
> \c!prefixstopper=#2\c!prefixstopper,
> \c!prefixset=#2\c!prefixset,
> \c!prefixsegments=#2\c!prefixsegments,
> \c!prefixset=#2\c!prefixset,
> \c!prefixconnector=#2\c!prefixconnector,
> %
> \c!numberseparatorset=#2\c!numberseparatorset,
> \c!numberconversion=#2\c!numberconversion,
> \c!numberconversionset=#2\c!numberconversionset,
> \c!numberstarter=#2\c!numberstarter,
> \c!numberstopper=#2\c!numberstopper,
> % \c!numbersegments=#2\c!numbersegments]}
> \c!numbersegments=#2\c!numbersegments]}}
Thanks.
Hans, can you add this to strc-num.mkiv?
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Strange bug with reversed itemize
2012-09-15 18:06 ` Aditya Mahajan
@ 2012-09-16 10:52 ` Hans Hagen
0 siblings, 0 replies; 12+ messages in thread
From: Hans Hagen @ 2012-09-16 10:52 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 15-9-2012 20:06, Aditya Mahajan wrote:
> On Sat, 15 Sep 2012, Wolfgang Schuster wrote:
>
>>
>> Am 15.09.2012 um 00:06 schrieb Aditya Mahajan <adityam@umich.edu>:
>>
>>> Thanks for the diagnosis. What will be a good way to fix this? I
>>> think that
>>>
>>> \expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else\number\p_start\fi.,...]}
>>>
>>>
>>> should work (but I haven't tested it yet).
>>
>>
>> I would do the expansion here but with \normalexpanded.
>>
>> \def\strc_counter_setup_using_parameter#1#2% name \someparameter
>> {\edef\p_start{#2\c!start}%
>> %\setupcounter
>> \normalexpanded{\setupcounter
>> [#1]
>> [ \c!start=\ifx\p_start\empty0\else\number\p_start\fi,
>> \c!state=#2\c!state, % beware, "" == start
>> \c!way=#2\c!way,
>> %
>> \c!prefix=#2\c!prefix,
>> \c!prefixseparatorset=#2\c!prefixseparatorset,
>> \c!prefixconversion=#2\c!prefixconversion,
>> \c!prefixconversionset=#2\c!prefixconversionset,
>> \c!prefixstarter=#2\c!prefixstarter,
>> \c!prefixstopper=#2\c!prefixstopper,
>> \c!prefixset=#2\c!prefixset,
>> \c!prefixsegments=#2\c!prefixsegments,
>> \c!prefixset=#2\c!prefixset,
>> \c!prefixconnector=#2\c!prefixconnector,
>> %
>> \c!numberseparatorset=#2\c!numberseparatorset,
>> \c!numberconversion=#2\c!numberconversion,
>> \c!numberconversionset=#2\c!numberconversionset,
>> \c!numberstarter=#2\c!numberstarter,
>> \c!numberstopper=#2\c!numberstopper,
>> % \c!numbersegments=#2\c!numbersegments]}
>> \c!numbersegments=#2\c!numbersegments]}}
>
> Thanks.
>
> Hans, can you add this to strc-num.mkiv?
Sure, as I assume that Wolfgang investigated possible side effects.
Hans
-----------------------------------------------------------------
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-09-16 10:52 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13 0:34 Strange bug with reversed itemize Aditya Mahajan
2012-09-13 3:30 ` burwoad
2012-09-13 3:36 ` Aditya Mahajan
2012-09-13 7:59 ` Otared Kavian
2012-09-13 16:18 ` Aditya Mahajan
2012-09-13 22:36 ` Aditya Mahajan
2012-09-13 22:49 ` Aditya Mahajan
2012-09-13 23:11 ` Wolfgang Schuster
2012-09-14 22:06 ` Aditya Mahajan
2012-09-15 8:03 ` Wolfgang Schuster
2012-09-15 18:06 ` Aditya Mahajan
2012-09-16 10:52 ` 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).