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.

For some reason, Texshop refuses to typeset my index idx files. I'm working with a mac and a .ltx file

this is my code:

% XeLaTeX can use any Mac OS X font. See the setromanfont command below.
% Input to XeLaTeX is full Unicode, so Unicode characters can be typed directly into the source.

% The next lines tell TeXShop to typeset with xelatex, and to open and save the source with Unicode encoding.

%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\textheight = 180.5 mm
\textwidth = 108.5 mm



%\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
%\geometry{a4paper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for for rotated page geometry
%\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
%\renewcommand %These two commands are for double-spacing

% Will Robertson's fontspec.sty can be used to simplify font choices.
% To experiment, open /Applications/Font Book to examine the fonts provided on Mac OS X,
% and change "Hoefler Text" to any of these choices.

\setsansfont[Scale=MatchLowercase,Mapping=tex-text]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

\Printindex{nominum}{Index nominum}
\Printindex{rerum}{Index rerum}

and this is the log file I get:

This is XeTeXk, Version 3.141592-2.2-0.996 (Web2C 7.5.6)
 %&-line parsing enabled.
entering extended mode
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
 french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, 
turkish, ukenglish, ukrainian, loaded.
Document Class: book 2005/09/16 v1.4f Standard LaTeX document class

! LaTeX Error: \printindex undefined.

! LaTeX Error: \indexchap undefined.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.108 \renewcommand{\indexchap}
share|improve this question
As far as I can tell, amsmidx is for the amsbook class. I recommend using imakeidx (I'm one of the authors): the syntax is slightly different, though. –  egreg Jul 18 '12 at 21:42
as mentioned by @egreg, amsmidx is intended only for ams document classes, and it is the only multi-index package compatible with ams classes. don't expect it to work anywhere else, please. amsmidx was based on multind, so if you need multiple indexes and are using a non-ams document class, you might try that package. –  barbara beeton Jul 19 '12 at 18:18
I can't use multind with an ams math package. –  Guillaume Coatalen Jul 19 '12 at 19:11
If someone could send me a simple code for imakeidx for two indexes that would be wonderful, I'm having problems with the pdf on how imakeidx works. –  Guillaume Coatalen Jul 20 '12 at 7:35
Since you have some responses one ,ost of your questions, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). It's part of this site's idea to identify good questions and answers through upvotes and acceptance of answers. –  Tobi Dec 13 '12 at 14:24
add comment

2 Answers

Here's a stripped down version of a document like you want; you just need to run XeLaTeX on it and the indices will automatically be compiled and produced.


\makeindex[name=nominum,title=Index nominum,intoc]
\makeindex[name=rerum,title=Index rerum,intoc]

\setsansfont[Scale=MatchLowercase,Ligatures=TeX]{Gill Sans}
\setmonofont[Scale=MatchLowercase]{Andale Mono}

Here we mention the name of a famous mathematician, Carl Friedrich 
Gauss\index[nominum]{Gauss, Carl Friedrich} who is very well known
for his work in mathematics\index[rerum]{mathematics} and 


The table of contents

enter image description here

The first chapter page

enter image description here

The "Index nominum"

enter image description here

The "Index rerum"

enter image description here

share|improve this answer
add comment

The \printindex command is defined in the makeindex package so you need to add


You (or your IDE) will also need to run the makeindex program to generate the index after LaTeX has run, and then run latex again to typeset the index.

\indexchap I can not help you with, you code is trying to re define it but it is not defined, perhaps you just need \newcommand rather than \renewcommand or perhaps you intended to load some package that defines it?

share|improve this answer
\indexchap is defined in lines 1158-1173 of amsbook.cls. The documentation says in the first two lines that amsmidx is for AMS document classes. –  egreg Jul 18 '12 at 21:52
add comment

Your Answer


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.