Skip to content

Add a space between inline equation and CJK - #5607

Closed
miyaji255 wants to merge 1 commit into
typst:mainfrom
miyaji255:add-spacing-between-cjk-equation
Closed

miyaji255 wants to merge 1 commit into
typst:mainfrom
miyaji255:add-spacing-between-cjk-equation

Conversation

@miyaji255

Copy link
Copy Markdown

Closes #2703
Add a space between Item::Skip and CJK.

It seems that Item::Skip currently exists only before and after EquationElem, so I used that for the condition. If there’s a better abstraction, I’d appreciate your advice.

汉字$A$汉字

汉字 $A$ 汉字

Before:
image

After
image

@laurmaedje

Copy link
Copy Markdown
Member

Detecting it via Skip is indeed too hacky. The CJK-Latin-spacing is already implemented in a bit hacky way as-is and I'd rather not add more complexity on top.

@miyaji255

miyaji255 commented Dec 20, 2024 •

Copy link
Copy Markdown
Author

Thank you for your comment. As you point out, I too feel that using Skip as a condition is hacky.

Do you have any plans or ideas for implementing better CJK-Latin-Spacing?

@laurmaedje

Copy link
Copy Markdown
Member

Unfortunately, I don't have any at the moment. I'm available for discussing stuff, but can't currently put focus on this myself. (Though CJK definitely deserves some love in the not too distant future!)

@laurmaedje laurmaedje added the waiting-on-design This PR or issue is blocked by design work. label Dec 20, 2024
@miyaji255

Copy link
Copy Markdown
Author

Thank you for your response. Since I currently don’t have a solid idea for resolving this issue either, I will proceed to close this Pull Request for now.

That said, I would like to emphasize that CJK users greatly value this feature, and I hope it can be revisited in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-design This PR or issue is blocked by design work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CJK-Latin-spacing not working with inline equation

2 participants