2

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

1 Answer 1

4

@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

1
  • Hey Daniel, here $d_e$ shown by \printacronyms will not be a bold symbol. But by default if we use any acronym (without \ensuremath{}) in our document and use \printacronyms, short form of that acronyms will be shown in bold character in list of acronyms. So, short form of few acronym (without \ensuremath{}) will be in bold and few with \ensuremath{} will not be in bold. How to print all the short forms shown in list of acronyms in bold characters. May 11, 2020 at 6:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .