[Tex/LaTex] How to compile glossaries with arara without Perl

araraglossaries

I don't want to install Perl. I am using arara for building. I make use of the glossaries package.

Can I compile my document without the makeglossaries help script (I don't want to install Perl)? I use biblatex as well.

Currently my arara directives look like this:

% arara: xelatex
% arara: biber
% arara: xelatex
% arara: clean: {files ... blah blah

Where would I need to put the glossary compilation command? Does it have to be before or after xelatex compilation?

Thank you very much.

Best Answer

cmhughes's answer is best for general purposes, but you can also just use the makeindex directive however you need to explicitly write the file names. If your LaTeX file is called myDoc.tex then the following will work:

% arara: makeindex: {style: myDoc.ist, options: "-t myDoc.glg -o myDoc.gls myDoc.glo"}

(Avoid spaces in the file names.) That will just create the main glossary. If you've used the acronyms option you will need to have a similar line for the list of acronyms:

% arara: makeindex: {style: myDoc.ist, options: "-t myDoc.alg -o myDoc.acr myDoc.acn"}

Similarly if you have additional glossaries (either created explicitly via \newglossary or via other package options such as index).

If you want to sort by letter order instead of word order you need to add -l to the options list.

(The advantage of the makeglossaries script is that it reads the .aux file to find out which glossaries the document has defined, what their corresponding file extensions are, and whether to use makeindex or xindy. TeX Live comes with its own Perl interpreter. The only inconvenience is for MiKTeX users, but MiKTeX and Perl Scripts (and one Python script) provides instructions for MiKTeX.)

Edit: arara v4.0 has a makeglossarieslite rule which can be used to invoke makeglossaries-lite.lua, the Lua alternative to makeglossaries. Since LuaTeX requires a Lua interpreter, one should already be available with modern TeX systems.

Although makeglossaries-lite.lua doesn't have the full set of functions that makeglossaries has, it still has the advantage of being able to pick up the glossary information from the .aux file that an explicit call to makeindex can't do and so will work with any number of custom glossaries defined within the document.