Uses functions to write latex header, includegraphics, footer.
Also implements second, optional, argument file name of output pdf file.