TeX is a typesetting system written by Donald Ervin Knuth who says that it is "intended for the creation of beautiful books - and especially for books that contain a lot of mathematics".