The standard index produced by makeindex displays page numbers for each indexed term. Is there a way to display the footnote number (instead of the page number) whenever the indexed term appears in a footnote? The footnote numbers run sequentially throughout the document, so this would localize the reference much better than just qualifying the page number with an "n", say. It's okay to use different indexing macros in footnotes and main text.

  • Nice question. But...If you have footnotes rather than endnotes, why is it any harder to locate a reference in a footnote than in all the paragraphs on that page?
    – murray
    Commented Jul 14, 2016 at 19:11
  • Has to do with the document. Some pages may have little main text, but lots of footnote text. A term may also appear in multiple footnotes on the same page, and it would be nice not to have to scan them all.
    – user84538
    Commented Jul 14, 2016 at 20:24

2 Answers 2


My approach switches \@footnoteindex to true at the begin of a \footnote and sets it to false after \@wrindex.

This is of course a logical error at the moment, since it does not allow another \index usage within \footnote that should use the footnote number as well.










\section{A section}
The concept of animals as pets is quite important\index{Animal}


\blindtext[10]\footnote{Another stuff\index{Cat}}


  • I'll try to update...
    – user31729
    Commented Jul 14, 2016 at 19:14
  • Resetting footnote numbers might confuse hyperref...
    – user31729
    Commented Jul 14, 2016 at 19:22

Even if you want the footnote numbers in the index instead of page numbers, you still will have to format them differently to distinguish both in the index. In this example, I have made the footnote numbers bold.

enter image description here

The problem is to get the footnote number in the .idx file when it is written. If we should send a \thefootnote, it would give the value of that counter when the index is typeset.

What I have done here is to create a \footnoteindex for using inside footnotes. This command uses \thefootnote which is expanded because it is send as an argument to \index. The page number inserted by \index will be discarded by the additional command \indexbf since the second argument (the page number) is not used.

Since the footnote numbers are not in the place of the page numbers, makeidx can not do the usual nice things with them.

This is the code:






\lipsum[1]\index{first}\footnote{\lipsum[2]\footnoteindex{first foot}\footnoteindex{same foots}}
\lipsum[3]\index{second}\footnote{\lipsum[4]\footnoteindex{second foot}}
\lipsum[5]\index{text and foot}\footnote{\lipsum[6]\footnoteindex{text and foot}\footnoteindex{same foots}}



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .