summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjk/texinput/UTF8/xUTF8.chr
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/cjk/texinput/UTF8/xUTF8.chr')
-rwxr-xr-xMaster/texmf-dist/tex/latex/cjk/texinput/UTF8/xUTF8.chr231
1 files changed, 231 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/cjk/texinput/UTF8/xUTF8.chr b/Master/texmf-dist/tex/latex/cjk/texinput/UTF8/xUTF8.chr
new file mode 100755
index 00000000000..5434c62bfdb
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/cjk/texinput/UTF8/xUTF8.chr
@@ -0,0 +1,231 @@
+% This is the file xUTF8.chr of the CJK package
+% for using Asian logographs (Chinese/Japanese/Korean) with LaTeX2e
+%
+% created by SUN Wenchang <sunwch@hotmail.com>
+%
+% Version 4.8.2 (29-Dec-2008)
+
+% Copyright (C) 1994-2008 Werner Lemberg <wl@gnu.org>
+%
+% This program is free software; you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation; either version 2 of the License, or
+% (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program in doc/COPYING; if not, write to the Free
+% Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+% MA 02110-1301 USA
+
+\def\fileversion{4.8.2}
+\def\filedate{2008/12/29}
+\ProvidesFile{xUTF8.chr}[\filedate\space\fileversion]
+
+
+% define macros for handling CJK fonts and characters in UTF 8 encoding
+% as needed for XeTeX support.
+
+% two bytes per character; covers range 0x80 - 0x7FF.
+
+\CJK@global\@namedef{CJK@xUTF8Chr}{
+ \CJK@global\def\CJK@char##1##2{
+ {\ifnum ##2 < \CJK@min
+ \CJK@err
+ \else
+ \ifnum ##2 > \CJK@max
+ \CJK@err
+ \else
+ \@tempcnta ##1\relax
+ \advance\@tempcnta ##2\relax
+ \advance\@tempcnta -128\relax
+
+ \xCJK@setfont
+ \CJKsymbol{\@tempcnta}
+ \fi
+ \fi}}
+
+% three bytes per character; covers range 0x800 - 0xFFFF.
+
+ \CJK@global\def\CJK@altchar##1##2##3{
+ {\ifnum ##2 < \CJK@min
+ \CJK@err
+ \else
+ \ifnum ##2 > \CJK@max
+ \CJK@err
+ \else
+ \ifnum ##3 < \CJK@min
+ \CJK@errx
+ \else
+ \ifnum ##3 > \CJK@max
+ \CJK@errx
+ \else
+ \ifCJK@CJK@
+ \CJK@testLastCJK
+ \ifCJK@
+ \CJKglue
+ \fi
+ \CJK@testLastKern
+ \ifCJK@
+ \CJK@nobreakglue
+ \fi
+ \fi
+
+ \@tempcnta ##1\relax
+ \@tempcntb ##2\relax
+ \advance\@tempcntb -128\relax
+ \multiply\@tempcntb 64\relax
+ \advance\@tempcntb ##3\relax
+ \advance\@tempcntb -128\relax
+ \advance\@tempcnta \@tempcntb
+
+ \xCJK@setfont
+ \CJKsymbol{\@tempcnta}
+
+ \ifCJK@hangul@
+ \discretionary{}{}{}
+ \fi
+ \ifCJK@CJK@
+ \CJK@CJK
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}}
+
+% four bytes per character; covers range 0x10000 - 0x10FFFF.
+
+ \CJK@global\def\CJK@altxchar##1##2##3##4{
+ {\ifnum ##2 < \CJK@min
+ \CJK@err
+ \else
+ \ifnum ##2 > \CJK@max
+ \CJK@err
+ \else
+ \ifnum ##3 < \CJK@min
+ \CJK@errx
+ \else
+ \ifnum ##3 > \CJK@max
+ \CJK@errx
+ \else
+ \ifnum ##3 < \CJK@min
+ \CJK@errxx
+ \else
+ \ifnum ##3 > \CJK@max
+ \CJK@errxx
+ \else
+ \ifCJK@CJK@
+ \CJK@testLastCJK
+ \ifCJK@
+ \CJKglue
+ \fi
+ \CJK@testLastKern
+ \ifCJK@
+ \CJK@nobreakglue
+ \fi
+ \fi
+
+ \@tempcnta ##1\relax
+ \@tempcntb ##2\relax
+ \advance\@tempcntb -128\relax
+ \multiply\@tempcntb 64\relax
+ \advance\@tempcntb ##3\relax
+ \advance\@tempcntb -128\relax
+ \multiply\@tempcntb 64\relax
+ \advance\@tempcntb ##4\relax
+ \advance\@tempcntb -128\relax
+ \advance\@tempcnta \@tempcntb
+
+ \xCJK@setfont
+ \CJKsymbol{\@tempcnta}
+
+ \ifCJK@hangul@
+ \discretionary{}{}{}
+ \fi
+ \ifCJK@CJK@
+ \CJK@CJK
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi}}
+
+% define macro for handling punctuation characters.
+
+ \CJK@global\def\CJK@punctchar##1##2##3##4{
+ {\ifnum ##3 < \CJK@min
+ \CJK@err
+ \else
+ \ifnum ##3 > \CJK@max
+ \CJK@err
+ \else
+ \ifnum ##4 < \CJK@min
+ \CJK@errx
+ \else
+ \ifnum ##4 > \CJK@max
+ \CJK@errx
+ \else
+ \@tempcnta ##2\relax
+ \@tempcntb ##3\relax
+ \advance\@tempcntb -128\relax
+ \multiply\@tempcntb 64\relax
+ \advance\@tempcntb ##4\relax
+ \advance\@tempcntb -128\relax
+ \advance\@tempcnta \@tempcntb
+
+ \xCJK@setfont
+ % we need three braces to make it work with CJKulem.sty
+ {{{\ifCJK@CJK@
+ \xCJK@testPunct{\CJK@@@enc}{}{\the\@tempcnta}
+ \ifCJK@
+ \xCJK@testPunct{\CJK@@@enc}{Post}{\the\@tempcnta}
+ \ifCJK@
+ \CJK@nobreakglue
+ \else
+ \CJKglue
+ \fi
+ \CJK@testLastKern
+ \ifCJK@
+ \CJK@nobreakglue
+ \fi
+ \CJKpunctsymbol{\@tempcnta}
+
+ \xCJK@testPunct{\CJK@@@enc}{Pre}{\the\@tempcnta}
+ \ifCJK@
+ \CJK@kern
+ \else
+ \CJK@CJK
+ \fi
+ \else
+ \CJK@testLastCJK
+ \ifCJK@
+ \CJKglue
+ \fi
+ \CJK@testLastKern
+ \ifCJK@
+ \CJK@nobreakglue
+ \fi
+
+ \CJKsymbol{\@tempcnta}
+
+ \CJK@CJK
+ \fi
+ \else
+ \CJKsymbol{\@tempcnta}
+ \fi
+ \ifCJK@hangul@
+ \discretionary{}{}{}
+ \fi
+ }}}
+ \fi
+ \fi
+ \fi
+ \fi}}}
+
+\endinput