Getting started with Japanese
I’d like to experiment a bit with typesetting Japanese in ConTeXt (LMTX), to see if it is doable. I tried looking for Japanese on ConTeXtgarden, but did not find anything. Can someone point me to instructions to get started with Japanese in LMTX (on macOS). Thanks, Gerben Wierda (LinkedIn https://www.linkedin.com/in/gerbenwierda) R&A Enterprise Architecture https://ea.rna.nl/ (main site) Book: Chess and the Art of Enterprise Architecture https://ea.rna.nl/the-book/ Book: Mastering ArchiMate https://ea.rna.nl/the-book-edition-iii/
Answering myself on Japanese, this actually works out of the box: \setuplanguage[ja][patterns={ja}]\mainlanguage[ja] \definefallbackfamily [archimate] [ss] [Hiragino Sans] [preset=range:japanese, tf=style:W3, it=style:W3, bf=style:W5, bi=style:W5, force=yes] \definefontfamily [archimate] [ss] [Optima] \setupbodyfont[archimate] \starttext Some text. 他のテキスト\\ \stoptext I have no idea why this works and if stuff is missing because more is needed than just the above. Of course the translation of italics into weights is nonsense, in Japanese that would probably mean using quite different characters (katakana?) Am I missing something? G
Thanks,
Gerben Wierda (LinkedIn https://www.linkedin.com/in/gerbenwierda) R&A Enterprise Architecture https://ea.rna.nl/ (main site) Book: Chess and the Art of Enterprise Architecture https://ea.rna.nl/the-book/ Book: Mastering ArchiMate https://ea.rna.nl/the-book-edition-iii/ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________
Gerben Wierda via ntg-context schrieb am 09.07.2022 um 13:58:
I’d like to experiment a bit with typesetting Japanese in ConTeXt (LMTX), to see if it is doable.
I tried looking for Japanese on ConTeXtgarden, but did not find anything.
Can someone point me to instructions to get started with Japanese in LMTX (on macOS).
1. You need a font to typeset japanese. 2. Add \setscript[nihongo] to your document to enable line breaks. %%%% begin example \definefontfamily [noto-cjk-jp] [serif] [Noto Serif CJK JP] [it={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}}] \definefontfamily [noto-cjk-jp] [sans] [Noto Sans CJK JP] [it={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}}] \definefontfamily [noto-cjk-jp] [mono] [Noto Sans Mono CJK JP] [it={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}}] \definetypeface [noto-cjk-jp] [mm] [math] [pagella] [default] \setupbodyfont [noto-cjk-jp] \setscript [nihongo] \starttext \rm\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語 \ss\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語 \tt\tf 日本語 \it 日本語 \bf 日本語 \bi 日本語 \stoptext %%%% end example Wolfgang
participants (2)
-
Gerben Wierda
-
Wolfgang Schuster