if there is default.latex in the working dir, use it
patch the markdown to add figure \label
patch the Shaded env to be real shaded
port the template to 1.12 pandoc