2

I can redefine the \hbar command to use the "h" from the current math font as follows

\renewcommand{\hbar}{\raisebox{.5ex}{\rotatebox{15}{--}}\hspace{-0.5em}h}

For example in Times New Roman this gives

hbar Times New Roman

However, this breaks in super- or subscripts:

enter image description here

Is there a better way to achieve the same result, or is the a way to define \hbar differently when it appears as super- or subscript?

2

Use \text:

\documentclass{article}
\usepackage{amsmath,graphicx}

\renewcommand{\hbar}{%
  \text{\raisebox{.45ex}{\rotatebox{15}{--}}\hspace{-0.5em}$h$}%
}

\begin{document}

\[
\hbar+e^{\hbar}+e^{\frac{i}{\hbar}}
\]

\end{document}

enter image description here

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.