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:

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.


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


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


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

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