ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
Subject: Re: [NTG-context] Linebreaking in Japanese in ConTeXt
Date: Sun, 30 Apr 2023 12:42:47 +0200	[thread overview]
Message-ID: <d7b9fd81-9c3f-8793-9405-19c87a22e0d3@gmail.com> (raw)
In-Reply-To: <7B63FFB4-A181-43BF-A562-2C9CEAB64C21@rna.nl>


[-- Attachment #1.1: Type: text/plain, Size: 1353 bytes --]

Gerben Wierda via ntg-context schrieb am 30.04.2023 um 10:48:
>> On 30 Apr 2023, at 10:04, Wolfgang Schuster via ntg-context 
>> <ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>> wrote:
>>
>> %%%% begin example
>> \definefontfamily [noto-jp] [rm] [Noto Serif CJK JP]
>> \definefontfamily [noto-jp] [ss] [Noto Sans CJK JP]
>> \definetypeface   [noto-jp] [mm] [math] [pagella] [default]
>>
>> \setupbodyfont [noto-jp]
>>
>> \mainlanguage [ja]
>>
>> \setscript [nihongo]
>
> Thank you.
>
> How do I change that in my setup?
>
> My setup is creating the same stuff in different languages from XML 
> input (LMTX using lua and METAPOST), which means I need to adapt the 
> following setup (cyrillic and greek shown as the other languages with 
> different character sets I use)
>
> \startmode[JA]
> \setuplanguage[ja][patterns={ja}]\mainlanguage[ja]
> \stopmode

When your document prints only text in a single language change the 
setup above to

     \startmode [JA]
         \setscript [nihongo]
         \mainlanguage [ja]
     \stopmode

but for documents which use multiple script/languages at the same time 
replace the previous setup with

     \startsetups [japanese]
         \setscript [nihongo]
     \stopsetups

     \setuplanguage [ja] [setups=japanese]

and add \language[ja] before japanese text to ensure linebreaking is 
enabled.

Wolfgang


[-- Attachment #1.2: Type: text/html, Size: 8673 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
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	other threads:[~2023-04-30 10:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30  7:12 Gerben Wierda via ntg-context
2023-04-30  7:21 ` Gerben Wierda via ntg-context
2023-04-30  8:04 ` Wolfgang Schuster via ntg-context
2023-04-30  8:48   ` Gerben Wierda via ntg-context
2023-04-30 10:42     ` Wolfgang Schuster via ntg-context [this message]
2023-05-01 14:12       ` Henning Hraban Ramm via ntg-context

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7b9fd81-9c3f-8793-9405-19c87a22e0d3@gmail.com \
    --to=ntg-context@ntg.nl \
    --cc=wolfgang.schuster.lists@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).