How to implement such caps for root signs? (Closed root / radical signs | Square root end line)

Here’s LaTeX’s information about this: LaTeX/Mathematics - Wikibooks, open books for an open world

And here’s example from OverLeaf:

2 Likes
#let sqrtt(content) = {
  let content_box = box()[$ #content #h(0.35em) $]
  
  let radical = box()[
    $ sqrt(#content_box) $
    #place(right+top, dy: 0.06em,
      curve(stroke: 0.05em,
      curve.line((0em, 0.3em))
    ))
  ]
  
  math.op(radical)
}

//////////////////////////

$ sqrtt(sqrtt(sqrtt(sqrtt(sqrtt(sqrtt(infinity)))))) $

$ sqrtt(x + sqrtt(x + sqrtt(x + sqrtt(x + sqrtt(x + sqrtt(x + sqrtt(x + sqrtt(x + sqrtt(x))))))))) $

$ sqrtt(1 / (1 + sqrtt(1 / (1 + sqrtt(1 / (1 + sqrtt(1 / (1 + sqrtt(x)))))))))) $

$ sqrtt(
  (sqrtt((a+b)/(c-d)) + sqrtt((e+f)/(g-h))) / 
  (sqrtt((a-b)/(c+d)) - sqrtt((e-f)/(g+h)))
) $

$ sqrtt(
  sum_(i=1)^n sqrtt(
    integral_a^b sqrtt(
      mat(sqrtt(x), sqrtt(y); sqrtt(z), sqrtt(w))
    ) d x
  )
) $

1 Like