Skip to content

Add most missing delimiters (and more) #69

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Enivex
Copy link
Collaborator

@Enivex Enivex commented May 19, 2025

Adds most of the missing delimiters. These are still missing, mostly because I struggle with naming:
⦌ right square bracket with underbar (U+298C)
⦔ right arc greater-than bracket (U+2994)
⦖ double right arc less-than bracket (U+2996)

The first one would be easier to name once we have a name for the "undermacron".

The proposal document also lists double parentheses, but those do not seem to be math delimiters. I'm not sure what they are exactly, but they're not present in any font I tried.

  • I renamed some of the double variants to stroked for consistency. This is especially important for the tortoise shells, since there is a filled variant.
  • I hope the distinction between bar (meant to indicate the delimiter) and stroked is clear enough.
  • I moved amp to punctuation, as it was in the wrong place.
  • There is some weirdness regarding fence. fence.dotted is not a delimiter, and seems entirely unrelated. I didn't do anything with it, however.

Copy link
Collaborator

@MDLC01 MDLC01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly dislike the change from .double to stroked. When I talk about ⟦ and ⟧ out loud, I refer to them as "double brackets" or "double square brackets", not "stroked brackets". I understand that this makes sense for shells, but really, even shell.{l,r}.filled sounds bad imo. If we can't find a better solution for now, I suggest we keep .double instead of .stroked, and not introduce shell.{l,r}.filled for now. I am not aware of any use for them, it's not like it's a symbol we need to add immediately.

Comment on lines +99 to +102
.l.t ⌜
.l.b ⌞
.r.t ⌝
.r.b ⌟
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.l.t
.l.b
.r.t
.r.b
.tl
.bl
.tr
.br

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I agree with this change. It's pretty important here that the l modifier means a left delimiter and r means a right delimiter.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tho with .l.t there's the issue of writing corner.l or corner.t. This could be resolved with the minimum modifier set idea, but currently the issue would be there.

angle ∠
.l ⟨
.l.curly ⧼
.l.dot ⦑
.l.bar ⦉
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If #68 is accepted, this should become a variant of chevron.

.l.double ⟪
.r ⟩
.r.curly ⧽
.r.dot ⦒
.r.bar ⦊
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If #68 is accepted, this should become a variant of chevron.

angle ∠
.l ⟨
.l.curly ⧼
.l.dot ⦑
.l.bar ⦉
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the use of .bar here, which is typically for bars that appear over or under a symbol (except for arrows). Maybe .closed would be better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bar is meant to refer to the delimiter here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may add that ⧞ is infinity.bar

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't this ⧞ is the mos intuitive result for infinity.bar, and i still believe angle.{l,r}.closed would be better (or rather, chevron.{l,r}.closed, taking #68 into account).

Copy link
Collaborator Author

@Enivex Enivex May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both ⦇ and ⦅ are closed, but are distinct symbols

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first one comes from Z notation (⦉ as well btw), which I don't think we have named symbols for as of now.1 I'm wondering whether we should add them. Although I guess I see no immediate reason not to.

Footnotes

  1. Only exception I could find for Typst 0.13.1: circle.filled.tiny for U+2981 ⦁ Z Notation Spot.

Copy link
Collaborator Author

@Enivex Enivex May 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no reason not to add them at some point, but that seems out of scope for a PR focused on delimiters.

Edit: To be clear, the delimiters I mentioned are already part of this PR. I was just trying to explain why we need three different modifiers to describe the "double delimiters"

@Enivex
Copy link
Collaborator Author

Enivex commented May 19, 2025

I strongly dislike the change from .double to stroked. When I talk about ⟦ and ⟧ out loud, I refer to them as "double brackets" or "double square brackets", not "stroked brackets". I understand that this makes sense for shells, but really, even shell.{l,r}.filled sounds bad imo. If we can't find a better solution for now, I suggest we keep .double instead of .stroked, and not introduce shell.{l,r}.filled for now. I am not aware of any use for them, it's not like it's a symbol we need to add immediately.

The thing is that we're using double in an inconsistent way. Everywhere else it means two of something, but that's not what this is. I kept the double modifier for angle brackets and bars, because there the symbol is just that. For the other delimiters, it's literally the same kind of thing that we call stroked for other symbols. The unicode name for "double brackets" is "mathematical left white square bracket", and "white" is basically the unicode name for our stroked modifier.

I highly doubt that anyone is going to use these directly without defining some shorthand for them, so I don't see it as a big problem that the name isn't exactly what you would say out loud.

@Enivex Enivex added the breaking This involves a breaking change label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This involves a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants