Make gf work with node require and latex \input.