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?
2 Answers
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.
- 259,911
- 34
- 706
- 1,036
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(orXeLaTeXor …)makeglossariespdfLaTeX(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}
- 167
-
For TeXworks version 0.6.2 (and possibly others) the non-Perl
makeindexanswer above needs a slight modification: *-s$basename.ist-t$basename.glg-o$basename.gls$basename.gloI suspect TeXworks assumes-s $basename.istis a Windows file with a space in the name.


glossariesv4.16, if you don't have Perl installed you can use the Lua scriptmakeglossaries-liteinstead. (Both the Perlmakeglossariesand the Luamakeglossaries-litescripts read the.auxfile to determine the settings to pass to makeindex and how many times makeindex should be called.) – Nicola Talbot Feb 01 '19 at 18:15