Render math in table of contents

Fixes issue with unrendered math in the table of contents.