Update tex code