You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CJK-Latin-spacing not working with inline equation #2703
I used to use LaTex and am currently learning Typst. I found that there is no automatic addition of spaces between the inline equation and CJK text. If the feature implemented in pull2334 is consistent, it should include the case of inline equation.
Reproduction URL
No response
Operating system
Windows
Typst version
I am using the latest version of Typst
Reacted by Y.D.X., iwkjosec, Inker, acd407, Amorphophalms-konjac, Fram Herel and awaw431
As @Enter-tainer said, this issue is similar to the previous one (#2702), but the issues may need to be tracked and resolved one by one, so I create a separate issue.
changed the title [-]The space between CJK and Latin does not work at inline equation[/-][+]Whitespace between CJK & Latin not working with inline equation[/+]on Nov 17, 2023
changed the title [-]Whitespace between CJK & Latin not working with inline equation[/-][+]CJK-Latin-spacing not working with inline equation[/+]on Nov 18, 2023
Activity
jiaojiaodubai commentedon Nov 17, 2023
As @Enter-tainer said, this issue is similar to the previous one (#2702), but the issues may need to be tracked and resolved one by one, so I create a separate issue.
[-]The space between CJK and Latin does not work at inline equation[/-][+]Whitespace between CJK & Latin not working with inline equation[/+][-]Whitespace between CJK & Latin not working with inline equation[/-][+]CJK-Latin-spacing not working with inline equation[/+]peng1999 commentedon Nov 25, 2023
This is a workaround.
Enter-tainer commentedon Nov 27, 2023
cool! do we still need to embed this feature inside typst engine? i think this one is good enough.
Enter-tainer commentedon Jan 14, 2024
Per discussion in Chinese typst user qq group. The weak space may not work well when it presents in line end. There will be extra space in line end.
laurmaedje commentedon Jul 22, 2024
Relevant update: Weak space at line ends is now trimmed.
okumuralab commentedon Jun 22, 2025
Hacks like
it => h(0.25em) + it + h(0.25em)are inappropriate when inline math is adjacent to punctuation or quotation marks, in which case space shouldn't be inserted. There's a very long discussion here: https://qiita.com/zr_tex8r/items/a9d82669881d8442b574 (in Japanese, sorry).