
On 3/2/2025 12:33 PM, Hans Hagen wrote:
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)
You still need soem acessor for the raw page number because you cannot just increment something that gets formatted. So I added an extra helper (and made the other more consistent, basically they were just internal helpers). So then we get this: \setupinteraction [state=start] \definelistalternative [pmcols] [renderingsetup=list:pmcol] \startsetups [list:pmcol:common] \relax % prevent lookahead [\currentlistentrynumber] \nbsp\nbsp\nbsp \startcurrentlistentrywrapper \currentlistentrypagenumber \narrownobreakspace · \narrownobreakspace \the\numexpr\structurelistuserpagenumber + 1\relax \stopcurrentlistentrywrapper \stopsetups \startsetups [list:pmcol] \ifnum{\structurelistnumber ; 3} = 1\relax \dontleavehmode \rlap { \directsetup{list:pmcol:common} } \orelse\ifnum{\structurelistnumber ; 3} = 2\relax \hfill \directsetup{list:pmcol:common} \else \hfill \llap { \directsetup{list:pmcol:common} } \crlf \fi \stopsetups \definestructureconversionset[rom][n,R] \setuphead [title] [page=yes] \setuphead [chapter] [page=even, sectionconversionset=rom] \starttext \placelist [chapter] [alternative=pmcols,criterium=all,interaction=all] \page \dorecurse {10} { \startchapter[title={Zapf #1}] \samplefile{zapf} \stopchapter } \stoptext You need a newer strc-lst which i'll send you (and wolfgang) off list. There will be no upload till after the te xlive release (end of the week) so any bug fix / feature is pending till then. 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 -----------------------------------------------------------------