Skip to content

Add mapsto (Proposal 24) #38

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

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Add mapsto (Proposal 24) #38

merged 2 commits into from
Jan 23, 2025

Conversation

T0mstone
Copy link
Collaborator

This PR implements Proposal 24 (iteration 2) from the Symbol Proposals Document.

I also added to as per our Discussion on Discord.

This is a draft since it would be better done with the tools from #27.

@MDLC01
Copy link
Collaborator

MDLC01 commented Jan 21, 2025

Why not also adding to.long?

@T0mstone
Copy link
Collaborator Author

T0mstone commented Jan 21, 2025

That wouldn't work when converting them to #27's aliases, unless you also want to add all other modifiers of arrow.r to to. It seems like LaTeX doesn't have \longto either.

I could of course extend the alias system with a "copy some of the variants, but not all" declaration, but you previously called that "overkill".

There's also still the option of not using aliases for these, but I feel like we should avoid duplication if possible.

@T0mstone
Copy link
Collaborator Author

T0mstone commented Jan 21, 2025

Maybe the better solution is getting rid of to again. As you already said, typst already has ->. The name "to" also isn't nearly as semantic as "mapsto", so it doesn't really add much.

@MDLC01
Copy link
Collaborator

MDLC01 commented Jan 21, 2025

There's also still the option of not using aliases for these, but I feel like we should avoid duplication if possible.

I don't think the way we decide to implement a symbol (using aliases or not), or the way we implement our alias system, should dictate what we decide to add.

I don't know if we should add to, or to.long, but we should not take into consideration the way our alias system works when adding them. The final product should be good for the end users. Having good names is a higher priority than not duplicating some characters.

Just to be clear, I'm not saying that we should or shouldn't add to or to.long, just that this decision should be independent of the alias system.

The name "to" also isn't nearly as semantic as "mapsto", so it doesn't really add much.

This is a good point.

@T0mstone
Copy link
Collaborator Author

Given that you agreed to my last point, I've removed to again now.

@MDLC01 MDLC01 marked this pull request as ready for review January 23, 2025 07:21
@MDLC01 MDLC01 merged commit 0a8853f into typst:main Jan 23, 2025
1 check passed
@T0mstone T0mstone deleted the mapsto branch January 24, 2025 10:04
@T0mstone T0mstone changed the title Add to and mapsto (Proposal 24) Add mapsto (Proposal 24) Jan 27, 2025
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.

3 participants