fix brackets in heading

This wraps section headings in the LaTeX output with {}, so any brackets [] in the heading don't break the syntax.