# Problem with List of Symbols

Hello fellows and folks!

I am having trouble when trying to put a redefined symbol: \newcommand{\MatrixVariable}[1]{\bm{\mathit{#1}}} in the list of symbols. Here is a screenshot of the error:

This is the actual code I'm using in the preamble, except the \documentclass{report} etc.

\documentclass{report}

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

\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
\printunsrtglossary[type=symbols,style=long]

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

\end{document}


Judging from your picture, I’d guess that you forgot to load the bm package and the “Undefined control sequence” message was referring to the unknown \bm command. (This is why you should prepare a minimal example which replicates your problem, not just a picture, because your code spinet complies fine.)

Try

\documentclass{report}

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

\usepackage{bm}% Is this package missing in your source file?
\newcommand{\MatrixVariable}[1]{\bm{#1}}
\glsxtrnewsymbol[description={Rating Matrix}]{MatrixVariable{R}}{\ensuremath{\MatrixVariable{R}}}

\begin{document}
\tableofcontents
\printunsrtglossary[type=symbols,style=long]

\chapter{Sample}
Reference symbols: $\gls{MatrixVariable{R}}$

\end{document}


Note that I’ve removed the inner \mathit—this is not needed (in fact it switches to text italic in math mode)—using \bm{#1} suffices.

• It did work! Thank you so much! One last question: can I put the list of symbols and abbreviations in the same page? And also, it prints "Symbols" instead of "List of Symbols" – NaveganTeX Jun 2 at 18:20