Here's the pandoc README: :::{include="filter.hs"} ::: ::: Theorem test thm1 ::: :::{.Theorem #thm2} test thm2 ::: :::{class="Theorem" id="thm3"} test thm3 :::