Hi, me again...

Is there a check if a macro is called from inside of a footnote, like a system 
mode *footnote?
(Same with captions?)

In my current project, index entries should get italic page numbers if they 
occurr inside of a footnote (or a caption, but that is rare).
I’m using different shortcuts for both cases (that call \index with or without 
processor), but some paragraphs are very confusing (many long footnotes, or 
footnotes within footnotes), and I could avoid manually analyzing the structure 
if my macro could determine on its own if it’s called from a footnote.

Not-working example:


\setupinteraction[state=start]
\defineprocessor[kursiv][style=italicface]

\define[1]\Idx{\doifmodeelse{*footnote}{\index{#1}}{\index[kursiv->]{kursiv->#1}}#1}

\starttext

Text

---
\index[C]{A}{B}\footnote{Inside\index{FN}}\index{BF}
---

\placeregister[index][criterium=all]

\stoptext


This also shows the text-running-into-footnotes problem with both of my ConTeXt 
versions:
ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 2020.4.12
ConTeXt  ver: 2020.07.27 16:30 LMTX  fmt: 2020.7.28


Hraban
___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to