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

Add struck arrows #50

Merged
merged 3 commits into from
Feb 24, 2025
Merged

Add struck arrows #50

merged 3 commits into from
Feb 24, 2025

Conversation

MDLC01
Copy link
Collaborator

@MDLC01 MDLC01 commented Feb 19, 2025

This PR adds struck arrows, as well as twohead tailed arrows.

For singly struck arrows, I chose the .struck modifier, which is consistent with its use in parallel.struck in contrast to parallel.not. Unicode also defines doubly struck arrows. For those, an additional modifier needs to be created, and i am unsure of the name to use. Maybe .doublestruck, or .dstruck? I marked the PR as a draft for this reason.

@Enivex
Copy link
Collaborator

Enivex commented Feb 19, 2025

struck.double or struck.twice?

@T0mstone
Copy link
Collaborator

T0mstone commented Feb 19, 2025

struck.double or struck.twice?

arrow.double is already something else. This is a case where our commutative modifiers are a limitation, since the "double" would be a modifier that applies to another modifier.

Edit: Unless you were suggesting making struck its own symbol, but even then that couldn't distinguish between ⤃ and ⇻.

@Enivex
Copy link
Collaborator

Enivex commented Feb 19, 2025

Are modifiers commutative though?

That seems like a very bad idea

@T0mstone
Copy link
Collaborator

Are modifiers commutative though?

Yesn't.
They are in typst, that's how circle.filled.big is the same as circle.big.filled.
For codex by itself, modifiers don't exist. We only have variants until/unless #46 is merged.

@knuesel
Copy link

knuesel commented Feb 21, 2025

Maybe .struck-twice ?

@MDLC01
Copy link
Collaborator Author

MDLC01 commented Feb 21, 2025

The dash would prevent it from being easily usable in math

@knuesel
Copy link

knuesel commented Feb 21, 2025

Ah right, I confusedly imagined this would be OK after the change to math argument parsing in Typst 0.13 but obviously not!

In favor of dstruck: we could consistently use a d prefix for double modifiers, like we use n for negation in .neq, .neqiv, .ntilde.

Or we could aim for consistency with arrow.r.twohead and use arrow.r.twostroke (as in the Unicode name Rightwards Arrow with Double Vertical Stroke). Then it would make sense to rename arrow.r.struck to arrow.r.stroke...

@MDLC01
Copy link
Collaborator Author

MDLC01 commented Feb 21, 2025

arrow.r.stroke is too similar to arrow.r.stroked imo.

@MDLC01
Copy link
Collaborator Author

MDLC01 commented Feb 21, 2025

I went with .dstruck. As mentioned above, it creates a consistency with .neq. If anything, .twohead is the outlier here, although I don't think it would be necessary to change it.

@MDLC01 MDLC01 marked this pull request as ready for review February 21, 2025 13:42
@MDLC01 MDLC01 merged commit d9eb944 into typst:main Feb 24, 2025
1 check passed
@MDLC01 MDLC01 deleted the more-arrows branch February 24, 2025 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants