Skip to content

pgfmathparse with glossary entries #1381

Closed Answered by muzimuzhi
apprenticius asked this question in Q&A
Discussion options

You must be logged in to vote

An expandable way is needed. \glsname is not expandable, while \glsentryname is.

\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}

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@apprenticius
Comment options

@muzimuzhi
Comment options

Answer selected by hmenke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants