Il 02/05/24 17:01, Thomas A. Schmitz ha scritto:
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)?
I did something like that, with a processor that added a "n" after the occurrence page number. Since you typeset XML, maybe you can detect that an index (register) reference happens inside a note from the DOM element you are typesetting. Then you use a command like this: \index[NoteProcessor->sortkey]{index term} where NoteProcessor is defined like this: \defineprocessor[NoteProcessor][right={\itx n}] In this case I'm adding a smaller "n" to the right of the page number of the occurrence. Adding the \high style is not difficult: \defineprocessor[NoteProcessor][right=\high{n}] but replacing a fixed "n" with the footnote number is quite challenging. The second argument of \defineprocessor has a "command=\...##1" option that could be exploited, but I don't know exactly what gets passed to that custom command as ##1; maybe the page number of the occurrence. In that case, I'd look for a way to store the association between that occurrence and the footnote number, and retrieve that in the custom command. Massi