% Language definition file (part of polyglossia v2.2 -- 2024/07/15) % \ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean] \PolyglossiaSetup{korean}{ bcp47=ko, bcp47-language=ko, bcp47-script=Kore, script=Hangul, scripttag=hang, language=Korean, langtag=KOR, hyphennames={nohyphenation}, frenchspacing=true, fontsetup=true } % BCP-47 compliant aliases \setlanguagealias*{korean}{ko} \newif\if@korean@swapheadings \newif\if@korean@swapheaders \DeclareKeys[polyglossia/gloss/korean] { variant.choices:nn = { plain, classic, modern } {% \edef\xpg@korean@variant{\the\numexpr\UseName{l_keys_choice_int}-1\relax} }, variant.default:n = plain, captions.choices:nn = { hangul, hanja } {% \edef\xpg@korean@captions{\the\numexpr\UseName{l_keys_choice_int}-1\relax} }, captions.default:n = hangul, swapstrings.choice:, swapstrings / all.code = {% \@korean@swapheadingstrue \@korean@swapheaderstrue }, swapstrings / headings.code = {% \@korean@swapheadingstrue \@korean@swapheadersfalse }, swapstrings / headers.code = {% \@korean@swapheadingsfalse \@korean@swapheaderstrue }, swapstrings / none.code = {% \@korean@swapheadingsfalse \@korean@swapheadersfalse }, swapstrings.default:n = all, swapstrings/unknown.code = \xpg@warning{Unknown Korean swapstrings value `#1'} } % Register default options \InitializeGlossOptions{korean}{variant=plain,swapstrings=all,captions=hangul} \def\captionskorean{% \ifcase\xpg@korean@captions\relax \captions@korean@hangul \else \captions@korean@hanja \fi \def\seename{$\rightarrow$}% \def\alsoname{$\Rightarrow$}% } \def\captions@korean@hangul{% \def\koreanTHEname{제}% \def\partname{편}% \def\chaptername{장}% \def\refname{참고문헌}% \def\abstractname{요약}% \def\bibname{참고문헌}% \def\prefacename{서문}% \def\appendixname{부록}% \def\contentsname{차례}% \def\listfigurename{그림 차례}% \def\listtablename{표 차례}% \def\indexname{찾아보기}% \def\figurename{그림}% \def\tablename{표}% \def\pagename{페이지}% \def\enclname{동봉}% \def\proofname{증명}% \def\headtoname{수신:}% \def\ccname{사본}% \def\glossaryname{용어집}% } \def\captions@korean@hanja{% \def\koreanTHEname{第}% \def\partname{篇}% \def\chaptername{章}% \def\refname{參考文獻}% \def\abstractname{要約}% \def\bibname{參考文獻}% \def\prefacename{序文}% \def\appendixname{附錄}% \def\contentsname{目次}% \def\listfigurename{圖版 目次}% \def\listtablename{表 目次}% \def\indexname{索引}% \def\figurename{圖版}% \def\tablename{表}% \def\pagename{面}% \def\enclname{同封}% \def\proofname{證明}% \def\headtoname{受信:}% \def\ccname{寫本}% \def\glossaryname{用語集}% } \def\korean@appendix@chapapp{\appendixname}% to exclude appendix \def\korean@headingsformat{% % change chapter and part headings \if@korean@swapheadings % With titlesec \@ifundefined{titleformat}{% % With KOMA \@ifundefined{sectionformat}{% % With memoir \@ifundefined{@memptsize}{% % With standard classes \@ifundefined{@makechapterhead}{}{% \let\xpg@save@chap@format\@makechapterhead \patchcmd{\@makechapterhead}% {\@chapapp\space \thechapter}% {% \ifx\@chapapp\korean@appendix@chapapp \appendixname\space \thechapter \else \koreanTHEname\space \thechapter\space \@chapapp \fi }% {}% {\xpg@warning{Failed to patch chapter for Korean}}% }% \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \ifpatchable{\@part}% {\partname\nobreakspace\thepart}% {\let\xpg@save@part@format\@part \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}% {}% {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for Korean}}}}% {}% }% (end \ifdefined\@part) }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}% {}% {\xpg@warning{Failed to patch part for Korean}}% }% (end not hyperref) }{% (\ifdefined\@memptsize) \@ifundefined{@makechapterhead}{}{% \let\xpg@save@chap@format\@makechapterhead \patchcmd{\@makechapterhead}% {\printchaptername \chapternamenum \printchapternum}% {% \ifx\@chapapp\korean@appendix@chapapp \printchaptername\relax\chapternamenum \printchapternum \else \printkoreanchapterthe \printchapternum\chapternamenum \printchaptername \fi }% {}% {\xpg@warning{Failed to patch chapter for Korean}}% \ifdefined\printkoreanchapterthe\else \def\printkoreanchapterthe{% \ifpatchable\printchaptername\@chapapp {\chapnamefont\koreanTHEname\chapternamenum}{}}% \fi }% \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part \patchcmd{\@part}% {\printpartname \partnamenum \printpartnum}% {\printkoreanpartthe \printpartnum\partnamenum \printpartname}% {}% {\xpg@warning{Failed to patch part for Korean}}% \ifdefined\printkoreanpartthe\else \def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}% \fi }% }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part \patchcmd{\NR@part}% {\printpartname \partnamenum \printpartnum}% {\printkoreanpartthe \printpartnum\partnamenum \printpartname}% {}% {\xpg@warning{Failed to patch part for Korean}}% \ifdefined\printkoreanpartthe\else \def\printkoreanpartthe{\partnamefont\koreanTHEname\partnamenum}% \fi }% }% (end \ifdefined\@memptsize) }{% (\ifdefined\sectionformat) \@ifundefined{partformat}{}{% \let\xpg@save@part@format\partformat \renewcommand*{\partformat}{\koreanTHEname~\thepart~\partname}% }% \@ifundefined{chapterformat}{}{% \let\xpg@save@chap@format\chapterformat \renewcommand*{\chapterformat}{\mbox{% \IfChapterUsesPrefixLine {% \ifx\@chapapp\korean@appendix@chapapp \chapapp\nobreakspace \thechapter\autodot \else \koreanTHEname\nobreakspace \thechapter\nobreakspace \chapapp\autodot \fi }% {\thechapter\autodot\enskip}% }}% }% }% (end \ifdefined\sectionformat) }{% (\ifdefined\titleformat) \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}% {}% {\xpg@warning{Failed to patch part for Korean}}% }% }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\koreanTHEname\nobreakspace \thepart\nobreakspace \partname}% {}% {\xpg@warning{Failed to patch part for Korean}}% }% \@ifundefined{chapter}{}{% \titleformat\chapter[display]% {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}% {% \ifx\@chapapp\korean@appendix@chapapp \appendixname\space \thechapter \else \koreanTHEname\space \thechapter\space \@chapapp \fi }{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}% }% }% (end \ifdefined\titleformat) \fi % (end \if@korean@swapheadings) % % Change running headers \if@korean@swapheaders \@ifundefined{chapterformat}{% \@ifundefined{@memptsize}{% % With standard classes \@ifundefined{chaptermark}{}{% \ifpatchable{\chaptermark}% {\@chapapp\ \thechapter}% {\let\xpg@save@chaptermark@format\chaptermark \patchcmd{\chaptermark}% {\@chapapp\ \thechapter}% {% \ifx\@chapapp\korean@appendix@chapapp \appendixname\ \thechapter \else \koreanTHEname\ \thechapter\ \@chapapp \fi }% {}% {\xpg@warning{Failed to patch chaptermark for Korean}}}% {}% }% (end \ifdefined\chaptermark) }{% (\ifdefined\@memptsize) % With memoir \let\xpg@save@chaptermark@format\chaptermark \patchcmd{\chaptermark}% {\@chapapp\ \@nameuse{thechapter}}% {% \ifx\@chapapp\korean@appendix@chapapp \appendixname\ \@nameuse{thechapter}% \else \koreanTHEname\ \@nameuse{thechapter}\ \@chapapp \fi }% {}% {\xpg@warning{Failed to patch chaptermark for Korean}}% }% (end \ifdefined\@memptsize) }{% (\ifdefined\chapterformat) % With KOMA \let\xpg@save@chaptermark@format\chaptermarkformat \renewcommand*\chaptermarkformat{% \IfChapterUsesPrefixLine {% \ifx\@chapapp\korean@appendix@chapapp \chapapp\ \thechapter\autodot \else \koreanTHEname\ \thechapter\ \chapapp\autodot \fi }% {\thechapter\autodot}% \enskip }% }% (end \ifdefined\chapterformat) \fi % (end \if@korean@swapheaders) } \def\nokorean@headingsformat{% % Reset chapter and part heading \@ifundefined{titleformat}{% \@ifundefined{sectionformat}{% % With memoir and standard classes \@ifundefined{xpg@save@part@format}{}{% \@ifundefined{NR@part}{% \let\@part\xpg@save@part@format }{% \let\NR@part\xpg@save@part@format }% }% \@ifundefined{xpg@save@chap@format}{}{% \let\@makechapterhead\xpg@save@chap@format }% }{% % With KOMA \@ifundefined{xpg@save@part@format}{}{% \let\partformat\xpg@save@part@format }% \@ifundefined{xpg@save@chap@format}{}{% \let\chapterformat\xpg@save@chap@format }% }% (end \ifdefined\sectionformat) }{% (\ifdefined\titleformat) % With titlesec \@ifundefined{xpg@save@part@format}{}{% \@ifundefined{NR@part}{% \let\@part\xpg@save@part@format }{% \let\NR@part\xpg@save@part@format }% }% \@ifundefined{chapter}{}{% \titleformat\chapter[display]% {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6}% {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit}% }% }% (end \ifdefined\titleformat) % % Reset headers \@ifundefined{chaptermarkformat}{% \@ifundefined{chaptermark}{}{% % With memoir and standard classes \@ifundefined{xpg@save@chaptermark@format}{}{% \let\chaptermark\xpg@save@chaptermark@format }% }% (end \ifdefined\chaptermark) }{% % With KOMA \@ifundefined{xpg@save@chaptermark@format}{}{% \let\chaptermarkformat\xpg@save@chaptermark@format }% }% (end \ifdefined\chapterformat) } \def\datekorean{% \ifcase\xpg@korean@captions\relax \def\today{\the\year 년 \the\month 월 \the\day 일}% \else \def\today{\the\year 年 \the\month 月 \the\day 日}% \fi } \def\koreanAlph#1{\expandafter\@koreanAlph\csname c@#1\endcsname} \def\@koreanAlph#1{% \ifcase#1\or 가\or 나\or 다\or 라\or 마\or 바\or 사\or 아\or 자\or 차\or 카\or 타\or 파\or 하\else\xpg@ill@value{#1}{@koreanAlph}\fi } \def\koreanalph#1{\expandafter\@koreanalph\csname c@#1\endcsname} \def\@koreanalph#1{% \ifcase#1\or ㄱ\or ㄴ\or ㄷ\or ㄹ\or ㅁ\or ㅂ\or ㅅ\or ㅇ\or ㅈ\or ㅊ\or ㅋ\or ㅌ\or ㅍ\or ㅎ\else\xpg@ill@value{#1}{@koreanalph}\fi } \def\korean@numbers{% \let\@alph\@koreanalph \let\@Alph\@koreanAlph } \def\nokorean@numbers{% \let\@alph\latin@alph \let\@Alph\latin@Alph } \let\nokorean@globalnumbers\nokorean@numbers \ifxetex \def\inlineextras@korean{% \ifcase\xpg@korean@variant\relax \XeTeXinterchartokenstate\z@ \XeTeXlinebreakpenalty 50 \or \setvariantkoreaninterchartoks \setvariantkoreancharclasses \def\XPGKOhalfdim{\dimexpr.5em\relax}% \XeTeXinterchartokenstate\@ne \XeTeXlinebreakpenalty \z@ \else \setvariantkoreaninterchartoks \setvariantkoreancharclasses \def\XPGKOhalfdim{\dimexpr.5\fontdimen\tw@\font\relax}% \XeTeXinterchartokenstate\@ne \XeTeXlinebreakpenalty 50 \fi \XeTeXlinebreakskip 0pt plus.05em minus .01em \XeTeXlinebreaklocale "ko" } \def\noextras@korean{% \ifcase\xpg@korean@variant\relax \else \unsetvariantkoreaninterchartoks \unsetvariantkoreancharclasses \fi \XeTeXinterchartokenstate\z@ \XeTeXlinebreakpenalty\z@ \XeTeXlinebreakskip\z@skip \XeTeXlinebreaklocale "" \noextras@korean@common } \else % luatex \def\inlineextras@korean{\xpg@attr@cjkspacing\xpg@korean@variant\relax} \def\noextras@korean{% \unsetattribute\xpg@attr@cjkspacing \noextras@korean@common } \fi \def\blockextras@korean{% \inlineextras@korean \korean@headingsformat } \def\noextras@korean@common{% \nokorean@headingsformat } \ifluatex % luatex \protected\def\inhibitglue{\hskip\z@skip} \ifdefined\newattribute\else \let\newattribute\newluatexattribute \let\unsetattribute\unsetluatexattribute \fi \newattribute\xpg@attr@cjkspacing \newattribute\xpg@attr@autojosa % user commands for Josa % Josa : particles in Korean grammar that immediately follow a noun or pronoun. % Josa might vary depending on previous character. \protected\def\rieul{\global\let\xpg@josa@zwang\@ne} \protected\def\jung {\global\let\xpg@josa@zwang\tw@} \protected\def\jong {\global\let\xpg@josa@zwang\thr@@} \protected\def\은{\begingroup\xpg@attr@autojosa\xpg@josa@zwang 은\endgroup\xpg@reset@josa} \let\는\은 \protected\def\을{\begingroup\xpg@attr@autojosa\xpg@josa@zwang 을\endgroup\xpg@reset@josa} \let\를\을 \protected\def\와{\begingroup\xpg@attr@autojosa\xpg@josa@zwang 와\endgroup\xpg@reset@josa} \let\과\와 \protected\def\가{\begingroup\xpg@attr@autojosa\xpg@josa@zwang 가\endgroup\xpg@reset@josa} \protected\def\이{\begingroup\xpg@attr@autojosa\xpg@josa@zwang 이\endgroup\xpg@reset@josa} \protected\def\라{\이 라} \protected\def\으{\begingroup\xpg@attr@autojosa\xpg@josa@zwang 으\endgroup\xpg@reset@josa} \protected\def\로{\으 로} \def\xpg@reset@josa {\global\let\xpg@josa@zwang\z@}\xpg@reset@josa % load lua file for korean \directlua{ require "polyglossia-cjk-spacing" } \endinput\fi % XeTeX % user commands for Josa \protected\def\jong {\global\let\XPGKO@let@josa=0}\jong \protected\def\rieul{\global\let\XPGKO@let@josa=1} \protected\def\jung {\global\let\XPGKO@let@josa=2} \protected\def\가{\xpg@make@josa 가이} \protected\def\이{\futurelet\@let@token\xpg@make@josa@I} \protected\def\은{\xpg@make@josa 는은} \let\는\은 \protected\def\을{\xpg@make@josa 를을} \let\를\을 \protected\def\와{\xpg@make@josa 와과} \let\과\와 \protected\def\으{\xpg@make@josa \empty 으} \protected\def\로{\으 로} \protected\def\라{\xpg@make@josa 라{이라}} \def\xpg@make@josa@II{\xpg@make@josa\relax 이} \def\xpg@make@josa@I{% \ifcat\@let@token\xpg@catcode@letter \expandafter\expandafter\expandafter\count@\expandafter \xpg@letter@to@num\meaning\@let@token\relax \ifnum 0\ifnum\count@>"ABFF \ifnum\count@<"D7A4 1\fi\fi>\z@ \expandafter\expandafter\expandafter\xpg@make@josa@II \else \expandafter\expandafter\expandafter\가 \fi \else \expandafter\가 \fi } \def\xpg@make@josa#1#2{% \ifcat\xpg@catcode@letter\XPGKO@let@josa \expandafter\expandafter\expandafter\count@\expandafter \xpg@letter@to@num\meaning\XPGKO@let@josa\relax \else\ifcat\xpg@catcode@other\XPGKO@let@josa \expandafter\expandafter\expandafter\count@\expandafter \xpg@character@to@num\meaning\XPGKO@let@josa\relax \fi\fi \ifnum\count@<"3260 \else\ifnum\count@<"3280 \advance\count@-"60 \else\ifnum\count@<"AC00 \else\ifnum\count@<"D7A4 % Hangul syllables \advance\count@-"AC00 \@tempcnta\count@ \divide\@tempcnta28 \multiply\@tempcnta28 \advance\count@-\@tempcnta \advance\count@"11A7 \else\ifnum\count@<"FF00 \else\ifnum\count@<"FF5B \advance\count@-"FEE0 \fi\fi\fi\fi\fi \fi \ifnum\count@<"11A8 \ifnum "30=\count@ \count@\z@ % 0 \else\ifnum "31=\count@ \count@\@ne % 1 \else\ifnum "33=\count@ \count@\z@ % 3 \else\ifnum "36=\count@ \count@\z@ % 6 \else\ifnum "37=\count@ \count@\@ne % 7 \else\ifnum "38=\count@ \count@\@ne % 8 \else\ifnum "4C=\count@ \count@\@ne % L \else\ifnum "4D=\count@ \count@\z@ % M \else\ifnum "4E=\count@ \count@\z@ % N \else\ifnum "6C=\count@ \count@\@ne % l \else\ifnum "6D=\count@ \count@\z@ % m \else\ifnum "6E=\count@ \count@\z@ % n \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi \else\ifnum\count@<"1200 \ifnum\count@="11AF \count@\@ne \else \count@\z@ \fi \else\ifnum\count@<"3131 \else\ifnum\count@<"318F \ifnum \count@="3139 \count@\@ne \else\ifnum\count@<"314F \count@\z@ \else\ifnum\count@>"3164 \ifnum\count@<"3187 \count@\z@ \fi \fi\fi\fi \else\ifnum\count@<"3200 \else\ifnum\count@<"321F \ifnum \count@="3203 \count@\@ne \else\ifnum\count@<"320E \count@\z@ \fi\fi \else\ifnum\count@<"D7CB \else\ifnum\count@<"D7FC \count@\z@ \fi\fi\fi\fi\fi \fi\fi\fi \ifcase\count@ #2% jong \or \ifx#1\empty\else#2\fi% rieul \else #1% jung \fi } \expandafter\def\expandafter\xpg@character@to@num\detokenize{the character} #1#2\relax{`#1\relax} \expandafter\def\expandafter\xpg@letter@to@num\detokenize{the letter} #1#2\relax{`#1\relax} \begingroup \catcode`A=11 \catcode`0=12 \global\let\xpg@catcode@letter=A \global\let\xpg@catcode@other=0 \endgroup % macros for interchartoks (Josa selection) \def\XPGKOstartID{\global\futurelet\XPGKO@let@josa\XPGKO@skipID} \def\XPGKOstartAA{\global\futurelet\XPGKO@let@josa\XPGKO@skipAA} \def\XPGKO@skipID{\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassID{\empty}} \def\XPGKO@skipAA{\XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassAA{\empty}} \def\XPGKOstopID {% \XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassID{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOhalfhalf \or \unkern\unkern \XPGKOquarterquarter \or \unkern\unkern \XPGKOhalfzero \fi \fi \XPGKOstartID}} \def\XPGKOstopAA {% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassAA{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOhalfhalf \or \unkern\unkern \XPGKOquarterquarter \or \unkern\unkern \XPGKOhalfzero \fi \fi \XPGKOstartAA}} % macros for interchartoks (CJK punctuations) \def\XPGKOstartOP#1{\leavevmode \hbox to.5em\bgroup\hss\XeTeXinterchartokenstate\z@ #1\egroup \kern-6sp \kern6sp } \def\XPGKOstartCL#1{\leavevmode \hbox to.5em\bgroup\XeTeXinterchartokenstate\z@ #1\hss\egroup \kern-7sp \kern7sp } \def\XPGKOstartMD#1{\leavevmode \hbox to.5em\bgroup\hss\XeTeXinterchartokenstate\z@ #1\hss\egroup \kern-8sp \kern8sp } \def\XPGKOstartFS#1{\leavevmode \hbox to.5em\bgroup\XeTeXinterchartokenstate\z@ #1\hss\egroup \kern-9sp \kern9sp } \let\XPGKOnobreak \nobreak \def\XPGKOhalfzero {\hskip \XPGKOhalfdim \relax}% \def\XPGKOhalfhalf {\hskip \XPGKOhalfdim minus \XPGKOhalfdim \relax}% \def\XPGKOhalfquarter {\hskip \XPGKOhalfdim minus.5\XPGKOhalfdim \relax}% \def\XPGKOquarterquarter {\hskip .5\XPGKOhalfdim minus.5\XPGKOhalfdim \relax}% \def\XPGKOiiiquarterquarter{\hskip1.5\XPGKOhalfdim minus.5\XPGKOhalfdim \relax}% \def\XPGKOlatincjk {\hskip .5\XPGKOhalfdim plus.25\XPGKOhalfdim minus.125\XPGKOhalfdim}% % user macro to force zero skip \let\inhibitglue\relax % initialize interchartoks and classes \ifdim\the\XeTeXversion\XeTeXrevision pt<0.99994pt \let\XeTeXcharclassIgnore \@cclvi \let\XeTeXcharclassBoundary\@cclv \else \chardef\XeTeXcharclassIgnore =4096 \chardef\XeTeXcharclassBoundary=4095 \fi \ifdefined\XeTeXcharclassID\else \ifdefined\xtxHanGlue \let\XeTeXcharclassID\@ne \let\XeTeXcharclassOP\tw@ \let\XeTeXcharclassCL\thr@@ \else % email from JW \newXeTeXintercharclass\XeTeXcharclassID \newXeTeXintercharclass\XeTeXcharclassOP \newXeTeXintercharclass\XeTeXcharclassCL \global\let\XeTeXcharclassCJ\XeTeXcharclassID \global\let\XeTeXcharclassEX\XeTeXcharclassCL \global\let\XeTeXcharclassIS\XeTeXcharclassCL \global\let\XeTeXcharclassNS\XeTeXcharclassCL \global\let\XeTeXcharclassCM\XeTeXcharclassIgnore \input load-unicode-xetex-classes % \fi \fi % assign Hangul \count@="AC00 \loop \XeTeXcharclass\count@\XeTeXcharclassID \ifnum\count@<"D7A3 \advance\count@\@ne \repeat \count@="1100 \loop \XeTeXcharclass\count@\XeTeXcharclassID \ifnum\count@<"11FF \advance\count@\@ne \repeat \count@="A960 \loop \XeTeXcharclass\count@\XeTeXcharclassID \ifnum\count@<"A97C \advance\count@\@ne \repeat \count@="D7B0 \loop \XeTeXcharclass\count@\XeTeXcharclassID \ifnum\count@<"D7FB \advance\count@\@ne \repeat % more classes \newXeTeXintercharclass\XPGKOcharclassMD % ・ : ; \newXeTeXintercharclass\XPGKOcharclassFS % 。 . \newXeTeXintercharclass\XPGKOcharclassLD % ― … ‥ \newXeTeXintercharclass\XPGKOcharclassEX % ? ! \newXeTeXintercharclass\XPGKOcharclassAO % ascii ( \newXeTeXintercharclass\XPGKOcharclassAC % ascii ) \newXeTeXintercharclass\XPGKOcharclassAA % ascii letters/numbers % unset all interchartoks \def\unsetvariantkoreaninterchartoks{% \@tfor\@tmpa :=\XeTeXcharclassID\XeTeXcharclassOP\XeTeXcharclassCL\XPGKOcharclassMD\XPGKOcharclassFS \XPGKOcharclassLD\XPGKOcharclassEX\XPGKOcharclassAO\XPGKOcharclassAC\XPGKOcharclassAA \do{\count@\XeTeXcharclassBoundary \loop \XeTeXinterchartoks\@tmpa\count@{}% \XeTeXinterchartoks\count@\@tmpa{}% \ifnum\count@=\XeTeXcharclassBoundary \count@\m@ne \fi \ifnum\count@<\xe@alloc@intercharclass \advance\count@\@ne \repeat }% } % interchartoks for classic/modern variants \def\setvariantkoreaninterchartoks{% \count@\XeTeXcharclassBoundary \loop \ifnum\count@=\XeTeXcharclassID\else \ifnum\count@=\XeTeXcharclassOP\else \ifnum\count@=\XeTeXcharclassCL\else \ifnum\count@=\XPGKOcharclassMD\else \ifnum\count@=\XPGKOcharclassFS\else \ifnum\count@=\XPGKOcharclassAA\else \XeTeXinterchartoks\count@\XeTeXcharclassID{\XPGKOstartID}% \XeTeXinterchartoks\count@\XeTeXcharclassOP{\XPGKOstartOP}% \XeTeXinterchartoks\count@\XeTeXcharclassCL{\XPGKOstartCL}% \XeTeXinterchartoks\count@\XPGKOcharclassMD{\XPGKOstartMD}% \XeTeXinterchartoks\count@\XPGKOcharclassFS{\XPGKOstartFS}% \XeTeXinterchartoks\count@\XPGKOcharclassAA{\XPGKOstartAA}% \XeTeXinterchartoks\XeTeXcharclassID\count@{\XPGKOstopID}% \XeTeXinterchartoks\XPGKOcharclassAA\count@{\XPGKOstopAA}% \fi\fi\fi\fi\fi\fi \ifnum\count@=\XeTeXcharclassBoundary \count@\m@ne \fi \ifnum\count@<\xe@alloc@intercharclass \advance\count@\@ne \repeat % \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassID{\XPGKOstopAA\XPGKOlatincjk\XPGKOstartID}% \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassOP{\XPGKOstopAA\XPGKOhalfhalf\XPGKOstartOP}% \XeTeXinterchartoks\XPGKOcharclassAA\XeTeXcharclassCL{\XPGKOstopAA\XPGKOstartCL}% \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassMD{\XPGKOstopAA\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassFS{\XPGKOstopAA\XPGKOstartFS}% \XeTeXinterchartoks\XPGKOcharclassAA\XPGKOcharclassAA{\XPGKOstartAA}% % \XeTeXinterchartoks\XeTeXcharclassID\XeTeXcharclassID{\XPGKOstartID}% \XeTeXinterchartoks\XeTeXcharclassID\XeTeXcharclassOP{\XPGKOstopID\XPGKOhalfhalf\XPGKOstartOP}% \XeTeXinterchartoks\XeTeXcharclassID\XeTeXcharclassCL{\XPGKOstopID\XPGKOstartCL}% \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassMD{\XPGKOstopID\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassFS{\XPGKOstopID\XPGKOstartFS}% \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAO{\XPGKOstopID\XPGKOlatincjk}% \XeTeXinterchartoks\XeTeXcharclassID\XPGKOcharclassAA{\XPGKOstopID\XPGKOlatincjk\XPGKOstartAA}% % \XPGKOstopID \XPGKOstopAA \XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassOP{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOhalfhalf \or \unkern\unkern \XPGKOquarterquarter \or \unkern\unkern \XPGKOhalfzero \fi \fi \XPGKOstartOP}% \XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassCL{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \fi \fi \XPGKOstartCL}% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassMD{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \XPGKOnobreak\XPGKOhalfquarter \or \unkern\unkern \XPGKOnobreak\XPGKOiiiquarterquarter \fi \fi \XPGKOstartMD}% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassFS{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \fi \fi \XPGKOstartFS}% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassLD{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOnobreak\XPGKOhalfhalf \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \XPGKOnobreak\XPGKOhalfzero \fi \fi }% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassEX{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOnobreak\XPGKOhalfhalf \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \XPGKOnobreak\XPGKOhalfzero \fi \fi }% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassAO{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOhalfhalf \or \unkern\unkern \XPGKOquarterquarter \or \unkern\unkern \XPGKOhalfzero \fi \fi }% \XeTeXinterchartoks\XeTeXcharclassBoundary\XPGKOcharclassAC{% \ifnum\lastnodetype=12 % \ifcase\lastkern \or \or \or \or \or \or \unkern\unkern \or \unkern\unkern \XPGKOnobreak\XPGKOhalfhalf \or \unkern\unkern \XPGKOnobreak\XPGKOquarterquarter \or \unkern\unkern \XPGKOnobreak\XPGKOhalfzero \fi \fi }% % \XeTeXinterchartoks\XPGKOcharclassLD\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}% \XeTeXinterchartoks\XPGKOcharclassLD\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% % \XeTeXinterchartoks\XPGKOcharclassEX\XeTeXcharclassID{\XPGKOhalfhalf\XPGKOstartID}% \XeTeXinterchartoks\XPGKOcharclassEX\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}% \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAO{\XPGKOhalfhalf}% \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAC{\XPGKOnobreak\XPGKOhalfhalf}% \XeTeXinterchartoks\XPGKOcharclassEX\XPGKOcharclassAA{\XPGKOhalfhalf\XPGKOstartAA}% % \XeTeXinterchartoks\XPGKOcharclassAO\XeTeXcharclassOP{\XPGKOnobreak\XPGKOhalfhalf\XPGKOstartOP}% \XeTeXinterchartoks\XPGKOcharclassAO\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% % \XeTeXinterchartoks\XPGKOcharclassAC\XeTeXcharclassID{\XPGKOlatincjk\XPGKOstartID}% \XeTeXinterchartoks\XPGKOcharclassAC\XeTeXcharclassOP{\XPGKOhalfhalf\XPGKOstartOP}% \XeTeXinterchartoks\XPGKOcharclassAC\XPGKOcharclassMD{\XPGKOnobreak\XPGKOquarterquarter\XPGKOstartMD}% } % char classes for classic/modern variants \def\setvariantkoreancharclasses{} \def\unsetvariantkoreancharclasses{} \def\@tmpa#1=#2{% \edef\setvariantkoreancharclasses{% \unexpanded\expandafter{\setvariantkoreancharclasses \XeTeXcharclass#1=#2}}% \edef\unsetvariantkoreancharclasses{% \noexpand\XeTeXcharclass#1=\the\XeTeXcharclass#1\relax \unexpanded\expandafter{\unsetvariantkoreancharclasses}}% } \count@"30 \loop % 0 .. 9 \expandafter\@tmpa\the\count@=\XPGKOcharclassAA \ifnum\count@<"39 \advance\count@\@ne \repeat \count@"41 \loop % A .. Z \expandafter\@tmpa\the\count@=\XPGKOcharclassAA \ifnum\count@<"5A \advance\count@\@ne \repeat \count@"61 \loop % a .. z \expandafter\@tmpa\the\count@=\XPGKOcharclassAA \ifnum\count@<"7A \advance\count@\@ne \repeat % NS \@tmpa "3005=\XeTeXcharclassID % 々 IDEOGRAPHIC ITERATION MARK \@tmpa "301C=\XeTeXcharclassID % 〜 WAVE DASH \@tmpa "303B=\XeTeXcharclassID % 〻 VERTICAL IDEOGRAPHIC ITERATION MARK \@tmpa "303C=\XeTeXcharclassID % 〼 MASU MARK \@tmpa "309B=\XeTeXcharclassID % ゛ KATAKANA-HIRAGANA VOICED SOUND MARK \@tmpa "309C=\XeTeXcharclassID % ゜ KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK \@tmpa "309D=\XeTeXcharclassID % ゝ HIRAGANA ITERATION MARK \@tmpa "309E=\XeTeXcharclassID % ゞ HIRAGANA VOICED ITERATION MARK \@tmpa "30A0=\XeTeXcharclassID % ゠ KATAKANA-HIRAGANA DOUBLE HYPHEN \@tmpa "30FD=\XeTeXcharclassID % ヽ KATAKANA ITERATION MARK \@tmpa "30FE=\XeTeXcharclassID % ヾ KATAKANA VOICED ITERATION MARK \@tmpa "A015=\XeTeXcharclassID % ꀕ YI SYLLABLE ITERATION MARK \@tmpa "FF9E=\XeTeXcharclassID % ゙ HALFWIDTH KATAKANA VOICED SOUND MARK \@tmpa "FF9F=\XeTeXcharclassID % ゚ HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK % IS \@tmpa "FE13=\XeTeXcharclassID % ︓ PRESENTATION FORM FOR VERTICAL COLON \@tmpa "FE14=\XeTeXcharclassID % ︔ PRESENTATION FORM FOR VERTICAL SEMICOLON % CJ \ifnum\the\XeTeXcharclass"3041=\XeTeXcharclassID \else \@tmpa "3041=\XeTeXcharclassID % ぁ HIRAGANA LETTER SMALL A \@tmpa "3043=\XeTeXcharclassID % ぃ HIRAGANA LETTER SMALL I \@tmpa "3045=\XeTeXcharclassID % ぅ HIRAGANA LETTER SMALL U \@tmpa "3047=\XeTeXcharclassID % ぇ HIRAGANA LETTER SMALL E \@tmpa "3049=\XeTeXcharclassID % ぉ HIRAGANA LETTER SMALL O \@tmpa "3063=\XeTeXcharclassID % っ HIRAGANA LETTER SMALL TU \@tmpa "3083=\XeTeXcharclassID % ゃ HIRAGANA LETTER SMALL YA \@tmpa "3085=\XeTeXcharclassID % ゅ HIRAGANA LETTER SMALL YU \@tmpa "3087=\XeTeXcharclassID % ょ HIRAGANA LETTER SMALL YO \@tmpa "308E=\XeTeXcharclassID % ゎ HIRAGANA LETTER SMALL WA \@tmpa "3095=\XeTeXcharclassID % ゕ HIRAGANA LETTER SMALL KA \@tmpa "3096=\XeTeXcharclassID % ゖ HIRAGANA LETTER SMALL KE \@tmpa "30A1=\XeTeXcharclassID % ァ KATAKANA LETTER SMALL A \@tmpa "30A3=\XeTeXcharclassID % ィ KATAKANA LETTER SMALL I \@tmpa "30A5=\XeTeXcharclassID % ゥ KATAKANA LETTER SMALL U \@tmpa "30A7=\XeTeXcharclassID % ェ KATAKANA LETTER SMALL E \@tmpa "30A9=\XeTeXcharclassID % ォ KATAKANA LETTER SMALL O \@tmpa "30C3=\XeTeXcharclassID % ッ KATAKANA LETTER SMALL TU \@tmpa "30E3=\XeTeXcharclassID % ャ KATAKANA LETTER SMALL YA \@tmpa "30E5=\XeTeXcharclassID % ュ KATAKANA LETTER SMALL YU \@tmpa "30E7=\XeTeXcharclassID % ョ KATAKANA LETTER SMALL YO \@tmpa "30EE=\XeTeXcharclassID % ヮ KATAKANA LETTER SMALL WA \@tmpa "30F5=\XeTeXcharclassID % ヵ KATAKANA LETTER SMALL KA \@tmpa "30F6=\XeTeXcharclassID % ヶ KATAKANA LETTER SMALL KE \@tmpa "30FC=\XeTeXcharclassID % ー KATAKANA-HIRAGANA PROLONGED SOUND MARK \count@"31F0 \loop \expandafter\@tmpa\the\count@=\XeTeXcharclassID \ifnum\count@<"31FF \advance\count@\@ne \repeat \count@"FF67 \loop \expandafter\@tmpa\the\count@=\XeTeXcharclassID \ifnum\count@<"FF70 \advance\count@\@ne \repeat \fi % \@tmpa "28=\XPGKOcharclassAO % ( LEFT PARENTHESIS \@tmpa "5B=\XPGKOcharclassAO % [ LEFT SQUARE BRACKET \@tmpa "60=\XPGKOcharclassAO % ` GRAVE ACCENT \@tmpa "7B=\XPGKOcharclassAO % { LEFT CURLY BRACKET \@tmpa "AB=\XPGKOcharclassAO % « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK % \@tmpa "21=\XPGKOcharclassAC % ! EXCLAMATION MARK \@tmpa "27=\XPGKOcharclassAC % ' APOSTROPHE \@tmpa "29=\XPGKOcharclassAC % ) RIGHT PARENTHESIS \@tmpa "2C=\XPGKOcharclassAC % , COMMA \@tmpa "2E=\XPGKOcharclassAC % . FULL STOP \@tmpa "3B=\XPGKOcharclassAC % ; SEMICOLON \@tmpa "3F=\XPGKOcharclassAC % ? QUESTION MARK \@tmpa "5D=\XPGKOcharclassAC % ] RIGHT SQUARE BRACKET \@tmpa "7D=\XPGKOcharclassAC % } RIGHT CURLY BRACKET \@tmpa "BB=\XPGKOcharclassAC % » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK % \@tmpa "2018=\XeTeXcharclassOP % ‘ LEFT SINGLE QUOTATION MARK \@tmpa "201C=\XeTeXcharclassOP % “ LEFT DOUBLE QUOTATION MARK % \@tmpa "2019=\XeTeXcharclassCL % ’ RIGHT SINGLE QUOTATION MARK \@tmpa "201D=\XeTeXcharclassCL % ” RIGHT DOUBLE QUOTATION MARK % NS \@tmpa "00B7=\XPGKOcharclassMD % · MIDDLE DOT \@tmpa "30FB=\XPGKOcharclassMD % ・ KATAKANA MIDDLE DOT \@tmpa "FE54=\XPGKOcharclassMD % ﹔ SMALL SEMICOLON \@tmpa "FE55=\XPGKOcharclassMD % ﹕ SMALL COLON \@tmpa "FF1A=\XPGKOcharclassMD % : FULLWIDTH COLON \@tmpa "FF1B=\XPGKOcharclassMD % ; FULLWIDTH SEMICOLON \@tmpa "FF65=\XPGKOcharclassMD % ・ HALFWIDTH KATAKANA MIDDLE DOT % \@tmpa "3002=\XPGKOcharclassFS % 。 IDEOGRAPHIC FULL STOP \@tmpa "FE12=\XPGKOcharclassFS % ︒ PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC FULL STOP \@tmpa "FE52=\XPGKOcharclassFS % ﹒ SMALL FULL STOP \@tmpa "FF0E=\XPGKOcharclassFS % . FULLWIDTH FULL STOP \@tmpa "FF61=\XPGKOcharclassFS % 。 HALFWIDTH IDEOGRAPHIC FULL STOP % \@tmpa "2014=\XPGKOcharclassLD % — EM DASH \@tmpa "2015=\XPGKOcharclassLD % ― HORIZONTAL BAR \@tmpa "2025=\XPGKOcharclassLD % ‥ TWO DOT LEADER \@tmpa "2026=\XPGKOcharclassLD % … HORIZONTAL ELLIPSIS % EX \@tmpa "FE15=\XPGKOcharclassEX % ︕ PRESENTATION FORM FOR VERTICAL EXCLAMATION MARK \@tmpa "FE16=\XPGKOcharclassEX % ︖ PRESENTATION FORM FOR VERTICAL QUESTION MARK \@tmpa "FE56=\XPGKOcharclassEX % ﹖ SMALL QUESTION MARK \@tmpa "FE57=\XPGKOcharclassEX % ﹗ SMALL EXCLAMATION MARK \@tmpa "FF01=\XPGKOcharclassEX % ! FULLWIDTH EXCLAMATION MARK \@tmpa "FF1F=\XPGKOcharclassEX % ? FULLWIDTH QUESTION MARK % vim:ft=tex:tw=0:sw=4:ts=4:expandtab