Hello, some remarks/errors of the current UTF-8 Chinese support in ConTeXt 2005.12.19: (For (a) to (c) see also attached file.) a) unic-chi.tex: This contains the unicode vectors for which a Chinese font will be used; currently it only covers \dostepwiserecurse{40}{159}{1}{\defineunicodecommand #1 {\uchar}} but this it misses the U+FFxx characters (fullwidth latin characters, e.g. '?' which is as wide as a Chinese character) => solution: Add \defineunicodecommand 255 {\uchar} b) Labels: lang-chi.tex contains: \setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \startencoding[uni-c] \definecommand cnencodedfigure {\uchar{86}{254}} but if I use (with UTF-8) \placefigure{}{} the figure character is not shown; however if I setup this directly, i.e. \setuplabeltext[cn][figure={\uchar{86}{254}}] , the character is shown just fine. c) Doing font switching using \SimKaiTi seems to convert back to GBK, can we have Unicode by default (at least when UTF-8 encoding is used)? Examples for (a) to (c) see attachment (UTF-8 encoded). * * * Wish for the native speakers: Please translate - Graphics/Illustration and Intermezzo(s) Question to native speakers: - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, Is this really the default? Or should this be year年month月day日? * * * Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)? b) How to change the numberformat used? Tobias
b) Labels: lang-chi.tex contains: \setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \startencoding[uni-c] \definecommand cnencodedfigure {\uchar{86}{254}} but if I use (with UTF-8) \placefigure{}{} the figure character is not shown; however if I setup this directly, i.e. \setuplabeltext[cn][figure={\uchar{86}{254}}] , the character is shown just fine.
Hello Tobias! There's a small mistake in lang-chi.tex. On line 98, the should actually be: \startencoding[c-uni] (instead of "uni-c" - see enco-chi.tex) Change it and re-generate the format - it works fine! ;-) -Richard P.S. The rest is for Hans, I can't say... :-( _____ From: Tobias Burnus [mailto:burnus@gmx.de] To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl] Sent: Tue, 20 Dec 2005 16:09:36 +0100 Subject: [NTG-context] Chinese in current ConTeXt Hello, some remarks/errors of the current UTF-8 Chinese support in ConTeXt 2005.12.19: (For (a) to (c) see also attached file.) a) unic-chi.tex: This contains the unicode vectors for which a Chinese font will be used; currently it only covers \dostepwiserecurse{40}{159}{1}{\defineunicodecommand #1 {\uchar}} but this it misses the U+FFxx characters (fullwidth latin characters, e.g. '?' which is as wide as a Chinese character) => solution: Add \defineunicodecommand 255 {\uchar} b) Labels: lang-chi.tex contains: \setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \startencoding[uni-c] \definecommand cnencodedfigure {\uchar{86}{254}} but if I use (with UTF-8) \placefigure{}{} the figure character is not shown; however if I setup this directly, i.e. \setuplabeltext[cn][figure={\uchar{86}{254}}] , the character is shown just fine. c) Doing font switching using \SimKaiTi seems to convert back to GBK, can we have Unicode by default (at least when UTF-8 encoding is used)? Examples for (a) to (c) see attachment (UTF-8 encoded). * * * Wish for the native speakers: Please translate - Graphics/Illustration and Intermezzo(s) Question to native speakers: - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, Is this really the default? Or should this be year年month月day日? * * * Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)? b) How to change the numberformat used? Tobias
Tobias Burnus wrote:
Hello,
some remarks/errors of the current UTF-8 Chinese support in ConTeXt 2005.12.19: (For (a) to (c) see also attached file.)
a) unic-chi.tex: This contains the unicode vectors for which a Chinese font will be used; currently it only covers \dostepwiserecurse{40}{159}{1}{\defineunicodecommand #1 {\uchar}} but this it misses the U+FFxx characters (fullwidth latin characters, e.g. '?' which is as wide as a Chinese character) => solution: Add \defineunicodecommand 255 {\uchar}
b) Labels: lang-chi.tex contains: \setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \startencoding[uni-c] \definecommand cnencodedfigure {\uchar{86}{254}} but if I use (with UTF-8) \placefigure{}{} the figure character is not shown; however if I setup this directly, i.e. \setuplabeltext[cn][figure={\uchar{86}{254}}] , the character is shown just fine.
was this du eto the uni-c c-uni mixup?
c) Doing font switching using \SimKaiTi seems to convert back to GBK, can we have Unicode by default (at least when UTF-8 encoding is used)?
we need to come up with a better setup for this, just make me the definitions and i'll see how they will fit in ...
Examples for (a) to (c) see attachment (UTF-8 encoded).
Wish for the native speakers: Please translate - Graphics/Illustration and Intermezzo(s)
Question to native speakers: - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, Is this really the default? Or should this be year年month月day日?
* * *
Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)?
hm, columnsets ... just make them small enough; should work ok (including graphic spans)
b) How to change the numberformat used?
eh ... wang lei should know ... i have to look into it (chinese supports multiple number formats) Hans
Hi Hans, Hans Hagen wrote:
b) Labels: lang-chi.tex contains: was this du eto the uni-c c-uni mixup? Yes, it now works (thanks, Richard!)
Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)? hm, columnsets ... just make them small enough; should work ok (including graphic spans) Hmm, the correct answer to my question is: \startvertical ... \stopvertical, which should be put into the manual. font-chi.tex says: %D We can set up vertical typesetting with \type %D {\setupchinese}. I tried \setupchinese[direction=vertical], which is seemingly not correct and does not do anything visible.
Could you put the mchinese.tex manual the into SVN repository? I'd like to send some minor corrections. Tobias
Tobias Burnus wrote:
Hi Hans,
Hans Hagen wrote:
b) Labels: lang-chi.tex contains:
was this du eto the uni-c c-uni mixup?
Yes, it now works (thanks, Richard!)
Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)?
hm, columnsets ... just make them small enough; should work ok (including graphic spans)
Hmm, the correct answer to my question is: \startvertical ... \stopvertical, which should be put into the manual. font-chi.tex says: %D We can set up vertical typesetting with \type %D {\setupchinese}. I tried \setupchinese[direction=vertical], which is seemingly not correct and does not do anything visible.
Could you put the mchinese.tex manual the into SVN repository? I'd like to send some minor corrections.
i put the manual in svn but didn't test it ... maybe we should rewrite the manual using utf (so that we can see it in an editor) and only explain gbk and big5 in verbatim code we need chinese input on this ! ! ! ! Hans
Hello, Hans Hagen wrote:
b) How to change the numberformat used? eh ... wang lei should know ... i have to look into it (chinese supports multiple number formats) I think I found it (it is a bit burried in font-chi.tex): \startitemize[c] (or cn) gives the normal Chinese number, cc the capitalized, ec the normal Chinese number with one-character alternatives for 20 and 30 and ac the Arabic style of numbering.
(For those who'd like to have a how to on using Chinese with UTF-8, I updated http://wiki.contextgarden.net/Chinese ) Attached you find the traditional characters (as used in Taiwan, Hongkong [possibly decreasing], and in China before 1955); one should provide some method to switch between those and the simplified ones defined; maybe an option for \setupchinese? Tobias
Tobias Burnus wrote:
Hello,
Hans Hagen wrote:
b) How to change the numberformat used?
eh ... wang lei should know ... i have to look into it (chinese supports multiple number formats)
I think I found it (it is a bit burried in font-chi.tex): \startitemize[c] (or cn) gives the normal Chinese number, cc the capitalized, ec the normal Chinese number with one-character alternatives for 20 and 30 and ac the Arabic style of numbering.
(For those who'd like to have a how to on using Chinese with UTF-8, I updated http://wiki.contextgarden.net/Chinese )
Attached you find the traditional characters (as used in Taiwan, Hongkong [possibly decreasing], and in China before 1955); one should provide some method to switch between those and the simplified ones defined; maybe an option for \setupchinese?
ok, i have to think about it ... just collect everything that needs a fix/extension and i'll look into it at the same time (we also need to get japanese running) Hans
Tobias Burnus wrote:
Hello,
some remarks/errors of the current UTF-8 Chinese support in ConTeXt 2005.12.19: (For (a) to (c) see also attached file.)
a) unic-chi.tex: This contains the unicode vectors for which a Chinese font will be used; currently it only covers \dostepwiserecurse{40}{159}{1}{\defineunicodecommand #1 {\uchar}} but this it misses the U+FFxx characters (fullwidth latin characters, e.g. '?' which is as wide as a Chinese character) => solution: Add \defineunicodecommand 255 {\uchar}
b) Labels: lang-chi.tex contains: \setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \startencoding[uni-c] \definecommand cnencodedfigure {\uchar{86}{254}} but if I use (with UTF-8) \placefigure{}{} the figure character is not shown; however if I setup this directly, i.e. \setuplabeltext[cn][figure={\uchar{86}{254}}] , the character is shown just fine.
c) Doing font switching using \SimKaiTi seems to convert back to GBK, can we have Unicode by default (at least when UTF-8 encoding is used)?
Examples for (a) to (c) see attachment (UTF-8 encoded).
* * *
Wish for the native speakers: Please translate - Graphics/Illustration and Intermezzo(s)
Question to native speakers: - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, Is this really the default? Or should this be year年month月day日?
* * *
It should be "year年month月day日". In Chinese, large unit is always before small unit. Another example, the address in Chinese, "China, Shanghai, xxx Road, NO.xxx, room xxx", city is always befor road people lives. I think it's easy to read and easy to find a place on the map :P
Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)? b) How to change the numberformat used?
Tobias
------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Hi, Xiao Jianfeng wrote: > It should be "year年month月day日". I somehow failed to to get the following working; I'm actually too tired (3 a.m) to follow the macro expansion in - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, + \c!date={\v!year,{\cnencoding\cnyear},\v!month,{\cnencoding\cnmonth},\v!year,{\cnencoding\cnday}}, In any case the year/month/day characters in unicode/gbk/big5 are: @@ -110,0 +111,3 @@ + \definecommand cnyear {\uchar{94}{116}} + \definecommand cnmonth {\uchar{103}{8}} + \definecommand cnday {\uchar{101}{229}} @@ -158,0 +162,3 @@ + \definecommand cnyear {\uchar{196}{234}} + \definecommand cnmonth {\uchar{212}{194}} + \definecommand cnday {\uchar{200}{213}} @@ -204,0 +211,3 @@ + \definecommand cnyear {\uchar{166}{126}} + \definecommand cnmonth {\uchar{164}{235}} + \definecommand cnday {\uchar{164}{233}} Tobias
Hi Tobias (and Hans), I've played with this a bit. It seems that the nested group breaks things inside the \installlanguage macro. The following works OK: \c!date={\v!year,\cnyear,\v!month,\v!day,\cnday} ...but I can't use the \cnencoding switch... [Is it really necessary here? It works for me even without it...] Another minor issues: 1. \v!month gives chinese number with the month symbol [so appending \cnmonth once more is undesired]. I guess the resulting date is a bit inconsistent - there should be all Arabic numbers or all Chinese, not mixed. 2. \v!day give the day number with a leading space which is obviously undesired in Chinese... Hans, could you please take a look at this? (not a priority)... Thanks, Richard _____ From: Tobias Burnus [mailto:burnus@net-b.de] To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl] Sent: Wed, 21 Dec 2005 02:45:25 +0100 Subject: Re: [NTG-context] Chinese in current ConTeXt Hi, Xiao Jianfeng wrote: > It should be "year年month月day日". I somehow failed to to get the following working; I'm actually too tired (3 a.m) to follow the macro expansion in - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, + \c!date={\v!year,{\cnencoding\cnyear},\v!month,{\cnencoding\cnmonth},\v!year,{\cnencoding\cnday}}, In any case the year/month/day characters in unicode/gbk/big5 are: @@ -110,0 +111,3 @@ + \definecommand cnyear {\uchar{94}{116}} + \definecommand cnmonth {\uchar{103}{8}} + \definecommand cnday {\uchar{101}{229}} @@ -158,0 +162,3 @@ + \definecommand cnyear {\uchar{196}{234}} + \definecommand cnmonth {\uchar{212}{194}} + \definecommand cnday {\uchar{200}{213}} @@ -204,0 +211,3 @@ + \definecommand cnyear {\uchar{166}{126}} + \definecommand cnmonth {\uchar{164}{235}} + \definecommand cnday {\uchar{164}{233}} Tobias _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Richard Gabriel wrote:
Hi Tobias (and Hans),
I've played with this a bit. It seems that the nested group breaks things inside the \installlanguage macro. The following works OK:
\c!date={\v!year,\cnyear,\v!month,\v!day,\cnday}
...but I can't use the \cnencoding switch... [Is it really necessary here? It works for me even without it...]
this is fixed
Another minor issues: 1. \v!month gives chinese number with the month symbol [so appending \cnmonth once more is undesired]. I guess the resulting date is a bit inconsistent - there should be all Arabic numbers or all Chinese, not mixed.
what is convention in china? Hans
1. \v!month gives chinese number with the month symbol [so appending \cnmonth once more is undesired]. I guess the resulting date is a bit inconsistent - there should be all Arabic numbers or all Chinese, not mixed.
what is convention in china?
From Xiao Jianfeng:
In Arabic number, today is "2005年12月22日", and in Chinese number, today is "二○○五年十二月二十二日". Both are often used, and the former is more popular now, because it is easier to write or type with keyboard. So it's up to you... -Richard
Richard Gabriel wrote:
1. \v!month gives chinese number with the month symbol [so appending \cnmonth once more is undesired]. I guess the resulting date is a bit inconsistent - there should be all Arabic numbers or all Chinese, not mixed.
what is convention in china?
From Xiao Jianfeng:
In Arabic number, today is "2005年12月22日", and in Chinese number, today is "二○○五年十二月二十二日". Both are often used, and the former is more popular now, because it is easier to write or type with keyboard.
So it's up to you...
ok, so send me the def's that correspond to the former (2005 .... )
Hello Hans, I'm not sure - did you mean it this way? It's working but it's a bit ugly... isn't there any macro providing the raw month number directly (something like \v!monthnumber)? -Richard P.S. I also cannot get rid of the spaces before the numbers. I guess there should be no spaces in Chinese; see how Xiao wrote the date: "2005年12月22日" ... Currently, \currentdate gives: "2005年 12月 22日". _____ From: Hans Hagen [mailto:pragma@wxs.nl] To: mailing list for ConTeXt users [mailto:ntg-context@ntg.nl] Sent: Thu, 22 Dec 2005 15:57:55 +0100 Subject: Re: [NTG-context] Chinese in current ConTeXt Richard Gabriel wrote
1. \v!month gives chinese number with the month symbol [so appending \cnmonth once more is undesired]. I guess the resulting date is a bit inconsistent - there should be all Arabic numbers or all Chinese, not mixed.
what is convention in china?
From Xiao Jianfeng:
In Arabic number, today is "2005年12月22日", and in Chinese number, today is "二○○五年十二月二十二日". Both are often used, and the former is more popular now, because it is easier to write or type with keyboard.
So it's up to you...
ok, so send me the def's that correspond to the former (2005 .... ) _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Tobias Burnus wrote:
Hello,
some remarks/errors of the current UTF-8 Chinese support in ConTeXt 2005.12.19: (For (a) to (c) see also attached file.)
a) unic-chi.tex: This contains the unicode vectors for which a Chinese font will be used; currently it only covers \dostepwiserecurse{40}{159}{1}{\defineunicodecommand #1 {\uchar}} but this it misses the U+FFxx characters (fullwidth latin characters, e.g. '?' which is as wide as a Chinese character) => solution: Add \defineunicodecommand 255 {\uchar}
b) Labels: lang-chi.tex contains: \setuplabeltext [\s!cn] [\v!figure={\cnencoding\cnencodedfigure}] \startencoding[uni-c] \definecommand cnencodedfigure {\uchar{86}{254}} but if I use (with UTF-8) \placefigure{}{} the figure character is not shown; however if I setup this directly, i.e. \setuplabeltext[cn][figure={\uchar{86}{254}}] , the character is shown just fine.
c) Doing font switching using \SimKaiTi seems to convert back to GBK, can we have Unicode by default (at least when UTF-8 encoding is used)?
Examples for (a) to (c) see attachment (UTF-8 encoded).
* * *
Wish for the native speakers: Please translate - Graphics/Illustration and Intermezzo(s)
Question to native speakers: - \c!date={\v!month,\ ,\v!day,{,\ },\v!year}, Is this really the default? Or should this be year年month月day日?
* * *
Another questions: a) How to typset from top-to-bottom right-to-left using column(sets)?
In mchinese.pdf, Hans wrote: " 6.4 Vertical typesetting In Taiwan and HongKong, a large deal of Chinese is typeset vertical. ConTEXt support this mode by implementing on top of the multicolumn routines. " Hope this helps.
b) How to change the numberformat used?
Tobias
------------------------------------------------------------------------
_______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
participants (5)
-
Hans Hagen
-
Richard Gabriel
-
Tobias Burnus
-
Tobias Burnus
-
Xiao Jianfeng