Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider supporting standard direction names in addition to cardinal directions #714

Open
Andrew15-5 opened this issue Oct 10, 2024 · 0 comments
Labels
feature 🎁 Feature Request

Comments

@Andrew15-5
Copy link
Contributor

Even though this might very well be a skill issue, I still don't like using the cardinal directions in my vector graphics in Typst. First, it's confusing/disorienting to me. But I think it mostly has to do with the fact that top/bottom/right/left directions are just too common to use anything but them. I think it's correct to say that Americans love using cardinal directions, but still. Everyone uses standard names, and so does Typst.

I would like to be able to anchor my elements in cetz with "top-left" or top + left instead of "north-west".

I honestly think that this is one of my main issues with cetz (and tikz) when I want to fine-tune something. It doesn't break anything, but I struggle (even if ever so slightly) every time I have to use them.

This is also why I love fletcher, as it provides up to 3 names for the same direction, which is described under the "Relative coordinate shorthands" section:

Like node positions, edge vertices may be specified by CeTZ-style coordinate expressions, combining elastic and physical coordinates.

Additionally, you may specify relative shorthand strings such as "u" for up or "sw" for south west. Any combination of top/up/north, bottomp/down/south, left/west, and right/east are allowed.

I like the fact that all of these start with a unique letter, so you can even use the 1-letter shorthands (in addition to the full names). Not sure if it will work for cetz, but would be cool if shorthands are also supported (you wouldn't even have to write the dash for compound directions).

(I also found a typo: Jollywatt/typst-fletcher#52.)

@johannes-wolf johannes-wolf added the feature 🎁 Feature Request label Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎁 Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants