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