# \dag doubles index entries - how to avoid?

Using the symbol \dag within a splitindex command, in the index output two entries are produced: One naming the pages where the \sindex command is used in the text, another where it is used in the footnotes. Any ideas how to avoid this?

Example:

Paul\sindex[p]{Paul (\dag 1999)} and Peter died
recently.\footnote{Paul\sindex[p]{Paul (\dag 1999)} died earlier}

• Could you please provide the contents of a complete compilable .tex file, so I can paste it into my editor and reproduce your situation? – John Wickerson May 21 '13 at 12:01

The way indexing programs need to read your .tex file is very tricky. This is what leads to problems. In the code you have used, if you examine the resulting .idx file, you will see this:

\indexentry[p]{Paul (\dag 1999)}{1}
\indexentry[p]{Paul (\dag  1999)}{1}


And makeindex (or splitindex) will treat them differently. You can work around this by having this in your input instead:

Paul\sindex[p]{Paul (\dag 1999)} and Peter died
recently.\footnote{Paul\sindex[p]{Paul (\string\dag\space 1999)} died earlier}


This will yield:---

\indexentry[p]{Paul (\dag 1999)}{1}
\indexentry[p]{Paul (\dag 1999)}{1}


---and will, after running (in your case) splitindex, give you only one index entry (to page 1).

As an aside, you may find that inserting a thin space between your two elements, viz \dag\,1999, looks better.

A minimal example is almost always helpful to everyone, so here's a complete file for testing:

\documentclass[12pt]{article}
\usepackage{splitidx}
\makeindex
\newindex[Index]{p}

\begin{document}

Paul\sindex[p]{Paul (\dag 1999)} and Peter died
% recently.\footnote{Paul\sindex[p]{Paul (\dag 1999)} died earlier}
recently.\footnote{Paul\sindex[p]{Paul (\string\dag\space 1999)} died earlier}

\printindex*
\end{document}