With \usepackage{fontspec}
, \hbar
does not show up correctly. Tested on LaTeX2e <2018-04-01> patch level 5
and fontspec.sty 2018/07/30 vv2.6h
.
\documentclass{article}
\usepackage{fontspec}
\begin{document}
[$\hbar$]
\end{document}
With XeLaTeX:
I found that
- Adding
\usepackage{unicode-math}
or
\usepackage[no-math]{fontspec}
can resolve this problem, but I'm not sure which is better.
Best Answer
The definition of hbar is quite encoding dependant. As fontspec changes the operator font it breaks.
You could redefine it if you don't want to switch to unicode-math: