File: README.Debian

package info (click to toggle)
cjk 4.8.4%2Bgit20170127-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,888 kB
  • sloc: lisp: 12,099; sh: 3,731; ansic: 2,429; perl: 1,804; makefile: 336
file content (260 lines) | stat: -rw-r--r-- 8,750 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
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