ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] setupitemize reverse not working with start value
@ 2025-09-09 20:40 Aditya Mahajan
  2025-09-09 21:21 ` [NTG-context] " Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2025-09-09 20:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

When reverse option is set in \startitemize, the value of the start key is ignored. MWE:

\starttext
\subject{Without reverse}
\startitemize[n][start=3]
  \item Four 
  \item Three
\stopitemize

\subject{With reverse}
\startitemize[reverse,n][start=3]
  \item Four 
  \item Three
\stopitemize
\stoptext

What can I go if I want reverse numbering starting from a particular value.

Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: setupitemize reverse not working with start value
  2025-09-09 20:40 [NTG-context] setupitemize reverse not working with start value Aditya Mahajan
@ 2025-09-09 21:21 ` Aditya Mahajan
  2025-09-10 16:07   ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2025-09-09 21:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 9 Sep 2025, Aditya Mahajan wrote:

> Hi,
> 
> When reverse option is set in \startitemize, the value of the start key is ignored. MWE:
> 
> \starttext
> \subject{Without reverse}
> \startitemize[n][start=3]
>   \item Four 
>   \item Three
> \stopitemize
> 
> \subject{With reverse}
> \startitemize[reverse,n][start=3]
>   \item Four 
>   \item Three
> \stopitemize
> \stoptext
> 
> What can I go if I want reverse numbering starting from a particular value.

Changing this in strc-itm fixes the behavior, but I am not sure if this is the right place. 


\def\strc_itemgroups_insert_item_counter_indeed % quite slow ... every time this setup .. but it
  {\begingroup                                  % can be optimized ... best move some to strc-num
   \setupcounter
     [\v_strc_itemgroups_counter]%
     [\c!prefix=\itemgroupparameter\c!prefix,
      \c!prefixstopper=\itemgroupparameter\c!prefixstopper,
      \c!prefixseparatorset=\itemgroupparameter\c!prefixseparatorset,
      \c!prefixconversion=\itemgroupparameter\c!prefixconversion,
      \c!prefixconversionset=\itemgroupparameter\c!prefixseparatorset,
      \c!prefixset=\itemgroupparameter\c!prefixset,
      \c!prefixsegments=\itemgroupparameter\c!prefixsegments,
      \c!prefixconnector=\itemgroupparameter\c!prefixconnector,
      \c!criterium=\itemgroupparameter\c!criterium,
      \c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
      \c!start=\itemgroupparameter\c!start,%AM Added
      \c!numberstopper=\begincsname\??itemstopper\itemgroupparameter\c!placestopper\endcsname,
      \c!numberconversionset=\v_strc_itemgroups_counter,
      \c!numbersegments=\currentitemgroupsegments]%
   % there will be a fixedconversion key
   \expanded{\defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
  %\expanded{\strc_sets_define_conversion_set[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
   %
   \convertedcounter[\v_strc_itemgroups_counter]% [\number\currentitemlevel]%
   \strc_itemgroups_insert_reference
   \endgroup}


Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: setupitemize reverse not working with start value
  2025-09-09 21:21 ` [NTG-context] " Aditya Mahajan
@ 2025-09-10 16:07   ` Hans Hagen via ntg-context
  2025-10-07 14:29     ` Aditya Mahajan
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen via ntg-context @ 2025-09-10 16:07 UTC (permalink / raw)
  To: ntg-context; +Cc: Hans Hagen

On 9/9/2025 11:21 PM, Aditya Mahajan wrote:

 >> below

As I'm in the middle of something else I wait till Wolfgang gives his 
blessing.

Hans

>> When reverse option is set in \startitemize, the value of the start key is ignored. MWE:
>>
>> \starttext
>> \subject{Without reverse}
>> \startitemize[n][start=3]
>>    \item Four
>>    \item Three
>> \stopitemize
>>
>> \subject{With reverse}
>> \startitemize[reverse,n][start=3]
>>    \item Four
>>    \item Three
>> \stopitemize
>> \stoptext
>>
>> What can I go if I want reverse numbering starting from a particular value.
> 
> Changing this in strc-itm fixes the behavior, but I am not sure if this is the right place.
> 
> 
> \def\strc_itemgroups_insert_item_counter_indeed % quite slow ... every time this setup .. but it
>    {\begingroup                                  % can be optimized ... best move some to strc-num
>     \setupcounter
>       [\v_strc_itemgroups_counter]%
>       [\c!prefix=\itemgroupparameter\c!prefix,
>        \c!prefixstopper=\itemgroupparameter\c!prefixstopper,
>        \c!prefixseparatorset=\itemgroupparameter\c!prefixseparatorset,
>        \c!prefixconversion=\itemgroupparameter\c!prefixconversion,
>        \c!prefixconversionset=\itemgroupparameter\c!prefixseparatorset,
>        \c!prefixset=\itemgroupparameter\c!prefixset,
>        \c!prefixsegments=\itemgroupparameter\c!prefixsegments,
>        \c!prefixconnector=\itemgroupparameter\c!prefixconnector,
>        \c!criterium=\itemgroupparameter\c!criterium,
>        \c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
>        \c!start=\itemgroupparameter\c!start,%AM Added
>        \c!numberstopper=\begincsname\??itemstopper\itemgroupparameter\c!placestopper\endcsname,
>        \c!numberconversionset=\v_strc_itemgroups_counter,
>        \c!numbersegments=\currentitemgroupsegments]%
>     % there will be a fixedconversion key
>     \expanded{\defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
>    %\expanded{\strc_sets_define_conversion_set[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
>     %
>     \convertedcounter[\v_strc_itemgroups_counter]% [\number\currentitemlevel]%
>     \strc_itemgroups_insert_reference
>     \endgroup}
> 
> 
> Aditya
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: setupitemize reverse not working with start value
  2025-09-10 16:07   ` Hans Hagen via ntg-context
@ 2025-10-07 14:29     ` Aditya Mahajan
  2025-10-07 15:04       ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Aditya Mahajan @ 2025-10-07 14:29 UTC (permalink / raw)
  To: Hans Hagen via ntg-context


On Wed, 10 Sep 2025, Hans Hagen via ntg-context wrote:

> On 9/9/2025 11:21 PM, Aditya Mahajan wrote:
> 
> >> below
> 
> As I'm in the middle of something else I wait till Wolfgang gives his
> blessing.


A gentle reminder about the issue with reversed discussed below. 
 
> >> When reverse option is set in \startitemize, the value of the start key is
> >> ignored. MWE:
> >>
> >> \starttext
> >> \subject{Without reverse}
> >> \startitemize[n][start=3]
> >>    \item Four
> >>    \item Three
> >> \stopitemize
> >>
> >> \subject{With reverse}
> >> \startitemize[reverse,n][start=3]
> >>    \item Four
> >>    \item Three
> >> \stopitemize
> >> \stoptext
> >>
> >> What can I go if I want reverse numbering starting from a particular value.
> > 
> > Changing this in strc-itm fixes the behavior, but I am not sure if this is
> > the right place.
> > 
> > 
> > \def\strc_itemgroups_insert_item_counter_indeed % quite slow ... every time
> > this setup .. but it
> >    {\begingroup                                  % can be optimized ... best
> >    move some to strc-num
> >     \setupcounter
> >       [\v_strc_itemgroups_counter]%
> >       [\c!prefix=\itemgroupparameter\c!prefix,
> >        \c!prefixstopper=\itemgroupparameter\c!prefixstopper,
> >        \c!prefixseparatorset=\itemgroupparameter\c!prefixseparatorset,
> >        \c!prefixconversion=\itemgroupparameter\c!prefixconversion,
> >        \c!prefixconversionset=\itemgroupparameter\c!prefixseparatorset,
> >        \c!prefixset=\itemgroupparameter\c!prefixset,
> >        \c!prefixsegments=\itemgroupparameter\c!prefixsegments,
> >        \c!prefixconnector=\itemgroupparameter\c!prefixconnector,
> >        \c!criterium=\itemgroupparameter\c!criterium,
> >        \c!numberorder=\ifconditional\c_strc_itemgroups_reverse\v!reverse\else\v!normal\fi,
> >        \c!start=\itemgroupparameter\c!start,%AM Added
> >        \c!numberstopper=\begincsname\??itemstopper\itemgroupparameter\c!placestopper\endcsname,
> >        \c!numberconversionset=\v_strc_itemgroups_counter,
> >        \c!numbersegments=\currentitemgroupsegments]%
> >     % there will be a fixedconversion key
> >     \expanded{\defineconversionset[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
> >    %\expanded{\strc_sets_define_conversion_set[\v_strc_itemgroups_counter][\currentitemgroupconversionset][\currentitemgroupsymbol]}%
> >     %
> >     \convertedcounter[\v_strc_itemgroups_counter]%
> >     [\number\currentitemlevel]%
> >     \strc_itemgroups_insert_reference
> >     \endgroup}
> > 
> > 
> > Aditya
> > ___________________________________________________________________________________
> > If your question is of interest to others as well, please add an entry to
> > the Wiki!
> > 
> > maillist : ntg-context@ntg.nl /
> > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> > archive  : https://github.com/contextgarden/context
> > wiki     : https://wiki.contextgarden.net
> > ___________________________________________________________________________________
> 
> 
> -- 
> 
> -----------------------------------------------------------------
>                                           Hans Hagen | PRAGMA ADE
>               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>        tel: 038 477 53 69 | www.pragma-ade.nl | 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 /
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________
> 
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

* [NTG-context] Re: setupitemize reverse not working with start value
  2025-10-07 14:29     ` Aditya Mahajan
@ 2025-10-07 15:04       ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2025-10-07 15:04 UTC (permalink / raw)
  To: ntg-context

Am 07.10.2025 um 16:29 schrieb Aditya Mahajan:
> 
> On Wed, 10 Sep 2025, Hans Hagen via ntg-context wrote:
> 
>> On 9/9/2025 11:21 PM, Aditya Mahajan wrote:
>>
>>>> below
>>
>> As I'm in the middle of something else I wait till Wolfgang gives his
>> blessing.
> 
> A gentle reminder about the issue with reversed discussed below.


Should be fine, the few things I tested produced correct results.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2025-10-07 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-09 20:40 [NTG-context] setupitemize reverse not working with start value Aditya Mahajan
2025-09-09 21:21 ` [NTG-context] " Aditya Mahajan
2025-09-10 16:07   ` Hans Hagen via ntg-context
2025-10-07 14:29     ` Aditya Mahajan
2025-10-07 15:04       ` Wolfgang Schuster

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