transfer prelim into .tex format