]> matita.cs.unibo.it Git - helm.git/blob - helm/software/share/texmf/unicode/contrib/c40enc.def
Preparing for 0.5.9 release.
[helm.git] / helm / software / share / texmf / unicode / contrib / c40enc.def
1 %%
2 %% This is file `c40enc.def',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% ucs.dtx  (with options: `c40enc.def')
8 %% 
9 %% Copyright 2001 Dominique Unruh <dominique@unruh.de>
10 %% 
11 %% This program is provided under the terms of the LaTeX Project Public
12 %% License with some modifications.
13 %% See the file LICENSE (http://www.unruh.de/DniQ/latex/unicode/content/LICENSE)
14 %% for information.
15 %% 
16 \ProvidesFile{c40enc.def}[2002/11/25 Fontencoding C40 (JIS)]%
17 \DeclareFontEncoding{C40}{}{}%
18 \DeclareFontSubstitution{C40}{song}{m}{n}%
19 \input{cenccmn.tex}%
20 \expandafter\let\csname C40/song/m/n\endcsname\undefined
21 \def\cjk@Cforty#1#2#3#4{% Takes JIS0208 codepos in hex
22   {%
23     \count0="#1#2
24     \multiply\count0 by94
25     \advance\count0 by"#3#4
26     \advance\count0 by-"B3F
27     \count1\count0
28     \divide\count0 by256
29     \multiply\count0 by256
30     \advance\count1 by-\count0
31     \divide\count0 by256
32     %\typeout{C0=\number\count0, C1=\number\count1}%
33     \edef\temp@a{\ifnum\count0<10 0\fi\number\count0}%
34     \edef\temp@b{\ifx\temp@a\CJK@plane\else
35       \def\noexpand\CJK@plane{\temp@a}\noexpand\selectfont\fi
36       \char\number\count\@ne\space}%
37     %\typeout{C40: \meaning\temp@b}%
38     \expandafter}\temp@b%
39   }%
40 \DeclareTextCommand\jischar{C40}[1]{\cjk@Cforty#1}
41 \DeclareTextCommandDefault\jischar[1]{{\fontencoding{C40}%
42     \let\CJK@plane\undefined\cjk@Cforty#1}}