# How to makeglossaries with TeXworks?

I am using TeXworks to edit my LaTeX files. I currently use the pdfLatex+MakeIndex+BibTeX which calls the texify (it is the standard configuration). How to configure this option to call the makeglossaries program?

-

I think getting texify to run makeglossaries successfully might be hard work. Instead, I think it will be easiest to create a new menu entry just for glossaries. You do no say if you have Perl installed: using makeglossaries requires Perl, and this is not standard on Windows. So I'll give instructions for both cases.

First, from the Edit menu choose Preferences, then the Typesetting tab. By the 'Processing Tools' section, click the + to create a new entry, and name it 'makeglossaries'. What you do now depends on whether you have Perl installed.

If you do have Perl, then put makeglossaries in the 'Program' box and click the + to add an argument. This needs to read $basename. You can then OK everything, and test that it works. Without Perl available, the entries need to be slightly different. Put makeindex in the 'Program' box, and click the + four times: we need four arguments. These should read • -s$basename.ist
• -t $basename.glg • -o$basename.gls
• $basename.glo Again, OK everything and then test. It may be possible to use the later approach directly with texify, but I would favour installing Perl if necessary (Strawberry is my favourite Perl for Windows) and using that approach. - I was also looking for a way to make glossaries work with TeXworks (and XeLaTeX in my case). # The short answer You can define a new processing tool in TeXworks by Edit > Preferences > Typesetting tab > Processing tools. Click on the + to give it a name like “makeglossaries”. Under “Program” simply enter makeglossaries and as arguments add one by clicking on + and enter $basename. See also the screenshot below:

You can then process your tex file by using the following tool sequence from within TeXworks.

• pdfLaTeX (or XeLaTeX or …)
• makeglossaries
• pdfLaTeX (or one of the alternatives) again

# Some more details

I have Perl installed and the PATH variable adjusted accordingly, so that the xindy option of glossaries can be used by providing the corresponding option to the usepackage command. (see e.g. glossaries Beginner's guide).

\usepackage[xindy]{glossaries}
\makeglossaries


Here I also added the commands for the creation of the glossary (which should come before the entry definitions).

The glossary is created at the desired position in the document by

\printglossaries


If I understand it correctly, glossaries uses the language setting of the document to sort the glossary. So this definition should come before glossaries is loaded. I used:

\usepackage{polyglossia}
\setdefaultlanguage{german}


To test this setup I recommend testing it first with a manual call to makeglossaries on the command line (Perl is required for this.) (for a file “test.tex”):

xelatex test
makeglossaries test
xelatex test


The following minimal example should give the output below:

\documentclass{article}

\usepackage[xindy]{glossaries}
\makeglossaries

\newacronym{ccd}{CCD}{Charge-coupled device}
\newacronym{abc}{ABC}{the alphabet}
\newacronym{foo}{foobar}{the mighty Foo}

\begin{document}

\printglossaries

\gls{abc} \gls{foo} \gls{ccd}

\end{document}


-