From: Rik Kabel <ConTeXt@rik.users.panix.com>
To: ntg-context@ntg.nl
Subject: [NTG-context] Re: more register questions!
Date: Tue, 7 May 2024 22:22:32 -0400 [thread overview]
Message-ID: <25bfe201-26fa-4b9c-b259-bd39bcb9fee9@rik.users.panix.com> (raw)
In-Reply-To: <02413272-536a-b0e6-a347-917e171d307d@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 2371 bytes --]
Hello Wolfgang and all,
I have been trying to extend this to handle endnotes. So far, I have not
succeeded; the number is always that of the last endnote.
I could possibly increment a counter for each endnote processed, but
that seems a hack.
--
Rik
On 2024-05-03 06:18, Wolfgang Schuster wrote:
> Thomas A. Schmitz schrieb am 02.05.2024 um 17:01:
>> Hi,
>>
>> making wonderful progress on my registers and translating from xml.
>> There is one thing I can't figure out (and I or some other good soul
>> may have asked in the past...). Is it possible to mark occurrences in
>> footnotes? Ideally, the entry in the register would look like
>>
>> p. 100\high{20}
>>
>> to show that the term occurs in note 20 on p. 100. But if that's
>> asking too much, I would be content with applying a processor (say,
>> italic) to these register entries. From the looks of the tuc file,
>> Context doesn't appear to "know" that a register entry is within a
>> footnote. But Hans never ceases to amaze me, so maybe there is a way
>> (short of applying special markup to these notes in the source)?
>
> You can play with the following example, the main point use to use the
> \setregisterentry command and pass the footnote counter with the third
> (optional) argument.
>
> \def\IndexPageCommand#1%
> {#1\doifsomething
> {\currentregisterpageuserdata{footnote}}
> {\high{\currentregisterpageuserdata{footnote}}}}
>
> \setupregister[index][pagecommand=\IndexPageCommand]
>
> \starttext
>
> \dorecurse{200}
> {\samplefile{lorem}\expanded{\setregisterentry[index][entries=\recurselevel]}%
>
> \samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}%
>
> \samplefile{lorem}}
>
> \page \placeindex
>
> \stoptext
>
> 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
> ___________________________________________________________________________________
>
[-- Attachment #1.2: Type: text/html, Size: 3766 bytes --]
[-- Attachment #2: Type: text/plain, Size: 511 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
prev parent reply other threads:[~2024-05-08 2:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 15:01 [NTG-context] " Thomas A. Schmitz
2024-05-02 15:55 ` [NTG-context] " mf
2024-05-03 20:24 ` Thomas A. Schmitz
2024-05-03 20:36 ` Henning Hraban Ramm
2024-05-03 10:18 ` Wolfgang Schuster
2024-05-03 21:12 ` Thomas A. Schmitz
2024-05-08 2:22 ` Rik Kabel [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=25bfe201-26fa-4b9c-b259-bd39bcb9fee9@rik.users.panix.com \
--to=context@rik.users.panix.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).