Code for the collapsible layout

With chapters and sections. But the one including sections might not be
brilliant the way it is right now.