Take the 2-minute tour ×
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.

I would like to change the name of my index, so that instead of "Index", it reads "Index of whatever I want". I've tried quite a few things:

  • redefining \indexname, after or before calling \makeindex
  • using the index package and calling \newindex instead of \makeindex

None of these worked.

Also, I'm trying to add the index to the ToC, but it doesn't get linked properly. From what I understand the contentsline should be called inside the .ind but this file is generated by makeindex. How can I do that?

share|improve this question
1  
It would be better to show your recent efforts by a minimal example. There can be several probable causes for your problems. –  Thorsten Donig May 28 '11 at 10:30

3 Answers 3

up vote 6 down vote accepted
\documentclass[a4paper]{book}
\usepackage{imakeidx}
\makeindex[title=What?,intoc]

\usepackage{hyperref}

\begin{document}
\frontmatter
\tableofcontents
\mainmatter
\chapter{A}
a\index{a}
\backmatter
\printindex
\end{document}

You can give imakeidx the original option, if you don't like using multicol for balancing the columns in the final index page. The package supports multiple indices, with possibly different number of columns.

(Disclaimer: I'm one of the authors.)

share|improve this answer
    
This is perfect thanks. Is it a new package? I couldn't find it in TeXLive on Ubuntu Natty. –  ℝaphink May 28 '11 at 11:08
2  
@Raphink: it's almost one year old, but unfortunately TeX Live/Ubuntu is still the 2009 edition. Also idxlayout is probably missing; notice that the two packages are compatible with each other (only load lockstep's one after imakeidx). –  egreg May 28 '11 at 11:22
    
Good to know, thank you. –  ℝaphink May 28 '11 at 11:28

I have no problem with this.

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage{makeidx}
\usepackage[nottoc]{tocbibind}

\addto{\captionsenglish}{%
  \renewcommand{\indexname}{Register}
}
\makeindex

\begin{document}
  \tableofcontents

  \section{Foo}
    Item\index{Item}

  \printindex
\end{document}

The tocbibind package is for inserting several lists (LoF, LoT, …) into the ToC.

share|improve this answer

Here's a solution using the idxlayout package. Use the unbalanced option to switch off balancing the columns. (Disclosure: I'm the package author.)

EDIT: Note that because idxlayout is based on multicol, indexes in the article class (and other classes without the \chapter sectioning command) will basically behave like a normal \section*, i.e., they won't start on a new page.

\documentclass{article}

\usepackage{makeidx}
\makeindex

% Variant A
% \renewcommand{\indexname}{Index of whatever I want}

% Variant B
\usepackage[english]{babel}
\addto\captionsenglish{%
  \renewcommand*{\indexname}{Index of whatever I want}
}

\usepackage[totoc]{idxlayout}

\begin{document}

\tableofcontents

\section{First}

Some text about foo.\index{foo}

\printindex

\end{document}

enter image description here

share|improve this answer

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.