0

MWE

\documentclass{article}
\usepackage[acronym]{glossaries}

\newacronym{acr1}{ $\overrightarrow{ abc }$ }{ It does not work }
\newacronym{acr2}{ABC}{It works!}
\makeglossaries

\begin{document}


\section{Introduction}
\acrshort{acr1}
\acrshort{acr2}
\printglossary[type=acronym,title=Tests]


\end{document}

The above code results in multiple errors of type: Illegal parameter number in definition of ...

I have already tried the solutions proposed in: https://tex.stackexchange.com/a/191166/219526 but none of them has solved my problem.

Is it possible to use \overrightarrow in a glossary ?

1 Answer 1

1

Use \protect:

\documentclass{article}
\usepackage[acronym]{glossaries}

\newacronym{acr1}{$\protect\overrightarrow{abc}$}{Works}
\newacronym{acr2}{ABC}{It works!}
\makeglossaries

\begin{document}


\section{Introduction}
\acrshort{acr1}
\acrshort{acr2}
\printglossary[type=acronym,title=Tests]


\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.