Writing phd thesis with latex