# Using glossaries in Texlipse

Is there a way of adding a glossary using the glossaries package in Texlipse?

%%% GLOSSARIES
\usepackage[xindy]{glossaries}
\makeglossaries

\begin{document}

\newglossaryentry{A}{name=area,description={Area}}
\printglossaries

Text Text Text

\end{document}


(I have installed Perl as I am on a windows system (as per the documentation) but that doesn't seem to have changed anything...unless I missed some key part!)

-
You have to run the makeglossaries script after the LaTeX run and run LaTeX again. This can be conveniently done via latexmk or simply by a shell command. –  egreg Mar 4 '12 at 16:27

I spent some time fiddling with this, and finally made it work. The instructions should be platform-independent, but for reference, this is on Eclipse 3.7.2/Texlipse 1.5.0/Win7 x64/MikTeX 2.9. I opted out of using the makeglossaries script since Perl is not usually found on Windows systems, and I had some issues with the script when the directories of the input and output files were not the same. makeindex should work well enough.

1. Specify a place for the temporary/auxiliary files created by glossaries

• In Eclipse, go to Window->Preferences->Texlipse->Builder Settings->Latex Temp Files

• Add the following glossaries-specific extensions: .ist, .gls, .glg and .glo

This will move the temp files to the tmp directory after each build so they don't get in the way. This is kind of optional and you can make do without it, but it keeps your source directory clean.

2. Create a new make glossaries external tool configuration:

• Go to Run->External Tools->External Tools Configurations... and create a new configuration. Name it any way you want.

• In "Location" field, use the path to the makeindex command.

• In "Working directory", use ${project_loc}\tmp. This is project-independent, so you won't have to update it for each new project. • In "Arguments", use the following: -q -s${project_name}.ist -t ${project_name}.glg -o${project_name}.gls ${project_name}.glo Add any relevant makeindex customizations as necessary. I used the -q flag to suppress printing the log messages to the console in Eclipse, but you can take it out for debugging purposes. 3. Run the glossaries after every build: • Open your project and go to Project->Properties->Builders • Choose Import... and select the builder we just made. • Go to Edit... for the builder and then go to Build Options. • Check Launch in background, During manual builds and During auto builds. • Uncheck After a "Clean" and During a "Clean". • Leave the rest as they are. If your main .tex file is named differently from your project, then replace all references to ${project_name} in the "Arguments" section appropriately (do this for the imported builder, not for the external tool, naturally). Don't bother creating a new variables, this will only apply to your current project anyway so just hard-code them and call it a day.

You might have to build twice for the references to appear, since the tool is only executed after each build, and you'd need another one for them to appear. This is similar to the way you do this manually -- you'd need another call to {pdf}latex after you have executed makeindex.

-
There's a possibility that I might have missed a step since I tried a lot of things until I made it work. If so, please let me know and I'll edit in what's missing. –  Martin Tapankov Apr 19 '12 at 10:28
Perhaps you can add a comment about running multiple times the pdflatex command. –  CSchulz Aug 27 '12 at 8:51