preliminary toc generation by way of 2-pass pandoc compiler: 1st pass for collecting headers and 2nd pass for replacing toc marker