1

I'm using acro package for my acronyms. Some of the acronyms are equation variables, so I'd like tu use them in math mode. The problem is when I use the acronym in math mode, I get the error Missing \endgroup inserted. This is me trying to use $\acs{de}=. How can I use acronyms written between $ $

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{acro}
\usepackage{blindtext}
\DeclareAcronym{de}{
short=$d_{e}$,
long=especific diameter
}
\begin{document}
\printacronyms
This is me trying to use $\acs{de}=12$
\end{document}
1

@clemens Solved the problem, I just used \ensuremath command

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{acro}
\usepackage{blindtext}
\DeclareAcronym{de}{
short=\ensuremath{d_{e}},
long=especific diameter
}
\begin{document}
\printacronyms
This is me trying to use $\acs{de}=12$
\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.