Here is an example:
$$ \newcommand{\bra}{\left<} \newcommand{\ket}{\right>} $$
$$ \bra a | b \ket $$
If you go to https://jxxcarlson.github.io/app/minilatex/src/index.html, press the "Clear" button, then paste the above text, then press "Render", you should see the macros \bra and \ket properly rendered.