Difference between revisions of "Math/stackers"

From Wiki
Jump to navigation Jump to search
(links to the manuals)
 
Line 9: Line 9:
 
</context>
 
</context>
  
The same goes for brackets:
+
The same goes for brackets (or other stackers):
  
 
<context source="yes">
 
<context source="yes">
Line 44: Line 44:
 
== See also ==
 
== See also ==
  
* Chapter "1. Math stackers" in the "About" manual.
+
* Chapter "1. Math stackers" in the [[manual:about|About manual]].
* Section "1.8 Accents" in the "Still" manual.
+
* Section "1.8 Accents" in the [[manual:still|Still manual]].
* Section "10.6 Fancy fences" in the "Math-mkiv" manual.
+
* Section "10.6 Fancy fences" in the [[manual:math-mkiv|Math-MkIV manual]].
  
 
[[Category:Math]]
 
[[Category:Math]]

Latest revision as of 10:46, 29 October 2019

Overbraces and underbraces

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

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

The same goes for brackets (or other stackers):

\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