I am working on an index for a large scientific manuscript. I would like to have index entries occurring as footnotes to be in the index as page-n-footnote. Courtesy of brannerchinese's code in this forum I have nearly got the problem solved. The issue is that the footnoted indices are not properly sorted. The "Tiger" entry in the index is output as

Tiger, i, 1 Tiger, in1

when it should be

Tiger, i, in1, 1

The .idx entries are of the form


and the .ind entries of the form

\item Tiger, i, 1  
\item Tiger, \pageandfn{1}{i}

Here's the code:

\documentclass[10 pt,twoside]{memoir}  

%these next two commands from  


Here's a page and a footnote for the front matter.     Elephant.\index{Elephant} Tiger.\footnote{Tigers are ferocious!\indexfn{Tiger}}\index{Tiger} 

\chapter{First things first}  
Here's a page and a footnote for the main matter.\footnote{Cobras are   dangerous!\indexfn{Cobra}} Red panda \index{Red panda} \index{Tiger}  

\indexprologue{\noindent\textbf{Bold} page numbers indicate where a term   is defined; page numbers for entries occuring in a footnote are followed   by an \emph{n} and the footnote number.}  

Here's the .idx file:

\indexentry{Red panda}{1}  

And here's the .ind file:


  \item Cobra, \pageandfn{1}{1}


  \item Elephant, i


  \item Red panda, 1


  \item Tiger, i, 1  
  \item Tiger, \pageandfn{1}{i}


Apologies for my cluelessness, and many thanks to the group members for much help over the years!


I'm not quite sure why makeindex makes


into two seperate entries. I was wondering why the use of #1@#1 in this macro


Indeed, if we change it to


then makeindex folds the entries into a single Tiger.

I normally use xindy for indexing, and it will automatically fold both into the same entry (using the original macro definitions), but it will ignore the |pageandfn{1} part. We might be able to get it to work with the right xindy configuration, but the |xxx support in xindy is quite limited

|improve this answer|||||
  • @dderbes remember to hit the check mark to accept the answer – daleif Aug 2 '18 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.