4.8.3 CHANGES
-------------

xCJK
====

The package `xCJK' is now obsolete.  Upstream suggests to use the
package `xeCJK' instead, which is currently part of the Debian package
`texlive-xetex'.

As such, the Debian package "latex-cjk-xcjk" is not built anymore, and from
now on all LaTeX CJK Debian packages will conflict with said package.


Vietnamese and Greek
====================

I strongly recommended to look at the CJKutf8.tex example if you want to use
Vietnamese or Greek text.  There are other possibilities such as using the MULE
encoding in Emacs (M-x cjk-write-file), or using big fonts such as Cyberbit, but
the method in CJKutf8.tex is definitely the easiest way and will generally yield
more visually pleasing results.

It is imperative that Debian packages texlive-lang-greek and texlive-lang-vietnamese
are installed.


Korean
======

A while ago the `hlatex-fonts-base' package was replaced by `ko.tex-extra'.  Not all
fonts have been included, most notably "mj", the default Korean font in the `CJK'
package.

I have updated the KS.tex example file to show you which EUC fonts do work with
`ko.tex-extra'.

 -- Danai SAE-HAN (韓達耐) <danai@debian.org>, Sun, 13 Jan 2013 23:57:20 +0800


4.6.0 CHANGES
-------------

Fonts

 - xdvi uses Type1 fonts whenever possible.
   But Postscript rotation is not supported, so xdvi will show
   vertical fonts as horizontal ones.  Use dvips or dvipdfm(x) to get
   the final result.

 - You can find the tools to create new fonts in
   /usr/share/latex-cjk/utils/subfonts/.

 - latex-cjk-thai uses the .pfb fonts from the "thailatex" package; the 8.3
   filename convention as suggested by the CJK upstream author (the removal
   of the underscore in the filenames) is therefore not removed.
   E.g. norasi_bi.pfb (thailatex and latex-cjk) instead of norasibi.pfb
   (upstream CJK).

 - HBF bitmap fonts don't work yet: I intend to put all the .fd files in
   each hbf-* package ASAP.

 - The tfm-twmoe-{kai,sung} have uncertain licenses (therefore non-free),
   so if you have these fonts installed, I suggest you migrate to
   DFSG-free latex-cjk-chinese-arphic-* fonts instead.



Example files
-------------

You can find example files in /usr/share/doc/latex-cjk-common/examples/.
Some packages require the "type1ec" and requires the Debian package
"cm-super" to be installed.  This package isn't in any way related to
CJK, and you can just comment it if you prefer.

Some example files won't work, notably:
 - CEF_test.tex:
   No CEF font definition files have been installed, since I have yet
   to create the HBF font packages.

 - CJKutf8.tex
   It lacks Vietnamese Unicode fonts.  Install the Cyberbit
   fonts (ut infra).

   CJK also lacks Korean Unicode fonts.  I'm working on a Makefile
   upstream to build these fonts automatically.  When finished, I'll
   package those fonts (150MB in total) on Debian. 

 - CJKmixed.tex:
   It lacks Vietnamese Unicode fonts.  Install the Cyberbit fonts (ut
   infra).

 - UTF8.tex:
   It needs Greek fonts.  Install the Cyberbit fonts (ut infra).


If you would like to use Greek, Russian or Vietnamese in a document
but don't wish to install the Cyberbit font (or any other Unicode font
which covers these scripts) I suggest you use the "emacs-mule" encoding
in GNU Emacs, and use "M-x cjk-write-file" to produce a .cjk file.
Have a look at CJKbabel.tex and muletest.tex for good examples.
Basically, you either use fontenc or babel.



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 cyberbit@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.

First thing to do: you have to remove all the old PK fonts.
$ rm -rf ~/.texmf-var/fonts/pk

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 nice cup of tea,
and leave your computer on for the rest of the night.

  $ for i in *.pfb
    do
     echo "$(basename $i .pfb) $(basename $i .pfb) <$i" \
     >> 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, *.tfm and *.pfb to
/usr/local/share/texmf/fonts/{afm,tfm,type1}/cyberbit respectively.

Run "texhash" or "mktexlsr" as root.
Now add a file called /etc/texmf/updmap.d/20cyberbit.cfg with the
following four lines:

######
# 20cyberbit.cfg
Map cyberbit.map
######

and then run "cd ..", "update-updmap -c /etc/texmf/updmap.d/" 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 <wl@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\m@ne}

\DeclareFontShape{C70}{song}{m}{n}{<-> CJK * cyberbit}{}
\DeclareFontShape{C70}{song}{bx}{n}{<-> CJKb * cyberbit}{\CJKbold}

\endinput
%%%%%%

and run "texhash" as root again.

 -- Danai SAE-HAN (韓達耐) <danai.sae-han@edpnet.be>, Sat, 16 Jun 2007 00:32:34 +0200


HBF fonts
---------

If you wish to use HBF (id est bitmap fonts), then you'll have to
create a symlink:
  cd /usr/share/texmf/fonts/misc
  ln -s ../hbf/* .
  mktexlsr  (just to be sure ;)


Embed TrueType fonts with pdfTeX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks to help from TeXperts on the pdftex and debian-chinese mailing
lists, the cjk-latex package is now able to take advantage of pdfTeX's
"embed TrueType fonts" feature.  An experimental map file for pdfTeX
to embed Arphic PL Chinese TrueType fonts in PDF files has been added
as /etc/texmf/dvips/arphic.map.

Why "experimental"?  Because pdfTeX currently does not support
"SlantFont" for TrueType fonts.  To compensate, I have decided to use a
different font to substituted for Slanted/Italics: Kai for Song/Ming,
and Song/Ming for Kai.  :-)

This map file is not read by the default Debian teTeX installation.
If you want to use arphic.map, add:

    map +arphic.map

to your /etc/texmf/pdftex/pdftex.cfg or a pdftex.cfg in a local
directory.

 -- Anthony Fok <foka@debian.org>,  Sun, 20 May 2001 16:27:04 -0600
