Search code examples
latextex

What's the best way to understand the TeX / LaTeX internals?


Looking through docs on the TeX website, it seems like almost all documentation for TeX and LaTeX are tutorials on how to use them, how to install fonts, how to get graphics working, etc.

What should I look at if I want to know more about how TeX works? For instance, I want to know about its parser grammar. I want to know how its text engine works, how it decides hyphenation, how it flows text, how it decides on box layouts.

It seems like TeX and LaTeX are built up on several layers of different technologies. (Metafont, etc.) Is there any resources that describe step by step the TeX system from the ground up? How it goes from parsing a text file, into how this is represented and transformed, and finally how it ends up in a particular page layout?


Solution

  • There are essentially two resources on TeX itself: one is the TeXbook by Don Knuth, along with the typeset documented sourcecode itself (Vol's A and C of Computers and Typesetting), the other one is Victor Eijkhout's TeX by Topic, which is available for download.