0

I am using the glossary to make a listing of symbols in my file, but I got the following problem: some times symbols appear in the text with very specific arguments, one example is the following:

$$\bigsqcup_{t \in \mathbb{R}} A_t$$ 

But when appearing in the glossary I would like this to appear as:

$$\bigsqcup_{x \in X}$$

with a generic element $x$ and set $X$.

I have tried to do this by putting the \gls call into a \phantom command, i.e. $\phantom{\gls{disuni}}$ and removing the occupied space with \hspace*, but this doesn't generate a entry in the glossary, I have also tryied changing the color of the \gls to white with \changecolor{white} and removing the occupied space again with \hspace*, but because \gls appears to generate a link, in my file this link is made blue, so the \changecolor{white} has no effect in practice.

Here is a MWE:

\documentclass[11pt, a4paper, english,sumario=tradicional]{abntex2}
\usepackage{amsmath,empheq}
\usepackage{amssymb}
\usepackage{color}

\hypersetup{ %pagebackref=true, pdftitle={@title}, pdfauthor={@author}, pdfsubject={\imprimirpreambulo}, pdfcreator={LaTeX with abnTeX2}, pdfkeywords={abnt}{latex}{abntex}{abntex2}{trabalho acadêmico}, colorlinks=true, % false: boxed links; true: colored links linkcolor=blue, % color of internal links citecolor=blue, % color of links to bibliography filecolor=magenta, % color of file links urlcolor=blue, bookmarksdepth=4 }

\usepackage[symbols,nogroupskip,sort=use,automake]{glossaries-extra}

\makeglossaries

\begin{document}

$$ \bigsqcup_{t \in \mathbb{R} } \newglossaryentry{disun}{name={\ensuremath{\bigsqcup\limits_{x \in X} }},sort={disun},description={ Disjoint union indexed by $X$ $\hspace{0.3pt}$, $\hspace{2pt}$},type={symbols}}\textcolor{white}{\gls{disun}} \hspace*{-10pt} $$

$$ \bigsqcup_{t' \in \mathbb{R} } \newglossaryentry{disuun}{name={\ensuremath{\bigsqcup\limits_{y \in Y} }},sort={disuun},description={ Disjoint union indexed by $Y$ $\hspace{0.3pt}$, $\hspace{2pt}$},type={symbols}}\phantom{\gls{disuun}} \hspace*{-10pt} $$

\printglossary[type=symbols,title={Symbols List}]

\end{document}

cfr
  • 198,882
Felipe Dilho
  • 355
  • 1
  • 7

0 Answers0