pgfmathparse with glossary entries #1381
-
Why do I get the error "Missing \endcsname inserted. \pgfmathparse{10*\gls{test}}"? \documentclass[11pt, a4paper, fleqn, twoside]{article} \begin{document} \printnoidxglossaries |
Beta Was this translation helpful? Give feedback.
Answered by
muzimuzhi
Jan 31, 2025
Replies: 1 comment 2 replies
-
An expandable way is needed. \documentclass[11pt, a4paper, fleqn, twoside]{article}
\usepackage{glossaries}
\usepackage{tikz}
\def\test{0.005}
% ! Package glossaries Error: Glossary type `symbols' has not been defined.
\newglossaryentry{test}{type=symbols,name={\test},sort=test,description={test}}
\begin{document}
\pgfmathparse{10*\glsentryname{test}}\pgfmathresult % typesets "0.05005"
\printnoidxglossaries
\end{document} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
hmenke
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An expandable way is needed.
\glsname
is not expandable, while\glsentryname
is.