[Tex/LaTex] Footnote numbers in index (e.g., 23n3)


I'm currently weighing indexing options for a book-length project. One of the more surprising hurdles is that there doesn't seem to be a way to create an index (in my case, several indices) that disambiguates references in the text from those that appear in the footnotes. For example, there will be several hundred references to Roman and canon law, but usually these will be in the footnotes, where there will be, on average, several footnotes per page. Thus a generic reference to page 100 in the citation index is not nearly as helpful as a reference to '100n34' (which is standard practice for publishers who still bother to include things like an 'index locorum').

For sorting reasons, it seems like xindy will be the best option, but a solution that can deal with footnote references will trump that since it will be easier to manually sort the .idx file than to manually identify every citation in a footnote versus one in the text. (Note also that the footnotes invariably contain other arbitrary elements, such as text and citations to modern studies, so a 'special' footnote command will probably not work.)

Finally, in case this complicates things any further, this project is tied to the memoir class (page layout) and lualatex (fonts).

Best Answer

Here is my attempt at doing it. I haven't tested extensively, but it seems to work (with two books, two inline citations, and two footnote citations with dummy footnotes in-between).

The idea, following what Paul Stanley said in his comments, is to use BibLaTeX to index things properly. In order to do so, we need to redefine \DeclareIndexFieldFormat (which is used for indexing titles, but it has several variants for names, etc.), and to create a macro that will format the page number by appending the footnote number to it.

I am also renewing two macros because biblatex does some formatting before indexing titles, and we need to preserve it while incorporating the added |note command.









  author = {Author, A.},
  year = {2000},
  title = {My first title},
  author = {Buthor, B.},
  year = {2002},
  title = {My second title},



Some inline citation \cite{author:2000}. Some footnote\footnote{A, b and c}. Some footnote citation \footcite{buthor:2002}.


Some footnote\footnote{A, b and c}. Some footnote citation \footcite{author:2000}. Some inline citation \cite{buthor:2002}.



Edit: Looking at your first question, I think perhaps you could create an entry using the following code:

    title = {Digestum},
    indextitle = {Digestum!\emph{Dig.}},
    indexsorttitle = {02},
    title = {Institutiones},
    indextitle = {Institutiones!\emph{Inst.}},
    indexsorttitle = {01},

Don't forget to replace the \emph{#2} by #2 in \renewbibmacro{index:title} at l. 14, otherwise it won't work.

Now, if you want two indexes with one of them being sorted arbitrarily and the other alphabetically, you need to specify things accordingly, by saying where to index which data (see the memoir documentation). If you further want the "Institutiones" and "Digestum" to look like letter headings, I suggest you look for a way to solve your first question with xindy (or wait until someone find it). Sorry I can't help there.

Related Question