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 use LaTeX on a Mac, using TeXShop. It is possible to compile an index from within the TeXShop interface, except when I have more than one index (say, people and concepts) for the same text. In this case I used to compile it from Terminal:

makeindex MyIndex

say. But since I went from Mac OS 10.5 to 10.6 (Snow Leopard), the latter does not work anymore (albeit normal, single-index compilation from within TeXShop works fine). Any idea?

share|improve this question
    
This sounds like a shell path problem. What does which makeindex return in Terminal? Also, what does echo $PATH return? –  Alan Munn Sep 2 '11 at 15:42
    
Oh, I see. I have looked for makeindex binary and added its location (/usr/local/texlive/2008/bin/universal-darwin, to be precise) to my path. Now it works, thanks! Could I have done it in a more elegant way? –  DaG Sep 2 '11 at 15:57
    
If you're using MacTeX 2008, you have a really old distribution. I would strongly encourage you to update to MacTeX 2011. That being said, you don't need to add the binary itself to your path, just /usr/texbin. (Assuming that existed in 2008; I think it did.) –  Alan Munn Sep 2 '11 at 16:05
    
For multiple indices I usually propose to use the package imakeidx (disclaimer: I'm one of the authors) that automatizes the run of makeindex. Give it a try. But, first of all, solve the PATH problem. –  egreg Sep 2 '11 at 16:09
    
@Alan Munn: Yes, /usr/texbin already existed, and now I have set it in the path. Downloading MacTex 2011 now. –  DaG Sep 2 '11 at 16:36

2 Answers 2

up vote 5 down vote accepted

The following answer is compiled from the comments, so that we can remove this question from the "unanswered" list.

The problem you are describing is characteristic of a path problem with your shell profile. To determine whether you are able to run the makeindex command from the command line, you can do:

which makeindex

This should return: /usr/texbin/makeindex. If it doesn't, and returns nothing, then your TeX binaries aren't being found. (They are found by TeXShop because it sets its own path for all commands.)

To see what your path is, you can enter:

echo $PATH

This should return something that includes /usr/texbin; if it doesn't you need to fix that in your .profile or .bashrc file.

If you're using MacTeX 2008, you have a really old distribution. I would strongly encourage you to update to MacTeX 2011.

As egreg notes, for multiple indices the package imakeidx is useful, as it automates the run of makeindex. (He is the author of imakeidx.)

share|improve this answer

Add the line

% !TEX TS-program = latexmk

at the top of your .tex file and compile it using the LaTeX engine. (In TeXShop Typeset

with LaTeX selected.)

The following is an example and the 3-page output.

% !TEX TS-program = latexmk
\documentclass[12pt]{article}
\usepackage{multind}
\makeindex{indexA}
\makeindex{indexB}


\begin{document}

I use LaTeX on a \index{indexA}{Mac}Mac, using \index{indexB}{TeXShop}TeXShop. It is possible 
to compile an \index{indexA}{index}index from within the \index{indexB}{TeXShop}TeXShop 
interface, except when I have more than one \index{indexA}{index}index (say, people and 
concepts) for the same text. In this case I used to compile it from Terminal:

makeindex MyIndex

say. But since I went from Mac OS 10.5 to 10.6 (Snow Leopard), the latter does not work 
anymore (albeit normal, single-index compilation from within \index{indexB}{TeXShop}TeXShop 
works fine). Any idea?

\printindex{indexA}{Index A}
\printindex{indexB}{Index B}
\end{document}

page 1 of the output: enter image description here

page2 of the output: enter image description here

page3 of the output: 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.