In my thesis, I have used glossaries package to define my acronyms.
Everything works fine, except that I discovered the \gls{} commands
within \caption of a figure are not typeset in LoF. The text part of
the caption prints with no problem, but the acronym is basically
ignored. I have protected all the \gls commands within caption
commands. Also, if it matters, I am using caption and subfigure
packages.
I would appreciate if you can give me a solution for this problem.
Best,
Hooman Javidnia
Do you get any error messages? Can you provide a minimal example? You
need to be careful using acronyms in captions. Do you want them to get
expanded in the list of figures? If you use \gls in a caption, they will
be marked as used in the list of figures. By the time you use them in
the text, they will already have been expanded so you'd have to remember
to unset them all after the list of figures. It's better to provide an
alternative using the optional argument. For example:
\documentclass{article}
\usepackage{glossaries}
\newacronym{sample}{sa}{sample acronym}
\begin{document}
\listoffigures
\begin{figure}[hb]
\caption[\acrfull{sample}]{\protect\gls{sample}}
\end{figure}
\end{document}
(or replace \acrfull with \acrshort or \acrlong as appropriate.)
Remember that the acronyms will need to be defined before the list of
figures.
Regards
Nicola Talbot
--
Home: http://theoval.cmp.uea.ac.uk/~nlct/
LaTeX Related Information: http://theoval.cmp.uea.ac.uk/~nlct/latex/
Creating a LaTeX Minimal Example:
http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/