LaTeX forum ⇒ 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.
J_entz
Posts: 4
Joined: Fri Nov 13, 2009 9:33 am

MakeIndex makes multiple entries of the same item

Postby J_entz » Wed Feb 17, 2010 6:09 pm

Hi Everyone,
I have a little problem with MakeIndex.

I defined:
  1. \newcommand*{\figidx}[1]{{\color{red}\hyperpage{#1}}}
  2. \definecolor{darkgreen}{rgb}{0.0,0.6,0.0}
  3. \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

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

Postby localghost » Wed Feb 17, 2010 6:36 pm

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


Best regards
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

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

Postby J_entz » Wed Feb 17, 2010 7:19 pm

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:
  1. \documentclass{article}
  2. \usepackage{makeidx}
  3. \usepackage{afterpage}
  4. \makeindex
  5. \begin{document}
  6. test 123
  7. \index{test}\index{test ($\dot{\theta}$)}
  8. \afterpage{
  9. test 456
  10. \index{test}\index{test ($\dot{\theta}$)}}
  11. \printindex
  12. \end{document}

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

Postby localghost » Wed Feb 17, 2010 7:32 pm

Substitute makeidx by index and see what happens then.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

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

Postby J_entz » Wed Feb 17, 2010 7:59 pm

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


Return to “MakeIndex, Nomenclature, Glossaries and Acronyms”

Who is online

Users browsing this forum: No registered users and 2 guests