optimize of latex