Markdown_for_papers/conversion_script.py

12 lines
610 B
Python
Executable File

#!/usr/bin/python3
#script using pandoc and pandoc-citeproc to transform a markdown file into a latex "paper"
#Taken from
#https://gist.github.com/maxogden/97190db73ac19fc6c1d9beee1a6e4fc8
from subprocess import call
call(["pandoc", "--filter", "pandoc-citeproc", "--bibliography=paper.bib", "--variable", "classoption=twocolumn", "--variable", "papersize=a4paper", "-s", "paper.md", "-t", "latex", "-o", "paper.tex"])
call(["pandoc", "--filter", "pandoc-citeproc", "--bibliography=paper.bib", "--variable", "classoption=twocolumn", "--variable", "papersize=a4paper", "-s", "paper.md", "-o", "paper.pdf"])