On 3/1/2025 2:17 PM, Pablo Rodriguez via ntg-context wrote:
On 3/1/25 13:26, Pablo Rodriguez via ntg-context wrote:

Is there any way (considering the sample above, where chapter has to be
in Roman capital numbers) to get the pure number value of
\currentlistentrynumber?

Partly replying to myself, I found it in strc-lst.mkxl:

   \structurelistrawnumber{chapter}

BTW, I wonder also how could I get a link to the corresponding chapter
(as standard lists always have with interaction enabled).

But this is something yet to be discovered.

\definelistalternative
    [pmcols]
    [renderingsetup=list:pmcol]

\startsetups [list:pmcol:common]
    \relax % prevent lookahead
    [\currentlistentrynumber]
    \nbsp\nbsp\nbsp
    \startcurrentlistentrywrapper
        \currentlistentrypagenumber
        \narrownobreakspace ยท \narrownobreakspace
        \the\numexpr\currentlistentrypagenumber + 1\relax
    \stopcurrentlistentrywrapper
\stopsetups

\startsetups [list:pmcol]
    \ifnum{\structurelistrawnumber{\currentlist} ; 3} = 1\relax
        \dontleavehmode
        \rlap {
            \directsetup{list:pmcol:common}
        }
    \orelse\ifnum{\structurelistrawnumber{\currentlist} ; 3} = 2\relax
        \hfill
        \directsetup{list:pmcol:common}
    \else
        \hfill
        \llap {
            \directsetup{list:pmcol:common}
        }
        \crlf
   \fi
\stopsetups

it's wikifyable I guess (and made into a test suite example)

Hans

-----------------------------------------------------------------
                                          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 : [email protected] / 
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
___________________________________________________________________________________

Reply via email to