diff options
author | Karl Berry <karl@freefriends.org> | 2013-12-06 22:14:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-12-06 22:14:43 +0000 |
commit | 8c3bc9ab96e351e1189f16dacc40c2dcc678b70a (patch) | |
tree | 8f2ecb70b7a51c2f696da5060963dd40638bf869 /Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty | |
parent | 7e784ae2dff9b04aa5830bc1c60753ad9beee4b9 (diff) |
xetexko (6dec13)
git-svn-id: svn://tug.org/texlive/trunk@32344 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty')
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty | 134 |
1 files changed, 69 insertions, 65 deletions
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty index 23894a196a5..62212d658a3 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty @@ -12,16 +12,23 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else - \ProvidesPackage{xetexko-josa}[2013/03/27 v2.0 Auto-josa for XeTeX-ko] + \ProvidesPackage{xetexko-josa}[2013/12/06 v2.2 Auto-josa for XeTeX-ko] \fi \unless\ifcsname @tempcnta\endcsname\newcount\@tempcnta\fi \unless\ifcsname @tempcntb\endcsname\newcount\@tempcntb\fi -\newcount\@josa\@josa\m@ne -\protected\def\jong{\global\@josa\z@} -\protected\def\rieul{\global\@josa\@ne} -\protected\def\jung{\global\@josa\tw@} +%%% user commands +\protected\def\jong {\global\let\XK@last@char=0} +\protected\def\rieul{\global\let\XK@last@char=1} +\protected\def\jung {\global\let\XK@last@char=2} + + +\newcount\@josa +\def\@jong {\global\@josa\z@ } +\def\@rieul{\global\@josa\@ne} +\def\@jung {\global\@josa\tw@} +\@jung \begingroup \catcode`\A=11 @@ -31,17 +38,17 @@ \endgroup \expandafter\def\expandafter\strip@characternum@meaning@prefix\detokenize - {the character} #1{\number`#1} + {the character} #1#2\end{\number`#1\relax} \expandafter\def\expandafter\strip@letternum@meaning@prefix\detokenize - {the letter} #1{\number`#1} + {the letter} #1#2\end{\number`#1\relax} \def\@josa@char@to@number#1#2{% \ifcat#1\dhucs@cat@eleven \expandafter\expandafter\expandafter#2\expandafter - \strip@letternum@meaning@prefix\meaning#1\relax + \strip@letternum@meaning@prefix\meaning#1\end \else\ifcat#1\dhucs@cat@twelve \expandafter\expandafter\expandafter#2\expandafter - \strip@characternum@meaning@prefix\meaning#1\relax + \strip@characternum@meaning@prefix\meaning#1\end \else #2\z@ \fi\fi @@ -63,37 +70,37 @@ } \def\josa@last@char@latin{% - \ifnum 49=\count@ \rieul\else % 1 - \ifnum 51=\count@ \jong \else % 3 - \ifnum 54=\count@ \jong \else % 6 - \ifnum 55=\count@ \rieul\else % 7 - \ifnum 56=\count@ \rieul\else % 8 - \ifnum 48=\count@ \jong \else % 0 - \ifnum 108=\count@ \rieul\else % l - \ifnum 109=\count@ \jong \else % m - \ifnum 110=\count@ \jong \else % n - \ifnum 76=\count@ \rieul\else % L - \ifnum 77=\count@ \jong \else % M - \ifnum 78=\count@ \jong \else % N - \jung + \ifnum 49=\count@ \@rieul\else % 1 + \ifnum 51=\count@ \@jong \else % 3 + \ifnum 54=\count@ \@jong \else % 6 + \ifnum 55=\count@ \@rieul\else % 7 + \ifnum 56=\count@ \@rieul\else % 8 + \ifnum 48=\count@ \@jong \else % 0 + \ifnum 108=\count@ \@rieul\else % l + \ifnum 109=\count@ \@jong \else % m + \ifnum 110=\count@ \@jong \else % n + \ifnum 76=\count@ \@rieul\else % L + \ifnum 77=\count@ \@jong \else % M + \ifnum 78=\count@ \@jong \else % N + \@jung \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi - \ifnum 110=\@tempcnta \ifnum 103=\count@ \jong \fi\fi %skati-ng - \ifnum 97=\@tempcnta \ifnum 112=\count@ \jong \fi\fi %c-ap - \ifnum 117=\@tempcnta \ifnum 112=\count@ \jong \fi\fi %c-up - \ifnum 97=\@tempcnta \ifnum 116=\count@ \jong \fi\fi %c-at - \ifnum 101=\@tempcnta \ifnum 116=\count@ \jong \fi\fi %Haml-et - \ifnum 105=\@tempcnta \ifnum 116=\count@ \jong \fi\fi %summ-it - \ifnum 111=\@tempcnta \ifnum 116=\count@ \jong \fi\fi %n-ot - \ifnum 117=\@tempcnta \ifnum 116=\count@ \jong \fi\fi %n-ut - \ifnum 111=\@tempcnta \ifnum 107=\count@ \jong \fi\fi %bo-ok - \ifnum 105=\@tempcnta \ifnum 99=\count@ \jong \fi\fi %picn-ic - \ifnum 108=\@tempcnta \ifnum 101=\count@ \rieul\fi\fi %app-le - \ifnum 105=\@tempcntb \ifnum 109=\@tempcnta \ifnum 101=\count@ \jong\fi\fi\fi %t-ime - \ifnum 105=\@tempcntb \ifnum 110=\@tempcnta \ifnum 101=\count@ \jong\fi\fi\fi %m-ine - \ifnum 97=\@tempcntb \ifnum 99=\@tempcnta \ifnum 107=\count@ \jong\fi\fi\fi %b-ack - \ifnum 105=\@tempcntb \ifnum 99=\@tempcnta \ifnum 107=\count@ \jong\fi\fi\fi %p-ick - \ifnum 111=\@tempcntb \ifnum 97=\@tempcnta \ifnum 116=\count@ \jung\fi\fi\fi %b-oat - \ifnum 84=\@tempcntb \ifnum 69=\@tempcnta \ifnum 88=\count@ \jong\fi\fi\fi %TEX + \ifnum 110=\@tempcnta \ifnum 103=\count@ \@jong \fi\fi %skati-ng + \ifnum 97=\@tempcnta \ifnum 112=\count@ \@jong \fi\fi %c-ap + \ifnum 117=\@tempcnta \ifnum 112=\count@ \@jong \fi\fi %c-up + \ifnum 97=\@tempcnta \ifnum 116=\count@ \@jong \fi\fi %c-at + \ifnum 101=\@tempcnta \ifnum 116=\count@ \@jong \fi\fi %Haml-et + \ifnum 105=\@tempcnta \ifnum 116=\count@ \@jong \fi\fi %summ-it + \ifnum 111=\@tempcnta \ifnum 116=\count@ \@jong \fi\fi %n-ot + \ifnum 117=\@tempcnta \ifnum 116=\count@ \@jong \fi\fi %n-ut + \ifnum 111=\@tempcnta \ifnum 107=\count@ \@jong \fi\fi %bo-ok + \ifnum 105=\@tempcnta \ifnum 99=\count@ \@jong \fi\fi %picn-ic + \ifnum 108=\@tempcnta \ifnum 101=\count@ \@rieul\fi\fi %app-le + \ifnum 105=\@tempcntb \ifnum 109=\@tempcnta \ifnum 101=\count@ \@jong\fi\fi\fi %t-ime + \ifnum 105=\@tempcntb \ifnum 110=\@tempcnta \ifnum 101=\count@ \@jong\fi\fi\fi %m-ine + \ifnum 97=\@tempcntb \ifnum 99=\@tempcnta \ifnum 107=\count@ \@jong\fi\fi\fi %b-ack + \ifnum 105=\@tempcntb \ifnum 99=\@tempcnta \ifnum 107=\count@ \@jong\fi\fi\fi %p-ick + \ifnum 111=\@tempcntb \ifnum 97=\@tempcnta \ifnum 116=\count@ \@jung\fi\fi\fi %b-oat + \ifnum 84=\@tempcntb \ifnum 69=\@tempcnta \ifnum 88=\count@ \@jong\fi\fi\fi %TEX } \def\josa@hanja@hangul#1{% @@ -120,8 +127,8 @@ \divide\count\tw@ 10 \multiply\count\tw@ 10 \advance\count@-\count\tw@ - \ifcase\count@\jong\or\rieul\or\jung\or\jong\or\jung\or - \jung\or\jong\or\rieul\or\rieul\or\jung\fi + \ifcase\count@\@jong\or\@rieul\or\@jung\or\@jong\or\@jung\or + \@jung\or\@jong\or\@rieul\or\@rieul\or\@jung\fi \egroup } @@ -141,30 +148,30 @@ \advance\@josa-\count@ \advance\@josa4519 % "11A7 \fi\fi \ifnum\@josa>"115F \ifnum\@josa<"11A8 % jamo vowels - \ifnum\@josa="1160 \ifnum\@tempcnta="1105 \rieul \else \jong \fi % ㄹ or other chosong - \else \jung \fi\fi\fi + \ifnum\@josa="1160 \ifnum\@tempcnta="1105 \@rieul \else \@jong \fi % ㄹ or other chosong + \else \@jung \fi\fi\fi \ifnum\@josa>"11A7 \ifnum\@josa<"1200 % jamo final consonants - \ifnum\@josa="11AF \rieul \else \jong \fi\fi\fi - \ifnum\@josa>"D7AF \ifnum\@josa<"D7C7 \jung \fi\fi % jamo vowels - \ifnum\@josa>"D7CA \ifnum\@josa<"D7FC \jong \fi\fi % jamo final consonants + \ifnum\@josa="11AF \@rieul \else \@jong \fi\fi\fi + \ifnum\@josa>"D7AF \ifnum\@josa<"D7C7 \@jung \fi\fi % jamo vowels + \ifnum\@josa>"D7CA \ifnum\@josa<"D7FC \@jong \fi\fi % jamo final consonants \ifnum\@josa>12592 \ifnum\@josa<12623 % ㄱㄴㄷㄹ - \ifnum\@josa=12601 \rieul - \else\jong\fi \fi\fi + \ifnum\@josa=12601 \@rieul + \else\@jong\fi \fi\fi \ifnum\@josa>12895 \ifnum\@josa<12924 \advance\@josa-96 \fi\fi \ifnum\@josa>12799 \ifnum\@josa<12814 % ㉠ or ㈀ - \ifnum\@josa=12803 \rieul - \else\jong\fi \fi\fi + \ifnum\@josa=12803 \@rieul + \else\@jong\fi \fi\fi \ifnum\@josa>12813 \ifnum\@josa<12829 % ㉮ or ㈎ - \jung \fi\fi + \@jung \fi\fi \ifnum\@josa>9311 \ifnum\@josa<9372 % ① or ⑴ \advance\@josa\m@ne \num@josa{\@josa}\fi\fi \ifnum\@josa>9423 \ifnum\@josa<9450 \advance\@josa-26 \fi\fi \ifnum\@josa>9397 \ifnum\@josa<9424 \advance\@josa-26 \fi\fi \ifnum\@josa>9371 \ifnum\@josa<9398 % ⓐ or ⒜ - \ifnum\@josa=9383 \rieul\else % l - \ifnum\@josa=9384 \jong\else % m - \ifnum\@josa=9385 \jong\else % n - \jung\fi\fi\fi \fi\fi + \ifnum\@josa=9383 \@rieul\else % l + \ifnum\@josa=9384 \@jong\else % m + \ifnum\@josa=9385 \@jong\else % n + \@jung\fi\fi\fi \fi\fi \ifnum\@josa>8543 \ifnum\@josa<8556 % ⅰ ⅱ ⅲ \advance\@josa-3 \num@josa{\@josa}\fi\fi \ifnum\@josa>8559 \ifnum\@josa<8572 % Ⅰ Ⅱ Ⅲ @@ -172,21 +179,18 @@ } \protected\def\makejosa#1#2{% - \ifnum\@josa<\z@ - \josa@char@to@number - \ifnum\count@<\@cclvi - \ifnum\lastskip>\z@\else\XKcjklatinsmallbreak\fi % probably last char is latin ㅠㅠ - \josa@last@char@latin - \else - \@josa\count@ - \josa@last@char@cjk - \fi + \josa@char@to@number + \ifnum\count@<\@cclvi + \ifnum\lastskip>\z@\else\XKcjklatinsmallbreak\fi % probably last char is latin ㅠㅠ + \josa@last@char@latin + \else + \@josa\count@ + \josa@last@char@cjk \fi \ifcase\@josa #2% jong \or \ifx\@empty#1\@empty \else#2\fi% rieul \else #1% jung \fi - \global\@josa\m@ne } \def\가{\makejosa{가}{이}} |