ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context] Japanese
@ 2024-02-26 20:08 Otared Kavian
  2024-02-26 20:16 ` [NTG-context] Japanese Henning Hraban Ramm
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Otared Kavian @ 2024-02-26 20:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and  commands such as \setcjkmainfont and friends.

Many thanks in advance: Otared

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-26 20:08 [NTG-context] Japanese Otared Kavian
@ 2024-02-26 20:16 ` Henning Hraban Ramm
  2024-02-26 21:49   ` Otared Kavian
  2024-02-26 20:29 ` Hans Hagen
  2024-02-26 20:32 ` Emanuel Han via ntg-context
  2 siblings, 1 reply; 28+ messages in thread
From: Henning Hraban Ramm @ 2024-02-26 20:16 UTC (permalink / raw)
  To: ntg-context

Am 26.02.24 um 21:08 schrieb Otared Kavian:
> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and  commands such as \setcjkmainfont and friends.

Try to replace the simplefonts calls with something like

\definefontfamily[myfonts][rm][SomeFont]
\definefontfamily[myfonts][ss][SomeOtherFont]

\setupbodyfont[myfonts,rm,12pt]

With Latin fonts, it usually works.

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-26 20:08 [NTG-context] Japanese Otared Kavian
  2024-02-26 20:16 ` [NTG-context] Japanese Henning Hraban Ramm
@ 2024-02-26 20:29 ` Hans Hagen
  2024-02-26 20:32 ` Emanuel Han via ntg-context
  2 siblings, 0 replies; 28+ messages in thread
From: Hans Hagen @ 2024-02-26 20:29 UTC (permalink / raw)
  To: Otared Kavian, mailing list for ConTeXt users

On 2/26/2024 9:08 PM, Otared Kavian wrote:
> Hi all,
> 
> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and  commands such as \setcjkmainfont and friends.
> 
> Many thanks in advance: Otare
there are some files "japanese-*" in the test suite; it boils down to a 
setting up a font and enabling script (because of specific spacing)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-26 20:08 [NTG-context] Japanese Otared Kavian
  2024-02-26 20:16 ` [NTG-context] Japanese Henning Hraban Ramm
  2024-02-26 20:29 ` Hans Hagen
@ 2024-02-26 20:32 ` Emanuel Han via ntg-context
  2024-02-26 21:46   ` Otared Kavian
  2 siblings, 1 reply; 28+ messages in thread
From: Emanuel Han via ntg-context @ 2024-02-26 20:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users
  Cc: mailing list for ConTeXt users, Emanuel Han


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

Unfortunately vertical typesetting is not supported by ConTeXt. That's a big pity.

If horizontal typesetting is fine, this little working example with furigana might give you some hints. Hiragino Mincho Pro should be installed by Default on MacOS.
\enableregime[utf] % enable unicoded input
\definefontfamily [JapaneseFont] [rm] [hiraginominchopro]

\setupruby[location=top,voffset=-1.6ex, ]
\starttext \JapaneseFont
\ruby{僕}{ぼく}はもう\ruby{寝}{ね}る。
お\ruby{休}{やす}みなさい^_^
\stoptext

On Feb. 26 2024, at 9:08 pm, Otared Kavian <otared@gmail.com> wrote:
> Hi all,
>
> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and commands such as \setcjkmainfont and friends.
>
> Many thanks in advance: Otared
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
>


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-26 20:32 ` Emanuel Han via ntg-context
@ 2024-02-26 21:46   ` Otared Kavian
  0 siblings, 0 replies; 28+ messages in thread
From: Otared Kavian @ 2024-02-26 21:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Emanuel,

Thanks for the example. In fact I don’t need vertical typesetting for my Japanese text, so your example works fine for me. 
Actually I had to change the name of the font to  Hiragino Mincho ProN W3 in order to get your example work.

Also I think with the recent versions of ConTeXt there is no need to add 
	\enableregime[utf]
because ConTeXt is working with Unicode any way.
I added also a line to define a math font, since I have read here on the mailing list that a math font should be set… Maybe someone among the experts can tell us if I am right, or if one has to set other fonts as well.

So your example which works fine for me is now:

% begin simple-japanese.tex
\definefontfamily [JapaneseFont] [rm] [Hiragino Mincho ProN W3]
\definefontfamily [JapaneseFont] [ss] [Hiragino Mincho ProN W3]
\definefontfamily [JapaneseFont] [mm] [math] [lucidaot] [default]

\setupbodyfont[JapaneseFont,14pt]
\setupruby[location=top,voffset=-1.6ex]
\setupwhitespace[big]

\starttext  

\ruby{僕}{ぼく}はもう\ruby{寝}{ね}る。

お\ruby{休}{やす}みなさい^_^

\stoptext
%end simple-japanese.tex

Best regards: Otared

> On 26 Feb 2024, at 21:32, Emanuel Han via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Unfortunately vertical typesetting is not supported by ConTeXt. That's a big pity.
> 
> If horizontal typesetting is fine, this little working example with furigana might give you some hints. Hiragino Mincho Pro should be installed by Default on MacOS.
> 
> \enableregime[utf] % enable unicoded input
> \definefontfamily [JapaneseFont] [rm] [hiraginominchopro]
> 
> \setupruby[location=top,voffset=-1.6ex, ]
> 
> \starttext \JapaneseFont
> 
> \ruby{僕}{ぼく}はもう\ruby{寝}{ね}る。
> 
> お\ruby{休}{やす}みなさい^_^
> 
> \stoptext
> 
> 
> 
> On Feb. 26 2024, at 9:08 pm, Otared Kavian <otared@gmail.com> wrote:
> Hi all,
> 
> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and commands such as \setcjkmainfont and friends.
> 
> Many thanks in advance: Otared
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

Otared Kavian
e-mail: otared@gmail.com
Phone: +33 6 88 26 70 95




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-26 20:16 ` [NTG-context] Japanese Henning Hraban Ramm
@ 2024-02-26 21:49   ` Otared Kavian
  2024-02-27 12:55     ` Jeong Dal via ntg-context
  0 siblings, 1 reply; 28+ messages in thread
From: Otared Kavian @ 2024-02-26 21:49 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Hi Hraban,

Your are right indeed ! I didn’t imagine that it was so easy to set up a document to write in Japanese…
Actually I followed the example by Emanuel Han which is essentially what you suggest (although he gave me also the hint to add the furagana).

Best regards: Otared

> On 26 Feb 2024, at 21:16, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> Am 26.02.24 um 21:08 schrieb Otared Kavian:
>> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
>> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and  commands such as \setcjkmainfont and friends.
> 
> Try to replace the simplefonts calls with something like
> 
> \definefontfamily[myfonts][rm][SomeFont]
> \definefontfamily[myfonts][ss][SomeOtherFont]
> 
> \setupbodyfont[myfonts,rm,12pt]
> 
> With Latin fonts, it usually works.
> 
> Hraban
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

Otared Kavian
e-mail: otared@gmail.com
Phone: +33 6 88 26 70 95





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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-26 21:49   ` Otared Kavian
@ 2024-02-27 12:55     ` Jeong Dal via ntg-context
  2024-02-28  7:34       ` Otared Kavian
  0 siblings, 1 reply; 28+ messages in thread
From: Jeong Dal via ntg-context @ 2024-02-27 12:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeong Dal


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

Dear Otared,

I am using Korean as main language.
I used use typescript file, but recently I use \definefontfamily.
Since using Japanese font is similar to use Korean font, I show my example  of using Noto fonts. It was made by the help of expert of this list long time ago.

You may change "Noto Serif CJK KR” to Japanese font.

I also use "\setscript[hangul]” when I use Korean as mainlanaguage.

I hope that you may enhance the following code.

Best regards,

Dalyoung


%%% Noto Fonts

\definefontfamily[notoFont][rm][Noto Serif CJK KR]
  [   it={style:regular,features:{*,slanted}},
      sl={style:regular,features:{*,slanted}},
      bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[notoFont][ss][Noto Sans CJK KR]
  [   it={style:regular,features:{*,slanted}},
      sl={style:regular,features:{*,slanted}},
      bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[notoFont][tt][Noto Sans Mono CJK KR]
  [   it={style:regular,features:{*,slanted}},
      sl={style:regular,features:{*,slanted}},
      bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[notoFont][math][Tex Gyre Termes Math]
%\definefontfamily[notoFonts][math][Tex Gyre Pagella Math]
%\definefontfamily[notoCJK][math][Tex Gyre Aventor]


> 2024. 2. 27. 오전 6:49, Otared Kavian <otared@gmail.com> 작성:
> 
> Hi Hraban,
> 
> Your are right indeed ! I didn’t imagine that it was so easy to set up a document to write in Japanese…
> Actually I followed the example by Emanuel Han which is essentially what you suggest (although he gave me also the hint to add the furagana).
> 
> Best regards: Otared
> 
>> On 26 Feb 2024, at 21:16, Henning Hraban Ramm <texml@fiee.net <mailto:texml@fiee.net>> wrote:
>> 
>> Am 26.02.24 um 21:08 schrieb Otared Kavian:
>>> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
>>> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and  commands such as \setcjkmainfont and friends.
>> 
>> Try to replace the simplefonts calls with something like
>> 
>> \definefontfamily[myfonts][rm][SomeFont]
>> \definefontfamily[myfonts][ss][SomeOtherFont]
>> 
>> \setupbodyfont[myfonts,rm,12pt]
>> 
>> With Latin fonts, it usually works.
>> 
>> Hraban
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / https://context.aanhet.net <https://context.aanhet.net/> (mirror)
>> archive  : https://github.com/contextgarden/context <https://github.com/contextgarden/context>
>> wiki     : https://wiki.contextgarden.net <https://wiki.contextgarden.net/>
>> ___________________________________________________________________________________
> 
> Otared Kavian
> e-mail: otared@gmail.com <mailto:otared@gmail.com>
> Phone: +33 6 88 26 70 95
> 
> 
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-27 12:55     ` Jeong Dal via ntg-context
@ 2024-02-28  7:34       ` Otared Kavian
  2024-02-28 17:34         ` Henning Hraban Ramm
  0 siblings, 1 reply; 28+ messages in thread
From: Otared Kavian @ 2024-02-28  7:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear Dalyoung,

Thank you very much for your insight. I downloaded the Noto Serif JP fonts and set up a fontfamily as you indicated, by adding
\setscript[nihongo]
which solves a problem I had with line breakings. And everything works smoothly!

So, for the mail archive, here is what I have and what works fine:

%%% Noto Fonts

\definefontfamily[JapaneseFont][rm][Noto Serif JP]
  [   it={style:regular,features:{*,slanted}},
      sl={style:regular,features:{*,slanted}},
      bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[JapaneseFont][ss][Noto Serif JP]
  [   it={style:regular,features:{*,slanted}},
      sl={style:regular,features:{*,slanted}},
      bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[JapaneseFont][tt][Noto Serif JP]
  [   it={style:regular,features:{*,slanted}},
      sl={style:regular,features:{*,slanted}},
      bi={style:bold,features:{*,slanted}},force=yes]

\definefontfamily[JapaneseFont][math][Tex Gyre Termes Math]
%\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math]
%\definefontfamily[JapaneseFont][math][Tex Gyre Aventor]

%%%%

\setupbodyfont[JapaneseFont,12pt]
\setupruby[location=top,voffset=-2ex]
\setupwhitespace[big]
\setscript[nihongo]

\starttext
\ruby{早}{はや}く。
いきましょう。
\stoptext

Best regards: Otared


> On 27 Feb 2024, at 13:55, Jeong Dal via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear Otared,
> 
> I am using Korean as main language.
> I used use typescript file, but recently I use \definefontfamily.
> Since using Japanese font is similar to use Korean font, I show my example  of using Noto fonts. It was made by the help of expert of this list long time ago.
> 
> You may change "Noto Serif CJK KR” to Japanese font.
> 
> I also use "\setscript[hangul]” when I use Korean as mainlanaguage.
> 
> I hope that you may enhance the following code.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> %%% Noto Fonts
> 
> \definefontfamily[notoFont][rm][Noto Serif CJK KR]
>   [   it={style:regular,features:{*,slanted}},
>       sl={style:regular,features:{*,slanted}},
>       bi={style:bold,features:{*,slanted}},force=yes]
> 
> \definefontfamily[notoFont][ss][Noto Sans CJK KR]
>   [   it={style:regular,features:{*,slanted}},
>       sl={style:regular,features:{*,slanted}},
>       bi={style:bold,features:{*,slanted}},force=yes]
> 
> \definefontfamily[notoFont][tt][Noto Sans Mono CJK KR]
>   [   it={style:regular,features:{*,slanted}},
>       sl={style:regular,features:{*,slanted}},
>       bi={style:bold,features:{*,slanted}},force=yes]
> 
> \definefontfamily[notoFont][math][Tex Gyre Termes Math]
> %\definefontfamily[notoFonts][math][Tex Gyre Pagella Math]
> %\definefontfamily[notoCJK][math][Tex Gyre Aventor]
> 
> 
>> 2024. 2. 27. 오전 6:49, Otared Kavian <otared@gmail.com <mailto:otared@gmail.com>> 작성:
>> 
>> Hi Hraban,
>> 
>> Your are right indeed ! I didn’t imagine that it was so easy to set up a document to write in Japanese…
>> Actually I followed the example by Emanuel Han which is essentially what you suggest (although he gave me also the hint to add the furagana).
>> 
>> Best regards: Otared
>> 
>>> On 26 Feb 2024, at 21:16, Henning Hraban Ramm <texml@fiee.net <mailto:texml@fiee.net>> wrote:
>>> 
>>> Am 26.02.24 um 21:08 schrieb Otared Kavian:
>>>> Does anyone have a simple setup of fonts to write a small Japanese document (possibly with furagana) ? I am using MacOS and I have several Japanese fonts on the system.
>>>> I have some old examples which do not typeset correctly now, maybe because they use the old module simplefonts and  commands such as \setcjkmainfont and friends.
>>> 
>>> Try to replace the simplefonts calls with something like
>>> 
>>> \definefontfamily[myfonts][rm][SomeFont]
>>> \definefontfamily[myfonts][ss][SomeOtherFont]
>>> 
>>> \setupbodyfont[myfonts,rm,12pt]
>>> 
>>> With Latin fonts, it usually works.
>>> 
>>> Hraban
>>> ___________________________________________________________________________________
>>> If your question is of interest to others as well, please add an entry to the Wiki!
>>> 
>>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
>>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / https://context.aanhet.net <https://context.aanhet.net/> (mirror)
>>> archive  : https://github.com/contextgarden/context <https://github.com/contextgarden/context>
>>> wiki     : https://wiki.contextgarden.net <https://wiki.contextgarden.net/>
>>> ___________________________________________________________________________________
>> 
>> Otared Kavian
>> e-mail: otared@gmail.com <mailto:otared@gmail.com>
>> Phone: +33 6 88 26 70 95
>> 
>> 
>> 
>> 
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl>
>> webpage  : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / https://context.aanhet.net <https://context.aanhet.net/> (mirror)
>> archive  : https://github.com/contextgarden/context <https://github.com/contextgarden/context>
>> wiki     : https://wiki.contextgarden.net <https://wiki.contextgarden.net/>
>> ___________________________________________________________________________________
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

Otared Kavian
e-mail: otared@gmail.com
Phone: +33 6 88 26 70 95





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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28  7:34       ` Otared Kavian
@ 2024-02-28 17:34         ` Henning Hraban Ramm
  2024-02-28 18:44           ` Jean-Pierre Delange
  0 siblings, 1 reply; 28+ messages in thread
From: Henning Hraban Ramm @ 2024-02-28 17:34 UTC (permalink / raw)
  To: ntg-context

Am 28.02.24 um 08:34 schrieb Otared Kavian:
> Dear Dalyoung,
> 
> Thank you very much for your insight. I downloaded the Noto Serif JP 
> fonts and set up a fontfamily as you indicated, by adding
> \setscript[nihongo]
> which solves a problem I had with line breakings. And everything works 
> smoothly!
> 
> So, for the mail archive, here is what I have and what works fine:
> 
> %%% Noto Fonts
> 
> \definefontfamily[JapaneseFont][rm][Noto Serif JP]
>    [   it={style:regular,features:{*,slanted}},
>        sl={style:regular,features:{*,slanted}},
>        bi={style:bold,features:{*,slanted}},force=yes]
> 
> \definefontfamily[JapaneseFont][ss][Noto Serif JP]
>    [   it={style:regular,features:{*,slanted}},
>        sl={style:regular,features:{*,slanted}},
>        bi={style:bold,features:{*,slanted}},force=yes]
> 
> \definefontfamily[JapaneseFont][tt][Noto Serif JP]
>    [   it={style:regular,features:{*,slanted}},
>        sl={style:regular,features:{*,slanted}},
>        bi={style:bold,features:{*,slanted}},force=yes]
> 
> \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math]
> %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math]
> %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor]
> 
> %%%%
> 
> \setupbodyfont[JapaneseFont,12pt]
> \setupruby[location=top,voffset=-2ex]
> \setupwhitespace[big]
> \setscript[nihongo]
> 
> \starttext
> \ruby{早}{はや}く。
> いきましょう。
> \stoptext
> 
> Best regards: Otared

Thanks all contributors, I added this to 
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean

I guess you also should set \mainlanguage[ja], I added it, also 
\mainlanguage[kr] for Korean.

I don’t know if the setups for Chinese and Korean are still valid, I 
just removed \setencoding.

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28 17:34         ` Henning Hraban Ramm
@ 2024-02-28 18:44           ` Jean-Pierre Delange
  2024-02-28 19:51             ` Emanuel Han via ntg-context
  0 siblings, 1 reply; 28+ messages in thread
From: Jean-Pierre Delange @ 2024-02-28 18:44 UTC (permalink / raw)
  To: ntg-context

Hi Hraban !

I also used to write this, if the main language is European :

\definefallbackfamily [mainface] [rm] [ipamincho] 
[range=cjkunifiedideographs]

Hope this is useful anymore,

JP

Le 28/02/2024 à 18:34, Henning Hraban Ramm a écrit :
> Am 28.02.24 um 08:34 schrieb Otared Kavian:
>> Dear Dalyoung,
>>
>> Thank you very much for your insight. I downloaded the Noto Serif JP 
>> fonts and set up a fontfamily as you indicated, by adding
>> \setscript[nihongo]
>> which solves a problem I had with line breakings. And everything 
>> works smoothly!
>>
>> So, for the mail archive, here is what I have and what works fine:
>>
>> %%% Noto Fonts
>>
>> \definefontfamily[JapaneseFont][rm][Noto Serif JP]
>>    [   it={style:regular,features:{*,slanted}},
>>        sl={style:regular,features:{*,slanted}},
>>        bi={style:bold,features:{*,slanted}},force=yes]
>>
>> \definefontfamily[JapaneseFont][ss][Noto Serif JP]
>>    [   it={style:regular,features:{*,slanted}},
>>        sl={style:regular,features:{*,slanted}},
>>        bi={style:bold,features:{*,slanted}},force=yes]
>>
>> \definefontfamily[JapaneseFont][tt][Noto Serif JP]
>>    [   it={style:regular,features:{*,slanted}},
>>        sl={style:regular,features:{*,slanted}},
>>        bi={style:bold,features:{*,slanted}},force=yes]
>>
>> \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math]
>> %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math]
>> %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor]
>>
>> %%%%
>>
>> \setupbodyfont[JapaneseFont,12pt]
>> \setupruby[location=top,voffset=-2ex]
>> \setupwhitespace[big]
>> \setscript[nihongo]
>>
>> \starttext
>> \ruby{早}{はや}く。
>> いきましょう。
>> \stoptext
>>
>> Best regards: Otared
>
> Thanks all contributors, I added this to 
> https://wiki.contextgarden.net/Chinese_Japanese_and_Korean
>
> I guess you also should set \mainlanguage[ja], I added it, also 
> \mainlanguage[kr] for Korean.
>
> I don’t know if the setups for Chinese and Korean are still valid, I 
> just removed \setencoding.
>
> Hraban
> ___________________________________________________________________________________ 
>
> If your question is of interest to others as well, please add an entry 
> to the Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net 
> (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________ 
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28 18:44           ` Jean-Pierre Delange
@ 2024-02-28 19:51             ` Emanuel Han via ntg-context
  2024-02-28 20:54               ` Henning Hraban Ramm
                                 ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Emanuel Han via ntg-context @ 2024-02-28 19:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Emanuel Han


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

Thank you all for your suggestions and contributions to the wiki.

I don't intend to nag, but when looking at what ConTeXt is producing, I need to state that the result is still far away from a properly typeset Japanese text.
So the nihongo script which comes with ConTeXt handles line breaks / line wrapping. But the line break rules defined in it need a rework, because they don't follow the standards. The standards are documented here: https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters , and all affected characters are listed here: https://www.w3.org/TR/jlreq/tables/table_en3.pdf
We have different rules, depending what kind of character is surpassing the text width (or is in its last position).
Rule 1:
Before closing brackets, closing quotation marks, iteration marks, the Prolonged sound mark and small Kana, line breaking is prohibited.
’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc.
The actual programmed behaviour by the nihongo script is that, if in the position which exceeds the line width, these characters jump to the next line and take the previous character with them. If they're in the last position of the line, they stay where they are. This behaviour is correct.
Rule 2:
After opening Brackets and opening quotation marks, line breaking is prohibited (but not before).
‘“(〔[{〈《「『【
The actual programmed behaviour by the nihongo script is that these characters jump to the next line and take the previous character with them. This behaviour is wrong. They should jump to the next line without taking the previous character with them, just like any regular character. The difference to a regular character is that they jump already when still within the line length, and they're in the last position of the line. The correct behaviour can be seen in LibreOffice Writer in action.
Rule 3:
Comma (tōten), full width comma, full stop
、,。
The actual programmed behaviour by the nihongo script is that, if in the position which exceeds the line width, these characters jump to the next line and take the previous character with them. This behaviour is wrong.
They have to be put back to the end of the previous line, but beyond the specified line length. (JIS Z 8125) (Search for "Line adjustment by hanging punctuation" under https://www.w3.org/TR/jlreq/ )
If they're in the last position of the line, they stay where they are. The correct behaviour can be seen in LibreOffice Writer in action.

Rules 4, 5, ...:
Combinations of inseparable characters... (see https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_character ) and eventually more, which I didn't test.
It might be useful to define three scripts nihongo_loose, nihongo_strict and nihongo_very_strict which each implement one of the 3 cases described here: https://www.w3.org/TR/jlreq/#addendum_a
According the line gap (Otared uses \setupwhitespace[big], which is exceeding common line gaps), I'd like to quote from https://www.w3.org/TR/jlreq/ :
It is common that the line gap for the kihon-hanmen is set to a value between half-em spacing and the one em spacing of the character frame used for the kihon-hanmen. Half-em spacing can be chosen in cases where the line length is short, but one em spacing or close to it is more appropriate when the line length is longer than 35 characters.
I like the standard line gap which is provided by ConTeXt, which is equivalent to \setupwhitespace[0pt]. Even when using ruby, it works well. I found the best voffset for ruby to be -1.7ex.
The line adjustment provided by ConTeXt by default is not meeting the needs for Japanese (and Chinese) text, which follow a grid pattern. Especially the last line of a paragraph is squeezed, which is "hurting the eye".
When characters need to jump to the next line due to previously discussed line breaking rules, ConTeXt seems to apply "Line adjustment by inter-character spacing expansion", which is a valid method according to https://www.w3.org/TR/jlreq/#line_adjustment , although "Line adjustment by inter-character spacing reduction" is preferred.
The last point which ConTeXt is missing, when talking about Japanese typesetting, is vertical writing.
I know, this is a lot of work. Hopefully we can achieve with joint efforts to make ConTeXt Japanese ready.
If I happen to have made false statements, please accept my apology. I tried to be of help as far as I could. I grew up in Japan and know more or less how typeset text should look like.
Emanuel
On Feb. 28 2024, at 7:44 pm, Jean-Pierre Delange <adeimantos@free.fr> wrote:
> Hi Hraban !
>
> I also used to write this, if the main language is European :
> \definefallbackfamily [mainface] [rm] [ipamincho]
> [range=cjkunifiedideographs]
>
> Hope this is useful anymore,
> JP
> Le 28/02/2024 à 18:34, Henning Hraban Ramm a écrit :
> > Am 28.02.24 um 08:34 schrieb Otared Kavian:
> >> Dear Dalyoung,
> >>
> >> Thank you very much for your insight. I downloaded the Noto Serif JP
> >> fonts and set up a fontfamily as you indicated, by adding
> >> \setscript[nihongo]
> >> which solves a problem I had with line breakings. And everything
> >> works smoothly!
> >>
> >> So, for the mail archive, here is what I have and what works fine:
> >>
> >> %%% Noto Fonts
> >>
> >> \definefontfamily[JapaneseFont][rm][Noto Serif JP]
> >> [ it={style:regular,features:{*,slanted}},
> >> sl={style:regular,features:{*,slanted}},
> >> bi={style:bold,features:{*,slanted}},force=yes]
> >>
> >> \definefontfamily[JapaneseFont][ss][Noto Serif JP]
> >> [ it={style:regular,features:{*,slanted}},
> >> sl={style:regular,features:{*,slanted}},
> >> bi={style:bold,features:{*,slanted}},force=yes]
> >>
> >> \definefontfamily[JapaneseFont][tt][Noto Serif JP]
> >> [ it={style:regular,features:{*,slanted}},
> >> sl={style:regular,features:{*,slanted}},
> >> bi={style:bold,features:{*,slanted}},force=yes]
> >>
> >> \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math]
> >> %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math]
> >> %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor]
> >>
> >> %%%%
> >>
> >> \setupbodyfont[JapaneseFont,12pt]
> >> \setupruby[location=top,voffset=-2ex]
> >> \setupwhitespace[big]
> >> \setscript[nihongo]
> >>
> >> \starttext
> >> \ruby{早}{はや}く。
> >> いきましょう。
> >> \stoptext
> >>
> >> Best regards: Otared
> >
> > Thanks all contributors, I added this to
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean
> >
> > I guess you also should set \mainlanguage[ja], I added it, also
> > \mainlanguage[kr] for Korean.
> >
> > I don’t know if the setups for Chinese and Korean are still valid, I
> > just removed \setencoding.
> >
> > Hraban
> > ___________________________________________________________________________________
> >
> > If your question is of interest to others as well, please add an entry
> > to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage : https://www.pragma-ade.nl / https://context.aanhet.net
> > (mirror)
> > archive : https://github.com/contextgarden/context
> > wiki : https://wiki.contextgarden.net
> > ___________________________________________________________________________________
> >
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
>


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28 19:51             ` Emanuel Han via ntg-context
@ 2024-02-28 20:54               ` Henning Hraban Ramm
  2024-02-28 21:18               ` Wolfgang Schuster
                                 ` (2 subsequent siblings)
  3 siblings, 0 replies; 28+ messages in thread
From: Henning Hraban Ramm @ 2024-02-28 20:54 UTC (permalink / raw)
  To: ntg-context

Am 28.02.24 um 20:51 schrieb Emanuel Han via ntg-context:
> Thank you all for your suggestions and contributions to the wiki.
> 
> I don't intend to nag, but when looking at what ConTeXt is producing, I 
> need to state that the result is still far away from a properly typeset 
> Japanese text.

That’s the result of apparently nobody having an interest in it and the 
developers not knowing enough about CJK.
(Look at Arabic: Without Idris and the funding for OrientalTeX, the 
support would be just not there.)

Often enough people demand features but don’t stay long enough to evolve 
them until they’re “ready for prime time”.

Now it’s your chance to make it better.
Don’t give up.

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28 19:51             ` Emanuel Han via ntg-context
  2024-02-28 20:54               ` Henning Hraban Ramm
@ 2024-02-28 21:18               ` Wolfgang Schuster
  2024-02-29 14:18               ` Jeong Dal via ntg-context
  2024-03-01  7:04               ` luigi scarso
  3 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Schuster @ 2024-02-28 21:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Emanuel Han via ntg-context


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

Emanuel Han via ntg-context schrieb am 28.02.2024 um 20:51:
> Thank you all for your suggestions and contributions to the wiki.
>
> I don't intend to nag, but when looking at what ConTeXt is producing, 
> I need to state that the result is still far away from a properly 
> typeset Japanese text.
>
> So the nihongo script which comes with ConTeXt handles *line breaks / 
> line wrapping*. But the line break rules defined in it need a rework, 
> because they don't follow the standards. The standards are documented 
> here: 
> https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters 
> , and all affected characters are listed here: 
> https://www.w3.org/TR/jlreq/tables/table_en3.pdf
>
> We have different rules, depending what kind of character is 
> surpassing the text width (or is in its last position).
>
> Rule 1:
>
> Before closing brackets, closing quotation marks, iteration marks, the 
> Prolonged sound mark and small Kana, line breaking is prohibited.
>
> ’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc.
>
> The actual programmed behaviour by the nihongo script is that, if in 
> the position which exceeds the line width,  these characters jump to 
> the next line and take the previous character with them. If they're in 
> the last position of the line, they stay where they are. This 
> behaviour is correct.
>
> Rule 2:
>
> After opening Brackets and opening quotation marks, line breaking is 
> prohibited (but not before).
>
> ‘“(〔[{〈《「『【
>
> The actual programmed behaviour by the nihongo script is that these 
> characters jump to the next line and take the previous character with 
> them. This behaviour is wrong. They should jump to the next line 
> without taking the previous character with them, just like any regular 
> character. The difference to a regular character is that they jump 
> already when still within the line length, and they're in the last 
> position of the line. The correct behaviour can be seen in LibreOffice 
> Writer in action.

Can you provide a minimal example because this should be correct and if 
not it's a bug.

> Rule 3:
> Comma (tōten), full width comma, full stop
>
> 、,。
>
> The actual programmed behaviour by the nihongo script is that, if in 
> the position which exceeds the line width, these characters jump to 
> the next line and take the previous character with them. This 
> behaviour is wrong.
> They have to be put back to the end of the previous line, but beyond 
> the specified line length. (JIS Z 8125) (Search for "Line adjustment 
> by hanging punctuation" under https://www.w3.org/TR/jlreq/ )
> If they're in the last position of the line, they stay where they are. 
> The correct behaviour can be seen in LibreOffice Writer in action.

This is handled by the protrusion mechanism and enabled with paragraph 
alignment.

> Rules 4, 5, ...:
> Combinations of inseparable characters... (see 
> https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_character 
> ) and eventually more, which I didn't test.
>
> It might be useful to define three scripts nihongo_loose, 
> nihongo_strict and nihongo_very_strict which each implement one of the 
> 3 cases described here: https://www.w3.org/TR/jlreq/#addendum_a
>
> According the *line gap* (Otared uses \setupwhitespace[big], which is 
> exceeding common line gaps), I'd like to quote from 
> https://www.w3.org/TR/jlreq/ :
>
> /It is common that the line gap for the kihon-hanmen is set to a value 
> between half-em spacing and the one em spacing of the character frame 
> used for the kihon-hanmen. Half-em spacing can be chosen in cases 
> where the line length is short, but one em spacing or close to it is 
> more appropriate when the line length is longer than 35 characters./
>
> I like the standard line gap which is provided by ConTeXt, which is 
> equivalent to \setupwhitespace/[0pt]/. Even when using ruby, it works 
> well. I found the best voffset for ruby to be -1.7ex.

The \setupwhitespace setting controls the distance between paragraphs 
but you're looking for the \setuplinespace command.

> The *line adjustment* provided by ConTeXt by default is not meeting 
> the needs for Japanese  (and Chinese) text, which follow a grid 
> pattern. Especially the last line of a paragraph is squeezed, which is 
> "hurting the eye".
> When characters need to jump to the next line due to previously 
> discussed line breaking rules, ConTeXt seems to apply "Line adjustment 
> by inter-character spacing expansion", which is a valid method 
> according to https://www.w3.org/TR/jlreq/#line_adjustment , although 
> "Line adjustment by inter-character spacing reduction" is preferred.
>
> The last point which ConTeXt is missing, when talking about Japanese 
> typesetting, is vertical writing.

Vertical typesetting is possible but only for small text blocks which 
fit on a single page. Typesetting text which spans multiple pages isn't 
supported yet (it was possible ages ago with MkII) because nobody needed 
it yet.

Wolfgang


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28 19:51             ` Emanuel Han via ntg-context
  2024-02-28 20:54               ` Henning Hraban Ramm
  2024-02-28 21:18               ` Wolfgang Schuster
@ 2024-02-29 14:18               ` Jeong Dal via ntg-context
  2024-03-01  7:04               ` luigi scarso
  3 siblings, 0 replies; 28+ messages in thread
From: Jeong Dal via ntg-context @ 2024-02-29 14:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jeong Dal


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

Hi,

In Korea, LaTeX is popular rather than ConTeXt since mathematicians initiated the use of TeX in Korea and they use LaTeX mainly.
But right now, there are so many non-math people who developed many things for Korean & LaTeX.

Many years ago, Hans and Taco visited the seminar held by KTUG.
They discussed with the experts KTUG about to use Korean.
From then, there are many progress to use Korean in ConTeXt. 
Now, I am using ConTeXt to produce textbooks and manuals in Korean with pleasure.
Unfortunately, there is a little problem in spacing, for example, “)  ,”.  It is rare case, so I can  correct it manually without problem.

In general, ConTeXt typesets Korean nicely. 
Thanks Hans and ConTeXt team.

For Koreans, I use

\mainlanguage[kr]
\setscript[hangul]


The rule of line break are very similar to that of Japanese. 
I think that “hangul” script handles it and other things.

I am just a user of ConTeXt, but if you need any information about Korean to enhance the usage of Korean in ConTeXt, please let me know.

Thanks again to Hans, team, and people in this list.

Best regards,

Dalyoung
 

> 2024. 2. 29. 오전 4:51, Emanuel Han via ntg-context <ntg-context@ntg.nl> 작성:
> 
> Thank you all for your suggestions and contributions to the wiki.
> 
> I don't intend to nag, but when looking at what ConTeXt is producing, I need to state that the result is still far away from a properly typeset Japanese text.
> 
> So the nihongo script which comes with ConTeXt handles line breaks / line wrapping. But the line break rules defined in it need a rework, because they don't follow the standards. The standards are documented here: https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters , and all affected characters are listed here: https://www.w3.org/TR/jlreq/tables/table_en3.pdf
> 
> We have different rules, depending what kind of character is surpassing the text width (or is in its last position).
> 
> Rule 1:
> 
> Before closing brackets, closing quotation marks, iteration marks, the Prolonged sound mark and small Kana, line breaking is prohibited.
> 
> ’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc.
> 
> The actual programmed behaviour by the nihongo script is that, if in the position which exceeds the line width,  these characters jump to the next line and take the previous character with them. If they're in the last position of the line, they stay where they are. This behaviour is correct.
> 
> Rule 2:
> 
> After opening Brackets and opening quotation marks, line breaking is prohibited (but not before).
> 
> ‘“(〔[{〈《「『【
> 
> The actual programmed behaviour by the nihongo script is that these characters jump to the next line and take the previous character with them. This behaviour is wrong. They should jump to the next line without taking the previous character with them, just like any regular character. The difference to a regular character is that they jump already when still within the line length, and they're in the last position of the line. The correct behaviour can be seen in LibreOffice Writer in action.
> 
> Rule 3:
> 
> Comma (tōten), full width comma, full stop
> 
> 、,。
> 
> The actual programmed behaviour by the nihongo script is that, if in the position which exceeds the line width, these characters jump to the next line and take the previous character with them. This behaviour is wrong. 
> They have to be put back to the end of the previous line, but beyond the specified line length. (JIS Z 8125) (Search for "Line adjustment by hanging punctuation" under https://www.w3.org/TR/jlreq/ )
> If they're in the last position of the line, they stay where they are. The correct behaviour can be seen in LibreOffice Writer in action.
> 
> Rules 4, 5, ...:
> 
> Combinations of inseparable characters... (see https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_character ) and eventually more, which I didn't test.
> 
> It might be useful to define three scripts nihongo_loose, nihongo_strict and nihongo_very_strict which each implement one of the 3 cases described here: https://www.w3.org/TR/jlreq/#addendum_a
> 
> According the line gap (Otared uses \setupwhitespace[big], which is exceeding common line gaps), I'd like to quote from https://www.w3.org/TR/jlreq/ :
> 
> It is common that the line gap for the kihon-hanmen is set to a value between half-em spacing and the one em spacing of the character frame used for the kihon-hanmen. Half-em spacing can be chosen in cases where the line length is short, but one em spacing or close to it is more appropriate when the line length is longer than 35 characters.
> 
> I like the standard line gap which is provided by ConTeXt, which is equivalent to \setupwhitespace[0pt]. Even when using ruby, it works well. I found the best voffset for ruby to be -1.7ex.
> 
> The line adjustment provided by ConTeXt by default is not meeting the needs for Japanese  (and Chinese) text, which follow a grid pattern. Especially the last line of a paragraph is squeezed, which is "hurting the eye".
> 
> When characters need to jump to the next line due to previously discussed line breaking rules, ConTeXt seems to apply "Line adjustment by inter-character spacing expansion", which is a valid method according to https://www.w3.org/TR/jlreq/#line_adjustment , although "Line adjustment by inter-character spacing reduction" is preferred.
> 
> The last point which ConTeXt is missing, when talking about Japanese typesetting, is vertical writing.
> 
> I know, this is a lot of work. Hopefully we can achieve with joint efforts to make ConTeXt Japanese ready.
> 
> If I happen to have made false statements, please accept my apology. I tried to be of help as far as I could. I grew up in Japan and know more or less how typeset text should look like.
> 
> Emanuel
> 
> On Feb. 28 2024, at 7:44 pm, Jean-Pierre Delange <adeimantos@free.fr> wrote:
> Hi Hraban !
> 
> I also used to write this, if the main language is European :
> 
> \definefallbackfamily [mainface] [rm] [ipamincho]
> [range=cjkunifiedideographs]
> 
> Hope this is useful anymore,
> 
> JP
> 
> Le 28/02/2024 à 18:34, Henning Hraban Ramm a écrit :
> > Am 28.02.24 um 08:34 schrieb Otared Kavian:
> >> Dear Dalyoung,
> >>
> >> Thank you very much for your insight. I downloaded the Noto Serif JP
> >> fonts and set up a fontfamily as you indicated, by adding
> >> \setscript[nihongo]
> >> which solves a problem I had with line breakings. And everything
> >> works smoothly!
> >>
> >> So, for the mail archive, here is what I have and what works fine:
> >>
> >> %%% Noto Fonts
> >>
> >> \definefontfamily[JapaneseFont][rm][Noto Serif JP]
> >>    [   it={style:regular,features:{*,slanted}},
> >>        sl={style:regular,features:{*,slanted}},
> >>        bi={style:bold,features:{*,slanted}},force=yes]
> >>
> >> \definefontfamily[JapaneseFont][ss][Noto Serif JP]
> >>    [   it={style:regular,features:{*,slanted}},
> >>        sl={style:regular,features:{*,slanted}},
> >>        bi={style:bold,features:{*,slanted}},force=yes]
> >>
> >> \definefontfamily[JapaneseFont][tt][Noto Serif JP]
> >>    [   it={style:regular,features:{*,slanted}},
> >>        sl={style:regular,features:{*,slanted}},
> >>        bi={style:bold,features:{*,slanted}},force=yes]
> >>
> >> \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math]
> >> %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math]
> >> %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor]
> >>
> >> %%%%
> >>
> >> \setupbodyfont[JapaneseFont,12pt]
> >> \setupruby[location=top,voffset=-2ex]
> >> \setupwhitespace[big]
> >> \setscript[nihongo]
> >>
> >> \starttext
> >> \ruby{早}{はや}く。
> >> いきましょう。
> >> \stoptext
> >>
> >> Best regards: Otared
> >
> > Thanks all contributors, I added this to
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean
> >
> > I guess you also should set \mainlanguage[ja], I added it, also
> > \mainlanguage[kr] for Korean.
> >
> > I don’t know if the setups for Chinese and Korean are still valid, I
> > just removed \setencoding.
> >
> > Hraban
> > ___________________________________________________________________________________
> >
> > If your question is of interest to others as well, please add an entry
> > to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage  : https://www.pragma-ade.nl / https://context.aanhet.net
> > (mirror)
> > archive  : https://github.com/contextgarden/context
> > wiki     : https://wiki.contextgarden.net
> > ___________________________________________________________________________________
> >
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-02-28 19:51             ` Emanuel Han via ntg-context
                                 ` (2 preceding siblings ...)
  2024-02-29 14:18               ` Jeong Dal via ntg-context
@ 2024-03-01  7:04               ` luigi scarso
  2024-03-01 12:08                 ` Emanuel Han via ntg-context
  3 siblings, 1 reply; 28+ messages in thread
From: luigi scarso @ 2024-03-01  7:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

On Wed, 28 Feb 2024 at 20:53, Emanuel Han via ntg-context <
ntg-context@ntg.nl> wrote:

> Thank you all for your suggestions and contributions to the wiki.
>
> I don't intend to nag, but when looking at what ConTeXt is producing, I
> need to state that the result is still far away from a properly typeset
> Japanese text.
>
> So the nihongo script which comes with ConTeXt handles *line breaks /
> line wrapping*. But the line break rules defined in it need a rework,
> because they don't follow the standards. The standards are documented here:
> https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters
> , and all affected characters are listed here:
> https://www.w3.org/TR/jlreq/tables/table_en3.pdf
>
> We have different rules, depending what kind of character is surpassing
> the text width (or is in its last position).
>
> Rule 1:
>
> Before closing brackets, closing quotation marks, iteration marks, the
> Prolonged sound mark and small Kana, line breaking is prohibited.
>
> ’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc.
>
> The actual programmed behaviour by the nihongo script is that, if in the
> position which exceeds the line width,  these characters jump to the next
> line and take the previous character with them. If they're in the last
> position of the line, they stay where they are. This behaviour is correct.
>
> Rule 2:
>
> After opening Brackets and opening quotation marks, line breaking is
> prohibited (but not before).
>
> ‘“(〔[{〈《「『【
>
> The actual programmed behaviour by the nihongo script is that these
> characters jump to the next line and take the previous character with them.
> This behaviour is wrong. They should jump to the next line without taking
> the previous character with them, just like any regular character. The
> difference to a regular character is that they jump already when still
> within the line length, and they're in the last position of the line. The
> correct behaviour can be seen in LibreOffice Writer in action.
>
> Rule 3:
>
> Comma (tōten), full width comma, full stop
>
> 、,。
>
> The actual programmed behaviour by the nihongo script is that, if in the
> position which exceeds the line width, these characters jump to the next
> line and take the previous character with them. This behaviour is wrong.
> They have to be put back to the end of the previous line, but beyond the
> specified line length. (JIS Z 8125) (Search for "Line adjustment by hanging
> punctuation" under https://www.w3.org/TR/jlreq/ )
> If they're in the last position of the line, they stay where they are. The
> correct behaviour can be seen in LibreOffice Writer in action.
>
> Rules 4, 5, ...:
>
> Combinations of inseparable characters... (see
> https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_character
> ) and eventually more, which I didn't test.
>
> It might be useful to define three scripts nihongo_loose, nihongo_strict
> and nihongo_very_strict which each implement one of the 3 cases described
> here: https://www.w3.org/TR/jlreq/#addendum_a
>
> According the *line gap* (Otared uses \setupwhitespace[big], which is
> exceeding common line gaps), I'd like to quote from
> https://www.w3.org/TR/jlreq/ :
>
> *It is common that the line gap for the kihon-hanmen is set to a value
> between half-em spacing and the one em spacing of the character frame used
> for the kihon-hanmen. Half-em spacing can be chosen in cases where the line
> length is short, but one em spacing or close to it is more appropriate when
> the line length is longer than 35 characters.*
>
> I like the standard line gap which is provided by ConTeXt, which is
> equivalent to \setupwhitespace*[0pt]*. Even when using ruby, it works
> well. I found the best voffset for ruby to be -1.7ex.
>
> The *line adjustment* provided by ConTeXt by default is not meeting the
> needs for Japanese  (and Chinese) text, which follow a grid pattern.
> Especially the last line of a paragraph is squeezed, which is "hurting the
> eye".
>
> When characters need to jump to the next line due to previously discussed
> line breaking rules, ConTeXt seems to apply "Line adjustment by
> inter-character spacing expansion", which is a valid method according to
> https://www.w3.org/TR/jlreq/#line_adjustment , although "Line adjustment
> by inter-character spacing reduction" is preferred.
>
> The last point which ConTeXt is missing, when talking about Japanese
> typesetting, is vertical writing.
>
> I know, this is a lot of work. Hopefully we can achieve with joint efforts
> to make ConTeXt Japanese ready.
>
> If I happen to have made false statements, please accept my apology. I
> tried to be of help as far as I could. I grew up in Japan and know more or
> less how typeset text should look like.
>
> Emanuel
>
>
It would be nice if you can put your notes above into
https://wiki.contextgarden.net/Chinese_Japanese_and_Korean
or in general improve/maintain that page
(e.g. the links about the fonts are broken at the moment)
Perhaps with Jeong Dal ?
Just to say, a few days ago I have seen
https://ken-lunde.medium.com/genuine-han-unification-redux-3912b561ecae
(only webp images, so a bit tricky to make a pdf)

--
luigi

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-01  7:04               ` luigi scarso
@ 2024-03-01 12:08                 ` Emanuel Han via ntg-context
  2024-03-01 13:59                   ` Wolfgang Schuster
  0 siblings, 1 reply; 28+ messages in thread
From: Emanuel Han via ntg-context @ 2024-03-01 12:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Emanuel Han


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

Dear all, thanks for your contributions.

Sure I'll update the https://wiki.contextgarden.net/Chinese_Japanese_and_Korean hopefully with the help of Jeong Dal and others as soon as things are sorted out.
In attached example, the opening Brackets (I marked them with \color[red]{【} and \color[red]{{}) are taking the previous character with them to the next line. Please remove these to see that the previous character would stay on the previous line. Thanks Wolfgang for checking wether this is a bug.
I was not successful in figuring out how the protrusion mechanism can be set in order to keep full stops and commas on the previous line (protruding the column box). Could you please give me a hint, Wolfgang? Thanks. There's a \color[red]{。} in my example which should not jump to the next line.
My example follows the Kihon-hanmen dimensioning as described in https://www.w3.org/TR/jlreq . What could be the reason that lines which could hold 25 characters are having only 24 characters, for example lines 2, 3 or 13 in column 1? I would expect them to have 25 characters, the same as for example lines 7, 9 or 16 in column 1.
How can I change alignment of the lines so that the highest character boxes align with the top border of the layout boxes for text and header and with the bottom border of the layout box for footer? I hope that when this is achieved for the layout box for text, then this box would hold the expected 45 lines, and not 44 lines as it is doing now. Ruby characters in the first line should protrude the box, what they already do.
I tried to implement the 1em hskip of the header and footer away from the page border. While it works for left aligned headers and footers, it doesn't for the right aligned headers and footers (negative hskip has no effect). How to solve this problem?
Also how to get rid of the first empty page?
I'm happy to get suggestions for improving my example code. This example could then be put to the wiki.
I try to continue to work on making ConTeXt usable for Japanese with the help of you all. Next step might be the realm and position of headings which seem complicated and for which I have no ideas.
Best regards
Emanuel

On März 1 2024, at 8:04 am, luigi scarso <luigi.scarso@gmail.com> wrote:
>
>
> On Wed, 28 Feb 2024 at 20:53, Emanuel Han via ntg-context <ntg-context@ntg.nl (mailto:ntg-context@ntg.nl)> wrote:
> > Thank you all for your suggestions and contributions to the wiki.
> >
> > I don't intend to nag, but when looking at what ConTeXt is producing, I need to state that the result is still far away from a properly typeset Japanese text.
> > So the nihongo script which comes with ConTeXt handles line breaks / line wrapping. But the line break rules defined in it need a rework, because they don't follow the standards. The standards are documented here: https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters , and all affected characters are listed here: https://www.w3.org/TR/jlreq/tables/table_en3.pdf
> > We have different rules, depending what kind of character is surpassing the text width (or is in its last position).
> > Rule 1:
> > Before closing brackets, closing quotation marks, iteration marks, the Prolonged sound mark and small Kana, line breaking is prohibited.
> > ’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc.
> > The actual programmed behaviour by the nihongo script is that, if in the position which exceeds the line width, these characters jump to the next line and take the previous character with them. If they're in the last position of the line, they stay where they are. This behaviour is correct.
> > Rule 2:
> > After opening Brackets and opening quotation marks, line breaking is prohibited (but not before).
> > ‘“(〔[{〈《「『【
> > The actual programmed behaviour by the nihongo script is that these characters jump to the next line and take the previous character with them. This behaviour is wrong. They should jump to the next line without taking the previous character with them, just like any regular character. The difference to a regular character is that they jump already when still within the line length, and they're in the last position of the line. The correct behaviour can be seen in LibreOffice Writer in action.
> > Rule 3:
> > Comma (tōten), full width comma, full stop
> > 、,。
> > The actual programmed behaviour by the nihongo script is that, if in the position which exceeds the line width, these characters jump to the next line and take the previous character with them. This behaviour is wrong.
> > They have to be put back to the end of the previous line, but beyond the specified line length. (JIS Z 8125) (Search for "Line adjustment by hanging punctuation" under https://www.w3.org/TR/jlreq/ )
> > If they're in the last position of the line, they stay where they are. The correct behaviour can be seen in LibreOffice Writer in action.
> >
> > Rules 4, 5, ...:
> > Combinations of inseparable characters... (see https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_character ) and eventually more, which I didn't test.
> > It might be useful to define three scripts nihongo_loose, nihongo_strict and nihongo_very_strict which each implement one of the 3 cases described here: https://www.w3.org/TR/jlreq/#addendum_a
> > According the line gap (Otared uses \setupwhitespace[big], which is exceeding common line gaps), I'd like to quote from https://www.w3.org/TR/jlreq/ :
> > It is common that the line gap for the kihon-hanmen is set to a value between half-em spacing and the one em spacing of the character frame used for the kihon-hanmen. Half-em spacing can be chosen in cases where the line length is short, but one em spacing or close to it is more appropriate when the line length is longer than 35 characters.
> > I like the standard line gap which is provided by ConTeXt, which is equivalent to \setupwhitespace[0pt]. Even when using ruby, it works well. I found the best voffset for ruby to be -1.7ex.
> > The line adjustment provided by ConTeXt by default is not meeting the needs for Japanese (and Chinese) text, which follow a grid pattern. Especially the last line of a paragraph is squeezed, which is "hurting the eye".
> > When characters need to jump to the next line due to previously discussed line breaking rules, ConTeXt seems to apply "Line adjustment by inter-character spacing expansion", which is a valid method according to https://www.w3.org/TR/jlreq/#line_adjustment , although "Line adjustment by inter-character spacing reduction" is preferred.
> > The last point which ConTeXt is missing, when talking about Japanese typesetting, is vertical writing.
> > I know, this is a lot of work. Hopefully we can achieve with joint efforts to make ConTeXt Japanese ready.
> > If I happen to have made false statements, please accept my apology. I tried to be of help as far as I could. I grew up in Japan and know more or less how typeset text should look like.
> > Emanuel
>
> It would be nice if you can put your notes above into
> https://wiki.contextgarden.net/Chinese_Japanese_and_Korean
>
> or in general improve/maintain that page
>
> (e.g. the links about the fonts are broken at the moment)
>
> Perhaps with Jeong Dal ?
>
> Just to say, a few days ago I have seen
> https://ken-lunde.medium.com/genuine-han-unification-redux-3912b561ecae
>
> (only webp images, so a bit tricky to make a pdf)
>
> --
> luigi
>
>


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

[-- Attachment #2: japanese_mwe.tex --]
[-- Type: application/x-tex, Size: 14510 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-01 12:08                 ` Emanuel Han via ntg-context
@ 2024-03-01 13:59                   ` Wolfgang Schuster
  2024-03-01 15:23                     ` Emanuel Han via ntg-context
  0 siblings, 1 reply; 28+ messages in thread
From: Wolfgang Schuster @ 2024-03-01 13:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Emanuel Han via ntg-context

Emanuel Han via ntg-context schrieb am 01.03.2024 um 13:08:
> Dear all, thanks for your contributions.
>
> Sure I'll update the 
> https://wiki.contextgarden.net/Chinese_Japanese_and_Korean hopefully 
> with the help of Jeong Dal and others as soon as things are sorted out.
>
> In attached example, the opening Brackets (I marked them with 
> \color[red]{【} and \color[red]{{}) are taking the previous character 
> with them to the next line. Please remove these to see that the 
> previous character would stay on the previous line. Thanks Wolfgang 
> for checking wether this is a bug.

Can you stick to fonts which are available for all systems (e.g. Noto 
CJK) because system fonts are a pain when you're on a different system.

The missing line break before 【 is caused by a wrong table entry in 
scrp-cjk.lua and I guess the following change is necessary

local japanese_2 = {
     jamo_initial     = korean_break,
     korean           = stretch_break,
     chinese          = stretch_break,
     hiragana         = stretch_break,
     katakana         = stretch_break,
     half_width_open  = nobreak_stretch_break_autoshrink,
     half_width_close = nobreak_stretch,
-   full_width_open  = nobreak_stretch_break_shrink,
+   full_width_open  = stretch_break,
     full_width_close = nobreak_stretch,
     full_width_punct = japanese_before_full_width_punct, -- 
nobreak_stretch,
     hyphen           = nobreak_stretch,
     non_starter      = nobreak_stretch,
     other            = stretch_break,
}

but there can be more wrong entries.

> I was not successful in figuring out how the protrusion mechanism can 
> be set in order to keep full stops and commas on the previous line 
> (protruding the column box). Could you please give me a hint, 
> Wolfgang? Thanks. There's a \color[red]{。} in my example which should 
> not jump to the next line.

Adding the first and last line to your example document worked for me.

\definefontfeature [default] [default] [protrusion=pure]

\definefontfamily [...] [...] [...]

\setupbodyfont [...]

\setupalign [hanging]

> My example follows the Kihon-hanmen dimensioning as described in 
> https://www.w3.org/TR/jlreq . What could be the reason that lines 
> which could hold 25 characters are having only 24 characters, for 
> example lines 2, 3 or 13 in column 1? I would expect them to have 25 
> characters, the same as for example lines 7, 9 or 16 in column 1.

I guess the par builder is responsible for this when it arranges the 
paragraph but this is just a guess.

> How can I change alignment of the lines so that the highest character 
> boxes align with the top border of the layout boxes for text and 
> header and with the bottom border of the layout box for footer? I hope 
> that when this is achieved for the layout box for text, then this box 
> would hold the expected 45 lines, and not 44 lines as it is doing now. 
> Ruby characters in the first line should protrude the box, what they 
> already do.
> I tried to implement the 1em hskip of the header and footer away from 
> the page border. While it works for left aligned headers and footers, 
> it doesn't for the right aligned headers and footers (negative hskip 
> has no effect). How to solve this problem?

Do you a proper example of the layout?

Setting a few values is not enough because TeX doesn't work the way you 
need for your layout. Things can be improved but in cases like header 
and footer you have to tell ConTeXt there are no characters with depth.

> Also how to get rid of the first empty page?

To load a math font from a typescript you have to use the 
\definetypeface command, replace the line

     \definefontfamily [JapaneseFont] [mm] [math] [lucidaot] [default]

with

     \definetypeface [JapaneseFont] [mm] [math] [lucidaot] [default]

and the page disappears.

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-01 13:59                   ` Wolfgang Schuster
@ 2024-03-01 15:23                     ` Emanuel Han via ntg-context
  2024-03-01 16:19                       ` Henning Hraban Ramm
  2024-03-02 18:00                       ` Wolfgang Schuster
  0 siblings, 2 replies; 28+ messages in thread
From: Emanuel Han via ntg-context @ 2024-03-01 15:23 UTC (permalink / raw)
  To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users, Emanuel Han


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

Dear Wolfgang,

thank you for your valuable remarks. I integrated them, see corrected attached example.
Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing.
position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line.
It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it.
Quotation from https://www.w3.org/TR/jlreq:
In principle, when composing a line with ideographic (cl-19) (https://www.w3.org/TR/jlreq/#cl-19), hiragana (cl-15) (https://www.w3.org/TR/jlreq/#cl-15) and katakana (cl-16) (https://www.w3.org/TR/jlreq/#cl-16) characters, no extra spacing appears between their character frame (https://www.w3.org/TR/jlreq/#term.character-frame). This is called solid setting (see Figure 5 (https://www.w3.org/TR/jlreq/#fig1_8)).

I made manual corrections to scrp-cjk.lua, but with no effect to the ConTeXt output of my example. Do I have to recompile ConTeXt first?
Emanuel
On März 1 2024, at 2:59 pm, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> Emanuel Han via ntg-context schrieb am 01.03.2024 um 13:08:
> > Dear all, thanks for your contributions.
> >
> > Sure I'll update the
> > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean hopefully
> > with the help of Jeong Dal and others as soon as things are sorted out.
> >
> > In attached example, the opening Brackets (I marked them with
> > \color[red]{【} and \color[red]{{}) are taking the previous character
> > with them to the next line. Please remove these to see that the
> > previous character would stay on the previous line. Thanks Wolfgang
> > for checking wether this is a bug.
>
> Can you stick to fonts which are available for all systems (e.g. Noto
> CJK) because system fonts are a pain when you're on a different system.
>
> The missing line break before 【 is caused by a wrong table entry in
> scrp-cjk.lua and I guess the following change is necessary
>
> local japanese_2 = {
> jamo_initial = korean_break,
> korean = stretch_break,
> chinese = stretch_break,
> hiragana = stretch_break,
> katakana = stretch_break,
> half_width_open = nobreak_stretch_break_autoshrink,
> half_width_close = nobreak_stretch,
> - full_width_open = nobreak_stretch_break_shrink,
> + full_width_open = stretch_break,
> full_width_close = nobreak_stretch,
> full_width_punct = japanese_before_full_width_punct, --
> nobreak_stretch,
> hyphen = nobreak_stretch,
> non_starter = nobreak_stretch,
> other = stretch_break,
> }
>
> but there can be more wrong entries.
> > I was not successful in figuring out how the protrusion mechanism can
> > be set in order to keep full stops and commas on the previous line
> > (protruding the column box). Could you please give me a hint,
> > Wolfgang? Thanks. There's a \color[red]{。} in my example which should
> > not jump to the next line.
>
> Adding the first and last line to your example document worked for me.
> \definefontfeature [default] [default] [protrusion=pure]
> \definefontfamily [...] [...] [...]
> \setupbodyfont [...]
> \setupalign [hanging]
> > My example follows the Kihon-hanmen dimensioning as described in
> > https://www.w3.org/TR/jlreq . What could be the reason that lines
> > which could hold 25 characters are having only 24 characters, for
> > example lines 2, 3 or 13 in column 1? I would expect them to have 25
> > characters, the same as for example lines 7, 9 or 16 in column 1.
>
> I guess the par builder is responsible for this when it arranges the
> paragraph but this is just a guess.
>
> > How can I change alignment of the lines so that the highest character
> > boxes align with the top border of the layout boxes for text and
> > header and with the bottom border of the layout box for footer? I hope
> > that when this is achieved for the layout box for text, then this box
> > would hold the expected 45 lines, and not 44 lines as it is doing now.
> > Ruby characters in the first line should protrude the box, what they
> > already do.
> > I tried to implement the 1em hskip of the header and footer away from
> > the page border. While it works for left aligned headers and footers,
> > it doesn't for the right aligned headers and footers (negative hskip
> > has no effect). How to solve this problem?
>
> Do you a proper example of the layout?
> Setting a few values is not enough because TeX doesn't work the way you
> need for your layout. Things can be improved but in cases like header
> and footer you have to tell ConTeXt there are no characters with depth.
>
> > Also how to get rid of the first empty page?
> To load a math font from a typescript you have to use the
> \definetypeface command, replace the line
>
> \definefontfamily [JapaneseFont] [mm] [math] [lucidaot] [default]
> with
> \definetypeface [JapaneseFont] [mm] [math] [lucidaot] [default]
> and the page disappears.
> Wolfgang

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

[-- Attachment #2: japanese_mwe.tex --]
[-- Type: application/x-tex, Size: 15283 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-01 15:23                     ` Emanuel Han via ntg-context
@ 2024-03-01 16:19                       ` Henning Hraban Ramm
  2024-03-02 18:00                       ` Wolfgang Schuster
  1 sibling, 0 replies; 28+ messages in thread
From: Henning Hraban Ramm @ 2024-03-01 16:19 UTC (permalink / raw)
  To: ntg-context

Am 01.03.24 um 16:23 schrieb Emanuel Han via ntg-context:
> I made manual corrections to scrp-cjk.lua, but with no effect to the 
> ConTeXt output of my example. Do I have to recompile ConTeXt first?

Not compile the engine (luametatex), but re-make the ConTeXt format with
context --make
and to be on the safe side, regenerate the file database with
mtxrun --generate

Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-01 15:23                     ` Emanuel Han via ntg-context
  2024-03-01 16:19                       ` Henning Hraban Ramm
@ 2024-03-02 18:00                       ` Wolfgang Schuster
  2024-03-10 16:43                         ` Emanuel Han via ntg-context
  1 sibling, 1 reply; 28+ messages in thread
From: Wolfgang Schuster @ 2024-03-02 18:00 UTC (permalink / raw)
  To: Emanuel Han; +Cc: mailing list for ConTeXt users


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

Emanuel Han schrieb am 01.03.2024 um 16:23:
> Dear Wolfgang,
>
> thank you for your valuable remarks. I integrated them, see corrected 
> attached example.
>
> Yes, correct layout examples exist. They're all showing vertical 
> writing, but the rules and principles are exactly the same for 
> horizontal writing.
>
>  *
>     position of the headers and footers:
>     https://www.w3.org/TR/jlreq/#fig1_30

See my attached gongitsune.tex example how you can squeeze text in a 
very narrow header/footer.

>  *
>     aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3

You can use the lines key for \setuplayout to let ConTeXt calculate the 
necessary value for the text height.

>  *
>     protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6

You're getting this for free because ruby text doesn't take up vertical 
space, in case vertical text is working it would now stick into the 
margins as expected.

\starttext
\ruledhbox{a \ruby{x}{y} b}
\stoptext


> In my previous mail, I wrote wrong amounts of lines. They should be 46 
> lines on one page, while the actual example doesn't show the 46th line.
>
> It would be important to identify the reason why only 24 characters 
> are used to create a line when 25 could be used. Then we can develop a 
> method to turn that mechanism off or circumvent it.
> Quotation from https://www.w3.org/TR/jlreq:
> /In principle, when composing a line with //ideographic (cl-19) 
> <https://www.w3.org/TR/jlreq/#cl-19>//, //hiragana (cl-15) 
> <https://www.w3.org/TR/jlreq/#cl-15>// and //katakana (cl-16) 
> <https://www.w3.org/TR/jlreq/#cl-16>// characters, no extra spacing 
> appears between their //character frame 
> <https://www.w3.org/TR/jlreq/#term.character-frame>//. This is called 
> solid setting (see //Figure 5 <https://www.w3.org/TR/jlreq/#fig1_8>//)./

1. ConTeXt has a mechanism to typeset Japanese texts.

2. There are flaws in the output it produces but this nothing which 
can't be fixed.

3. To fix the problems someone has to be passionate to fix them and 
we're willing to help here.

As you can see in my second example file japanese.tex there is a font 
feature to create half sized parentheses etc. which isn't supported yet 
by ConTeXt's mechanism for japanese and in case your willing to improve 
it this should be taken care of as well.

Wolfgang


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

[-- Attachment #2: japanese.tex --]
[-- Type: text/plain, Size: 1170 bytes --]

\definefontfeature [halt] [halt=yes]

\starttext

\setscript[nihongo]

\begingroup \showmakeup[glyph,fontkern]

% \startfont[file:notosanscjkjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont
% 
% \startfont[file:notosanscjkjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont
% 
% \startfont[file:notosanscjkjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont
% 
% \startfont[file:notosanscjkjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\startfont[name:notosansjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont

\startfont[name:notosansjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\startfont[name:notosansjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont

\startfont[name:notosansjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont

\endgroup

\stoptext

[-- Attachment #3: gongitsune.tex --]
[-- Type: text/plain, Size: 19053 bytes --]

% \definefontfeature [fixeddimensions] [dimensions={1,1.8,0}]
% 
% \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] [features={default,fullprotrusion,fixeddimensions}]
% \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP]  [features={default,fullprotrusion,fixeddimensions}]

% \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] [features={default,fullprotrusion}]
% \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP]  [features={default,fullprotrusion}]

\definefontfamily [noto_japanese] [rm] [Noto Serif JP] [features={default,fullprotrusion}]
\definefontfamily [noto_japanese] [ss] [Noto Sans JP]  [features={default,fullprotrusion}]

\setupbodyfont
  [noto_japanese]

\setscript
  [nihongo]

\setupalign
  [hanging]

\setupindenting
  [yes,1em]

\setupinterlinespace
  [line=2\bodyfontsize,
   height=0.9,
   depth=0.1]

\setupruby
  [style={\switchtobodyfont[6pt]}]

\setuppagenumbering
  [alternative=doublesided,
   location=none]

\setuphead
  [title,subject]
  [align=middle]

\startsetups [header:rightpage]

  \startframed [
      frame=off,
      strut=no,
      height=\headerheight,
      offset=none,
      align=low,
      roffset=1em,
  ]

    \getmarking[subject]

  \stopframed

\stopsetups

\startsetups [header:leftpage]

  \startframed [
      frame=off,
      strut=no,
      height=\headerheight,
      offset=none,
      align=low,
      loffset=1em,
  ]

    \getmarking[title]

  \stopframed

\stopsetups

\startsetups [footer:rightpage]

  \startframed [
      frame=off,
      strut=no,
      height=\headerheight,
      offset=none,
      align=low,
      roffset=1em,
  ]

    \prefixedpagenumber

  \stopframed

\stopsetups

\startsetups [footer:leftpage]

  \startframed [
      frame=off,
      strut=no,
      height=\headerheight,
      offset=none,
      align=low,
      loffset=1em,
  ]

    \prefixedpagenumber

  \stopframed

\stopsetups

\setupheadertexts
  [] [\directsetup{header:rightpage}]
  [\directsetup{header:leftpage}] []

\setupfootertexts
  [] [\directsetup{footer:rightpage}]
  [\directsetup{footer:leftpage}] []

\setupheader
  [strut=no]

\setupfooter
  [strut=no]

\setuplayout
  [grid=yes,
   header=\bodyfontsize,
   headerdistance=\bodyfontsize,
   lines=26,
   footer=\bodyfontsize,
   footerdistance=\bodyfontsize]

\definehighlight
  [sesamedot]

%\showframe
%\showgrid
%\showboxes

%\showmakeup
%  [glyph,fontkern]

\starttext

\starttitle [title={ごん狐}] [author={新美南吉},source={https://www.aozora.gr.jp/cards/000121/files/628_14895.html}]

\startsubject [title={一}]

これは、\ruby{私}{わたし}が小さいときに、村の\ruby{茂平}{もへい}というおじいさんからきいたお話です。

むかしは、私たちの村のちかくの、\ruby{中山}{なかやま}というところに小さなお城があって、中山さまというおとのさまが、おられたそうです。

その中山から、少しはなれた山の中に、「ごん\ruby{狐}{ぎつね}」という狐がいました。ごんは、\ruby{一人}{ひとり}ぼっちの小狐で、\sesamedot{しだ}の一ぱいしげった森の中に穴をほって住んでいました。そして、夜でも昼でも、あたりの村へ出てきて、いたずらばかりしました。はたけへ入って芋をほりちらしたり、\ruby{菜種}{なたね}\sesamedot{がら}の、ほしてあるのへ火をつけたり、\ruby{百姓家}{ひゃくしょうや}の裏手につるしてあるとんがらしをむしりとって、いったり、いろんなことをしました。

\ruby{或}{ある}\ruby{秋}{あき}のことでした。二、三日雨がふりつづいたその\ruby{間}{あいだ}、ごんは、外へも出られなくて穴の中にしゃがんでいました。

雨があがると、ごんは、ほっとして穴からはい出ました。空はからっと晴れていて、\ruby{百舌鳥}{もず}の声がきんきん、ひびいていました。

ごんは、村の\ruby{小川}{おがわ}の\ruby{堤}{つつみ}まで出て来ました。あたりの、すすきの穂には、まだ雨のしずくが光っていました。川は、いつもは水が\ruby{少}{すくな}いのですが、三日もの雨で、水が、どっとましていました。ただのときは水につかることのない、川べりのすすきや、\ruby{萩}{はぎ}の株が、黄いろくにごった水に横だおしになって、もまれています。ごんは\ruby{川下}{かわしも}の方へと、ぬかるみみちを歩いていきました。

ふと見ると、川の中に人がいて、何かやっています。ごんは、見つからないように、そうっと草の深いところへ歩きよって、そこからじっとのぞいてみました。

「\ruby{兵十}{ひょうじゅう}だな」と、ごんは思いました。兵十はぼろぼろの黒いきものをまくし上げて、腰のところまで水にひたりながら、魚をとる、\sesamedot{はりきり}という、網をゆすぶっていました。はちまきをした顔の横っちょうに、まるい萩の葉が一まい、大きな\ruby{黒子}{ほくろ}みたいにへばりついていました。

しばらくすると、兵十は、\sesamedot{はりきり}網の一ばんうしろの、袋のようになったところを、水の中からもちあげました。その中には、芝の根や、草の葉や、くさった木ぎれなどが、ごちゃごちゃはいっていましたが、でもところどころ、白いものがきらきら光っています。それは、ふとい\sesamedot{うなぎ}の腹や、大きな\sesamedot{きす}の腹でした。兵十は、びくの中へ、そのうなぎやきすを、ごみと一しょにぶちこみました。そして、また、袋の口をしばって、水の中へ入れました。

兵十はそれから、びくをもって川から\ruby{上}{あが}りびくを\ruby{土手}{どて}においといて、何をさがしにか、\ruby{川上}{かわかみ}の方へかけていきました。

兵十がいなくなると、ごんは、ぴょいと草の中からとび出して、びくのそばへかけつけました。ちょいと、いたずらがしたくなったのです。ごんはびくの中の魚をつかみ出しては、\sesamedot{はりきり}網のかかっているところより\ruby{下手}{しもて}の川の中を目がけて、ぽんぽんなげこみました。どの魚も、「とぼん」と音を立てながら、にごった水の中へもぐりこみました。

一ばんしまいに、太いうなぎをつかみにかかりましたが、何しろぬるぬるとすべりぬけるので、手ではつかめません。ごんはじれったくなって、頭をびくの中につッこんで、うなぎの頭を口にくわえました。うなぎは、キュッと言ってごんの首へまきつきました。そのとたんに兵十が、向うから、

「うわアぬすと狐め」と、どなりたてました。ごんは、びっくりしてとびあがりました。うなぎをふりすててにげようとしましたが、うなぎは、ごんの首にまきついたままはなれません。ごんはそのまま横っとびにとび出して一しょうけんめいに、にげていきました。

ほら穴の近くの、\sesamedot{はん}の木の下でふりかえって見ましたが、兵十は追っかけては来ませんでした。

ごんは、ほっとして、うなぎの頭をかみくだき、やっとはずして穴のそとの、草の葉の上にのせておきました。

\stopsubject

\startsubject [title={二}]

\ruby{十日}{とおか}ほどたって、ごんが、\ruby{弥助}{やすけ}というお百姓の家の裏を通りかかりますと、そこの、いちじくの木のかげで、弥助の\ruby{家内}{かない}が、おはぐろをつけていました。\ruby{鍛冶屋}{かじや}の\ruby{新兵衛}{しんべえ}の家のうらを通ると、新兵衛の家内が髪をすいていました。ごんは、

「ふふん、村に何かあるんだな」と、思いました。

「\ruby{何}{なん}だろう、秋祭かな。祭なら、太鼓や笛の音がしそうなものだ。それに第一、お宮にのぼりが立つはずだが」

こんなことを考えながらやって来ますと、いつの\ruby{間}{ま}にか、表に赤い井戸のある、兵十の家の前へ来ました。その小さな、こわれかけた家の中には、\ruby{大勢}{おおぜい}の人があつまっていました。よそいきの着物を着て、腰に\ruby{手拭}{てぬぐい}をさげたりした女たちが、表のかまどで火をたいています。大きな\ruby{鍋}{なべ}の中では、何かぐずぐず煮えていました。

「ああ、葬式だ」と、ごんは思いました。

「兵十の家のだれが死んだんだろう」

お\ruby{午}{ひる}がすぎると、ごんは、村の墓地へ行って、\ruby{六地蔵}{ろくじぞう}さんのかげにかくれていました。いいお天気で、遠く向うには、お城の\ruby{屋根瓦}{やねがわら}が光っています。墓地には、ひがん\ruby{花}{ばな}が、赤い\ruby{布}{きれ}のようにさきつづいていました。と、村の方から、カーン、カーン、と、\ruby{鐘}{かね}が鳴って来ました。葬式の出る\ruby{合図}{あいず}です。

やがて、白い着物を着た葬列のものたちがやって来るのがちらちら見えはじめました。\ruby{話声}{はなしごえ}も近くなりました。葬列は墓地へはいって来ました。人々が通ったあとには、ひがん花が、ふみおられていました。

ごんはのびあがって見ました。兵十が、白いかみしもをつけて、\ruby{位牌}{いはい}をささげています。いつもは、赤いさつま\ruby{芋}{いも}みたいな元気のいい顔が、きょうは何だかしおれていました。

「ははん、死んだのは兵十のおっ\ruby{母}{かあ}だ」

ごんはそう思いながら、頭をひっこめました。

その晩、ごんは、穴の中で考えました。

「兵十のおっ母は、\ruby{床}{とこ}についていて、うなぎが食べたいと言ったにちがいない。それで兵十が\sesamedot{はりきり}網をもち出したんだ。ところが、わしがいたずらをして、うなぎをとって来てしまった。だから兵十は、おっ母にうなぎを食べさせることができなかった。そのままおっ母は、死んじゃったにちがいない。ああ、うなぎが食べたい、うなぎが食べたいとおもいながら、死んだんだろう。ちょッ、あんないたずらをしなけりゃよかった。」

\stopsubject

\startsubject [title={三}]

兵十が、赤い井戸のところで、麦をといでいました。

兵十は今まで、おっ母と\ruby{二人}{ふたり}きりで、貧しいくらしをしていたもので、おっ母が死んでしまっては、もう一人ぼっちでした。

「おれと同じ一人ぼっちの兵十か」

こちらの\ruby{物置}{ものおき}の\ruby{後}{うしろ}から見ていたごんは、そう思いました。

ごんは物置のそばをはなれて、向うへいきかけますと、どこかで、いわしを売る声がします。

「いわしのやすうりだアい。いきのいいいわしだアい」

ごんは、その、いせいのいい声のする方へ走っていきました。と、\ruby{弥助}{やすけ}のおかみさんが、裏戸口から、

「いわしをおくれ。」と言いました。いわし\ruby{売}{うり}は、いわしのかごをつんだ車を、道ばたにおいて、ぴかぴか光るいわしを両手でつかんで、弥助の家の中へもってはいりました。ごんはそのすきまに、かごの中から、五、六ぴきのいわしをつかみ出して、もと来た方へかけだしました。そして、兵十の家の裏口から、家の中へいわしを投げこんで、穴へ\ruby{向}{むか}ってかけもどりました。途中の坂の上でふりかえって見ますと、兵十がまだ、井戸のところで麦をといでいるのが小さく見えました。

ごんは、うなぎのつぐないに、まず一つ、いいことをしたと思いました。

つぎの日には、ごんは山で\ruby{栗}{くり}をどっさりひろって、それをかかえて、兵十の家へいきました。裏口からのぞいて見ますと、兵十は、\ruby{午飯}{ひるめし}をたべかけて、\ruby{茶椀}{ちゃわん}をもったまま、ぼんやりと考えこんでいました。へんなことには兵十の\ruby{頬}{ほっ}ぺたに、かすり傷がついています。どうしたんだろうと、ごんが思っていますと、兵十がひとりごとをいいました。

「一たいだれが、いわしなんかをおれの家へほうりこんでいったんだろう。おかげでおれは、\ruby{盗人}{ぬすびと}と思われて、いわし屋のやつに、ひどい目にあわされた」と、ぶつぶつ言っています。

ごんは、これはしまったと思いました。かわいそうに兵十は、いわし屋にぶんなぐられて、あんな傷までつけられたのか。

ごんはこうおもいながら、そっと物置の方へまわってその入口に、栗をおいてかえりました。

つぎの日も、そのつぎの日もごんは、栗をひろっては、兵十の家へもって来てやりました。そのつぎの日には、栗ばかりでなく、まつたけも二、三ぼんもっていきました。

\stopsubject

\startsubject [title={四}]

月のいい晩でした。ごんは、ぶらぶらあそびに出かけました。中山さまのお城の下を通ってすこしいくと、細い道の向うから、だれか来るようです。話声が聞えます。チンチロリン、チンチロリンと松虫が鳴いています。

ごんは、道の片がわにかくれて、じっとしていました。話声はだんだん近くなりました。それは、兵十と\ruby{加助}{かすけ}というお百姓でした。

「そうそう、なあ加助」と、兵十がいいました。

「ああん?」

「おれあ、このごろ、とてもふしぎなことがあるんだ」

「何が?」

「おっ母が死んでからは、だれだか知らんが、おれに栗やまつたけなんかを、まいにちまいにちくれるんだよ」

「ふうん、だれが?」

「それがわからんのだよ。おれの知らんうちに、おいていくんだ」

ごんは、ふたりのあとをつけていきました。

「ほんとかい?」

「ほんとだとも。うそと思うなら、あした見に\ruby{来}{こ}いよ。その栗を見せてやるよ」

「へえ、へんなこともあるもんだなア」

それなり、二人はだまって歩いていきました。

加助がひょいと、\ruby{後}{うしろ}を見ました。ごんはびくっとして、小さくなってたちどまりました。加助は、ごんには気がつかないで、そのままさっさとあるきました。\ruby{吉兵衛}{きちべえ}というお百姓の家まで来ると、二人はそこへはいっていきました。ポンポンポンポンと\ruby{木魚}{もくぎょ}の音がしています。窓の\ruby{障子}{しょうじ}にあかりがさしていて、大きな\ruby{坊主頭}{ぼうずあたま}がうつって動いていました。ごんは、

「おねんぶつがあるんだな」と思いながら井戸のそばにしゃがんでいました。しばらくすると、また三人ほど、人がつれだって吉兵衛の家へはいっていきました。お経を読む声がきこえて来ました。

\stopsubject

\startsubject [title={五}]

ごんは、おねんぶつがすむまで、井戸のそばにしゃがんでいました。兵十と加助は、また一しょにかえっていきます。ごんは、二人の話をきこうと思って、ついていきました。兵十の\ruby{影法師}{かげぼうし}をふみふみいきました。

お城の前まで来たとき、加助が言い出しました。

「さっきの話は、きっと、そりゃあ、神さまのしわざだぞ」

「えっ?」と、兵十はびっくりして、加助の顔を見ました。

「おれは、あれからずっと考えていたが、どうも、そりゃ、人間じゃない、神さまだ、神さまが、お前がたった一人になったのをあわれに思わっしゃって、いろんなものをめぐんで下さるんだよ」

「そうかなあ」

「そうだとも。だから、まいにち神さまにお礼を言うがいいよ」

「うん」

ごんは、へえ、こいつはつまらないなと思いました。おれが、栗や松たけを持っていってやるのに、そのおれにはお礼をいわないで、神さまにお礼をいうんじゃア、おれは、引き合わないなあ。

\stopsubject

\startsubject [title={六}]

そのあくる日もごんは、栗をもって、兵十の家へ出かけました。兵十は物置で\ruby{縄}{なわ}をなっていました。それでごんは家の裏口から、こっそり中へはいりました。

そのとき兵十は、ふと顔をあげました。と狐が家の中へはいったではありませんか。こないだうなぎをぬすみやがったあのごん狐めが、またいたずらをしに来たな。

「ようし。」

兵十は立ちあがって、\ruby{納屋}{なや}にかけてある\ruby{火縄銃}{ひなわじゅう}をとって、火薬をつめました。

そして足音をしのばせてちかよって、今戸口を出ようとするごんを、ドンと、うちました。ごんは、ばたりとたおれました。兵十はかけよって来ました。家の中を見ると、\ruby{土間}{どま}に栗が、かためておいてあるのが目につきました。

「おや」と兵十は、びっくりしてごんに目を落しました。

「ごん、お\ruby{前}{まい}だったのか。いつも栗をくれたのは」

ごんは、ぐったりと目をつぶったまま、うなずきました。

兵十は火縄銃をばたりと、とり落しました。青い煙が、まだ\ruby{筒口}{つつぐち}から細く出ていました。

\stopsubject

\stoptitle

\stoptext

[-- Attachment #4: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-02 18:00                       ` Wolfgang Schuster
@ 2024-03-10 16:43                         ` Emanuel Han via ntg-context
  2024-03-10 19:26                           ` Jean-Pierre Delange
                                             ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Emanuel Han via ntg-context @ 2024-03-10 16:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Emanuel Han


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

Hi all,

I added https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
with attached working example code and to-do list.
Thanks for any contributions!
The working example code is still a work in progress. Its text layout output meets already some of the requirements (see comments in the code). Among the ones to still be implemented are:
solid setting (no extra spacing between characters) https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
aligning of the lines to the Kihon-hanmen (optimizing the code below in this regard)

positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and https://www.w3.org/TR/jlreq/#fig3_1_4

positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24

inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1

emphasis with sesame dot or bullet

itemization https://www.w3.org/TR/jlreq/#fig2_5_6

indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7

tab setting https://www.w3.org/TR/jlreq/#fig2_6_1

furiwake https://www.w3.org/TR/jlreq/#fig2_7_2

jidori https://www.w3.org/TR/jlreq/#fig2_7_4

math https://www.w3.org/TR/jlreq/#fig2_7_6 and https://www.w3.org/TR/jlreq/#fig2_7_62

tategaki (writing vertically)

Best regards

Emanuel
On März 2 2024, at 7:00 pm, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> > thank you for your valuable remarks. I integrated them, see corrected attached example.
> > Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing.
> > position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> See my attached gongitsune.tex example how you can squeeze text in a very narrow header/footer.
> > aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> You can use the lines key for \setuplayout to let ConTeXt calculate the necessary value for the text height.
> > protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> You're getting this for free because ruby text doesn't take up vertical space, in case vertical text is working it would now stick into the margins as expected.
> \starttext
> \ruledhbox{a \ruby{x}{y} b}
> \stoptext
>
>
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line.
> > It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it.
> > Quotation from https://www.w3.org/TR/jlreq:
> > In principle, when composing a line with ideographic (cl-19) (https://www.w3.org/TR/jlreq/#cl-19), hiragana (cl-15) (https://www.w3.org/TR/jlreq/#cl-15) and katakana (cl-16) (https://www.w3.org/TR/jlreq/#cl-16) characters, no extra spacing appears between their character frame (https://www.w3.org/TR/jlreq/#term.character-frame). This is called solid setting (see Figure 5 (https://www.w3.org/TR/jlreq/#fig1_8)).
>
>
> 1. ConTeXt has a mechanism to typeset Japanese texts.
> 2. There are flaws in the output it produces but this nothing which can't be fixed.
> 3. To fix the problems someone has to be passionate to fix them and we're willing to help here.
> As you can see in my second example file japanese.tex there is a font feature to create half sized parentheses etc. which isn't supported yet by ConTeXt's mechanism for japanese and in case your willing to improve it this should be taken care of as well.
> Wolfgang

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

[-- Attachment #2: japanese_mwe.tex --]
[-- Type: application/x-tex, Size: 18738 bytes --]

[-- Attachment #3: Type: text/plain, Size: 511 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-10 16:43                         ` Emanuel Han via ntg-context
@ 2024-03-10 19:26                           ` Jean-Pierre Delange
  2024-03-11 22:48                           ` Wolfgang Schuster
  2024-03-13 14:55                           ` Otared Kavian
  2 siblings, 0 replies; 28+ messages in thread
From: Jean-Pierre Delange @ 2024-03-10 19:26 UTC (permalink / raw)
  To: ntg-context


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

Emanuel,

Your sample seems to work fine on CTX MKIV 2024.01.24 version , as far 
as I see the final PDF output. And ConTeXt doesn't complain, even in the 
log !

Best//JP

Le 10/03/2024 à 17:43, Emanuel Han via ntg-context a écrit :
> Hi all,
>
> I added 
> https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> with attached working example code and to-do list.
>
> Thanks for any contributions!
>
> The working example code is still a work in progress. Its text layout 
> output meets already some of the requirements (see comments in the 
> code). Among the ones to still be implemented are:
>
>  *
>     solid setting (no extra spacing between characters)
>     https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for
>     line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
>  *
>     aligning of the lines to the Kihon-hanmen (optimizing the code
>     below in this regard)
>  *
>     positioning and realm of headings
>     https://www.w3.org/TR/jlreq/#fig3_1_9
>     https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and
>     https://www.w3.org/TR/jlreq/#fig3_1_4
>  *
>     positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
>  *
>     inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
>  *
>     emphasis with sesame dot or bullet
>  *
>     itemization https://www.w3.org/TR/jlreq/#fig2_5_6
>  *
>     indenting of quotation paragraphs
>     https://www.w3.org/TR/jlreq/#fig2_5_7
>  *
>     tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
>  *
>     furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
>  *
>     jidori https://www.w3.org/TR/jlreq/#fig2_7_4
>  *
>     math https://www.w3.org/TR/jlreq/#fig2_7_6 and
>     https://www.w3.org/TR/jlreq/#fig2_7_62
>  *
>     tategaki (writing vertically)
>
> Best regards
>
> Emanuel
> On März 2 2024, at 7:00 pm, Wolfgang Schuster 
> <wolfgang.schuster.lists@gmail.com> wrote:
>
>     Emanuel Han schrieb am 01.03.2024 um 16:23:
>
>
>         Dear Wolfgang,
>
>         thank you for your valuable remarks. I integrated them, see
>         corrected attached example.
>
>         Yes, correct layout examples exist. They're all showing
>         vertical writing, but the rules and principles are exactly the
>         same for horizontal writing.
>
>          *
>             position of the headers and footers:
>             https://www.w3.org/TR/jlreq/#fig1_30
>
>
>     See my attached gongitsune.tex example how you can squeeze text in
>     a very narrow header/footer.
>
>          *
>             aligning lines to the text box:
>             https://www.w3.org/TR/jlreq/#fig1_3
>
>
>     You can use the lines key for \setuplayout to let ConTeXt
>     calculate the necessary value for the text height.
>
>          *
>             protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
>
>
>     You're getting this for free because ruby text doesn't take up
>     vertical space, in case vertical text is working it would now
>     stick into the margins as expected.
>
>     \starttext
>     \ruledhbox{a \ruby{x}{y} b}
>     \stoptext
>
>
>          *
>
>
>
>         In my previous mail, I wrote wrong amounts of lines. They
>         should be 46 lines on one page, while the actual example
>         doesn't show the 46th line.
>
>         It would be important to identify the reason why only 24
>         characters are used to create a line when 25 could be used.
>         Then we can develop a method to turn that mechanism off or
>         circumvent it.
>         Quotation from https://www.w3.org/TR/jlreq:
>         /In principle, when composing a line with //ideographic
>         (cl-19) <https://www.w3.org/TR/jlreq/#cl-19>//, //hiragana
>         (cl-15) <https://www.w3.org/TR/jlreq/#cl-15>// and //katakana
>         (cl-16) <https://www.w3.org/TR/jlreq/#cl-16>// characters, no
>         extra spacing appears between their //character frame
>         <https://www.w3.org/TR/jlreq/#term.character-frame>//. This is
>         called solid setting (see //Figure 5
>         <https://www.w3.org/TR/jlreq/#fig1_8>//)./
>
>
>     1. ConTeXt has a mechanism to typeset Japanese texts.
>
>     2. There are flaws in the output it produces but this nothing
>     which can't be fixed.
>
>     3. To fix the problems someone has to be passionate to fix them
>     and we're willing to help here.
>
>     As you can see in my second example file japanese.tex there is a
>     font feature to create half sized parentheses etc. which isn't
>     supported yet by ConTeXt's mechanism for japanese and in case your
>     willing to improve it this should be taken care of as well.
>
>     Wolfgang
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist :ntg-context@ntg.nl  /https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  :https://www.pragma-ade.nl  /https://context.aanhet.net  (mirror)
> archive  :https://github.com/contextgarden/context
> wiki     :https://wiki.contextgarden.net
> ___________________________________________________________________________________

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-10 16:43                         ` Emanuel Han via ntg-context
  2024-03-10 19:26                           ` Jean-Pierre Delange
@ 2024-03-11 22:48                           ` Wolfgang Schuster
  2024-03-13 14:55                           ` Otared Kavian
  2 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Schuster @ 2024-03-11 22:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Emanuel Han via ntg-context


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

Emanuel Han via ntg-context schrieb am 10.03.2024 um 17:43:
> Hi all,
>
> I added 
> https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> with attached working example code and to-do list.
>
> Thanks for any contributions!
>
> The working example code is still a work in progress. Its text layout 
> output meets already some of the requirements (see comments in the 
> code). Among the ones to still be implemented are:
>
>  *
>     solid setting (no extra spacing between characters)
>     https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for
>     line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
>  *
>     aligning of the lines to the Kihon-hanmen (optimizing the code
>     below in this regard)
>
Can you make text files out of the images [1] with the spacing 
before/after punctuation to have short examples for testing.

[1] https://www.w3.org/TR/jlreq/#positioning_of_punctuation_marks
>
>  *
>     positioning and realm of headings
>     https://www.w3.org/TR/jlreq/#fig3_1_9
>     https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and
>     https://www.w3.org/TR/jlreq/#fig3_1_4
>  *
>     positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
>  *
>     inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
>  *
>     emphasis with sesame dot or bullet
>  *
>     itemization https://www.w3.org/TR/jlreq/#fig2_5_6
>
Circled numbered are easy and achieved by adding additional number 
conversions.
>
>  *
>     indenting of quotation paragraphs
>     https://www.w3.org/TR/jlreq/#fig2_5_7
>
Use the narrower or blockquote environment for this.
>
>  *
>     tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
>
Just use a table.
>
>  *
>     furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
>  *
>     jidori https://www.w3.org/TR/jlreq/#fig2_7_4
>  *
>     math https://www.w3.org/TR/jlreq/#fig2_7_6 and
>     https://www.w3.org/TR/jlreq/#fig2_7_62
>  *
>     tategaki (writing vertically)
>
Wolfgang


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-10 16:43                         ` Emanuel Han via ntg-context
  2024-03-10 19:26                           ` Jean-Pierre Delange
  2024-03-11 22:48                           ` Wolfgang Schuster
@ 2024-03-13 14:55                           ` Otared Kavian
  2024-03-14  7:12                             ` Emanuel Han via ntg-context
  2 siblings, 1 reply; 28+ messages in thread
From: Otared Kavian @ 2024-03-13 14:55 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi Emmanuel,

Thank you so much for the new setup for writing Japanese: I tested with both files, and noticed that with the new version the output looks great. 

I have a question about the code in the \directlua{} part of your setup: why, for instance, the 
	paperSize = « B5"
is defined « by hand » there, instead of being retrieved from the command
	 \setuppapersize[B5]
issued by the user? 

Actually I am using your setup for learning Japanese, and at my beginner’s level I do separate words I am learning with spaces. While with the previous version of your setup the lines were breaking womewhat strangely, but now the spaces between words in the output are as I intended them to be (I should also Thank Wolfgang Schuster for his insight with the \script[nihongo], and indeed Hans for fixing so quickly the slightest bug).

It is really a great pleasure to be in this community where help comes from everyone and features are given on demand !

Best regards: Otared

> On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Hi all,
> 
> I added https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> with attached working example code and to-do list.
> 
> Thanks for any contributions!
> 
> The working example code is still a work in progress. Its text layout output meets already some of the requirements (see comments in the code). Among the ones to still be implemented are:
> 
> 	• solid setting (no extra spacing between characters) https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
> 	• aligning of the lines to the Kihon-hanmen (optimizing the code below in this regard)
> 	• positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and https://www.w3.org/TR/jlreq/#fig3_1_4
> 	• positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> 	• inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> 	• emphasis with sesame dot or bullet
> 	• itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> 	• indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> 	• tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> 	• furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> 	• jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> 	• math https://www.w3.org/TR/jlreq/#fig2_7_6 and https://www.w3.org/TR/jlreq/#fig2_7_62
> 	• tategaki (writing vertically)
> Best regards
> 
> Emanuel
> On März 2 2024, at 7:00 pm, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> Emanuel Han schrieb am 01.03.2024 um 16:23:
> 
> Dear Wolfgang,
> 
> thank you for your valuable remarks. I integrated them, see corrected attached example.
> 
> Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing.
> 
> 	• position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> 
> See my attached gongitsune.tex example how you can squeeze text in a very narrow header/footer.
> 
> 	• aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> 
> You can use the lines key for \setuplayout to let ConTeXt calculate the necessary value for the text height.
> 
> 	• protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> 
> You're getting this for free because ruby text doesn't take up vertical space, in case vertical text is working it would now stick into the margins as expected.
> 
> \starttext
> \ruledhbox{a \ruby{x}{y} b}
> \stoptext
> 
> 
> 
> In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line.
> 
> It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it.
> Quotation from https://www.w3.org/TR/jlreq:
> In principle, when composing a line with ideographic (cl-19), hiragana (cl-15) and katakana (cl-16) characters, no extra spacing appears between their character frame. This is called solid setting (see Figure 5).
> 
> 1. ConTeXt has a mechanism to typeset Japanese texts.
> 
> 2. There are flaws in the output it produces but this nothing which can't be fixed.
> 
> 3. To fix the problems someone has to be passionate to fix them and we're willing to help here.
> 
> As you can see in my second example file japanese.tex there is a font feature to create half sized parentheses etc. which isn't supported yet by ConTeXt's mechanism for japanese and in case your willing to improve it this should be taken care of as well.
> 
> Wolfgang
> <japanese_mwe.tex>___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

Otared Kavian
e-mail: otared@gmail.com
Phone: +33 6 88 26 70 95




___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-13 14:55                           ` Otared Kavian
@ 2024-03-14  7:12                             ` Emanuel Han via ntg-context
  2024-03-14 13:48                               ` Otared Kavian
  2024-03-15  8:41                               ` luigi scarso
  0 siblings, 2 replies; 28+ messages in thread
From: Emanuel Han via ntg-context @ 2024-03-14  7:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Emanuel Han


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

Dear Otared,

when you read the lua code in the first \directlua{}, you should realize that the dimensions of almost all layout elements are depending on the value of my lua variable "paperSize".
Thanks to defining the paper size first in lua, I can apply calculations of numeric values.

The value of paperSize is later passed on to \setuppapersize via \setuppapersize[\directlua{tex.print(paperSize)}]
Emanuel
On März 13 2024, at 3:55 pm, Otared Kavian <otared@gmail.com> wrote:
> Hi Emmanuel,
>
> Thank you so much for the new setup for writing Japanese: I tested with both files, and noticed that with the new version the output looks great.
> I have a question about the code in the \directlua{} part of your setup: why, for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
>
> Actually I am using your setup for learning Japanese, and at my beginner’s level I do separate words I am learning with spaces. While with the previous version of your setup the lines were breaking womewhat strangely, but now the spaces between words in the output are as I intended them to be (I should also Thank Wolfgang Schuster for his insight with the \script[nihongo], and indeed Hans for fixing so quickly the slightest bug).
> It is really a great pleasure to be in this community where help comes from everyone and features are given on demand !
> Best regards: Otared
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context <ntg-context@ntg.nl> wrote:
> >
> > Hi all,
> >
> > I added https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout output meets already some of the requirements (see comments in the code). Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the necessary value for the text height.
> >
> > • protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> >
> > You're getting this for free because ruby text doesn't take up vertical space, in case vertical text is working it would now stick into the margins as expected.
> >
> > \starttext
> > \ruledhbox{a \ruby{x}{y} b}
> > \stoptext
> >
> >
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line.
> >
> > It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it.
> > Quotation from https://www.w3.org/TR/jlreq:
> > In principle, when composing a line with ideographic (cl-19), hiragana (cl-15) and katakana (cl-16) characters, no extra spacing appears between their character frame. This is called solid setting (see Figure 5).
> >
> > 1. ConTeXt has a mechanism to typeset Japanese texts.
> >
> > 2. There are flaws in the output it produces but this nothing which can't be fixed.
> >
> > 3. To fix the problems someone has to be passionate to fix them and we're willing to help here.
> >
> > As you can see in my second example file japanese.tex there is a font feature to create half sized parentheses etc. which isn't supported yet by ConTeXt's mechanism for japanese and in case your willing to improve it this should be taken care of as well.
> >
> > Wolfgang
> > <japanese_mwe.tex>___________________________________________________________________________________
> > If your question is of interest to others as well, please add an entry to the Wiki!
> >
> > maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> > archive : https://github.com/contextgarden/context
> > wiki : https://wiki.contextgarden.net
> > ___________________________________________________________________________________
>
> Otared Kavian
> e-mail: otared@gmail.com
> Phone: +33 6 88 26 70 95
>
>
>
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
>


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-14  7:12                             ` Emanuel Han via ntg-context
@ 2024-03-14 13:48                               ` Otared Kavian
  2024-03-16  8:54                                 ` Wolfgang Schuster
  2024-03-15  8:41                               ` luigi scarso
  1 sibling, 1 reply; 28+ messages in thread
From: Otared Kavian @ 2024-03-14 13:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear Emmanuel,

Thank you for your reply: indeed I understand your approach, which is quite efficient. I am not at all good in coding, so I naively thought there would be a way for your setup to retrieve the information it needs from what the user is doing. Maybe once things are settled, Hans and Wolfgang will have a look in the Japanese part of ConTeXt so that the user can avoid to enter the setup included in the \directlua part.

Again thank you for what you are sharing.

Best regards: Otared

> On 14 Mar 2024, at 08:12, Emanuel Han via ntg-context <ntg-context@ntg.nl> wrote:
> 
> Dear Otared,
> 
> when you read the lua code in the first \directlua{}, you should realize that the dimensions of almost all layout elements are depending on the value of my lua variable "paperSize".
> Thanks to defining the paper size first in lua, I can apply calculations of numeric values.
> 
> The value of paperSize is later passed on to \setuppapersize via \setuppapersize[\directlua{tex.print(paperSize)}]
> 
> Emanuel
> On März 13 2024, at 3:55 pm, Otared Kavian <otared@gmail.com> wrote:
> Hi Emmanuel,
> 
> Thank you so much for the new setup for writing Japanese: I tested with both files, and noticed that with the new version the output looks great.
> 
> I have a question about the code in the \directlua{} part of your setup: why, for instance, the
> paperSize = « B5"
> is defined « by hand » there, instead of being retrieved from the command
> \setuppapersize[B5]
> issued by the user?
> 
> Actually I am using your setup for learning Japanese, and at my beginner’s level I do separate words I am learning with spaces. While with the previous version of your setup the lines were breaking womewhat strangely, but now the spaces between words in the output are as I intended them to be (I should also Thank Wolfgang Schuster for his insight with the \script[nihongo], and indeed Hans for fixing so quickly the slightest bug).
> 
> It is really a great pleasure to be in this community where help comes from everyone and features are given on demand !
> 
> Best regards: Otared
> 
> > On 10 Mar 2024, at 17:43, Emanuel Han via ntg-context <ntg-context@ntg.nl> wrote:
> >
> > Hi all,
> >
> > I added https://wiki.contextgarden.net/Chinese_Japanese_and_Korean#Meeting_the_JIS_X_4051_Requirements_for_Japanese_Text_Layout
> > with attached working example code and to-do list.
> >
> > Thanks for any contributions!
> >
> > The working example code is still a work in progress. Its text layout output meets already some of the requirements (see comments in the code). Among the ones to still be implemented are:
> >
> > • solid setting (no extra spacing between characters) https://www.w3.org/TR/jlreq/#fig1_8 if no requirement for line-adjustment https://www.w3.org/TR/jlreq/#term.line-adjustment
> > • aligning of the lines to the Kihon-hanmen (optimizing the code below in this regard)
> > • positioning and realm of headings https://www.w3.org/TR/jlreq/#fig3_1_9 https://www.w3.org/TR/jlreq/#fig3_1_15 et al, and https://www.w3.org/TR/jlreq/#fig3_1_4
> > • positioning of yokugo-ruby https://www.w3.org/TR/jlreq/#fig2_3_24
> > • inline cutting note (warichu) https://www.w3.org/TR/jlreq/#fig2_4_1
> > • emphasis with sesame dot or bullet
> > • itemization https://www.w3.org/TR/jlreq/#fig2_5_6
> > • indenting of quotation paragraphs https://www.w3.org/TR/jlreq/#fig2_5_7
> > • tab setting https://www.w3.org/TR/jlreq/#fig2_6_1
> > • furiwake https://www.w3.org/TR/jlreq/#fig2_7_2
> > • jidori https://www.w3.org/TR/jlreq/#fig2_7_4
> > • math https://www.w3.org/TR/jlreq/#fig2_7_6 and https://www.w3.org/TR/jlreq/#fig2_7_62
> > • tategaki (writing vertically)
> > Best regards
> >
> > Emanuel
> > On März 2 2024, at 7:00 pm, Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:
> > Emanuel Han schrieb am 01.03.2024 um 16:23:
> >
> > Dear Wolfgang,
> >
> > thank you for your valuable remarks. I integrated them, see corrected attached example.
> >
> > Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing.
> >
> > • position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30
> >
> > See my attached gongitsune.tex example how you can squeeze text in a very narrow header/footer.
> >
> > • aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3
> >
> > You can use the lines key for \setuplayout to let ConTeXt calculate the necessary value for the text height.
> >
> > • protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6
> >
> > You're getting this for free because ruby text doesn't take up vertical space, in case vertical text is working it would now stick into the margins as expected.
> >
> > \starttext
> > \ruledhbox{a \ruby{x}{y} b}
> > \stoptext
> >
> >
> >
> > In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line.
> >
> > It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it.
> > Quotation from https://www.w3.org/TR/jlreq:
> > In principle, when composing a line with ideographic (cl-19), hiragana (cl-15) and katakana (cl-16) characters, no extra spacing appears between their character frame. This is called solid setting (see Figure 5).
> >
> > 1. ConTeXt has a mechanism to typeset Japanese texts.
> >
> > 2. There are flaws in the output it produces but this nothing which can't be fixed.
> >
> > 3. To fix the problems someone has to be passionate to fix them and we're willing to help here.
> >
> > As you can see in my second example file japanese.tex there is a font feature to create half sized parentheses etc. which isn't supported yet by ConTeXt's mechanism for japanese and in case your willing to improve it this should be taken care of as well.
> >
> > Wolfgang
> > <japanese_mwe.tex>___________________________________________________________________________________
> > If your question is of interest to others as well, please add an entry to the Wiki!
> >
> > maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> > archive : https://github.com/contextgarden/context
> > wiki : https://wiki.contextgarden.net
> > ___________________________________________________________________________________
> 
> Otared Kavian
> e-mail: otared@gmail.com
> Phone: +33 6 88 26 70 95
> 
> 
> 
> 
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive  : https://github.com/contextgarden/context
> wiki     : https://wiki.contextgarden.net
> ___________________________________________________________________________________

Otared Kavian
e-mail: otared@gmail.com
Phone: +33 6 88 26 70 95





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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-14  7:12                             ` Emanuel Han via ntg-context
  2024-03-14 13:48                               ` Otared Kavian
@ 2024-03-15  8:41                               ` luigi scarso
  1 sibling, 0 replies; 28+ messages in thread
From: luigi scarso @ 2024-03-15  8:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

[probably off-topic , my apologies ]
For a project in my spare time (i.e. no deadlines)
I am collecting all kind of info I can find on the net (so free/non free
fonts, books , specs, images raster /vectorial..whatever)   on the
Kaiti (楷体) or “Regular style”
https://fonts.google.com/knowledge/type_in_china_japan_and_korea/type_classification_in_cjk_chinese

Any help would be greatly appreciated; there are no secrets, so we can use
this ml or write to me privately, as you prefer.

--
luigi

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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [NTG-context] Re: Japanese
  2024-03-14 13:48                               ` Otared Kavian
@ 2024-03-16  8:54                                 ` Wolfgang Schuster
  0 siblings, 0 replies; 28+ messages in thread
From: Wolfgang Schuster @ 2024-03-16  8:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Otared Kavian


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

Otared Kavian schrieb am 14.03.2024 um 14:48:
> Dear Emmanuel,
>
> Thank you for your reply: indeed I understand your approach, which is 
> quite efficient. I am not at all good in coding, so I naively thought 
> there would be a way for your setup to retrieve the information it 
> needs from what the user is doing. Maybe once things are settled, Hans 
> and Wolfgang will have a look in the Japanese part of ConTeXt so that 
> the user can avoid to enter the setup included in the \directlua part.

There is no need for these calculations because

     1. you can create named layouts (e.g. \definelayout[kinohanmen:a4]) 
for each paper size,

     2. you can put the fontsize etc. settings in a setups block and 
load the one needed for each paper size and

     3. you can put all of them in a module which can be loaded when 
writing documents in japanese, the paper size can be passed as argument 
to the module.

Wolfgang


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

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

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2024-03-16  8:57 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 20:08 [NTG-context] Japanese Otared Kavian
2024-02-26 20:16 ` [NTG-context] Japanese Henning Hraban Ramm
2024-02-26 21:49   ` Otared Kavian
2024-02-27 12:55     ` Jeong Dal via ntg-context
2024-02-28  7:34       ` Otared Kavian
2024-02-28 17:34         ` Henning Hraban Ramm
2024-02-28 18:44           ` Jean-Pierre Delange
2024-02-28 19:51             ` Emanuel Han via ntg-context
2024-02-28 20:54               ` Henning Hraban Ramm
2024-02-28 21:18               ` Wolfgang Schuster
2024-02-29 14:18               ` Jeong Dal via ntg-context
2024-03-01  7:04               ` luigi scarso
2024-03-01 12:08                 ` Emanuel Han via ntg-context
2024-03-01 13:59                   ` Wolfgang Schuster
2024-03-01 15:23                     ` Emanuel Han via ntg-context
2024-03-01 16:19                       ` Henning Hraban Ramm
2024-03-02 18:00                       ` Wolfgang Schuster
2024-03-10 16:43                         ` Emanuel Han via ntg-context
2024-03-10 19:26                           ` Jean-Pierre Delange
2024-03-11 22:48                           ` Wolfgang Schuster
2024-03-13 14:55                           ` Otared Kavian
2024-03-14  7:12                             ` Emanuel Han via ntg-context
2024-03-14 13:48                               ` Otared Kavian
2024-03-16  8:54                                 ` Wolfgang Schuster
2024-03-15  8:41                               ` luigi scarso
2024-02-26 20:29 ` Hans Hagen
2024-02-26 20:32 ` Emanuel Han via ntg-context
2024-02-26 21:46   ` Otared Kavian

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).