Need to detect coursetype so we know whether to use index.rst or toc.rst to generate the chapters tables.