#!/bin/zsh

# For anaconda distribution of Python, use
PATH=~/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/Library/TeX/texbin

# For system distribution of Python, use
# PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/Library/TeX/texbin

filename=$1

pdflatex --file-line-error --synctex=1 $1

pythontex $1

pdflatex --file-line-error --synctex=1 $1