# Remove first link from list of abbreviations

I have a glossary formatted as given in the answer of @mafp which works perfectly for my purposes.

However adding this solution in my main tex file which is a thesis, in the page where the list is printed i always get a link for the appearance in the list. Is there any way to remove this first entry?

The same problem appeared in the related question of @Max, but there is no solution.

The working example @mafp gave is

\documentclass[a4paper,10pt]{article}

\usepackage{hyperref}
\hypersetup{
filecolor=magenta,
urlcolor=cyan,
}

\usepackage{glossaries}
\makeglossaries

\renewcommand{\glossarysection}[2][]{} % not to show word glossary

\newglossaryentry{A}{%
name={foo},%
description={bar},%
%user1={cm}%
}

\newglossaryentry{B}{%
name={AAPL},%
description={apples},%
%user1={box}%
}

\newglossaryentry{C}{%
name={BTR},%
%user1={LoC}%
}

\newglossaryentry{D}{%
name={BTRTIO},%
description={books to read that I own},%
%user1={shelf},%
%parent={C}
}

\newglossarystyle{aiaostyle}{%
% put the glossary in a longtable environment:
\renewenvironment{theglossary}%
{\begin{longtable}{lp{\glsdescwidth}cp{\glspagelistwidth}}}%
{\end{longtable}}%
% Set the table’s header: title row
\bfseries Term & \bfseries Description &
\bfseries Units & \bfseries Page List
% Main (level 0) entries displayed in a row optionally numbered:
\renewcommand*{\glossaryentryfield}[5]{%
\glstarget{##1}{##2}% Name
& ##3% Description
& \glsentryuseri{##1}% Units
& ##5% Page list
\\% end of row
}%
% Similarly for sub-entries (no sub-entry numbers):
\renewcommand*{\glossarysubentryfield}[6]{%
% ignoring first argument (sub-level)
\glstarget{##2}{##3}% Name
& ##4% Description
& \glsentryuseri{##2}% Units
& ##6% Page list
\\% end of row
}%
% Nothing between groups:
\renewcommand*{\glsgroupskip}{}%
}

\begin{document}
\null

\glossarystyle{aiaostyle}
\setlength{\glsdescwidth}{0.5\textwidth}
\setlength{\glspagelistwidth}{0.1\textwidth}
\printglossaries

\newpage
test entry \gls{A}.

\end{document}

I am sorry for writting a new question but i cannot comment below the solution of @mapf since this is my first appearance in TeX.SE.

• I can't compile the example since it fails due to some error in the definition of aiaostyle, but perhaps \glsdisablehyper is useful; at the moment hyperref is not loaded anyway ;-) Side note: \glossarystyle is a deprecated command, use \setglossarystyle instead, please.... and welcome to TeX.SE – user31729 Apr 18 '17 at 18:41
• Are you referring to the first number in the location list for each entry, which in your MWE is created with \glsaddall at the start of your document? – Nicola Talbot Apr 18 '17 at 19:22
• I have changed the MWE to show the effect of hyperref in many pages. But @NicolaTalbot had already answered. Can you please post this as an answer so that i can accept it? You 've been very helpful. – Christos Apr 18 '17 at 19:35
• @ChristianHupfer thanks for the notification for the deprecated command. Although it seems that in the particular example it produces an error. I 'll play around with it and maybe i will figure it out. – Christos Apr 18 '17 at 19:37