[NTG-context] My own marks

Jon Wong jhannwong at gmail.com
Sat Aug 31 15:39:19 CEST 2019


Hi all,

Sorry, I corrected my MWE. As you can see, \currentitemnumber seems strange when used for \marking inside a nested itemize.

MWE:

\definemarking[M]

\startsetups S
  default=(\getmarking[M])~
  first=(\getmarking[M][first])~
  last=(\getmarking[M][last])~
  previous=(\getmarking[M][previous])~
  both=(\getmarking[M][both])~
  all=(\getmarking[M][all])~
  current=(\getmarking[M][current])
\stopsetups

\setupheadertexts[text]
  [\setups{S}][]
  [\setups{S}][]

\setuppagenumbering[location=footer]

\starttext

\startitemize[a]

\item
  \startitemize[n]
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \stopitemize

\item
  \startitemize[n]
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \stopitemize

\item
  \startitemize[n]
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \item \marking[M]{\currentitemnumber} \input{knuth}
  \item \marking[M]{\currentitemnumber} \input{zapf}
  \stopitemize

\stopitemize

\stoptext


Regards
Jon


> On Aug 31, 2019, at 9:28 PM, Jon Wong <jhannwong at gmail.com> wrote:
> 
> Hi all,
> 
> It seems that \currentitemnumber won’t work for \marking if inside a nested itemize?
> 
> MWE:
> 
> \definemarking[M]
> 
> \startsetups S
>  default=(\getmarking[M])~
>  first=(\getmarking[M][first])~
>  last=(\getmarking[M][last])~
>  previous=(\getmarking[M][previous])~
>  both=(\getmarking[M][both])~
>  all=(\getmarking[M][all])~
>  current=(\getmarking[M][current])
> \stopsetups
> 
> \setupheadertexts[text]
>  [\setups{S}][]
>  [\setups{S}][]
> 
> \setuppagenumbering[location=footer]
> 
> \starttext
> 
> \startitemize[n]
> 
> \item
>  \startitemize[a]
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{zapf}
>  \stopitemize
> 
> \item
>  \startitemize[a]
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{knuth}
>  \item \marking{\currentitemnumber} [\currentitemnumber] \input{zapf}
>  \stopitemize
> 
> \stopitemize
> 
> \stoptext
> 
> 
> Regards
> Jon
> 
> 
>> On Aug 31, 2019, at 8:46 PM, Jon Wong <jhannwong at gmail.com> wrote:
>> 
>> Hi all,
>> 
>> How does \marking really work? Can’t seem to get \currentitemnumber into it.
>> 
>> MWE:
>> 
>> \definemarking[M]
>> 
>> \startsetups S
>> \getmarking[M]
>> \stopsetups
>> 
>> \setupheadertexts[\setups{S}][][][\setups{S}]
>> 
>> \starttext
>> 
>> \startitemize[n]
>> 
>> \item First item
>> \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>> \page
>> 
>> \item Second item
>> \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>> \page
>> 
>> \item Third item
>> \marking[M]{Really? \currentitemnumber}[\currentitemnumber]
>> 
>> \stopitemize
>> 
>> \stoptext
>> 
>> Regards
>> Jon
>> 
> 



More information about the ntg-context mailing list