[Tex/LaTex] Has anyone managed to use \glossaries with TeXstudio on Windows

glossariesmiktextexstudiowindowsxindy

As a new LaTeX user, I have spent some time configuring my system and ironing the usual start-up mistakes. So far, I've been able to compile several documents with indices, graphics, etc. but now I'm trying to add a glossary and I'm absolutely and deeply confused.

I seem unable to make the \glossaries (with xindy) package work on my TexStudio/Windows 8 – MikTeX 2.9 machine so any help or orientation will be much appreciated.

Update:

Xindy seems to be working, now the question is WHAT TO DO NEXT

Xindy working on Windows 8.1

Now I am trying this MWE:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage[xindy]{glossaries}

\author{author}
\title{title}

\begin{document}

test la \gls{IG} es vital en la protección del ternero hay 5 tipos de \glspl{IG}

\newacronym[longplural=Inmunoglobulinas]{IG}{IG}{Inmunoglobulina}

\makeglossaries

\end{document}

and the errors on my build result are

  • on pdfLaTeX

    line 21: Can be used only in preamble. \makeglossaries
    : \makeglossaries hasn't been used,the glossaries will not be updated.
    : No \printglossary or \printglossaries found.

  • on Makeglossaries command

    Process started: "C:/Program Files (x86)/MiKTeX 2.9/miktex/bin/makeglossaries.exe" "texstudio_B11540"

    makeglossaries version 2.12 (2014-01-20)
    added glossary type 'main' (glg,gls,glo)

    No \@istfilename found in 'texstudio_B11540.aux'. Did your LaTeX run fail? Did your LaTeX run produce any output? Did you remember to use \makeglossaries?

    Process exited with error(s)

What Finally Worked

I followed this path:

  1. Installed MiKTeX latest version and updated it
  2. Downloaded xindy-win.exe and installed it with all the default options
  3. Configured TeXstudio as per Khumar's indications with one difference: On Options>Configure...>CommandsTexindy i used "C:/Program Files (x86)/xindy/miktex/bin/texindy.exe" %.idx

and now seems to be working!

Best Answer

First ensure that xindy works with your distribution.

Even though an entry exists for Make Glossaries in the build window (see figure below), it doesn't appear under the Commands of Tools menu:

enter image description here

There is no short cut available too. If somebody knows how to make use of this please feel free to edit the answer.


Alternative

You can define a user command:

Go To OptionsConfigure TeXstudio. In the window that opens do the following:

  1. Choose Build and click.

  2. Click Add under User Commands

  3. Fill : user1: Make Glossaries and "C:/Program Files/MiKTeX 2.9/miktex/bin/makeglossaries.exe" %. You can browse to the exe file also. Note that the path may be different for you. Don't forget the % at the end.

  4. Press OK and come out

Now you will have a user menu for Make Glossaries with a short cut:

enter image description here

Now you can pdflatex Make Glossaries and pdflatex.

enter image description here

Happy Glossing :)


Additional note:

As noted by Speravir, you have to specify "texindy.bat" %.idx instead of texindy.exe %.idx as in the following window.

enter image description here

Edit:

There were some errors in your code. Try this:

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}

\usepackage[acronym,nomain,xindy]{glossaries}

\makeglossaries

\author{author}
\title{title}

\newacronym[longplural=Inmunoglobulinas]{IG}{IG}{Inmunoglobulina}

\begin{document}

test la \gls{IG} es vital en la protección del ternero hay 5 tipos de \glspl{IG}

\printglossaries

\end{document}

enter image description here