ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	"Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Subject: [NTG-context] Re: more register questions!
Date: Fri, 3 May 2024 12:18:11 +0200	[thread overview]
Message-ID: <02413272-536a-b0e6-a347-917e171d307d@gmail.com> (raw)
In-Reply-To: <32427de6-2bd9-48c7-a15a-2832d8db6515@uni-bonn.de>

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
___________________________________________________________________________________

  parent reply	other threads:[~2024-05-03 10:21 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 [this message]
2024-05-03 21:12   ` Thomas A. Schmitz
2024-05-08  2:22   ` Rik Kabel

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=02413272-536a-b0e6-a347-917e171d307d@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=thomas.schmitz@uni-bonn.de \
    /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).