+function RunPandoc()
+ " If pandoc.css exists, use it
+ let cssopts = ""
+ if findfile("pandoc.css", ".") == "pandoc.css"
+ let cssopts = "-c pandoc.css --self-contained"
+ endif
+
+ execute ":!pandoc " . cssopts . " --toc " . @% . " -o " . @% . ".html"
+endfunction
+
+