[texhax] Chinese characters with latex

William F. Adams wadams at atlis.com
Wed Jan 7 21:41:38 CET 2004


On Monday, January 5, 2004, at 12:58  PM, françoise argoul wrote:

> I am looking for LateX editing of Pinyin chinese characters, I am 
> working on
> a Mac OSX system (Unix) and I would like to know how to include chinese
> editing in my LateX 2epsilon program. DO you know a documentation which
> explains how to do that?

Here's a post on this to the Mac OS X TeX mailing list a while back:

From: Peder Axensten <f95-pax at nada.kth.se>
Date: Sat Nov 1, 2003  3:26:42  PM US/Eastern
To: "TeX on Mac OS X Mailing List" <MacOSX-TeX at email.esm.psu.edu>
Subject: [OS X TeX] Installing CJK
Reply-To: "TeX on Mac OS X Mailing List" <MacOSX-TeX at email.esm.psu.edu>

The original instructions are by Olivier Delloye -- thank you Olivier!
Without your help I feel I would never have succeded with the 
installation!

Renaming "Cyberbit.ttf" (in step 3) was absent from the original 
instructions
and I've changed step 5 and a few other things -- So don't blame Olivier
if you have problems!


1. Installation of UCS Package
- Download "ucs" package from: http://www.unruh.de/DniQ/latex/unicode/
   uncompress/untar the file
   move the whole "ucs" directory to somewhere appropriate in your 
TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/tex/latex/ucs/)

2. Installation of CJK Package
- download "cjk" package from: http://cjk.ffii.org/
- uncompress/untar the "cjk-4.5.1.tar.gz" file
- move the whole directory to somewhere appropriate in your TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/tex/latex/cjk/)

3. Installation of Unicode True Type font (cyberbit)
- download "Cyberbit.ZIP" file from:
   ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/
   uncompress it and rename "Cyberbit.ttf" to "cyberbit.ttf" (no 
capitals)
- download "Unicode.sfd" file from: http://delloye.free.fr/Unicode.sfd
- make sure "cyberbit.ttf" and "Unicode.sfd" are in the same directory
- from the terminal, go to that directory and run
   "ttf2tfm cyberbit.ttf -w cyberbit at Unicode@"
   in order to create ".tfm" and ".enc" files
- move all the ".tfm" files to somewhere appropriate in your TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/fonts/tfm/bitstrea/cyberbit)
- move all the ".enc" files to somewhere appropriate in your TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/pdftex/enc/)
- download "cyberbit.map" file from: http://delloye.free.fr/cyberbit.map
   and move it to somewhere appropriate in your TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/pdftex/config/)
- download "c70cyberbit.fd" file from: 
http://delloye.free.fr/c70cyberbit.fd
   and move it to somewhere appropriate in your TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/tex/latex/cyberbit/)
- move the "cyberbit.ttf" to somewhere appropriate in your TeX-tree
   (e.g. /usr/local/teTeX/share/texmf.local/fonts/truetype/ -- check in 
your
   /usr/local/teTeX/share/texmf/web2c/texmf.cnf file the "%TrueType 
outline
   fonts" line and the "TTFONTS" value. You have to copy the 
Cybebrbit.ttf file
   in a directory included in the TTFONTS path.)

4. Declaration of the new font
- open /usr/local/tetex/share/texmf.local/web2c/updmap.cfg (if there is 
none,
   first copy it from 
/usr/local/tetex/share/texmf.tetex/web2c/updmap.cfg)
   and add this line "MixedMap cyberbit.map" (without quotes) to the 
file.
- run "sudo texhash" in the terminal
- run "sudo updmap" in the terminal

5. Using the new environment in LaTeX
You just need to include the three following lines in the preamble :
   \usepackage[encapsulated]{CJK}
   \usepackage{ucs}
   \usepackage[utf8]{inputenc}
It may also be a good idea to create a new command :
   \newcommand{\cjktext}[1]{\begin{CJK}{UTF8}{cyberbit}#1\end{CJK}}
Now, when you want to type chinese, you just use the command:
   \cjktext{enter your chinese text here}

/Peder


/Peder
+46-90-786.7719 (work)
+46-90-32344 (home)

-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





-- 
William Adams, publishing specialist
voice - 717-731-6707 | Fax - 717-731-6708
www.atlis.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 4899 bytes
Desc: not available
Url : http://tug.org/pipermail/texhax/attachments/20040107/7ddcfcb0/attachment.bin


More information about the texhax mailing list