Add #toc method on Document