Fix utf encoding and add template for LaTeX files