ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <wolfgang.schuster.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Emanuel Han via ntg-context <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Japanese
Date: Fri, 1 Mar 2024 14:59:18 +0100	[thread overview]
Message-ID: <c56517d5-ec3e-0d10-2772-95c2c2ace2d2@gmail.com> (raw)
In-Reply-To: <336D7131-CB53-4886-A205-269146C08731@getmailspring.com>

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
___________________________________________________________________________________

  reply	other threads:[~2024-03-01 14:03 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=c56517d5-ec3e-0d10-2772-95c2c2ace2d2@gmail.com \
    --to=wolfgang.schuster.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

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

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