Add tso code to tex file