0

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

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 at 13:17
2

Change your 4th line to

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

output from changed tex file

Changing mathfb to mathbf corrects a typo; adding boldsymbol makes the Greek letter turn bold too. I don't see any problem with the angle braces.

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.