I am writting on a scientific paper with genealogical content. Therefore, many many names occur in my file. Hence, I made an index of all names with imakeidx. Now to my problem:
Sometimes, two persons have the same name and occur on the same page of the pdf-file. Therefore, the entry with this name occurs only once in the index. But I want that EVERY person mentioned in my paper to be in the index. Is there a possibility for that?
Here is my minimal latex code:
\documentclass[10pt,a4paper]{book}
\usepackage[paper=a4paper,left=25mm,right=25mm,top=25mm,bottom=50mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage{imakeidx}
\makeindex[name=A,title={index of mentioned persons},columns=2]
\begin{document}
John Doe\index[A]{John Doe}\newline
John Doe\index[A]{John Doe}
\printindex[A]
\end{document}
The output of this example is then something like
John Doe, 1
But I want something like
John Doe, 1, 1
EDIT: Please dont question the reason why I need it in that way. I know it looks strange. I just need it for a certain statistical evaluation.
\index{john_doe_1@John Doe}
trick to differentiate between the different persons of the same name. But that will not eliminate the general problem. I do agree with @egreg, that giving an identical page number won't help the reader but confuse him..idx
file directly. You can sort it with any external utility such as Perl or Python.