[Tex/LaTex] How to invoke makeglossaries from Texmaker

glossariesmactexmaker

I am new to LaTeX. I am using Texmaker 5.0.3 on MacOS High Sierra.

I have tried several things, they all worked (I even successfully created a list of references). But now I have troubles when I to try to add a glossary to my document.

This is main.tex:

\documentclass{article}
\usepackage{glossaries}
\makeglossaries
\loadglsentries{glossentries.tex}
\begin{document}
This is some text talking about \gls{laser} and \gls{led}. Did you know, that \glspl{led} can be used to emmit \gls{laser}-light?

Another topic is how to use a \gls{computer}.

\printglossaries %is not printing any output
\end{document}

And here is glossentries.tex:

\newglossaryentry{computer}{name=computer,description={a programmable machine}}
\newacronym{laser}{LASER}{Light Amplification by Stimulated Emission of Radiation}
\newacronym[plural=LEDs, longplural={light-emitting diodes}]{led}{LED}{light-emitting diode}

I think I have done everything right, but when I compile it (click on »Quick Build« in Texmaker) I only get this:

This is some text talking about Light Amplification by Stimulated Emission of Radiation (LASER) and light-emitting diode (LED). Did you know, that LEDs can be used to emmit LASER-light?

Another topic is how to use a computer.

But I expect also to get a list of the used terms with their explanation.

I found a LaTeX-wiki about glossaries. Quote from this wiki:

Building your document and its glossary requires three steps:

  • build your LaTeX document — this will also generate the files needed by makeglossaries
  • invoke makeglossaries — a script which selects the correct character encodings and language settings and which will also run xindy or makeindex if these are specified in your document file
  • build your LaTeX document again — to produce a document with glossary entries

Thus:

latex doc  
makeglossaries doc  
latex doc  

But how do I call makeglossaries from Texmaker? The button labeled »Quick Build« can be turned into »BitTeX«, »MakeIndex« and some other commands, but »makeglossaries« is not among the options. I think it should be there, but it isn't. And I can't find any other command in Texmaker to run makeglossaries.

I also tried the same on Windows 10. I have the same problem there.

Best Answer

First be aware that MakeGlossaries requires that Perl is on path (otherwise the call will fail) Verify whether 'makeglossaries.exe' is available on the system path by typing makeglossaries at a command prompt if you get the following

'makeglossaries' is not recognized as an internal or external command, operable program or batch file.

Then your path to TeX binaries is wrong, so fix it.
 

makeglossaries: The script engine could not be found. makeglossaries: Data: scriptEngine="perl.exe", scriptName="makeglossaries"

Then either Perl is not installed or is not on path
 

Presuming all is well then in Texmaker by far the simplest way to add a new engine is via the additional user configurations (you can have 5)

enter image description here

The first one for manual sequencing is easy just enter makeglossaries %.tex note that it may work just as well or better without the .tex

The second request to have a sequence of PdfLaTeX > makeglossaries > PdfLaTeX is a little trickier. I find it easiest to click on the wizard to add three pdfLaTeX in a row then go back and edit the |middle| one to the desired command.