Some questions about punctuation squeezing in Japanese
hi,lists The punctuation of question marks, exclamation marks, and quotation marks doesn't seem to be very good at the moment. ipaexgothic font download : https://moji.or.jp/ipafont/ipaex00401/ %%%%%%%% \starttext \definedfont[name:ipaexgothic] \startscript[nihongo] \setbox0\hbox{% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% \framed[width=1em,height=.8em,depth=.2em,strut=no,framecolor=red]{}% }\leavevmode\smash{\copy0}\hskip-16em(あ)。亂數:「假,文。」「亂數」 <== work well \leavevmode\smash{\copy0}\hskip-16em 亂數、「假文?」「亂數!」假文」。亂數 <== not good with {\red?」} and {\red!」}. \\ ==>{\red?} and {\red!} should be full-width with {\red」}. just like {\red ?{}」} \leavevmode\smash{\copy0}\hskip-16em 亂數:“假文。”亂數:“假文?”亂數:“假文!” <== not good with {\red:“} and {\red。”} and {\red?”} and {\red!”}.\\ ==>{\red “ ”} should be half-width with {\red 。?!}. just like {\red「」} \leavevmode\smash{\copy0}\hskip-16em 「ちょっと」,“チェック”亂數・假文 <== not good with {\red ,“}. \\ ==>the space between {\red ,} and {\red “} should be half-width \stopscript \stoptext thanks for any help, autumnus
ai2472206007@yeah.net schrieb am 03.12.2024 um 10:51:
hi,lists
The punctuation of question marks, exclamation marks, and quotation marks doesn't seem to be very good at the moment.
I agree the current solution isn't perfect and there are many things which can be improved. People who are interested to improve the current situation are welcome but there are certain things to consider. 1. You have two ways how glyph width and spacing is handled, the first of to shrink the space between punctuation etc. wherever it is necessary. The second way is to convert punctuation into half width characters and add additional space. The following example demonstrates both ways. \definefontfeature[cjk][default][halt=yes,script=hani] \starttext \starttabulate[||b{\showglyphs}|] \NC default \NC \definedfont[file:ipaexg*default](あ)。亂數:「假,文。」「亂數」 \NC\NR \NC default + negative kern \NC \definedfont[file:ipaexg*default]\kern-.5em (あ)\kern-.5em 。亂數:\kern-.5em 「假,文。\kern-.5em 」\kern-.5em 「亂數」 \NC\NR \NC halt \NC \definedfont[file:ipaexg*cjk](あ)。亂數:「假,文。」「亂數」 \NC\NR \NC halt + positive kern \NC \definedfont[file:ipaexg*cjk](あ)。\kern.5em 亂數\kern.25em :\kern.25em 「假,\kern.5em 文。」\kern.5em 「亂數」 \NC\NR \stoptabulate \stoptext 2. Taking care of different languages. Being focused only on japanese isn't enough, you need a solution which handles also simplified and traditional chinese and if possible korean with a single customizable mechanism. Even though all languages share certain glyhps not all of them align them the same way (e.g. traditional chinese has a center aligned ideographic full stop while the other languages align it on the left). You need also different rules how spacing is handled when you mix different scripts, e.g. a document with english text and only a few japanese needs different rules from a document written in japanese with short english parts. Wolfgang
It seem there is not necessary to think about different languages . In fact, the treatment of punctuation in China, Japan can be regarded as adding or subtracting the space of punctuation as Wolfgang said(I don't know much about Korean). All you need to do is make a script to handle all the punctuation, and then add or subtract space for different languages. It seems more appropriate to subtract the space and then add it, so that you don't have to think about the Opening and Closing punctuation at the beginning and end of the line. In particular, it seems that Taiwan(TC) does not do anything about punctuation (Because the punctuation in Taiwan is almost always centered, this should be a compromise to accommodate the vertical typesetting.). Japanese side has a relatively uniform standard for punctuation. China seems to have only factual standards, but no actual uniform standards. Therefore, the Chinese(SC) punctuation treatment methods are: ❶half-width (to half-width punctuation), ❷full-width (to full-width punctuation), ❸ no processing, ❹kaiming punctuation (punctuation in the middle of the sentence is half-width, punctuation at the end of the sentence is full-width). ❺It seems that kaiming-style punctuation is more commonly used. In addition, there seems to be a way of punctuation that is based on text length and punctuation prohibitions Therefore, it is very complicated to consider the situation of language. Instead, make a user interface so that local users can handle punctuation and prohibitions on their own. This in turn adapts to users in all regions. Because CJK includes not only Simplified Chinese (Chinese mainland), Chinese Traditional (Hong Kong, Macau, and Taiwan), Japanese, Korean, and Vietnamese characters. As far as I know, each area has its own way of handling punctuation. The only ones I know of that are developing punctuation processing (only for Chinese) seem to be ==> https://github.com/Fusyong/zhpunc . Perhaps, this will be a certain inspiration for others. What I know of when dealing with multilingualism is that both China and Japan only distinguish between Chinese (or Japanese) and English, and insert a quarter or a third of the space into it. For example, uptex provides some basic commands to control prohibition and spacing (https://mirrors.jlu.edu.cn/CTAN/info/ptex-manual/ptex-manual.pdf): \prebreakpenalty \postbreakpenalty \jcharwidowpenalty \kanjiskip \xkanjiskip \inhibitxspcode \inhibitglue In addition, there may be a little more to consider. Once the script is enabled, using the ‘halt’ feature at the same time will result in the wrong position under certain fonts. For example, when kozuka mincho deals with punctuation 「dummy word」(dummy word). I barely have any understanding of lua. So far, I've only had to do something about tex. Because of this, forgive my ignorance if there is a wrong situation. But if there's anything I can do to help, I'll do it. autumnus
participants (3)
-
ai2472206007@yeah.net
-
autumnus
-
Wolfgang Schuster