Changes

Jump to navigation Jump to search
New version for ConTeXt >= 2005.12.19
* manual by Pragma: [http://www.pragma-ade.com/general/manuals/mchinese.pdf Chinese in ConTeXt]
=Chinese in ConTeXt (ConTeXt 2005.12.19 and newer)=
If you have [[Context 2005.12.19]], you only have to get the fonts.
 
# You need some Chinese (TrueType) fonts; you may want to get [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htfs.ttf FangSong], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/hthei.ttf HeiTi], [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htkai.ttf KaiTi] and [ftp://ftp.ctex.org/pub/tex/fonts/truetype/ttf/htsong.ttf SongTi]. Put those e.g. into $TEXMF/fonts/truetype/chinese/.
# Use Hans Hagen's experimental [[http://www.physik.fu-berlin.de/~tburnus/ttf2uni.rb ttf2uni.rb]] script to create .map, .tmf and .enc files. You can then put the files e.g. to $TEXMF/fonts/tfm/chinese/ (*.tmf files), $TEXMF/fonts/enc/chinese/ (*.enc files, they are basically the same for all fonts) and to $TEXMF/fonts/map/chinese/.
# You may now need to update the hash TeX uses to find the files; using teTeX this is done by running <tt>texhash</tt>.
# How you can run your Hello World program:
<texcode>
\enableregime[utf]
\usemodule[chi-00]
\starttext
你好!
\stoptext
</texcode>
 
If you want to typset vertical text, use <tt>\startvertical ... \stopvertical</tt>, if you want to use Chinese numbers, you can use e.g. <tt>\startitemize[c]</tt>.
 
 
=Chinese in ConTeXt (before 2005.12.19)=
[[User:Xiaojf|Xiao Jianfeng]] wrote in a [http://archive.contextgarden.net/message/20050606.080842.5e1c2057.en.html mail to the mailing list on 2005-06-06]:
If you want to use UTF-8, the [http://www.ntg.nl/pipermail/ntg-context/2005/013542.html script by Lutz Haseloff] might of interest to you; the needed perl module Encode::HanConvert is [http://search.cpan.org/dist/Encode-HanConvert/ available at CPAN]. Note, however, that you may only use characters representable in gbk, German umlauts for instance are converted into ??.
 
Starting from [[Context 2005.12.19]] UTF-8 encoded files also work (<tt>\enableregime[utf]</tt>).
 
If you want to have the text vertically typeset, use <tt>\startvertical ... \stopvertical</tt>.
[[Category:Fonts]]
[[Category:International]]
Anonymous user

Navigation menu