Mathematics/Stackers

Unofficial ConTeXt Wiki mirror

Last modified: 2025-01-12

\mathover , \mathunder and \definemathstackers

ConTeXt has a nice structure called mathstackers in order to define new math commands in which some characters are stacked over another one. For more information refer to math-stc.mkiv.

The two command \mathover[symbol]{}{} and \mathunder[symbol]{}{} are built and can be used directly.

However one may define one's own commands. A typical example is when you want to put a small circle on top of a letter (as one would when defining the topological interior of a set…).

To do so, with \definemathstackers we define first a new stacker named here MySymbol.

Then, invoking that with \definemathover we define two new commands which can be used in math mode

Overbraces and underbraces

In math mode, you can put a brace over or under an expression this way:

The same goes for brackets (or other stackers):

Adjusting stackers

You can adjust where the stackers start and end with the lt (left-top), rt (right-top), lb (left-bottom) and rb (right-bottom) parameters. This feature was introduced in beta 2019-10-28.

Interleaved braces

Some terms of an expressions can be shared by both braces, tuning the lt, rt, lb and rb parameters:

See also