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 wrote: > > > On Wed, 28 Feb 2024 at 20:53, Emanuel Han via ntg-context 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 > >