Replace doc file with tex file