[FIX] Broken TOC generation

 * Also fixed LaTeX escaping issues;