\hslash h with slash (ℏ) in LaTeX
| Command | \hslash |
|---|---|
| Mode | math |
| Package | amssymb |
| Unicode | ℏ U+210F |
| Kind | Miscellaneous math symbols |
\hslash typesets the symbol “h with slash” (ℏ). It is a math symbol.
Try it
Open this formula in the editor The preview is drawn in your browser by KaTeX, which knows the common math commands. The editor compiles the formula with pdfTeX.
Example
\documentclass{article}
\usepackage{amssymb}
\begin{document}
\( E = \hslash \omega \)
\end{document}Compiled with pdfLaTeX from TeX Live 2023.
How to use it
\hslash works only in math mode. In running text, put it between $...$ or \(...\). Outside math mode LaTeX stops with Missing $ inserted. The command comes from the amssymb package. Add \usepackage{amssymb} to the preamble. Without it LaTeX reports Undefined control sequence.
About miscellaneous math symbols
These symbols behave like a letter or a digit: LaTeX adds no space around them. They include infinity, the derivative signs, dots for omitted terms and a few shapes.