Sign up ×
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.

So I'm using to compile my TextMate LaTeX Project and it's running quite nice. The only thing I'm missing, is, that i want to specify an individual style file for the makeindex command, i.e. when latexmk decides to run makeindex, it should add something like

makeindex -s

I won't mind setting the .ist file to my $TM_LATEX_MASTERs name, but it would also be nice to have a seperate style file.

I haven't found anything to define such an option for latexmk that is called from TextMate. Do you have any ideas?

PS: I'm using XeTeX to compile, but i think that might only be of minor interest.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

If you're running a TeX Live 2010 or 2011, or MiKTeX 2.9, you can profit from the imakeidx package: just change \usepackage{makeidx} to


and \makeindex to

\makeindex[options=-s mystyle]

Then MakeIndex (the program) will be called automatically from within the LaTeX run, with the specified style (doesn't work with the article class and, presently, memoir).

share|improve this answer
That's a neat Hint. Though the index just does not show up, but that may also be due to an error in my style-definitions, i'll check that tomorrow. I'm using the Koma-Classes (scrbook actually), so it seems to work (despite the mentioned error). Many thanks. – Ronny Oct 18 '11 at 21:19
So thanks, it really works, now i have to understand more about the style file itself. I think this solution is great. – Ronny Oct 18 '11 at 21:40
@Ronny Well, I'm one of the authors. :) – egreg Oct 18 '11 at 21:56
I red your manual last night, though i didn't get the link to your username. Thanks for that package, it's e great idea. – Ronny Oct 19 '11 at 6:32

You just need to redefine the command latexmk uses to run makeindex. Make a file latexmkrc in the directory containing your document, and include in it the following line

$makeindex  = 'makeindex -s %O -o %D %S';
share|improve this answer
Thanks for the help, i think specifying it inside the .tex document as mentioned directly below is a little bit nicer, though i might try your idea, just to learn configuring latexmkrc. – Ronny Oct 18 '11 at 21:20
So i reset my repository and tried your solution, too. It works, and it would also work on older distributions compared to the solution of egreg, so maybe for some of the readers that might be nice. I prefer the solution using imakeidx, because it's more flexible. I can change the style in my .tex-Files, which is even better for me than the starting point of this thread. Thanks again. – Ronny Oct 19 '11 at 6:40
@john-collins When you say a latexmkrc file, Do you mean a .latexmkrc file or the dot does not matter? – Dox Aug 29 '14 at 12:51

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.