summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/CJK/CJKutf8.sty
blob: 8b2601b437a7f992240d271929735630dcb97cd1 (plain)
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
% This is the file CJKutf8.sty 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)

\NeedsTeXFormat{LaTeX2e}[2003/12/01]

\def\fileversion{4.6.0}
\def\filedate{2005/08/11}
\ProvidesFile{CJKutf8.sty}[\filedate\space\fileversion]

\RequirePackage[utf8]{inputenc}
\RequirePackage[encapsulated]{CJK}
\RequirePackageWithOptions{fontenc}

\DeclareOption*{\OptionNotUsed}

\ProcessOptions


% we suppress any unwanted spaces produced by linefeeds

\endlinechar\m@ne

% We redefine the basic macros for handling multibyte sequences to call
% a `\u8:...' macro if it has been defined.

\def\CJK@XX#1#2{
  \ifx #2\protect
    \expandafter\CJK@XXp\expandafter#1
  \else
    \expandafter\ifx\csname u8:\string #1\string #2\endcsname \relax
      \csname CJK@\number `#1\endcsname{`#2}
    \else
      \csname u8:\string #1\string #2\endcsname
    \fi
    \CJK@ignorespaces
  \fi}
\def\CJK@XXp#1#2{
    \expandafter\ifx\csname u8:\string #1\string #2\endcsname \relax
    \csname CJK@\number `#1\endcsname{`#2}\CJK@ignorespaces
  \else
    \csname u8:\string #1\string #2\endcsname
  \fi
  \CJK@ignorespaces}

\def\CJK@XXX#1#2#3{
  \ifx #2\protect
    \expandafter\CJK@XXXp\expandafter#1#3
  \else
    \expandafter\ifx\csname u8:\string #1\string #2\string #3\endcsname \relax
      \csname CJK@\number `#1\endcsname{`#2}{`#3}
    \else
      \csname u8:\string #1\string #2\string #3\endcsname
    \fi
    \CJK@ignorespaces
  \fi}
\def\CJK@XXXp#1#2#3#4{
  \expandafter\ifx\csname u8:\string #1\string #2\string #4\endcsname \relax
    \csname CJK@\number `#1\endcsname{`#2}{`#4}
  \else
    \csname u8:\string #1\string #2\string #4\endcsname
  \fi
  \CJK@ignorespaces}

% reset endline character

\endlinechar `\^^M

\endinput