Added code to handle LaTeX stuff on Windows