I have some chemical formulae throughout my whole text that are changed from time to time. So I defined a macro \compound
with the approporiate content for usage in chemmacros'
\ch
macro.
Compiling the document (see MWE) shows that the direct entry works as expected (is typeset as a formula), while the second version is typeset as normal text.
\documentclass{minimal}
\usepackage{chemmacros}
\newcommand{\compound}{H2O}
\begin{document}
Works: \ch{H2O}
Does not work: \ch{\compound}
\end{document}
Do I miss (or misunderstand) something?
Any help is very appreciated. Thanks in advance.