Math/stackers

From ConTeXt wiki
< Math
Revision as of 10:34, 29 October 2019 by Massifr (talk | contribs) (added Math/stackers page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overbraces and underbraces

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

\startformula
a + \overbrace{b + c} + \underbrace{d + e} + \doublebrace{f + g} + h
\stopformula

The same goes for brackets:

\startformula
a + \overbracket{b + c} + \underbracket{d + e} + \doublebracket{f + g} + h
\stopformula

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.

$a + \overbrace  [lt=1em]         {b+c+d} + e$\blank
$a + \underbrace [lt=1em]         {b+c+d} + e$\blank
$a + \overbrace  [rb=1em]         {b+c+d} + e$\blank
$a + \underbrace [rb=1em]         {b+c+d} + e$\blank
$a + \overbrace  [lt=1em,rb=1em]  {b+c+d} + e$\blank
$a + \underbrace [lt=1em,rb=1em]  {b+c+d} + e$\blank

Interleaved braces

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

$a + \doublebrace[lt=1.4em,rt=-.3em]                   {b+c+d} + e$\blank
$a + \doublebrace[rb=1em]                              {b+c+d} + e$\blank
$a + \doublebrace[lt=1.4em,rt=-.3em,lb=-.3em,rb=1.5em] {b+c+d} + e$\blank
$a + \doublebrace[lt=-1.6em,rb=-1.4em]                 {b+c+d} + e$\blank

See also

  • Chapter "1. Math stackers" in the "About" manual.
  • Section "1.8 Accents" in the "Still" manual.
  • Section "10.6 Fancy fences" in the "Math-mkiv" manual.