8

I use makeindex routinely for a German book. A new latex package sanitize-umlaut allows now to write index terms without umlaute for example \index{Östrogene} instead of \index{Oestrogene@{Östrogene}}. To make it work properly one hat to use

makeindex -s german -g book

I would like to pass this parameters to latexmk. I do not see how to do this. The makeindex command is usually

makeindex book

I looked through latexmk questions but did not find an appropriate one.

1
  • 1
    I don't think there is an interface for it, you need to put it into a configuration file. Create alt-german.rc, in it add $makeindex = 'makeindex -s german -g book';, then call latexmk via latexmk -r alt-german.rc ....
    – daleif
    Jun 15, 2016 at 12:42

1 Answer 1

9

In the latexmk manual [1, page 26], there is a configuration variable which can change the makeindex-command:

$makeindex ["makeindex %O -o %D %S"]

The indexprocessing program.

The value in square brackets is the default.

You can overwrite this default by creating a file latexmkrc in the directory of your document with the following code:

$makeindex = 'makeindex -s german -g %S';

Then call latexmk as usual. The defaults will be overwritten.


PS: You can define more options in the latexmkrc, for example @default_files = ('document.tex'), etc.


Edit: As Bernhard pointed out it's better to use -g %S instead of the hardcoded -g book

1
  • 2
    For flexibility the entry in latexmkrc should read $makeindex = 'makeindex -s german -g %S'; Jun 15, 2016 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .