1

Please consider the following example from this question (Method 3):

\documentclass{article}

\usepackage[colorlinks]{hyperref}
\usepackage[symbols, nogroupskip]{glossaries-extra}

\makenoidxglossaries

\glsxtrnewsymbol[description={position}]{x}{\ensuremath{x}}
\glsxtrnewsymbol[description={velocity}]{v}{\ensuremath{v}}
\glsxtrnewsymbol[description={acceleration}]{a}{\ensuremath{a}}
\glsxtrnewsymbol[description={time}]{t}{\ensuremath{t}}
\glsxtrnewsymbol[description={force}]{F}{\ensuremath{F}}

\begin{document}

\tableofcontents
\printnoidxglossary[type=symbols,style=long,title={List of Symbols}]

\section{Sample}
Reference symbols: $\gls F$, $\gls{t}$, $\gls{x}$, $\gls{v}$, $\gls{a}$.

\end{document}

I've tried to define a new symbol containing \operatorname via \glsxtrnewsymbol[description={foo}]{\operatorname{foo}}{\ensuremath{\operatorname{foo}}} and received the compiler error missing \endcsname inserted.

0xbadf00d
  • 511
  • Er, the second argument should be a string. With \glsxtrnewsymbol[description={operator}]{foo}{\ensuremath{\operatorname{foo}}} and \gls{foo} I get the expected output and no error. – egreg Sep 15 '19 at 16:21
  • @egreg Ah, I think I misunderstood how things work here. Am I correct that I don't use the actual symbol sequence \operatorname{foo}) in the article, but the sequence in the first parameter given in \glsxtrnewsymbol (foo)? – 0xbadf00d Sep 15 '19 at 17:14
  • @egreg I've included the hyperref package, but the page reference in the list of symbols is not clickable, unless I also add \usepackage[colorlinks]{hyperref}. However, I don't want that the links are colored red. Moreover, can I remove the link in the symbol occurrence in the article to the list of symbols? I only want the link to the page in the list of symbols. – 0xbadf00d Sep 15 '19 at 19:11
  • If you don't want colored links, remove the colorlinks option. I get working links. – egreg Sep 15 '19 at 19:38

0 Answers0