[Tex/LaTex] How to add acronym list

glossaries

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} 

Best Answer

No \gls{foo} or \glsaddall → no displayed glossary entry for this key.

Use nonumberlist to suppress the page number at the end of the displayed glossary entry.

\documentclass{article}

\usepackage[acronym,nomain,nonumberlist]{glossaries}
\makeglossaries


\newacronym{ny}{NY}{New York}
\newacronym{la}{LA}{Los Angeles}
\newacronym{un}{UN}{United Nations}


\begin{document}

\glsaddall
\printglossary[type=\acronymtype,title=Acronyms]
\end{document}

enter image description here