Add code to tex