Fix bug 845355: Adjustable depth for table of contents.
Merge pull request #970 from ubernostrum/toc-limit-845355

Fix bug 845355: depth limit for table of contents