Jollywatt / typst-fletcher

Typst package for drawing diagrams with arrows, built on top of CeTZ.
MIT License
270 stars 6 forks source link

Compile error on the example in README #6

Closed Myriad-Dreamin closed 5 months ago

Myriad-Dreamin commented 5 months ago

Thank you for providing this awesome package. I copy the example for testing but typst complains a compile error.

The c variable in the example is undefined:

#fletcher.diagram(
    node-fill: rgb("aaca"),
    node-outset: 2pt,
    axes: (ltr, btt),

    node((0,0), `typst`),
    node((1,0), "A"),
    node((2.5,0), "B", stroke: c + 2pt), // Here!!!!!!
    node((2,1), "C", extrude: (+1, -1)),

    for i in range(3) {
        edge((0,0), (1,0), bend: (i - 1)*25deg)
    },
    edge((1,0), (2,1), "..}>", corner: right),
    edge((1,0), (2.5,0), "-||-|>", bend: -0deg),
)
Jollywatt commented 5 months ago

Whoops, nice catch. Fixed in 7a905402ff9bad3c92e3ddfa6c597a3ecc1ff623 Thanks:)