Typst Docs: You should LOCALLY change the text language just for those parts that contains passages in a different language than the main language.
- Typst is awesome to write English or Latin docs. But when it comes to non-latin, e.g. Greek, Arabic and CJK, things become complex and random.
- Compare to local, global setting is a bit more convenient.
All World Languages in One Visualization
What languages use the Latin alphabet:
- Germanic and Romance languages: English, German, Spanish, French, Italian, Portuguese, Romanian.
- Slavic languages: Polish, Czech, Slovak, Croatian, Slovene.
- Asian-Pacific languages: Indonesian, Malay, Tagalog, Vietnamese, Hawaiian, Samoan, Fijian.
- American-Australian languages: Quechua, Nahuatl, Guarani, Warlpiri, Arrernte.
- African and other languages: Swahili, Hausa, Yoruba, Igbo, Turkish and Somali.
English and Latin
Greece
Look for a best practice
Arab
Look for a best practice
China
-
Status: All Chinese characters are mono[=1em], and Chinese punctuation are 1em or 2em. But Typst not.
-
Method: So far, proper Global settings (Welcome your contributions!):
- latin-in-cjk:
#show regex("[0-9\p{Latin}+]"): set text(font:"Font") - lang and region: hyphenation, smartquote, minor choices
- smartquote: quote marks choice, default enabled. If use cjk, the quote marks in latin turns into cjk.
- raw and math box/block: set mono or math fonts separately
- emph (skew box): there are no italic CJK fonts usually, so try fake italic. But in Chinese typesetting, it should be a circle point under every emph char.
- latin-in-cjk:
-
Best Practice:
#set text(10pt)
Libertinus _Serif_ *En:* a,b.c?d!e'f'g"h"i\`j\`k~l\@m\#n\$o%p^q&J\*K-L\_M=N+O\\P|Q(R[S{T\<U\>V}W]X)Y/Z;
无豆腐 _宋体_ *简中:*〇,一。二?两!仨‘三’四“五”六·七~八\@九#十¥廿%拾……\ 玖&捌\*柒--陆——伍=肆+叁、贰|壹(零【字{词《句》段}书】篇)章/节;水「平『垂❲直❳古』文」\
```pl print "花径不曾缘客扫" #春风不度 ``` $e^(i pi) + 1 = 0 "玉门关"$
#block(spacing:0.6em, line(length:100%))
#set text(font:(
(name:"Libertinus Serif", covers:"latin-in-cjk"),
"Noto Serif CJK SC"), lang:"zh", region:"CN")
#show smartquote: set text(font:"Libertinus Serif")
#show raw: set text(font:(
(name:"DejaVu Sans Mono", covers:"latin-in-cjk"),
"Noto Sans Mono CJK SC"))
#show math.equation: set text(font:(
"New Computer Modern", "Noto Serif CJK SC"))
#show emph: it => box(skew(ax:-12deg, it))
Libertinus _Serif_ *En:* a,b.c?d!e'f'g"h"i\`j\`k~l\@m\#n\$o%p^q&J\*K-L\_M=N+O\\P|Q(R[S{T\<U\>V}W]X)Y/Z;
无豆腐 _宋体_ *简中:*〇,一。二?两!仨‘三’四“五”六·七~八\@九#十¥廿%拾……\ 玖&捌\*柒--陆——伍=肆+叁、贰|壹(零【字{词《句》段}书】篇)章/节;水「平『垂❲直❳古』文」\
```pl print "花径不曾缘客扫" #春风不度 ``` $e^(i pi) + 1 = 0 "玉门关"$
Japan
Look for a best practice
Korea
Look for a best practice