I am using glossaries to maintain a list of acronyms.

I want it to display the page number where it appears.

I usually use \acs{} or \acl{} in sectioning title or in caption.

However I noticed that glossaries also displays the page of TOC, LOF or LOT if I use \acs{} or \acl{} inside \section{} or \caption (as this entries will appear in TOC, LOF, or LOT).

How can I disable this behavior of glossaries and only consider what is really the text, there is, not consider what is written in TOC, LOF, or LOT?




\acro{MIMO}{Multiple Input Multiple Output}
\acro{SISO}{Single Input Single Output}







\section{\acs*{MIMO} and \acs*{SISO}}



If I take the previous code and do:

pdflatex test
makeglossaries test
pdflatex test
makeglossaries test
pdflatex test

The output is in the attached file. Note that the second makeglossaries runs automatically because I also have biber. If the second makeglossaries does not run, everything is ok.

Output file

Is there a way to prevent this and allow the run of second \makeglossaries?

  • I would like to help, but don't have xindy. Can you make an example without it? Maybe this already helps you: try \texorpdfstring. – bodo Jul 24 '12 at 20:13
  • To use the previous example without xindy just remove it from the glossaries options: \usepackage[section,nomain,acronym,toc,shortcuts]{glossaries} I also used \texorpdfstring but it only takes care of bookmarks and not the text itself. – cacamailg Jul 25 '12 at 11:54

The glossaries package provides \glsentry<field> commands that do nothing but expand to the <field> value. Thus, try:

\section{\glsentryshort{MIMO} and \glsentryshort{SISO}}

Alternatively, you could try:

\section[\glsentryshort{MIMO} and \glsentryshort{SISO}]{\acs*{MIMO} and \acs*{SISO}}
  • This does the trick. At least part of it. However I am also trying to keep some compatibility with acronym package in a way that with the same list of acronyms I can use either packages. Thus if I have a flag=true I will use glossaries else I will use acronym. Therefore I need to build two new commands (for short and long versions) for each of the packages that display the acronym in the table but does not hyperlink it. These commands will only be used inside \caption{} or \section{}. Example: \newcommand{\acsnh}[1]{\glsentryshort{#1}\glsadd{#1}}. But I don't now about acronym. – cacamailg Jul 25 '12 at 13:19
  • @user16720: If you use \acsnh in the argument of \section you’ll have the same problem as before. – mhp Jul 25 '12 at 13:43
  • @user16720: I’ve added an alternative solution. – mhp Jul 25 '12 at 19:02
  • I tried to use \caption{This section is about \glslink*{MIMO}{\glsentryshort{MIMO}} with no luck. It seems that there is no way instead of using \glsadd{} outside \caption{} or \caption[]{}. – cacamailg Jul 26 '12 at 14:45
  • @cacamailg: \caption is to be treated analogously to \section: Thus, either \caption{\glsentryshort{MIMO}}\glsadd{MIMO} or \caption[\glsentryshort{MIMO}]{\acs*{MIMO}}. – mhp Jul 27 '12 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.