Skip to main content

Brace

brace() 

Draw a curly brace between two points.

cetz.decorations.brace((0,1),(2,1))
cetz.decorations.brace((0,0),(2,0), outer-inset: 0)

Start point

End point

name:

Default: none

Element name used for querying anchors

..style:

Style key-value pairs

Styling

Root: brace

amplitude:

Default: 0.25cm

Sets the height of the brace, from its baseline to its middle tip.

thickness:

Default: 0.015cm

Thickness of tapered braces (if ratio, relative to half the amplitude).

pointiness:

Default: 50%

Thickness of the mid-spice

taper:

Default: true

Draw a tapered brace

outer-inset:

Inset of the outer curve points

outer-curvyness:

Curvyness of the outer curves

inner-outset:

Inset of the inner tip curve points

inner-curvyness:

Curvyness of the inner tip curves

outer-thickness:

Default: 0

Thickness of the outer tips

content-offset:

Default: 0.3

Offset of the "content" anchor from the spike of the brace.

flip:

Default: false

Mirror the brace along the line between start and end.

Use the fill style for tapered braces and set stroke to none.

Anchors

  • start Where the brace starts, same as the start parameter.
  • end Where the brace end, same as the end parameter.
  • spike Point of the spike, halfway between start and end and shifted by amplitude towards the pointing direction.
  • content Point to place content/text at, in front of the spike.
  • center Center of the enclosing rectangle.