flatten latex file.