Re: [NTG-context] Chinese typesetting with macOS font. Which one is a good choice?

2023-06-03 Thread 李延瑞
Gerben Wierda via ntg-context  于2023年6月2日周五 19:37写道:

> For Japanese I currently use
>
> \startsetups [japanese]
>   \setscript [nihongo]
> \stopsetups
> \setuplanguage [ja] [setups=japanese]
> \definefallbackfamily
>   [archimate]
>   [ss]
>   [Hiragino Sans]
>   [preset=range:japanese,
>tf=style:W3,
>it=style:W3,
>bf=style:W5,
>bi=style:W5,
>force=yes]
> \definefontfamily [archimate] [ss] [Optima]
> \setupbodyfont[archimate]
>
> I've been wondering what a good choice is for Chinese which is to be added
> to my project. Hiragino Sans GB has both Japanese and Chinese but only W3,W6
>
> I have no knowledge of what is elegant in these fonts. Can someone advise
> me? No bitmap fonts.
>
>
There are Noto Serif/Sans CJK fonts (including HK/JP/KR/SC/TC ) developed
by Google. But I don't know how to mix them with Hiraginfo Sans GB.

-- 
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Chinese typesetting with macOS font. Which one is a good choice?

2023-06-02 Thread Gerben Wierda via ntg-context
For Japanese I currently use

\startsetups [japanese]
  \setscript [nihongo]
\stopsetups
\setuplanguage [ja] [setups=japanese]
\definefallbackfamily
  [archimate]
  [ss]
  [Hiragino Sans]
  [preset=range:japanese,
   tf=style:W3,
   it=style:W3,
   bf=style:W5,
   bi=style:W5,
   force=yes]
\definefontfamily [archimate] [ss] [Optima]
\setupbodyfont[archimate]

I've been wondering what a good choice is for Chinese which is to be added to 
my project. Hiragino Sans GB has both Japanese and Chinese but only W3,W6

I have no knowledge of what is elegant in these fonts. Can someone advise me? 
No bitmap fonts.

Gerben Wierda (LinkedIn , Mastodon 
)
R&A IT Strategy  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Chinese labels in lang-txt.lua

2023-04-02 Thread 李延瑞
Hi Hans,

There are some inaccurate labels for Chinese in  lang-txt.lua. Could you
please apply the following patches to it?

-
--- lang-txt.lua 2023-04-03 11:10:00.267720005 +0800
+++ new-lang-txt.lua 2023-04-03 11:03:24.645426080 +0800
@@ -1192,7 +1192,7 @@
 ["ar"]="ملحق ",
 ["be"]="Апендыцыт",
 ["ca"]="Apèndix ",
-["cn"]="附录",
+["cn"]="附录 ",
 ["cs"]="Příloha ",
 ["da"]="Bilag ",
 ["de"]="Anhang ",
@@ -1473,7 +1473,7 @@
 ["be"]="Глава ",
 ["bg"]="Eпизод ",
 ["ca"]="Capítol ",
-["cn"]={ "第", "章" },
+["cn"]={ "第 ", " 章" },
 ["cs"]="Kapitola ",
 ["da"]="",
 ["de"]="Kapitel ",
@@ -1774,7 +1774,7 @@
 ["be"]="Малюнак",
 ["bg"]="Фигура",
 ["ca"]="Figura ",
-["cn"]="图",
+["cn"]="图 ",
 ["cs"]="Obrázek ",
 ["da"]="Figur ",
 ["de"]="Abbildung ",
@@ -1925,7 +1925,7 @@
 ["be"]="Графіка ",
 ["bg"]="Графичен ",
 ["ca"]="Gràfica ",
-["cn"]="插图",
+["cn"]="插图 ",
 ["cs"]="Graf ",
 ["da"]="Grafik ",
 ["de"]="Grafik ",
@@ -2058,7 +2058,7 @@
 ["be"]="Інтэрмецца ",
 ["bg"]="Интермецо ",
 ["ca"]="Intermedi ",
-["cn"]="퉣",
+["cn"]="间奏 ",
 ["cs"]="Intermezzo ",
 ["da"]="Intermezzo ",
 ["de"]="Intermezzo ",
@@ -2395,7 +2395,7 @@
 ["be"]="радок ",
 ["bg"]="ред ",
 ["ca"]="línia ",
-["cn"]="行",
+["cn"]="行 ",
 ["cs"]="řádek ",
 ["da"]="linie ",
 ["de"]="Zeile ",
@@ -2441,7 +2441,7 @@
 ["be"]="радкi ",
 ["bg"]="редове ",
 ["ca"]="línies ",
-["cn"]="行",
+["cn"]="行 ",
 ["cs"]="řádky ",
 ["da"]="linier ",
 ["de"]="Zeilen ",
@@ -3002,7 +3002,7 @@
 ["be"]="Частка ",
 ["bg"]="Частка ",
 ["ca"]="Part ",
-["cn"]={ "第", "部分" },
+["cn"]={ "第 ", " 部分" },
 ["cs"]="Část ",
 ["da"]="Del ",
 ["de"]="Teil ",
@@ -3130,7 +3130,7 @@
 ["ar"]="فصل ",
 ["bg"]="Cекция ",
 ["ca"]="Secció ",
-["cn"]={ "第", "节" },
+["cn"]={ "第 ", " 节" },
 ["cs"]="Sekce ",
 ["da"]="",
 ["de"]="Abschnitt ",
@@ -3513,7 +3513,7 @@
 ["be"]="Табліца ",
 ["bg"]="Таблица ",
 ["ca"]="Taula ",
-["cn"]="表",
+["cn"]="表 ",
 ["cs"]="Tabulka ",
 ["da"]="Tabel ",
 ["de"]="Tabelle ",
@@ -3863,7 +3863,7 @@
 ["ar"]="الأشكال",
 ["be"]="Спіс ілюстрацый",
 ["ca"]="Figures",
-["cn"]="图形",
+["cn"]="图",
 ["cs"]="Seznam obrázků",
 ["da"]="Figurer",
 ["de"]="Abbildungen",
@@ -4046,7 +4046,7 @@
 ["be"]="Лагатыпы",
 ["bg"]="Логотипи",
 ["ca"]="Logotips",
-["cn"]="徽贬",
+["cn"]="徽标",
 ["cs"]="Loga",
 ["da"]="Logoer",
 ["de"]="Logos",
---
-- 
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Chinese setuplabeltext

2012-10-30 Thread Hans Hagen

On 30-10-2012 12:21, Sietse Brouwer wrote:

John Devereux wrote:

There do not seem to be translations for the labels for Chinese, is that
correct? Is "zh" the correct language code?


Wolfgang Schuster wrote:

No, you need “cn” for chinese.


Might it be advisable to add 'zh' as a synonym? Technically, 'cn'
means the country China, and 'zh' means the Chinese language. (Country
code vs. language code.) Thankfully 'cn' is not in use as a language
code, so retaining it won't cause any collisions.


we shouldn't confuse scripts with languages

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster  writes:

> Am 30.10.2012 um 13:25 schrieb John Devereux :
>
>> Wolfgang Schuster  writes:
>> 
>>> Am 30.10.2012 um 10:12 schrieb John Devereux :
>>> 
 Wolfgang Schuster  writes:
 
> Am 29.10.2012 um 20:20 schrieb John Devereux :
> 
>> Hi,
>> 
>> There do not seem to be translations for the labels for Chinese, is that
>> correct? Is "zh" the correct language code?
> 
> No, you need “cn” for chinese.
 
 Oh yes that works a lot better! :) 
 
 Thanks Wolfgang.
 
 Another issue I have is footnotes. Chinese footnotes extend past the
 right hand edge of the page.
>>> 
>>> By default context breaks lines only at spaces or between word which are in 
>>> the hyphenations
>>> patterns but none of this applies for chinese, to enable line breaks you 
>>> have to add
>>> \setscript[hanzi] to your document. With this commands context checks the 
>>> input for chinese
>>> and breaks lines at valid points.
>> 
>> Hi Wolfgang,
>> 
>> I did actually try this too but the problem remains in the footnotes (it
>> fixes it for text in the main body). See:
>> 
>> \usemodule[simplefonts]
>> \setmainfont[Microsoft YaHei]
>> \mainlanguage[cn]
>> \language[cn]
>> \setscript[hanzi]
>> \setupfootnotes[split=tolerant]
>
>
> Add this the following code to your document, context resets a few settings 
> for footnotes to prevent
> unwanted side effects from a few commands and I guess this disables also the 
> chinese line break mechanism.
>
> \startsetups footnote:hanzi
>   \setscript[hanzi]
> \stopsetups
>
> \setupnote[footnote][setups={footnote:hanzi}]
>
> Wolfgang

Beautiful, that did it, thank you very much.

-- 

John Devereux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 13:25 schrieb John Devereux :

> Wolfgang Schuster  writes:
> 
>> Am 30.10.2012 um 10:12 schrieb John Devereux :
>> 
>>> Wolfgang Schuster  writes:
>>> 
 Am 29.10.2012 um 20:20 schrieb John Devereux :
 
> Hi,
> 
> There do not seem to be translations for the labels for Chinese, is that
> correct? Is "zh" the correct language code?
 
 No, you need “cn” for chinese.
>>> 
>>> Oh yes that works a lot better! :) 
>>> 
>>> Thanks Wolfgang.
>>> 
>>> Another issue I have is footnotes. Chinese footnotes extend past the
>>> right hand edge of the page.
>> 
>> By default context breaks lines only at spaces or between word which are in 
>> the hyphenations
>> patterns but none of this applies for chinese, to enable line breaks you 
>> have to add
>> \setscript[hanzi] to your document. With this commands context checks the 
>> input for chinese
>> and breaks lines at valid points.
> 
> Hi Wolfgang,
> 
> I did actually try this too but the problem remains in the footnotes (it
> fixes it for text in the main body). See:
> 
> \usemodule[simplefonts]
> \setmainfont[Microsoft YaHei]
> \mainlanguage[cn]
> \language[cn]
> \setscript[hanzi]
> \setupfootnotes[split=tolerant]


Add this the following code to your document, context resets a few settings for 
footnotes to prevent
unwanted side effects from a few commands and I guess this disables also the 
chinese line break mechanism.

\startsetups footnote:hanzi
  \setscript[hanzi]
\stopsetups

\setupnote[footnote][setups={footnote:hanzi}]

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster  writes:

> Am 30.10.2012 um 10:12 schrieb John Devereux :
>
>> Wolfgang Schuster  writes:
>> 
>>> Am 29.10.2012 um 20:20 schrieb John Devereux :
>>> 
 Hi,
 
 There do not seem to be translations for the labels for Chinese, is that
 correct? Is "zh" the correct language code?
>>> 
>>> No, you need “cn” for chinese.
>> 
>> Oh yes that works a lot better! :) 
>> 
>> Thanks Wolfgang.
>> 
>> Another issue I have is footnotes. Chinese footnotes extend past the
>> right hand edge of the page.
>
> By default context breaks lines only at spaces or between word which are in 
> the hyphenations
> patterns but none of this applies for chinese, to enable line breaks you have 
> to add
> \setscript[hanzi] to your document. With this commands context checks the 
> input for chinese
> and breaks lines at valid points.

Hi Wolfgang,

I did actually try this too but the problem remains in the footnotes (it
fixes it for text in the main body). See:

\usemodule[simplefonts]
\setmainfont[Microsoft YaHei]
\mainlanguage[cn]
\language[cn]
\setscript[hanzi]
\setupfootnotes[split=tolerant]

\starttext

话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了出
来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗
去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身
回来,无精打彩的卸了残妆。\footnote{话说林黛玉正自悲泣,忽听院门响
  处,只见宝钗出来了,宝玉袭人一群人送了出来。待要上去问着宝玉,又恐当
  着众人问羞了宝玉不便,因而闪过一旁,让宝钗去了,宝玉等进去关了门,方
  转过来,犹望着门洒了几点泪。自觉无味,方转身回来,无精打彩的卸了残妆。}

\blank

There were a king with a large jaw and a queen with a plain face, on
the throne of England; there were a king with a large jaw and a queen
with a fair face, on the throne of France. In both countries it was
clearer than crystal to the lords of the State preserves of loaves and
fishes, that things in general were settled for ever. \footnote{There
  were a king with a large jaw and a queen with a plain face, on the
  throne of England; there were a king with a large jaw and a queen
  with a fair face, on the throne of France. In both countries it was
  clearer than crystal to the lords of the State preserves of loaves
  and fishes, that things in general were settled for ever.}

\stoptext


-- 

John Devereux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 10:12 schrieb John Devereux :

> Wolfgang Schuster  writes:
> 
>> Am 29.10.2012 um 20:20 schrieb John Devereux :
>> 
>>> Hi,
>>> 
>>> There do not seem to be translations for the labels for Chinese, is that
>>> correct? Is "zh" the correct language code?
>> 
>> No, you need “cn” for chinese.
> 
> Oh yes that works a lot better! :) 
> 
> Thanks Wolfgang.
> 
> Another issue I have is footnotes. Chinese footnotes extend past the
> right hand edge of the page.

By default context breaks lines only at spaces or between word which are in the 
hyphenations
patterns but none of this applies for chinese, to enable line breaks you have 
to add
\setscript[hanzi] to your document. With this commands context checks the input 
for chinese
and breaks lines at valid points.

Wolfgang 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese setuplabeltext

2012-10-30 Thread Sietse Brouwer
John Devereux wrote:
>> There do not seem to be translations for the labels for Chinese, is that
>> correct? Is "zh" the correct language code?

Wolfgang Schuster wrote:
> No, you need “cn” for chinese.

Might it be advisable to add 'zh' as a synonym? Technically, 'cn'
means the country China, and 'zh' means the Chinese language. (Country
code vs. language code.) Thankfully 'cn' is not in use as a language
code, so retaining it won't cause any collisions.

--Sietse
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster  writes:

> Am 29.10.2012 um 20:20 schrieb John Devereux :
>
>> Hi,
>> 
>> There do not seem to be translations for the labels for Chinese, is that
>> correct? Is "zh" the correct language code?
>
> No, you need “cn” for chinese.

Oh yes that works a lot better! :) 

Thanks Wolfgang.

Another issue I have is footnotes. Chinese footnotes extend past the
right hand edge of the page.

\usemodule[simplefonts]
\setmainfont[Microsoft YaHei]
\mainlanguage[cn]
\language[cn]

\starttext

Hello, World \footnote{话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了
出来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗
去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身回
来,无精打彩的卸了残妆。}

Hello, World \footnote{There were a king with a large jaw and a queen
  with a plain face, on the throne of England; there were a king with
  a large jaw and a queen with a fair face, on the throne of
  France. In both countries it was clearer than crystal to the lords
  of the State preserves of loaves and fishes, that things in general
  were settled for ever.}

\stoptext

mtx-context | current version: 2012.09.16 23:18

-- 

John Devereux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese setuplabeltext

2012-10-29 Thread Wolfgang Schuster

Am 29.10.2012 um 20:20 schrieb John Devereux :

> Hi,
> 
> There do not seem to be translations for the labels for Chinese, is that
> correct? Is "zh" the correct language code?

No, you need “cn” for chinese.

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese setuplabeltext

2012-10-29 Thread John Devereux
Hi,

There do not seem to be translations for the labels for Chinese, is that
correct? Is "zh" the correct language code?

\setuplabeltext[zh][figure=CHINESE_HERE ]
\mainlanguage[zh]
\language[zh]
\starttext
\labeltext{figure}
\stoptext

This just displays the English word "Figure".

context --version

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file: 
/opt/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2012.09.16 23:18


Thanks,

John

-- 

John Devereux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese hyphenation / line splitting

2012-04-16 Thread John Devereux
Wolfgang Schuster  writes:

> Am 16.04.2012 um 10:52 schrieb John Devereux:
>
>> 
>> Hi All,
>> 
>> We are having a go at typesetting one of our manuals in Chinese
>> (gulp). Is there some trick to getting hyphenation working? (Or perhaps
>> "line-splitting" is a better term, I don't even know if hyphens are used
>> in Chinese).
>> 
>> What I see in the PDF are unbroken lines running off the edge of the
>> page. If I manually insert spaces, then the lines do break but seem to
>> go slightly past the right-hand edge of the paper (so parts of the
>> characters are lost).
>> 
>> Sample text is from what I think is the Chinese section of Wikipedia,
>> hopefully is not offensive...
>> 
>> ==
>> 
>> \usemodule[simplefonts]
>> \setmainfont[Adobe Heiti Std]
>> %\setmainfont[Arial Unicode MS]
>
> Add \setscript[hanzi].

Fantastic, that worked. Thanks Wolfgang.


-- 

John Devereux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese hyphenation / line splitting

2012-04-16 Thread Wolfgang Schuster

Am 16.04.2012 um 10:52 schrieb John Devereux:

> 
> Hi All,
> 
> We are having a go at typesetting one of our manuals in Chinese
> (gulp). Is there some trick to getting hyphenation working? (Or perhaps
> "line-splitting" is a better term, I don't even know if hyphens are used
> in Chinese).
> 
> What I see in the PDF are unbroken lines running off the edge of the
> page. If I manually insert spaces, then the lines do break but seem to
> go slightly past the right-hand edge of the paper (so parts of the
> characters are lost).
> 
> Sample text is from what I think is the Chinese section of Wikipedia,
> hopefully is not offensive...
> 
> ==
> 
> \usemodule[simplefonts]
> \setmainfont[Adobe Heiti Std]
> %\setmainfont[Arial Unicode MS]

Add \setscript[hanzi].

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese hyphenation / line splitting

2012-04-16 Thread John Devereux

Hi All,

We are having a go at typesetting one of our manuals in Chinese
(gulp). Is there some trick to getting hyphenation working? (Or perhaps
"line-splitting" is a better term, I don't even know if hyphens are used
in Chinese).

What I see in the PDF are unbroken lines running off the edge of the
page. If I manually insert spaces, then the lines do break but seem to
go slightly past the right-hand edge of the paper (so parts of the
characters are lost).

Sample text is from what I think is the Chinese section of Wikipedia,
hopefully is not offensive...

==

\usemodule[simplefonts]
\setmainfont[Adobe Heiti Std]
%\setmainfont[Arial Unicode MS]

\starttext
\mainlanguage[zh]

阿梅莉亚·埃尔哈特(1897年-1937年)是一位著名的美國女性飛行員和女权运动者。埃爾哈特是第一位获得飞行优异十字勋章、第一位独自飞越大西洋的女飞行员。她还创了许多其他纪录,将自身的飞行经历編寫成非常畅销的書籍,並協助建立了一个女飞行员组织。1937年,當她嘗試全球首次環球飛行時,在飛越太平洋期間神秘失蹤。至今为止她的生活、生涯和消失一直使人神往。阿梅莉亚·埃尔哈特在她生前就已经是一名国际名人了。她腼腆感人的外貌、独立性、持久性、在压力下保持安静、勇气、有目标的生涯以及年轻时就失踪使得她在流行文化中成为一个持久的名人。关于她的生平出版过数百文章和许多书,这些书往往作为尤其是对女孩子的勉励的读物。

\stoptext

==

Thanks,

John


-- 

John Devereux
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Chinese TTC fonts can not be loaded with the beta (2011.02.11)

2011-02-13 Thread Taco Hoekwater

On 02/14/2011 01:40 AM, Li Yanrui (李延瑞) wrote:

2011/2/13 Philipp A.:


i wanted to load a ttc at one point, too, and failed.

i found beer, a free software collection, and ported it’s ttc2ttf tool to
python (as a challenge).

you can find my port here, but it doesn’t get the magic numbers right. it
works for me, though.



In fact  the ttc fonts can be loaded and used in the beta before
2011.02.11. For extracting ttf from ttc you can also use fontforge.


This and the problem with the Symbola otf are just bugs. Using fontforge
is possible, but really ConTeXt should be fixed.

Best wishes,
Taco


___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese TTC fonts can not be loaded with the beta (2011.02.11)

2011-02-13 Thread 李延瑞
2011/2/13 Philipp A. :
>
> i wanted to load a ttc at one point, too, and failed.
>
> i found beer, a free software collection, and ported it’s ttc2ttf tool to
> python (as a challenge).
>
> you can find my port here, but it doesn’t get the magic numbers right. it
> works for me, though.
>

In fact  the ttc fonts can be loaded and used in the beta before
2011.02.11. For extracting ttf from ttc you can also use fontforge.

-- 
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese TTC fonts can not be loaded with the beta (2011.02.11)

2011-02-13 Thread Philipp A.
2011/2/13 Li Yanrui (李延瑞) 

> Hi,
>
> For this example with simsun.ttc (it can be download from
> http://www.slax.org/modules.php?action=detail&id=2630):
>
> \definefont[song][name:nsimsun]
> \starttext
> \song 测试
> \stoptext
>
> ConTeXt MkIV said:
>
> fonts   > fallback modern rm 12pt is loaded
> system  > begin file b at line 3
> fonts   > otf loading > loading:
> selfautoparent:texmf-local/fonts/truetype/winfonts/simsun.ttc (hash:
> simsun-nsimsun)
> fonts   > otf loading > font loaded okay
> fonts   > otf loading > loading failed (file read error)
> fonts   > defining > forced type ttc of simsun not found
>
> I have tested the uming.ttc (AR PL UMing, it can be download from
> http://www.freedesktop.org/wiki/Software/CJKUnifonts/Download) and got
> the same error.
>
> --
> Best regards,
>
> Li Yanrui
>

i wanted to load a ttc at one point, too, and failed.

i found beer , a free
software collection, and ported it’s ttc2ttf tool to python (as a
challenge).

you can find my port here , but it doesn’t get
the magic numbers right. it works for me, though.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese TTC fonts can not be loaded with the beta (2011.02.11)

2011-02-12 Thread 李延瑞
Hi,

For this example with simsun.ttc (it can be download from
http://www.slax.org/modules.php?action=detail&id=2630):

\definefont[song][name:nsimsun]
\starttext
\song 测试
\stoptext

ConTeXt MkIV said:

fonts   > fallback modern rm 12pt is loaded
system  > begin file b at line 3
fonts   > otf loading > loading:
selfautoparent:texmf-local/fonts/truetype/winfonts/simsun.ttc (hash:
simsun-nsimsun)
fonts   > otf loading > font loaded okay
fonts   > otf loading > loading failed (file read error)
fonts   > defining > forced type ttc of simsun not found

I have tested the uming.ttc (AR PL UMing, it can be download from
http://www.freedesktop.org/wiki/Software/CJKUnifonts/Download) and got
the same error.

-- 
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese numeral conversion

2009-12-22 Thread Yanrui Li
2009/12/23 Yanrui Li 

>
>
> 2009/12/23 Yanrui Li 
>
> Hi Hans,
>>
>> I modified the part of Chinese numeral conversion in core-con.lua script.
>> The attachment is the patch. After many tests as the following I think the
>> patch is right even though it looks dirty.
>
>
> sorry, this function should be:
>
>
sorry again.

I just discovered it is wrong with the numbers biger than 10. Now I made
a new patch and new output result.

-- 
Best regards,

Li Yanrui


core-con.lua.patch
Description: Binary data


ch-n.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese numeral conversion

2009-12-22 Thread Yanrui Li
2009/12/23 Yanrui Li 

> Hi Hans,
>
> I modified the part of Chinese numeral conversion in core-con.lua script.
> The attachment is the patch. After many tests as the following I think the
> patch is right even though it looks dirty.
>
> 
> \definefont[song][name:adobesongstdlight]\song
> \starttext
>
> \startluacode
> local function test (cs)
> j = 1
> for i = 1, 9 do
> tex.print (j .. ': ' .. '\\chinesenumerals{' .. j .. '}\\par')
> j = j * 10 + 1
> end
> tex.print ('\\blank')
> end
>
>
sorry, this function should be:

 local function test (cs)
j = 1
for i = 1, 9 do
tex.print (j .. ': ' .. cs .. '{' .. j .. '}\\par')
j = j * 10 + 1
end
tex.print ('\\blank')
end


-- 
Best regards,

Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese numeral conversion

2009-12-22 Thread Yanrui Li
Hi Hans,

I modified the part of Chinese numeral conversion in core-con.lua script.
The attachment is the patch. After many tests as the following I think the
patch is right even though it looks dirty.


\definefont[song][name:adobesongstdlight]\song
\starttext

\startluacode
local function test (cs)
j = 1
for i = 1, 9 do
tex.print (j .. ': ' .. '\\chinesenumerals{' .. j .. '}\\par')
j = j * 10 + 1
end
tex.print ('\\blank')
end

test ('\\chinesenumerals')
test ('\\chinesecapnumerals')
test ('\\chineseallnumerals')
\stopluacode

This is test for chinese zero:

\startluacode
j = 1
for i = 1, 9 do
tex.print (j .. ': ' .. '\\chinesenumerals{' .. j .. '}\\par')
if i % 2 == 0 then
j = j * 10
else
j = j * 10 + 1
end
end
\stopluacode

\stoptext


The pdf in attachments is output result.

-- 
Best regards,

Li Yanrui


core-con.lua.patch
Description: Binary data


ch-n.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Hans Hagen
Dohyun Kim wrote:

> even after modification of kpse, two more problems should be fixed.
> 1. lowering uppercase filename before searching cidmap
> 2. including l-io.lua into luatex-plain

i uploaded a beta

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Dohyun Kim
2009/5/12 Hans Hagen :
> Yanrui Li wrote:
>>
>> Hi Hans,
>>
>> I tried to use Chinese opentype fonts with luatex + plain fmt but I
>> failed. Only with Chinese TTF fonts it can work.
>>
>> This a simple example:
>>
>> \pdfoutput=1
>> \font\myfont=AdobeSongStd-Light
>>
>> \myfont
>> 我想实现 LuaTeX 对中文的支持
>>
>> \end
>>
>> When I compiled it, I got the following messages:
>>
>> This is LuaTeX, Version beta-0.41.0-2009051221 (Web2C 7.5.7)
>>  \write18 enabled.
>> (tt.tex (luatex-basics.tex) (luatex-fonts.tex 
>> > -fonts.lua loaded in 0.027 seconds>) (luatex-mplib.tex)
>> LuaTeX warning: lua-loaded font [51]
>> (/usr/share/fonts/adobe/AdobeSongStd-Light
>> .otf) has no characters!
>> [1{/opt/context/tex/texmf/fonts/map/pdftex/plain/pdftex.map}]
>> ){/opt/context/te
>>
>> x/texmf/fonts/enc/dvips/lm/lm-rep-cmrm.enc}> public/lm/lmr10.pfb>
>> Output written on tt.pdf (1 page, 17128 bytes).
>> Transcript written on tt.log.
>
> this is because a cidmap is needed and the kpse that you use does not have
> it; upcoming versions of kpse (and luatex's kpse lib) will support it given
> that you also adapted your texmf.cnf accordingly then
>
> so a bit patience is needed
>

Yes, that is a source of problem; more obstacles, however, are waiting for us.

1.
To test an cid-keyed opentype fonts, I have copied *.cidmap files
into current directory and processed a simple document with luatex-plain.
But it did not work:

This is LuaTeX, Version beta-0.40.1-2009050920 (Web2C 7.5.7)
 \write18 enabled.
(nanumotf.tex
(/media/disk/context/tex/texmf-context/tex/generic/context/luatex-basics.tex)
(/media/disk/context/tex/texmf-context/tex/generic/context/luatex-fonts.tex  )
(/media/disk/context/tex/texmf-context/tex/generic/context/luatex-mplib.tex)
LuaTeX warning: lua-loaded font [51] (/media/disk/context/tex/texmf-local/fonts
/opentype/korean/NanumGothic.otf) has no characters!

The same message as that of Li Yanrui's experiment, which would not
occur on windows machine. But I am on my linux box, whose
file system, as you know, distinguishs upper- and lower-case letters:
Adobe-Korea1-2.cidmap is quite different from adobe-korea1-2.cidmap.
So I added one line into luatex-fonts-merged.lua as follows:

--- ../tex/texmf-context/tex/generic/context/luatex-fonts-merged.lua
2009-05-12
18:29:55.0 +0900
+++ luatex-fonts-merged.lua 2009-05-13 01:14:55.0 +0900
@@ -3898,6 +3898,7 @@

 local function locate(registry,ordering,supplement)
 local filename = format(template,registry,ordering,supplement)
+filename = string.lower(filename)
 local cidmap = fonts.cid.map[filename]
 if not cidmap then
 if trace_loading then


2.
However, I still got an error even after that one-line patch:

This is LuaTeX, Version beta-0.40.1-2009050920 (Web2C 7.5.7)
 \write18 enabled.
(nanumotf.tex
(/media/disk/context/tex/texmf-context/tex/generic/context/luatex-basics.tex)
(/media/disk/context/tex/texmf-context/tex/generic/context/luatex-fonts.tex  )
(/media/disk/context/tex/texmf-context/tex/generic/context/luatex-mplib.tex)
! LuaTeX error ./luatex-fonts-merged.lua:3879: attempt to call field 'loaddata'
 (a nil value).

In other words, loaddata is not defined.  So I issued "grep" command,
which helped me finding "io.loaddata" function defined in l-io.lua.

In sum:
even after modification of kpse, two more problems should be fixed.
1. lowering uppercase filename before searching cidmap
2. including l-io.lua into luatex-plain

Regards,
Dohyun Kim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Wolfgang Schuster


Am 12.05.2009 um 18:04 schrieb Yue Wang:


On Tue, May 12, 2009 at 11:47 PM, Hans Hagen  wrote:
- we have a set of default cjk fonts in tex live that can serve as  
reference


Adobe set will be good enough for reference.


With Adobes fonts you can use the 'palt' feature but this has a few  
effects
which are not always desired but I wasn't able in the past to use it  
in MkIV.


Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 11:47 PM, Hans Hagen  wrote:
> Yanrui Li wrote:
>
>> I need to load it only for the experiments of Chinese punctuation
>> compression in the bbox way.
>
> i played with that and discarded the code (in mkiv) for the moment because
> first i want more info about fonts and their quality ... one easily spends
> days on solving 'bugs' that are actually bugs in fonts instead
>
> i will look again into these issues when
>
> - i get precise rules for spacing (or multiple rule sets)

No one have the epxerience of using the bbox information to typeset
Chinese before --- that information was not availble to the user until
LuaTeX came into being.
So even experienced Chinese typesetting artist don't know the spacing rules.
We have to play/experiment that in LuaTeX in order to find the best
possible parameters for typesetting.
Then we can report to you what should ConTeXt do in order to type
Chinese perfectly.

> - we have a set of default cjk fonts in tex live that can serve as reference

Adobe set will be good enough for reference.

>
> Hans
>
> -
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Hans Hagen

Yanrui Li wrote:


I need to load it only for the experiments of Chinese punctuation
compression in the bbox way.


i played with that and discarded the code (in mkiv) for the moment 
because first i want more info about fonts and their quality ... one 
easily spends days on solving 'bugs' that are actually bugs in fonts instead


i will look again into these issues when

- i get precise rules for spacing (or multiple rule sets)
- we have a set of default cjk fonts in tex live that can serve as 
reference


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Yanrui Li
On Tue, May 12, 2009 at 10:37 PM, Hans Hagen  wrote:
> Yanrui Li wrote:
>>
>> Hi Hans,
>>
>> I tried to use Chinese opentype fonts with luatex + plain fmt but I
>> failed. Only with Chinese TTF fonts it can work.
>>
>
> this is because a cidmap is needed and the kpse that you use does not have
> it; upcoming versions of kpse (and luatex's kpse lib) will support it given
> that you also adapted your texmf.cnf accordingly then

I see. Thanks.

>
> so a bit patience is needed

Yes. I prepared for it because Yue had told me those calculations in
OTF font processing of luatex.
I need to load it only for the experiments of Chinese punctuation
compression in the bbox way.

-- 
Best wishes,
Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Yanrui Li
Hi Hans,

I tried to use Chinese opentype fonts with luatex + plain fmt but I
failed. Only with Chinese TTF fonts it can work.

This a simple example:

\pdfoutput=1
\font\myfont=AdobeSongStd-Light

\myfont
我想实现 LuaTeX 对中文的支持

\end

When I compiled it, I got the following messages:

This is LuaTeX, Version beta-0.41.0-2009051221 (Web2C 7.5.7)
 \write18 enabled.
(tt.tex (luatex-basics.tex) (luatex-fonts.tex  ) (luatex-mplib.tex)
LuaTeX warning: lua-loaded font [51] (/usr/share/fonts/adobe/AdobeSongStd-Light
.otf) has no characters!
[1{/opt/context/tex/texmf/fonts/map/pdftex/plain/pdftex.map}] ){/opt/context/te
x/texmf/fonts/enc/dvips/lm/lm-rep-cmrm.enc}
Output written on tt.pdf (1 page, 17128 bytes).
Transcript written on tt.log.

My test environment is minimals 2009.05.12 11:27 with Linux x86.

-- 
Best wishes,
Li Yanrui
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Hans Hagen

Yanrui Li wrote:

Hi Hans,

I tried to use Chinese opentype fonts with luatex + plain fmt but I
failed. Only with Chinese TTF fonts it can work.

This a simple example:

\pdfoutput=1
\font\myfont=AdobeSongStd-Light

\myfont
我想实现 LuaTeX 对中文的支持

\end

When I compiled it, I got the following messages:

This is LuaTeX, Version beta-0.41.0-2009051221 (Web2C 7.5.7)
 \write18 enabled.
(tt.tex (luatex-basics.tex) (luatex-fonts.tex  ) (luatex-mplib.tex)
LuaTeX warning: lua-loaded font [51] (/usr/share/fonts/adobe/AdobeSongStd-Light
.otf) has no characters!
[1{/opt/context/tex/texmf/fonts/map/pdftex/plain/pdftex.map}] ){/opt/context/te
x/texmf/fonts/enc/dvips/lm/lm-rep-cmrm.enc}
Output written on tt.pdf (1 page, 17128 bytes).
Transcript written on tt.log.


this is because a cidmap is needed and the kpse that you use does not 
have it; upcoming versions of kpse (and luatex's kpse lib) will support 
it given that you also adapted your texmf.cnf accordingly then


so a bit patience is needed

Hans

(worls ok in mkiv because it follows a different route)

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese numbers.

2009-04-13 Thread Yue Wang
Hi,

On Mon, Apr 13, 2009 at 7:26 PM, Hans Hagen  wrote:
> Yue Wang wrote:
>> Hi, Hans:
>>
>> I review the source code for chinese numbers, and hereare my comments:
>
> can you make a more detailed list of 'wrong' and 'expected' (some wrong
> miss the expected)

there is a small python program at the end of
http://blog.csdn.net/fengye515/archive/2009/02/14/3890740.aspx
(section 8).

It's pretty short, and it is a better explanation than detail list.

Yue Wang
>
> Hans
>
> -
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chinese numbers.

2009-04-13 Thread Hans Hagen
Yue Wang wrote:
> Hi, Hans:
> 
> I review the source code for chinese numbers, and hereare my comments:

can you make a more detailed list of 'wrong' and 'expected' (some wrong
miss the expected)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese numbers.

2009-04-12 Thread Yue Wang
Hi, Hans:

I review the source code for chinese numbers, and hereare my comments:

> 1 一   一   壹
right

> 10十   十   拾
right

> 15十五  十五  拾伍
right

> 25二十五 廿五  贰拾伍
right

> 35三十五 卅五  叁拾伍
right

> 45四十五 四十五 肆拾伍
right

> 11十一  十一  拾壹
right

>100百   百   佰
wrong  should be 一百

> 111   百十一 百十一 佰拾壹
wrong, 一百十一

>   千百十一千百十一仟佰拾壹
一千一百十一

> 1 万   万   �f
一万

> 1 万千百十一   万千百十一   �f仟佰拾壹
一万一千一百十一

> 10十万  十万  十�f
right

> 11十一万千百十一 十一万千百十一 十一�f仟佰拾壹
十一万一千一百十一

> 111   百十一万千百十一百十一万千百十一百十一�f仟佰拾壹
一百十一万一千一百十一

>   千百十一万千百十一   千百十一万千百十一   千百十一�f仟佰拾壹
一千一百十一万一千一百十一

> 1 亿千百十一万千百十一  亿千百十一万千百十一  亿千百十一�f仟佰拾壹
一亿一千一百十一万一千一百十一

> 1 亿   亿   亿
一亿

> 11十一亿千百十一万千百十一十一亿千百十一万千百十一十一亿千百十一�f仟佰拾壹
十一亿一千一百十一万一千一百十一
> 111   百十一亿千百十一万千百十一   百十一亿千百十一万千百十一   百十一亿千百十一�f仟佰拾壹
一百十一亿一千一百十一万一千一百十一

>   千百十一亿千百十一万千百十一  千百十一亿千百十一万千百十一  千百十一亿千百十一�f仟佰拾壹
一千一百十一亿一千一百十一万一千一百十一

> 1 万千百十一亿千百十一万千百十一 万千百十一亿千百十一万千百十一 万千百十一亿千百十一�f仟佰拾壹
一万一千一百十一亿一千一百十一万一千一百十一

for k, v in ipairs { 1001, 1010,1011, 10001, 11001, 10100, 1234, 123456789 } do
   print(v,tochinese(v),tochinese(v,"all"),tochinese(v,"cap"))
end


> 1001  千一  千一  仟壹
wrong,  一千零一

>1010   千十  千十  仟拾
一千零十

>1011   千十一 千十一 仟拾壹
一千零十一

>10001  万一  万一  �f壹
一万零一

>11001  万千一 万千一 �f仟壹
一万一千零一

>10100  万百  万百  �f佰
一万零一百

>1234   千二百三十四  千二百卅四   仟贰佰叁拾肆
一千二百三十四

>123456789  亿二千三百四十五万六千七百八十九亿二千三百四十五万六千七百八十九
>亿二千三百四十五�f陆仟柒佰捌拾玖
一亿二千三百四十五万六千七百八十九

Yue Wang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chinese, cyrillic questions

2007-06-21 Thread Tobias Burnus
Hello all,

I have a document which which is predominately English, but contains
(currently) also 8 Chinese characters and 2 Cyrillic words (in the
Acknowledgement section).

First, regarding Chinese:
I use:
  \enableregime[utf]
  \useencoding[cyr]
  \usemodule[chinese]
  \mainlanguage[uk]
  \language[uk]

I would expect having mainlanguage != chinese would turn all
enummerations to arabic numbers. However, I still have -, =, etc. in the
table of contents, in enumberation etc. Is there a simple command to
turn this off?

Secondly, regarding Cyrillic:

Currently, I follow loosely wiki.contextgarden.net and use
  \useencoding[cyr]
  \definetypeface [russian]
[rm] [serif] [computer-modern] [default] [encoding=t2a]
  \def\RuText#1{{\switchtobodyfont[russian]#1}}

On my system (TeXLive 2007 as provided by SUSE) bitmap fonts are used as
the seemingly needed cm-super fonts are not included; the system,
however, has cmcyr type 1 fonts. As true ignoramus regarding fonts in
TeX and the dozens of Cyrillic encodings, I failed to use them instead.

Tobias

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] chinese characters in an itemize environment

2006-09-26 Thread Lutz Haseloff
Peter Rolf schrieb:
> Lutz Haseloff wrote:
>> Peter Rolf schrieb:
>>> just guessing (but worth a try):
>>>
>>> \setupitemgroups[inbetween=]
>>>
>>> The default is .5ex, which depends on the current font (see end of
>>> core-itm.tex).
>>>
>>> HTH, Peter
>>>
>> \setupitemgroups[inbetween=2cm]
>> doesn't work.
>>
>> Iterestingly an inserted \mbox makes the "error" going away:
>>
> It also works with \hbox{} or \null in front of the chinese text only.
> So I guess you are right with your assumption, that it's a (chinese)
> font specific problem. The additional indention of the chinese text is
> only clearly visible, when you mix the languages.
> 
> Sorry, can't help you any further. BTW: is this the correct chinese
> translation?
> 
> Greetings, Peter
> 
>> \startitemize[m,packed]
>> \item\mbox{}三个小矮人
>> \item\mbox{}Die drei Männlein im Walde
>> \stopitemize
>>
>> Thats why i assume, this has to do with the chinese
>> characters, and not only with the different fonts.
>>

is there a cleaner way as to define something like
\def\myitem{\item\null} ?

Greetings

Lutz


Greetings
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese characters in an itemize environment

2006-09-22 Thread Peter Rolf
Lutz Haseloff wrote:
> Peter Rolf schrieb:
>> just guessing (but worth a try):
>>
>> \setupitemgroups[inbetween=]
>>
>> The default is .5ex, which depends on the current font (see end of
>> core-itm.tex).
>>
>> HTH, Peter
>>
> 
> \setupitemgroups[inbetween=2cm]
> doesn't work.
> 
> Iterestingly an inserted \mbox makes the "error" going away:
>
It also works with \hbox{} or \null in front of the chinese text only.
So I guess you are right with your assumption, that it's a (chinese)
font specific problem. The additional indention of the chinese text is
only clearly visible, when you mix the languages.

Sorry, can't help you any further. BTW: is this the correct chinese
translation?

Greetings, Peter

> \startitemize[m,packed]
> \item\mbox{}三个小矮人
> \item\mbox{}Die drei Männlein im Walde
> \stopitemize
> 
> Thats why i assume, this has to do with the chinese
> characters, and not only with the different fonts.
> 
> Greetings
> 
> Lutz
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese characters in an itemize environment

2006-09-22 Thread Lutz Haseloff
Peter Rolf schrieb:
>>
> just guessing (but worth a try):
> 
> \setupitemgroups[inbetween=]
> 
> The default is .5ex, which depends on the current font (see end of
> core-itm.tex).
> 
> HTH, Peter
> 

\setupitemgroups[inbetween=2cm]
doesn't work.

Iterestingly an inserted \mbox makes the "error" going away:

\startitemize[m,packed]
\item\mbox{}三个小矮人
\item\mbox{}Die drei Männlein im Walde
\stopitemize

Thats why i assume, this has to do with the chinese
characters, and not only with the different fonts.

Greetings

Lutz
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese characters in an itemize environment

2006-09-22 Thread Peter Rolf
Lutz Haseloff wrote:
> Hi all,
> 
> If I use:
> 
> \startitemize[m,packed]
> \item 三个小矮人 (some chinese characters)
> \item Die drei Männlein im Walde
> \stopitemize
> 
> I get more space between the number and the text in the
> chinese line as in the latin line.
> The difference is .3-.4em depending on the fonts.
> 
> How can I avoid this?
>
just guessing (but worth a try):

\setupitemgroups[inbetween=]

The default is .5ex, which depends on the current font (see end of
core-itm.tex).

HTH, Peter

> Greetings
> 
> Lutz
> ___
> ntg-context mailing list
> ntg-context@ntg.nl
> http://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] chinese characters in an itemize environment

2006-09-21 Thread Lutz Haseloff
Hi all,

If I use:

\startitemize[m,packed]
\item 三个小矮人 (some chinese characters)
\item Die drei Männlein im Walde
\stopitemize

I get more space between the number and the text in the
chinese line as in the latin line.
The difference is .3-.4em depending on the fonts.

How can I avoid this?

Greetings

Lutz
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese labels

2006-03-17 Thread Lutz Haseloff
> try:
> 
> \starttext 
> 
> \startMPenvironment
>   \enableregime[utf]
>   \usemodule[chi-00]
> \stopMPenvironment
> \startMPpage
> label(btex ÆÇæà etex,(0,0));
> \stopMPpage
> 
> \stoptext
> 
> instead. 
> 
> Hans 

This works fine, thanks

Greetings Lutz


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese labels

2006-03-17 Thread Hans Hagen
Lutz Haseloff wrote:
> Hi Hans, Hi all,
>
> I would like to typeset chinese labels with metapost.
> My code is:
>
> -
> \starttext
> \startMPpage
> verbatimtex
> \enableregime[utf]
> \usemodule[chi-00]
> etex;
> label(btex ? etex,(0,0));
> \stopMPpage
> \stoptext
>   

try:

\starttext 

\startMPenvironment
  \enableregime[utf]
  \usemodule[chi-00]
\stopMPenvironment
\startMPpage
label(btex ÆÇæà etex,(0,0));
\stopMPpage

\stoptext

instead. 

Hans 

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] chinese labels

2006-03-16 Thread Lutz Haseloff
Hi Hans, Hi all,

I would like to typeset chinese labels with metapost.
My code is:

-
\starttext
\startMPpage
verbatimtex
\enableregime[utf]
\usemodule[chi-00]
etex;
label(btex ? etex,(0,0));
\stopMPpage
\stoptext
-

It results in the errormessage:

! Argument of \dodoubletestempty has an extra }.

\par

   }
\doifnextcharelse ...token =#1\def \!!stringa {#2}
  \def \!!stringb
{#3}\futur...
 ...mtex \enableregime [utf] \usemodule
  [chi-00] etex; label(btex
...

\writecheckedMPgraphic ...icfalse \edef \ascii {#1
  }\convertcommand \ascii
\t...

\startMPgraphic ...hic \writecheckedMPgraphic {#1}
  \stopwritingMPgraphic
...
l.8 \stopMPpage

?

Thanks for any help

Lutz


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-07 Thread Lutz Haseloff


> >> 
> > why these numbers?
> >   
> 
> 255 = U+FF are the so-called Fullwidth Latin Characters
> (http://www.unicode.org/charts/PDF/UFF00.pdf)
> they are "A" "B" "C" etc. but having the width of a Chinese character
> (roughly "A ", "B ", "C "). Since they look rather ugly in 
> non-CJK texts
> and they have to match the width of the Chinese characters in 
> the font,
> they are only in CJK fonts.
>
> 32 = U+20 are general punctuation. I don't see a reason for those.
> http://www.unicode.org/charts/PDF/U2000.pdf
> 
> 37 = U+25 are box drawing characters - no idea why those should be
> included. http://www.unicode.org/charts/PDF/U2500.pdf
> 
> 38 = U+26 are miscanllaneous symbols - no idea why those should be
> included. http://www.unicode.org/charts/PDF/U2600.pdf

For fast input of chinese characters i use "NJSTAR Chinese Wordprocessor".
It has a menu entry "Symbols Input" -> "Punctuation".

Thats why i thought all these symbols can appear in chinese texts.

The only necessary entry is the entry for 255.



Greetings and thanks again


Lutz

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-07 Thread Tobias Burnus
Hans Hagen schrieb:
> Lutz Haseloff wrote:
>   
>> I added:
>>
>> \defineunicodecommand 255 {\lookaheaduchar}
>> \defineunicodecommand 32 {\lookaheaduchar}
>> \defineunicodecommand 37 {\lookaheaduchar}
>> \defineunicodecommand 38 {\lookaheaduchar}
>>
>> to unic-cjk.tex and all works now as expected.  
>> 
> why these numbers?
>   

255 = U+FF are the so-called Fullwidth Latin Characters
(http://www.unicode.org/charts/PDF/UFF00.pdf)
they are "A" "B" "C" etc. but having the width of a Chinese character
(roughly "A ", "B ", "C "). Since they look rather ugly in non-CJK texts
and they have to match the width of the Chinese characters in the font,
they are only in CJK fonts.

32 = U+20 are general punctuation. I don't see a reason for those.
http://www.unicode.org/charts/PDF/U2000.pdf

37 = U+25 are box drawing characters - no idea why those should be
included. http://www.unicode.org/charts/PDF/U2500.pdf

38 = U+26 are miscanllaneous symbols - no idea why those should be
included. http://www.unicode.org/charts/PDF/U2600.pdf

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-07 Thread Hans Hagen
Lutz Haseloff wrote:
>   
>> -Urspr�ngliche Nachricht-
>> Von: Tobias Burnus [mailto:[EMAIL PROTECTED]
>> Gesendet: Dienstag, 7. Februar 2006 10:18
>> An: [EMAIL PROTECTED]; mailing list for ConTeXt users
>> Betreff: Re: [NTG-context] chinese with utf in context
>>
>>
>> Hi Lutz,
>>
>> Lutz Haseloff schrieb:
>> 
>>> The symbols from the range FF (f.i. FF0C: FULLWITH COMMA,
>>>
>>>   
>> Try the following (untested): Add the line
>>   \defineunicodecommand 255 {\lookaheaduchar}
>> to unic-cjk.tex. (Maybe you need to regenerate the format file.)
>>
>> Tobias
>>
>>
>> 
>
> Hi Tobias,
>
>
> Thank you very much for your help.
>
> I added:
>
> \defineunicodecommand 255 {\lookaheaduchar}
> \defineunicodecommand 32 {\lookaheaduchar}
> \defineunicodecommand 37 {\lookaheaduchar}
> \defineunicodecommand 38 {\lookaheaduchar}
>
> to unic-cjk.tex and all works now as expected.
>   
why these numbers?

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-07 Thread Lutz Haseloff


> -Ursprüngliche Nachricht-
> Von: Tobias Burnus [mailto:[EMAIL PROTECTED]
> Gesendet: Dienstag, 7. Februar 2006 10:18
> An: [EMAIL PROTECTED]; mailing list for ConTeXt users
> Betreff: Re: [NTG-context] chinese with utf in context
>
>
> Hi Lutz,
>
> Lutz Haseloff schrieb:
> > The symbols from the range FF (f.i. FF0C: FULLWITH COMMA,
> >
> Try the following (untested): Add the line
>   \defineunicodecommand 255 {\lookaheaduchar}
> to unic-cjk.tex. (Maybe you need to regenerate the format file.)
>
> Tobias
>
>

Hi Tobias,


Thank you very much for your help.

I added:

\defineunicodecommand 255 {\lookaheaduchar}
\defineunicodecommand 32 {\lookaheaduchar}
\defineunicodecommand 37 {\lookaheaduchar}
\defineunicodecommand 38 {\lookaheaduchar}

to unic-cjk.tex and all works now as expected.

Thanks again


Lutz


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-07 Thread Tobias Burnus
Hi Lutz,

Lutz Haseloff schrieb:
> The symbols from the range FF (f.i. FF0C: FULLWITH COMMA,
>   
Try the following (untested): Add the line
  \defineunicodecommand 255 {\lookaheaduchar}
to unic-cjk.tex. (Maybe you need to regenerate the format file.)

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-07 Thread Richard Gabriel




I'm sorry I have the same problem as Lutz with the special punctuation - I only haven't noticed this problem before because there weren't these characters in any of my testing documents... :-(I'm going to investigate more...-RichardFrom: Richard Gabriel [mailto:[EMAIL PROTECTED]To: [EMAIL PROTECTED], mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]Sent: Tue, 07 Feb 2006 08:16:18 +0100Subject: Re: [NTG-context] chinese with utf in context
Hello Lutz,I have no problems typesetting Chinese and Japanese in Unicode. I suppose there's a problem with fonts on your system...Were all of the TFM files created properly?Do all the files uni-htsong-ff.tfm, uni-htfs-ff.tfm, uni-hthei-ff.tfm and uni-htkai-ff.tfm exist on your system?Are there some interesting messages in the log?In any casy, feel free to send me any of your test file... ;-)-RichardFrom: Lutz Haseloff [mailto:[EMAIL PROTECTED]]To: "Mailingliste Context (E-Mail)" [mailto:ntg-context@ntg.nl]Sent: Tue, 07 Feb 2006 07:31:29 +0100Subject: [NTG-context] chinese with utf in contextHi all,with the context from 03.02.06 only the punctuation symbolsfrom the unicode range 30 will be printed.The symbols from the range FF (f.i. FF0C: FULLWITH COMMA,FF1A: FULLWITH COLON...) and from the range 20(203B: REFERENCE MARK...) are printedas small black squares.If i convert the file to gbk all symbols will be printed right.If needed i can prepare testfiles in gbk and utf encoding.GreetingsLutz___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese with utf in context

2006-02-06 Thread Richard Gabriel




Hello Lutz,I have no problems typesetting Chinese and Japanese in Unicode. I suppose there's a problem with fonts on your system...Were all of the TFM files created properly?Do all the files uni-htsong-ff.tfm, uni-htfs-ff.tfm, uni-hthei-ff.tfm and uni-htkai-ff.tfm exist on your system?Are there some interesting messages in the log?In any casy, feel free to send me any of your test file... ;-)-RichardFrom: Lutz Haseloff [mailto:[EMAIL PROTECTED]To: "Mailingliste Context (E-Mail)" [mailto:[EMAIL PROTECTED]Sent: Tue, 07 Feb 2006 07:31:29 +0100Subject: [NTG-context] chinese with utf in contextHi all,with the context from 03.02.06 only the punctuation symbolsfrom the unicode range 30 will be printed.The symbols from the range FF (f.i. FF0C: FULLWITH COMMA,FF1A: FULLWITH COLON...) and from the range 20(203B: REFERENCE MARK...) are printedas small black squares.If i convert the file to gbk all symbols will be printed right.If needed i can prepare testfiles in gbk and utf encoding.GreetingsLutz___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] chinese with utf in context

2006-02-06 Thread Lutz Haseloff
Hi all,

with the context from 03.02.06 only the punctuation symbols
from the unicode range 30 will be printed.
The symbols from the range FF (f.i. FF0C: FULLWITH COMMA,
FF1A: FULLWITH COLON...) and from the range 20
(203B: REFERENCE MARK...) are printed
as small black squares.

If i convert the file to gbk all symbols will be printed right.

If needed i can prepare testfiles in gbk and utf encoding.


Greetings


Lutz

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-22 Thread Hans Hagen

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


Re: [NTG-context] Chinese in current ConTeXt

2005-12-22 Thread Richard Gabriel




>> 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 theformer is more popular now, because it is easier to write or typewith keyboard.So it's up to you... -Richard ___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-22 Thread Hans Hagen

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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-22 Thread Richard Gabriel




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,RichardFrom: Tobias Burnus [mailto:[EMAIL PROTECTED]To: mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]Sent: Wed, 21 Dec 2005 02:45:25 +0100Subject: Re: [NTG-context] Chinese in current ConTeXtHi,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 listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Tobias Burnus

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


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Xiao Jianfeng

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
 



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Xiao Jianfeng

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
 



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Hans Hagen

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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Tobias Burnus

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


tra-chi.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Hans Hagen

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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Tobias Burnus

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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Hans Hagen

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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Richard Gabriel




> 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! ;-)-RichardP.S. The rest is for Hans, I can't say... :-(From: Tobias Burnus [mailto:[EMAIL PROTECTED]To: mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]Sent: Tue, 20 Dec 2005 16:09:36 +0100Subject: [NTG-context] Chinese in current ConTeXtHello,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 beyear年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
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Chinese in current ConTeXt

2005-12-20 Thread Tobias Burnus

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


zh-test.tex
Description: TeX document
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] chinese etc

2005-12-15 Thread Richard Gabriel




Hello Hans,yes, I'm seriously interested in Japanese. I can provide you some sample Japanese documents in UTF-8. But I have them in XML only - I'll prepare some ConTeXt samples. I've also tried to prepare the enc and tfm files for fonts I've available - the Mona open-source font and the Microsoft's Mincho family but I was unsuccessfull.I have really not experience with this so I'll post another message regarding this - maybe somebody can help me!-RichardFrom: Hans Hagen [mailto:[EMAIL PROTECTED]To: c [mailto:[EMAIL PROTECTED]Sent: Wed, 14 Dec 2005 23:23:24 +0100Subject: [NTG-context] chinese etc Hi,if someone wants japanese and korean etc utf-8 support, he/she should deliver the fonts, test files and samples in utf-8Hans___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-14 Thread Hans Hagen

Tobias Burnus wrote:


Hi,

Hans Hagen wrote:


chinese is not yet defined in utf so if you want that, we need to do it


We probably should.


question: do the unicode tables cover gbk and big 5 well?


There exists a one-to-one correspondence between GBK and Unicode [1], 
for Big5 there are 7 characters which cannot be mapped one-to-one (see 
comment at top of [2]); thee of which appear twice in Big5 but only 
once in Unicode, two are not in unicode and there are two mapping 
problems.

In practive one can thus say: Both GBK and Big5 can be mapped to Unicode.


so, if we can make things utf deep down and remap gbk and big 5 to utf, 
we can do with one set of fonts, metrics etc


i got chinese working in utf now, but need an enco table for teh special 
cases (see enco-chi); when someone made me that table, i can upload an 
alpha


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] chinese etc

2005-12-14 Thread Hans Hagen

Hi,

if someone wants japanese and korean etc utf-8 support, he/she should 
deliver the fonts, test files and samples in utf-8


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-13 Thread Xiao Jianfeng

Richard Gabriel wrote:


Hello Hans,

to be honest: I don't speak Chinese and don't know much about it.
A few days ago, I was told that we'll let translate some of our 
documents (XML) into Chinese and Japanese and I 'll have to typeset them.
So I started playing with Chinese in ConTeXt. I've reported the 
results which other users (e.g. Tobias) have also noticed.
In fact, all the sample Simplified Chinese documents I've tested it on 
were easily convertible to CP936 (GBK) and could be typeset. This 
doesn't mean that you shall not extend the Unicode support, I only 
think I will not hardly require it... :-)


But yet another question: What about Japanese? I've made only small 
research so far, but unlike Chinese, there's almost no information 
about Japanese in TeX. How much of work would be to adjust the current 
"chinese" ConTeXt module for Japanese? What would you need for it?
[Of course, meanwhile I'll investigate some other ways of typesetting 
Japanese...]


Thanks,
Richard

As far as I know, LaTeX coupled with CJK package can process Chinese, 
Japanese, Korea.


Regards,

xiaojf





*From:* Hans Hagen [mailto:[EMAIL PROTECTED]
*To:* mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]
*Sent:* Mon, 12 Dec 2005 16:53:51 +0100
*Subject:* Re: [NTG-context] Chinese

Richard Gabriel wrote:

> Hi guys,
>
> I can confirm that the UTF-8 input doesn't work for me too.
> If I convert the file info GBK (CP936), it works fine [I suggest to
> use the 'iconv' utility for the conversion :-)].
>
> I tested the UTF-8 output the followin ways:
>
> 1)
> \enableregime[utf]
> \usemodule[chinese]
>

chinese is not yet defined in utf so if you want that, we need to
do it

now, since the chinese remapping stuff is rather complex, the best
method is to consider a dedicated mechanism

question: do the unicode tables cover gbk and big 5 well?

assuming this, how about making a set of tfm,enc,map files that match
the unicode positions (volunteers ...)

we can extend the utf handler with a kind of plugin mechanism:

\unprotect

\def\utfunihashglyph#1%
[EMAIL PROTECTED]@EA{\number\utfdiv{#1}}{#1}} % only div once

\def\doutfunihashglyph#1#2% div raw
{\csname
\ifnum#2<[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
\strippedcsname\unicodeasciicharacter
\else\ifcsname\@@unicommand#1\endcsname
\@@unicommand#1%
\else\ifcsname\@@univector#1\endcsname
\@@univector#1%
\else
\strippedcsname\unicodeunknowncharacter
\fi\fi\fi
[EMAIL PROTECTED]@EA{\number\utfmod{#2}}} % only mod once

\def\unicodeunknowncharacter#1%
{\unknownchar}

\let\utfunihash\utfunihashglyph

\def\@@unicommand{@@unicommand}

\def\defineutfcommand #1 #2%
{\setvalue{\@@unicommand#1}##1{#2{#1}{##1}}}

so we can define pluig in handlers for e.g. chinese

\defineutfcommand 81 {\uchar}

(bombs due to missing fonts, so for testing)

\def\NotYet#1#2{[#1 #2]}

\defineutfcommand 81 {\NotYet}

(next comes adapting the chinese files; i can imagine that we redo
the
big5 and gbk definitions so that they remap to ut8 as common encoding)

so .. the question is ... who is going to make the tfm/enc/map files

Hans

___
ntg-context mailing list
ntg-context@ntg.nl <mailto:ntg-context@ntg.nl>
http://www.ntg.nl/mailman/listinfo/ntg-context



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
 



___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-13 Thread Hans Hagen

Richard Gabriel wrote:


Hello Hans,

to be honest: I don't speak Chinese and don't know much about it.
A few days ago, I was told that we'll let translate some of our 
documents (XML) into Chinese and Japanese and I 'll have to typeset them.
So I started playing with Chinese in ConTeXt. I've reported the 
results which other users (e.g. Tobias) have also noticed.
In fact, all the sample Simplified Chinese documents I've tested it on 
were easily convertible to CP936 (GBK) and could be typeset. This 
doesn't mean that you shall not extend the Unicode support, I only 
think I will not hardly require it... :-)


But yet another question: What about Japanese? I've made only small 
research so far, but unlike Chinese, there's almost no information 
about Japanese in TeX. How much of work would be to adjust the current 
"chinese" ConTeXt module for Japanese? What would you need for it?
[Of course, meanwhile I'll investigate some other ways of typesetting 
Japanese...]


it's all a matter of fonts and specs; handling those languages is not 
that complex


the main complication is in the encodings (related to the input) and 
utf8 makes sense as common encoding; context (newtexexec) has provisions 
for runtime recoding


what do the chinese users think of it ...

Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-13 Thread Richard Gabriel




Hello Hans,to be honest: I don't speak Chinese and don't know much about it.A few days ago, I was told that we'll let translate some of our documents (XML) into Chinese and Japanese and I 'll have to typeset them. So I started playing with Chinese in ConTeXt. I've reported the results which other users (e.g. Tobias) have also noticed. In fact, all the sample Simplified Chinese documents I've tested it on were easily convertible to CP936 (GBK) and could be typeset. This doesn't mean that you shall not extend the Unicode support, I only think I will not hardly require it... :-)But yet another question: What about Japanese? I've made only small research so far, but unlike Chinese, there's almost no information about Japanese in TeX. How much of work would be to adjust the current "chinese" ConTeXt module for Japanese? What would you need for it?[Of course, meanwhile I'll investigate some other ways of typesetting Japanese...]Thanks,RichardFrom: Hans Hagen [mailto:[EMAIL PROTECTED]To: mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]Sent: Mon, 12 Dec 2005 16:53:51 +0100Subject: Re: [NTG-context] ChineseRichard Gabriel wrote:> Hi guys,>> I can confirm that the UTF-8 input doesn't work for me too.> If I convert the file info GBK (CP936), it works fine [I suggest to > use the 'iconv' utility for the conversion :-)].>> I tested the UTF-8 output the followin ways:>> 1)> \enableregime[utf]> \usemodule[chinese]>chinese is not yet defined in utf so if you want that, we need to do itnow, since the chinese remapping stuff is rather complex, the best method is to consider a dedicated mechanismquestion: do the unicode tables cover gbk and big 5 well?assuming this, how about making a set of tfm,enc,map files that match the unicode positions (volunteers ...)we can extend the utf handler with a kind of plugin mechanism:\unprotect\def\utfunihashglyph#1%  [EMAIL PROTECTED]@EA{\number\utfdiv{#1}}{#1}} % only div once\def\doutfunihashglyph#1#2% div raw  {\csname \ifnum#2<\[EMAIL PROTECTED]   \strippedcsname\unicodeasciicharacter \else\ifcsname\@@unicommand#1\endcsname   \@@unicommand#1% \else\ifcsname\@@univector#1\endcsname   \@@univector#1% \else   \strippedcsname\unicodeunknowncharacter \fi\fi\fi [EMAIL PROTECTED]@EA{\number\utfmod{#2}}} % only mod once\def\unicodeunknowncharacter#1%  {\unknownchar}\let\utfunihash\utfunihashglyph\def\@@unicommand{@@unicommand}\def\defineutfcommand #1 #2%  {\setvalue{\@@unicommand#1}##1{#2{#1}{##1}}}so we can define pluig in handlers for e.g. chinese\defineutfcommand 81 {\uchar}(bombs due to missing fonts, so for testing)\def\NotYet#1#2{[#1 #2]}\defineutfcommand 81 {\NotYet}(next comes adapting the chinese files; i can imagine that we redo the big5 and gbk definitions so that they remap to ut8 as common encoding)so .. the question is ... who is going to make the tfm/enc/map filesHans___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-12 Thread Tobias Burnus

Hi,

Hans Hagen wrote:

chinese is not yet defined in utf so if you want that, we need to do it

We probably should.


question: do the unicode tables cover gbk and big 5 well?
There exists a one-to-one correspondence between GBK and Unicode [1], 
for Big5 there are 7 characters which cannot be mapped one-to-one (see 
comment at top of [2]); thee of which appear twice in Big5 but only once 
in Unicode, two are not in unicode and there are two mapping problems.

In practive one can thus say: Both GBK and Big5 can be mapped to Unicode.

assuming this, how about making a set of tfm,enc,map files that match 
the unicode positions (volunteers ...)
If I get the time, I will play around with the four fonts mentioned on 
http://wiki.contextgarden.net/Chinese
Adam mentioned 
http://www.physik.fu-berlin.de/~tburnus/linlibertine/LibertineUnicode.zip, 
which contains LibertineInConTeXt.txt, which describes a possible way to 
do so.
But I wouldn't mind if someone who has more experience in playing around 
with .enc files would do the job ;)


Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-12 Thread Hans Hagen

Richard Gabriel wrote:


Hi guys,

I can confirm that the UTF-8 input doesn't work for me too.
If I convert the file info GBK (CP936), it works fine [I suggest to 
use the 'iconv' utility for the conversion :-)].


I tested the UTF-8 output the followin ways:

1)
\enableregime[utf]
\usemodule[chinese]



chinese is not yet defined in utf so if you want that, we need to do it

now, since the chinese remapping stuff is rather complex, the best 
method is to consider a dedicated mechanism


question: do the unicode tables cover gbk and big 5 well?

assuming this, how about making a set of tfm,enc,map files that match 
the unicode positions (volunteers ...)


we can extend the utf handler with a kind of plugin mechanism:

\unprotect

\def\utfunihashglyph#1%
 [EMAIL PROTECTED]@EA{\number\utfdiv{#1}}{#1}} % only div once

\def\doutfunihashglyph#1#2% div raw
 {\csname
\ifnum#2<[EMAIL PROTECTED]
  \strippedcsname\unicodeasciicharacter
\else\ifcsname\@@unicommand#1\endcsname
  \@@unicommand#1%
\else\ifcsname\@@univector#1\endcsname
  \@@univector#1%
\else
  \strippedcsname\unicodeunknowncharacter
\fi\fi\fi
[EMAIL PROTECTED]@EA{\number\utfmod{#2}}} % only mod once

\def\unicodeunknowncharacter#1%
 {\unknownchar}

\let\utfunihash\utfunihashglyph

\def\@@unicommand{@@unicommand}

\def\defineutfcommand #1 #2%
 {\setvalue{\@@unicommand#1}##1{#2{#1}{##1}}}

so we can define pluig in handlers for e.g. chinese

\defineutfcommand 81 {\uchar}

(bombs due to missing fonts, so for testing)

\def\NotYet#1#2{[#1 #2]}

\defineutfcommand 81 {\NotYet}

(next comes adapting the chinese files; i can imagine that we redo the 
big5 and gbk definitions so that they remap to ut8 as common encoding)


so .. the question is ... who is going to make the tfm/enc/map files

Hans

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-12 Thread Hans Hagen

Tobias Burnus wrote:


Hi,

Adam Lindsay wrote:


Is there less kerning among CJK fonts? I would expect so.


Classically any Chinese character has exactly the same width, which is 
the same as the height (square). Nowadays some are taller than wide. 
I'm quite certain that there is hardly any Chinese font with kerning 
as this would break the grid.


Thinking aloud, you'd probably want to include some 
language-switching commands, to mediate between the calling of 
unicode fonts for un-named CJK glyphs (just raw conversion from 
Unicode to font switch + glyph number) to named roman (and other 
alphabetic) glyphs (conversion from UTF-8 to named glyphs to 
font+glyph, which retains kerning where it can).


Well, I think one uses most of the time different fonts for Chinese 
and non-CJK texts as many Chinese fonts don't include that many roman 
letters (at least the ones quoted at 
http://wiki.contextgarden.net/Chinese miss the ß and ä).


if there is a utf-8 mapping for chinese, then th eother chars can come 
from the main text font


Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Tobias Burnus

Hi,

Adam Lindsay wrote:

Is there less kerning among CJK fonts? I would expect so.
Classically any Chinese character has exactly the same width, which is 
the same as the height (square). Nowadays some are taller than wide. I'm 
quite certain that there is hardly any Chinese font with kerning as this 
would break the grid.


Thinking aloud, you'd probably want to include some language-switching 
commands, to mediate between the calling of unicode fonts for un-named 
CJK glyphs (just raw conversion from Unicode to font switch + glyph 
number) to named roman (and other alphabetic) glyphs (conversion from 
UTF-8 to named glyphs to font+glyph, which retains kerning where it can).
Well, I think one uses most of the time different fonts for Chinese and 
non-CJK texts as many Chinese fonts don't include that many roman 
letters (at least the ones quoted at 
http://wiki.contextgarden.net/Chinese miss the ß and ä).


Tobias

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Richard Gabriel




Hi guys,I can confirm that the UTF-8 input doesn't work for me too. If I convert the file info GBK (CP936), it works fine [I suggest to use the 'iconv' utility for the conversion :-)].I tested the UTF-8 output the followin ways:1) \enableregime[utf]\usemodule[chinese]Processing a file with this setup ends with an error:--- cut ---kpathsea: Running mktextfm gbsong80mktextfm: Could not map typeface abbreviation bs for gbsong80.mktextfm: Need to update c:/WinApp/TeXLive/texmf-dist/fonts/map/fontname/special.map?mktextfm: Running mf "\mode:=ljfour; mag:=1; nonstopmode; input gbsong80"This is METAFONT, Version 2.71828 (Web2c 7.5.5)kpathsea: Running mktexmf gbsong80mktexmf: empty or non-existent rootfile!! I can't find file `gbsong80'.<*> ...ljfour; mag:=1; nonstopmode; input gbsong80Please type another input file name! Emergency stop.<*> ...ljfour; mag:=1; nonstopmode; input gbsong80Transcript written on mfput.log.mktextfm: warning: can't open log file gbsong80.log.mktextfm: `mf "\mode:=ljfour; mag:=1; nonstopmode; input gbsong80"' failed.kpathsea: Appending font creation commands to missfont.log.! Font \unicodefont=gbsong80 at 24.88806pt not loadable: Metric (TFM) file notfound.--- cut ---
I cannot figure out why it wants "gbsong80" when the encoding vector set starts from the 0x81 offset. Maybe some error in the UTF mapping?2)\usemodule[chinese]
\enableregime[utf]
No error, but not output!The PDF contains only black squares instead of glyphs.The log shows that no fonts were used at all!-RichardFrom: Xiao Jianfeng [mailto:[EMAIL PROTECTED]To: mailing list for ConTeXt users [mailto:[EMAIL PROTECTED]Sent: Fri, 09 Dec 2005 15:24:22 +0100Subject: Re: [NTG-context] ChineseTobias Burnus wrote:> Hi,>> Xiao Jianfeng wrote: What would be needed to get UTF-8 input running with Chinese? If you use vim to edit your tex file, maybe you can try "set >> encoding=utf8", then save and compile.>> As far as I know, GBK is compatible with unicode.>> No, that does not work - that is the reason I started this mail thread.> You get the wrong characters and you may get some TeX errors.> (And that is the reason Lutz wrote a UTF-8 to GBK converted.)>> Tobias> ___> ntg-context mailing list> ntg-context@ntg.nl> http://www.ntg.nl/mailman/listinfo/ntg-context>What is the value of your environment variables about LC_CTYPE and LANG ?___ntg-context mailing listntg-context@ntg.nlhttp://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Tobias Burnus

Hi,

Xiao Jianfeng wrote:

What is the value of your environment variables about LC_CTYPE and LANG ?

Well, I use SCIM to input the characters and my locale is de_DE.UTF-8.
As the input works everywhere (OpenOffice, vim in Xterm, gvim etc.) I'm 
positiv that the problem is the lacking support of UTF-8 encoding of 
Chinese in ConTeXt and that this is not a problem of the encoding being 
wrong.


Looking at the cp936 to Unicode table 
(http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP936.TXT) 
one sees that they are not the same.


A rough big5 to Unicode table can be found at 
http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT



Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Adam Lindsay

Tobias Burnus wrote:

Hi,

Xiao Jianfeng wrote:


What would be needed to get UTF-8 input running with Chinese?


If you use vim to edit your tex file, maybe you can try "set 
encoding=utf8", then save and compile.

As far as I know, GBK is compatible with unicode.


No, that does not work - that is the reason I started this mail thread.
You get the wrong characters and you may get some TeX errors.
(And that is the reason Lutz wrote a UTF-8 to GBK converted.)


Hmm, I suspect that some remix between my old (deprecated) Libertine in 
ConTeXt recipe and the ttf2tfm automatic unicode splitting would have 
some positive effects.


(I would discourage using that recipe for alphabetic (incl Roman) 
Unicode fonts because it blows away any kerning that would happen 
between unicode blocks. Is there less kerning among CJK fonts? I would 
expect so.)


Thinking aloud, you'd probably want to include some language-switching 
commands, to mediate between the calling of unicode fonts for un-named 
CJK glyphs (just raw conversion from Unicode to font switch + glyph 
number) to named roman (and other alphabetic) glyphs (conversion from 
UTF-8 to named glyphs to font+glyph, which retains kerning where it can).


I know it's sketchy and vague, but have a look inside font-uni. It's not 
the most complicated file in the distro.


adam
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay, Computing Dept. [EMAIL PROTECTED]
 Lancaster University, InfoLab21+44(0)1524/510.514
 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Xiao Jianfeng

Tobias Burnus wrote:


Hi,

Xiao Jianfeng wrote:


What would be needed to get UTF-8 input running with Chinese?


If you use vim to edit your tex file, maybe you can try "set 
encoding=utf8", then save and compile.

As far as I know, GBK is compatible with unicode.


No, that does not work - that is the reason I started this mail thread.
You get the wrong characters and you may get some TeX errors.
(And that is the reason Lutz wrote a UTF-8 to GBK converted.)

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


What is the value of your environment variables about LC_CTYPE and LANG ?

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Xiao Jianfeng

Tobias Burnus wrote:


Hi,

Xiao Jianfeng wrote:


What would be needed to get UTF-8 input running with Chinese?


If you use vim to edit your tex file, maybe you can try "set 
encoding=utf8", then save and compile.

As far as I know, GBK is compatible with unicode.


No, that does not work - that is the reason I started this mail thread.
You get the wrong characters and you may get some TeX errors.
(And that is the reason Lutz wrote a UTF-8 to GBK converted.)

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


So, maybe the problem has something to do with you input method.
How do you input Chinese in your system ?

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Tobias Burnus

Hi,

Xiao Jianfeng wrote:

What would be needed to get UTF-8 input running with Chinese?
If you use vim to edit your tex file, maybe you can try "set 
encoding=utf8", then save and compile.

As far as I know, GBK is compatible with unicode.

No, that does not work - that is the reason I started this mail thread.
You get the wrong characters and you may get some TeX errors.
(And that is the reason Lutz wrote a UTF-8 to GBK converted.)

Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Xiao Jianfeng

Hi,

Tobias Burnus wrote:


Hi,

Xiao Jianfeng wrote:


Maybe it is beacuse of the encoding of your .tex  file.
The encoding of my tex source file is cp936 and I edit with gvim.
ConTeXt compiles OK when processing Chinese. I din't use 
\enableregime[utf] or \language[cn] to typeset Chinese.


Ok this works. Another possibility is to use the script by Lutz (see 
link in the wiki) which converts UTF8 to gbk.
However, both solutions have the drawback that e.g. "ä" does not get 
typset (there is no ä in gbk).


What would be needed to get UTF-8 input running with Chinese?

Tobias

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

If you use vim to edit your tex file, maybe you can try "set 
encoding=utf8", then save and compile.

As far as I know, GBK is compatible with unicode.

I'm not sure if it works or not. I don't konw too much about encoding.

Regards,
xiaojf
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Duncan Hothersall
Tobias Burnus asks:

> What would be needed to get UTF-8 input running with Chinese?

If there is a recipe, I would like to help cook it. Getting UTF-8 input
running with Chinese would be a godsend to me too.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-09 Thread Tobias Burnus

Hi,

Xiao Jianfeng wrote:

Maybe it is beacuse of the encoding of your .tex  file.
The encoding of my tex source file is cp936 and I edit with gvim.
ConTeXt compiles OK when processing Chinese. I din't use 
\enableregime[utf] or \language[cn] to typeset Chinese.
Ok this works. Another possibility is to use the script by Lutz (see 
link in the wiki) which converts UTF8 to gbk.
However, both solutions have the drawback that e.g. "ä" does not get 
typset (there is no ä in gbk).


What would be needed to get UTF-8 input running with Chinese?

Tobias

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-08 Thread Xiao Jianfeng

Tobias Burnus wrote:


Hi,

Tobias Burnus wrote:

Seemingly the UTF-8 encoding makes some trouble - I get either errors 
or the wrong characters.


Ok, I played around a bit more:
\usemodule[chinese]
\enableregime[utf]
...
Hä? 中文?

Prints as "Hä? ***" (* denotes black boxes).

Whereas
\enableregime[utf] % or without this line
\usemodule[chinese]
prints "H盲? ***" (* denotes three other characters which are not 中文?)

In addition I get:
! Paragraph ended before \handleunicodeflowglyph was complete.

Using \startitemize[c] or \placefigure{} with \mainlanguage[cn] shows 
the proper characters.


Any ideas? Looking at 
http://www.pragma-ade.com/general/manuals/mchinese.pdf one seems to be 
able to simply mix European and Chinese letters; ok using 
{\language[de] Hä}{\language[cn]中文} I can combine them (if I 
wouldn't get an error at '}'.


Tobias

PS: ConTeXt live at ConTeXtgarden does not like chinese at all; the 
transcript shows:

! Misplaced alignment tab character &.
l.6 &

#36825;里什么饮料也没有... 




___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Maybe it is beacuse of the encoding of your .tex  file.
The encoding of my tex source file is cp936 and I edit with gvim.
ConTeXt compiles OK when processing Chinese. I din't use 
\enableregime[utf] or \language[cn] to typeset Chinese.


Regards,
xiaojf

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese

2005-12-08 Thread Tobias Burnus

Hi,

Tobias Burnus wrote:
Seemingly the UTF-8 encoding makes some trouble - I get either errors 
or the wrong characters.

Ok, I played around a bit more:
\usemodule[chinese]
\enableregime[utf]
...
Hä? 中文?

Prints as "Hä? ***" (* denotes black boxes).

Whereas
\enableregime[utf] % or without this line
\usemodule[chinese]
prints "H盲? ***" (* denotes three other characters which are not 中文?)

In addition I get:
! Paragraph ended before \handleunicodeflowglyph was complete.

Using \startitemize[c] or \placefigure{} with \mainlanguage[cn] shows 
the proper characters.


Any ideas? Looking at 
http://www.pragma-ade.com/general/manuals/mchinese.pdf one seems to be 
able to simply mix European and Chinese letters; ok using {\language[de] 
Hä}{\language[cn]中文} I can combine them (if I wouldn't get an error at 
'}'.


Tobias

PS: ConTeXt live at ConTeXtgarden does not like chinese at all; the 
transcript shows:

! Misplaced alignment tab character &.
l.6 &
#36825;里什么饮料也没有...


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese (was:Re: strange behavior of startbackground)

2005-12-08 Thread Tobias Burnus

Hi,

Patrick Gundlach wrote:

Somebody was so kind to put it at
http://wiki.contextgarden.net/Chinese so I have deleted the duplicate
on your user page. 
  

I tried the receipe there, but with no real success.
Seemingly the UTF-8 encoding makes some trouble - I get either errors or 
the wrong characters.


Any ideas what could be the problem? (using 2005.12.01)

* * *

If I paste the example from the WIKI and save it as UTF-8 into a .tex 
file, tex tries to get

|  Running mktextfm gbsong80,
however and no gbsong80.tmf exists

If I delete all but the first character, texexec shows:

! Use of \dohandleunicodeflowglyph doesn't match its definition.
 s

 \s
 toptext
 \stoptext

\handleunicodeflowglyph ...ttoken [EMAIL PROTECTED] `\string #2
 \relax
l.7  \stoptext


Tobias
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-17 Thread Duncan Hothersall

Lutz Haseloff said:


i prepared a small perl script to convert chinese utf-8 encoded
tex-files to gbk coded tex-files. 


Thanks so much, I look forward to trying it out next week when I get 
back to work, and will let you know how I get on. Thanks for taking the 
time.


Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-16 Thread Lutz Haseloff
Hi Duncan,



Duncan Hothersall schrieb:
> Hi all.
> 
> I have ConTeXt set up to output Chinese using usemodule[chinese], all
> fonts, encodings and maps are installed and the sample file works well.
> 
> Now I have a whole load of Chinese text in utf-8 encoding. Can ConTeXt
> process this, or do I have to convert it to another encoding? I tried
> \enableregime[utf] and \useencoding[uc] but it just produced black blobs
> instead of Chinese characters.
> 
> I hope ConTeXt can do it? :-)
> 
> Thanks,
> 
> Duncan


i prepared a small perl script to convert chinese utf-8 encoded
tex-files to gbk coded tex-files. I call it right
before using texexec.pl to create a pdf from the resulting
tex-file. It has the advantage that you can use both simplified
and traditional characters in one file, if you have full gbk
enabled font files. (all chinese ht*.ttf)
You can easy see all chinese characters on the screen with any
unicode enabled Editor (Scite)

Here you are:

utf82gbk.pl

-

#!/usr\bin\perl -w

use strict;
use utf8;
use Encode::HanConvert;

our ($filename, $recoded);

$filename = $ARGV[0];
$filename=~ s/\.tex$//io ;
if (open(INP,"<:utf8","$filename.tex"))
 {
   print "processing file $filename.tex\n" ;
   $/ = "\0777" ;
   $_ =  ;
   close(INP) ;
simp_to_gb($_);
use bytes;
if ((open(OUT,">","$filename-gbk.tex")))
 { print OUT $_ ;
   close(OUT) ;
   }
   }
   else
 { print "invalid filename\n" }
if (-e "$filename-gbk.tex") {print "created file $filename-gbk.tex\n"}

sub unirecode
  { my ($a,$b) = @_ ;
if ((ord($b)<0x80)&&($b !~ /[a-zA-Z0-9]/))
  { print "$b" ; ++$recoded ;
return "\\uc\{" . ord($a) . "\}\{". ord($b) . "\}" }
else
  { return "$a$b" } }

if (open(INP,"$filename-gbk.tex"))
 { $recoded  = 0 ;
   print "processing file $filename-gbk.tex " ;
   $/ = "\0777" ;
   $_ =  ;
   close(INP) ;
   s/([\x80-\xFF])(.)/unirecode($1,$2)/mgoe ;
   if (($recoded)&&(open(OUT,">$filename.tmp")))
 {  print OUT $_ ;
close(OUT) ;
unlink "$filename-gbk.tex" ;
rename "$filename-gbk.tmp", "$filename-gbk.tex" ;
unlink "$filename-gbk.tmp" ;
}
   if ($recoded)
 { print " - $recoded glyphs recoded - original saved as
$filename-gbk.tec\n" }
   else
 { print "- no glyphs recoded\n" } }
   else
 { print "invalid filename\n" }


-
usage:
utf82tex filename.tex
texexec filename-gbk.tex

It's a combination of Hans Hagens tex2uc.pl wich converts
codes including tex related characters (\, {, } ...) into
\unicodeglyph commands and an easy utf-8 to gbk converter.
It needs the module Encode::HanConvert.

I created 2 new Menuentries in my Scite Editor.
"Create gbk texfile" wich creates filename-gbk.tex and
"Process gbk texfile" wich runs texexec on this new file.
It works for me very well.

I hope this helps a bit until pdftex can handle unicode.

Greetings from Potsdam, Germany

Lutz

P.S. Excuse my bad english
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-14 Thread Duncan Hothersall
>>(beware, the font-chi modules talk about unicode while actually it's
>>about dedicated mapings resembling a unicode approach; this
>>\defineucharmapping stuff)
> 
> Yes indeed, that had me going... :-) Oh well.
> 
> Thanks for the insight, I'll feedback further.

I have to say I'm unable to make any sense of it at the moment. I think
I understand the logic of what is needed but understanding the current
implementation is way beyond my current capacity.

Does anyone else have a need to process Simplified Chinese encoded in
UTF-8? If not, perhaps I should just explore getting my sources changed
into GBK.

If there was someone else with the same need we could perhaps share the
burden...

Thanks again,

Duncan

(PS I'm away for the next week, please don't think I'm ignoring you if I
don't reply over that period.)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-12 Thread Duncan Hothersall
Hans wrote:

> that's tricky. the utf handler assumes named glyphs and noone named
> the 5000 chinese ones so far
...
> some variant on:
...

> \startunicodevector chinese_unicode_page_number_1 
> getglyph\endcsname{ChineseFont1}{#1}\gobbleoneargument 
> \stopunicodevector
> 
> so, then you only need to define the right fonts i.e.
> 
> \definefont[ChineseFont1][whateverchinesefont_1]
> 
> which has the right glyphs in the right slots
> 
> so ... it's actually simple, once you have the fonts split up
> 
> probably the getgyph needs to be replaced by a more clever one that
> handles special chinese thingies,

Wow. At the moment I have no idea how most of the Chinese module or
font-handling works, nor how I would implement something using the
tricks you describe. I guess I would need some hand-holding if I were to
embark on this, I guess also I would need to understand the mechanism
used to re-use a TTF font many times with different encodings to create
multiple 256 char tfms.

> another option is to write another mapper analogue to the ones
> already there for chinese, i.e. is there some mapping from utf to
> big5 or so and  hook that into the utf handler.

This sounds like something I can at least understand a bit better. I
will start here, and see what success I have. Perhaps it will help
eventually with an attempt to do it the "right" way above.

> (beware, the font-chi modules talk about unicode while actually it's
> about dedicated mapings resembling a unicode approach; this
> \defineucharmapping stuff)

Yes indeed, that had me going... :-) Oh well.

Thanks for the insight, I'll feedback further.

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-10 Thread Hans Hagen

Radhelorn wrote:


Duncan Hothersall wrote:


Hi all.

I have ConTeXt set up to output Chinese using usemodule[chinese], all
fonts, encodings and maps are installed and the sample file works well.

Now I have a whole load of Chinese text in utf-8 encoding. Can ConTeXt
process this, or do I have to convert it to another encoding? I tried
\enableregime[utf] and \useencoding[uc] but it just produced black blobs
instead of Chinese characters.

I hope ConTeXt can do it? :-)

Thanks,

Duncan



Please post output of texexec command. Maybe ConTeXt fails to find 
some files?


that's tricky. the utf handler assumes named glyphs and noone named the 5000 chinese ones so far 

(some day pdftex will be unicode award so then problems will disappear) 

in the current utf handling mechanism i can envision something: 

- the utf code results in an expansion of the vector 
- instead of using a named glyph, we use a trick


some variant on: 

\startunicodevector chinese_unicode_page_number_1
 getglyph{ChineseFont1}{#1}%

\stopunicodevector

or probably due to some used trickery (untested) something like the following (not sure, best make a new command): 

\startunicodevector chinese_unicode_page_number_1
 getglyph\endcsname{ChineseFont1}{#1}\gobbleoneargument 
\stopunicodevector


so, then you only need to define the right fonts i.e. 


\definefont[ChineseFont1][whateverchinesefont_1]

which has the right glyphs in the right slots 

so ... it's actually simple, once you have the fonts split up 

probably the getgyph needs to be replaced by a more clever one that handles special chinese thingies, 

another option is to write another mapper analogue to the ones already there for chinese, i.e. is there some mapping from utf to big5 or so and  hook that into the utf handler. 

(beware, the font-chi modules talk about unicode while actually it's about dedicated mapings resembling a unicode approach; this \defineucharmapping stuff) 

Hans 


-
 Hans Hagen | PRAGMA ADE
 Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in utf-8

2005-10-10 Thread Radhelorn

Duncan Hothersall wrote:

Hi all.

I have ConTeXt set up to output Chinese using usemodule[chinese], all
fonts, encodings and maps are installed and the sample file works well.

Now I have a whole load of Chinese text in utf-8 encoding. Can ConTeXt
process this, or do I have to convert it to another encoding? I tried
\enableregime[utf] and \useencoding[uc] but it just produced black blobs
instead of Chinese characters.

I hope ConTeXt can do it? :-)

Thanks,

Duncan


Please post output of texexec command. Maybe ConTeXt fails to find some 
files?


--
Radhelorn <[EMAIL PROTECTED]>
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Chinese in utf-8

2005-10-10 Thread Duncan Hothersall
Hi all.

I have ConTeXt set up to output Chinese using usemodule[chinese], all
fonts, encodings and maps are installed and the sample file works well.

Now I have a whole load of Chinese text in utf-8 encoding. Can ConTeXt
process this, or do I have to convert it to another encoding? I tried
\enableregime[utf] and \useencoding[uc] but it just produced black blobs
instead of Chinese characters.

I hope ConTeXt can do it? :-)

Thanks,

Duncan
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in ConTeXt

2005-06-08 Thread Henning Hraban Ramm

Am 06.06.2005 um 10:08 schrieb Xiao Jianfeng:
Here is my way of Chinese setup in ConTeXt. I hope this can be of any 
help to some newbies like me who have problems in processing Chinese.


I just copied that to the wiki.


Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


[NTG-context] Chinese processing problem

2005-06-08 Thread Xiao Jianfeng

Hi, all,

I just met some problems when processing Chinese in ConTeXt.

Here is an example (attached files may provide detailed information):
--
\loadmapfile[gbk]
\usemodule[chinese]
\setupbodyfont[gbkai,16pt]
\setuppagenumbering[state=stop]

\starttext
±±Ú¤ÓÐÓ㣬\hfillÆäÃûΪöï¡£
\par

{\switchtobodyfont[gbkai,44pt]  ÄãºÃ}
\par

\SimKaiTi
±±Ú¤ÓÐÓ㣬\hfillÆäÃûΪöï¡£

\stoptext
--
1. I noticed that I cannot use \setupbodyfont[gbkai,16pt] (line 3)or
\switchtobodyfont[gbkai,44pt] (line 10) to change font from 
SimSongTi(which is default) to SimKaiTi, but these two comands do have 
effect on the size of the font.


But I can change the font using \SimKaiTi .

2. It seems that the command \hfill doesn't work at all.

Can someone tell me where is the problem ?

Any help will be appreicated!

Thank you.


Xiao Jianfeng




ChineseProcessingProblem.rar
Description: Binary data
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in ConTeXt

2005-06-03 Thread 常大鹏
Xiao Jianfeng,您好!

你可以看看这个帖子。
  http://www.ctex.org/forums/index.php?showtopic=23547
另外,安装字体的工具可以用xGBKFonts,它可以为你安装字体并处理LaTeX,ConTeXt的配置文件
你可以看看它的作者李树钧的主页。http://www.hooklee.com/tex.html

=== 2005-05-29 16:49:52 您在来信中写道:===

>I started to use ConTeXt several weeks ago, and I like it very much  :-)
>
>I met some problems when I tried to use Chinese in ConTeXt. I have tried 
>to setup Chinese fonts according to the manual "Chinese in ConTeXt" 
>(mchinese.pdf) which seems a little out-of-date. In the manual, programs 
>  gbpfb/chpfb, and gbenc are used to perpare the Chinese fonts. But, I 
>chpfb is not shipped with trubolinux anymore . I have googled and 
>couldn't  find these programs on the internet.
>
>Do someone have some experience of how to setup Chinese in ConTeXt?
>
>Thanks in advance!
>
>Best wishes.
>
>Xiaojf
>___
>ntg-context mailing list
>ntg-context@ntg.nl
>http://www.ntg.nl/mailman/listinfo/ntg-context
>
>.

= = = = = = = = = = = = = = = = = = = =


致
礼!
 
   常大鹏
   [EMAIL PROTECTED]
2005-06-03 
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in ConTeXt

2005-05-31 Thread Hans Hagen

Lutz Haseloff wrote:


b.t.w. I think, \dohandleunicodeflowglyph doesn't handle
some glyphs right. Particularly the glyphs with parenthesis
{} and Backslash.

ConTeXt complains about my qianziwen-Big5.tex:


---
! Use of \dohandleunicodeflowglyph doesn't match its definition.
 ¦

\handleunicodeflowglyph ...ttoken [EMAIL PROTECTED] `\string #2
  \relax
l.18 »\¦
¹¨­µo¡A¥|¤j¤­±`¡C®¥±©Áù¾i¡A°Z´±·´¶Ë¡C
?
---


Attached GBK-file works fine.

Is it possible to make \dohandleunicodeflowglyph more robust
to handle those big5 glyphs right?
Or is it my mistake again?


i may be wrong (long ago that i made that-) but those file needs some treatment 
(esp when one uses arguments)


tex2uc yourfile
texexec yourfile
uc2tex yourfile

actually, since i have a indirect option in texexec (for xml) i can make this 
automatic, e.g. when the first line has something


% preprocess=tex2uc

I must think of it; remind me

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
# ConTeXt uc converter / beta version / 2-12-1999 / don't redistribute 

$filename = $ARGV[0] ; 
$recoded  = 0 ; 

sub unirecoded
  { print chr($_[1]) ; ++$recoded ; return chr($_[0]).chr($_[1]) } 

if ((open(INP,"$filename.tex"))&&(open(OUT,">$filename.tmp")))
  { print "processing file $filename.tex " ;
while () 
  { s/\\uc\{(\d*)\}\{(\d*)\}/unirecoded($1,$2)/goe ; print OUT $_ } 
close(INP) ; 
close(OUT) ; 
unlink "$filename.tec" ; 
rename "$filename.tex", "$filename.tec" ;
rename "$filename.tmp", "$filename.tex" ; 
if ($recoded) 
  { print " - $recoded glyphs recoded - original saved as $filename.tec\n" 
} 
else
  { print "- no glyphs recoded\n" } }
else 
  { print "invalid filename\n" } 
# ConTeXt uc converter / beta version / 2-12-1999 / don't redistribute 

if ($ARGV[0] ne '') 
  { @filenames = @ARGV } 
else
  { @filenames = glob "*.tex" }

foreach (@filenames) { s/\.tex$//io }  

sub unirecode
  { my ($a,$b) = @_ ;
if ((ord($b)<0x80)&&($b !~ /[a-zA-Z0-9]/))
  { print "$b" ; ++$recoded ;  
return "\\uc\{" . ord($a) . "\}\{". ord($b) . "\}" }  
else
  { return "$a$b" } } 

foreach $filename (@filenames) 
 { if (open(INP,"$filename.tex"))
 { $recoded  = 0 ; 
   print "processing file $filename.tex " ;
   $/ = "\0777" ; 
   $_ =  ;
   close(INP) ; 
   s/([\x80-\xFF])(.)/unirecode($1,$2)/mgoe ; 
   if (($recoded)&&(open(OUT,">$filename.tmp")))
 { print OUT $_ ;
   close(OUT) ; 
   unlink "$filename.tec" ; 
   rename "$filename.tex", "$filename.tec" ;
   rename "$filename.tmp", "$filename.tex" } 
   if ($recoded) 
 { print " - $recoded glyphs recoded - original saved as 
$filename.tec\n" } 
   else
 { print "- no glyphs recoded\n" } }
   else  
 { print "invalid filename\n" } }

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in ConTeXt

2005-05-29 Thread Xiao Jianfeng

Lutz Haseloff wrote:

Hi Jianfeng, Hi Hans,

because i had the same Problem some time ago i prepared
two PerlScripts for converting Unicode TrueType fonts
to suitable bunches of Type 1 fonts for use in ConTeXt
in big5 and gbk encoding.

I sent the scripts to Hans. He perhaps wanted to include
them into texexec.pl if possible. If you use Windows
or can use Windows i can send you the scripts.
(they work with a particular version of ttf2pfb.exe only)

B.t.w. for the use of the fonts described in font-chi.tex you
will need only some files you can download from
ftp.ctex.org. (If you like i can send you these files too)



After a search via google, i found the following article posted on 2002 
(http://www.ntg.nl/pipermail/ntg-context/2002/000636.html). I don't know 
if it works or not, but i will have a try. I think it may be helpful to 
people who have similar problems, so i just post the article here again:


***
[NTG-context] chinese font setup
Michael Na Li ntg-context@ntg.nl
Sun, 15 Dec 2002 10:03:52 -0800

* Previous message: [NTG-context] chinese font setup
* Next message: [NTG-context] chinese font setup
* Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On Sun, 15 Dec 2002, Matthew Huggett told this:

>  A few weeks back, there was a short exchange on this list regarding
>  utilities for preparing chinese fonts for ConTeXt.  One of the postings
>  provided a link to some new utilities.  I've since downloaded the file
>  there (gbkfonts-linux-0.2.tar.gz) but am unsure as to how to 
proceed.  If

>  anyone with experience in this area could provide some advice, I'd
>  appreciate it.

Have you got any Chinese fonts that work for ConTeXt?  If not, you can try,
ftp.ctex.org to get some fonts.  There is no need to use gbkfonts.

For simplified chinese, you can,

1. Get the truetype fonts, htfs.ttf, hthei.ttf, htkai.ttf and htsong.ttf 
from

   ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/.

2. Get corresponding tfm file, gbfs.zip, gbhei.zip, gbkai.zip and gbsong.zip
   from ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/tfm.

3. Get the enc file, Gbk.zip from
   ftp://ftp.ctex.org/pub/tex/fonts/truetype/for_pdftex/enc_map.

4. Get the map file, map.zip, from above location.

Then read the mchinese.pdf, put those files in the right location and 
you can

then process Chinese in context (to produce pdf file).

The above procedure works because those fonts have already been defined in
font-chi.tex.

However, I have trouble installing new Chinese fonts.  I got fzhcjw.ttf,
ran 'gbkfonts -name fzhc -prefix gbk fzhcjw.ttf fzhc' which resulted in
the tfm, enc and map files, as well as pfb for use with dvips.  It also
generated a fd file for use with LaTeX.  I can then use the font with
CJK-LaTeX.  But I can't use it in ConTeXt.  I tried,

\definefontsynonym [SimplifiedChineseHangCaoRegular] [gbkfzhc] 
[encoding=gbk]
\definefontsynonym [SimplifiedChineseHangCaoSlanted] [gbkfzhcsl] 
[encoding=gbk]
\definefontsynonym [SimplifiedChineseHangCaoItalic]  [gbkfzhcsl] 
[encoding=gbk]
\definefontsynonym [SimplifiedChineseHangCaoBold][gbkfzhc] 
[encoding=gbk]
\definefontsynonym 
[SimplifiedChineseHangCaoBoldSlanted][gbkfzhcsl][encoding=gbk

]
\definefontsynonym [SimplifiedChineseHangCaoBoldItalic] 
[gbkfzhcsl][encoding=gbk

]
\defineunicodefont [SimHangCao]  [SimplifiedChineseHangCao] [chinese]

Then when I tried to use \SimHangCao I was told that it is undefined 
command.

The other fonts in the font-chi file, such as \SimFangSong etc, do work.

Any suggestions?

Michael


--

Michael Na Li
Email: [EMAIL PROTECTED]
Department of Biostatistics, Box 357232
University of Washington, Seattle, WA 98195
---


 


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in ConTeXt

2005-05-29 Thread Xiao Jianfeng

Hi, Lutz,

Thanks for your reply.

I am use the minimal CONTEXT distribution on windows 
(http://www.pragma-ade.com/context/install/mswintex.zip), will you 
please send me a copy of your scripts ? Thanks again!


Xiao Jianfeng




Lutz Haseloff wrote:

Hi Jianfeng, Hi Hans,

because i had the same Problem some time ago i prepared
two PerlScripts for converting Unicode TrueType fonts
to suitable bunches of Type 1 fonts for use in ConTeXt
in big5 and gbk encoding.

I sent the scripts to Hans. He perhaps wanted to include
them into texexec.pl if possible. If you use Windows
or can use Windows i can send you the scripts.
(they work with a particular version of ttf2pfb.exe only)

B.t.w. for the use of the fonts described in font-chi.tex you
will need only some files you can download from
ftp.ctex.org. (If you like i can send you these files too)


___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese in ConTeXt

2005-05-29 Thread Lutz Haseloff

Hi Jianfeng, Hi Hans,

because i had the same Problem some time ago i prepared
two PerlScripts for converting Unicode TrueType fonts
to suitable bunches of Type 1 fonts for use in ConTeXt
in big5 and gbk encoding.

I sent the scripts to Hans. He perhaps wanted to include
them into texexec.pl if possible. If you use Windows
or can use Windows i can send you the scripts.
(they work with a particular version of ttf2pfb.exe only)

B.t.w. for the use of the fonts described in font-chi.tex you
will need only some files you can download from
ftp.ctex.org. (If you like i can send you these files too)

Xiao Jianfeng schrieb:

Thanks a lot and I will try to contact Hong Feng :-)

Hans Hagen wrote:


Xiao Jianfeng wrote:


I started to use ConTeXt several weeks ago, and I like it very much  :-)

I met some problems when I tried to use Chinese in ConTeXt. I have 
tried to setup Chinese fonts according to the manual "Chinese in 
ConTeXt" (mchinese.pdf) which seems a little out-of-date. In the 
manual, programs  gbpfb/chpfb, and gbenc are used to perpare the 
Chinese fonts. But, I chpfb is not shipped with trubolinux anymore . 
I have googled and couldn't  find these programs on the internet.


Do someone have some experience of how to setup Chinese in ConTeXt?




there are users on this list, also,

  Hong Feng <[EMAIL PROTECTED]>

does the chinese user group have an archive with those tools and fonts?

of the chinese user group is an able context user so he may be of help.

We need to fix the manual! Suggestions are welcome.

btw, there will be tutorials at the tex ocnference in china

Hans

___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


  1   2   >