added legacy mode to navigation and table of contents generator