# Single acronym not being displayed in glossary

Bit of an odd one, I have a glossary that is printing out my glossary and acronyms using the command \printglossaries. This works fine mostly for every single acronym apart from one. The Acronym in question appears in the Acknowledgements which is created using the following:

\renewcommand{\abstractname}{Acknowledgements}
\begin{abstract}
%Lots of text
\acrfull{FX}
\end{abstract}


I'm having to do the renew as I've already create an abstract before. I was informed this was the best way to create an abstract and acknowledgments page in a report style document. The funny thing is that the acronym works fine here and is displayed correctly as I refer to it in the glossary. However, it doesn't appear in my glossary like my other acronyms do.

\newacronym{FX}{FX}{Long text here}
\newacronym{IDE}{IDE}{Integrated development envrionment}


On the creation of the PDF, IDE appears as it's elsewhere in the document, but FX doesn't as it's only being created in the acknowledgements. Is this a known feature? If so, is there any way to force the \printglossariescommand to print that single entry?

One other thing to know is that the acknowledgment is on an unnumbered page. Could that also be affecting it?

[EDIT] This is a minimum version that has the issue

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{minitoc}
\usepackage[acronym,section]{glossaries}
\newacronym{FX}{FX}{Some text}
\newacronym{IDE}{IDE}{Integrated development envrionment}
\makeglossaries

\begin{document}
\pagenumbering{gobble}
\printglossaries
\begin{abstract}
Some blurb
\end{abstract}
\renewcommand{\abstractname}{Acknowledgements}
\begin{abstract}
\acrfull{FX}
\end{abstract}
\pagenumbering{arabic}
\dominitoc
\tableofcontents
\chapter{Test}
\section{This is a test}
\acrfull{IDE}
\end{document}


 Added in Roman style page numbering

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{minitoc}
\usepackage[acronym,section]{glossaries}
\newacronym{FX}{FX}{Some text}
\newacronym{IDE}{IDE}{Integrated development envrionment}
\makeglossaries
\begin{document}
\pagenumbering{roman}
\printglossaries
\begin{abstract}
Some blurb
\end{abstract}
\renewcommand{\abstractname}{Acknowledgements}
\begin{abstract}
\acrfull{FX}
\end{abstract}
\pagenumbering{arabic}
\dominitoc
\tableofcontents
\chapter{Test}
\section{This is a test}
\acrfull{IDE}
\end{document}


That causes the glossary to gain a page number, but neither of the abstracts do. I've tried using \pagestyle{plain} and \pagenumbering{roman} both before and after the \begin{abstract}, but both abstracts are printed without a page number

• \pagenumbering{gobble} is the culprit! – user31729 Apr 14 '16 at 14:12
• At the moment I don't know why the gobble feature causes this. I'll check. – user31729 Apr 14 '16 at 14:15
• Apparently, glossaries does not print the item if the page number slot is empty. The easiest way to bypass this is replacing \pagenumbering{gobble} with \pagestyle{empty} for the abstracts and afterwards using \pagestyle{plain} (or whatever page style needed) – user31729 Apr 14 '16 at 16:14
• @ChristianHupfer It's makeindex that's rejecting the entry. The makeindex transcript for the provided MWE contains 2 entries accepted, 2 rejected. The log (.alg) file contains Illegal page number. – Nicola Talbot Apr 14 '16 at 17:40
• @ChristianHupfer I'm not sure. The problem is that if there's no associated page number, the location list will have a blank element, which will look a bit weird. If the page number is merely hidden with \pagestyle{empty}, the location in the glossary will confuse the reader. For example, if it appears as 2, then the reader will expect that to refer to page 2 of the main matter. It would be better to have roman numbering pages in the front matter with \pagestyle{empty} in the abstract. That should give the reader a better clue. Or just use a non-indexing command in the abstract. – Nicola Talbot Apr 14 '16 at 18:54

To summarise the comments, the original problem (using @gobble as a page style) stems from makeindex not excepting a blank location. Using an empty page style to suppress the page numbering instead will satisfy makeindex but will confuse readers who try to look up the location's entry list since they might have trouble identifying the referenced page number.

Instead, we can make use of makeindex's page encapsulation mechanism. This means providing a command that takes an argument, which is the location supplied by makeindex when it processes the source index files. With the normal \index, this encapsulation command is provided after the encap character (usually |) by supplying the command name without the initial backslash (for example, \index{word|textbf}). With the glossaries package, this is supplied in the value of the format key.

So we can provide a command that displays a word or phrase (such as the section title) that can be used as a reference in the location list. This command has to take an argument (the page number) but this argument can be discarded.

For example:

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{minitoc}
\usepackage[acronym,section]{glossaries}

\makeglossaries

\newacronym{FX}{FX}{Some text}
\newacronym{IDE}{IDE}{Integrated development envrionment}

\newcommand*{\ackloc}[1]{Acknowledgements}

\begin{document}
\printglossaries

\begin{abstract}
Some blurb
\end{abstract}
\renewcommand{\abstractname}{Acknowledgements}
\begin{abstract}
\acrfull[format=ackloc]{FX}
\end{abstract}

\pagenumbering{arabic}
\dominitoc
\tableofcontents
\chapter{Test}
\section{This is a test}
\acrfull{IDE}
\end{document}


The result appears as follows: