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

2023-06-04 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
___


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
___

Re: [NTG-context] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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 footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster wolfgang.schus...@gmail.com writes:

 Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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 13:25 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:
 
 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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 wolfgang.schus...@gmail.com writes:

 Am 30.10.2012 um 13:25 schrieb John Devereux j...@devereux.me.uk:

 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 30.10.2012 um 10:12 schrieb John Devereux j...@devereux.me.uk:
 
 Wolfgang Schuster wolfgang.schus...@gmail.com writes:
 
 Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:
 
 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 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 setuplabeltext

2012-10-29 Thread Wolfgang Schuster

Am 29.10.2012 um 20:20 schrieb John Devereux j...@devereux.me.uk:

 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
___


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
___


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 (李延瑞) liyanrui...@gmail.com

 Hi,

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

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

 ConTeXt MkIV said:

 fontsfallback modern rm 12pt is loaded
 system   begin file b at line 3
 fontsotf loading  loading:
 selfautoparent:texmf-local/fonts/truetype/winfonts/simsun.ttc (hash:
 simsun-nsimsun)
 fontsotf loading  font loaded okay
 fontsotf loading  loading failed (file read error)
 fontsdefining  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 http://www.eonet.ne.jp/%7Ehirotsu/myware.html, a free
software collection, and ported it’s ttc2ttf tool to python (as a
challenge).

you can find my port here http://pastebin.com/QXcAtP24, 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
___


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. flying-sh...@web.de:

 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 Taco Hoekwater

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

2011/2/13 Philipp A.flying-sh...@web.de:


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 numeral conversion

2009-12-22 Thread Yanrui Li
2009/12/23 Yanrui Li liyanrui...@gmail.com

 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
___


Re: [NTG-context] Chinese numeral conversion

2009-12-22 Thread Yanrui Li
2009/12/23 Yanrui Li liyanrui...@gmail.com



 2009/12/23 Yanrui Li liyanrui...@gmail.com

 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 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-fonts-merged.lua luatex
-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}/opt/context/tex/texmf/fonts/type1/
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

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 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 pra...@wxs.nl 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
___


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 pra...@wxs.nl 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 Wolfgang Schuster


Am 12.05.2009 um 18:04 schrieb Yue Wang:


On Tue, May 12, 2009 at 11:47 PM, Hans Hagen pra...@wxs.nl 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 Dohyun Kim
2009/5/12 Hans Hagen pra...@wxs.nl:
 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-fonts-merged.lua
 luatex
 -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}/opt/context/tex/texmf/fonts/type1/
 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 lu
atex-fonts-merged.lua luatex-fonts.lua loaded in 0.027 seconds)
(/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 lu
atex-fonts-merged.lua luatex-fonts.lua loaded in 0.029 seconds)
(/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 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 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
___


Re: [NTG-context] Chinese numbers.

2009-04-13 Thread Yue Wang
Hi,

On Mon, Apr 13, 2009 at 7:26 PM, Hans Hagen pra...@wxs.nl 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 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=any fixed dimen]

 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:
 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=any fixed dimen]

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


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=any fixed dimen]
 
 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:
 Peter Rolf schrieb:
 just guessing (but worth a try):

 \setupitemgroups[inbetween=any fixed dimen]

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


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


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




 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:


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


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

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:


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


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

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 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 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 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 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-contextWhat 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,

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 (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.
recently read s

inserted text \s
 toptext
argument \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

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;#37324;#20160;#20040;#39278;#26009;#20063;#27809;#26377;...


___
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;#37324;#20160;#20040;#39278;#26009;#20063;#27809;#26377;... 




___
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 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 ;
   $_ = INP ;
   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 ;
   $_ = INP ;
   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 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


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 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.
recently read 

\handleunicodeflowglyph ...ttoken [EMAIL PROTECTED] `\string #2
  \relax
l.18 \
oA|j`CiAZC
?
---


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 (INP) 
  { 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 ; 
   $_ = INP ;
   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 Michael Hallgren
Yes. Your proposal or question???

Cheers,

mh 

 -Message d'origine-
 De : [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] De la part de Xiao Jianfeng
 Envoyé : dimanche 29 mai 2005 10:50
 À : ntg-context@ntg.nl
 Objet : [NTG-context] Chinese in ConTeXt
 
 



___
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 ConTeXt

2004-10-18 Thread My Work
On 18 Oct 04, at 1:34 PM, Lutz Haseloff wrote:
Hi Hans, hi all,
it seems, that the commands:
\usemodule[chi-simplified]
\usemodule[chi-traditional]
do nothing. They are pointing to files
s-chi-01.tex and s-chi-02.tex which
are not present.
How can i have access to the traditional
chinese characters?
Greetings Lutz
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context
I use the command \usemodule[chinese] when using chinese and use the 
commands \TraChi and \SimChi to switch between traditional and 
simplified chinese characters.

Francis Leung
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] Chinese ConTeXt

2004-10-15 Thread Hans Hagen
Lutz Haseloff wrote:
Hi Hans, hi all,
it seems, that the commands:
\usemodule[chi-simplified]
\usemodule[chi-traditional]
do nothing. They are pointing to files
s-chi-01.tex and s-chi-02.tex which
are not present.
ok, i removed those entries
How can i have access to the traditional
chinese characters?
see font-chi.tex, there are quite some things predefined in there
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
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context