See docs of DFTK.jl, the relevant code is
mathengine = Documenter.MathJax3(Dict(
:tex => Dict(
:inlineMath => [["\$","\$"], ["\\(","\\)"]],
:tags => "ams",
:packages => ["base", "ams", "autoload", "configmacros"],
:macros => Dict(
:abs => [raw"\left\|#1\right\|", 1],
:ket => [raw"\left|#1\right\rangle", 1],
:bra => [raw"\left\langle#1\right|", 1],
:braket => [raw"\left\langle#1\middle|#2\right\rangle", 2],
),
),
))
I just come across it trying to learn how to doc.