# makeindex doesn't use indexed words

When I use makeindex and try to index a word using

Hello \index{World}


the entry in the generated \printindex looks like

indexfile, 7


World, 7


-- This issue also happens when using World\index{World}.

The error seems to be somewhere before creating the .idx, as it looks like this

doc.idx

\indexentry{\@indexfile |hyperpage}{7}


doc.ind

\begin{theindex}

\item indexfile , \hyperpage{7}

\end{theindex}


Used packages

\usepackage{geometry}
\usepackage{ngerman}
\usepackage[latin1]{inputenc}
\usepackage{fancyhdr}
\usepackage{makeidx}
\usepackage{showidx}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{hyperref}

-

That is not possible as could be seen in this example:

\documentclass[ngerman]{article}
\usepackage{geometry}
\usepackage{babel}
\usepackage[latin1]{inputenc}
\usepackage{fancyhdr}
\usepackage{makeidx}
\usepackage{graphicx}
\usepackage{textcomp}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{hyperref}
\usepackage{showidx}
\makeindex
\newcommand\Index[1]{#1\index{#1}}
\begin{document}

This is my \Index{world} and my \Index{World}.

\printindex
\end{document}


it creates a correct index:

I run pdflatex->makeindex->pdflatex. You have to create a complete example which shows your behaviour.

-
Well... this example works fine. Is there probably an issue with some packages I'm using? That they somehow mess up the index? –  Florian Peschka May 3 '11 at 9:19
@ApoY2k: do not load the package hyperref. Does it help? –  Herbert May 3 '11 at 9:46
No, that wasn't it. I have tried nearly all packages and it turns out, that \usepackage{showidx} caused the problem. Without it, the index is created correctly. Having it loaded, the problem occurs. –  Florian Peschka May 3 '11 at 11:03
@ApoY2k: See my edited answer. It creates both the idnex and the margin notes for the index –  Herbert May 3 '11 at 11:47
@ApoY2k -- note that @Herbert's example places \usepackage{showidx} after \usepackage{hyperref}. order matters sometimes! –  barbara beeton May 3 '11 at 12:17