Added some tex magic