Writing a thesis with LaTeX