Post by Ulrich DiezCJK internally treats an UTF8-char like a sequence
of (active) ASCII-characters. So I doubt that this yields
"copy-'n-paste"-ready utf8-stuff within your pdf-file even
if the resulting document looks as expected.
If you use \usepackage[T1]{CJKutf8} and have CJK4.7.0 installed, then you
should have no problem at all to copy and paste, as long as you have one
or more Unicode fonts.
IMHO Werner Lemberg's CJK package offers superior results in comparison
with inputenc.
To get the Bitstream Cyberbit fonts working for TeX, I've written the
following text for Debian GNU/Linux users. I suggest you use the NEW way
using Fontforge: you'll get nicer results. If you also want Unicode
glyphs higher than U+FFFF (not in Cyberbit but e.g. in Sun Haifeng's
SunExt{A,B}.ttf fonts), I suggest you also update your TeX's "Unicode.sfd"
file (on Debian it's part of the freetype1-tools package) with the most
recent one: http://lists.ffii.org/pipermail/cjk/2006-February/001355.html
Cyberbit
--------
(Install this only if you agree to the following license at
http://ftp.netscape.com/pub/communicator/extras/fonts/windows/License.wri)
To install Bitstream's Cyberbit TrueType Font, get
ftp://ftp.netscape.com/pub/communicator/extras/fonts/windows/Cyberbit.ZIP
and unzip it in "/usr/local/share/fonts/truetype/bitstream/".
Rename the file into "cyberbit.ttf", and make a symlink:
ln -s /usr/local/share/fonts/truetype/bitstream/cyberbit.ttf \
/usr/local/share/texmf/fonts/truetype/bitstream/cyberbit/cyberbit.ttf
(or better yet, use a relative path).
Don't forget to make the directories with "mkdir -p" first if they don't
exist yet!
1. OLD way (not recommended):
Now let's make those TeX Font Metric files:
$ cd /usr/local/share/texmf/fonts/truetype/bitstream/cyberbit
$ ttf2tfm cyberbit.ttf ***@Unicode.sfd@ > cyberbit.log
Move all the .tfm files to
/usr/local/share/texmf/fonts/tfm/tfm/bitstream/cyberbit
and run "mktexlsr" or "texhash" to update the TEXMF tree.
You can safely delete cyberbit.log.
Voilà, now you can try out /usr/share/doc/latex-cjk/examples/UTF8.tex!
2. NEW way (longer but much better):
The modern way of adding fonts is to use the Fontforge scripts. For
Cyberbit it's pretty easy: it is already a Unicode font and you don't
need vertical glyphs (unless you're as crazy as me). You will need a
Fontforge installation that is more recent than 2005-07-17. You also
must have "Unicode.sfd" installed somewhere: use either (s)locate or
find to get the exact location on your computer. It can be found
in /usr/share/texmf/fonts/sfd/ if you have the freetype1-tools package
installed on Debian.
Put cyberbit.ttf in /usr/local/share/fonts/truetype/bitstream/ and
make a soft link to your working directory, let's say
/usr/src/cyberbit-fonts/. You might eventually also link
/usr/local/share/fonts/truetype/bitstream/cyberbit.ttf to
/usr/local/share/texmf/fonts/truetype/bitstream, but that's not really
necessary.
Go to your build directory, copy "subfonts.pe" from the CJK
utils/subfonts directory to this map and execute the following
commands:
$ fontforge -script subfonts.pe cyberbit.ttf cyberbit \
/usr/share/texmf/fonts/sfd/Unicode.sfd
This will take a very long time, so make yourself a cup of tea.
$ for filename in *.pfb;
do echo "$(basename $filename .pfb) $(basename $filename .pfb) <$filename" >> cyberbit.map;
done
$ mkdir -p /usr/local/share/texmf/fonts/map/dvips/cyberbit/ /usr/local/share/texmf/fonts/{afm,type1,tfm}/cyberbit
You can write this command all on one line, or just copy and paste
the three lines in your terminal.
Put cyberbit.map in /usr/local/share/texmf/fonts/map/dvips/cyberbit/
and put *.afm, *.pfb and *.tfm to
/usr/local/share/texmf/fonts/{afm,tfm,type1}/cyberbit respectively.
Run "texhash" or "mktexlsr".
Now add a file called /etc/texmf/updmap.d/10cyberbit.cfg with the
following four lines:
######
# 10cyberbit.cfg
Map cyberbit.map
######
and then run "cd ..", "update-updmap" and "updmap-sys".
You need to go to another directory, or updmap-sys will use cyberbit.map
from the building directory; that's why you have to change directory
first.
If c70song.fd already exists on your computer, make sure it's deleted
first. Now make a file /usr/local/share/texmf/tex/latex/CJK/UTF8/c70song.fd
and use the following content:
%%%%%%
% This is the file c70song.fd of the CJK package
% for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e
%
% created by Werner Lemberg <***@gnu.org>
%
% Version 4.6.0 (11-Aug-2005)
\def\fileversion{4.6.0}
\def\filedate{2005/08/11}
\ProvidesFile{c70song.fd}[\filedate\space\fileversion]
% character set: Unicode U+0080 - U+FFFD
% font encoding: Unicode
\DeclareFontFamily{C70}{song}{\hyphenchar \font\***@ne}
\DeclareFontShape{C70}{song}{m}{n}{<-> CJK * cyberbit}{}
\DeclareFontShape{C70}{song}{bx}{n}{<-> CJKb * cyberbit}{\CJKbold}
\endinput
%%%%%%
and run "texhash" again.
HTH
Danai SAE-HAN
--
題目:《除夜自石湖歸苕溪》其一
作者:姜夔(1155-1221)
細草穿沙雪半銷,吳宮煙冷水迢迢。
梅花竹里無人見,一夜吹香過石橋。