I'm trying to produce a list of symbols for my PhD thesis including a column with the units of the symbols. Therefore, I used the latex code provided in the following link: glossaries: add additional column for units.
Minimum Working Example (MWE):
\documentclass[11pt, pdftex]{scrreprt}
% ---- packages: ---------------
\usepackage[LGR,T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{substitutefont}
\usepackage{newtxtext}
\usepackage{newtxmath}
\substitutefont{LGR}{\rmdefault}{Tempora}
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage[pdftex]{hyperref}
\usepackage[
nogroupskip,
acronym,
nomain,
nopostdot,
sort=standard,
automake,
xindy,
]
{glossaries-extra}
\usepackage{glossary-longbooktabs}
\setabbreviationstyle[acronym]{long-short}
\setlength{\glsdescwidth}{18cm}
% -- new style for list of symbols: ----
\newglossarystyle{symbunitlong}{
\setglossarystyle{long3col} % base this style on the list style
\renewenvironment{theglossary}{ % Change the table type --> 3 columns
\begin{longtable}{lp{0.5\glsdescwidth}>{\centering\arraybackslash}p{2cm}}}
{\end{longtable}}
\renewcommand*{\glossaryheader}{% Change the table header
\bfseries Sign & \bfseries Description & \bfseries Unit \\
\hline
\addlinespace[7mm]
\endhead}
\renewcommand*{\glossentry}[2]{% Change the displayed items
\glstarget{##1}{\glossentryname{##1}} %
& \glossentrydesc{##1}% Description
& \glsunit{##1} \tabularnewline
\addlinespace[2mm]}
}
% --- define symbollist: ------
\newglossary[slg]{symbolslist}{syi}{syg}{List of Symbols}
% include third column in list of symbols for units:
\glsaddkey{unit}{\glsentrytext{\glslabel}}{\glsentryunit}{\GLsentryunit}{\glsunit}{\Glsunit}{\GLSunit}
\makeglossaries
\glssetcategoryattribute{acronym}{glossdesc}{firstuc}
% -------------------------------------------
% define some symbols:
\newglossaryentry{symb:lambda}{
name={\ensuremath{\lambda}},
sort={z_lambda},
description={Thermal conductivity},
unit={\si{\frac{W}{m \cdot K}}},
type=symbolslist
}
\newglossaryentry{symb:Pc}{
name={\ensuremath{P_{\mathrm{C}}}},
sort={PC},
description={Carnot power},
unit={\si{W}},
type=symbolslist
}
\newglossaryentry{symb:Qjoule}{
name={\ensuremath{\dot{Q}_\mathrm{J}}},
sort={Qjoule},
description={Joule heating},
unit={\si{W}},
type=symbolslist
}
% -------------------------------------------
% define some abbreviations:
\newacronym{acro:FCL}{FCL}{fault current limiters}
\newacronym{acro:SS}{SS}{stainless steel}
% -------------------------------------------
\begin{document}
\textbf{First page:}
\begin{itemize}
\item use of symbols \gls{symb:Qjoule} and \gls{symb:Pc}
\item use of abbreviation: \gls{acro:SS}
\end{itemize}
\newpage
\textbf{Second page:}
\begin{itemize}
\item use of symbol \gls{symb:lambda}
\item use of abbreviation: \gls{acro:FCL}
\end{itemize}
\newpage
% ---- list of symbols: -------
\printglossary[type=symbolslist, style=symbunitlong]
% ---- list of abbreviations: -------
\printglossary[title={List of Abbreviations}, type=acronym, style=listdotted]
\end{document}
It works so far (see MWE above), but now I intend to add a fourth column which indicates the first appearance/page of definition of the symbols. The final, desired state of my list of symbols should look like it is shown in the following screenshot:
And I just want to display the page number of the page where the respective symbol occurs for the first time in the text, not every page number where it is used. But unfortunately, I don’t really know how to do that and what I have to add in my defined glossary style.
Thank you very much for your help!
Edit:
I'm wondering if the question is not clear and I wasn't able to point out my problem or if it's just not possible to realize the intended thing and to add a fourth column which indicates only the first appearance/page of definition of the symbols.
Considering the related questions to my question, I suppose that the package option "indexonlyfirst" could help, but I don't know how to integrate that in detail.