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