latex generator improved