Template:CompactTOC

Usage
Place CompactTOC at the top of a page to use this template. This template is useful if you have a list of things with headers from 0-9 or A-Z. There's only one field, "num", which when it is set to yes will appear as: