MakeIndex, Nomenclature, Glossaries and AcronymsRepeated Index Entry

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
felipeabrao
Posts: 9
Joined: Sun Feb 28, 2010 4:21 pm

Repeated Index Entry

Post by felipeabrao »

Hello, everybody!

Does anyone of you know how a specific word (or all words) in the index list can be referenced to all the pages where they appear in the text, but not having to use the comand \index everytime near this word in the main document? For example: suppose I want to index the word house, but this word appears on 50 different pages of my text. Do I have to use the command \index{house} near this word 50 times? Is not there a way to index this word just once, but in so a manner that all the 50 pages related to that are shown in the index list? I thank you all in advance!

Felipe Abrão

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
justdeath
Posts: 69
Joined: Mon Sep 05, 2011 10:27 am

Repeated Index Entry

Post by justdeath »

No, you must use the command \index{house} every time.
Each \index command causes LaTEX to write an entry on the idx file.
The following example shows some simple \index commands and the index
entries that they produce. The page number refers to the page containing
the text where the \index command appears.
http://www.tex.ac.uk/tex-archive/indexi ... eindex.pdf at page 3

And no, there is no recent version of this package.

You can try xindy or something:
http://en.wikibooks.org/wiki/LaTeX/Indexing

Nikolay
User avatar
nlct
Posts: 276
Joined: Thu Nov 06, 2008 11:15 am

Repeated Index Entry

Post by nlct »

The easiest method is to make a command that both prints the word and indexes it. For example:

Code: Select all

\newcommand{\house}{house\index{house}}
or if you are using xspace:

Code: Select all

\newcommand{\house}{house\index{house}\xspace}
Regards
Nicola Talbot
felipeabrao
Posts: 9
Joined: Sun Feb 28, 2010 4:21 pm

Re: Repeated Index Entry

Post by felipeabrao »

OK, thank you for the help!

Felipe Abrão
Post Reply