#!/bin/bash 

#This script is used to compile md file using markdown 
if [ "$2" = '' ]; then
    out=${1/md/docx}
else
    out=$2
fi
pandoc $1  --lua-filter="$HOME"/typesetting/pandoc_lua_filters/scholarly-metadata.lua --lua-filter="$HOME"/typesetting/pandoc_lua_filters/author-info-blocks.lua  --lua-filter="$HOME"/typesetting/pandoc_lua_filters/pagebreak.lua --filter=pandoc-crossref --citeproc --bibliography=/home/aselimov/typesetting/references.bib --csl=/home/aselimov/typesetting/csl/els.csl -o $out