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}
\newacronym
after\printglossary
, however. Better define the acronyms in the preamble!\gls{LA}
and\gls{un}
-- unless you specify\glsaddall
onlyny
will be printed.