October 19, 2021

Boxes in LaTeX

 


The main principle in the LaTeX rendering engine is the ability to show boxes as a graphic. A minimal TeX like language consists of a single command which is \box. This command allows to typeset a framed rectangle to the screen with different sizes. The box command is rendered into a concrete output. A single box can contain subboxes.
Let us slow down the situation a bit. The current luatex program consists of around 1 million code and lots of documentation. The ecosystem has grown over the decades and nobody is able to understand everything around TeX. There is a need to simplify the program drastically. The idea is to program some sort minimalist latex rendering engine. The idea is that short programs are better than larger ones.
The \box command which is provided in a text file is the basic requirement for such a latex replacement. The software has to parse the text file and converts the box commands into a layout stored in a pdf file. Such a program is maybe useless if someone likes to typeset a real document but it makes clear what LaTeX is about.