Re: [NTG-context] Font sizes using Chinese module

2007-11-09 Thread Wolfgang Schuster
2007/11/7, Mojca Miklavec [EMAIL PROTECTED]:
 On 11/7/07, Hans Hagen wrote:
  Mojca Miklavec wrote:
 
   Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
   for Chinese? (To be honest: I have absolutely no idea whether it works
   and how good it works if at all, but I would expect less problems
   there.)
 
  i bet that duncan uses it in some workflow that has to be stable i.e. no
  moving targets like xetex or luatex (yet)

 That's certainly true for LuaTeX, but XeTeX is really not *so
 unstable*. I agree, font support has been (and still is a bit) broken
 until recently (and Leopard users report serious problems with
 xdvipdfmx), but the rest of problems seems approximately equally
 buggy/problematic to me as the rest of ConTeXt  :) :) :) :)


 Only as a suggestion: could someone who has managed to install
 Chinese fonts and map files successfully, upload the needed files to
 http://modules.contextgarden.net/, so that it would be easier for
 other users to take ready-to-start-using module rather than having
 to read dozens of pages of how to get started?

 In that case, supporting Chinese on the garden could be done right
 away if needed (perhaps we need to enable third party modules on the
 garden, which is really not so difficult to do).

 Mojca

I put two files to files to the wiki to write chinese, the contain the tfm, enc
and map files to use the fonts.

The first file [1] provides support for the fonts from the wiki page
for chinese [3],
the only thing you have to do is to unzip my file in a local TeX tree
and to place
the fonts files in the truetype directory.

The second file [2] has support for the cwTeX fonts (cwTeX is a chinese TeX
distribution), they look a little bit different and you have to
download the fonts from
their site [4].To use the fonts unzip my archiv from the module section in your
TeX tree and put the truetype fonts in the corresponding folder. You can choose
between fonts with centered punctuation or punctuation at the baseline, use only
one of them because both have the same files names.

After you have installed the fonts on your system refresh the database
with texhash
and and you try my attached example file (the text is taken from Hans
mkii/iv manual).

Wolfgang

[1] http://modules.contextgarden.net/chinese
[2] http://modules.contextgarden.net/cwTeX
[3] http://wiki.contextgarden.net/Chinese
[4] ftp://ftp.ctex.org/pub/tex/fonts/cwTeX/


chinese.tex
Description: TeX 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Font sizes using Chinese module

2007-11-07 Thread Duncan Hothersall
Hello all. I hope this is quite a simple question.

I'm using the Chinese module, with the font definitions in font-chi.tex, 
to typeset UTF-8 content. I can happily use the default sizes a, b, c, d 
and x, xx, xxx - so \bfd produces large bold, and \tfx produces small 
normal weight text.

But I really need to be able to do the equivalent of \definedfont[Bold 
at 48pt]. Unfortunately this doesn't work - it produces normal text size 
and weight.

Unfortunately it isn't easy to post an example, because you need UTF-8 
content, and you need the fonts set up for Chinese (which I believe 
ConTeXt Live doesn't currently have). So I'm hoping that someone 
familiar with the workings of font-chi.tex can tell me how to get 
specific point sizes of specific fonts. Is there a unicode font 
equivalent of \definedfont? Or a way of adding an e and f size 
definition to the default set?

Any help would be really appreciated, thanks.

Duncan
___
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] Font sizes using Chinese module

2007-11-07 Thread Hans Hagen
Duncan Hothersall wrote:

 equivalent of \definedfont? Or a way of adding an e and f size 
 definition to the default set?

\definefontsize[e]

\setupfontenvironment
   [default]
   [e=4]

-
   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] Font sizes using Chinese module

2007-11-07 Thread Duncan Hothersall
Hans said:
 \definefontsize[e]

 \setupfontenvironment
[default]
[e=4]
   
Ah, thanks. Using \setupbodyfontenvironment as the second command did 
the trick.

I guess there is no easy way of directly calling a specific font at a 
specific size? No worry, this sort of solution will allow me to do what 
I need for now. Thanks Hans.

Duncan
___
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] Font sizes using Chinese module

2007-11-07 Thread Hans Hagen
Wolfgang Schuster wrote:
 2007/11/7, Hans Hagen [EMAIL PROTECTED]:
 Duncan Hothersall wrote:
 Hans said:
 \definefontsize[e]

 \setupfontenvironment
[default]
[e=4]

 Ah, thanks. Using \setupbodyfontenvironment as the second command did
 the trick.

 I guess there is no easy way of directly calling a specific font at a
 specific size? No worry, this sort of solution will allow me to do what
 I need for now. Thanks Hans.
 chinese in mkii is kind of special, i.e. all kind of mappings to ranges
 of fonts; in mkiv chines is easier (i still have to finish some spacing
 issues)
 
 
 How about a little appetizer from mkiv.
 
 \definefontfeature[chinese][analyze=yes,language=dflt,mode=node,script=hani]
 
 \starttypescript[sans][arial]
 \definefontsynonym[Sans][Arial][features=chinese]
 \stoptypescript
 
 \starttypescript[sans][arial]
 \definefontsynonym[Arial][file:ARIALUNI][features=default]
 \stoptypescript
 
 \definetypeface[arial][ss][sans][arial][default]
 
 \setupbodyfont[arial,ss]
 
 % alternative to the typescript solution
 %\definefont[Normal][ARIALUNI*chinese at 12pt][line=16pt]
 
 \starttext
 
 write your chinese text here
 
 \stoptext
 
 There will be no longer any big difference in defining fonts for latin or
 any
 other language. A few things are to achive than with the current code from
 the
 chinese module like opening and closing braces in vertical mode.

a next mkiv release will provide dynamic features ...

\definefontfeature[chinese][analyze=yes,language=dflt,mode=node,script=hani]

\starttypescript[sans][arial]
\definefontsynonym[Sans][Arial]
\stoptypescript

\starttypescript[sans][arial]
\definefontsynonym[Arial][file:ARIALUNI]
\stoptypescript

\definetypeface[arial][ss][sans][arial][default]

\setupbodyfont[arial,ss]

\starttext

bla bla {\setfontfeature{chinese} MORE BLA} bla bla 
{\setfontfeature{oldstyle} 1234} bla bla

\stoptext

so, just one font instance and independent feature switches; this saves 
multiple definitions of fonts and is therefore faster and takes less 
memory too

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] Font sizes using Chinese module

2007-11-07 Thread Wolfgang Schuster
2007/11/7, Hans Hagen [EMAIL PROTECTED]:

 Duncan Hothersall wrote:
  Hans said:
  \definefontsize[e]
 
  \setupfontenvironment
 [default]
 [e=4]
 
  Ah, thanks. Using \setupbodyfontenvironment as the second command did
  the trick.
 
  I guess there is no easy way of directly calling a specific font at a
  specific size? No worry, this sort of solution will allow me to do what
  I need for now. Thanks Hans.

 chinese in mkii is kind of special, i.e. all kind of mappings to ranges
 of fonts; in mkiv chines is easier (i still have to finish some spacing
 issues)


How about a little appetizer from mkiv.

\definefontfeature[chinese][analyze=yes,language=dflt,mode=node,script=hani]

\starttypescript[sans][arial]
\definefontsynonym[Sans][Arial][features=chinese]
\stoptypescript

\starttypescript[sans][arial]
\definefontsynonym[Arial][file:ARIALUNI][features=default]
\stoptypescript

\definetypeface[arial][ss][sans][arial][default]

\setupbodyfont[arial,ss]

% alternative to the typescript solution
%\definefont[Normal][ARIALUNI*chinese at 12pt][line=16pt]

\starttext

write your chinese text here

\stoptext

There will be no longer any big difference in defining fonts for latin or
any
other language. A few things are to achive than with the current code from
the
chinese module like opening and closing braces in vertical mode.

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] Font sizes using Chinese module

2007-11-07 Thread Arthur Reutenauer
 Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
 for Chinese? (To be honest: I have absolutely no idea whether it works
 and how good it works if at all, but I would expect less problems
 there.)

  XeTeX can use Chinese fonts since the first day :-) I remember
Jonathan trying it out during TUG in Wuhan over two years ago ...

  By the way, yesterday there was a thread about the LaTeX zhspacing
package on the XeTeX list, and I was wondering if its features were
already present in ConTeXt's Chinese module; if not, it probably
wouldn't be so much work to “port” it.

Arthur
___
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] Font sizes using Chinese module

2007-11-07 Thread Duncan Hothersall
Hans (07/11/2007 16:09) said:
 Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
 for Chinese? (To be honest: I have absolutely no idea whether it works
 and how good it works if at all, but I would expect less problems
 there.)
 

 i bet that duncan uses it in some workflow that has to be stable i.e. no 
 moving targets like xetex or luatex (yet)

 Hans
Exactly right. :-) We have some big plans for LuaTeX across Latin, 
Arabic and Chinese alphabets, but for now we have to stick to the old 
tried and tested...

Duncan
___
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] Font sizes using Chinese module

2007-11-07 Thread Hans Hagen
Arthur Reutenauer wrote:
 Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
 for Chinese? (To be honest: I have absolutely no idea whether it works
 and how good it works if at all, but I would expect less problems
 there.)
 
   XeTeX can use Chinese fonts since the first day :-) I remember
 Jonathan trying it out during TUG in Wuhan over two years ago ...
 
   By the way, yesterday there was a thread about the LaTeX zhspacing
 package on the XeTeX list, and I was wondering if its features were
 already present in ConTeXt's Chinese module; if not, it probably
 wouldn't be so much work to “port” it.

there is some spacing support in the mkiv files (but not yet finished, i 
will pick up that cjk thread when the next beta is finished)

i dunno about zaspacing (and also am not sure about supporting it) 
because it probably uses this 'code-between-characters' mechanism; it 
only makes sense to support that when i make some interface for it and 
it's one of those areas where xetex code is rather different from luatex 
code

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] Font sizes using Chinese module

2007-11-07 Thread Hans Hagen
Mojca Miklavec wrote:

 Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
 for Chinese? (To be honest: I have absolutely no idea whether it works
 and how good it works if at all, but I would expect less problems
 there.)

i bet that duncan uses it in some workflow that has to be stable i.e. no 
moving targets like xetex or luatex (yet)

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] Font sizes using Chinese module

2007-11-07 Thread Mojca Miklavec
On 11/7/07, Duncan Hothersall wrote:
 Hello all. I hope this is quite a simple question.

 But I really need to be able to do the equivalent of \definedfont[Bold
 at 48pt]. Unfortunately this doesn't work - it produces normal text size
 and weight.

I have absolutely no experience and/or knowledge about Chinese and its
typesetting, but perhaps something like
\definedfont[SimplifiedChineseBold at 48pt] could work?

 Unfortunately it isn't easy to post an example, because you need UTF-8
 content, and you need the fonts set up for Chinese (which I believe
 ConTeXt Live doesn't currently have). So I'm hoping that someone
 familiar with the workings of font-chi.tex can tell me how to get
 specific point sizes of specific fonts. Is there a unicode font
 equivalent of \definedfont? Or a way of adding an e and f size
 definition to the default set?

Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
for Chinese? (To be honest: I have absolutely no idea whether it works
and how good it works if at all, but I would expect less problems
there.)

Mojca
___
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] Font sizes using Chinese module

2007-11-07 Thread Hans Hagen
Duncan Hothersall wrote:
 Hans said:
 \definefontsize[e]

 \setupfontenvironment
[default]
[e=4]
   
 Ah, thanks. Using \setupbodyfontenvironment as the second command did 
 the trick.
 
 I guess there is no easy way of directly calling a specific font at a 
 specific size? No worry, this sort of solution will allow me to do what 
 I need for now. Thanks Hans.

chinese in mkii is kind of special, i.e. all kind of mappings to ranges 
of fonts; in mkiv chines is easier (i still have to finish some spacing 
issues)

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] Font sizes using Chinese module

2007-11-07 Thread Mojca Miklavec
On 11/7/07, Hans Hagen wrote:
 Mojca Miklavec wrote:

  Btw: Is there any reason for not using XeTeX (or LuaTeX in the future)
  for Chinese? (To be honest: I have absolutely no idea whether it works
  and how good it works if at all, but I would expect less problems
  there.)

 i bet that duncan uses it in some workflow that has to be stable i.e. no
 moving targets like xetex or luatex (yet)

That's certainly true for LuaTeX, but XeTeX is really not *so
unstable*. I agree, font support has been (and still is a bit) broken
until recently (and Leopard users report serious problems with
xdvipdfmx), but the rest of problems seems approximately equally
buggy/problematic to me as the rest of ConTeXt  :) :) :) :)


Only as a suggestion: could someone who has managed to install
Chinese fonts and map files successfully, upload the needed files to
http://modules.contextgarden.net/, so that it would be easier for
other users to take ready-to-start-using module rather than having
to read dozens of pages of how to get started?

In that case, supporting Chinese on the garden could be done right
away if needed (perhaps we need to enable third party modules on the
garden, which is really not so difficult to do).

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