MakeIndex, Nomenclature, Glossaries and AcronymsMakeIndex makes multiple entries of the same item

Information and discussion about MakeIndex - the tool to generate subject indices for LaTeX documents.
Post Reply
J_entz
Posts: 4
Joined: Fri Nov 13, 2009 9:33 am

MakeIndex makes multiple entries of the same item

Post by J_entz »

Hi Everyone,
I have a little problem with MakeIndex.

I defined:

Code: Select all

\newcommand*{\figidx}[1]{{\color{red}\hyperpage{#1}}}
\definecolor{darkgreen}{rgb}{0.0,0.6,0.0}
\newcommand*{\tabidx}[1]{{\color{darkgreen}\hyperpage{#1}}}
Now when I use \index{Something} in the text and \index{Something|tabidx} in a table, I should get
Something.....1,1
where one of the page numbers is green. However _SOMETIMES_ it gives me
Something.......1
Something.......1 <- this one is green

I have no clue why it makes two separate entries. It seems to happen often when the entry is like \index{Some text ($\GreekLetter$)|tabidx}, but sometimes even that is ok. With the figidx I _NEVER_ have this trouble.

(I put it in the table, but outside the tabular environment, although this doesn't seem to make a difference.)

Anyone any idea?

Kind regards

Jorg

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

MakeIndex makes multiple entries of the same item

Post by localghost »

Provide a minimal working example (MWE) instead of useless code snippets.


Best regards
Thorsten
J_entz
Posts: 4
Joined: Fri Nov 13, 2009 9:33 am

MakeIndex makes multiple entries of the same item

Post by J_entz »

Hi
I was able to track the error down to the afterpage package. For some weird reason the afterpage command seems to add "random" characters to math in index terms... I got an extra F now, but in my other implementation it was a whitespace (present in the ind file, but removed from the dvi again)


Here is the Minimal workling example, as requested:

Code: Select all

\documentclass{article}
\usepackage{makeidx}
\usepackage{afterpage}
\makeindex
\begin{document}
test 123
\index{test}\index{test ($\dot{\theta}$)}
\afterpage{
test 456
\index{test}\index{test ($\dot{\theta}$)}}
\printindex
\end{document}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

MakeIndex makes multiple entries of the same item

Post by localghost »

Substitute makeidx by index and see what happens then.
J_entz
Posts: 4
Joined: Fri Nov 13, 2009 9:33 am

Re: MakeIndex makes multiple entries of the same item

Post by J_entz »

Works with index, not with makeidx.

I understand the index package is newer, is it fully backward compatible with makeidx?
I found that the |seealso{} command of makeidx is not available in the index package, how can I get this in index?
Are there any other important differences between the packages?

Kind regards
Jorg
Post Reply