From: Jon Wong <jhannwong@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: My own marks
Date: Sat, 31 Aug 2019 21:39:19 +0800 [thread overview]
Message-ID: <4C45FF4B-7CD6-4976-8E27-A6786304050F@gmail.com> (raw)
In-Reply-To: <316005C6-300C-4846-97CA-1D77090AE1B5@gmail.com>
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@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@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
>>
>
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2019-08-31 13:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-31 12:46 Jon Wong
2019-08-31 13:28 ` Jon Wong
2019-08-31 13:39 ` Jon Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C45FF4B-7CD6-4976-8E27-A6786304050F@gmail.com \
--to=jhannwong@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).