I want to set bra-ket equations in my document, which uses Asana Math (with lualatex, fontspec and unicode-math). commath is also a requirement for certain stuff. However, in this specific combination, angle brackets are not properly scaled with some modifiers like \big
etc.
Consider this MWE
%!TEX program = lualatex
\documentclass{article}
\usepackage{amsmath}
% math typesetting (differentials etc.)
\usepackage{commath}
\usepackage{fontspec}
\usepackage[bold-style=ISO]{unicode-math}
\setmathfont{Asana Math}
\begin{document}
\begin{equation}
\bigl\langle x \big\vert H \big\vert y \bigr\rangle
\end{equation}
\end{document}
which produces this result
The angle brackets are much too large compared to the equally set \vert
. Furthermore, going through all sizes from \big
to \Bigg
produces some matching and some non-matching variants.
What works to avoid the problem:
- using other brackets
- deactivating commath
- switching from Asana Math to default math font
Unfortunately, neither is an option for me. \big
is the smallest modifier and already too large. Skipping it produces too small angle brackets.
Is there any (decent) way, to get angle brackets between normal size and \big
size with my package requirements?
commath
; it is very buggy. See tex.stackexchange.com/questions/135944/commath-and-ifinner\left\langle x \big\vert H \big\vert y \right\rangle
?\left
and\right
produces the identical (wrong) result for me. The detection obviously wants to use\big
brackets there.\dif
macro (need to check if I use anything else). Is there a good alternative package for that?\dif
command is wrongly defined. You're better served by\newcommand{\dif}{\mathop{}\!d}
(the package has\!
on the wrong side).