Add selective expandable table of contents macro

And improve the layout of the examples