cetz-package / cetz

CeTZ: ein Typst Zeichenpaket - A library for drawing stuff with Typst.
https://cetz-package.github.io
GNU Lesser General Public License v3.0
897 stars 36 forks source link

Mark positioning #578

Closed arkadiuszwojcik closed 5 months ago

arkadiuszwojcik commented 6 months ago

In currect CeTZ implementation when we place mark at point (x,y) it is tip of mark that will occupy that position. In case on marks that are large or long it creates some issues to center in properly in the middle of line, because in most cases we would like to position mark in such way that graphical center of mark will occupy (x,y). Image below. Top part represent current mark positioning behaviour, bottom part my tweaks to place mark relative to is graphical center. Second one (mark shifted by mark_width/2) seems more intuitive I think.

Screenshot 2024-05-02 095941

Enivex commented 6 months ago

This has frustrated me as well, though I don't know if I was just doing something wrong.