# multiple math operators newcommand not working

I'm trying to create a \newcommand, on my system, called \states which takes two arguments. It should look like this (image below):

But the angle brackets are not appearing when I try (MWE) :

\documentclass[12pt]{article}
\usepackage{amsmath}
\newcommand{\state}[2]{$\underline{#1}\langle#2\rangle$}
\newcommand{\statebf}[2]{$\underline{\mathbf{#1}}\langle#2\rangle$}

\begin{document}
\state{A}{\xi}
\statebf{A}{\xi}
\end{document}


I tried the same on an online environment and it works. Any hints of what I am missing on my package or a way to get around this would be very helpful

• mahtbf is a typo, but besides it works. If it doesn't work for you, you should show your log-file. – Ulrike Fischer Mar 31 '19 at 13:17

\newcommand{\statebf}[2]{$\underline{\mathbf{#1}}\langle\boldsymbol{#2}\rangle$}