Skip to content

Support radius in content(frame: "rect") #802

@janosh

Description

@janosh

when fitting rectangular frames to content, would be great if you could apply a border radius. rect has that ability but content(frame: "rect") is not forwarding the radius

#import "@preview/cetz:0.3.1": canvas, draw

#set page(width: auto, height: auto, margin: 8pt)

#canvas({
  draw.content(
    (0, 0),
    [$hat(H)_"KS"=-frac(planck.reduce^2, 2m)arrow(nabla)^2 + v_("ext,s") (arrow(r))$],
    frame: "rect",
    stroke: .5pt,
    fill: rgb("#DCDCDC"),
    padding: 8pt,
    name: "hamiltonian",
    radius: 4pt, // currently has no effect, needs forwarding to rect
  )
})

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions