Fork me on GitHub

core/delimiters

This module deals with creating delimiters of various sizes. The TeXbook discusses these routines on page 441-442, in the "Another subroutine sets box x to a specified variable delimiter" paragraph.

There are three main routines here. makeSmallDelim makes a delimiter in the normal font, but in either text, script, or scriptscript style. makeLargeDelim makes a delimiter in textstyle, but in one of the Size1, Size2, Size3, or Size4 fonts. makeStackedDelim makes a delimiter out of smaller pieces that are stacked on top of one another.

The functions take a parameter center, which determines if the delimiter should be centered around the axis.

Then, there are three exposed functions. sizedDelim makes a delimiter in one of the given sizes. This is used for things like \bigl. customSizedDelim makes a delimiter with a given total height+depth. It is called in places like \sqrt. leftRightDelim makes an appropriate delimiter which surrounds an expression of a given height an depth. It is used in \left and \right.