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.

So I'm using latexmk.pl 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. latexmk.pl when latexmk decides to run makeindex, it should add something like

makeindex -s mystyle.ist

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
add comment

2 Answers

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

\usepackage{imakeidx}

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
1  
@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
add comment

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 mystyle.ist %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
add comment

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.