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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 41 additions & 2 deletions src/modules/sym.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,64 @@ space U+20
// Delimiters.
paren
.l (
.l.flat ⟮
.l.bar ⦇
.l.stroked ⦅
//Deprecated, use paren.l.stroked
.l.double ⦅
.r )
.r.flat ⟯
.r.bar ⦈
.r.stroked ⦆
//Deprecated, use paren.r.stroked
.r.double ⦆
.t ⏜
.b ⏝
brace
.l U+7B
.l.stroked ⦃
//Deprecated, use brace.l.stroked
.l.double ⦃
.r U+7D
.r.stroked ⦄
//Deprecated, use brace.r.stroked
.r.double ⦄
.t ⏞
.b ⏟
bracket
.l [
.l.tick.t ⦍
.l.tick.b ⦏
.l.stroked ⟦
//Deprecated, use bracket.l.stroked
.l.double ⟦
.r ]
.r.tick.t ⦐
.r.tick.b ⦎
.r.stroked ⟧
//Deprecated, use bracket.r.stroked
.r.double ⟧
.t ⎴
.b ⎵
shell
.l ❲
.l.stroked ⟬
.l.filled ⦗
//Deprecated, use shell.l.stroked
.l.double ⟬
.r ❳
.r.stroked ⟭
.r.filled ⦘
//Deprecated, use shell.r.stroked
.r.double ⟭
.t ⏠
.b ⏡
bag
.l ⟅
.r ⟆
moustache
.l ⎰
.r ⎱
bar
.v |
.v.double ‖
Expand All @@ -63,14 +95,21 @@ fence
.r ⧙
.r.double ⧛
.dotted ⦙
corner
.l.t ⌜
.l.b ⌞
.r.t ⌝
.r.b ⌟
Comment on lines +99 to +102
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.

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"

.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.

.r.double ⟫
.acute ⦟
.arc ∡
Expand All @@ -93,10 +132,10 @@ ceil
floor
.l ⌊
.r ⌋
amp &
.inv ⅋

// Punctuation.
amp &
.inv ⅋
ast
.op ∗
.basic *
Expand Down