Wrong marks in merged paths
#import "@preview/cetz:0.2.0"
#cetz.canvas({
import cetz.draw: *
merge-path({
line((0,1), (1,1), mark: (symbol: ">"))
})
line((0,0), (1,0), mark: (symbol: ">"))
})
This is a known problem, for now you must not use marks inside merge-path.
Is there another way to draw a polyline with an arrowhead?
It is possible with the current version by implementing the mark placement in a custom element.
I will post an example later. But you can take a look into cetz source code how it is done: src/draw/shapes.typ has calls to drawables = mark_.place-marks-along-path(ctx, style.mark, transform, drawables). You need to do add that to your custom merge-path like element.
If you mean multiple connected straight lines by polyline: this is possible. You can pass > 2 coordinates to line.
This would be fixed by #463