TeX - LaTeX Asked by eigenaus on May 13, 2021
I have been using the braket
package for using the dirac bra-ket notation. I came across many old books, e.g. Dirac’s Principles of quantum mechanics, which contain a different font or typeface for the bra-ket notation. I wanted to try writing a document for myself with such a typeface. I have tried the default latex font, Baskerville and a few others but was not able to find a similar bra and ket. So my question is as follows: How can I obtain a similar looking bra and ket in latex.
For reference, an example of the bra and ket that I mention is given below:
Note
As suggested in a comment, you can use DeclareMathDelimiter
from mathtools
to define bra
and ket
.
documentclass{article}
usepackage{mathtools}
DeclarePairedDelimiter{bra}{langle}{rvert}
DeclarePairedDelimiter{ket}{lvert}{rangle}
begin{document}
[ bra{x} ket{y} quad bra[big]{x}ket[big]{y^2}
]
end{document}
There is also a definition of braket
as an example on page 28 of the mathtools
manual.
DeclarePairedDelimiterXbraket[3]%
{langle}%
{rangle}%
{#1,delimsizevert,mathopen{}#2,delimsizevert,mathopen{}#3}
The manual also has an example of setting three arguments within a bra, a ket and in between.
If you want to change the font used only for these delimiters, there is a standard interface for this in `unicode-math:
documentclass{article}
usepackage{mathtools}
usepackage{unicode-math}
setmathfont{NewCMMath-Book}
setmathfont{Libertinus Math}[
Scale=MatchUppercase,
range={langle,rangle,vert}]
DeclarePairedDelimiter{bra}{langle}{rvert}
DeclarePairedDelimiter{ket}{lvert}{rangle}
begin{document}
[ bra{x} ket{y} quad bra[big]{x}ket[big]{y^2}
]
end{document}
To redefine langlw
, rangle
, etc. with legacy math fonts is less standardized. It involves loading a symbol alphabet (of which you only have sixteen) and checking its font table.
Answered by Davislor on May 13, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP