5

I want just the opposite to this post.

Actually the idea is that in ToC, sections, chapters, etc titles the acronym is not expanded. But then the first time it is used in the text it should be expanded as the first.

Thanks.

\documentclass{amsbook}

\usepackage[acronym,nonumberlist]{glossaries}
\newacronym{MOSFET}{MOSFET}{metal-oxide semiconductor field-effect transistor}
\makeglossaries

\begin{document}
\tableofcontents
\chapter{\Gls{MOSFET}}
\printglossaries
\end{document}
jlanza
  • 1,249

1 Answers1

9

You can unset all acronyms before the table of contents and reset them all afterwards:

\documentclass{amsbook}

\usepackage[acronym,nonumberlist]{glossaries}
\newacronym{MOSFET}{MOSFET}{metal-oxide semiconductor field-effect
transistor}
\makeglossaries

\begin{document}
\glsunsetall
\tableofcontents
\glsresetall

\chapter{\Gls{MOSFET}}
\printglossaries
\end{document}
Nicola Talbot
  • 41,153
  • 1
    I'm using the acronym package and have the same problem. Is there a similar command for me to first unset all acronyms before resetting them again with \acresetall? – stefanbschneider Feb 16 '21 at 15:20