Repository navigation
Open
Labels
cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
Description
I've heard about this new typesetting engine from my friends and I'm immediately attracted to the intuitiveness and elegance of the typst's language - this is exactly the typesetting I need. However, after trying to typeset a lab report of mine using typst, I found its CJK typesetting somehow lacking. To be more detailed:
- The CJK line-break rule (禁则处理/禁則処理) is basically honored, but all punctuations seem to be treated as using the same size as the normal CJK characters, instead of being squashed first when applying justification.
- There's no way to specify fonts for CJK and non-CJK (e.g. Latin) characters separately.
- The first-line indent of CJK paragraphs is always 2-character, and the first line in a page will also be indented, but currently, typst doesn't indent the first line of the first paragraph.
- There's no way to switch between the basic "styles" of CJK fonts (Songti=Mincho, Heiti=Gothic, Kaiti, Fangsong, etc.) - solvable via custom functions.
- The spacing between CJK and non-CJK characters should be adjusted.
- No support for vertical typesetting.
- No support for pronunciation labeling (ruby).
Since I'm not a typesetting expert, the list can be way longer than above. Supporting proper Chinese, Japanese, and Korean typesetting is a huge project involving numerous aspects, but is definitely invaluable. Please consider taking it into consideration.
Here's some related information:
- JLREQ, CLREQ, and KLREQ : Requirements for Chinese/Japanese/Korean Text Layout;
- The documentation of the xeCJK package: the most widely used Chinese LaTeX package;
- The page of the upLaTeX engine: the most widely used Japanese LaTeX engine;
- JIS X 4051 (日本語文書の組版方法, Formatting rules for Japanese documents)
- Unicode Line Breaking Algorithm: http://unicode.org/reports/tr14/
Reacted by Edward Jones, Johan Xie, yusancky, Fibert Loyee, Qu, Laurenz Stampfl, Huang Fusyong, Jie Weng, Jinhao Huang, Tan Long and 45 more
Reacted by melonedo, Qu, Chen, Hiro, Tesla Zhang, ai25395, Kevin Stephen, OrangeX4 and randint
Metadata
Metadata
Assignees
Labels
cjkChinese, Japanese, Korean typography.feature requestNew feature or requesttextRelated to the text category, which is all about text handling, shaping, etc.
Activity
laurmaedje commentedon Mar 24, 2023
Yes. We implemented Typst with general support for non-Latin scripts, but lots of details are not yet dealt with. I'm optimistic that this will improve with time, also because now people who actually know and write these scripts (like you) are testing it.
ai25395 commentedon Jul 21, 2023
Fully agree. When I finished the official tutorial on Typst, I felt that I could already use it for some daily work and looked forward to it. However, when I use my native language (non latin) on Typst, I feel that it may require more time to adapt and improve. The several features you mentioned that need improvement are all important and practical. Without these features, as a non Latin native speaker, it would be unlikely for me to use Typst in practical work because my boss will not be satisfied.
Andrew15-5 commentedon Sep 10, 2023
I've created a Typst package that you can use for ruby typesetting:
typst/packages
Andrew15-5/rubby
It seems to work pretty good, but I'm not an expert on ruby.
P.S. Even though I've created a package, the core logic/code is not mine (see Notes section).
laurmaedje commentedon Oct 12, 2023
I'm not sure whether there any issues when used in practice, but technically regex show rules can be used to configure the CJK font differently, e.g. like this:
[-]Better CJK support?[/-][+]Better CJK support[/+]reknih commentedon Jan 1, 2024
cf. #193