[Tex/LaTex] glossaries: list of symbols, first appearence in text

acronymsglossariesliststext;

I followed this answer to add a seperate list of symbols, besides my acronym list and general glossary:
glossaries: How to customize list of symbols with additional column for units?

As a first appearence in text I would like to see Absolute Humidity (AH), and the next appearences only AH, but when I add

    first={Absolute Humidity (AH)}

to the code, it just ignores it. Adding text={Absolute Humidity (AH)} works, but then all my references are in this long variant. I refer to it as in the code below in my main.tex

\documentclass[a4paper,10pt,twoside]{report}
\usepackage[acronym,nopostdot,toc,section=chapter]{glossaries}
\newglossary[slg]{symbolslist}{syi}{syg}{Symbolslist} % create symbolslist
% Glossary settings
\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}
\makeglossaries
\loadglsentries{glossary}
\newglossarystyle{symbunitlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
    \begin{longtable}{p{2cm}p{10.92cm}p{2cm}}}%
    {\end{longtable}}%
\renewcommand*{\glossaryheader}{%  Change the table header
    \bfseries Sign & \bfseries Description & \bfseries Unit \\
    \hline
    \endhead}
\renewcommand*{\glossentry}[2]{%  Change the displayed items
    \glstarget{##1}{\glossentryname{##1}} %
    & \glossentrydesc{##1}% Description
    & \glsunit{##1}  \tabularnewline
    }
}

\begin{document}
In text reference of first appearance of the term \gls{AH}, second appearence \gls{AH}.
    %Print the glossary
    \glsaddall
    %\printglossaries % print all in default values
    \printglossary[type=\acronymtype, style=list, nonumberlist] % prints just the list of acronyms
    \printglossary[type=symbolslist, style=symbunitlong]   % list of symbols
    \printglossary[style=altlist,nonumberlist ] % if no option is supplied the default glossary is printed.

\end{document}

my glossay.tex file looks like this

    \newglossaryentry{AH}{type=symbolslist,
    name={AH},
    description={Absolute Humidity.},
    unit={$g/m^3$}}

How can I solve this?

Best Answer

This is the simplest method (given that AH is essentially an abbreviation):

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

\usepackage[acronym,nopostdot,toc,section=chapter,acronymlists={acronym,symbolslist}]{glossaries}

\newglossary[slg]{symbolslist}{syi}{syg}{Symbolslist} % create symbolslist

% Glossary settings

\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}

\makeglossaries

\setacronymstyle{long-short}

\newglossarystyle{symbunitlong}{%
\setglossarystyle{long3col}% base this style on the list style
\renewenvironment{theglossary}{% Change the table type --> 3 columns
    \begin{longtable}{p{2cm}p{10.92cm}p{2cm}}}%
    {\end{longtable}}%
\renewcommand*{\glossaryheader}{%  Change the table header
    \bfseries Sign & \bfseries Description & \bfseries Unit \\
    \hline
    \endhead}
\renewcommand*{\glossentry}[2]{%  Change the displayed items
    \glstarget{##1}{\glossentryname{##1}} %
    & \glossentrydesc{##1}% Description
    & \glsunit{##1}  \tabularnewline
    }
}

\newacronym[type=symbolslist,unit={$g/m^3$}]{AH}{AH}{Absolute Humidity}


\begin{document}
In text reference of first appearance of the term \gls{AH}, second
appearence \gls{AH}.

    %Print the glossary

    \glsaddall
    %\printglossaries % print all in default values
    \printglossary[type=\acronymtype, style=list, nonumberlist] % prints just the list of acronyms
    \printglossary[type=symbolslist, style=symbunitlong]   % list of symbols
    \printglossary[style=altlist,nonumberlist ] % if no option is supplied the default glossary is printed.

\end{document}

In text reference of first appearance of the term Absolute Humidity (AH), second appearence AH.