summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/kotex-utf/contrib/dhucs-enumerate.sty
blob: e8fac0f6940ac9e288acf77c830ad438b511e4fd (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
%% File `dhucs-enumerate.sty`
%%
%% Copyright (c) 2007-2013 Dohyun Kim <nomos at ktug org>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%  http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2006/05/20 or later.
%%
\ProvidesPackage{dhucs-enumerate}
  [2009/03/15 partially support enumrate.sty under dhucs]

\@ifpackageloaded{enumerate}{}{\RequirePackage{enumerate}}

\ifx가가\g@addto@macro\@enhook{%
    \ifx ^^^^ac00\@entemp \def\@tempa{\@enLabel\gana}\else
    \ifx ^^^^2170\@entemp \def\@tempa{\@enLabel\hroman}\else
    \ifx ^^^^2160\@entemp \def\@tempa{\@enLabel\hRoman}\else
    \ifx ^^^^249c\@entemp \def\@tempa{\@enLabel\peng}\else
    \ifx ^^^^24d0\@entemp \def\@tempa{\@enLabel\oeng}\else
    \ifx ^^^^2474\@entemp \def\@tempa{\@enLabel\pnum}\else 
    \ifx ^^^^2460\@entemp \def\@tempa{\@enLabel\onum}\else
    \ifx ^^^^320e\@entemp \def\@tempa{\@enLabel\pgana}\else
    \ifx ^^^^326e\@entemp \def\@tempa{\@enLabel\ogana}\else
    \ifx ^^^^3260\@entemp \def\@tempa{\@enLabel\ojaso}\else
    \ifx ^^^^3131\@entemp \def\@tempa{\@enLabel\jaso}\else
    \ifx ^^^^3200\@entemp \def\@tempa{\@enLabel\pjaso}%
    \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
    \expandafter\endinput
\fi

\g@addto@macro\@enhook{%
  \ifx^^ea\@entemp  % 가,  
    \let\@tempa\@dhucs@enumerate\else %%%%%
  \ifx^^e2\@entemp  % ①, ⑴, ⒜, ⓐ, ⅰ, Ⅰ
    \let\@tempa\@dhucs@enumerate\else %%%%%
  \ifx^^e3\@entemp  % ㄱ, ㉠, ㉮, ㈀, ㈎
    \let\@tempa\@dhucs@enumerate
  \fi\fi\fi}
\def\@dhucs@enumerate#1#2#3{%
  \bgroup\let\unihangulchar\@firstofone
    \xdef\@dhucs@enum@temp{#1#2#3}\egroup
  \ifnum\@dhucs@enum@temp=44032 \def\@tempa{\@enLabel\gana}\else
  \ifnum\@dhucs@enum@temp=8560  \def\@tempa{\@enLabel\hroman}\else
  \ifnum\@dhucs@enum@temp=8544  \def\@tempa{\@enLabel\hRoman}\else
  \ifnum\@dhucs@enum@temp=9372  \def\@tempa{\@enLabel\peng}\else
  \ifnum\@dhucs@enum@temp=9424  \def\@tempa{\@enLabel\oeng}\else
  \ifnum\@dhucs@enum@temp=9332  \def\@tempa{\@enLabel\pnum}\else
  \ifnum\@dhucs@enum@temp=9312  \def\@tempa{\@enLabel\onum}\else
  \ifnum\@dhucs@enum@temp=12814 \def\@tempa{\@enLabel\pgana}\else
  \ifnum\@dhucs@enum@temp=12910 \def\@tempa{\@enLabel\ogana}\else
  \ifnum\@dhucs@enum@temp=12896 \def\@tempa{\@enLabel\ojaso}\else
  \ifnum\@dhucs@enum@temp=12593 \def\@tempa{\@enLabel\jaso}\else
  \ifnum\@dhucs@enum@temp=12800 \def\@tempa{\@enLabel\pjaso}\else
    \PackageError{dhucs-enumerate}
      {You can't use `\unexpanded{#1#2#3}' as enum label}
      {Legal enum labels of hangul-ucs are: \MessageBreak\space\space
        \unexpanded{가, ㄱ, ㉠, ㉮, ㈀, ㈎, ①, ⑴, ⒜, ⓐ, ⅰ, Ⅰ}.}
  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi
  \@tempa\relax}
\endinput