Make local links work

This adds anchors for all headers so local (in-page) links work (mPDF doesn't seem to recognize ids as anchors).