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

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to