Convert brackets to KaTeX blocks