summaryrefslogtreecommitdiff
path: root/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty
diff options
context:
space:
mode:
Diffstat (limited to 'language/korean/cjk-ko/cjkutf8-nanummjhanja.sty')
-rw-r--r--language/korean/cjk-ko/cjkutf8-nanummjhanja.sty62
1 files changed, 62 insertions, 0 deletions
diff --git a/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty b/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty
new file mode 100644
index 0000000000..f96fae70aa
--- /dev/null
+++ b/language/korean/cjk-ko/cjkutf8-nanummjhanja.sty
@@ -0,0 +1,62 @@
+% cjkutf8-nanummjhanja.sty
+%
+% Copyright (c) 2016 Dohyun Kim <nomos at ktug 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
+
+\ProvidesPackage{cjkutf8-nanummjhanja}
+ [2016/04/04 v1.8 UHC hanja for Nanum Myeongjo]
+
+\def\CJKKO@mjdefault{nanummj}
+\def\CJKKO@mjhanjafamily{\def\CJK@family{uhcmj}}
+
+% redefine CJK@numbToHex
+\def\CJK@numbToHex#1#2{%
+ {\count\z@ #2\relax
+ \count\tw@ \count\z@
+ \divide\count\z@ \sixt@@n
+ \count@ \count\z@
+ \multiply\count@ \sixt@@n
+ \advance\count\tw@ -\count@
+ \xdef#1{%
+ \hexnumber@{\count\z@}\hexnumber@{\count\tw@}}}%
+ % inserted
+ \ifx\CJK@family\CJKKO@mjdefault
+ \expandafter\CJKKO@checkhanjaplane#1\fi}
+
+\def\CJKKO@checkhanjaplane#1#2{%
+ \begingroup
+ \count@\ifx#1A10\else
+ \ifx#1B11\else
+ \ifx#1C12\else
+ \ifx#1D13\else
+ \ifx#1E14\else
+ \ifx#1F15\else
+ #1\fi\fi\fi\fi\fi\fi
+ \@tempcnta\ifx#2A10\else
+ \ifx#2B11\else
+ \ifx#2C12\else
+ \ifx#2D13\else
+ \ifx#2E14\else
+ \ifx#2F15\else
+ #2\fi\fi\fi\fi\fi\fi
+ \multiply\count@\sixt@@n \advance\count@\@tempcnta
+ \ifnum\count@>"4D \ifnum\count@<"A0 \aftergroup\CJKKO@mjhanjafamily \else
+ \ifnum\count@>"F8 \ifnum\count@<"FB \aftergroup\CJKKO@mjhanjafamily
+ \fi\fi\fi\fi
+ \endgroup }
+
+\endinput