Open fenjalien opened 7 months ago
I would also like to allow passing functions (of a specified format) instead of arrow-names that then get used for drawing.
I suggest moving parts of this post 0.2.0. We already got lots of improvements on marks and I would rather try to get out a release soon, so we get a little testing and feedback for 0.2.0.
I also think TikZ does a little too much here…, e.g. allowing to specify an angle when you already can specify width/length for marks is just a shortcut for the width/length calculation + all the different mark styles.
I guess we can mark some more of these features as implemented. Rays got implemented, but one can not specify the number of lines. Instead, three preconfigured styles "+", "*" and "x" are available for 4 and 5 corner rays.
Here are my suggestions of features/improvements to make for parity with tikz (from #314). Some of them we already have (not sure exactly which), some are implemented natively by typst.
Styling:
Configuration options
[ ] line width factor and outer factor options for length/width/inset/angle options (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/length)
[ ] note that length of an arrow is calculated assuming it has a miter line cap even if the cap is different (see https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/length "The Exact Length")
[x] angle (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/angle)
[ ] length factor and line width factor options for width/inset (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/width')
[x] scale length/width (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/scale:length)
[ ] arc (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/arc)
[x] slant (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/slant)
[x] Reversing tips https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/reversed
[x] Halving tips (https://tikz.dev/tikz-arrows#pgf./pgf/arrow:keys/harpoon) (including which side to half)
[x] bending and flexing (https://tikz.dev/tikz-arrows#sec-16.3.8) (haven't properly checked this but i think we have everything)
[x] #347
Note that coloring and line styling is skipped as they are handled by fill and stroke options
tip specifications
Arrow tips (https://tikz.dev/tikz-arrows#sec-16.5)
implemenation