Braket Notation In LaTeX


Answer :

There is the physics package:

\documentclass{article} \usepackage{physics} \begin{document}   $\bra{\Psi}\ket{\Psi}$ $\expval{A}{\Psi}$ \end{document} 

enter image description here

It offers many other goodies for typsetting physics things. Details can be found in the manul (texdoc physics from command prompt/terminal).


Use \braket{0|0}:

\documentclass{standalone}  \usepackage{braket}  \begin{document}  $\braket{0|0}$  \end{document} 

enter image description here


A solution using the mathtools package:

\documentclass{article}  \usepackage{mathtools} \DeclarePairedDelimiter\bra{\langle}{\rvert} \DeclarePairedDelimiter\ket{\lvert}{\rangle} \DeclarePairedDelimiterX\braket[2]{\langle}{\rangle}{#1 \delimsize\vert #2}  \begin{document}  \begin{align*}   \bra{a}       &= \bra*{\frac{a}{1}} \\   \ket{a}       &= \ket*{\frac{a}{1}} \\   \braket{a}{b} &= \braket*{\frac{a}{1}}{\frac{b}{1}} \end{align*}  \end{document} 

output

Notice that the starred versions of the macros scale automatically.


Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable