There are various methods. First is to use nonumberlist
(either as a package option or in \printglossary
) in combination with \glsaddall
(which must be used after all acronyms have been defined).
For example:
\documentclass{article}
\usepackage{graphics}
\usepackage[acronym,nonumberlist]{glossaries}
\makeglossaries
\newacronym{ac1}{ac1}{acronym 1}
\newacronym{ac2}{ac2}{acronym 1}
\glsaddall
\begin{document}
\gls{ac1}.
\begin{figure}
\centering
\includegraphics{example-image}
\caption{A Figure}
\end{figure}
\printglossaries
\end{document}
This omits all page numbers and includes all entries.
The second method doesn't use nonumberlist
or \glsaddall
but instead uses \glsaddallunused
. This command must go at the end of the document:
\documentclass{article}
\usepackage{graphics}
\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{ac1}{ac1}{acronym 1}
\newacronym{ac2}{ac2}{acronym 1}
\begin{document}
\gls{ac1}.
\begin{figure}
\centering
\includegraphics{example-image}
\caption{A Figure}
\end{figure}
\printglossaries
\glsaddallunused
\end{document}
This displays the page list for ac1
which has been used in the document, but not for ac2
.
For the third method, let's suppose ac2
is displayed in the image. Instead of using \glsaddallused
, you can index ac2
next to the image. Like this:
\documentclass{article}
\usepackage{graphics}
\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{ac1}{ac1}{acronym 1}
\newacronym{ac2}{ac2}{acronym 1}
\begin{document}
\gls{ac1}.
\begin{figure}
\centering
\includegraphics{example-image}\glsadd{ac2}
\caption{A Figure}
\end{figure}
\printglossaries
\end{document}
This doesn't display any text next to the image, but it does index ac2
, which means that ac2
now appears in the acronym list with the page number on which the image appears.
\glsaddall
nonumberlist
option to prevent the page list from showing or use\glsadd{label}
next to\includegraphics
for each acronym shown in the figure to include the page.\glsaddallunused
and\printglossary[type=\acronymtype, nonumberlist]
. Update: At first I used\glsaddall
, but it didn' work. I don't know why. But now it seems both\glsaddall
and\glsaddallunused
could work.