I want to add an list of acronyms that I can reference to continously in the text.
Say if I write in the glossary \newacronym{ny}{NY}{New York} NY will appear in the document when I type \gls{ny}.
I have the following code in the preamble:
\usepackage[acronym]{glossaries}
\makeglossaries
And inside the document where i want to place the list i type:
\printglossary[type=\acronymtype,title=Acronyms]
\newacronym{ny}{NY}{New York}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un}{UN}{United Nations}
But only NY appears in the acronym list and it has a 1 after it:
NY New York. 1
But i want it to be:
NY New York
Neither LA nor UN appears in the list even if I write them in the text. Can someone explain why this is happening?
Complete code:
\documentclass{article} % Load the package
\usepackage[acronym]{glossaries}
\makeglossaries
\begin{document}
\printglossary[type=\acronymtype,title=Acronyms]
% abbreviations:
\newacronym{ny}{NY}{New York}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un} {UN}{United Nations}
\gls{ny}
\end{document}


\newacronymafter\printglossary, however. Better define the acronyms in the preamble! – Apr 28 '16 at 21:13% Load the package \usepackage[acronym]{glossaries} \makeglossaries
\begin{document}
\printglossary[type=\acronymtype,title=Acronyms]
% abbreviations:
\newacronym{ny}{NY}{New York} \newacronym{la}{LA}{Los Angeles} \newacronym{un}{UN}{United Nations}
\gls{ny}
\end{document}
– Bob1990 Apr 28 '16 at 21:22\gls{LA}and\gls{un}-- unless you specify\glsaddallonlynywill be printed. – Apr 28 '16 at 21:41\printglossaryis between\newacronymand\gls. Might be a misprint though, consider investigating on that. (If it's even still relevant, anyway.) – Egor Hans Apr 10 '20 at 07:39