adapt main.tex to writelatex