1

I would like to exclude the Table of Contents and Glossary itself from the page numbers that appear attached to each acronym indicating the pages where the entries have been used.

If this cannot be done, I would like to correct the number referring to the glossaries itself since as it can be seen in the picture, it should be 59 instead of 58. It refers to the first page of acronyms although the acronym is not in the first page.

enter image description here

Here you have an example of my code:

\documentclass[12pt,a4paper,twoside]{report} 

\usepackage{hyperref}  %hyperref bf glossaries
\usepackage[acronym,numberedsection,toc]{glossaries}

\makeglossaries

\newacronym{nrt1}{NRT}{Near-Real-Time}
\newacronym{avhrr1}{AVHRR}{Advanced Very High Resolution Radiometer}
\newacronym{eumetsat1}{EUMETSAT}{European Organization for the Exploitation of Meteorological Satellites}
\newacronym{npp1}{NPP}{National Polar-orbiting Partnership}
%etc

\begin{document}
%acronyms are cited here using \acrshort{}, \acrfull{}...

\glsaddall\printglossaries

\end{document}
  • If you don't want the acronyms to appear in the TOC, don't use commands like \gls or \ac in chapter/section headings. P 58 is included in the list of acronyms because you've referenced them all on page 58 via \glsaddall. Try removing it or replacing it with \glsaddallunused. – Nicola Talbot Jun 30 '14 at 11:38
  • Thank you Nicola. If I do not cite the abbreviations in the headings, their TOC pages will not appear but either the pages in the document where the abbreviations (without commands) are in the headings. Removing \glsdall solves what you say, so one problem less to solve. – joseignacio Jun 30 '14 at 13:37
  • Your example code doesn't reproduce your problem. Can you produce a proper minimal working example (MWE) with example text that replicates the problem. – Nicola Talbot Jun 30 '14 at 17:47
  • \section[title for toc without acronyms]{title for heading with acronyms}? – cfr Jul 1 '14 at 0:08
  • @cfr Do you want to convert your comment into an answer? – Nicola Talbot Dec 21 '15 at 15:27
2

Since you didn't post a proper minimal example of the problem, it isn't easy to diagnose the problem. However, it seems that a combination of the following solved it:

As Nicola notes, if you use commands such as \gls or \ac in the main argument to section headings, and don't supply an alternate title for the contents etc., then those commands will also be used in the contents and the relevant page numbers added. And if you use \glsaddall, then all entries are being added at that point and the relevant page number will also be added. \glsaddallunused would be an alternative, excluding entries already used elsewhere in the document.

If you want to use \gls or \ac in a section heading, but do not want it to be added to the contents etc., then you can supply an alternative title for use in the latter cases.

\section[<title for ToC without acronyms>]{<title for heading with acronyms>}

What this does is uses the first, optional argument in the table of contents etc. and the second, mandatory argument for the title of the section itself in the body of the document. This just uses the standard LaTeX command

\section[<title for ToC etc.>]{<Title for heading in body of document>}

If you don't specify the optional argument, LaTeX uses the second argument in the ToC etc. as well. Otherwise, it uses the optional one.

So any time you want something different in the ToC from what you want as the heading in the document itself, just use the optional argument to specify a different value for the former.

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.