4

The answers in this question give a way to draw an underbrace in Tikz. But I'd like to know if it is possible to draw underbrace using asymptote? Because there is no package in asymptote seems to be able to do this.

1
  • 1
    I guess you get more feedback if you provide an MWE. You can access LaTeX macros in asymptote, i.e. put an $\underbrace{\hspace*{xcm}}_{\dots}$ somewhere and rotate it if everything else fails.
    – user121799
    Mar 27, 2018 at 16:01

1 Answer 1

10

In fact a brace routine is available. It was created by Charles Staats, and it is in the documentation (see Paths and Guides subsection). The syntax is path brace(pair a, pair b, real amplitude=bracedefaultratio*length(b-a))

The following code

  size(10cm);
  path p=brace((0,0), (1,1),.1); // real amplitude=bracedefaultratio*length(b-a));
  path q=brace((1,1), (0,0),.2);
  draw(p,blue+1bp);
  draw(q,red+2bp);
  draw(brace((1,0),(1,1)),black+2bp);
  draw(brace((0,1),(0,0)),1bp+dashed);

produces this picture

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .