typst-fletcher icon indicating copy to clipboard operation
typst-fletcher copied to clipboard

Extraneous labels with decoration

Open NeilGirdhar opened this issue 3 months ago • 1 comments

Has extraneous labels:

#import "@preview/fletcher:0.5.8" as fletcher: cetz, diagram, edge, node

#{
    let k = 10
    let events = (0.1446, 0.4085, 0.6255, 0.7891)
    let tick-size = 0.2
    [
      #figure(
        diagram(
          edge-stroke: 1pt,
          edge((0, 0), (k, 0), "-cone"),
          for a in events {
            (
              edge((k * a, -tick-size), (k * a, tick-size)),
            )
          },
          for (i, (a, b)) in ((0,) + events).zip(events).enumerate() {
            (
              node(
                enclose: ((k * a, -tick-size), (k * b, -tick-size)),
                shape: brace.with(
                  stroke: colorb,
                  dir: top,
                  length: 60%,
                  label: text(blue)[$W_#(i + 1)$],
                  sep: 0pt,
                ),
              ),
            )
          },
        ),
      )
    ]
  }

NeilGirdhar avatar Aug 19 '25 07:08 NeilGirdhar

Also trying to change the stroke on the brace leads to some very weird behavior. stroke: blue.

NeilGirdhar avatar Aug 19 '25 07:08 NeilGirdhar