Corrected newline escaping.
Improved table of contents formatting.
Chapter numbers would previously run into chapter names.
To fix this, chapter names have now been indented further.
This allows up to 999 chapters before the issue reappears.