# How to make glossaries in output?

This is my sample script. I want to print glosssaries. I am trying to do that but nothing gets printed. I am using

\documentclass[oneside,12pt]{report}
\usepackage[acronym]{glossaries}
\makeglossaries
\newglossaryentry{electrolyte}{name=electrolyte,%
description={solution able to conduct electric current}}

\newacronym{svm}{SVM}{support vector machine}

\begin{document}

\printglossary[type=acronym]
\printglossary

\chapter{\textbf{Background}}

\end{document}


Now I hope that this script works. I minimized the whole script to the point of problem. I compiled this..no glossaries are printing to my document..fortunately i can see them in .glo file..My command to execute the file is latexmk -pdf filename.tex..I included the following code in .latexmk file..

add_cus_dep('glo', 'gls', 0, 'makeglossaries');

sub makeglossaries {
system "makeglossaries $_[0]"; if ( -z "$_[0].glo" ) {
open GLS, ">\$_[0].gls";
close GLS;
}
return 0;
}


My .glo file contents:

\glossaryentry{electrolyte?\glossaryentryfield{electrolyte}{\glsnamefont{electrolyte}}{solution able to conduct electric current}{\relax }|setentrycounter[]{page}\glsnumberformat}{2}
\glossaryentry{electrolyte?\glossaryentryfield{electrolyte}{\glsnamefont{electrolyte}}{solution able to conduct electric current}{\relax }|setentrycounter[]{page}\glsnumberformat}{2}


My .acn file contents:

\glossaryentry{SVM?\glossaryentryfield{svm}{\glsnamefont{SVM}}{support vector machine}{\relax }|setentrycounter[]{page}\glsnumberformat}{2}
\glossaryentry{SVM?\glossaryentryfield{svm}{\glsnamefont{SVM}}{support vector machine}{\relax }|setentrycounter[]{page}\glsnumberformat}{2}


Now, I hope i get some response..tack..

-
Your example doesn't compile without errors here. It loads e.g. local graphic files. Also it is much too long and contains tons of commands not relevant for your problem. –  Ulrike Fischer Feb 2 '12 at 15:40
No, I will not save the image. The image is irrelevant to the problem, so it is up to you to remove the reference (and a lot more) from your code. You sent more than 400 lines of code where at most 30 lines have to do with the glossaries. Remove all the unnessary lines. This will it make much easier for you and other to see the source of your problem. Btw: If nobody force you to use this template, don't do it. Start with a small document and add packages and code only one by one when the need arises. –  Ulrike Fischer Feb 2 '12 at 16:07
Please have a look at what is expected as a MWE to illustrate the problem. Start with what you have and remove items and see if the problem is still produced. Keep going until you have removed as much of it as possible. I am pretty sure this has nothing to do with the image, but on the off chance it does use \usepackage[demo]{graphicx}, then the actual image file won't be needed for others to compile. And ensure you have \printgloassary somewhere. –  Peter Grill Feb 2 '12 at 16:17
I can see straight away that it can't work like this! You are using the nomencl package, but the makeglossaries script is part of another package -> glossaries that you are using as well. You are mixing the packages which may not be a good idea, but mainly you seem to miss a call of makindex for nomencl to work. Check the documentation of nomencl and see how this is done. My advise would be to chose 1 package only. As it seems you need more than 1 list, the glossaries package is best –  Martin H Feb 2 '12 at 16:20

So the problem is in how you process the file. I personally use TeXShop and a script similar to that recently posted at: makeglossaries hangs waiting for input on mac. For adapting latekmk you should refer to How to make Latexmk use makeglossaries?