Tell me more ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

When I use makeindex and try to index a word using

Hello \index{World}

the entry in the generated \printindex looks like

indexfile, 7

instead of

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}
share|improve this question

1 Answer

up vote 3 down vote accepted

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:

enter image description here

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

share|improve this answer
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
1  
@ApoY2k -- note that @Herbert's example places \usepackage{showidx} after \usepackage{hyperref}. order matters sometimes! – barbara beeton May 3 '11 at 12:17
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
http://tex.stackexchange.com/questions/17242/makeindex-doesnt-use-indexed-words
tex.stackexchange.com
crawl=CC-MAIN-2013-20
45332
application/http; msgtype=response
sha1:KXUF5BVRS5ZAFKLGP4G54GOPASCCBNEV
<urn:uuid:c9550ca2-e266-47a8-bc72-d98749b50397>
2013-06-20T09:02:52Z
198.252.206.16
sha1:JPXG7NPVJGVH7I4K4EECW5SGAWJHJLEY
<urn:uuid:21f3af6a-e4fb-40ee-9f4a-86b2a181d510>
http://tex.stackexchange.com/questions/17242/makeindex-doesnt-use-indexed-words
response
<urn:uuid:061dff32-deb5-4fa2-8003-c164a59d8f07>
robots: classic
hostname: ip-10-60-113-184.ec2.internal
software: Nutch 1.6 (CC)/CC WarcExport 1.0
isPartOf: CC-MAIN-2013-20
operator: CommonCrawl Admin
description: Wide crawl of the web with URLs provided by Blekko for Spring 2013
publisher: CommonCrawl
format: WARC File Format 1.0
conformsTo: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf