texlive[58565] branches/branch2020.0/Master/texmf-dist: xetexko

commits+karl at tug.org commits+karl at tug.org
Sat Mar 20 23:20:43 CET 2021


Revision: 58565
          http://tug.org/svn/texlive?view=revision&revision=58565
Author:   karl
Date:     2021-03-20 23:20:42 +0100 (Sat, 20 Mar 2021)
Log Message:
-----------
xetexko (20mar21) (branch)

Modified Paths:
--------------
    branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
    branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/README
    branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf
    branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
    branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
    branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty
    branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty
    branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty
    branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty
    branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty

Modified: branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
===================================================================
--- branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/ChangeLog	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/ChangeLog	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,3 +1,32 @@
+2021-03-20      Dohyun Kim <nomos at ktug org>
+
+	Version 3.0
+
+	* Everything is integrated into xetexko.sty. So
+	  xetexko-font.sty, xetexko-space.sty, xetexko-vertical.sty,
+	  xetexko-hanging.sty are now almost empty and provided for
+	  backward compatibility only.
+	* New evironemt 'typesetclassic' is provided for typesetting
+	  classical texts, but almost identical to 'japanese' or
+	  'chinese' environments of previous version. These latters
+	  are kept for backward compatibility.
+	* New command \removeclassicspaces is provided.
+	* Following Hangul font options do not work any longer, but
+	  no error will be raised though :
+	  lowerexclamation, lowerperiod, lowercomma, lowerquestion,
+	  postexclamationkern, postmathskip, postperiodkern,
+	  postcommakern, postquestionkern, preexclamationkern,
+	  preperiodkern, precommakern, prequestionkern, quoteraise,
+	  quotewidth, PunctRaise.
+	* \latinnums and \latinquotes have the same effects as
+	  \latinalphs and \latinparens, repectively.
+	* \defaulthangulfontfeatures is deprecated.
+	* \disableautojosa and \disablejamoautojosa are deprecated.
+	* When lmtt is ttdefault, the metrics of default Hangul
+	  monospaced font are matched with those of lmtt.
+	* \disablehangulspacing will not remove \penalty50 between
+	  Hangul characters.
+
 2020-02-17      Dohyun Kim <nomos at ktug org>
 
 	Version 2.23

Modified: branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/README
===================================================================
--- branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/README	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/README	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,4 +1,4 @@
-XeTeX-ko Package version 2.23 (2020/02/17)
+XeTeX-ko Package version 3.0 (2021/03/20)
 =========================================
 
 XeTeX-ko is a macro package for Xe(La)TeX which supports typesetting
@@ -111,12 +111,10 @@
     [InterHangul=<dimen>]
 Set spacing between Hangul characters.
 
-    [PunctRaise=<dimen>]
-Raise Latin fullstop after Hangul character.
+    [CharRaise=<dimen>]
+Raise the baseline of Hangul/Hanja characters.
 
-See xetexko-doc.pdf for more options.
 
-
 Other User Commands
 -------------------
 

Modified: branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf
===================================================================
(Binary files differ)

Modified: branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
===================================================================
--- branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex	2021-03-20 22:20:42 UTC (rev 58565)
@@ -7,12 +7,13 @@
 \documentclass[a4paper]{article}
 \usepackage[hmargin=3.8cm]{geometry}
 \usepackage[hangul]{xetexko}
-\defaultfontfeatures+{Script=Hangul, Language=Korean}
 \setmainhangulfont{Noto Serif CJK KR}[
   UprightFont=* Light, BoldFont=* Bold,
+  Script=Hangul, Language=Korean, AutoFakeSlant,
 ]
 \setsanshangulfont{Noto Sans CJK KR}[
   UprightFont=* DemiLight,
+  Script=Hangul, Language=Korean
 ]
 \setmathhangulfont{Noto Sans CJK KR}[
   SizeFeatures={
@@ -20,8 +21,9 @@
     {Size=6-9, Font=*},
     {Size=9-,  Font=* DemiLight},
   },
+  Script=Hangul, Language=Korean
 ]
-\usepackage{xetexko-hanging, hologo, xcolor, ulem}
+\usepackage{hologo, xcolor, ulem}
 \usepackage[bookmarksnumbered,hidelinks]{hyperref}
 
 \edef\verbatim{\unexpanded\expandafter{\verbatim
@@ -58,64 +60,24 @@
 \def\cs#1{\texttt{\textbackslash #1}}
 \def\hemph#1{\textsf{\bfseries #1}}
 \def\hparen#1{{\small\hangulparens(#1)}}
-\def\hparens#1{\leavevmode\unskip---{\small #1}---\ignorespaces}
+\let\hparens\hparen
 \def\keyword#1{\leavevmode\marginpar{\hfuzz\maxdimen\footnotesize\cs{#1}}}
+\def\vernote#1{\leavevmode\marginpar{\hfuzz\maxdimen\footnotesize{\color{red}☜ v#1}}}
 
+\hangingpunctuations
+
 \begin{document}
 \title{\xetexko\ 간단 매뉴얼}
 \author{Dohyun Kim \normalsize <\texttt{nomos at ktug org}> \and
   \normalsize <\url{http://github.com/dohyunkim/xetexko}>}
-\date{Version 2.23\quad 2020/02/17}
+\date{Version 3.0\quad 2021/03/20}
 \maketitle
 
 \begin{quote}\small
   For a summary introduction in English,
   please see \verb+README+ file in this package.
-
-  \begin{itemize}\itemsep=0pt\linespread{1.2}\selectfont
-    \item[v2.0]---
-    \item \hyperref[sec:loading]
-      {플레인텍에서 xetexko.tex이 아니라 xetexko.sty를 불러야 한다.}
-    \item \hyperref[sec:symbolfont]
-      {CJK 기호문자를 \hparen{한자가 아니라} 한글 글꼴에서 찾는 것이
-      기본값이 되었다.}
-    \item \hyperref[sec:fontopts]
-      {\texttt{interpunctskern} 글꼴 옵션을 없애고 \texttt{quoteraise}를
-      추가했다.}
-    \item[v2.2]---
-    \item \hyperref[sec:fontopts]
-      {글꼴 옵션 \texttt{CharRaise}를 추가했다.}
-    \item \hyperref[sec:fontcmds]
-      {\cs{fallbackhanjafont} 명령을 인식한다.}
-    \item \hyperref[sec:etccmds]
-      {\cs{everyhangul}, \cs{everyhanja} 명령이 추가되었다.}
-    \item \hyperref[sec:symbolfont]
-      {하이픈 문자를 \hparen{직전 글꼴이 아니라} 라틴 글꼴에서 찾는
-      것이 기본값이 되었다.}
-    \item[v2.4]---
-    \item Variation Selector를 이용한 한자 변형 글리프 접근을 허용한다.
-    \item[v2.7]---
-    \item \hyperref[sec:fontcmds]
-      {main/sans hangul/hanja 글꼴에는 디폴트 옵션
-      \texttt{Ligatures=TeX}이 주어진다.}
-    \item \hyperref[sec:fontopts]
-      {\cs{defaulthangulfontfeatures}와 \cs{defaulthanjafontfeatures}
-      명령이 생겼다.}
-    \item[v2.10]---
-    \item 패키지 옵션 \texttt{[unfonts]}를 더는 지원하지 않는다. 이 옵션을
-      사용한 기존 문서는 기본 글꼴인 은글꼴 트루타입으로 식자될 것이다.
-    \item[v2.13]---
-    \item \hyperref[sec:verttype]
-      {\texttt{horizontal} 환경이 추가되었다.}
-    \item[v2.23]---
-    \item \hyperref[sec:fontcmds]
-      {디폴트 한글 폰트가 나눔글꼴에서 은글꼴로 변경되었다.}
-
-  \end{itemize}
 \end{quote}
 
-\smallskip
-
 \section{입력 인코딩}
 입력은 원칙적으로 UTF-8으로 한다.
 BOM (Byte Order Mark)은 있어도 좋고 없어도 좋다.
@@ -176,14 +138,14 @@
 main/sans hangul/hanja 폰트에는 따로 \verb|Ligatures=TeX| 옵션을 지시하지
 않더라도 자동으로 주어진다.
 
-한글폰트를 따로 지정하지 않으면 영문폰트가 한글에도 사용된다.
-한자폰트를 따로 지정하지 않으면 한글폰트가 한자에도 적용된다.
-\LaTeX 에서는 영문폰트에 한글·한자 글리프가 없고 한글·한자 폰트도 따로
+\hemph{프리앰블}에서 한글 폰트를 지정하지 않으면 영문폰트가 한글에도 적용되고
+한자폰트를 지정하지 않으면 한글폰트가 한자에도 적용된다.
+영문폰트에 한글·한자 글리프가 없고 한글·한자 폰트도 따로
 지시하지 않았다면 \hemph{은바탕/은돋움 트루타입}을 한글·한자 글꼴의 기본값으로
 사용한다.
 
 \begin{plaintex}
-플레인텍이라면 다음처럼 한다.
+플레인텍에서도 기본값으로 은바탕을 한글에 사용한다. 한글폰트를 지시하는 방법은 다음과 같다.
 \begin{verbatim}
     \font\tenrm="[lmroman10-regular]:mapping=tex-text" at 10pt
     \hangulfont="[UnBatang]:mapping=tex-text" at 10pt
@@ -193,7 +155,7 @@
 
 \keyword{fallbackhanjafont}%
 \cs{fallbackhanjafont}를 정의해두면 \hemph{한자 글꼴에도 없는 한자}를
-이 글꼴에서 찾아 식자한다. \verb|\newfontfamily| 명령 등으로 정의한다.
+이 글꼴에서 찾아 식자한다. \cs{newfontfamily} 명령 등으로 정의한다.
 
 \section{글꼴 명령 (계속)}
 \begin{verbatim}
@@ -209,13 +171,13 @@
   \newhangulfontface  \myhangul{NanumGothic Bold}[Ligatures=TeX]
   \newhanjafontface   \myhanja {UnDotumBold}[Ligatures=TeX]
 \end{verbatim}
-fontspec 패키지의 \verb+\setfontfamily+ \verb+\newfontface+ 명령에 해당한다.
+fontspec 패키지의 \cs{setfontfamily} \cs{setfontface} 명령에 해당한다.
 
 \begin{verbatim}
   \addhangulfontfeature{Color=FF0000,InterHangul=-.1em}
   \addhanjafontfeature {Color=00FF00}
 \end{verbatim}
-fontspec의 \verb+\addfontfeature+ 명령을 구현한 것이다.
+fontspec의 \cs{addfontfeature} 명령을 구현한 것이다.
 fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
 
 참고로, 한자와 한글을 같은 글꼴로 식자하고 싶을 때 글꼴 설정을
@@ -222,18 +184,17 @@
 번거롭게 두 번 할 필요 없이 한글 글꼴만 설정한 뒤 간단히
 \keyword{hanjabyhangulfont}%
 \cs{hanjabyhangulfont}를 선언하면 된다.%
-\footnote{앞 절의 main/sans 글꼴 명령들과 달리 한글 폰트가 자동으로
-  한자에도 적용되지 않는다는 말이다. 어쨌든 이미 한자 폰트가 지정돼 있는
-  상태이기 때문이다.}
+\footnote{프리앰블의 main/sans/mono 글꼴 명령들과 달리 새로 지정한 한글 폰트가
+  한자에도 자동으로 적용되지는 않는다는 말이다.}
 
 
 \section{기호 글꼴 명령}\label{sec:symbolfont}
 라틴 문자나 CJK 기호를 어떤 폰트로 식자할 것인가를 사용자가 지정할 수 있다.
 \begin{verbatim}
-  \xetexkofontregime{hangul}[quotes=latin, puncts=prevfont]
+  \xetexkofontregime{hangul}[parens=latin, puncts=prevfont]
 \end{verbatim}
 모든 라틴 문자와 CJK 기호들을 원칙적으로 한글 폰트로 식자하되,
-따옴표는 라틴 폰트로 찍고 마침표 따위는 현재 폰트를 따라간다는 의미이다.
+괄호류는 라틴 폰트로 찍고 마침표 따위는 현재 폰트를 따라간다는 의미이다.
 명령의 인자에는 latin, hangul, hanja, prevfont 중 하나가 올 수 있어서
 각각 라틴 폰트, 한글 폰트, 한자 폰트로 식자하라는 뜻이며
 마지막의 prevfont는 \hemph{현재 활성화된 폰트를 그대로 이어받도록} 지시한다.
@@ -242,17 +203,20 @@
 옵션 키의 종류와 의미는 다음과 같으며 각 키 값은 인자의 경우와 같다.
 \begin{description}\itemsep0pt\hangulparens
 \item[alphs] 라틴 알파벳 및 아래에 해당하지 않는 모든 라틴 문자
-\item[nums] 라틴 숫자 \hparen{수식 제외}
 \item[parens] 라틴 괄호, 중괄호, 대괄호, 꺽쇠
-\item[quotes] accent grave, apostrophy 및 이들의 리거쳐
 \item[colons] 라틴 콜론, 세미콜론, endash, emdash
 \item[hyphens] 하이픈, 하이픈으로 이루어지는 리거쳐, 슬래시
 \item[puncts] 마침표, 물음표, 느낌표, 쉼표
 \item[cjksymbols] CJK 구두점, 괄호 및 상징기호
 \end{description}
-기본값은 다음 명령을 준 것과 동일하다. \hemph{CJK 기호가 한글폰트}로,
-\hemph{하이픈은 라틴폰트}로
-식자되게 기본값이 변경되었음에 유의할 것.
+
+종전에\vernote{3.0}
+라틴숫자에 적용되던 \verb|nums| 옵션과
+라틴 인용부호에 적용되던 \verb|quotes| 옵션이
+3.0버전부터는
+각각 \verb|alphs| 옵션과 \verb|parens| 옵션에 통합되었음에 유의하라.
+
+기본값은 다음 명령을 준 것과 동일하다.
 \begin{verbatim}
   \xetexkofontregime {latin}%
     [ puncts=prevfont, colons=prevfont, cjksymbols=hangul ]
@@ -261,11 +225,9 @@
 플레인텍에서는 다음 명령을 사용한다. \LaTeX에서도 쓸 수 있다.
 \begin{verbatim}
   \latinalphs      \hangulalphs      \hanjaalphs      \prevfontalphs
-  \latinnums       \hangulnums       \hanjanums       \prevfontnums
   \latinparens     \hangulparens     \hanjaparens     \prevfontparens
-  \latinquotes     \hangulquotes     \hanjaquotes     \prevfontquotes
+  \latincolons     \hangulcolons     \hanjacolons     \prevfontcolons
   \latinhyphens    \hangulhyphens    \hanjahyphens    \prevfonthyphens
-  \latincolons     \hangulcolons     \hanjacolons     \prevfontcolons
   \latinpuncts     \hangulpuncts     \hanjapuncts     \prevfontpuncts
   \latincjksymbols \hangulcjksymbols \hanjacjksymbols \prevfontcjksymbols
 \end{verbatim}
@@ -277,96 +239,71 @@
 
 \section{간격 조정 옵션}\label{sec:fontopts}
 \dotemph{고정폭 글꼴을 제외한} 한글·한자 글꼴 명령에 미세 간격 옵션을
-쓸 수 있다.
+쓸 수 있다. 예컨대
 \begin{verbatim}
   \setsanshangulfont{NanumGothic}[InterHangul=-.04em]
 \end{verbatim}
-이 때 나눔고딕 글꼴에만 한글 마이너스 자간이 작동한다.
-허용되는 옵션은 다음과 같으며 기본값은 다른 언급이 없는 한 모두 0pt이다.
+이 때 나눔고딕 글꼴에 한글 마이너스 자간이 작동한다.
+
+허용되는 옵션은 다음과 같다.
 \begin{description}\itemsep0pt
-\item[hu, InterLatinCJK]
-  영문자와 한글 사이 간격을 지시한다.
-  영문 괄호와 한글 사이 간격은 그 두 배이다. 기본값 0.05em.
-\item[interhchar, InterHangul]
-  {\addhangulfontfeature{interhchar=0.3em} 한글 자간을} 지시한다.%
+\item[InterLatinCJK, hu]\quad
+  {\addhangulfontfeature{InterLatinCJK=.5em} Latin문자와} 한글 사이 간격을 지시한다.
+    기본값 \verb|0.05em|이며
+    수식과 CJK 문자 사이에는 이 값의 두 배가 적용된다.
+    아래에서 설명할 고문헌조판 모드에서는 기본값이 \verb|0.25em|이며
+    수식 직후에 들어가는 값도 동일하다.
+
+\item[InterHangul, interhchar]\quad
+  {\addhangulfontfeature{InterHangul=0.3em} 한글자간을} 지시한다.
+  기본값은 \verb|0pt|.%
   \footnote{한자 자간 옵션은 제공하지 않는다.
   혹시 한자 자간을 조절하고 싶다면 \cs{XKinterhanjabreak}을 재정의하라.
   참고로 한글 자간을 조절하는 저수준 명령은 \cs{XKinterhangulbreak} 이다.}
-\item[charraise, CharRaise]
+
+\item[CharRaise, charraise]\quad
   글자의 {\addhangulfontfeature{charraise=.5ex}수직 위치}를 조절한다.
-  다른 글꼴 관련 효과와 충돌할 수 있어 주의를 요한다.
-\item[lowerperiod, PunctRaise]
-  \verb+lowerperiod+는 CJK 문자 직후의 마침표를 아래로 끌어내리는
-  {\addhangulfontfeature{lowerperiod=.5ex}정도를 지시한다.
-  반대로 \verb+PunctRaise+ 옵션은 끌어올리는 정도를 지시한다.}
-\item[lowerquestion]
-  CJK 문자 직후의 물음표를 아래로 끌어내리는 정도.
-\item[lowerexclamation]
-  CJK 문자 직후의 느낌표를 아래로 끌어내리는 정도.
-\item[lowercomma]
-  CJK 문자 직후의 쉼표를 아래로 끌어내리는 정도.
-\item[preperiodkern]
-  {\addhangulfontfeature{preperiodkern=1ex}CJK 문자 직후의 마침표 앞에
-  들어가는 간격.}
-\item[postperiodkern]
-  {\addhangulfontfeature{postperiodkern=1ex}CJK 문자 직후의 마침표 뒤에
-  들어가는 간격.}
-\item[prequestionkern]
-  CJK 문자 직후의 물음표 앞에 들어가는 간격.
-\item[postquestionkern]
-  CJK 문자 직후의 물음표 뒤에 들어가는 간격.
-\item[preexclamationkern]
-  CJK 문자 직후의 느낌표 앞에 들어가는 간격.
-\item[postexclamationkern]
-  CJK 문자 직후의 느낌표 뒤에 들어가는 간격.
-\item[precommakern]
-  CJK 문자 직후의 쉼표 앞에 들어가는 간격.
-\item[postcommakern]
-  CJK 문자 직후의 쉼표 뒤에 들어가는 간격.
-\item[quoteraise]
-  영문 인용부호\hparens{아스키문자로 입력하는 것}를
-  위로 끌어올리는 정도.
-\item[quotewidth]
-  영문 인용부호의 폭. 기본값은 natural width.
-\item[postmathskip]
-  수식과 CJK 문자 사이의 간격.  기본값은 위 hu 값의 두 배.
+  기본값은 \verb|0pt|.
 \end{description}
+3.0버전부터는\vernote{3.0} 다음 옵션들이 아무 효과도 가져오지 않게
+변경되었음을 주의하라.
+\begin{verbatim}
+    lowerperiod, PunctRaise
+    lowerquestion
+    lowerexclamation
+    lowercomma
+    preperiodkern
+    postperiodkern
+    prequestionkern
+    postquestionkern
+    preexclamationkern
+    postexclamationkern
+    precommakern
+    postcommakern
+    quoteraise
+    quotewidth
+    postmathskip
+\end{verbatim}
 
 \begin{plaintex}
-플레인텍에서는 다음과 같은 방법으로 제어할 수 있다. 기본값은 \LaTeX에서와 같다.
+  플레인텍에서는 다음과 같은 방법으로 제어할 수 있다. 기본값은 \LaTeX에서와 같다.
 \begin{verbatim}
   \def\xetexkohu{0.05em }
   \def\xetexkointerhchar{-0.04em }
   \def\xetexkocharraise{-0.1ex }
-  \def\xetexkolowerperiod{0.15ex }
-  \def\xetexkolowerquestion{0.15ex }
-  \def\xetexkolowerexclamation{0.15ex }
-  \def\xetexkolowercomma{0.15ex }
-  \def\xetexkopreperiodkern {-0.1em }
-  \def\xetexkopostperiodkern{}
-  \def\xetexkoprequestionkern {0.2em }
-  \def\xetexkopostquestionkern{0.2em }
-  \def\xetexkopreexclamationkern {0.1em }
-  \def\xetexkopostexclamationkern{0.1em }
-  \def\xetexkoprecommakern {0.1em }
-  \def\xetexkopostcommakern{0.1em }
-  \def\xetexkoquoteraise{0.1em }
-  \def\xetexkoquotewidth{0.33em }
-  \def\xetexkopostmathskip{0.2em }
 \end{verbatim}
+  이것들을 선언해두고나서 \cs{hangulfont} 명령으로 글꼴을
+  지정하면 기 정의된 옵션들이 한글폰트 명령에 자동 포함된다.
+  한자폰트의 경우도 같다. 따라서 한글폰트 옵션과
+  한자폰트 옵션을 서로 달리 지시할 수 있다.
 \end{plaintex}
 
-\LaTeX 에서는 한글·한자 글꼴의 기본 옵션을 지정할 수 있다.
-\begin{verbatim}
-  \defaulthangulfontfeatures {InterLatinCJK=.1em, InterHangul=-.1em}
-  \defaulthangulfontfeatures+{InterLatinCJK=.1em, InterHangul=-.1em}
-  \defaulthanjafontfeatures  {InterLatinCJK=.1em}
-  \defaulthanjafontfeatures +{InterLatinCJK=.1em}
-\end{verbatim}
-fontspec 패키지의 \cs{defaultfontfeatures}에 상응하는 것이지만,
-오직 이 절에서 언급한 옵션들만 인식하며 나머지는 무시된다는 점을 유의하라.
+종전에 한글·한자 글꼴의 옵션 기본값을 지정하던\vernote{3.0}
+\cs{defaulthangulfontfeatures} 및 \cs{defaulthanjafontfeatures} 명령이
+3.0 버전부터는
+아무런 기능을 하지 않게 변경되었음에 유의하라.
+폰트옵션의 수가 적어졌기 때문에 이 명령의 유용성도 거의 사라졌다고 판단했다.
 
-
 \section{그밖의 명령들}\label{sec:etccmds}
 \begin{description}
   \item[\cs{everyhangul}, \cs{everyhanja}]
@@ -373,42 +310,43 @@
     한글 또는 한자에 대해 글자마다 지시한 명령을 수행한다. 예컨대
     \verb|\everyhangul{\fbox{#1}}| 명령은 모든
     {\everyhangul{\fbox{#1}}\fboxsep=1pt 한글 주위에 박스}를
-    두른다.  다른 글꼴 옵션과 충돌할 수 있으므로
-    주의를 요한다.
+    두른다.
 
   \item[\cs{disablekoreanfonts}]
-한글폰트를 따로 설정하지 않고 영문 폰트를 따라간다.
-이 때  \verb|\setmainfont| 따위가 한글과 한자에도 적용된다.
+    한글폰트를 따로 설정하지 않고 영문 폰트를 따라간다.
+    이 때  \cs{setmainfont} 따위가 한글과 한자에도 적용된다.
 
-  \item[\cs{disableautojosa}]
-혹시 있을지 모를 예기치 못한 기능간 충돌에 대비하여 자동조사 기능을
-끄는 명령을 제공한다.
+  \item[\cs{disablecjksymbolspacing}]
+    CJK 구두점의 폭을 \verb|0.5em|으로 강제설정하는 것을 방지한다.
+    \xetexko는 낡은 고정폭 한글 폰트들을 고려하여 이 기능을 구현하였으나
+    현대적인 한글 폰트는 이러한 과잉친절이 오히려 성가실 경우가 있다.
 
-  \item[\cs{disablejamoautojosa}]
-옛한글 자모에 한해서 자동조사 기능을 끈다.
-옛한글 자모에 영향을 주는 \verb+Mapping+ 글꼴 옵션을 사용해야 한다면
-이 명령을 선언해두어야 정상 작동한다.
+    \cs{nocompresspunctuations}는 이 명령과 동의어이다.\\
+    반대로
+    \keyword{compresspunctuations}%
+    \cs{compresspunctuations}는 반각을 강제하라는 명령이다.
+    이것이 기본값이므로 특별한 경우가 아니면 따로 선언할 필요가 없다.
 
-  \item[\cs{disablecjksymbolspacing}]
-CJK 구두점의 폭을 0.5em으로 강제설정하는 것을 방지한다.
-\xetexko는 낡은 고정폭 한글 폰트들을 고려하여 이 기능을 구현하였으나
-현대적인 한글 폰트는 이러한 과잉친절이 오히려 성가실 경우가 있다.
-
   \item[\cs{disablehangulspacing}]
-한글조판에 관련된 모든 미세간격을 영(zero)으로 돌린다. 한글 자간도,
-영문자와 한글 사이 간격도, 구두점 위치 조정도, 구두점 사이의 간격도
-모두 작동하지 않는다. 그러나 CJK 글자 사이의 줄바꿈 허용만은 유지된다.
+    한글조판에 관련된 모든 미세간격을 영(zero)으로 돌린다. 한글 자간,
+    영문자와 한글 사이 간격, 구두점과 한글^^b7한자 사이 간격 등이 작동하지 않는다.
+    그러나 CJK 글자 사이의 줄바꿈 허용만은 유지된다. 또한
+    \verb|CharRaise|는 자간과 무관하므로 여전히 작동한다.
 
   \item[\cs{disablehangulspacingandlinebreak}]
-위 명령과 마찬가지로 모든 미세간격을 금지할 뿐만 아니라 CJK 글자 사이의
-줄바꿈까지도 먹지 않게 한다.
-일부 고급 오픈타입 기능을 사용하기 위해서 이 명령이 필요할 때가 있다.
-이를테면, 폰트가 지원하는 한글 리거쳐가 동작하지 않을 때 이 명령을
-선언하면 문제가 해결된다.\footnote{만약 사용자가
-  {\ttfamily\string\XeTeXlinebreaklocale}도 선언했다면
-  {\ttfamily\string\XeTeXlinebreaklocale""} 명령도 요구된다.
-  이 원시명령은 그룹 내에서 쓰더라도 항상 전역적인 효과를 가짐을 유의하라}
+    위 명령과 마찬가지로 모든 간격을 금지할 뿐만 아니라 CJK 글자 사이의
+    줄바꿈까지도 먹지 않게 한다.
+    일부 고급 오픈타입 기능을 사용하기 위해서 이 명령이 필요할 때가 있다.
+    이를테면, 폰트가 지원하는 한글 리거쳐가 동작하지 않을 때 이 명령을
+    선언하면 문제가 해결된다.
+
+    \cs{enablehangulspacingandlinebreak}는 이 명령의 효력을 원래대로
+    되돌리는 기능을 한다.
+
 \end{description}
+3.0 버전부터는\vernote{3.0} 종전의
+\cs{disableautojosa} 및 \cs{disablejamoautojosa} 명령이 아무 기능도 하지 않게
+변경되었음을 유의하라.
 
 \section{옛한글}
 
@@ -419,7 +357,10 @@
 있으며 공개폰트로는 은바탕, 함초롬~LVT, Source Han Sans (본고딕),
 Source Han Serif (본명조), Noto Sans CJK, Noto Serif CJK,
 나눔명조옛한글, 나눔바른고딕옛한글, KoPubWorld 바탕, KoPubWorld 돋움 등이 있다.
-또한 \textsf{\char"1112\char"119E\char"11AB글}에 번들된 함초롬 글꼴에도
+또한
+%%% BUG: \char를 이용하여 옛한글을 찍으면 자모가 분리된다.
+%%%      코드 수정 요망.
+\textsf{^^^^1112^^^^119e^^^^11ab글}에 번들된 함초롬 글꼴에도
 최근 옛한글 지원이 추가되었다.}
 
 \begin{figure}
@@ -452,9 +393,7 @@
 \section{세로쓰기}\label{sec:verttype}
 
 세로쓰기를 위한 글꼴 지정은 다음과 같다.
-역시 고급 오픈타입 기능을 이용하는 것이므로 폰트가 이를 지원해야 한다.%
-\footnote{폰트의 세로쓰기 글자폭이 가로쓰기와 다르다면
-  \cs{verticalem=1.05em} 같은 선언을 미리 해두는 게 좋다.}
+역시 고급 오픈타입 기능을 이용하는 것이므로 폰트가 이를 지원해야 한다.
 \begin{verbatim}
   \setmainhangulfont{Noto Sans CJK KR}[
     Vertical=Alternates, RawFeature=vertical ]
@@ -462,17 +401,19 @@
 \keyword{verticaltypesetting}%
 문서 전체를 세로쓰기할 때 \cs{verticaltypesetting}을 선언하면
 면주는 그대로 두고 본문만 세로쓰기한다.\footnote{면주의 글꼴에는
-  \texttt{Vertical} 옵션이 없어야 할 것이다.
+  \texttt{vertical} 옵션이 없어야 할 것이다.
   면주 글꼴을 따로 지정하는 것은 사용자의 몫이다. }
+
 문서의 일부를 세로쓰기 하려면 \verb|vertical| 환경을 이용한다.
 vertical 환경의 인자는 세로쓰기 박스의 세로 길이이다.
-보통 그 뒤에  세로쓰기에 사용할 글꼴 명령이 온다.
 \begin{figure}
 \begin{example}
-\hfil\begin{vertical}{16em}
+\hfil\begin{vertical}{18em}
+  \spaceskip=.5em plus .08em minus .04em
   \sffamily\addhangulfontfeatures{Vertical=Alternates,CharRaise=.5ex,
   RawFeature=vertical}
   \hanjabyhangulfont \parindent-1em\leftskip1em
+  \typesetclassic \latinparens
   \noindent 님의 침묵 (The Silent Beloved)
 \smallbreak
 \hfil\hfil 한 용 운\hfil
@@ -486,7 +427,15 @@
 제곡조를못이기는 사랑의노래는 님의沈默을 휩싸고돔니다\par
 \end{vertical}\hfil
 \end{example}
-\caption{세로쓰기 보기}\label{fig:vertical}
+  \caption{\linespread{1.2}\selectfont
+    세로쓰기 보기.\quad
+    \sffamily\small
+  Noto Sans CJK KR 글꼴을 이용했다. 이 글꼴의 세로쓰기 어간이 1em으로
+  매우 커서 \cs{spaceskip=0.5em plus.08em minus.04em}을 강제했다.
+  \texttt{CharRaise=.5ex}도 글꼴 옵션에 추가했다.
+  또한 \cs{latinparens}를 선언했는데
+  제목 다음의 괄호가 CJK 괄호가 아니라 아스키 괄호이기 때문이다.
+  }\label{fig:vertical}
 \end{figure}
 
 \begin{verbatim}
@@ -515,40 +464,88 @@
 horizontal 환경에는 가로쓰기 박스의 너비를 인자로 주어야 한다.
 가로쓰기 영역의 폰트 설정은 사용자의 몫이다.
 
-\section{고문헌·일본어·중국어}
+\section{고문헌 조판}
 
-띄어쓰기가 없는 옛문헌이나 일본어 단락 따위를 삽입할 때
-\verb|japanese| 혹은 \verb|chinese| 환경을 선언하는 것이 좋다.
-들여쓰기\footnote {들여쓰기 기본값은 japanese는 1em 이고 chinese는 2em 이다.}
-및 자간 조절이 자동으로 이루어지며
-사용자가 입력한 불필요한 공백도 없애준다.
-\verb|Schinese| 환경은 chinese의 다른 이름이다.
-\verb|Tchinese|도 제공하는데 중국어 번체 글꼴을 사용한다면 이 환경을 이용하라.
-일반적으로 우리 고문헌 조판에는 japanese 환경이 더 적합하다.
+\verb|typesetclassic| 환경은 고문헌 조판에 적합한 환경이다.
 
+불필요한 공백을 없애주는 기능은\vernote{3.0}
+3.0 버전부터는 자동으로 동작하지 않는다.  사용자가
+\keyword{removeclassicspaces}%
+\cs{removeclassicspaces} 명령을 주어야 CJK 글자간 공백을
+제거하기 시작한다.
+
+간단한 일본어, 중국어 문단 정도를 식자하는 데도 이 환경을 이용할 수 있으나
+각 언어의 전용 패키지들에 비해 기능이 많이 모자란다.\footnote{%
+  그러나 \texttt{japanese}, \texttt{chinese} 환경이 여전히 제공된다.
+  특히 중국어 간체를 식자할 때는 \texttt{chinese}를 명시적으로 이용하는 게 좋다.
+  \texttt{Schinese} 환경은 \texttt{chinese}의 다른 이름이다.
+  \texttt{Tchinese}도 호환성을 위해 남겨두었다. }
+
+\begin{plaintex}
+  플레인텍에서는 다음 방식으로 사용한다.
+  \begin{verbatim}
+    \begingroup \typesetclassic
+      ...
+    \endgroup
+  \end{verbatim}
+\end{plaintex}
+
+
+\keyword{inhibitglue}%
+\cs{inhibitglue} 명령은
+해당 지점에 자동 삽입되는 공백을 영(zero)으로 만들어준다.
+
+현대문서 조판에는 \verb|typesetmodern| 환경이 쓰인다. 이 환경은 기본값이므로
+특별한 경우가 아니면 따로 선언할 필요가 없다.
+
+\def\analect{%
+  \removeclassicspaces
+  子曰:「學而時習之,不亦說乎?有朋自遠方來,不亦樂乎?人不知而不慍,不亦君子乎?」\par
+  有子曰:「其爲人也 孝弟,而好犯上者,鮮矣!不好犯上,而好作亂者,未之有也!
+  君子務本,本立而道生;孝弟也者,其爲仁之本與?」\par
+  子曰:「巧言令色,鮮矣仁!」\par
+  曾子曰:「吾日三省吾身:爲人謀,而不忠乎?與朋友交,而不信乎?傳,不習乎?」\par
+  子曰:「道千乘之國,敬事而信,節用而愛人,使民以時。」\par
+  子曰:「弟子入則孝,出則弟;謹而信,汎愛衆;而親仁,行有餘力,則以學文。」
+}
 \begin{figure}
   \begin{example}\linespread{1.3}
-    \sffamily\japanese
-子曰:「學而時習之,不亦說乎?有朋自遠方來,不亦樂乎?人不知而不慍,不亦君子乎?」\par
-有子曰:「其爲人也孝弟,而好犯上者,鮮矣!不好犯上,而好作亂者,未之有也!君子務本,本立而道生;孝弟也者,其爲仁之本與?」\par
-子曰:「巧言令色,鮮矣仁!」\par
-曾子曰:「吾日三省吾身:爲人謀,而不忠乎?與朋友交,而不信乎?傳,不習乎?」\par
-子曰:「道千乘之國,敬事而信,節用而愛人,使民以時。」\par
-子曰:「弟子入則孝,出則弟;謹而信,汎愛衆;而親仁,行有餘力,則以學文。」
+    \sffamily\typesetclassic
+    \analect
   \end{example}
-\caption{고문헌 조판 보기. japanese 환경을 이용했다.}\label{fig:ancientdoc}
+\caption{고문헌 조판 보기.\quad
+  \sffamily\small
+  typesetclassic 환경을 이용했다.
+  \cs{removeclassicspaces}도 선언했다.
+  }\label{fig:ancientdoc}
 \end{figure}
 
-\keyword{inhibitglue}%
-\cs{inhibitglue} 명령은 일본어 등 환경에서 가끔 유용한데,
-해당 지점에 자동 삽입되는 공백을 영(zero)으로 만들어준다.
+\begin{figure}
+  \begin{example}\linespread{1.3}
+    \hfil\begin{vertical}{18em}
+      \sffamily\typesetclassic
+      \addhangulfontfeatures{Vertical=Alternates,CharRaise=.5ex,
+      RawFeature=vertical}
+      \hanjabyhangulfont \parindent-1em\leftskip1em
+      \analect
+    \end{vertical}\hfil
+  \end{example}
+  \caption{고문헌 세로쓰기 조판 보기.\quad
+  \sffamily\small
+  vertical 환경을 이용했다.
+  \cs{hangingpunctuations}가 선언되어 있어서 구두점이
+  행 끝에 걸린 것을 볼 수 있다.
+  }\label{fig:ancientdocvertical}
+\end{figure}
 
 \section{매달린 구두점}
 마침표, 쉼표, 인용부호를 판면 바깥에 식자하여 행 끝에 매달리게 만든다.
-\begin{verbatim}
-  \usepackage{xetexko-hanging}
-\end{verbatim}
-\cs{hangingpunctuation} 명령은 버전 2.2 이후 불필요해졌다.
+
+3.0 버전부터는\vernote{3.0} \keyword{hangingpunctuations}%
+\cs{hangingpunctuations} 명령으로 활성화한다.
+\cs{hangingpunctuation}은 이 명령과 동의어이다.
+당분간 xetexko-hanging.sty 을 로드하는 것으로도 활성화되도록 해 두었다.
+
 글자 내밀기 기본값에 차이가 좀 있긴 하지만,
 microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수 있다.
 
@@ -575,8 +572,8 @@
 \begin{quote}
   \verb|$가^{나^다}$|\quad$\Rightarrow\quad가^{나^다}$
 \end{quote}
-수식 한글은 따로 설정하지 않으면 문서의 기본 글꼴을 따라가지만
-굳이 설정하려면 다음과 같이 한다. 이 명령은 플레인텍에서도 쓸 수 있다.
+3.0 버전부터는\vernote{3.0}
+자동으로 수식한글을 잡아주지 않으므로 사용자가 다음과 같이 명시적으로 선언해야 한다.
 \begin{verbatim}
   \setmathhangulfont{Noto Sans CJK KR}[
     SizeFeatures={ {Size=-6,  Font=* Medium},
@@ -584,6 +581,19 @@
                    {Size=9-,  Font=* DemiLight} }
   ]
 \end{verbatim}
+\begin{plaintex}
+  플레인텍에서는 \cs{mathhangulfont=UnBatang}과 같이 설정한다.
+
+  또는 좀 더 그럴듯하게 하려면:\par
+  \leftskip=3em\noindent
+  \begin{verbatim}
+  \font\texthangul="Noto Sans CJK KR DemiLight" at 10pt
+  \font\scripthangul="Noto Sans CJK KR Regular" at 7pt
+  \font\scriptscripthangul="Noto Sans CJK KR Medium" at 5pt
+  \setmathhangulfonts\texthangul\scripthangul\scriptscripthangul
+  \end{verbatim}
+\end{plaintex}
+
 현재 한글만 쓸 수 있게 설정되어 있다.
 한자도 수식에 직접 입력하려면 사용자는
 \begin{verbatim}
@@ -592,7 +602,7 @@
 명령으로 유니코드 블럭을 추가 지정해야 한다.
 
 \section{자동조사}
-자동조사는 \kotex 의 경우와 기본적으로 동일하게 동작한다.
+자동조사는 \kotex 의 경우와 대체로 동일하게 동작한다.
 게다가 문장 중에서도 동작하고
 플레인텍에서까지 사용할 수 있다.
 그럼에도 불구하고 사용자가 임의로 제어할 필요가 생긴다면
@@ -622,24 +632,100 @@
 \section{고아글자 문제}
 어느 정도는 고아글자가 생기지 않게 만들어 두었으나,
 \XeTeX 에서는 고아글자를 자동으로 완전히 회피하기는 어렵다.
-필요하다면 사용자가 적당한 곳에 \verb|\nobreak| 명령을 삽입해야 한다.
+필요하다면 사용자가 적당한 곳에 \cs{nobreak} 명령을 삽입해야 한다.
 
 \section{한국어 번호}
 항목 번호를 한국어 기호로 붙일 수 있다. \kotex과 마찬가지로
-\verb|\jaso| \verb|\gana| \verb|\ojaso| \verb|\ogana| \verb|\pjaso|
-\verb|\pgana| \verb|\onum| \verb|\pnum| \verb|\oeng| \verb|\peng|
-\verb|\hnum| \verb|\Hnum| \verb|\hroman| \verb|\hRoman| \verb|\hNum|
-\verb|\hanjanum|
+\cs{jaso} \cs{gana} \cs{ojaso} \cs{ogana} \cs{pjaso}
+\cs{pgana} \cs{onum} \cs{pnum} \cs{oeng} \cs{peng}
+\cs{hnum} \cs{Hnum} \cs{hroman} \cs{hRoman} \cs{hNum}
+\cs{hanjanum}
 따위를 사용한다.
 
 \section{밑줄긋기}
-\LaTeX에서는 \uline{ulem 패키지}를 로드하는 것만으로 자동 지원된다.
-\begin{plaintex}
-플레인텍에서는 패키지 로드 후 사용자가 \cs{xetexkoulemsupport}
-명령을 내려주어야 한다.
-\end{plaintex}
+\LaTeX에서는 \uwave{ulem 패키지}를 로드하는 것만으로 자동 지원된다.
 
-\hfill \fboxsep=-\fboxrule \fbox{\vbox to1em{\hbox to1em{\hss}\vss}}
+3.0 버전부터는\vernote{3.0} \cs{xetexkoulemsupport} 선언이
+불필요하게 되었다. 이 명령은 호환성을 위해 남겨두었으나 아무 일도
+하지 않는다.
 
+%\hfill \fboxsep=-\fboxrule \fbox{\vbox to1em{\hbox to1em{\hss}\vss}}
 
+\bigskip
+
+\section*{주요 변경 이력}
+
+\begin{small}\linespread{1.2}\selectfont
+\begin{description}\itemsep=0pt
+    \item[v3.0] 2021-03-20
+      \begin{itemize}
+        \item \verb|typesetclassic|, \verb|typesetmodern| 환경이 추가되었다.
+        \item \cs{removeclassicspaces} 명령이 추가되었다.
+        \item \cs{compresspunctuations}, \cs{nocompresspunctuations} 명령이 추가되었다.
+        \item \cs{hangingpunctuations} 명령이 추가되었다.
+        \item 디폴트 고정폭 한글 폰트의 메트릭을 Latin Modern Mono에
+          맞추어 조정하였다.
+        \item 글꼴옵션이 \verb|InterLatinCJK|, \verb|InterHangul|, \verb|CharRaise|
+          외에는 모두 무력화되었다.
+        \item \cs{xetexkoregime}의 키값 \verb|nums|와 \verb|quotes|가
+          각각 \verb|alphs|와 \verb|parens|에 통합되었다.
+        \item \cs{xetexkoulemsupport} 명령이 무력화되었다.
+        \item \cs{disableautojosa}, \cs{disablejamoautojosa} 명령이 무력화되었다.
+        \item \cs{defaulthanjafontfeatures} 등의 명령이 무력화되었다.
+        \item 수식한글을 자동으로 잡아주지 않는다.
+      \end{itemize}
+    \item[v2.23] 2020-02-17
+      \begin{itemize}
+        \item \hyperref[sec:fontcmds]
+          {디폴트 한글 폰트가 나눔글꼴에서 은글꼴로 변경되었다.}
+      \end{itemize}
+    \item[v2.13] 2015-06-16
+      \begin{itemize}
+        \item \hyperref[sec:verttype]
+          {\texttt{horizontal} 환경이 추가되었다.}
+      \end{itemize}
+    \item[v2.10] 2015-01-16
+      \begin{itemize}
+        \item 패키지 옵션 \texttt{[unfonts]}를 더는 지원하지 않는다. 이 옵션을
+          사용한 기존 문서는 기본 글꼴인 은글꼴 트루타입으로 식자될 것이다.
+      \end{itemize}
+    \item[v2.7] 2014-06-17
+      \begin{itemize}
+        \item \hyperref[sec:fontcmds]
+          {main/sans hangul/hanja 글꼴에는 디폴트 옵션
+          \texttt{Ligatures=TeX}이 주어진다.}
+        \item \hyperref[sec:fontopts]
+          {\cs{defaulthangulfontfeatures}와 \cs{defaulthanjafontfeatures}
+          명령이 생겼다.}
+      \end{itemize}
+    \item[v2.4] 2014-02-02
+      \begin{itemize}
+        \item Variation Selector를 이용한 한자 변형 글리프 접근을 허용한다.
+      \end{itemize}
+    \item[v2.2] 2013-12-06
+      \begin{itemize}
+        \item \hyperref[sec:fontopts]
+          {글꼴 옵션 \texttt{CharRaise}를 추가했다.}
+        \item \hyperref[sec:fontcmds]
+          {\cs{fallbackhanjafont} 명령을 인식한다.}
+        \item \hyperref[sec:etccmds]
+          {\cs{everyhangul}, \cs{everyhanja} 명령이 추가되었다.}
+        \item \hyperref[sec:symbolfont]
+          {하이픈 문자를 \hparen{직전 글꼴이 아니라} 라틴 글꼴에서 찾는
+          것이 기본값이 되었다.}
+      \end{itemize}
+    \item[v2.0] 2013-03-27
+      \begin{itemize}
+        \item \hyperref[sec:loading]
+          {플레인텍에서 xetexko.tex이 아니라 xetexko.sty를 불러야 한다.}
+        \item \hyperref[sec:symbolfont]
+          {CJK 기호문자를 \hparen{한자가 아니라} 한글 글꼴에서 찾는 것이
+          기본값이 되었다.}
+        \item \hyperref[sec:fontopts]
+          {\texttt{interpunctskern} 글꼴 옵션을 없애고 \texttt{quoteraise}를
+          추가했다.}
+      \end{itemize}
+  \end{description}
+\end{small}
+
 \end{document}

Modified: branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,6 +1,6 @@
 % xetexko-font.sty
 %
-% Copyright (c) 2013-2020 Dohyun Kim  <nomos at ktug org>
+% Copyright (c) 2013-2021 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
@@ -10,585 +10,11 @@
 % and version 1.3c or later is part of all distributions of LaTeX
 % version 2006/05/20 or later.
 
-\NeedsTeXFormat{LaTeX2e}[2020/02/02]
-\ProvidesPackage{xetexko-font}[2020/02/17 v2.23 LaTeX Font commands for XeTeX-ko]
-
-\RequirePackage{fontspec}[2020/02/03]
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% for old hangul rendering
-\newfontfeature{YetHangul}{script=hang}
-
-\ExplSyntaxOn
-%%%%%%%%%%%%%%%%%%%%%
-% hangul font options
-\tl_new:N \l_xtxko_font_opts_tl
-\tl_new:N \l_xtxko_font_opts_init_tl
-\tl_new:N \l_xtxko_hangul_font_opts_init_tl
-\tl_new:N \l_xtxko_hanja_font_opts_init_tl
-\tl_new:N \l_xtxko_rem_tl
-\int_const:Nn \c__xtxko_one_int { 1 }
-\int_const:Nn \c__xtxko_two_int { 2 }
-\tl_set:Nn \l_xtxko_font_opts_init_tl
-  {
-    \cs_set_eq:NN \xetexkointerhchar          \c_empty_tl
-    \cs_set_eq:NN \xetexkolowerexclamation    \c_empty_tl
-    \cs_set_eq:NN \xetexkolowerperiod         \c_empty_tl
-    \cs_set_eq:NN \xetexkolowercomma          \c_empty_tl
-    \cs_set_eq:NN \xetexkolowerquestion       \c_empty_tl
-    \cs_set_eq:NN \xetexkopostexclamationkern \c_empty_tl
-    \cs_set_eq:NN \xetexkopostperiodkern      \c_empty_tl
-    \cs_set_eq:NN \xetexkopostcommakern       \c_empty_tl
-    \cs_set_eq:NN \xetexkopostquestionkern    \c_empty_tl
-    \cs_set_eq:NN \xetexkopreexclamationkern  \c_empty_tl
-    \cs_set_eq:NN \xetexkopreperiodkern       \c_empty_tl
-    \cs_set_eq:NN \xetexkoprecommakern        \c_empty_tl
-    \cs_set_eq:NN \xetexkoprequestionkern     \c_empty_tl
-    \cs_set_eq:NN \xetexkoquoteraise          \c_empty_tl
-    \cs_set_eq:NN \xetexkoquotewidth          \c_empty_tl
-    \cs_set_eq:NN \xetexkocharraise           \c_empty_tl
-    \cs_set_nopar:Npn \xetexkohu              {0.05em}
-    \cs_set_nopar:Npn \xetexkopostmathskip    {\dim_eval:n {\xetexkohu*2}}
-  }
-\cs_new:Nn \__xtxko_add_font_opt:Nn
-  {
-    \tl_put_right:Nn \l_xtxko_font_opts_tl { \cs_set_nopar:Npn #1 {#2} }
-  }
-\keys_define:nn { xtxko-font }
-  {
-    hu .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkohu                  {#1} } ,
-    interhchar .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkointerhchar          {#1} } ,
-    lowerexclamation .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkolowerexclamation    {#1} } ,
-    lowerperiod .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkolowerperiod         {#1} } ,
-    lowercomma .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkolowercomma          {#1} } ,
-    lowerquestion .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkolowerquestion       {#1} } ,
-    postexclamationkern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopostexclamationkern {#1} } ,
-    postmathskip .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopostmathskip        {#1} } ,
-    postperiodkern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopostperiodkern      {#1} } ,
-    postcommakern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopostcommakern       {#1} } ,
-    postquestionkern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopostquestionkern    {#1} } ,
-    preexclamationkern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopreexclamationkern  {#1} } ,
-    preperiodkern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkopreperiodkern       {#1} } ,
-    precommakern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkoprecommakern        {#1} } ,
-    prequestionkern .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkoprequestionkern     {#1} } ,
-    quoteraise .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkoquoteraise          {#1} } ,
-    quotewidth .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkoquotewidth          {#1} } ,
-    charraise .code:n =
-      { \__xtxko_add_font_opt:Nn \xetexkocharraise           {#1} } ,
-    InterLatinCJK .meta:n = { hu          = {#1} } ,
-    InterHangul   .meta:n = { interhchar  = {#1} } ,
-    PunctRaise    .meta:n = { lowerperiod = { \dim_eval:n {-#1} } } ,
-    CharRaise     .meta:n = { charraise   = {#1} } ,
-  }
-\tl_set_eq:NN \l_xtxko_hangul_font_opts_init_tl \l_xtxko_font_opts_init_tl
-\cs_new:Nn \__xtxko_hangul_assign_font_opts:n
-  {
-    \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hangul_font_opts_init_tl
-    \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rem_tl
-  }
-\tl_set_eq:NN \l_xtxko_hanja_font_opts_init_tl  \l_xtxko_font_opts_init_tl
-\cs_new:Nn \__xtxko_hanja_assign_font_opts:n
-  {
-    \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hanja_font_opts_init_tl
-    \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rem_tl
-  }
-\cs_new:Nn \__xtxko_def_XKhan__fonts:nnn
-  {
-    \cs_if_eq:NNF #1 \relax
-      {
-        \str_if_eq:eeT \familydefault #2
-          {
-            \cs_if_eq:NNTF \XKhangulfont #1
-              {
-                \cs_set_nopar:Npn #1
-                  {
-                    \XK at storeltnfont
-                    \chardef\XKcurrentfont \c__xtxko_one_int #3
-                    \XK at storecjkfont
-                  }
-              }
-              {
-                \cs_set_nopar:Npn #1
-                  {
-                    \XK at storeltnfont
-                    \chardef\XKcurrentfont \c__xtxko_two_int #3
-                    \XK at storecjkfont
-                  }
-              }
-            \cs_if_eq:NNTF \rmdefault #2
-              {
-                \cs_set_eq:NN \XK at default@korean at font \XK at rm@korean at font
-              }
-              {
-                \cs_if_eq:NNTF \sfdefault #2
-                  {
-                    \cs_set_eq:NN \XK at default@korean at font \XK at sf@korean at font
-                  }
-                  {
-                    \cs_set_eq:NN \XK at default@korean at font \XK at tt@korean at font
-                  }
-              }
-          }
-      }
-  }
-% suppress bx font warnings
-\cs_new_nopar:Npn \l_xetexko_pacify_bfseries {
-  \tl_map_inline:nn { \mddefault \bfdefault }
-  {
-    \cs_if_exist:cF { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\updefault }
-    {
-      \cs_set_eq:cc
-      { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\updefault }
-      { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\shapedefault }
-    }
-  }
-  \tl_map_inline:nn { \shapedefault \updefault \itdefault \sldefault }
-  {
-    \cs_if_exist:cF { \g_fontspec_encoding_tl/\l_fontspec_family_tl/bx/##1 }
-    {
-      \cs_set_eq:cc
-      { \g_fontspec_encoding_tl/\l_fontspec_family_tl/bx/##1 }
-      { \g_fontspec_encoding_tl/\l_fontspec_family_tl/\bfdefault/##1 }
-    }
-  }
-}
-%%%%%%%%%%%%%%%%%%%%
-% user font commands
-\DeclareDocumentCommand \setmainhangulfont { O{} m O{} }
-  {
-    \__xtxko_hangul_assign_font_opts:n {Ligatures=TeX,#1,#3}
-    \setfontfamily \kormainfont {#2} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:NV \kormainfont \l_xtxko_font_opts_tl
-    \__xtxko_def_XKhan__fonts:nnn \XKhangulfont \rmdefault \kormainfont
-    \ignorespaces
-  }
-\DeclareDocumentCommand \setsanshangulfont { O{} m O{} }
-  {
-    \__xtxko_hangul_assign_font_opts:n {Ligatures=TeX,#1,#3}
-    \setfontfamily \korsansfont {#2} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:NV \korsansfont \l_xtxko_font_opts_tl
-    \__xtxko_def_XKhan__fonts:nnn \XKhangulfont \sfdefault \korsansfont
-    \ignorespaces
-  }
-\DeclareDocumentCommand \setmonohangulfont { O{} m O{} }
-  {
-    \setfontfamily \kormonofont {#2} [#1,#3]
-    \l_xetexko_pacify_bfseries
-    \__xtxko_def_XKhan__fonts:nnn \XKhangulfont \ttdefault \kormonofont
-    \ignorespaces
-  }
-\DeclareDocumentCommand \setmainhanjafont { O{} m O{} }
-  {
-    \__xtxko_hanja_assign_font_opts:n {Ligatures=TeX,#1,#3}
-    \setfontfamily \hnjmainfont {#2} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:NV \hnjmainfont \l_xtxko_font_opts_tl
-    \__xtxko_def_XKhan__fonts:nnn \XKhanjafont \rmdefault \hnjmainfont
-    \ignorespaces
-  }
-\DeclareDocumentCommand \setsanshanjafont { O{} m O{} }
-  {
-    \__xtxko_hanja_assign_font_opts:n {Ligatures=TeX,#1,#3}
-    \setfontfamily \hnjsansfont {#2} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:NV \hnjsansfont \l_xtxko_font_opts_tl
-    \__xtxko_def_XKhan__fonts:nnn \XKhanjafont \sfdefault \hnjsansfont
-    \ignorespaces
-  }
-\DeclareDocumentCommand \setmonohanjafont { O{} m O{} }
-  {
-    \setfontfamily \hnjmonofont {#2} [#1,#3]
-    \l_xetexko_pacify_bfseries
-    \__xtxko_def_XKhan__fonts:nnn \XKhanjafont \ttdefault \hnjmonofont
-    \ignorespaces
-  }
-%% {hangul,hanja}fontspec = adhoc{hangul,hanja}font
-\DeclareDocumentCommand \adhochangulfont { O{} m O{} }
-  {
-    \__xtxko_hangul_assign_font_opts:n {#1,#3}
-    \setfontfamily \XK at adhoc@hangul at font {#2} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:NV \XK at adhoc@hangul at font \l_xtxko_font_opts_tl
-    \cs_set_nopar:Npn \XKhangulfont
-      {
-        \XK at storeltnfont
-        \cs_set_eq:NN \XKcurrentfont \c__xtxko_one_int
-        \XK at adhoc@hangul at font
-        \XK at storecjkfont
-      }
-    \ignorespaces
-  }
-\cs_set_eq:NN \hangulfontspec \adhochangulfont
-\DeclareDocumentCommand \adhochanjafont { O{} m O{} }
-  {
-    \__xtxko_hanja_assign_font_opts:n {#1,#3}
-    \setfontfamily \XK at adhoc@hanja at font {#2} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:NV \XK at adhoc@hanja at font \l_xtxko_font_opts_tl
-    \cs_set_nopar:Npn \XKhanjafont
-      {
-        \XK at storeltnfont
-        \cs_set_eq:NN \XKcurrentfont \c__xtxko_two_int
-        \XK at adhoc@hanja at font
-        \XK at storecjkfont
-      }
-    \ignorespaces
-  }
-\cs_set_eq:NN \hanjafontspec \adhochanjafont
-%% new{hangul,hanja}font{family,face}
-\DeclareDocumentCommand \newhangulfontfamily { m O{} m O{} }
-  {
-    \__xtxko_hangul_assign_font_opts:n {#2,#4}
-    \exp_args:Nc \setfontfamily { XK at newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:cV { XK at newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
-    \DeclareRobustCommand #1
-      {
-        \cs_set_nopar:Npn \XKhangulfont
-          {
-            \XK at storeltnfont
-            \cs_set_eq:NN \XKcurrentfont \c__xtxko_one_int
-            \use:c { XK at newfont@family \token_to_str:N #1 }
-            \XK at storecjkfont
-          }
-      }
-  }
-\DeclareDocumentCommand \newhanjafontfamily { m O{} m O{} }
-  {
-    \__xtxko_hanja_assign_font_opts:n {#2,#4}
-    \exp_args:Nc \setfontfamily { XK at newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
-    \l_xetexko_pacify_bfseries
-    \tl_put_right:cV { XK at newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
-    \DeclareRobustCommand #1
-      {
-        \cs_set_nopar:Npn \XKhanjafont
-          {
-            \XK at storeltnfont
-            \cs_set_eq:NN \XKcurrentfont \c__xtxko_two_int
-            \use:c { XK at newfont@family \token_to_str:N #1 }
-            \XK at storecjkfont
-          }
-      }
-  }
-\DeclareDocumentCommand \newhangulfontface { m O{} m O{} }
-  {
-    \__xtxko_hangul_assign_font_opts:n {#2,#4}
-    \exp_args:Nc \setfontface { XK at newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
-    \tl_put_right:cV { XK at newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
-    \DeclareRobustCommand #1
-      {
-        \cs_set_nopar:Npn \XKhangulfont
-          {
-            \XK at storeltnfont
-            \cs_set_eq:NN \XKcurrentfont \c__xtxko_one_int
-            \use:c { XK at newfont@family \token_to_str:N #1 }
-            \XK at storecjkfont
-          }
-      }
-  }
-\DeclareDocumentCommand \newhanjafontface { m O{} m O{} }
-  {
-    \__xtxko_hanja_assign_font_opts:n {#2,#4}
-    \exp_args:Nc \setfontface { XK at newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
-    \tl_put_right:cV { XK at newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
-    \DeclareRobustCommand #1
-      {
-        \cs_set_nopar:Npn \XKhanjafont
-          {
-            \XK at storeltnfont
-            \cs_set_eq:NN \XKcurrentfont \c__xtxko_two_int
-            \use:c { XK at newfont@family \token_to_str:N #1 }
-            \XK at storecjkfont
-          }
-      }
-  }
-%% add{hangul,hanja}fontfeature[s]
-\cs_set_nopar:Npn \xetexkopacifybfseries {
-  \tl_map_inline:nn { \mddefault \bfdefault }
-  {
-    \cs_if_exist:cF { \f at encoding/\f at family/##1/\updefault }
-    {
-      \cs_gset_eq:cc
-      { \f at encoding/\f at family/##1/\updefault }
-      { \f at encoding/\f at family/##1/\shapedefault }
-    }
-  }
-  \tl_map_inline:nn { \shapedefault \updefault \itdefault \sldefault }
-  {
-    \cs_if_exist:cF { \f at encoding/\f at family/bx/##1 }
-    {
-      \cs_gset_eq:cc
-      { \f at encoding/\f at family/bx/##1 }
-      { \f at encoding/\f at family/\bfdefault/##1 }
-    }
-  }
-}
-\DeclareDocumentCommand \addhangulfontfeature { m }
-  {
-    \group_begin:
-    \fontseries\mddefault\fontshape\shapedefault \XKhangulfont
-    \tl_clear:N \l_xtxko_font_opts_tl
-    \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rem_tl
-    \addfontfeature {\l_xtxko_rem_tl}
-    \xetexkopacifybfseries
-    \use:x
-      {
-        \group_end:
-        \exp_not:N \cs_set_nopar:Npn \exp_not:N \XKhangulfont
-          {
-            \exp_not:V \XKhangulfont
-            \exp_not:N \fontfamily { \f at family } \exp_not:N \selectfont
-            \exp_not:V \l_xtxko_font_opts_tl
-            \exp_not:N \XK at storecjkfont
-          }
-      }
-    \ignorespaces
-  }
-\cs_set_eq:NN \addhangulfontfeatures \addhangulfontfeature
-\DeclareDocumentCommand \addhanjafontfeature { m }
-  {
-    \group_begin:
-    \fontseries\mddefault\fontshape\shapedefault \XKhanjafont
-    \tl_clear:N \l_xtxko_font_opts_tl
-    \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rem_tl
-    \addfontfeature {\l_xtxko_rem_tl}
-    \xetexkopacifybfseries
-    \use:x
-      {
-        \group_end:
-        \exp_not:N \cs_set_nopar:Npn \exp_not:N \XKhanjafont
-          {
-            \exp_not:V \XKhanjafont
-            \exp_not:N \fontfamily { \f at family } \exp_not:N \selectfont
-            \exp_not:V \l_xtxko_font_opts_tl
-            \exp_not:N \XK at storecjkfont
-          }
-      }
-    \ignorespaces
-  }
-\cs_set_eq:NN \addhanjafontfeatures \addhanjafontfeature
-%% default hangul font features
-\DeclareDocumentCommand \defaulthangulfontfeatures { t+ o m } % o is ignored
-  {
-    \IfBooleanTF {#1}
-      {
-        \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hangul_font_opts_init_tl
-      }
-      {
-        \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_font_opts_init_tl
-      }
-    \keys_set_known:nxN { xtxko-font } {#3} \l_xtxko_rem_tl % rem_tl ignored
-    \tl_set_eq:NN \l_xtxko_hangul_font_opts_init_tl \l_xtxko_font_opts_tl
-  }
-\DeclareDocumentCommand \defaulthanjafontfeatures { t+ o m } % o is ignored
-  {
-    \IfBooleanTF {#1}
-      {
-        \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hanja_font_opts_init_tl
-      }
-      {
-        \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_font_opts_init_tl
-      }
-    \keys_set_known:nxN { xtxko-font } {#3} \l_xtxko_rem_tl % rem_tl ignored
-    \tl_set_eq:NN \l_xtxko_hanja_font_opts_init_tl \l_xtxko_font_opts_tl
-  }
-%% math hangul font
-\DeclareDocumentCommand \setmathhangulfont { O{} m O{} }
-  {
-    \fontspec_set_family:Nnn \xetexko at math@hangul at family {#1,#3} {#2}
-    \l_xetexko_pacify_bfseries
-  }
-%%%%%%%%%%%%%%%%%%%%
-%% xetexkofontregime
-\keys_define:nn { xtxko-char }
-  {
-    alphs       .code:n = \use:c { #1alphs } ,
-    nums        .code:n = \use:c { #1nums } ,
-    parens      .code:n = \use:c { #1parens } ,
-    quotes      .code:n = \use:c { #1quotes } ,
-    puncts      .code:n = \use:c { #1puncts } ,
-    colons      .code:n = \use:c { #1colons } ,
-    hyphens     .code:n = \use:c { #1hyphens } ,
-    cjksymbols  .code:n = \use:c { #1cjksymbols } ,
-  }
-\DeclareDocumentCommand \xetexkofontregime { O{} m O{} }
-  {
-    \use:c { #2marks }
-    \keys_set:nn { xtxko-char } { #1,#3 }
-  }
-\ExplSyntaxOff
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%
-% font switching for latex
-\def\XKstoreprevfont{%
-  \ifx\f at family\XKcjkprevfont\let\f at family\XKltnprevfont\fi
-}
-\def\XK at storeltnfont{%
-  \ifx\f at family\XKcjkprevfont\else\let\XKltnprevfont\f at family\fi
-}
-\def\XK at storecjkfont{%
-  \let\XKcjkprevfont\f at family
-  \edef\XKplaincjkprevfont{\the\font}%
-}
-\edef\XKlatinfont{\unexpanded\expandafter{\XKstoreprevfont
-    \chardef\XKcurrentfont\z@
-    \edef\XK at plain@curr at font{\the\font}%
-    \ifx\XK at plain@curr at font\XKplaincjkprevfont
-      \selectfont
-    \fi
-}}
-
-\def\XK at rm@korean at font{%
-  \ifx\XKhangulfont\relax\else
-    \def\XKhangulfont{%
-      \XK at storeltnfont
-      \chardef\XKcurrentfont\@ne\kormainfont
-      \XK at storecjkfont
-    }%
-  \fi
-  \ifx\XKhanjafont\relax\else
-    \def\XKhanjafont {%
-      \XK at storeltnfont
-      \chardef\XKcurrentfont\tw@\hnjmainfont
-      \XK at storecjkfont
-    }%
-  \fi
-}
-\def\XK at sf@korean at font{%
-  \ifx\XKhangulfont\relax\else
-    \def\XKhangulfont{%
-      \XK at storeltnfont
-      \chardef\XKcurrentfont\@ne\korsansfont
-      \XK at storecjkfont
-    }%
-  \fi
-  \ifx\XKhanjafont\relax\else
-    \def\XKhanjafont {%
-      \XK at storeltnfont
-      \chardef\XKcurrentfont\tw@\hnjsansfont
-      \XK at storecjkfont
-    }%
-  \fi
-}
-\def\XK at tt@korean at font{%
-  \ifx\XKhangulfont\relax\else
-    \def\XKhangulfont{%
-      \XK at storeltnfont
-      \chardef\XKcurrentfont\@ne\kormonofont
-      \XK at storecjkfont
-    }%
-  \fi
-  \ifx\XKhanjafont\relax\else
-    \def\XKhanjafont {%
-      \XK at storeltnfont
-      \chardef\XKcurrentfont\tw@\hnjmonofont
-      \XK at storecjkfont
-    }%
-  \fi
-  \disablehangulspacing
-}
-
-% using latex 2020's font family hooks
-\edef\@rmfamilyhook{\unexpanded\expandafter{\@rmfamilyhook \XK at rm@korean at font}}
-\edef\@sffamilyhook{\unexpanded\expandafter{\@sffamilyhook \XK at sf@korean at font}}
-\edef\@ttfamilyhook{\unexpanded\expandafter{\@ttfamilyhook \XK at tt@korean at font}}
-\edef\@defaultfamilyhook{\unexpanded\expandafter{\@defaultfamilyhook
-  \XK at default@korean at font }}
-\let\XK at default@korean at font\relax
-
-\edef\verbatim at font{\unexpanded\expandafter{\verbatim at font
-    \disablehangulspacingandlinebreak
-    \let\XKstoreprevfont\XKlatinfont
-}}
-
-% for default font loading
-\def\XKiffontfamilyhasunichar#1#2#3#4{%
-  \begingroup \fontfamily{#1}\selectfont\expandafter\endgroup
-  \iffontchar\font"#2\relax #3\else #4\fi
-}
-
-\AtBeginDocument{%
-  %%%%%%%%%%%%%%%%%%%%%%%%%%
-  % default main hangul: unbatang
-  \ifdefined\kormainfont\else
-    \XKiffontfamilyhasunichar{\rmdefault}{AC00}
-      {\let\kormainfont\relax}
-      {\IfFontExistsTF{UnBatang.ttf}
-        {\setmainhangulfont{UnBatang.ttf}[BoldFont=UnBatangBold.ttf]}
-        {\let\kormainfont\relax}%
-      }%
-  \fi
-  \ifdefined\hnjmainfont\else \let\hnjmainfont\kormainfont \fi
-
-  % default sans hangul: undotum
-  \ifdefined\korsansfont\else
-    \XKiffontfamilyhasunichar{\sfdefault}{AC00}
-      {\let\korsansfont\relax}
-      {\IfFontExistsTF{UnDotum.ttf}
-        {\setsanshangulfont{UnDotum.ttf}[BoldFont=UnDotumBold.ttf]}
-        {\let\korsansfont\relax}%
-      }%
-  \fi
-  \ifdefined\hnjsansfont\else \let\hnjsansfont\korsansfont \fi
-
-  \ifdefined\kormonofont\else \let\kormonofont\korsansfont \fi
-  \ifdefined\hnjmonofont\else \let\hnjmonofont\kormonofont \fi
-  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-  % reset hangul font and normalfont
-  \expandafter\ifx\familydefault\sfdefault
-    \let\XK at default@korean at font\XK at sf@korean at font
-  \else \expandafter\ifx\familydefault\ttdefault
-    \let\XK at default@korean at font\XK at tt@korean at font
-  \else
-    \let\XK at default@korean at font\XK at rm@korean at font
-  \fi\fi
-  \XK at default@korean at font
-  %%%%%%%%%%%%%%%%%%%%%
-  % hangul in math mode
-  \begingroup
-    \ifx\xetexko at math@hangul at family\undefined
-      \edef\@tempb{\sfdefault}\edef\@tempc{\ttdefault}%
-      \ifx\f at family\@tempb \korsansfont \else
-      \ifx\f at family\@tempc \kormonofont \else
-      \kormainfont \fi\fi
-      \xdef\xetexko at math@hangul at family{\f at family}\fi
-  \endgroup
-  \DeclareSymbolFont{mathhangul}\f at encoding\xetexko at math@hangul at family
-    \mddefault\updefault
-  \ifcsname \f at encoding/\xetexko at math@hangul at family/\bfdefault/\updefault\endcsname
-    \SetSymbolFont{mathhangul}{bold}\f at encoding\xetexko at math@hangul at family
-      \bfdefault\updefault
-  \fi
-  \setmathhangulblock{AC00}{D7A3}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%
-% under [hangul] option
-\if at hangul
-  \linespread{1.3888}
-  \footnotesep=1.3888\footnotesep
-  \skip\footins=\glueexpr\skip\footins/72*100\relax
-  % frenchspacing is default
-  \frenchspacing
+\ifdefined\ProvidesPackage
+  \ProvidesPackage{xetexko-font}[2021/03/20 v3.0 A deprecated addendum to XeTeX-ko]
+  \RequirePackage{xetexko}[2021/03/20]
+\else
+  \input xetexko.sty
 \fi
 
 \endinput

Modified: branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,6 +1,6 @@
 % xetexko-hanging.sty
 %
-% Copyright (c) 2013-2020 Dohyun Kim  <nomos at ktug org>
+% Copyright (c) 2013-2021 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
@@ -10,124 +10,13 @@
 % and version 1.3c or later is part of all distributions of LaTeX
 % version 2006/05/20 or later.
 
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
-  \ProvidesPackage{xetexko-hanging}
-    [2020/02/17 v2.23 Hanging punctuations for XeTeX-ko]
+\ifdefined\ProvidesPackage
+  \ProvidesPackage{xetexko-hanging} [2021/03/20 v3.0 A depricated addendum to XeTeX-ko]
+  \RequirePackage{xetexko}[2021/03/20]
+\else
+  \input xetexko.sty
 \fi
 
-\chardef\catcodeofATcharacter\catcode`@
-\catcode`\@ = 11
+\hangingpunctuations
 
-\let\XK at orig@periodboxstop    \XKperiodboxstop
-\let\XK at orig@commaboxstop     \XKcommaboxstop
-\let\XK at orig@closingquotestop \XKclosingquotestop
-\let\XK at orig@openingquotestart\XKopeningquotestart
-\let\XK at orig@postcjkfullstop  \postcjkfullstop
-\let\XK at orig@postcjkcloseparen\postcjkcloseparen
-\let\XK at orig@precjkopenparen@ \precjkopenparen@
-
-\def\disablehangingpunctuation{%
-  \let\XKperiodboxstop    \XK at orig@periodboxstop
-  \let\XKcommaboxstop     \XK at orig@commaboxstop
-  \let\XKclosingquotestop \XK at orig@closingquotestop
-  \let\XKopeningquotestart\XK at orig@openingquotestart
-  \let\postcjkfullstop    \XK at orig@postcjkfullstop
-  \let\postcjkcloseparen  \XK at orig@postcjkcloseparen
-  \let\precjkopenparen@   \XK at orig@precjkopenparen@
-}
-\let\disablehangingpunctuations\disablehangingpunctuation
-
-\ifdefined\strip at pt\else
-  \begingroup
-    \catcode`P=12
-    \catcode`T=12
-    \lowercase{\def\x{\def\rem at pt##1.##2PT{##1\ifnum##2>\z at .##2\fi}}}
-    \expandafter\endgroup\x
-  \def\strip at pt{\expandafter\rem at pt\the}
-\fi
-
-\ifcsname AtBeginDocument\endcsname\else \def\AtBeginDocument#1{#1} \fi
-
-\AtBeginDocument{
-  \begingroup
-    \setbox\z@\hbox{가.}\setbox\tw@\hbox{가}%
-    \xdef\temp at a
-      {\strip at pt\dimexpr(\wd\z at -\wd\tw@)*65536/\number\dimexpr 1em\relax\relax}%
-    \setbox\z@\hbox{가'}%
-    \xdef\temp at b
-      {\strip at pt\dimexpr(\wd\z at -\wd\tw@)*65536/\number\dimexpr 1em\relax\relax}%
-  \endgroup
-  \edef\xetexko at periodwidth{\temp at a em}%
-  \edef\xetexko at quotewidth {\temp at b em}%
-  \def\XKperiodboxstop{%
-    \XK at orig@periodboxstop
-    %\ifnum\XKcurrentfont>\z@
-      \count@\spacefactor
-      \XKH at post@hang\xetexko at periodwidth
-      \spacefactor\count@
-    %\fi
-  }%
-  \def\XKcommaboxstop{%
-    \XK at orig@commaboxstop
-    %\ifnum\XKcurrentfont>\z@
-      \count@\spacefactor
-      \XKH at post@hang\xetexko at periodwidth
-      \spacefactor\count@
-    %\fi
-  }%
-  \def\XKclosingquotestop{%
-    \XK at orig@closingquotestop \XKH at post@hang\xetexko at quotewidth
-  }%
-  \def\XKopeningquotestart{%
-    \XKH at pre@hang\xetexko at quotewidth \XK at orig@openingquotestart
-  }%
-  \def\precjkopenparen@{%
-    \@josa at char@to at number\@let at token\count@
-    \XK at side@bearing\count@\@ne
-    \ifx^^^^201c\@let at token
-      \dimen at ii\dimen@ \advance\dimen at ii-.125em
-      \XKH at pre@hang\dimen at ii
-    \else\ifx^^^^2018\@let at token \XKH at pre@hang\dimen@
-    \fi\fi
-    \leavevmode
-    \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-    \hbox
-    \ifx\XKdisablecjksymbolspacing\empty
-      \bgroup
-    \else
-      to\dimen@\bgroup\hss
-    \fi
-    \XeTeXinterchartoks\XKboundary\XKcjkopening = {\empty}%
-  }%
-  \def\postcjkcloseparen{%
-    \XK at orig@postcjkcloseparen
-    \ifx^^^^3001\@let at token \XKH at post@hang\dimen@
-    \else\ifx^^^^ff0c\@let at token \XKH at post@hang\dimen@
-    \else\ifx^^^^201d\@let at token
-      \dimen at ii\dimen@ \advance\dimen at ii-.125em
-      \XKH at post@hang\dimen at ii
-    \else\ifx^^^^2019\@let at token \XKH at post@hang\dimen@
-    \fi\fi\fi\fi
-  }%
-  \def\postcjkfullstop{%
-    \XK at orig@postcjkfullstop \XKH at post@hang\dimen@
-  }%
-}
-\def\XKH at post@hang#1{%
-  \nobreak\hskip\z@\relax
-  \vrule width-#1 height\z@ depth\z@
-  \kern#1\relax
-}
-\def\XKH at pre@hang#1{%
-  \kern#1\relax
-  \vrule width-#1 height\z@ depth\z@
-  \nobreak\hskip\z@\relax
-}
-
-\let\hangingpunctuation\relax
-\let\hangingpunctuations\relax
-
-\catcode`\@\catcodeofATcharacter
-
 \endinput

Modified: branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,6 +1,6 @@
 % xetexko-josa.sty
 %
-% Copyright (c) 2013-2020 Dohyun Kim  <nomos at ktug org>
+% Copyright (c) 2013-2021 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
@@ -10,214 +10,11 @@
 % and version 1.3c or later is part of all distributions of LaTeX
 % version 2006/05/20 or later.
 
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
-  \ProvidesPackage{xetexko-josa}[2020/02/17 v2.23 Auto-josa for XeTeX-ko]
+\ifdefined\ProvidesPackage
+  \ProvidesPackage{xetexko-josa}[2021/03/20 v3.0 A deprecated addendum to XeTeX-ko]
+  \RequirePackage{xetexko}[2021/03/20]
+\else
+  \input xetexko.sty
 \fi
 
-\unless\ifcsname @tempcnta\endcsname
-  \alloc at 0\count\countdef\insc at unt\@tempcnta\fi
-\unless\ifcsname @tempcntb\endcsname
-  \alloc at 0\count\countdef\insc at unt\@tempcntb\fi
-
-%%% user commands
-\protected\def\jong {\global\let\XK at last@char=0}
-\protected\def\rieul{\global\let\XK at last@char=1}
-\protected\def\jung {\global\let\XK at 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
-\catcode`\0=12
-\global\let\dhucs at cat@eleven=A
-\global\let\dhucs at cat@twelve=0
-\endgroup
-
-\expandafter\def\expandafter\strip at characternum@meaning at prefix\detokenize
-  {the character} #1#2\end{\number`#1\relax}
-\expandafter\def\expandafter\strip at letternum@meaning at prefix\detokenize
-  {the letter} #1#2\end{\number`#1\relax}
-
-\def\@josa at char@to at number#1#2{%
-  \ifcat#1\dhucs at cat@eleven
-    \expandafter\expandafter\expandafter#2\expandafter
-    \strip at letternum@meaning at prefix\meaning#1\end
-  \else\ifcat#1\dhucs at cat@twelve
-    \expandafter\expandafter\expandafter#2\expandafter
-    \strip at characternum@meaning at prefix\meaning#1\end
-  \else
-    #2\z@
-  \fi\fi
-}
-
-\def\josa at char@to at number{%
-  \XeTeXinterchartokenstate\z@
-  \@josa at char@to at number\XK at last@char\count@
-  \@josa at char@to at number\XK at lastlast@char\@tempcnta
-  \@josa at char@to at number\XK at lastlastlast@char\@tempcntb
-  \ifnum\count@="302E
-    \count@\@tempcnta \@tempcnta\@tempcntb
-  \else\ifnum\count@="302F
-    \count@\@tempcnta \@tempcnta\@tempcntb
-  \else\ifnum\count@="1160
-    \count@\@tempcnta \@tempcnta\@tempcntb
-  \fi\fi\fi
-  \XeTeXinterchartokenstate\@ne
-}
-
-\def\josa at last@char at 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
-  \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
-}
-
-\def\josa at hanja@hangul#1{%
-  \begingroup
-  \count@=\z@
-  \openin1=#1\relax \josa at hanja \closein1
-  \endgroup
-}
-\def\josa at hanja{%
-  \read1 to \@tempa
-  \ifnum\count@=\@josa
-    \global\@josa\@tempa \let\next\relax
-  \else
-    \advance\count@\@ne \let\next\josa at hanja
-  \fi
-  \next
-}
-
-\def\num at josa#1{%
-  \bgroup
-  \count@#1%
-  \ifnum\count@<\z@ \count at -\count@ \fi
-  \count\tw@\count@
-  \divide\count\tw@ 10
-  \multiply\count\tw@ 10
-  \advance\count at -\count\tw@
-  \ifcase\count@\@jong\or\@rieul\or\@jung\or\@jong\or\@jung\or
-    \@jung\or\@jong\or\@rieul\or\@rieul\or\@jung\fi
-  \egroup
-}
-
-\def\josa at last@char at cjk{%
-  \ifnum\@josa>19967 \ifnum\@josa<40870 % cjk unified ideographs
-    \advance\@josa-19968 % "4E00
-    \josa at hanja@hangul{hanja_hangul.tab}\fi\fi
-  \ifnum\@josa>13311 \ifnum\@josa<19894 % cjk unified ideographs ext. A
-    \advance\@josa-13312 % "3400
-    \josa at hanja@hangul{hanjaexa_hangul.tab}\fi\fi
-  \ifnum\@josa>63743 \ifnum\@josa<64046 % cjk compatibility ideographs
-    \advance\@josa-63744 % "F900
-    \josa at hanja@hangul{hanjacom_hangul.tab}\fi\fi
-  \ifnum\@josa>44031 \ifnum\@josa<55204 % hangul syllables
-    \advance\@josa-44032 % "AC00
-    \count@=\@josa \divide\count at 28 \multiply\count at 28
-    \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>"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>12592 \ifnum\@josa<12623 % ㄱㄴㄷㄹ
-    \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>12813 \ifnum\@josa<12829 % ㉮ or ㈎
-    \@jung \fi\fi
-  \ifnum\@josa>9311 \ifnum\@josa<9372 % ① or ⑴
-    \advance\@josa\m at ne \num at 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>8543 \ifnum\@josa<8556 % ⅰ ⅱ ⅲ
-    \advance\@josa-3 \num at josa{\@josa}\fi\fi
-  \ifnum\@josa>8559 \ifnum\@josa<8572 % Ⅰ Ⅱ Ⅲ
-    \advance\@josa\@ne \num at josa{\@josa}\fi\fi
-}
-
-\protected\def\makejosa#1#2{%
-  \josa at char@to at number
-  \ifnum\count@<\@cclvi
-    \ifnum\lastskip>\z@\else\XKcjklatinsmallbreak\fi % probably last char is latin ㅠㅠ
-    \josa at last@char at latin
-  \else
-    \@josa\count@
-    \josa at last@char at cjk
-  \fi
-  \ifcase\@josa #2% jong
-  \or \ifx\@empty#1\@empty \else#2\fi% rieul
-  \else #1% jung
-  \fi
-}
-
-\def\가{\makejosa{가}{이}}
-\def\이{\futurelet\dhucs at next\makejosa at I}
-\def\은{\makejosa{는}{은}}
-\def\는{\makejosa{는}{은}}
-\def\을{\makejosa{를}{을}}
-\def\를{\makejosa{를}{을}}
-\def\와{\makejosa{와}{과}}
-\def\과{\makejosa{와}{과}}
-\def\으{\makejosa{}{으}}
-\def\로{\makejosa{}{으}로}
-\def\라{\makejosa{라}{이라}}
-\def\makejosa at I{%
-  \ifcat\dhucs at next\dhucs at cat@twelve
-    \expandafter\expandafter\expandafter\count@\expandafter
-    \strip at characternum@meaning at prefix\meaning\dhucs at next\end
-    \ifnum 0\ifnum\count@>"ABFF \ifnum\count@<"D7A4 1\fi\fi>\z@
-      \makejosa\relax{이}%
-    \else
-      \makejosa{가}{이}%
-    \fi
-  \else
-    \makejosa{가}{이}%
-  \fi
-}
-
 \endinput

Modified: branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,6 +1,6 @@
 % xetexko-space.sty
 %
-% Copyright (c) 2013-2020 Dohyun Kim  <nomos at ktug org>
+% Copyright (c) 2013-2021 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
@@ -10,1641 +10,11 @@
 % and version 1.3c or later is part of all distributions of LaTeX
 % version 2006/05/20 or later.
 
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
-  \ProvidesPackage{xetexko-space}
-    [2020/02/17 v2.23 Spacings and fonts for XeTeX-ko]
-\fi
-
-%%% we need XeTeX > 0.997
-\ifx\XeTeXinterchartoks\XeTeXcharclass
-  \errmessage{This package requires XeTeX 0.997 or higher.}
-  \expandafter\endinput
-\fi
-\ifcsname newXeTeXintercharclass\endcsname\else
-  \errmessage{This package requires TeXLive 2009 or higher.}
-  \expandafter\endinput
-\fi
-
-\unless\ifcsname @sptoken\endcsname
-  {\def\:{\global\let\@sptoken= } \: }% space token
-\fi
-
-%%%%%%%%%%%%%%%%%%%%%
-% assign char classes
-
-\def\XK at assign@char at class#1#2#3{%
-  \count@=#1\relax
-  \loop
-    \ifx #3\XKhangulsyllable
-      \catcode\count@ = 12 % revert recent change of unicode-letters.tex
-    \fi
-    \XeTeXcharclass\count@ = #3\relax
-    \ifnum\count@<#2\relax \advance\count@\@ne
-  \repeat
-}
-
-% xetex 0.99994 extended char class limit.
-\ifdim\the\XeTeXversion\XeTeXrevision pt<0.99994pt
-  \let\XeTeXcharclassIgnore\@cclvi
-  \let\XKboundary\@cclv
+\ifdefined\ProvidesPackage
+  \ProvidesPackage{xetexko-space}[2021/03/20 v3.0 A deprecated addendum to XeTeX-ko]
+  \RequirePackage{xetexko}[2021/03/20]
 \else
-  \chardef\XeTeXcharclassIgnore=4096
-  \chardef\XKboundary=4095
+  \input xetexko.sty
 \fi
-% from JW
-\ifdefined\XeTeXcharclassID\else
-  \ifdefined\xtxHanGlue
-    \let\XeTeXcharclassID\@ne
-    \let\XeTeXcharclassOP\tw@
-    \let\XeTeXcharclassCL\thr@@
-  \else
-    \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
 
-\let     \XKhanja         \XeTeXcharclassID
-\let     \XKcjkopening    \XeTeXcharclassOP
-\let     \XKcjkclosing    \XeTeXcharclassCL
-\let     \XKlatinchar     \z@
-
-\XeTeXcharclass "2018 = \XKcjkopening    % ‘
-\XeTeXcharclass "201C = \XKcjkopening    % “
-
-\XeTeXcharclass "2019 = \XKcjkclosing    % ’
-\XeTeXcharclass "201D = \XKcjkclosing    % ”
-
-\XeTeXcharclass "25A1 = \XKhanja         % □
-
-%%% small kana (something has changed)
-\newXeTeXintercharclass \XKsmallkana
-\XeTeXcharclass "3041 = \XKsmallkana
-\XeTeXcharclass "3043 = \XKsmallkana
-\XeTeXcharclass "3045 = \XKsmallkana
-\XeTeXcharclass "3047 = \XKsmallkana
-\XeTeXcharclass "3049 = \XKsmallkana
-\XeTeXcharclass "3063 = \XKsmallkana
-\XeTeXcharclass "3083 = \XKsmallkana
-\XeTeXcharclass "3085 = \XKsmallkana
-\XeTeXcharclass "3087 = \XKsmallkana
-\XeTeXcharclass "308E = \XKsmallkana
-\XeTeXcharclass "3095 = \XKsmallkana
-\XeTeXcharclass "3096 = \XKsmallkana
-\XeTeXcharclass "30A1 = \XKsmallkana
-\XeTeXcharclass "30A3 = \XKsmallkana
-\XeTeXcharclass "30A5 = \XKsmallkana
-\XeTeXcharclass "30A7 = \XKsmallkana
-\XeTeXcharclass "30A9 = \XKsmallkana
-\XeTeXcharclass "30C3 = \XKsmallkana
-\XeTeXcharclass "30E3 = \XKsmallkana
-\XeTeXcharclass "30E5 = \XKsmallkana
-\XeTeXcharclass "30E7 = \XKsmallkana
-\XeTeXcharclass "30EE = \XKsmallkana
-\XeTeXcharclass "30F5 = \XKsmallkana
-\XeTeXcharclass "30F6 = \XKsmallkana
-\XeTeXcharclass "30FC = \XKsmallkana
-\XK at assign@char at class{"31F0}{"31FF}\XKsmallkana
-\XK at assign@char at class{"FF67}{"FF70}\XKsmallkana
-
-%%% cjk colons
-\newXeTeXintercharclass \XKcjkcolon
-\XeTeXcharclass "00B7 = \XKcjkcolon % ·
-\XeTeXcharclass "30FB = \XKcjkcolon % ・
-\XeTeXcharclass "FF1A = \XKcjkcolon % :
-\XeTeXcharclass "FE13 = \XKcjkcolon % ︓
-\XeTeXcharclass "FF1B = \XKcjkcolon % ;
-\XeTeXcharclass "FE14 = \XKcjkcolon % ︔
-
-%%% cjk fullstops
-\newXeTeXintercharclass \XKcjkfullstop
-\XeTeXcharclass "3002 = \XKcjkfullstop % 。
-\XeTeXcharclass "FE12 = \XKcjkfullstop % ︒
-\XeTeXcharclass "FF0E = \XKcjkfullstop % .
-
-%%% cjk liaisons
-\newXeTeXintercharclass \XKcjkliaison
-\XeTeXcharclass "2015 = \XKcjkliaison % ―
-\XeTeXcharclass "2026 = \XKcjkliaison % …
-\XeTeXcharclass "FE19 = \XKcjkliaison % ︙
-\XeTeXcharclass "2025 = \XKcjkliaison % ‥
-\XeTeXcharclass "FE30 = \XKcjkliaison % ︰
-
-%%% cjk question/exclamation marks
-\newXeTeXintercharclass \XKcjkextrastop
-\XeTeXcharclass "FF1F = \XKcjkextrastop % ?
-\XeTeXcharclass "FF01 = \XKcjkextrastop % !
-
-%%% other cjk symbols
-\newXeTeXintercharclass \XKcjksymbol
-%%  still missing:
-%%    00AD ­
-%%    0138 ĸ
-%%    0149 ʼn
-%%    0166 Ŧ
-%%    0167 ŧ
-%%    0370.. greek letters
-%%    0400.. cyrillic letters
-\XeTeXcharclass "00B2 = \XKcjksymbol % ²
-\XeTeXcharclass "00B3 = \XKcjksymbol % ³
-\XeTeXcharclass "00B9 = \XKcjksymbol % ¹
-\XeTeXcharclass "00BC = \XKcjksymbol % ¼
-\XeTeXcharclass "00BD = \XKcjksymbol % ½
-\XeTeXcharclass "00BE = \XKcjksymbol % ¾
-\XeTeXcharclass "02D0 = \XKcjksymbol % ː
-\XeTeXcharclass "2032 = \XKcjksymbol % ′
-\XeTeXcharclass "2033 = \XKcjksymbol % ″
-\XeTeXcharclass "203B = \XKcjksymbol % ※
-\XeTeXcharclass "2074 = \XKcjksymbol % ⁴
-\XeTeXcharclass "207F = \XKcjksymbol % ⁿ
-\XeTeXcharclass "2081 = \XKcjksymbol % ₁
-\XeTeXcharclass "2082 = \XKcjksymbol % ₂
-\XeTeXcharclass "2083 = \XKcjksymbol % ₃
-\XeTeXcharclass "2084 = \XKcjksymbol % ₄
-\XeTeXcharclass "2103 = \XKcjksymbol % ℃  changed from smallkana
-\XeTeXcharclass "2109 = \XKcjksymbol % ℉  changed from smallkana
-\XeTeXcharclass "2113 = \XKcjksymbol % ℓ  changed from smallkana
-\XeTeXcharclass "2121 = \XKcjksymbol % ℡
-\XeTeXcharclass "2122 = \XKcjksymbol % ™
-\XeTeXcharclass "212B = \XKcjksymbol % Å  changed from smallkana
-\XeTeXcharclass "2153 = \XKcjksymbol % ⅓
-\XeTeXcharclass "2154 = \XKcjksymbol % ⅔
-\XeTeXcharclass "215B = \XKcjksymbol % ⅛
-\XeTeXcharclass "215C = \XKcjksymbol % ⅜
-\XeTeXcharclass "215D = \XKcjksymbol % ⅝
-\XeTeXcharclass "215E = \XKcjksymbol % ⅞
-\XK at assign@char at class{"2160}{"216B}\XKcjksymbol % Ⅰ .. Ⅻ
-\XK at assign@char at class{"2170}{"217B}\XKcjksymbol % ⅰ .. ⅻ
-%% math symbols (?)
-\XK at assign@char at class{"2190}{"2199}\XKcjksymbol % ← .. ↙
-\XeTeXcharclass "21D2 = \XKcjksymbol % ⇒
-\XeTeXcharclass "21D4 = \XKcjksymbol % ⇔
-\XeTeXcharclass "2200 = \XKcjksymbol % ∀
-\XeTeXcharclass "2202 = \XKcjksymbol % ∂
-\XeTeXcharclass "2203 = \XKcjksymbol % ∃
-\XeTeXcharclass "2207 = \XKcjksymbol % ∇
-\XeTeXcharclass "2208 = \XKcjksymbol % ∈
-\XeTeXcharclass "220B = \XKcjksymbol % ∋
-\XeTeXcharclass "220F = \XKcjksymbol % ∏
-\XeTeXcharclass "2211 = \XKcjksymbol % ∑
-\XeTeXcharclass "221A = \XKcjksymbol % √
-\XeTeXcharclass "221D = \XKcjksymbol % ∝
-\XeTeXcharclass "2220 = \XKcjksymbol % ∠
-\XeTeXcharclass "2225 = \XKcjksymbol % ∥
-\XeTeXcharclass "2227 = \XKcjksymbol % ∧
-\XeTeXcharclass "2228 = \XKcjksymbol % ∨
-\XeTeXcharclass "2229 = \XKcjksymbol % ∩
-\XeTeXcharclass "222A = \XKcjksymbol % ∪
-\XeTeXcharclass "222B = \XKcjksymbol % ∫
-\XeTeXcharclass "222C = \XKcjksymbol % ∬
-\XeTeXcharclass "222E = \XKcjksymbol % ∮
-\XeTeXcharclass "2234 = \XKcjksymbol % ∴
-\XeTeXcharclass "2235 = \XKcjksymbol % ∵
-\XeTeXcharclass "223C = \XKcjksymbol % ∼
-\XeTeXcharclass "223D = \XKcjksymbol % ∽
-\XeTeXcharclass "2252 = \XKcjksymbol % ≒
-\XeTeXcharclass "2260 = \XKcjksymbol % ≠
-\XeTeXcharclass "2261 = \XKcjksymbol % ≡
-\XeTeXcharclass "2264 = \XKcjksymbol % ≤
-\XeTeXcharclass "2265 = \XKcjksymbol % ≥
-\XeTeXcharclass "226A = \XKcjksymbol % ≪
-\XeTeXcharclass "226B = \XKcjksymbol % ≫
-\XeTeXcharclass "2282 = \XKcjksymbol % ⊂
-\XeTeXcharclass "2283 = \XKcjksymbol % ⊃
-\XeTeXcharclass "2286 = \XKcjksymbol % ⊆
-\XeTeXcharclass "2287 = \XKcjksymbol % ⊇
-\XeTeXcharclass "2299 = \XKcjksymbol % ⊙
-\XeTeXcharclass "22A5 = \XKcjksymbol % ⊥
-\XeTeXcharclass "2312 = \XKcjksymbol % ⌒
-\XK at assign@char at class{"2460}{"24EA}\XKcjksymbol % ① .. ⓪
-\XeTeXcharclass "2500 = \XKcjksymbol % ─
-\XeTeXcharclass "2501 = \XKcjksymbol % ━
-\XeTeXcharclass "2502 = \XKcjksymbol % │
-\XeTeXcharclass "2503 = \XKcjksymbol % ┃
-\XK at assign@char at class{"250C}{"254B}\XKcjksymbol % ─ .. ╋
-\XeTeXcharclass "2592 = \XKcjksymbol % ▒
-\XeTeXcharclass "25A0 = \XKcjksymbol % ■
-%\XeTeXcharclass "25A1 = \XKcjksymbol % □
-\XeTeXcharclass "25A3 = \XKcjksymbol % ▣
-\XeTeXcharclass "25A4 = \XKcjksymbol % ▤
-\XeTeXcharclass "25A5 = \XKcjksymbol % ▥
-\XeTeXcharclass "25A6 = \XKcjksymbol % ▦
-\XeTeXcharclass "25A7 = \XKcjksymbol % ▧
-\XeTeXcharclass "25A8 = \XKcjksymbol % ▨
-\XeTeXcharclass "25A9 = \XKcjksymbol % ▩
-\XeTeXcharclass "25B2 = \XKcjksymbol % ▲
-\XeTeXcharclass "25B3 = \XKcjksymbol % △
-\XeTeXcharclass "25B6 = \XKcjksymbol % ▶
-\XeTeXcharclass "25B7 = \XKcjksymbol % ▷
-\XeTeXcharclass "25BC = \XKcjksymbol % ▼
-\XeTeXcharclass "25BD = \XKcjksymbol % ▽
-\XeTeXcharclass "25C0 = \XKcjksymbol % ◀
-\XeTeXcharclass "25C1 = \XKcjksymbol % ◁
-\XeTeXcharclass "25C6 = \XKcjksymbol % ◆
-\XeTeXcharclass "25C7 = \XKcjksymbol % ◇
-\XeTeXcharclass "25C8 = \XKcjksymbol % ◈
-\XeTeXcharclass "25CB = \XKcjksymbol % ○
-\XeTeXcharclass "25CE = \XKcjksymbol % ◎
-\XeTeXcharclass "25CF = \XKcjksymbol % ●
-\XeTeXcharclass "25D0 = \XKcjksymbol % ◐
-\XeTeXcharclass "25D1 = \XKcjksymbol % ◑
-\XeTeXcharclass "2605 = \XKcjksymbol % ★
-\XeTeXcharclass "2606 = \XKcjksymbol % ☆
-\XeTeXcharclass "260E = \XKcjksymbol % ☎
-\XeTeXcharclass "260F = \XKcjksymbol % ☏
-\XeTeXcharclass "261C = \XKcjksymbol % ☜
-\XeTeXcharclass "261E = \XKcjksymbol % ☞
-\XeTeXcharclass "2640 = \XKcjksymbol % ♀
-\XeTeXcharclass "2642 = \XKcjksymbol % ♂
-\XeTeXcharclass "2660 = \XKcjksymbol % ♠
-\XeTeXcharclass "2661 = \XKcjksymbol % ♡
-\XeTeXcharclass "2663 = \XKcjksymbol % ♣
-\XeTeXcharclass "2664 = \XKcjksymbol % ♤
-\XeTeXcharclass "2665 = \XKcjksymbol % ♥
-\XeTeXcharclass "2667 = \XKcjksymbol % ♧
-\XeTeXcharclass "2668 = \XKcjksymbol % ♨
-\XeTeXcharclass "2669 = \XKcjksymbol % ♩
-\XeTeXcharclass "266A = \XKcjksymbol % ♪
-\XeTeXcharclass "266C = \XKcjksymbol % ♬
-\XeTeXcharclass "266D = \XKcjksymbol % ♭
-\XeTeXcharclass "3012 = \XKcjksymbol % 〒
-\XeTeXcharclass "301C = \XKcjksymbol % 〜
-\XeTeXcharclass "FF04 = \XKcjksymbol % $
-\XeTeXcharclass "FF05 = \XKcjksymbol % %
-\XeTeXcharclass "FF5E = \XKcjksymbol % ~
-\XeTeXcharclass "FFE0 = \XKcjksymbol % ¢
-\XeTeXcharclass "FFE1 = \XKcjksymbol % £
-\XeTeXcharclass "FFE5 = \XKcjksymbol % ¥
-\XeTeXcharclass "FFE6 = \XKcjksymbol % ₩
-
-%%% hangul syllables
-\newXeTeXintercharclass \XKhangulsyllable
-\XK at assign@char at class{"AC00}{"D7A3}\XKhangulsyllable
-% treat compatibility jamo as hangul syllable
-\XK at assign@char at class{"3131}{"318E}\XKhangulsyllable
-% leading consonants jamo as well
-\XK at assign@char at class{"1100}{"115F}\XKhangulsyllable
-\XK at assign@char at class{"A960}{"A97C}\XKhangulsyllable
-
-%%% jungseong/jongseong jamo including tone marks
-\newXeTeXintercharclass \XKhanguljungjong
-\XK at assign@char at class{"1160}{"11FF}\XKhanguljungjong
-\XK at assign@char at class{"D7B0}{"D7FB}\XKhanguljungjong
-\XeTeXcharclass "302E = \XKhanguljungjong
-\XeTeXcharclass "302F = \XKhanguljungjong
-
-%%% latin openings
-\newXeTeXintercharclass \XKlatinopening
-\XeTeXcharclass`\(    = \XKlatinopening
-\XeTeXcharclass`\[    = \XKlatinopening
-\XeTeXcharclass`\{    = \XKlatinopening
-\XeTeXcharclass`\<    = \XKlatinopening
-
-%%% latin closings
-\newXeTeXintercharclass \XKlatinclosing
-\XeTeXcharclass`\)    = \XKlatinclosing
-\XeTeXcharclass`\]    = \XKlatinclosing
-\XeTeXcharclass`\}    = \XKlatinclosing
-\XeTeXcharclass`\>    = \XKlatinclosing
-
-%%% latin quotes
-\newXeTeXintercharclass\XKopeningquote
-\XeTeXcharclass`\`   = \XKopeningquote
-\newXeTeXintercharclass\XKclosingquote
-\XeTeXcharclass`\'   = \XKclosingquote
-\XeTeXcharclass`\"   = \XKclosingquote
-
-%%% latin full stop
-\newXeTeXintercharclass \XKlatinfullstop
-\XeTeXcharclass `\. = \XKlatinfullstop
-
-%%% latin questions/exclamations
-\newXeTeXintercharclass \XKlatinquestion
-\XeTeXcharclass `\? = \XKlatinquestion
-\newXeTeXintercharclass \XKlatinexclamation
-\XeTeXcharclass `\! = \XKlatinexclamation
-
-%%% latin hyphen including /
-\newXeTeXintercharclass \XKlatinhyphen
-\XeTeXcharclass `\- = \XKlatinhyphen % this affects -- --- ligatures
-\XeTeXcharclass `\/ = \XKlatinhyphen
-
-%%% latin comma
-\newXeTeXintercharclass \XKlatincomma
-\XeTeXcharclass `\, = \XKlatincomma
-
-%%% latin colons
-\newXeTeXintercharclass \XKlatincolon
-\XeTeXcharclass `\:   = \XKlatincolon
-\XeTeXcharclass `\;   = \XKlatincolon
-\XeTeXcharclass "2013 = \XKlatincolon % – ? liaison
-\XeTeXcharclass "2014 = \XKlatincolon % — ? liaison
-
-%%% latin numbers
-\newXeTeXintercharclass \XKlatinnumber
-\XK at assign@char at class{`0}{`9}\XKlatinnumber
-
-%%% variation selectors
-\newXeTeXintercharclass \XKhanjacombining
-\XK at assign@char at class{"FE00}{"FE0F}\XKhanjacombining
-\XK at assign@char at class{"E0100}{"E01EF}\XKhanjacombining
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% define inter char tokes
-%%% ? latin numbers
-\XeTeXinterchartoks \XKlatinchar        \XKlatinnumber = {\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinnumber = {\XKlastchar}
-\XeTeXinterchartoks \XKlatinopening     \XKlatinnumber = {\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatinnumber = {\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinnumber = {\XKopeningquotestop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinnumber = {\XKclosingquotestop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKhanja            \XKlatinnumber = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinnumber = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinnumber = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinnumber = {\XKcjkcharboxstop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinnumber = {\postcjkopenparen\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinnumber = {\postcjkcloseparen\XKhalfsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinnumber = {\postcjkcolon\XKquatersmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinnumber = {\postcjkfullstop\XKfixedhalfskip\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinnumber = {\XKcjkcharboxstop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinnumber = {\XKcjkcharboxstop\XKhalfsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinnumber = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinnumber = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinfullstop    \XKlatinnumber = {\XKperiodboxstop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinquestion    \XKlatinnumber = {\XKquestionboxstop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinexclamation \XKlatinnumber = {\XKexclamationboxstop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatincomma       \XKlatinnumber = {\XKcommaboxstop\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinnumber = {\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinnumber = {\XKlatinnumfont\XKlastchar}
-\XeTeXinterchartoks \XKboundary         \XKlatinnumber = {\XKundoignorespaces\XKlatinnumfont\XKbeginboundary\XKlastchar}
-
-%%% ? latin alphabets
-\XeTeXinterchartoks \XKlatinchar        \XKlatinchar = {\XKlastchar}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinchar = {\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinopening     \XKlatinchar = {\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatinchar = {\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinchar = {\XKopeningquotestop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinchar = {\XKclosingquotestop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKhanja            \XKlatinchar = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinchar = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinchar = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinchar = {\XKcjkcharboxstop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinchar = {\postcjkopenparen\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinchar = {\postcjkcloseparen\XKhalfsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinchar = {\postcjkcolon\XKquatersmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinchar = {\postcjkfullstop\XKfixedhalfskip\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinchar = {\XKcjkcharboxstop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinchar = {\XKcjkcharboxstop\XKhalfsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinchar = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinchar = {\XKcjkcharboxstop\XKcjklatinsmallbreak\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinfullstop    \XKlatinchar = {\XKperiodboxstop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinquestion    \XKlatinchar = {\XKquestionboxstop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinexclamation \XKlatinchar = {\XKexclamationboxstop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatincomma       \XKlatinchar = {\XKcommaboxstop\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinchar = {\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinchar = {\XKmaybelatinfont\XKlastchar}
-\XeTeXinterchartoks \XKboundary         \XKlatinchar = {\XKundoignorespaces\XKmaybelatinfont\XKbeginboundary\XKlastchar}
-
-%%% ? hanja
-\XeTeXinterchartoks \XKlatinchar        \XKhanja = {\XKhanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinnumber      \XKhanja = {\XKhanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinopening     \XKhanja = {\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinclosing     \XKhanja = {\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKopeningquote     \XKhanja = {\XKopeningquotestop\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKclosingquote     \XKhanja = {\XKclosingquotestop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhanja            \XKhanja = {\XKcjkcharboxstop\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhanjacombining   \XKhanja = {\XKcjkcharboxstop\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKsmallkana        \XKhanja = {\XKcjkcharboxstop\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjksymbol        \XKhanja = {\XKcjkcharboxstop\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkopening       \XKhanja = {\postcjkopenparen\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkclosing       \XKhanja = {\postcjkcloseparen\XKhalfsmallbreak\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkcolon         \XKhanja = {\postcjkcolon\XKquatersmallbreak\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkfullstop      \XKhanja = {\postcjkfullstop\XKfixedhalfskip\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkliaison       \XKhanja = {\XKcjkcharboxstop\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkextrastop     \XKhanja = {\XKcjkcharboxstop\XKhalfsmallbreak\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhangulsyllable   \XKhanja = {\XKcjkcharboxstop\XKhanjafont\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhanguljungjong   \XKhanja = {\XKcjkcharboxstop\XKhanjafont\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinfullstop    \XKhanja = {\XKperiodboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinquestion    \XKhanja = {\XKquestionboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinexclamation \XKhanja = {\XKexclamationboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatincomma       \XKhanja = {\XKcommaboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatincolon       \XKhanja = {\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinhyphen      \XKhanja = {\XKhanjafont\XKzeroskip\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKboundary         \XKhanja = {\XKhanjafont\XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart\XKhanjalastchar}
-
-%%% ? small kana
-\XeTeXinterchartoks \XKlatinchar        \XKsmallkana = {\XKhanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinnumber      \XKsmallkana = {\XKhanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinopening     \XKsmallkana = {\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinclosing     \XKsmallkana = {\XKhanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKopeningquote     \XKsmallkana = {\XKopeningquotestop\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKclosingquote     \XKsmallkana = {\XKclosingquotestop\XKhanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhanja            \XKsmallkana = {\XKcjkcharboxstop\XKnobreak\XKzeroskip\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhanjacombining   \XKsmallkana = {\XKcjkcharboxstop\XKnobreak\XKzeroskip\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKsmallkana        \XKsmallkana = {\XKcjkcharboxstop\XKnobreak\XKzeroskip\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjksymbol        \XKsmallkana = {\XKcjkcharboxstop\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkopening       \XKsmallkana = {\postcjkopenparen\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkclosing       \XKsmallkana = {\postcjkcloseparen\XKhalfsmallbreak\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkcolon         \XKsmallkana = {\postcjkcolon\XKquatersmallbreak\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkfullstop      \XKsmallkana = {\postcjkfullstop\XKfixedhalfskip\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkliaison       \XKsmallkana = {\XKcjkcharboxstop\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKcjkextrastop     \XKsmallkana = {\XKcjkcharboxstop\XKhalfsmallbreak\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhangulsyllable   \XKsmallkana = {\XKcjkcharboxstop\XKhanjafont\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKhanguljungjong   \XKsmallkana = {\XKcjkcharboxstop\XKhanjafont\XKinterhanjabreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinfullstop    \XKsmallkana = {\XKperiodboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinquestion    \XKsmallkana = {\XKquestionboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinexclamation \XKsmallkana = {\XKexclamationboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatincomma       \XKsmallkana = {\XKcommaboxstop\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatincolon       \XKsmallkana = {\XKhanjafont\XKcjklatinbreak\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKlatinhyphen      \XKsmallkana = {\XKhanjafont\XKcjkcharboxstart\XKhanjalastchar}
-\XeTeXinterchartoks \XKboundary         \XKsmallkana = {\XKhanjafont\XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart\XKhanjalastchar}
-
-%%% ? cjk symbols
-\XeTeXinterchartoks \XKlatinchar        \XKcjksymbol = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjksymbol = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKcjksymbol = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjksymbol = {\XKmaybehanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKcjksymbol = {\XKopeningquotestop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKcjksymbol = {\XKclosingquotestop\XKmaybehanjafont\XKcjklatinsmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanja            \XKcjksymbol = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjksymbol = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKcjksymbol = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-%\XeTeXinterchartoks \XKcjksymbol        \XKcjksymbol = {}
-\XeTeXinterchartoks \XKcjkopening       \XKcjksymbol = {\postcjkopenparen\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjksymbol = {\postcjkcloseparen\XKhalfsmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjksymbol = {\postcjkcolon\XKquatersmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjksymbol = {\postcjkfullstop\XKfixedhalfskip\XKcjkcharboxstart}
-%\XeTeXinterchartoks \XKcjkliaison       \XKcjksymbol = {}
-\XeTeXinterchartoks \XKcjkextrastop     \XKcjksymbol = {\XKcjkcharboxstop\XKhalfsmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjksymbol = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjksymbol = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjksymbol = {\XKperiodboxstop\XKmaybehanjafont\XKcjklatinbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjksymbol = {\XKquestionboxstop\XKmaybehanjafont\XKcjklatinbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjksymbol = {\XKexclamationboxstop\XKmaybehanjafont\XKcjklatinbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatincomma       \XKcjksymbol = {\XKcommaboxstop\XKmaybehanjafont\XKcjklatinbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatincolon       \XKcjksymbol = {\XKmaybehanjafont\XKcjklatinbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjksymbol = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKboundary         \XKcjksymbol = {\XKmaybehanjafont\XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart}
-
-%%% ? cjk openings
-\XeTeXinterchartoks \XKlatinchar        \XKcjkopening = {\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjkopening = {\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatinopening     \XKcjkopening = {\XKmaybehanjafont\precjkopenparen}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjkopening = {\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKopeningquote     \XKcjkopening = {\XKopeningquotestop\XKmaybehanjafont\precjkopenparen}
-\XeTeXinterchartoks \XKclosingquote     \XKcjkopening = {\XKclosingquotestop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKhanja            \XKcjkopening = {\XKcjkcharboxstop\XKhalfsmallbreak\XKmaybehanjafont\precjkopenparen}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjkopening = {\XKcjkcharboxstop\XKhalfsmallbreak\XKmaybehanjafont\precjkopenparen}
-\XeTeXinterchartoks \XKsmallkana        \XKcjkopening = {\XKcjkcharboxstop\XKhalfsmallbreak\XKmaybehanjafont\precjkopenparen}
-\XeTeXinterchartoks \XKcjksymbol        \XKcjkopening = {\XKcjkcharboxstop\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKcjkopening       \XKcjkopening = {\postcjkopenparen\precjkopenparen}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjkopening = {\postcjkcloseparen\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjkopening = {\postcjkcolon\XKquatersmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjkopening = {\postcjkfullstop\XKfixedhalfskip\precjkopenparen}
-\XeTeXinterchartoks \XKcjkliaison       \XKcjkopening = {\XKcjkcharboxstop\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKcjkextrastop     \XKcjkopening = {\XKcjkcharboxstop\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjkopening = {\XKcjkcharboxstop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjkopening = {\XKcjkcharboxstop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjkopening = {\XKperiodboxstop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjkopening = {\XKquestionboxstop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjkopening = {\XKexclamationboxstop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatincomma       \XKcjkopening = {\XKcommaboxstop\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatincolon       \XKcjkopening = {\XKmaybehanjafont\XKhalfsmallbreak\precjkopenparen}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjkopening = {\XKmaybehanjafont\XKzeroskip\precjkopenparen}
-\XeTeXinterchartoks \XKboundary         \XKcjkopening = {\XKmaybehanjafont\XKafterboundaryskip\XKbeginboundary\precjkopenparen}
-
-%%% ? cjk closings
-\XeTeXinterchartoks \XKlatinchar        \XKcjkclosing = {\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjkclosing = {\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinopening     \XKcjkclosing = {\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjkclosing = {\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKopeningquote     \XKcjkclosing = {\XKopeningquotestop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKclosingquote     \XKcjkclosing = {\XKclosingquotestop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKhanja            \XKcjkclosing = {\XKcjkcharboxstop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjkclosing = {\XKcjkcharboxstop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKsmallkana        \XKcjkclosing = {\XKcjkcharboxstop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKcjksymbol        \XKcjkclosing = {\XKcjkcharboxstop\precjkcloseparen}
-\XeTeXinterchartoks \XKcjkopening       \XKcjkclosing = {\postcjkopenparen\precjkcloseparen}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjkclosing = {\postcjkcloseparen\precjkcloseparen}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjkclosing = {\postcjkcolon\XKnobreak\XKquatersmallbreak\precjkcloseparen}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjkclosing = {\postcjkfullstop\precjkcloseparen}
-\XeTeXinterchartoks \XKcjkliaison       \XKcjkclosing = {\XKcjkcharboxstop\precjkcloseparen}
-\XeTeXinterchartoks \XKcjkextrastop     \XKcjkclosing = {\XKcjkcharboxstop\precjkcloseparen}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjkclosing = {\XKcjkcharboxstop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjkclosing = {\XKcjkcharboxstop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjkclosing = {\XKperiodboxstop\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjkclosing = {\XKquestionboxstop\XKmaybehanjafont\XKnobreak\XKcjklatinbreak\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjkclosing = {\XKexclamationboxstop\XKmaybehanjafont\XKnobreak\XKcjklatinbreak\precjkcloseparen}
-\XeTeXinterchartoks \XKlatincomma       \XKcjkclosing = {\XKcommaboxstop\XKmaybehanjafont\XKnobreak\XKcjklatinbreak\precjkcloseparen}
-\XeTeXinterchartoks \XKlatincolon       \XKcjkclosing = {\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjkclosing = {\XKmaybehanjafont\precjkcloseparen}
-\XeTeXinterchartoks \XKboundary         \XKcjkclosing = {\XKmaybehanjafont\XKbeginboundary\precjkcloseparen}
-
-%%% ? latin openings
-\XeTeXinterchartoks \XKlatinchar        \XKlatinopening = {\XKwaslatinchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinopening = {\XKwaslatinchar\XKlatinparenfont}
-%\XeTeXinterchartoks \XKlatinopening     \XKlatinopening = {}
-%\XeTeXinterchartoks \XKlatinclosing     \XKlatinopening = {}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinopening = {\XKopeningquotestop\XKlatinparenfont}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinopening = {\XKclosingquotestop\XKzeroskip\XKlatinparenfont}
-\XeTeXinterchartoks \XKhanja            \XKlatinopening = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinopening = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinopening = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinopening = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinopening = {\postcjkopenparen\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinopening = {\postcjkcloseparen\XKhalfsmallbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinopening = {\postcjkcolon\XKquatersmallbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinopening = {\postcjkfullstop\XKfixedhalfskip\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinopening = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinopening = {\XKcjkcharboxstop\XKhalfsmallbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinopening = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinopening = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinfullstop    \XKlatinopening = {\XKperiodboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinquestion    \XKlatinopening = {\XKquestionboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinexclamation \XKlatinopening = {\XKexclamationboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatincomma       \XKlatinopening = {\XKcommaboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinopening = {\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinopening = {\XKlatinparenfont}
-\XeTeXinterchartoks \XKboundary         \XKlatinopening = {\XKundoignorespaces\XKlatinparenfont\XKbeginboundary}
-
-%%% ? latin opening quote `
-\XeTeXinterchartoks \XKlatinchar        \XKopeningquote = {\XKwaslatinchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinnumber      \XKopeningquote = {\XKwaslatinchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinopening     \XKopeningquote = {\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinclosing     \XKopeningquote = {\XKlatinquotefont\XKopeningquotestart}
-%\XeTeXinterchartoks \XKopeningquote     \XKopeningquote = {}
-\XeTeXinterchartoks \XKclosingquote     \XKopeningquote = {\XKclosingquotestop\XKopeningquotestart}
-\XeTeXinterchartoks \XKhanja            \XKopeningquote = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKhanjacombining   \XKopeningquote = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKsmallkana        \XKopeningquote = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjksymbol        \XKopeningquote = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjkopening       \XKopeningquote = {\postcjkopenparen\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjkclosing       \XKopeningquote = {\postcjkcloseparen\XKhalfsmallbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjkcolon         \XKopeningquote = {\postcjkcolon\XKquatersmallbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKopeningquote = {\postcjkfullstop\XKfixedhalfskip\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjkliaison       \XKopeningquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKcjkextrastop     \XKopeningquote = {\XKcjkcharboxstop\XKhalfsmallbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKopeningquote = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKopeningquote = {\XKcjkcharboxstop\XKcjklatinbreak\XKwascjkchar\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinfullstop    \XKopeningquote = {\XKperiodboxstop\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinquestion    \XKopeningquote = {\XKquestionboxstop\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinexclamation \XKopeningquote = {\XKexclamationboxstop\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatincomma       \XKopeningquote = {\XKcommaboxstop\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatincolon       \XKopeningquote = {\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKopeningquote = {\XKlatinquotefont\XKopeningquotestart}
-\XeTeXinterchartoks \XKboundary         \XKopeningquote = {\XKundoignorespaces\XKlatinquotefont\XKbeginboundary\XKopeningquotestart}
-
-%%% ? latin closings
-\XeTeXinterchartoks \XKlatinchar        \XKlatinclosing = {\XKwaslatinchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinclosing = {\XKwaslatinchar\XKlatinparenfont}
-%\XeTeXinterchartoks \XKlatinopening     \XKlatinclosing = {}
-%\XeTeXinterchartoks \XKlatinclosing     \XKlatinclosing = {}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinclosing = {\XKopeningquotestop\XKlatinparenfont}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinclosing = {\XKclosingquotestop\XKlatinparenfont}
-\XeTeXinterchartoks \XKhanja            \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinclosing = {\postcjkopenparen\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinclosing = {\postcjkcloseparen\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinclosing = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinclosing = {\postcjkfullstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinclosing = {\XKcjkcharboxstop\XKwascjkchar\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinfullstop    \XKlatinclosing = {\XKperiodboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinquestion    \XKlatinclosing = {\XKquestionboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinexclamation \XKlatinclosing = {\XKexclamationboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatincomma       \XKlatinclosing = {\XKcommaboxstop\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinclosing = {\XKlatinparenfont}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinclosing = {\XKlatinparenfont}
-\XeTeXinterchartoks \XKboundary         \XKlatinclosing = {\XKundoignorespaces\XKlatinparenfont\XKbeginboundary}
-
-%%% ? latin closing quote '
-\XeTeXinterchartoks \XKlatinchar        \XKclosingquote = {\XKwaslatinchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinnumber      \XKclosingquote = {\XKwaslatinchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinopening     \XKclosingquote = {\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinclosing     \XKclosingquote = {\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKopeningquote     \XKclosingquote = {\XKopeningquotestop\XKclosingquotestart}
-%\XeTeXinterchartoks \XKclosingquote     \XKclosingquote = {}
-\XeTeXinterchartoks \XKhanja            \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKhanjacombining   \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKsmallkana        \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjksymbol        \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjkopening       \XKclosingquote = {\postcjkopenparen\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjkclosing       \XKclosingquote = {\postcjkcloseparen\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjkcolon         \XKclosingquote = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKclosingquote = {\postcjkfullstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjkliaison       \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKcjkextrastop     \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKclosingquote = {\XKcjkcharboxstop\XKwascjkchar\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinfullstop    \XKclosingquote = {\XKperiodboxstop\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinquestion    \XKclosingquote = {\XKquestionboxstop\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinexclamation \XKclosingquote = {\XKexclamationboxstop\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatincomma       \XKclosingquote = {\XKcommaboxstop\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatincolon       \XKclosingquote = {\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKclosingquote = {\XKlatinquotefont\XKclosingquotestart}
-\XeTeXinterchartoks \XKboundary         \XKclosingquote = {\XKundoignorespaces\XKlatinquotefont\XKbeginboundary\XKclosingquotestart}
-
-%%% ? latin colon
-\XeTeXinterchartoks \XKlatinchar        \XKlatincolon = {\XKwaslatinchar\XKcolonfont}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatincolon = {\XKwaslatinchar\XKcolonfont}
-\XeTeXinterchartoks \XKlatinopening     \XKlatincolon = {\XKcolonfont}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatincolon = {\XKcolonfont}
-\XeTeXinterchartoks \XKopeningquote     \XKlatincolon = {\XKopeningquotestop\XKcolonfont}
-\XeTeXinterchartoks \XKclosingquote     \XKlatincolon = {\XKclosingquotestop\XKcolonfont}
-\XeTeXinterchartoks \XKhanja            \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKcjklatinbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKcjklatinbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKsmallkana        \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKcjklatinbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKcjklatinbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjkopening       \XKlatincolon = {\postcjkopenparen\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatincolon = {\postcjkcloseparen\XKnobreak\XKhalfsmallbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatincolon = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatincolon = {\postcjkfullstop\XKnobreak\XKfixedhalfskip\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatincolon = {\XKcjkcharboxstop\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKhalfsmallbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKcjklatinbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatincolon = {\XKcjkcharboxstop\XKnobreak\XKcjklatinbreak\XKwascjkchar\XKcolonfont}
-\XeTeXinterchartoks \XKlatinfullstop    \XKlatincolon = {\XKperiodboxstop\XKcolonfont}
-\XeTeXinterchartoks \XKlatinquestion    \XKlatincolon = {\XKquestionboxstop\XKcolonfont}
-\XeTeXinterchartoks \XKlatinexclamation \XKlatincolon = {\XKexclamationboxstop\XKcolonfont}
-\XeTeXinterchartoks \XKlatincomma       \XKlatincolon = {\XKcommaboxstop\XKcolonfont}
-%\XeTeXinterchartoks \XKlatincolon       \XKlatincolon = {}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatincolon = {\XKcolonfont}
-\XeTeXinterchartoks \XKboundary         \XKlatincolon = {\XKundoignorespaces\XKcolonfont\XKbeginboundary}
-
-%%% ? hangul syllables
-\XeTeXinterchartoks \XKlatinchar        \XKhangulsyllable = {\XKhangulfont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinnumber      \XKhangulsyllable = {\XKhangulfont\XKcjklatinsmallbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinopening     \XKhangulsyllable = {\XKhangulfont\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinclosing     \XKhangulsyllable = {\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKopeningquote     \XKhangulsyllable = {\XKopeningquotestop\XKhangulfont\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKclosingquote     \XKhangulsyllable = {\XKclosingquotestop\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKhanja            \XKhangulsyllable = {\XKcjkcharboxstop\XKhangulfont\XKinterhanjabreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKhanjacombining   \XKhangulsyllable = {\XKcjkcharboxstop\XKhangulfont\XKinterhanjabreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKsmallkana        \XKhangulsyllable = {\XKcjkcharboxstop\XKhangulfont\XKinterhanjabreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjksymbol        \XKhangulsyllable = {\XKcjkcharboxstop\XKhangulfont\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjkopening       \XKhangulsyllable = {\postcjkopenparen\XKhangulfont\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjkclosing       \XKhangulsyllable = {\postcjkcloseparen\XKhangulfont\XKhalfsmallbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjkcolon         \XKhangulsyllable = {\postcjkcolon\XKhangulfont\XKquatersmallbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjkfullstop      \XKhangulsyllable = {\postcjkfullstop\XKhangulfont\XKfixedhalfskip\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjkliaison       \XKhangulsyllable = {\XKcjkcharboxstop\XKhangulfont\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKcjkextrastop     \XKhangulsyllable = {\XKcjkcharboxstop\XKhangulfont\XKhalfsmallbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKhangulsyllable   \XKhangulsyllable = {\XKcjkcharboxstop\XKinterhangulbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKhanguljungjong   \XKhangulsyllable = {\XKcjkcharboxstop\XKinterhangulbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinfullstop    \XKhangulsyllable = {\XKperiodboxstop\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinquestion    \XKhangulsyllable = {\XKquestionboxstop\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinexclamation \XKhangulsyllable = {\XKexclamationboxstop\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatincomma       \XKhangulsyllable = {\XKcommaboxstop\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatincolon       \XKhangulsyllable = {\XKhangulfont\XKcjklatinbreak\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKlatinhyphen      \XKhangulsyllable = {\XKhangulfont\XKzeroskip\XKcjkcharboxstart\XKcjklastchar}
-\XeTeXinterchartoks \XKboundary         \XKhangulsyllable = {\XKhangulfont\XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart\XKcjklastchar}
-
-%%% ? jungseong/jongseong jamo
-\XeTeXinterchartoks \XKhangulsyllable   \XKhanguljungjong = {\XKlastchar}
-\XeTeXinterchartoks \XKhanguljungjong   \XKhanguljungjong = {\XKlastchar}
-
-%%% ? latin period [.]
-\XeTeXinterchartoks \XKlatinchar        \XKlatinfullstop = {\XKwaslatinchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinfullstop = {\XKwaslatinchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKlatinfullstop = {\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatinfullstop = {\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinfullstop = {\XKopeningquotestop\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinfullstop = {\XKclosingquotestop\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKhanja            \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinfullstop = {\postcjkopenparen \XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinfullstop = {\postcjkcloseparen\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinfullstop = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinfullstop = {\postcjkfullstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinfullstop = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKperiodboxstart}
-%\XeTeXinterchartoks \XKlatinfullstop    \XKlatinfullstop = {}
-%\XeTeXinterchartoks \XKlatinquestion    \XKlatinfullstop = {}
-%\XeTeXinterchartoks \XKlatinexclamation \XKlatinfullstop = {}
-%\XeTeXinterchartoks \XKlatincomma       \XKlatinfullstop = {}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinfullstop = {\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinfullstop = {\XKpunctsfont\XKperiodboxstart}
-\XeTeXinterchartoks \XKboundary         \XKlatinfullstop = {\XKundoignorespaces\XKpunctsfont\XKbeginboundary\XKperiodboxstart}
-
-%%% ? latin question
-\XeTeXinterchartoks \XKlatinchar        \XKlatinquestion  = {\XKwaslatinchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinquestion  = {\XKwaslatinchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKlatinquestion  = {\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatinquestion  = {\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinquestion  = {\XKopeningquotestop\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinquestion  = {\XKclosingquotestop\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKhanja            \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinquestion  = {\postcjkopenparen\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinquestion  = {\postcjkcloseparen\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinquestion  = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinquestion  = {\postcjkfullstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinquestion  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKquestionboxstart}
-%\XeTeXinterchartoks \XKlatinfullstop    \XKlatinquestion  = {}
-%\XeTeXinterchartoks \XKlatinquestion    \XKlatinquestion  = {}
-%\XeTeXinterchartoks \XKlatinexclamation \XKlatinquestion  = {}
-%\XeTeXinterchartoks \XKlatincomma       \XKlatinquestion  = {}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinquestion  = {\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinquestion  = {\XKpunctsfont\XKquestionboxstart}
-\XeTeXinterchartoks \XKboundary         \XKlatinquestion  = {\XKundoignorespaces\XKpunctsfont\XKbeginboundary\XKquestionboxstart}
-
-%%% ? latin exclamation
-\XeTeXinterchartoks \XKlatinchar        \XKlatinexclamation  = {\XKwaslatinchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinexclamation  = {\XKwaslatinchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKlatinexclamation  = {\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatinexclamation  = {\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinexclamation  = {\XKopeningquotestop\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinexclamation  = {\XKclosingquotestop\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKhanja            \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinexclamation  = {\postcjkopenparen\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinexclamation  = {\postcjkcloseparen\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinexclamation  = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinexclamation  = {\postcjkfullstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinexclamation  = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKexclamationboxstart}
-%\XeTeXinterchartoks \XKlatinfullstop    \XKlatinexclamation  = {}
-%\XeTeXinterchartoks \XKlatinquestion    \XKlatinexclamation  = {}
-%\XeTeXinterchartoks \XKlatinexclamation \XKlatinexclamation  = {}
-%\XeTeXinterchartoks \XKlatincomma       \XKlatinexclamation  = {}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinexclamation  = {\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatinexclamation  = {\XKpunctsfont\XKexclamationboxstart}
-\XeTeXinterchartoks \XKboundary         \XKlatinexclamation  = {\XKundoignorespaces\XKpunctsfont\XKbeginboundary\XKexclamationboxstart}
-
-% ? latin comma
-\XeTeXinterchartoks \XKlatinchar        \XKlatincomma = {\XKwaslatinchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatincomma = {\XKwaslatinchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKlatincomma = {\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatincomma = {\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKlatincomma = {\XKopeningquotestop\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKlatincomma = {\XKclosingquotestop\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKhanja            \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjkopening       \XKlatincomma = {\postcjkopenparen\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatincomma = {\postcjkcloseparen\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatincomma = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatincomma = {\postcjkfullstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatincomma = {\XKcjkcharboxstop\XKwascjkchar\XKpunctsfont\XKcommaboxstart}
-%\XeTeXinterchartoks \XKlatinfullstop    \XKlatincomma = {}
-%\XeTeXinterchartoks \XKlatinquestion    \XKlatincomma = {}
-%\XeTeXinterchartoks \XKlatinexclamation \XKlatincomma = {}
-%\XeTeXinterchartoks \XKlatincomma       \XKlatincomma = {}
-\XeTeXinterchartoks \XKlatincolon       \XKlatincomma = {\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKlatincomma = {\XKpunctsfont\XKcommaboxstart}
-\XeTeXinterchartoks \XKboundary         \XKlatincomma = {\XKundoignorespaces\XKpunctsfont\XKbeginboundary\XKcommaboxstart}
-
-%%% ? latin hyphens [-/]
-\XeTeXinterchartoks \XKlatinchar        \XKlatinhyphen = {\XKwaslatinchar\XKhyphenfont}
-\XeTeXinterchartoks \XKlatinnumber      \XKlatinhyphen = {\XKwaslatinchar\XKhyphenfont}
-\XeTeXinterchartoks \XKlatinopening     \XKlatinhyphen = {\XKhyphenfont}
-\XeTeXinterchartoks \XKlatinclosing     \XKlatinhyphen = {\XKhyphenfont}
-\XeTeXinterchartoks \XKopeningquote     \XKlatinhyphen = {\XKopeningquotestop\XKhyphenfont}
-\XeTeXinterchartoks \XKclosingquote     \XKlatinhyphen = {\XKclosingquotestop\XKhyphenfont}
-\XeTeXinterchartoks \XKhanja            \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKhanjacombining   \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKsmallkana        \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjksymbol        \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjkopening       \XKlatinhyphen = {\postcjkopenparen\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjkclosing       \XKlatinhyphen = {\postcjkcloseparen\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjkcolon         \XKlatinhyphen = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjkfullstop      \XKlatinhyphen = {\postcjkfullstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjkliaison       \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKcjkextrastop     \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKhangulsyllable   \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKhanguljungjong   \XKlatinhyphen = {\XKcjkcharboxstop\XKwascjkchar\XKhyphenfont}
-\XeTeXinterchartoks \XKlatinfullstop    \XKlatinhyphen = {\XKperiodboxstop\XKhyphenfont}
-\XeTeXinterchartoks \XKlatinquestion    \XKlatinhyphen = {\XKquestionboxstop\XKhyphenfont}
-\XeTeXinterchartoks \XKlatinexclamation \XKlatinhyphen = {\XKexclamationboxstop\XKhyphenfont}
-\XeTeXinterchartoks \XKlatincomma       \XKlatinhyphen = {\XKcommaboxstop\XKhyphenfont}
-\XeTeXinterchartoks \XKlatincolon       \XKlatinhyphen = {\XKhyphenfont}
-%\XeTeXinterchartoks \XKlatinhyphen      \XKlatinhyphen = {}
-\XeTeXinterchartoks \XKboundary         \XKlatinhyphen = {\XKundoignorespaces\XKhyphenfont\XKbeginboundary}
-
-%%% ? boundary
-\XeTeXinterchartoks \XKlatinchar        \XKboundary = {\XKendboundary\XKwaslatinchar\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinnumber      \XKboundary = {\XKendboundary\XKwaslatinchar\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinopening     \XKboundary = {\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinclosing     \XKboundary = {\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKopeningquote     \XKboundary = {\XKopeningquotestop\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKclosingquote     \XKboundary = {\XKclosingquotestop\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKhanja            \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKhanjacombining   \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKsmallkana        \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjksymbol        \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjkopening       \XKboundary = {\postcjkopenparen\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjkclosing       \XKboundary = {\postcjkcloseparen\XKendboundary\ifcjtypeset\XKhalfskip\fi\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjkcolon         \XKboundary = {\postcjkcolon\XKendboundary\XKnobreak\XKquatersmallbreak\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjkfullstop      \XKboundary = {\postcjkfullstop\XKendboundary\ifcjtypeset\XKfixedhalfskip\fi\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjkliaison       \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKcjkextrastop     \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKhangulsyllable   \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKhanguljungjong   \XKboundary = {\XKcjkcharboxstop\XKendboundary\XKwascjkchar\XKignorespaces\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinfullstop    \XKboundary = {\XKperiodboxstop\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinquestion    \XKboundary = {\XKquestionboxstop\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinexclamation \XKboundary = {\XKexclamationboxstop\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatincomma       \XKboundary = {\XKcommaboxstop\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatincolon       \XKboundary = {\XKendboundary\XKstoreprevfont}
-\XeTeXinterchartoks \XKlatinhyphen      \XKboundary = {\XKendboundary\XKstoreprevfont}
-%\XeTeXinterchartoks \XKboundary         \XKboundary = {}
-
-%%% ? cjk colons
-\XeTeXinterchartoks \XKlatinchar        \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinopening     \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKopeningquote     \XKcjkcolon = {\XKopeningquotestop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKclosingquote     \XKcjkcolon = {\XKclosingquotestop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKhanja            \XKcjkcolon = {\XKcjkcharboxstop\XKnobreak\XKquatersmallbreak\XKmaybehanjafont\precjkcolon}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjkcolon = {\XKcjkcharboxstop\XKnobreak\XKquatersmallbreak\XKmaybehanjafont\precjkcolon}
-\XeTeXinterchartoks \XKsmallkana        \XKcjkcolon = {\XKcjkcharboxstop\XKnobreak\XKquatersmallbreak\XKmaybehanjafont\precjkcolon}
-\XeTeXinterchartoks \XKcjksymbol        \XKcjkcolon = {\XKcjkcharboxstop\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKcjkopening       \XKcjkcolon = {\postcjkopenparen\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjkcolon = {\postcjkcloseparen\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjkcolon = {\postcjkcolon\XKnobreak\ifcjtypeset\XKhalfminusquaterskip\else\XKsmallskip\fi\precjkcolon}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjkcolon = {\postcjkfullstop\XKnobreak\ifcjtypeset\XKthreequaterskip\else\XKsmallskip\fi\precjkcolon}
-\XeTeXinterchartoks \XKcjkliaison       \XKcjkcolon = {\XKcjkcharboxstop\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKcjkextrastop     \XKcjkcolon = {\XKcjkcharboxstop\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjkcolon = {\XKcjkcharboxstop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjkcolon = {\XKcjkcharboxstop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjkcolon = {\XKperiodboxstop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjkcolon = {\XKquestionboxstop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjkcolon = {\XKexclamationboxstop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatincomma       \XKcjkcolon = {\XKcommaboxstop\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatincolon       \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\precjkcolon}
-\XeTeXinterchartoks \XKboundary         \XKcjkcolon = {\XKmaybehanjafont\XKnobreak\XKquatersmallbreak\XKbeginboundary\precjkcolon}
-
-%%% ? cjk fullstop
-\XeTeXinterchartoks \XKlatinchar        \XKcjkfullstop = {\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjkfullstop = {\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinopening     \XKcjkfullstop = {\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjkfullstop = {\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKopeningquote     \XKcjkfullstop = {\XKopeningquotestop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKclosingquote     \XKcjkfullstop = {\XKclosingquotestop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKhanja            \XKcjkfullstop = {\XKcjkcharboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjkfullstop = {\XKcjkcharboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKsmallkana        \XKcjkfullstop = {\XKcjkcharboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKcjksymbol        \XKcjkfullstop = {\XKcjkcharboxstop\precjkfullstop}
-\XeTeXinterchartoks \XKcjkopening       \XKcjkfullstop = {\postcjkopenparen\precjkfullstop}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjkfullstop = {\postcjkcloseparen\precjkfullstop}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjkfullstop = {\postcjkcolon\XKnobreak\XKquatersmallbreak\precjkfullstop}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjkfullstop = {\postcjkfullstop\precjkfullstop}
-\XeTeXinterchartoks \XKcjkliaison       \XKcjkfullstop = {\XKcjkcharboxstop\precjkfullstop}
-\XeTeXinterchartoks \XKcjkextrastop     \XKcjkfullstop = {\XKcjkcharboxstop\precjkfullstop}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjkfullstop = {\XKcjkcharboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjkfullstop = {\XKcjkcharboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjkfullstop = {\XKperiodboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjkfullstop = {\XKquestionboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjkfullstop = {\XKexclamationboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatincomma       \XKcjkfullstop = {\XKcommaboxstop\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatincolon       \XKcjkfullstop = {\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjkfullstop = {\XKmaybehanjafont\precjkfullstop}
-\XeTeXinterchartoks \XKboundary         \XKcjkfullstop = {\XKmaybehanjafont\XKbeginboundary\precjkfullstop}
-
-%%% ? cjk liaison
-\XeTeXinterchartoks \XKlatinchar        \XKcjkliaison = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjkliaison = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKcjkliaison = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjkliaison = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKcjkliaison = {\XKopeningquotestop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKcjkliaison = {\XKclosingquotestop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanja            \XKcjkliaison = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjkliaison = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKcjkliaison = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-%\XeTeXinterchartoks \XKcjksymbol        \XKcjkliaison = {}
-\XeTeXinterchartoks \XKcjkopening       \XKcjkliaison = {\postcjkopenparen\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjkliaison = {\postcjkcloseparen\XKnobreak\XKhalfsmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjkliaison = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjkliaison = {\postcjkfullstop\XKnobreak\XKfixedhalfskip\XKcjkcharboxstart}
-%\XeTeXinterchartoks \XKcjkliaison       \XKcjkliaison = {}
-%\XeTeXinterchartoks \XKcjkextrastop     \XKcjkliaison = {}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjkliaison = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjkliaison = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjkliaison = {\XKperiodboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjkliaison = {\XKquestionboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjkliaison = {\XKexclamationboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatincomma       \XKcjkliaison = {\XKcommaboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatincolon       \XKcjkliaison = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjkliaison = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKboundary         \XKcjkliaison = {\XKmaybehanjafont\XKbeginboundary\XKcjkcharboxstart}
-
-%%% ? cjk quesiton/exclamation
-\XeTeXinterchartoks \XKlatinchar        \XKcjkextrastop = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinnumber      \XKcjkextrastop = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinopening     \XKcjkextrastop = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinclosing     \XKcjkextrastop = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKopeningquote     \XKcjkextrastop = {\XKopeningquotestop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKclosingquote     \XKcjkextrastop = {\XKclosingquotestop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanja            \XKcjkextrastop = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanjacombining   \XKcjkextrastop = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKsmallkana        \XKcjkextrastop = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-%\XeTeXinterchartoks \XKcjksymbol        \XKcjkextrastop = {}
-\XeTeXinterchartoks \XKcjkopening       \XKcjkextrastop = {\postcjkopenparen\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkclosing       \XKcjkextrastop = {\postcjkcloseparen\XKnobreak\XKhalfsmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkcolon         \XKcjkextrastop = {\postcjkcolon\XKnobreak\XKquatersmallbreak\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKcjkfullstop      \XKcjkextrastop = {\postcjkfullstop\XKnobreak\XKfixedhalfskip\XKcjkcharboxstart}
-%\XeTeXinterchartoks \XKcjkliaison       \XKcjkextrastop = {}
-%\XeTeXinterchartoks \XKcjkextrastop     \XKcjkextrastop = {}
-\XeTeXinterchartoks \XKhangulsyllable   \XKcjkextrastop = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKhanguljungjong   \XKcjkextrastop = {\XKcjkcharboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinfullstop    \XKcjkextrastop = {\XKperiodboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinquestion    \XKcjkextrastop = {\XKquestionboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinexclamation \XKcjkextrastop = {\XKexclamationboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatincomma       \XKcjkextrastop = {\XKcommaboxstop\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatincolon       \XKcjkextrastop = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKlatinhyphen      \XKcjkextrastop = {\XKmaybehanjafont\XKcjkcharboxstart}
-\XeTeXinterchartoks \XKboundary         \XKcjkextrastop = {\XKmaybehanjafont\XKbeginboundary\XKcjkcharboxstart}
-
-
-\let\XKnobreak\nobreak
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% font setting
-\def\XKlatinfont{\ifcase\XKcurrentfont\else\XK at latinfont\fi}
-\def\XKhangulfont
-  {\ifcase\XKcurrentfont\XK at storeprevfont\XK at hangulfont\or\or\XK at hangulfont\fi}
-\def\XKhanjafont
-  {\ifcase\XKcurrentfont\XK at storeprevfont\XK at hanjafont\or\XK at hanjafont\fi}
-\def\XK at latinfont {\chardef\XKcurrentfont\z@\XKprevfont}
-\def\XK at hangulfont{\chardef\XKcurrentfont\@ne\hangfnt}
-\def\XK at hanjafont {\chardef\XKcurrentfont\tw@\hanifnt}
-\def\XK at storeprevfont{\edef\XKprevfont{\the\font}}
-\let\XKstoreprevfont\XKlatinfont
-\chardef\XKcurrentfont\z@ \XK at storeprevfont
-% bug #2 : http://www.ktug.org/xe/index.php?document_srl=203582
-\let\hangfnt\relax \def\hanifnt{\hangfnt}
-
-\protected\def\latincjksymbols   {\def\XKmaybehanjafont{\XKlatinfont}}
-\protected\def\hangulcjksymbols  {\def\XKmaybehanjafont{\XKhangulfont}}
-\protected\def\hanjacjksymbols   {\def\XKmaybehanjafont{\XKhanjafont}}
-\protected\def\prevfontcjksymbols{\def\XKmaybehanjafont{\empty}}
-
-\protected\def\latinalphs   {\def\XKmaybelatinfont{\XKlatinfont}}
-\protected\def\hangulalphs  {\def\XKmaybelatinfont{\XKhangulfont}}
-\protected\def\hanjaalphs   {\def\XKmaybelatinfont{\XKhanjafont}}
-\protected\def\prevfontalphs{\def\XKmaybelatinfont{\empty}}
-
-\protected\def\latinnums   {\def\XKlatinnumfont{\XKlatinfont}}
-\protected\def\hangulnums  {\def\XKlatinnumfont{\XKhangulfont}}
-\protected\def\hanjanums   {\def\XKlatinnumfont{\XKhanjafont}}
-\protected\def\prevfontnums{\def\XKlatinnumfont{\empty}}
-
-\protected\def\latinparens   {\def\XKlatinparenfont{\XKlatinfont}}
-\protected\def\hangulparens  {\def\XKlatinparenfont{\XKhangulfont}}
-\protected\def\hanjaparens   {\def\XKlatinparenfont{\XKhanjafont}}
-\protected\def\prevfontparens{\def\XKlatinparenfont{\empty}}
-
-\protected\def\latinquotes   {\def\XKlatinquotefont{\XKlatinfont}}
-\protected\def\hangulquotes  {\def\XKlatinquotefont{\XKhangulfont}}
-\protected\def\hanjaquotes   {\def\XKlatinquotefont{\XKhanjafont}}
-\protected\def\prevfontquotes{\def\XKlatinquotefont{\empty}}
-
-\protected\def\latinhyphens   {\def\XKhyphenfont{\XKlatinfont}}
-\protected\def\hangulhyphens  {\def\XKhyphenfont{\XKhangulfont}}
-\protected\def\hanjahyphens   {\def\XKhyphenfont{\XKhanjafont}}
-\protected\def\prevfonthyphens{\def\XKhyphenfont{\empty}}
-
-\protected\def\latincolons   {\def\XKcolonfont{\XKlatinfont}}
-\protected\def\hangulcolons  {\def\XKcolonfont{\XKhangulfont}}
-\protected\def\hanjacolons   {\def\XKcolonfont{\XKhanjafont}}
-\protected\def\prevfontcolons{\def\XKcolonfont{\empty}}
-
-\protected\def\latinpuncts   {\def\XKpunctsfont{\XKlatinfont}}
-\protected\def\hangulpuncts  {\def\XKpunctsfont{\XKhangulfont}}
-\protected\def\hanjapuncts   {\def\XKpunctsfont{\XKhanjafont}}
-\protected\def\prevfontpuncts{\def\XKpunctsfont{\empty}}
-
-\protected\def\latinmarks
-  {\latinalphs \latinnums \latinpuncts \latinquotes
-  \latinparens \latinhyphens \latincolons \latincjksymbols}
-\protected\def\hangulmarks
-  {\hangulalphs\hangulnums\hangulpuncts\hangulquotes
-  \hangulparens\hangulhyphens\hangulcolons \hangulcjksymbols}
-\protected\def\hanjamarks
-  {\hanjaalphs \hanjanums \hanjapuncts \hanjaquotes
-  \hanjaparens \hanjahyphens \hanjacolons \hanjacjksymbols}
-\protected\def\prevfontmarks
-  {\prevfontalphs\prevfontnums\prevfontparens\prevfontquotes
-  \prevfonthyphens\prevfontcolons\prevfontpuncts\prevfontcjksymbols}
-
-\latinmarks
-\prevfontpuncts   % empty default font in case of latin . , ? !
-\prevfontcolons   % empty default font in case of latin ; :
-\hangulcjksymbols % cjk symbols in hangul font
-
-% simple command to typeset hanja by hangul font
-\protected\def\hanjabyhangulfont{\let\XKhanjafont\XKhangulfont}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% options regarding micro-spacing
-\def\xetexkohu                  {0.05em }
-\def\xetexkointerhchar          {}
-\def\xetexkolowerperiod         {}
-\def\xetexkolowerquestion       {}
-\def\xetexkolowerexclamation    {}
-\def\xetexkolowercomma          {}
-\def\xetexkopreperiodkern       {}
-\def\xetexkopostperiodkern      {}
-\def\xetexkoprequestionkern     {}
-\def\xetexkopostquestionkern    {}
-\def\xetexkopreexclamationkern  {}
-\def\xetexkopostexclamationkern {}
-\def\xetexkoprecommakern        {}
-\def\xetexkopostcommakern       {}
-\def\xetexkoquotewidth          {}
-\def\xetexkoquoteraise          {}
-\def\xetexkocharraise           {}
-\def\xetexkopostmathskip        {\dimexpr (\xetexkohu + \z@) * \tw@\relax}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% `` '' or ` '
-\def\XKopeningquotestart{%
-  \chardef\XK at make@quotebox\z@
-  \ifx\empty\xetexkoquotewidth
-    \ifx\empty\xetexkoquoteraise \else
-      \chardef\XK at make@quotebox\tw@
-    \fi
-  \else
-    \chardef\XK at make@quotebox\@ne
-  \fi
-  \ifnum\XK at make@quotebox>\z@
-    \leavevmode
-    \ifnum\XK at make@quotebox=\tw@ \raise\xetexkoquoteraise \fi
-    \hbox
-    \ifnum\XK at make@quotebox=\@ne to\xetexkoquotewidth \fi
-    \bgroup\hss
-  \fi
-}
-\def\XKopeningquotestop{%
-  \ifnum\XK at make@quotebox>\z@
-    \egroup\nobreak\hskip\z@
-  \fi
-}
-\def\XKclosingquotestart{%
-  \chardef\XK at make@quotebox\z@
-  \ifx\empty\xetexkoquotewidth
-    \ifx\empty\xetexkoquoteraise \else
-      \chardef\XK at make@quotebox\tw@
-    \fi
-  \else
-    \chardef\XK at make@quotebox\@ne
-  \fi
-  \ifnum\XK at make@quotebox>\z@
-    \leavevmode\nobreak\hskip\z@
-    \ifnum\XK at make@quotebox=\tw@ \raise\xetexkoquoteraise \fi
-    \hbox
-    \ifnum\XK at make@quotebox=\@ne to\xetexkoquotewidth \fi
-    \bgroup
-  \fi
-}
-\def\XKclosingquotestop{%
-  \ifnum\XK at make@quotebox>\z@
-    \hss\egroup
-  \fi
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% . , ? !
-\def\XKwaslatinchar{\chardef\XK at after@cjk at punct\z@}
-\def\XKwascjkchar  {\chardef\XK at after@cjk at punct\@ne}
-\XKwaslatinchar
-\chardef\XK at inpunctuationbox\z@
-
-\def\XKperiodboxstart{% .
-  \ifnum\XK at after@cjk at punct>\z@
-    \ifx\empty\xetexkolowerperiod
-    \else
-      \leavevmode\lower\xetexkolowerperiod\hbox\bgroup
-      \chardef\XK at inpunctuationbox\@ne
-    \fi
-  \fi
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkopreperiodkern
-    \else
-      \kern\xetexkopreperiodkern\relax
-    \fi
-  \fi
-}
-\def\XKperiodboxstop{%
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkopostperiodkern
-    \else
-      \vrule width\xetexkopostperiodkern height\z@ depth\z@
-    \fi
-  \fi
-  \ifnum\XK at inpunctuationbox=\@ne
-    \global\count@\spacefactor\egroup\spacefactor\count@
-  \fi
-}
-
-\def\XKquestionboxstart{% ?
-  \ifnum\XK at after@cjk at punct>\z@
-    \ifx\empty\xetexkolowerquestion
-    \else
-      \leavevmode\lower\xetexkolowerquestion\hbox\bgroup
-      \chardef\XK at inpunctuationbox\@ne
-    \fi
-  \fi
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkoprequestionkern
-    \else
-      \kern\xetexkoprequestionkern\relax
-    \fi
-  \fi
-}
-\def\XKquestionboxstop{%
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkopostquestionkern
-    \else
-      \vrule width\xetexkopostquestionkern height\z@ depth\z@
-    \fi
-  \fi
-  \ifnum\XK at inpunctuationbox=\@ne
-    \global\count@\spacefactor\egroup\spacefactor\count@
-  \fi
-}
-
-\def\XKexclamationboxstart{% !
-  \ifnum\XK at after@cjk at punct>\z@
-    \ifx\empty\xetexkolowerexclamation
-    \else
-      \leavevmode\lower\xetexkolowerexclamation\hbox\bgroup
-      \chardef\XK at inpunctuationbox\@ne
-    \fi
-  \fi
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkopreexclamationkern
-    \else
-      \kern\xetexkopreexclamationkern\relax
-    \fi
-  \fi
-}
-\def\XKexclamationboxstop{%
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkopostexclamationkern
-    \else
-      \vrule width\xetexkopostexclamationkern height\z@ depth\z@
-    \fi
-  \fi
-  \ifnum\XK at inpunctuationbox=\@ne
-    \global\count@\spacefactor\egroup\spacefactor\count@
-  \fi
-}
-
-\def\XKcommaboxstart{% ,
-  \ifnum\XK at after@cjk at punct>\z@
-    \ifx\empty\xetexkolowercomma
-    \else
-      \leavevmode\lower\xetexkolowercomma\hbox\bgroup
-      \chardef\XK at inpunctuationbox\@ne
-    \fi
-  \fi
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkoprecommakern
-    \else
-      \kern\xetexkoprecommakern\relax
-    \fi
-  \fi
-}
-\def\XKcommaboxstop{%
-  \ifnum\XKcurrentfont>\z@
-    \ifx\empty\xetexkopostcommakern
-    \else
-      \vrule width\xetexkopostcommakern height\z@ depth\z@
-    \fi
-  \fi
-  \ifnum\XK at inpunctuationbox=\@ne
-    \global\count@\spacefactor\egroup\spacefactor\count@
-  \fi
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% cjk openings and closings
-%%% considering bounding box
-\def\XK at side@bearing#1#2{% 1: char index; 2: left=1 or right=3 -> dimen@
-  \ifdim\XeTeXglyphbounds#2\XeTeXcharglyph#1>.5em
-    \dimen at .5em
-  \else
-    \dimen@\fontcharwd\font\count@
-  \fi
-}
-\def\precjkopenparen{\futurelet\@let at token\precjkopenparen@}
-\def\precjkopenparen@{%
-  \@josa at char@to at number\@let at token\count@
-  \XK at side@bearing\count@\@ne
-  \leavevmode
-  \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-  \hbox
-  \ifx\XKdisablecjksymbolspacing\empty
-    \bgroup
-  \else % default: half
-    to\dimen@ \bgroup\hss
-  \fi
-  \XeTeXinterchartoks\XKboundary\XKcjkopening = {\empty}}
-\def\postcjkopenparen{\egroup}
-
-\def\precjkcloseparen{\futurelet\@let at token\precjkcloseparen@}
-\def\precjkcloseparen@{%
-  \@josa at char@to at number\@let at token\count@
-  \XK at side@bearing\count@\thr@@
-  \leavevmode
-  \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-  \hbox
-  \ifx\XKdisablecjksymbolspacing\empty\else % default: half
-    to\dimen@
-  \fi
-  \bgroup
-  \XeTeXinterchartoks\XKboundary\XKcjkclosing = {\empty}}
-\def\postcjkcloseparen{%
-  \ifx\XKdisablecjksymbolspacing\empty\else % default: half
-    \hss
-  \fi
-  \egroup}
-
-\def\precjkfullstop{\futurelet\@let at token\precjkfullstop@}
-\def\precjkfullstop@{%
-  \@josa at char@to at number\@let at token\count@
-  \XK at side@bearing\count@\thr@@
-  \leavevmode
-  \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-  \hbox
-  \ifx\XKdisablecjksymbolspacing\empty\else % default: half
-    to\dimen@
-  \fi
-  \bgroup
-  \XeTeXinterchartoks\XKboundary\XKcjkfullstop = {\empty}}
-\def\postcjkfullstop{%
-  \ifx\XKdisablecjksymbolspacing\empty\else % default: half
-    \hss
-  \fi
-  \egroup}
-
-\def\precjkcolon {\leavevmode
-  \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-  \hbox
-  \ifx\XKdisablecjksymbolspacing\empty
-    \bgroup
-  \else % default: half
-    to 0.5em\bgroup\hss
-  \fi
-}
-\def\postcjkcolon{%
-  \ifx\XKdisablecjksymbolspacing\empty\else % default: half
-    \hss
-  \fi
-  \egroup}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% various spaces
-\def\XKskipstretchshrink    {plus .04em minus .02em}
-\def\XKzeroskip             {\hskip\z@\XKskipstretchshrink}
-\def\XKsmallskip
-  {\hskip\dimexpr (\xetexkohu + \z@) * \tw@ \relax \XKskipstretchshrink}
-\def\XKsmallsmallskip
-  {\hskip\dimexpr \xetexkohu + \z@ \relax \XKskipstretchshrink}
-\def\XKxkanjiskip           {\hskip0.25em plus0.15em minus0.06em }
-\def\XKhalfskip             {\hskip0.5em minus 0.5em }
-\def\XKfixedhalfskip        {\hskip0.5em\relax}
-\def\XKquaterskip           {\hskip0.25em minus 0.25em }
-\def\XKhalfminusquaterskip  {\hskip0.5em minus 0.25em }
-\def\XKthreequaterskip      {\hskip0.75em minus 0.25em }
-\def\XKinterhangulpenalty   {\penalty50 }
-
-\def\XKinterhangulbreak
-  {\ifcjtypeset\else\XKinterhangulpenalty\fi
-  \hskip\dimexpr\xetexkointerhchar + \z@\relax \XKskipstretchshrink}
-\def\XKinterhanjabreak    {\ifcjtypeset\else\XKinterhangulpenalty\fi \XKzeroskip}
-\def\XKcjklatinbreak      {\ifcjtypeset\XKxkanjiskip\else\XKsmallskip\fi}
-\def\XKcjklatinsmallbreak {\ifcjtypeset\XKxkanjiskip\else\XKsmallsmallskip\fi}
-\def\XKhalfsmallbreak     {\ifcjtypeset\XKhalfskip\else\XKsmallsmallskip\fi}
-\def\XKquatersmallbreak   {\ifcjtypeset\XKquaterskip\else\XKsmallskip\fi}
-
-\def\XKafterboundaryskip{%
-  \ifcase\lastnodetype
-    \or  \XKzeroskip      %  1. hbox: especially after indent box
-    \or  \XKzeroskip      %  2. vbox
-    \or\or\or\or\or\or
-    \or                   %  9. whatsit. see issue #3
-    \or  \XKcjkmathbreak  % 10. math
-    \or
-    \or  \XKzeroskip      % 12. kern
-    \fi}
-%% users can redefine XKcjkmathbreak
-\def\XKcjkmathbreak{%
-  \ifcjtypeset\XKxkanjiskip
-  \else\hskip\xetexkopostmathskip\XKskipstretchshrink\fi}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% everyhangul/everyhanja
-%%%  request from karnes at 2013.11.18
-\def\everyhanja#1{%
-  \def\XK at every@hanja##1{#1}%
-  \let\XKcjkcharboxstart\empty
-  \let\XKcjkcharboxstop\empty % conflict w. everyhanja
-}
-\def\XK at every@hanja#1{#1}
-\def\everyhangul#1{%
-  \def\XK at every@hangul##1{#1}%
-  \let\XKcjkcharboxstart\empty
-  \let\XKcjkcharboxstop\empty % conflict w. everyhangul
-}
-\def\XK at every@hangul#1{#1}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% for autojosa, get last chars
-\let\XK at last@char=0
-\let\XK at lastlast@char\XK at last@char
-\let\XK at lastlastlast@char\XK at lastlast@char
-
-\def\XKlastchar{\futurelet\@let at token\XK at save@last at char}
-\def\XK at save@last at char{%
-  \global\let\XK at lastlastlast@char\XK at lastlast@char
-  \global\let\XK at lastlast@char    \XK at last@char
-  \global\let\XK at last@char        \@let at token
-}
-
-\def\XK at fallback@hanja at font@family#1{%
-  \chardef\XK at use@fallback at font\z@
-  \iffontchar\font`#1\else
-    \ifdefined\fallbackhanjafont
-      \chardef\XK at use@fallback at font\@ne
-      \expandafter\let\expandafter\XK at fallback@plain at font@temp\the\font
-      \let\XK at fallback@latex at family@temp\f at family % redundant for plain
-      \fallbackhanjafont
-    \fi
-  \fi
-}
-
-\def\XKhanjalastchar#1{%
-  \let\@let at token#1\XK at save@last at char
-  % fallbackhanjafont for, say, HanaMinB
-  \XK at fallback@hanja at font@family{#1}%
-  \XK at every@hanja{#1}% everyhanja
-  \ifcase\XK at use@fallback at font\else
-    \XK at fallback@plain at font@temp
-    \let\f at family\XK at fallback@latex at family@temp
-  \fi
-}
-
-\newtoks\XK at toks@
-
-\def\XKcjklastchar#1{%
-  \let\@let at token#1\XK at save@last at char
-  % and supress char orphan
-  \XK at toks@{\XK at every@hangul{#1}}% everyhangul 가
-  \ifnum\lastpenalty=\z@ % bypass 가\\나 case
-    \expandafter\XK at futurelet@let at token
-  \else
-    \expandafter\XK at normal@the at toks@
-  \fi
-}
-\def\XK at check@next at char{%
-  \ifx\par\@let at token
-    \let\next\XK at nobreak@the at toks@
-  \else\ifx\@sptoken\@let at token
-    \XK at toks@\expandafter{\the\XK at toks@\@sptoken}%
-    \let\next\XK at afterassign@let at token
-  \else\ifx.\@let at token
-    \XK at toks@\expandafter{\the\XK at toks@ .}%
-    \let\next\XK at afterassign@let at token
-  \else\ifx^^^^3002\@let at token
-    \XK at toks@\expandafter{\the\XK at toks@^^^^3002}%
-    \let\next\XK at afterassign@let at token
-  \else\ifx^^^^ff0e\@let at token
-    \XK at toks@\expandafter{\the\XK at toks@^^^^ff0e}%
-    \let\next\XK at afterassign@let at token
-  \else
-    \let\next\XK at normal@the at toks@
-  \fi\fi\fi\fi\fi
-  \next
-}
-\def\XK at afterassign@let at token{\afterassignment\XK at futurelet@let at token\let\@let at token= }
-\def\XK at futurelet@let at token{\futurelet\@let at token\XK at check@next at char}
-\def\XK at normal@the at toks@{\the\XK at toks@}
-\def\XK at nobreak@the at toks@{\XK at nobreak\the\XK at toks@}
-\def\XK at nobreak{\skip@\lastskip\unskip\unpenalty\nobreak\hskip\skip@}
-
-\def\XKbeginboundary{% empty interchartoks crashes xetex!!!
-  \global\XeTeXinterchartoks\XKboundary\XKlatinnumber    = {\empty}%
-  \global\XeTeXinterchartoks\XKboundary\XKlatinchar      = {\empty}%
-  \global\XeTeXinterchartoks\XKboundary\XKhanja          = {\empty}%
-  \global\XeTeXinterchartoks\XKboundary\XKsmallkana      = {\empty}%
-  \global\XeTeXinterchartoks\XKboundary\XKhangulsyllable = {\empty}%
-}
-\def\XKendboundary{%
-  \global\XeTeXinterchartoks\XKboundary\XKlatinnumber    = {\XKundoignorespaces\XKlatinnumfont  \XKbeginboundary\XKlastchar}%
-  \global\XeTeXinterchartoks\XKboundary\XKlatinchar      = {\XKundoignorespaces\XKmaybelatinfont\XKbeginboundary\XKlastchar}%
-  \global\XeTeXinterchartoks\XKboundary\XKhanja          = {\XKhanjafont \XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart\XKhanjalastchar}%
-  \global\XeTeXinterchartoks\XKboundary\XKsmallkana      = {\XKhanjafont \XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart\XKhanjalastchar}%
-  \global\XeTeXinterchartoks\XKboundary\XKhangulsyllable = {\XKhangulfont\XKafterboundaryskip\XKbeginboundary\XKcjkcharboxstart\XKcjklastchar}%
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% raise hangul/hanja box
-\def\XKcjkcharboxstart{%
-  \ifx\empty\xetexkocharraise\else
-    \leavevmode\raise\xetexkocharraise\hbox\bgroup
-  \fi
-}
-\def\XKcjkcharboxstop{%
-  \ifx\empty\xetexkocharraise\else
-    \egroup
-  \fi
-}
-
-%%%%%%%%%%%%%%
-% etc commands
-\let\enablejamoautojosa\relax % enabled already
-
-\protected\def\disablejamoautojosa{% newly added by v2.1
-  \XeTeXinterchartoks\XKhangulsyllable\XKhanguljungjong = {}%
-  \XeTeXinterchartoks\XKhanguljungjong\XKhanguljungjong = {}%
-}
-
-\protected\def\disableautojosa{%
-  \disablejamoautojosa
-  \let\XKlastchar\relax
-  \let\XK at save@last at char\relax
-}
-
-\protected\def\disablekoreanfonts{%
-  \let\XKlatinfont      \relax
-  \let\XKhangulfont     \relax
-  \let\XKhanjafont      \relax
-  \let\XKmaybelatinfont \relax
-  \let\XKmaybehanjafont \relax
-  \let\XKpunctsfont     \relax
-  \let\XKlatinnumfont   \relax
-  \let\XKlatinparenfont \relax
-  \let\XKlatinquotefont \relax
-  \let\XKhyphenfont     \relax
-  \let\XKcolonfont      \relax
-  \let\XKstoreprevfont  \relax
-}
-
-\protected\def\disablecjksymbolspacing{% for natural width of 。「」 etc
-  \let\XKdisablecjksymbolspacing\empty
-}
-
-\protected\def\disablehangulspacing{% all micro-spacing is 0pt
-  \let\XKskipstretchshrink\relax
-  \let\precjkopenparen \relax  \let\postcjkopenparen \relax
-  \let\precjkcloseparen\relax  \let\postcjkcloseparen\relax
-  \let\precjkfullstop  \relax  \let\postcjkfullstop  \relax
-  \let\precjkcolon     \relax  \let\postcjkcolon     \relax
-  \let\XKopeningquotestart    \relax    \let\XKopeningquotestop   \relax
-  \let\XKclosingquotestart    \relax    \let\XKclosingquotestop   \relax
-  \let\XKperiodboxstart       \relax    \let\XKperiodboxstop      \relax
-  \let\XKquestionboxstart     \relax    \let\XKquestionboxstop    \relax
-  \let\XKexclamationboxstart  \relax    \let\XKexclamationboxstop \relax
-  \let\XKcommaboxstart        \relax    \let\XKcommaboxstop       \relax
-  \let\XKwaslatinchar         \relax    \let\XKwascjkchar         \relax
-  \let\XKcjkcharboxstart      \relax    \let\XKcjkcharboxstop     \relax
-  \let\XKinterhangulbreak     \XKzeroskip
-  \let\XKinterhanjabreak      \XKzeroskip
-  \let\XKcjklatinbreak        \XKzeroskip
-  \let\XKcjklatinsmallbreak   \XKzeroskip
-  \let\XKhalfsmallbreak       \XKzeroskip
-  \let\XKfixedhalfskip        \XKzeroskip
-  \let\XKquatersmallbreak     \XKzeroskip
-  \let\XKhalfminusquaterskip  \XKzeroskip
-  \let\XKhalfskip             \XKzeroskip
-  \let\XKsmallskip            \XKzeroskip
-  \let\XKthreequaterskip      \XKzeroskip
-  \let\XKcjkmathbreak         \XKzeroskip
-}
-
-\protected\def\disablehangulspacingandlinebreak{% all micro-spacing is \relax
-  \let\XKzeroskip         \relax
-  \let\XKnobreak          \relax
-  \let\XKafterboundaryskip\relax
-  \def\XKcjklastchar##1{\let\@let at token##1\XK at save@last at char\XK at every@hangul{##1}}%
-  \disablehangulspacing
-}
-
-% still remaining: XKhanjalastchar XKbeginboundary XKendboundary XKignorespaces XKundoignorespaces
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% for old and C/J documents
-\newif\ifcjtypeset
-
-% try to remove space skip
-\def\XKignorespaces{}
-\def\XKundoignorespaces{}
-
-\def\XK at japanese{\cjtypesettrue
-  %% killing spaces after cjk chars
-  \def\XKignorespaces{\futurelet\XK at let@token\XK at ignorespaces}%
-  \def\XK at ignorespaces{\ifx\XK at let@token\@sptoken\kern-1sp\kern1sp\ignorespaces\fi}%
-  \def\XKundoignorespaces{\ifnum\lastkern=\@ne\@sptoken\fi}%
-  %% a little bigger stretch/shrink
-  \def\XKskipstretchshrink{plus .1em minus .1ex}%
-  %% cjksymbols
-  \hanjacjksymbols
-  %% spaceskip is equal to xkanjiskip
-  \spaceskip.25em plus.15em minus.06em
-}
-\protected\def\japanese{\XK at japanese\parindent1em }
-\protected\def\Tchinese{\XK at japanese\parindent2em }
-\protected\def\Schinese{\XK at japanese\parindent2em
-  % these glyphs in simplified chinese fonts are left-aligned.
-  \XeTeXcharclass "FF1F = \XKcjkfullstop % ?
-  \XeTeXcharclass "FF01 = \XKcjkfullstop % !
-  \XeTeXcharclass "FF1A = \XKcjkfullstop % :
-  \XeTeXcharclass "FF1B = \XKcjkfullstop % ;
-  }
-\let\chinese\Schinese
-
-%% inhibitglue
-\let\inhibitglue\relax
-
-%%%%%%%%%%%%%%%%%%%%%%
-%% hangul in math mode -- general
-\def\setmathhangulblock#1#2{%
-  \count@ "#1
-  \loop
-    \Umathcode\count@ = 7 \symmathhangul \count@
-    \ifnum\count@<"#2
-      \advance\count@\@ne \repeat}
-
-%%%%%%%%%%%
-%% for ulem
-\def\xetexkoulemsupport{%
-  \UL at hook\expandafter{\the\UL at hook
-    \let\XK at nobreak\relax
-    \ifdefined\XK at UL@@@hangulfont\else
-      \let\XK at UL@@@hangulfont\XKhangulfont
-      \let\XK at UL@@@hanjafont \XKhanjafont
-      \def\XKhangulfont{\XK at UL@@@hangulfont
-        \aftergroup\aftergroup\aftergroup\XK at UL@@@hangulfont
-      }%
-      \def\XKhanjafont{\XK at UL@@@hanjafont
-        \aftergroup\aftergroup\aftergroup\XK at UL@@@hanjafont
-      }%
-    \fi
-  }%
-}
-
-%%%%%%%%%%
-%% dotemph
-\def\dotemphraise{0.4em }
-\ifcsname bfseries\endcsname
-  \def\dotemphchar{\bfseries ^^^^02d9}
-\else
-  \def\dotemphchar{\bf \char95 }
-\fi
-\newbox\XKdotemphbox
-
-\protected\def\dotemph#1{%
-  \leavevmode
-  \begingroup
-  \def\XKcjklastchar{\futurelet\@let at token\XK at dotemph@last at char}%
-  \let\XKhanjalastchar\XKcjklastchar
-  \let\XKcjkcharboxstart\relax
-  \let\XKcjkcharboxstop\relax
-  \setbox\XKdotemphbox\hbox{\dotemphchar}%
-  #1\relax
-  \endgroup
-}
-
-\def\XK at dotemph@last at char{\XK at save@last at char\dot@@@emph}
-
-\def\dot@@@emph#1{%
-  \setbox\z@\hbox{\XK at fallback@hanja at font@family{#1}#1}%
-  \setbox\tw@\hbox to\wd\z@{\hss\copy\XKdotemphbox\hss}\ht\tw@\z@\dp\tw@\z@
-  \rlap{\raise\dotemphraise\box\tw@}\box\z@
-}
-
-%%% declare to use interchartoken
-\XeTeXinterchartokenstate\@ne
-
-\def\hellipsis{^^^^2026^^^^2026}
-
 \endinput

Modified: branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,6 +1,6 @@
 % xetexko-vertical.sty
 %
-% Copyright (c) 2013-2020 Dohyun Kim  <nomos at ktug org>
+% Copyright (c) 2013-2021 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
@@ -10,168 +10,11 @@
 % and version 1.3c or later is part of all distributions of LaTeX
 % version 2006/05/20 or later.
 
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
-  \ProvidesPackage{xetexko-vertical}
-    [2020/02/17 v2.23 Vertical environment for XeTeX-ko]
+\ifdefined\ProvidesPackage
+  \ProvidesPackage{xetexko-vertical}[2021/03/20 v3.0 A deprecated addendum to XeTeX-ko]
+  \RequirePackage{xetexko}[2021/03/20]
+\else
+  \input xetexko.sty
 \fi
 
-% do not veticalize headline/footline
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname selectfont\endcsname\relax % plain
-  \protected\def\verticaltypesetting{%
-    \dimen@\hsize\hsize\vsize\vsize\dimen@
-    \edef\plainoutput{\unexpanded{\dimen@\hsize\hsize\vsize\vsize\dimen@}%
-      \unexpanded\expandafter{\plainoutput}}%
-    \def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth
-      \pagecontents}\xetexko at rotatebox\z@\box\z@}%
-    \maxdepth\z@ \XK at vertical@spacing}
-\else % latex
-  \protected\def\verticaltypesetting{%
-    \AtBeginDocument{\XK at vertical@spacing}%
-    \maxdepth\z@
-    \dimen@\textwidth
-    \textwidth\textheight
-    \textheight\dimen@
-    \edef\@outputpage{%
-      \unexpanded{\xetexko at rotatebox\@outputbox\textwidth\textheight}%
-      \unexpanded\expandafter{\@outputpage}}%
-  }
-  \@onlypreamble\verticaltypesetting
-\fi
-
-\def\xetexko at rotatebox#1{%
-  \ifvbox#1\count@\@ne\else\count@\z@\fi
-  \dimen@\wd#1\dimen at ii\dimexpr\ht#1+\dp#1\relax
-  \setbox#1\ifnum\count@=\@ne
-  \vbox to\dimen@\bgroup\hbox to\dimen at ii\bgroup\hfil\else
-  \hbox to\dimen at ii\bgroup\vbox to\dimen@\bgroup\fi
-    \wd#1\z@ \ht#1\z@ \dp#1\z@
-    \special{x:gsave}\special{x:rotate -90}\box#1\special{x:grestore}%
-    \ifnum\count@=\@ne\egroup\vfil\else\vfil\egroup\hfil\fi\egroup
-}
-
-% users can declare vertical EM size, which might be different from 1em.
-\newdimen\verticalem
-
-\def\XK at vertical@spacing{%
-  \ifnum\verticalem > \z@
-    \def\XK at vert@half at em{.5\verticalem}%
-  \else
-    \def\XK at vert@half at em{.5em}%
-  \fi
-  \let\xk at horiz@precjkopenparen \precjkopenparen
-  \let\xk at horiz@precjkcloseparen\precjkcloseparen
-  \let\xk at horiz@precjkfullstop  \precjkfullstop
-  \ifx\precjkopenparen\relax\else
-    \def\precjkopenparen {\leavevmode
-      \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-      \hbox
-      \ifx\XKdisablecjksymbolspacing\empty
-        \bgroup
-      \else
-        to\XK at vert@half at em \bgroup \hss
-      \fi
-    }%
-  \fi
-  \ifx\precjkcloseparen\relax\else
-    \def\precjkcloseparen{\leavevmode
-      \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-      \hbox
-      \ifx\XKdisablecjksymbolspacing\empty\else
-        to\XK at vert@half at em
-      \fi
-      \bgroup}%
-  \fi
-  \ifx\precjkfullstop\relax\else
-    \def\precjkfullstop  {\leavevmode
-      \ifx\empty\xetexkocharraise\else\raise\xetexkocharraise\fi
-      \hbox
-      \ifx\XKdisablecjksymbolspacing\empty\else
-        to\XK at vert@half at em
-      \fi
-      \bgroup}%
-  \fi
-  \spaceskip\XK at vert@half at em plus\XK at vert@half at em\relax
-  \parindent\XK at vert@half at em \parindent2\parindent
-}
-
-\protected\def\vertical#1{%
-  \setbox\z@\vbox\bgroup
-    \hsize=#1%
-    \leftskip\z@
-    \rightskip\z@
-    \parindent\z@
-    \everypar{}%
-    \XK at vertical@spacing
-}
-
-\protected\def\endvertical{%
-  \egroup
-  \dimen@\dimexpr\ht\z at +\dp\z@\relax
-  \dimen at ii\dimexpr\wd\z at -\dp\z@\relax
-  \setbox\z@\hbox{%
-    \kern\dimexpr\ht\z at +0.5em\relax
-    \wd\z@\z@
-    \ht\z@\z@
-    \dp\z@\z@
-    \special{x:gsave}%
-    \special{x:rotate -90}%
-    \box\z@
-    \special{x:grestore}}%
-  \wd\z@\dimen@
-  \ht\z@\z@
-  \dp\z@\z@
-  \leavevmode
-  \raise\dimen at ii\box\z@
-}
-
-% horizontal box inside vertical typesetting
-\protected\def\horizontal#1{%
-  \setbox\z@\vbox\bgroup
-    \hsize=#1%
-    \leftskip \z@
-    \rightskip\z@
-    \parindent\z@
-    \everypar {}%
-    \spaceskip     \fontdimen2\font
-              plus \fontdimen3\font
-              minus\fontdimen4\font
-    \ifdefined\xk at horiz@precjkopenparen
-      \let\precjkopenparen \xk at horiz@precjkopenparen
-      \let\precjkcloseparen\xk at horiz@precjkcloseparen
-      \let\precjkfullstop  \xk at horiz@precjkfullstop
-    \fi
-}
-\protected\def\endhorizontal{%
-  \egroup
-  \dimen@\dimexpr\ht\z at +\dp\z@\relax
-  \dimen at ii\dimexpr\wd\z at +.5ex\relax
-  \setbox\z@\hbox\bgroup
-    \wd\z@\z@\ht\z@\z@\dp\z@\z@
-    \special{x:gsave}%
-    \special{x:rotate 90}%
-    \box\z@
-    \special{x:grestore}%
-  \egroup
-  \wd\z@\dimen@
-  \ht\z@\dimen at ii
-  \dp\z@\z@
-  \fboxsep=-\fboxrule
-  \leavevmode\lower.5ex\box\z@
-}
-
-\protected\def\vertlatin#1{\leavevmode\lower0.5ex\hbox{\latinmarks #1}}
-
 \endinput
-
-%% example:
-%\newhangulfontfamily\myvertfont
-%  [Script=Hangul,Vertical=RotatedGlyphs]
-%  {HCR Dotum LVT}
-%\verticalem=1.05em
-%\begin{vertical}{12em}\myvertfont
-%  세로쓰기 영역.
-%  #1 = 세로길이
-%\end{vertical}
-

Modified: branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
===================================================================
--- branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty	2021-03-20 22:20:30 UTC (rev 58564)
+++ branches/branch2020.0/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty	2021-03-20 22:20:42 UTC (rev 58565)
@@ -1,6 +1,6 @@
 % xetexko.sty
 %
-% Copyright (c) 2013-2020 Dohyun Kim  <nomos at ktug org>
+% Copyright (c) 2013-2021 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
@@ -10,42 +10,2265 @@
 % and version 1.3c or later is part of all distributions of LaTeX
 % version 2006/05/20 or later.
 
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else
-  \ProvidesPackage{xetexko}[2020/02/17 v2.23 Typesetting Korean with XeTeX]
+\ifdefined\XeKocatcodeofATchar\endinput\fi
+\edef\XeKocatcodeofATchar{\catcode`@=\the\catcode`@\relax}
+\catcode`@=11
+
+\ifdefined\ProvidesPackage
+  \NeedsTeXFormat{LaTeX2e}[2020/10/01]
+  \ProvidesPackage{xetexko}[2021/03/20 v3.0 typesetting Korean with XeTeX]
+\else
+  \ifdefined\@tempcnta\else \newcount\@tempcnta \fi
+  \ifdefined\@gobble\else \def\@gobble#1{} \fi
+  \ifdefined\@sptoken \else
+    \begingroup\def\:{\global\let\@sptoken= } \: \endgroup
+  \fi
 \fi
 
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname selectfont\endcsname\relax
-  \chardef\catcodeofATcharacter\catcode`@
-  \catcode`\@ = 11
+\chardef\XeTeXcharclassBoundary=4095
+\chardef\XeTeXcharclassIgnore  =4096
 
-  \input xetexko-space.sty
-  \input xetexko-josa.sty
-  \input xetexko-vertical.sty
+\newXeTeXintercharclass\XeTeXcharclassID
+\newXeTeXintercharclass\XeTeXcharclassCJ
+\newXeTeXintercharclass\XeTeXcharclassOP
+\newXeTeXintercharclass\XeTeXcharclassCL
+\newXeTeXintercharclass\XeTeXcharclassEX
+\let\XeTeXcharclassIS\XeTeXcharclassID
+\let\XeTeXcharclassNS\XeTeXcharclassID
+\let\XeTeXcharclassCM\XeTeXcharclassIgnore
+\input load-unicode-xetex-classes %
 
-  %%% 한글 폰트
-  \def\hangulfont{\font\hangfnt}
-  \def\hanjafont {\font\hanifnt}
-  %\hangulfont="[UnBatang]:mapping=tex-text" at 10pt
-  %%% 수식 한글
-  \newfam\symmathhangul
-  \def\setmathhangulfont#1#{\setmathhangulfont@}
-  \def\setmathhangulfont@#1{%
-    \font\tenhangul   = "#1" at 10pt
-    \font\sevenhangul = "#1" at 7pt
-    \font\fivehangul  = "#1" at 5pt
-    \textfont\symmathhangul         = \tenhangul
-    \scriptfont\symmathhangul       = \sevenhangul
-    \scriptscriptfont\symmathhangul = \fivehangul
+\newXeTeXintercharclass\XeTeXcharclassHG
+\newXeTeXintercharclass\XeTeXcharclassJJ % hangul MV and TC
+\newXeTeXintercharclass\XeTeXcharclassMD % ・ : ;
+\newXeTeXintercharclass\XeTeXcharclassFS % 。 .
+\newXeTeXintercharclass\XeTeXcharclassLD % ― … ‥
+\newXeTeXintercharclass\XeTeXcharclassSY % KS symbols
+\newXeTeXintercharclass\XeTeXcharclassAO % ascii ( `` etc
+\newXeTeXintercharclass\XeTeXcharclassAC % ascii ) '' etc
+\newXeTeXintercharclass\XeTeXcharclassAM % ascii colons
+\newXeTeXintercharclass\XeTeXcharclassAH % ascii hyphen and its ligatures
+\newXeTeXintercharclass\XeTeXcharclassAP % ascii punctuations
+\newXeTeXintercharclass\XeTeXcharclassVC % colons in vertical writing
+\let\XeTeXcharclassAA=\z@                % other non-cjk chars
+
+% more CM
+\count@"FE00 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassIgnore
+  \ifnum\count@<"FE0F \advance\count@\@ne \repeat
+\count@"E0100 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassIgnore
+  \ifnum\count@<"E01EF \advance\count@\@ne \repeat
+
+% hangul
+\count@="AC00 \loop
+  \catcode\count@=12 % for josa
+  \XeTeXcharclass\count@=\XeTeXcharclassHG
+  \ifnum\count@<"D7A3 \advance\count@\@ne \repeat
+\count@="1100 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassHG
+  \ifnum\count@<"115F \advance\count@\@ne \repeat
+\count@="A960 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassHG
+  \ifnum\count@<"A97C \advance\count@\@ne \repeat
+\count@="3131 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassHG
+  \ifnum\count@<"318E \advance\count@\@ne \repeat
+% hangul MV and TC
+\count@="1160 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassJJ
+  \ifnum\count@<"11FF \advance\count@\@ne \repeat
+\count@="D7B0 \loop
+  \XeTeXcharclass\count@=\XeTeXcharclassJJ
+  \ifnum\count@<"D7FB \advance\count@\@ne \repeat
+
+% ascii opening
+\XeTeXcharclass "28=\XeTeXcharclassAO % ( LEFT PARENTHESIS
+\XeTeXcharclass "3C=\XeTeXcharclassAO % < LESS-THAN SIGN
+\XeTeXcharclass "5B=\XeTeXcharclassAO % [ LEFT SQUARE BRACKET
+\XeTeXcharclass "60=\XeTeXcharclassAO % ` GRAVE ACCENT
+\XeTeXcharclass "7B=\XeTeXcharclassAO % { LEFT CURLY BRACKET
+\XeTeXcharclass "AB=\XeTeXcharclassAO % « LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
+% ascii closing
+\XeTeXcharclass "27=\XeTeXcharclassAC % ' APOSTROPHE
+\XeTeXcharclass "29=\XeTeXcharclassAC % ) RIGHT PARENTHESIS
+\XeTeXcharclass "3E=\XeTeXcharclassAC % > GREATER-THAN SIGN
+\XeTeXcharclass "5D=\XeTeXcharclassAC % ] RIGHT SQUARE BRACKET
+\XeTeXcharclass "7D=\XeTeXcharclassAC % } RIGHT CURLY BRACKET
+\XeTeXcharclass "BB=\XeTeXcharclassAC % » RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
+% ascii colons
+\XeTeXcharclass "3A=\XeTeXcharclassAM % : COLON
+\XeTeXcharclass "3B=\XeTeXcharclassAM % ; SEMICOLON
+% ascii hyphen
+\XeTeXcharclass "2D  =\XeTeXcharclassAH % -
+\XeTeXcharclass "2F  =\XeTeXcharclassAH % /
+\XeTeXcharclass "2013=\XeTeXcharclassAH % –
+\XeTeXcharclass "2014=\XeTeXcharclassAH % —
+% ascii punctuations
+\XeTeXcharclass "21=\XeTeXcharclassAP % ! EXCLAMATION MARK
+\XeTeXcharclass "2C=\XeTeXcharclassAP % , COMMA
+\XeTeXcharclass "2E=\XeTeXcharclassAP % . FULL STOP
+\XeTeXcharclass "3F=\XeTeXcharclassAP % ? QUESTION MARK
+%
+\XeTeXcharclass "2018=\XeTeXcharclassOP % ‘ LEFT SINGLE QUOTATION MARK
+\XeTeXcharclass "201C=\XeTeXcharclassOP % “ LEFT DOUBLE QUOTATION MARK
+%
+\XeTeXcharclass "2019=\XeTeXcharclassCL % ’ RIGHT SINGLE QUOTATION MARK
+\XeTeXcharclass "201D=\XeTeXcharclassCL % ” RIGHT DOUBLE QUOTATION MARK
+% NS
+\XeTeXcharclass "00B7=\XeTeXcharclassMD % · MIDDLE DOT
+\XeTeXcharclass "30FB=\XeTeXcharclassMD % ・ KATAKANA MIDDLE DOT
+\XeTeXcharclass "FE54=\XeTeXcharclassMD % ﹔ SMALL SEMICOLON
+\XeTeXcharclass "FE55=\XeTeXcharclassMD % ﹕ SMALL COLON
+\XeTeXcharclass "FF1A=\XeTeXcharclassMD % : FULLWIDTH COLON
+\XeTeXcharclass "FF1B=\XeTeXcharclassMD % ; FULLWIDTH SEMICOLON
+\XeTeXcharclass "FF65=\XeTeXcharclassMD % ・ HALFWIDTH KATAKANA MIDDLE DOT
+%
+\XeTeXcharclass "3002=\XeTeXcharclassFS % 。 IDEOGRAPHIC FULL STOP
+\XeTeXcharclass "FE12=\XeTeXcharclassFS % ︒ PRESENTATION FORM FOR VERTICAL IDEOGRAPHIC FULL STOP
+\XeTeXcharclass "FE52=\XeTeXcharclassFS % ﹒ SMALL FULL STOP
+\XeTeXcharclass "FF0E=\XeTeXcharclassFS % . FULLWIDTH FULL STOP
+\XeTeXcharclass "FF61=\XeTeXcharclassFS % 。 HALFWIDTH IDEOGRAPHIC FULL STOP
+%
+\XeTeXcharclass "2015=\XeTeXcharclassLD % ― HORIZONTAL BAR
+\XeTeXcharclass "2025=\XeTeXcharclassLD % ‥ TWO DOT LEADER
+\XeTeXcharclass "2026=\XeTeXcharclassLD % … HORIZONTAL ELLIPSIS
+% 결락기호
+\XeTeXcharclass "25A1=\XeTeXcharclassID % □
+% some KS symbols
+\XeTeXcharclass "203B=\XeTeXcharclassSY % ※
+\XeTeXcharclass "2103=\XeTeXcharclassSY % ℃
+\XeTeXcharclass "2109=\XeTeXcharclassSY % ℉
+\XeTeXcharclass "2113=\XeTeXcharclassSY % ℓ
+\XeTeXcharclass "2121=\XeTeXcharclassSY % ℡
+\XeTeXcharclass "2122=\XeTeXcharclassSY % ™
+\XeTeXcharclass "212B=\XeTeXcharclassSY % Å
+\count@="2160 \loop % Ⅰ..Ⅻ
+  \XeTeXcharclass\count@=\XeTeXcharclassSY
+  \ifnum\count@<"216B \advance\count@\@ne \repeat
+\count@="2170 \loop % ⅰ..ⅻ
+  \XeTeXcharclass\count@=\XeTeXcharclassSY
+  \ifnum\count@<"217B \advance\count@\@ne \repeat
+\XeTeXcharclass "223C=\XeTeXcharclassSY % ∼
+\count@="2460 \loop % ①..⓪
+  \XeTeXcharclass\count@=\XeTeXcharclassSY
+  \ifnum\count@<"24EA \advance\count@\@ne \repeat
+\XeTeXcharclass "2500 = \XeTeXcharclassSY % ─
+\XeTeXcharclass "2501 = \XeTeXcharclassSY % ━
+\XeTeXcharclass "2502 = \XeTeXcharclassSY % │
+\XeTeXcharclass "2503 = \XeTeXcharclassSY % ┃
+\count@="250C \loop % ─..╋
+  \XeTeXcharclass\count@=\XeTeXcharclassSY
+  \ifnum\count@<"254B \advance\count@\@ne \repeat
+\XeTeXcharclass "2592 = \XeTeXcharclassSY % ▒
+\XeTeXcharclass "25A0 = \XeTeXcharclassSY % ■
+\XeTeXcharclass "25A3 = \XeTeXcharclassSY % ▣
+\XeTeXcharclass "25A4 = \XeTeXcharclassSY % ▤
+\XeTeXcharclass "25A5 = \XeTeXcharclassSY % ▥
+\XeTeXcharclass "25A6 = \XeTeXcharclassSY % ▦
+\XeTeXcharclass "25A7 = \XeTeXcharclassSY % ▧
+\XeTeXcharclass "25A8 = \XeTeXcharclassSY % ▨
+\XeTeXcharclass "25A9 = \XeTeXcharclassSY % ▩
+\XeTeXcharclass "25B2 = \XeTeXcharclassSY % ▲
+\XeTeXcharclass "25B3 = \XeTeXcharclassSY % △
+\XeTeXcharclass "25B6 = \XeTeXcharclassSY % ▶
+\XeTeXcharclass "25B7 = \XeTeXcharclassSY % ▷
+\XeTeXcharclass "25BC = \XeTeXcharclassSY % ▼
+\XeTeXcharclass "25BD = \XeTeXcharclassSY % ▽
+\XeTeXcharclass "25C0 = \XeTeXcharclassSY % ◀
+\XeTeXcharclass "25C1 = \XeTeXcharclassSY % ◁
+\XeTeXcharclass "25C6 = \XeTeXcharclassSY % ◆
+\XeTeXcharclass "25C7 = \XeTeXcharclassSY % ◇
+\XeTeXcharclass "25C8 = \XeTeXcharclassSY % ◈
+\XeTeXcharclass "25CB = \XeTeXcharclassSY % ○
+\XeTeXcharclass "25CE = \XeTeXcharclassSY % ◎
+\XeTeXcharclass "25CF = \XeTeXcharclassSY % ●
+\XeTeXcharclass "25D0 = \XeTeXcharclassSY % ◐
+\XeTeXcharclass "25D1 = \XeTeXcharclassSY % ◑
+\XeTeXcharclass "2605 = \XeTeXcharclassSY % ★
+\XeTeXcharclass "2606 = \XeTeXcharclassSY % ☆
+\XeTeXcharclass "260E = \XeTeXcharclassSY % ☎
+\XeTeXcharclass "260F = \XeTeXcharclassSY % ☏
+\XeTeXcharclass "261C = \XeTeXcharclassSY % ☜
+\XeTeXcharclass "261E = \XeTeXcharclassSY % ☞
+\XeTeXcharclass "2640 = \XeTeXcharclassSY % ♀
+\XeTeXcharclass "2642 = \XeTeXcharclassSY % ♂
+\XeTeXcharclass "2660 = \XeTeXcharclassSY % ♠
+\XeTeXcharclass "2661 = \XeTeXcharclassSY % ♡
+\XeTeXcharclass "2663 = \XeTeXcharclassSY % ♣
+\XeTeXcharclass "2664 = \XeTeXcharclassSY % ♤
+\XeTeXcharclass "2665 = \XeTeXcharclassSY % ♥
+\XeTeXcharclass "2667 = \XeTeXcharclassSY % ♧
+\XeTeXcharclass "2668 = \XeTeXcharclassSY % ♨
+\XeTeXcharclass "2669 = \XeTeXcharclassSY % ♩
+\XeTeXcharclass "266A = \XeTeXcharclassSY % ♪
+\XeTeXcharclass "266C = \XeTeXcharclassSY % ♬
+\XeTeXcharclass "266D = \XeTeXcharclassSY % ♭
+\XeTeXcharclass "3012 = \XeTeXcharclassSY % 〒
+\XeTeXcharclass "301C = \XeTeXcharclassSY % 〜
+\XeTeXcharclass "FF04 = \XeTeXcharclassSY % $
+\XeTeXcharclass "FF05 = \XeTeXcharclassSY % %
+\XeTeXcharclass "FF5E = \XeTeXcharclassSY % ~
+\XeTeXcharclass "FFE0 = \XeTeXcharclassSY % ¢
+\XeTeXcharclass "FFE1 = \XeTeXcharclassSY % £
+\XeTeXcharclass "FFE5 = \XeTeXcharclassSY % ¥
+\XeTeXcharclass "FFE6 = \XeTeXcharclassSY % ₩
+
+% spaces
+\def\XeKo at halfzero         {\hskip 2\XeKo at halfdim \relax}
+\def\XeKo at halfhalf         {\hskip 2\XeKo at halfdim minus 2\XeKo at halfdim \relax}
+\def\XeKo at halfquarter      {\hskip 2\XeKo at halfdim minus  \XeKo at halfdim \relax}
+\def\XeKo at quarterquarter   {\hskip  \XeKo at halfdim minus  \XeKo at halfdim \relax}
+\def\XeKo at iiiquarterquarter{\hskip 3\XeKo at halfdim minus  \XeKo at halfdim \relax}
+\let\XeKo at nobreak\nobreak
+
+\def\XKinterhangulbreak{% compat
+  \ifnum\XeKo at typesetclassic=\z@
+    \penalty\XeTeXlinebreakpenalty
+  \fi
+  \hskip
+  \ifdefined\xetexkointerhchar \xetexkointerhchar \else \z@ \fi
+  \XeKo at stretchshrink
   }
-  \setmathhangulblock{AC00}{D7A3}
-  %\setmathhangulfont{[UnBatang]}
+\def\XKinterhanjabreak{% compat
+  \ifnum\XeKo at typesetclassic=\z@
+    \penalty\XeTeXlinebreakpenalty
+  \fi
+  \hskip\z@ \XeKo at stretchshrink
+  }
 
-  \catcode`\@\catcodeofATcharacter
-  \expandafter\endinput
+\def\XeKo at latincjk@classic{%
+  \hskip
+  \ifdefined\xetexkohu
+    \xetexkohu plus .5\dimexpr\xetexkohu\relax minus.25\dimexpr\xetexkohu\relax
+  \else
+    \XeKo at halfdim plus .5\XeKo at halfdim minus.25\XeKo at halfdim
+  \fi
+  }
+\def\XeKo at latincjk@modern{%
+  \hskip \ifdefined\xetexkohu \xetexkohu \else \XeKo at halfdim \fi
+  \XeKo at stretchshrink
+  }
+\def\XeKo at postmath@modern{%
+  \hskip 2\ifdefined\xetexkohu \dimexpr\xetexkohu\relax \else \XeKo at halfdim \fi
+  \XeKo at stretchshrink
+  }
+
+% 고아글자 억제. verbatim 에서는 이 명령을 꺼야 한다
+\def\XeKo at suppress@char at orphan{%
+  \XeKo at skip@=\lastskip \unskip
+  \XeKo at count@=\lastpenalty \unpenalty
+  \ifnum\XeKo at count@<5000 \XeKo at count@=5000 \fi
+  \penalty\XeKo at count@
+  \hskip\XeKo at skip@
+  }
+
+\protected\def\inhibitglue{\hskip\z@\XeKo at stretchshrink}
+
+% typesetting modes
+\protected\def\typesetclassic{%
+  \chardef\XeKo at typesetclassic\@ne
+  \def\XeKo at halfdim{\dimexpr.25em\relax}%
+  \def\XeKo at stretchshrink{plus.08em minus.04em}%
+  \let\XeKo at latincjk\XeKo at latincjk@classic
+  \let\XeKo at postmath\XeKo at latincjk@classic
+  \XeTeXlinebreakpenalty=\z@
+  \XeTeXlinebreakskip=\z@ \XeKo at stretchshrink
+  \parindent=1em
+  }
+\protected\def\typesetmodern{%
+  \chardef\XeKo at typesetclassic\z@
+  \def\XeKo at halfdim{\dimexpr.05em\relax}%
+  \def\XeKo at stretchshrink{plus.04em minus.02em}%
+  \let\XeKo at latincjk\XeKo at latincjk@modern
+  \let\XeKo at postmath\XeKo at postmath@modern
+  \XeTeXlinebreakpenalty=50
+  \XeTeXlinebreakskip=\z@ \XeKo at stretchshrink
+  }
+\typesetmodern
+
+\let\japanese\typesetclassic
+\protected\def\Tchinese{\typesetclassic\parindent=2em }
+\protected\def\Schinese{\typesetclassic\parindent=2em
+  \chardef\XeKo at typesetSchinese\@ne
+  \ifnum\XeKo at typesetvertical=\@ne
+    \XeKo at Schinese@vertical
+  \else
+    \XeKo at Schinese@horizontal
+  \fi
+  }
+\let\chinese\Schinese
+\def\XeKo at Schinese@horizontal{% these glyphs in simplified chinese fonts are left-aligned.
+  \XeTeXcharclass "FF01 = \XeTeXcharclassFS % !
+  \XeTeXcharclass "FF1A = \XeTeXcharclassCL % :
+  \XeTeXcharclass "FF1B = \XeTeXcharclassCL % ;
+  \XeTeXcharclass "FF1F = \XeTeXcharclassFS % ?
+  }
+\def\XeKo at Schinese@vertical{%
+  \XeTeXcharclass "FF01 = \XeTeXcharclassEX % !
+  \XeTeXcharclass "FF1A = \XeTeXcharclassVC % :
+  \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ;
+  \XeTeXcharclass "FF1F = \XeTeXcharclassEX % ?
+  }
+
+\chardef\XeKo at typesetvertical\z@
+\chardef\XeKo at typesetSchinese\z@
+
+\protected\def\typesetvertical{%
+  \chardef\XeKo at typesetvertical\@ne
+  \XeTeXcharclass "FF1A = \XeTeXcharclassVC % :
+  \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ;
+  \ifnum\XeKo at typesetSchinese=\@ne \XeKo at Schinese@vertical \fi
+  \parindent=1em
+  }
+\protected\def\typesethorizontal{%
+  \chardef\XeKo at typesetvertical\z@
+  \XeTeXcharclass "FF1A = \XeTeXcharclassMD % :
+  \XeTeXcharclass "FF1B = \XeTeXcharclassMD % ;
+  \ifnum\XeKo at typesetSchinese=\@ne \XeKo at Schinese@horizontal \fi
+  \parindent\z@
+  }
+\protected\def\vertical#1{%
+  \leavevmode
+  \setbox\z@\vbox\bgroup
+    \hsize#1\relax
+    \typesetvertical
+  }
+\protected\def\endvertical{%
+  \egroup
+  \XeKo at rotatebox\z@
+  \box\z@
+  }
+\protected\def\horizontal#1{%
+  \leavevmode
+  \setbox\z@\vbox\bgroup
+    \hsize#1\relax
+    \typesethorizontal
+  }
+\protected\def\endhorizontal{%
+  \egroup
+  \XeKo at unrotatebox\z@
+  \lower.5\ht\z@ \box\z@
+  }
+\def\XeKo at rotatebox#1{%
+  \setbox#1\hbox to\dimexpr\ht#1+\dp#1\bgroup
+    \hfil
+    \vbox to\wd#1\bgroup
+      \wd#1\z@ \ht#1\z@ \dp#1\z@
+      \special{x:gsave}\special{x:rotate -90}\box#1\special{x:grestore}%
+      \vfil
+    \egroup
+    \kern-.5ex
+  \egroup
+  }
+\def\XeKo at unrotatebox#1{%
+  \setbox#1\hbox to\dimexpr\ht#1+\dp#1\bgroup
+    \vbox to\wd#1\bgroup
+      \vfil
+      \wd#1\z@ \ht#1\z@ \dp#1\z@
+      \special{x:gsave}\special{x:rotate 90}\box#1\special{x:grestore}%
+    \egroup
+    \hfil
+  \egroup
+  }
+\ifcsname ver at xetexko.sty\endcsname
+  \def\verticaltypesetting{%
+    \maxdepth\z@ \typesetvertical
+    \dimen@\textwidth \textwidth\textheight \textheight\dimen@
+    \edef\@outputpage{\unexpanded{\XeKo at rotatebox\@outputbox
+    \textwidth\textheight}\unexpanded\expandafter{\@outputpage}}}
+\else
+  \def\verticaltypesetting{%
+    \dimen@\hsize \hsize\vsize \vsize\dimen@
+    \edef\plainoutput{\unexpanded{\dimen@\hsize \hsize\vsize \vsize\dimen@}%
+      \unexpanded\expandafter{\plainoutput}}%
+    \def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth
+      \pagecontents}\XeKo at rotatebox\z@\box\z@}%
+    \maxdepth\z@ \typesetvertical }
 \fi
 
+\protected\def\vertlatin#1{\leavevmode\lower.5ex\hbox{\latinmarks #1}} % compat
+
+% fonts
+\newtoks\XeKo at font@options
+\XeKo at font@options{}
+
+\def\XeKo at reset@options{%
+  \let\xetexkohu        \XeKo at undefined
+  \let\xetexkocharraise \XeKo at undefined
+  \let\xetexkointerhchar\XeKo at undefined
+  }
+
+\def\XeKo at font@Hangul{%
+  \ifdefined\XeKo at hangul@font
+    \edef\XeKo at curr{\the\font\the\XeKo at font@options}%
+    \ifx\XeKo at curr\XeKo at hangul@font\else
+      \ifx\XeKo at curr\XeKo at hanja@font\else
+        \edef\XeKo at curr@latin{\the\font}%
+      \fi
+      \XeKo at reset@options
+      \XeKo at hangul@font
+      \XeKo at font@options\expandafter{\xetexkohanguloption}%
+    \fi
+  \fi
+  }
+\def\XeKo at font@CJK{%
+  \ifdefined\XeKo at hanja@font
+    \edef\XeKo at curr{\the\font\the\XeKo at font@options}%
+    \ifx\XeKo at curr\XeKo at hanja@font\else
+      \ifx\XeKo at curr\XeKo at hangul@font\else
+        \edef\XeKo at curr@latin{\the\font}%
+      \fi
+      \XeKo at reset@options
+      \XeKo at hanja@font
+      \XeKo at font@options\expandafter{\xetexkohanjaoption}%
+    \fi
+  \fi
+  }
+\def\XeKo at font@Latin{%
+  \ifdefined\XeKo at curr@latin
+    \edef\XeKo at curr{\the\font\the\XeKo at font@options}%
+    \ifx\XeKo at curr\XeKo at hangul@font
+      \XeKo at curr@latin
+    \else
+      \ifx\XeKo at curr\XeKo at hanja@font
+        \XeKo at curr@latin
+      \fi
+    \fi
+  \fi
+  }
+\let\XeKo at fontHG\XeKo at font@Hangul
+\let\XeKo at fontID\XeKo at font@CJK
+\let\XeKo at fontCJ\XeKo at font@CJK
+\let\XeKo at fontSY\XeKo at font@Hangul
+\let\XeKo at fontAA\XeKo at font@Latin
+\let\XeKo at fontAO\XeKo at font@Hangul
+\let\XeKo at fontAC\XeKo at font@Hangul
+\let\XeKo at fontAP\relax % prevfont
+\let\XeKo at fontAM\relax % prevfont
+\let\XeKo at fontAH\XeKo at font@Latin
+\let\XeKo at fontOP\XeKo at font@Hangul
+\let\XeKo at fontCL\XeKo at font@Hangul
+\let\XeKo at fontMD\XeKo at font@Hangul
+\let\XeKo at fontFS\XeKo at font@Hangul
+\let\XeKo at fontEX\XeKo at font@Hangul
+\let\XeKo at fontLD\XeKo at font@Hangul
+\let\XeKo at fontVC\XeKo at font@Hangul
+
+\protected\def\latinalphs  {\let\XeKo at fontAA\XeKo at font@Latin}
+\protected\def\latinparens {\let\XeKo at fontAO\XeKo at font@Latin\let\XeKo at fontAC\XeKo at font@Latin}
+\protected\def\latinpuncts {\let\XeKo at fontAP\XeKo at font@Latin}
+\protected\def\latincolons {\let\XeKo at fontAM\XeKo at font@Latin}
+\protected\def\latinhyphens{\let\XeKo at fontAH\XeKo at font@Latin}
+\protected\def\latincjksymbols{%
+  \let\XeKo at fontSY\XeKo at font@Latin
+  \let\XeKo at fontOP\XeKo at font@Latin
+  \let\XeKo at fontCL\XeKo at font@Latin
+  \let\XeKo at fontMD\XeKo at font@Latin
+  \let\XeKo at fontFS\XeKo at font@Latin
+  \let\XeKo at fontEX\XeKo at font@Latin
+  \let\XeKo at fontLD\XeKo at font@Latin
+  \let\XeKo at fontVC\XeKo at font@Latin
+  }
+\protected\def\latinmarks{%
+  \latinalphs\latinparens\latinpuncts\latincolons\latinhyphens\latincjksymbols
+  }
+\let\latinnums\latinalphs
+\let\latinquotes\latinparens
+
+\protected\def\hangulalphs  {\let\XeKo at fontAA\XeKo at font@Hangul}
+\protected\def\hangulparens {\let\XeKo at fontAO\XeKo at font@Hangul\let\XeKo at fontAC\XeKo at font@Hangul}
+\protected\def\hangulpuncts {\let\XeKo at fontAP\XeKo at font@Hangul}
+\protected\def\hangulcolons {\let\XeKo at fontAM\XeKo at font@Hangul}
+\protected\def\hangulhyphens{\let\XeKo at fontAH\XeKo at font@Hangul}
+\protected\def\hangulcjksymbols{%
+  \let\XeKo at fontSY\XeKo at font@Hangul
+  \let\XeKo at fontOP\XeKo at font@Hangul
+  \let\XeKo at fontCL\XeKo at font@Hangul
+  \let\XeKo at fontMD\XeKo at font@Hangul
+  \let\XeKo at fontFS\XeKo at font@Hangul
+  \let\XeKo at fontEX\XeKo at font@Hangul
+  \let\XeKo at fontLD\XeKo at font@Hangul
+  \let\XeKo at fontVC\XeKo at font@Hangul
+  }
+\protected\def\hangulmarks{%
+  \hangulalphs\hangulparens\hangulpuncts\hangulcolons\hangulhyphens\hangulcjksymbols
+  }
+\let\hangulnums\hangulalphs
+\let\hangulquotes\hangulparens
+
+\protected\def\hanjaalphs  {\let\XeKo at fontAA\XeKo at font@CJK}
+\protected\def\hanjaparens {\let\XeKo at fontAO\XeKo at font@CJK\let\XeKo at fontAC\XeKo at font@CJK}
+\protected\def\hanjapuncts {\let\XeKo at fontAP\XeKo at font@CJK}
+\protected\def\hanjacolons {\let\XeKo at fontAM\XeKo at font@CJK}
+\protected\def\hanjahyphens{\let\XeKo at fontAH\XeKo at font@CJK}
+\protected\def\hanjacjksymbols{%
+  \let\XeKo at fontSY\XeKo at font@Hanja
+  \let\XeKo at fontOP\XeKo at font@Hanja
+  \let\XeKo at fontCL\XeKo at font@Hanja
+  \let\XeKo at fontMD\XeKo at font@Hanja
+  \let\XeKo at fontFS\XeKo at font@Hanja
+  \let\XeKo at fontEX\XeKo at font@Hanja
+  \let\XeKo at fontLD\XeKo at font@Hanja
+  \let\XeKo at fontVC\XeKo at font@Hanja
+  }
+\protected\def\hanjamarks{%
+  \hanjaalphs\hanjaparens\hanjapuncts\hanjacolons\hanjahyphens\hanjacjksymbols
+  }
+\let\hanjanums\hanjaalphs
+\let\hanjaquotes\hanjaparens
+
+\protected\def\prevfontalphs  {\let\XeKo at fontAA\relax}
+\protected\def\prevfontparens {\let\XeKo at fontAO\relax\let\XeKo at fontAC\relax}
+\protected\def\prevfontpuncts {\let\XeKo at fontAP\relax}
+\protected\def\prevfontcolons {\let\XeKo at fontAM\relax}
+\protected\def\prevfonthyphens{\let\XeKo at fontAH\relax}
+\protected\def\prevfontcjksymbols{%
+  \let\XeKo at fontSY\relax
+  \let\XeKo at fontOP\relax
+  \let\XeKo at fontCL\relax
+  \let\XeKo at fontMD\relax
+  \let\XeKo at fontFS\relax
+  \let\XeKo at fontEX\relax
+  \let\XeKo at fontLD\relax
+  \let\XeKo at fontVC\relax
+  }
+\protected\def\prevfontmarks{%
+  \prevfontalphs\prevfontparens\prevfontpuncts\prevfontcolons\prevfonthyphens\prevfontcjksymbols
+  }
+\let\prevfontnums\prevfontalphs
+\let\prevfontquotes\prevfontparens
+
+% interchartoks
+\chardef\XeKo at cjk@ignorespaces\z@
+\protected\def\removeclassicspaces{\chardef\XeKo at cjk@ignorespaces\@ne}
+
+\expandafter\let\csname XeKo at 1@class\endcsname =\XeTeXcharclassHG
+\expandafter\let\csname XeKo at 2@class\endcsname =\XeTeXcharclassID
+\expandafter\let\csname XeKo at 3@class\endcsname =\XeTeXcharclassSY
+\expandafter\let\csname XeKo at 4@class\endcsname =\XeTeXcharclassAA
+\expandafter\let\csname XeKo at 5@class\endcsname =\XeTeXcharclassAO
+\expandafter\let\csname XeKo at 6@class\endcsname =\XeTeXcharclassAC
+\expandafter\let\csname XeKo at 7@class\endcsname =\XeTeXcharclassAP
+\expandafter\let\csname XeKo at 8@class\endcsname =\XeTeXcharclassAM
+\expandafter\let\csname XeKo at 9@class\endcsname =\XeTeXcharclassAH
+\expandafter\let\csname XeKo at 10@class\endcsname=\XeTeXcharclassOP
+\expandafter\let\csname XeKo at 11@class\endcsname=\XeTeXcharclassCL
+\expandafter\let\csname XeKo at 12@class\endcsname=\XeTeXcharclassMD
+\expandafter\let\csname XeKo at 13@class\endcsname=\XeTeXcharclassFS
+\expandafter\let\csname XeKo at 14@class\endcsname=\XeTeXcharclassEX
+\expandafter\let\csname XeKo at 15@class\endcsname=\XeTeXcharclassLD
+\expandafter\let\csname XeKo at 16@class\endcsname=\XeTeXcharclassVC
+
+\newtoks\XeKo at toks@
+\newtoks\XeKo at toks@ii
+\newskip\XeKo at skip@
+\newcount\XeKo at count@
+\newdimen\XeKo at dimen@
+
+\def\XeKo at check@next at tok{\futurelet\XeKo at let@token\XeKo at check@next at tok@}
+\def\XeKo at check@next at tok@{%
+  \XeKo at get@charslot
+  \ifnum\XeKo at charslot="FFFF
+    % 다음 한 줄이 없으면 한글과 한글 사이에 폰트가 변경되는 경우 글자 누락.
+    % 폰트 변경은 kern 에 아무 영향을 주지 않기 때문.
+    \def\XeKo at maybe@gobble{\def\XeKo at maybe@gobble{\expandafter\expandafter\expandafter\@gobble}}%
+    \expandafter\XeKo at flush@toks
+  \else
+    \ifnum\XeKo at currclass>\tw@
+      \expandafter\expandafter\expandafter\XeKo at check@next at tok@latin
+    \else % HG ID
+      \expandafter\expandafter\expandafter\XeKo at check@next at tok@cjk
+    \fi
+  \fi
+  }
+\def\XeKo at check@next at tok@cjk{%
+  \ifnum 0\ifnum\XeTeXcharclass\XeKo at charslot=\XeTeXcharclassJJ     1\else
+          \ifnum\XeTeXcharclass\XeKo at charslot=\XeTeXcharclassIgnore 1\fi\fi >\z@
+    \expandafter\XeKo at addto@toks
+  \else
+    \expandafter\XeKo at flush@toks
+  \fi
+  }
+\def\XeKo at check@next at tok@latin{%
+  \ifnum 0%
+      \ifnum\XeTeXcharclass\XeKo at charslot=\csname XeKo@\XeKo at currclass @class\endcsname 1\else
+      \ifnum\XeTeXcharclass\XeKo at charslot=\XeTeXcharclassIgnore 1\fi\fi >\z@
+    \expandafter\XeKo at addto@toks
+  \else
+    \expandafter\XeKo at flush@toks
+  \fi
+  }
+\def\XeKo at addto@toks#1{%
+  \ifnum\XeKo at currclass=4 % AA
+    \global\let\XeKo at josatoken=#1\relax
+  \else\ifnum\XeTeXcharclass\XeKo at charslot=\XeTeXcharclassJJ
+    \global\let\XeKo at josatoken=#1\relax
+  \else\ifnum\XeKo at currclass=\thr@@ % SY
+    \global\let\XeKo at josatoken=#1\relax
+  \fi\fi\fi
+  \XeKo at toks@\expandafter{\the\XeKo at toks@ #1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at flush@toks{%
+  \ifnum\XeKo at currclass<\thr@@
+    \XeKo at toks@ii{}\expandafter\XeKo at char@orphan % HG, ID
+  \else
+    \expandafter\XeKo at do@flush at toks
+  \fi
+  }
+\def\XeKo at char@orphan{%
+  \ifx\XeKo at let@token\par
+    \XeKo at suppress@char at orphan
+    \let\XeKo at next\XeKo at flush@char at orphan
+  \else \ifx\@sptoken\XeKo at let@token
+    \XeKo at toks@ii\expandafter{\the\XeKo at toks@ii \@sptoken}%
+    \let\XeKo at next\XeKo at char@orphan@
+  \else \ifx ^^2e\XeKo at let@token % .
+    \XeKo at toks@ii\expandafter{\the\XeKo at toks@ii ^^2e}%
+    \let\XeKo at next\XeKo at char@orphan@
+  \else \ifx ^^3f\XeKo at let@token % ?
+    \XeKo at toks@ii\expandafter{\the\XeKo at toks@ii ^^3f}%
+    \let\XeKo at next\XeKo at char@orphan@
+  \else \ifx ^^21\XeKo at let@token % !
+    \XeKo at toks@ii\expandafter{\the\XeKo at toks@ii ^^21}%
+    \let\XeKo at next\XeKo at char@orphan@
+  \else \ifx ^^^^3002\XeKo at let@token % 。
+    \XeKo at toks@ii\expandafter{\the\XeKo at toks@ii ^^^^3002}%
+    \let\XeKo at next\XeKo at char@orphan@
+  \else \ifx ^^^^ff0e\XeKo at let@token % .
+    \XeKo at toks@ii\expandafter{\the\XeKo at toks@ii ^^^^3002}%
+    \let\XeKo at next\XeKo at char@orphan@
+  \else
+    \let\XeKo at next\XeKo at flush@char at orphan
+  \fi\fi\fi\fi\fi \fi\fi
+  \XeKo at next
+  }
+\def\XeKo at char@orphan@{\afterassignment\XeKo at char@orphan@@\let\XeKo at let@token= }
+\def\XeKo at char@orphan@@{\futurelet\XeKo at let@token\XeKo at char@orphan}
+\def\XeKo at flush@char at orphan{\XeKo at do@flush at toks \the\XeKo at toks@ii }
+\def\XeKo at char@raise at start{%
+  \ifdefined\xetexkocharraise
+    \edef\XeKo at curr{\the\font\the\XeKo at font@options}%
+    \ifx\XeKo at curr\XeKo at hangul@font
+      \raise\xetexkocharraise\hbox\bgroup
+    \else
+      \ifx\XeKo at curr\XeKo at hanja@font
+        \raise\xetexkocharraise\hbox\bgroup
+      \fi
+    \fi
+  \fi
+  }
+\def\XeKo at char@raise at stop{%
+  \ifdefined\xetexkocharraise
+    \ifx\XeKo at curr\XeKo at hangul@font
+      \egroup
+    \else
+      \ifx\XeKo at curr\XeKo at hanja@font
+        \egroup
+      \fi
+    \fi
+  \fi
+  }
+\def\XeKo at do@flush at toks{%
+  \begingroup
+    \XeTeXinterchartokenstate\z@
+    \ifdefined\XeKo at pre@hang
+      \XeKo at pre@hang % hanging punctuations
+    \fi
+    \XeKo at char@raise at start % charraise
+    \ifnum\XeKo at currclass=\@ne
+      \XeKo at everyhangul{\the\XeKo at toks@}% everyhangul
+    \else
+      \ifnum\XeKo at currclass=\tw@
+        \XeKo at everyhanja{\the\XeKo at toks@}% everyhanja
+      \else
+        \the\XeKo at toks@
+      \fi
+    \fi
+    \XeKo at char@raise at stop % charraise
+    \ifdefined\XeKo at post@hang
+      \XeKo at post@hang % hanging punctuations
+    \fi
+  \endgroup
+  \XeKo at maybe@kern
+  }
+\def\XeKo at maybe@kern{%
+  \ifnum\XeKo at currclass<\thr@@ % \the\XeKo at toks@ii
+    \expandafter\expandafter\expandafter\XeKo at maybe@kern at i
+  \else
+    \expandafter\XeKo at maybe@kern at i
+  \fi
+  }
+\def\XeKo at maybe@kern at i{\futurelet\XeKo at let@token\XeKo at maybe@kern at ii }
+\def\XeKo at maybe@kern at ii{%
+  \ifx\XeKo at let@token\@sptoken
+    \ifnum\XeKo at cjk@ignorespaces=\@ne % try to remove space
+      \expandafter\expandafter\expandafter\XeKo at maybe@ignorespaces
+    \fi
+  \else
+    \XeKo at insert@kerns
+  \fi
+  }
+\def\XeKo at insert@kerns{%
+  \kern-\XeKo at currclass sp \kern \XeKo at currclass sp
+  }
+% remove space
+\def\XeKo at maybe@ignorespaces{%
+  \ifnum 0\ifnum\XeKo at currclass<4 1\else  % HG ID SY
+          \ifnum\XeKo at currclass>9 1\fi\fi % CJK punctuations
+          >\z@
+    \expandafter\XeKo at ignorespaces@iv
+  \fi
+  }
+\def\XeKo at ignorespaces@iv{\afterassignment\XeKo at ignorespaces@v\let\XeKo at let@token= }
+\def\XeKo at ignorespaces@v{\futurelet\XeKo at let@token\XeKo at ignorespaces@vi}
+\def\XeKo at ignorespaces@vi{%
+  \XeKo at get@charslot
+  \XeKo at count@=\XeTeXcharclass\XeKo at charslot
+  \ifnum\XeKo at count@=\XeTeXcharclassAA \@sptoken \else
+  \ifnum\XeKo at count@=\XeTeXcharclassAO \@sptoken \else
+  \ifnum\XeKo at count@=\XeTeXcharclassAC \@sptoken \else
+  \ifnum\XeKo at count@=\XeTeXcharclassAP \@sptoken \else
+  \ifnum\XeKo at count@=\XeTeXcharclassAM \@sptoken \else
+  \ifnum\XeKo at count@=\XeTeXcharclassAH \@sptoken \else
+    \XeKo at insert@kerns
+  \fi\fi\fi\fi\fi \fi
+  }
+
+% hanging punctuations
+\chardef\XeKo at hangingpuncts\z@
+\protected\def\hangingpunctuation{\chardef\XeKo at hangingpuncts\@ne }
+\let\hangingpunctuations\hangingpunctuation
+
+% compress CJK punctuations to .5em
+\protected\def\compresspunctuations{\chardef\XeKo at compresspuncts\@ne }
+\protected\def\nocompresspunctuations{\chardef\XeKo at compresspuncts\z@ }
+\compresspunctuations
+
+%% everyhangul/hanja
+\def\everyhangul#1{\def\XeKo at everyhangul##1{#1}}
+\def\everyhanja #1{\def\XeKo at everyhanja ##1{#1}}
+\def\XeKo at everyhangul#1{#1}
+\def\XeKo at everyhanja #1{#1}
+
+\def\XeKo at startHG#1{%
+  \global\let\XeKo at josatoken=#1\relax
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{1}%
+  \XeKo at toks@{#1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startID#1{%
+  \global\let\XeKo at josatoken=#1\relax
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{2}%
+  \XeKo at toks@{#1}%
+  \ifdefined\fallbackhanjafont
+    \iffontchar\font`#1\else
+      \XeKo at toks@{\fallbackhanjafont #1}%
+    \fi
+  \fi
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startCJ#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{2}% same as ID
+  \XeKo at toks@{#1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startSY#1{%
+  \global\let\XeKo at josatoken=#1\relax
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{3}%
+  \XeKo at toks@{#1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startAA#1{%
+  \global\let\XeKo at josatoken=#1\relax
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{4}%
+  \XeKo at toks@{#1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startAO#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{5}%
+  \XeKo at toks@{#1}%
+  \ifnum\XeKo at hangingpuncts=\@ne
+    \ifnum`#1="60 % `
+      \XeKo at dimen@=\fontcharwd\font"60 %
+      \edef\XeKo at pre@hang{%
+        \kern\the\XeKo at dimen@
+        \vrule width-\the\XeKo at dimen@ height\z@ depth\z@
+        }%
+    \fi
+  \fi
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startAC#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{6}%
+  \XeKo at toks@{#1}%
+  \ifnum\XeKo at hangingpuncts=\@ne
+    \ifnum`#1="27 % '
+      \XeKo at dimen@=\fontcharwd\font"27 %
+      \edef\XeKo at post@hang{%
+        \vrule width-\the\XeKo at dimen@ height\z@ depth\z@
+        \kern\the\XeKo at dimen@
+        }%
+    \fi
+  \fi
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startAP#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{7}%
+  \XeKo at toks@{#1}%
+  \ifnum\XeKo at hangingpuncts=\@ne
+    \ifnum 0\ifnum`#1="2E 1\else % . ,
+            \ifnum`#1="2C 1\fi\fi >\z@
+      \XeKo at dimen@=\fontcharwd\font`#1 %
+      \edef\XeKo at post@hang{%
+        \noexpand\XeKo at count@\noexpand\spacefactor
+        \vrule width-\the\XeKo at dimen@ height\z@ depth\z@
+        \kern\the\XeKo at dimen@
+        \noexpand\spacefactor\noexpand\XeKo at count@
+        }%
+    \fi
+  \fi
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startAM#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{8}%
+  \XeKo at toks@{#1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startAH#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{9}%
+  \XeKo at toks@{#1}%
+  \XeKo at check@next at tok
+  }
+\def\XeKo at startOP#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{10}%
+  \ifnum\XeKo at compresspuncts=\@ne
+    \XeKo at toks@{\hbox to.5em\bgroup\hss #1\egroup}%
+  \else
+    \XeKo at toks@{#1}%
+  \fi
+  \ifnum\XeKo at hangingpuncts=\@ne
+    \ifnum0\ifnum`#1="2018 1\else % ‘ “
+           \ifnum`#1="201C 1\fi\fi >\z@
+      \ifnum\XeKo at compresspuncts=\@ne
+        \XeKo at dimen@=.5em
+      \else
+        \XeKo at dimen@=\fontcharwd\font`#1 %
+      \fi
+      \ifnum`#1="201C %
+        \XeKo at dimen@=.5\XeKo at dimen@
+      \fi
+      \edef\XeKo at pre@hang{%
+        \kern\the\XeKo at dimen@
+        \vrule width-\the\XeKo at dimen@ height\z@ depth\z@
+        }%
+    \fi
+  \fi
+  \XeKo at do@flush at toks
+  }
+\def\XeKo at startCL#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{11}%
+  \ifnum\XeKo at compresspuncts=\@ne
+    \XeKo at toks@{\hbox to.5em\bgroup #1\hss\egroup}%
+  \else
+    \XeKo at toks@{#1}%
+  \fi
+  \ifnum\XeKo at hangingpuncts=\@ne
+    \ifnum 0\ifnum`#1="2019 1\else % ’ ” 、 ,
+            \ifnum`#1="201D 1\else
+            \ifnum`#1="3001 1\else
+            \ifnum`#1="FF0C 1\fi\fi\fi\fi >\z@
+      \ifnum\XeKo at compresspuncts=\@ne
+        \XeKo at dimen@=.5em
+      \else
+        \XeKo at dimen@=\fontcharwd\font`#1 %
+      \fi
+      \ifnum`#1="201D %
+        \XeKo at dimen@=.5\XeKo at dimen@
+      \fi
+      \edef\XeKo at post@hang{%
+        \vrule width-\the\XeKo at dimen@ height\z@ depth\z@
+        \kern\the\XeKo at dimen@
+        }%
+    \fi
+  \fi
+  \XeKo at do@flush at toks
+  }
+\def\XeKo at startMD#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{12}%
+  \ifnum\XeKo at compresspuncts=\@ne
+    \XeKo at toks@{\hbox to.5em\bgroup\hss #1\hss\egroup}%
+  \else
+    \XeKo at toks@{#1}%
+  \fi
+  \XeKo at do@flush at toks
+  }
+\def\XeKo at startFS#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{13}%
+  \ifnum\XeKo at compresspuncts=\@ne
+    \XeKo at toks@{\hbox to.5em\bgroup #1\hss\egroup}%
+  \else
+    \XeKo at toks@{#1}%
+  \fi
+  \ifnum\XeKo at hangingpuncts=\@ne
+    \ifnum 0\ifnum`#1="3002 1\else % 。 .
+            \ifnum`#1="FF0E 1\fi\fi >\z@
+      \ifnum\XeKo at compresspuncts=\@ne
+        \XeKo at dimen@=.5em
+      \else
+        \XeKo at dimen@=\fontcharwd\font`#1 %
+      \fi
+      \edef\XeKo at post@hang{%
+        \vrule width-\the\XeKo at dimen@ height\z@ depth\z@
+        \kern\the\XeKo at dimen@
+      }%
+    \fi
+  \fi
+  \XeKo at do@flush at toks
+  }
+\def\XeKo at startEX#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{14}%
+  \XeKo at toks@{#1}%
+  \XeKo at do@flush at toks
+  }
+\def\XeKo at startLD#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{15}%
+  \XeKo at toks@{#1}%
+  \XeKo at do@flush at toks
+  }
+\def\XeKo at startVC#1{%
+  \let\XeKo at pre@hang\XeKo at undefined \let\XeKo at post@hang\XeKo at undefined
+  \def\XeKo at currclass{16}%
+  \XeKo at toks@{#1}%
+  \XeKo at do@flush at toks
+  }
+
+\def\XeKo at maybe@gobble{\expandafter\expandafter\expandafter\@gobble}
+
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassHG{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XKinterhangulbreak \XeKo at maybe@gobble % HG HG
+      \or \unkern\unkern \XKinterhanjabreak   % ID HG
+      \or \unkern\unkern                      % SY HG
+      \or \unkern\unkern \XeKo at latincjk       % AA HG
+      \or \unkern\unkern \XeKo at nobreak        % AO HG
+      \or \unkern\unkern \XeKo at latincjk       % AC HG
+      \or \unkern\unkern \XeKo at latincjk       % AP HG
+      \or \unkern\unkern \XeKo at latincjk       % AM HG
+      \or \unkern\unkern                      % AH HG
+      \or \unkern\unkern                      % OP HG
+      \or \unkern\unkern \XeKo at halfhalf       % CL HG
+      \or \unkern\unkern \XeKo at quarterquarter % MD HG
+      \or \unkern\unkern \XeKo at halfzero       % FS HG
+      \or \unkern\unkern \XeKo at halfhalf       % EX HG
+      \or \unkern\unkern \XKinterhanjabreak   % LD HG
+      \or \unkern\unkern \XeKo at quarterquarter % VC HG
+    \fi
+  \else\ifnum\lastnodetype=10 % mathoff
+    \XeKo at postmath
+  \fi\fi
+  \XeKo at fontHG\XeKo at startHG
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassID{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XKinterhanjabreak   % HG ID
+      \or \unkern\unkern \XKinterhanjabreak \XeKo at maybe@gobble % ID ID
+      \or \unkern\unkern                      % SY ID
+      \or \unkern\unkern \XeKo at latincjk       % AA ID
+      \or \unkern\unkern \XeKo at nobreak        % AO ID
+      \or \unkern\unkern \XeKo at latincjk       % AC ID
+      \or \unkern\unkern \XeKo at latincjk       % AP ID
+      \or \unkern\unkern \XeKo at latincjk       % AM ID
+      \or \unkern\unkern                      % AH ID
+      \or \unkern\unkern                      % OP ID
+      \or \unkern\unkern \XeKo at halfhalf       % CL ID
+      \or \unkern\unkern \XeKo at quarterquarter % MD ID
+      \or \unkern\unkern \XeKo at halfzero       % FS ID
+      \or \unkern\unkern \XeKo at halfhalf       % EX ID
+      \or \unkern\unkern \XKinterhanjabreak   % LD ID
+      \or \unkern\unkern \XeKo at quarterquarter % VC ID
+    \fi
+  \else\ifnum\lastnodetype=10 % mathoff
+    \XeKo at postmath
+  \fi\fi
+  \XeKo at fontID\XeKo at startID
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassCJ{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XKinterhanjabreak   % HG CJ
+      \or \unkern\unkern \penalty5000\XKinterhanjabreak \XeKo at maybe@gobble % ID CJ
+      \or \unkern\unkern                      % SY CJ
+      \or \unkern\unkern \XeKo at latincjk       % AA CJ
+      \or \unkern\unkern \XeKo at nobreak        % AO CJ
+      \or \unkern\unkern \XeKo at latincjk       % AC CJ
+      \or \unkern\unkern \XeKo at latincjk       % AP CJ
+      \or \unkern\unkern \XeKo at latincjk       % AM CJ
+      \or \unkern\unkern                      % AH CJ
+      \or \unkern\unkern                      % OP CJ
+      \or \unkern\unkern \XeKo at halfhalf       % CL CJ
+      \or \unkern\unkern \XeKo at quarterquarter % MD CJ
+      \or \unkern\unkern \XeKo at halfzero       % FS CJ
+      \or \unkern\unkern \XeKo at halfhalf       % EX CJ
+      \or \unkern\unkern \XKinterhanjabreak   % LD CJ
+      \or \unkern\unkern \XeKo at quarterquarter % VC CJ
+    \fi
+  \else\ifnum\lastnodetype=10 % mathoff
+    \XeKo at postmath
+  \fi\fi
+  \XeKo at fontCJ\XeKo at startCJ
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassSY{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                      % HG SY
+      \or \unkern\unkern                      % ID SY
+      \or \unkern\unkern \XeKo at maybe@gobble % SY SY
+      \or \unkern\unkern                      % AA SY
+      \or \unkern\unkern \XeKo at nobreak        % AO SY
+      \or \unkern\unkern \XeKo at latincjk       % AC SY
+      \or \unkern\unkern \XeKo at latincjk       % AP SY
+      \or \unkern\unkern \XeKo at latincjk       % AM SY
+      \or \unkern\unkern                      % AH SY
+      \or \unkern\unkern                      % OP SY
+      \or \unkern\unkern \XeKo at halfhalf       % CL SY
+      \or \unkern\unkern \XeKo at quarterquarter % MD SY
+      \or \unkern\unkern \XeKo at halfzero       % FS SY
+      \or \unkern\unkern \XeKo at halfhalf       % EX SY
+      \or \unkern\unkern                      % LD SY
+      \or \unkern\unkern \XeKo at quarterquarter % VC SY
+    \fi
+  \else\ifnum\lastnodetype=10 % mathoff
+    \XeKo at postmath
+  \fi\fi
+  \XeKo at fontSY\XeKo at startSY
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAA{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XeKo at latincjk       % HG AA
+      \or \unkern\unkern \XeKo at latincjk       % ID AA
+      \or \unkern\unkern                      % SY AA
+      \or \unkern\unkern \XeKo at maybe@gobble % AA AA
+      \or \unkern\unkern                      % AO AA
+      \or \unkern\unkern                      % AC AA
+      \or \unkern\unkern                      % AP AA
+      \or \unkern\unkern                      % AM AA
+      \or \unkern\unkern                      % AH AA
+      \or \unkern\unkern                      % OP AA
+      \or \unkern\unkern \XeKo at halfhalf       % CL AA
+      \or \unkern\unkern \XeKo at quarterquarter % MD AA
+      \or \unkern\unkern \XeKo at halfzero       % FS AA
+      \or \unkern\unkern \XeKo at halfhalf       % EX AA
+      \or \unkern\unkern                      % LD AA
+      \or \unkern\unkern \XeKo at quarterquarter % VC AA
+    \fi
+  \fi
+  \XeKo at fontAA\XeKo at startAA
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAO{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XeKo at latincjk       % HG AO
+      \or \unkern\unkern \XeKo at latincjk       % ID AO
+      \or \unkern\unkern \XeKo at latincjk       % SY AO
+      \or \unkern\unkern                      % AA AO
+      \or \unkern\unkern \XeKo at maybe@gobble % AO AO
+      \or \unkern\unkern                      % AC AO
+      \or \unkern\unkern                      % AP AO
+      \or \unkern\unkern                      % AM AO
+      \or \unkern\unkern                      % AH AO
+      \or \unkern\unkern                      % OP AO
+      \or \unkern\unkern \XeKo at halfhalf       % CL AO
+      \or \unkern\unkern \XeKo at quarterquarter % MD AO
+      \or \unkern\unkern \XeKo at halfzero       % FS AO
+      \or \unkern\unkern \XeKo at halfhalf       % EX AO
+      \or \unkern\unkern                      % LD AO
+      \or \unkern\unkern \XeKo at quarterquarter % VC AO
+    \fi
+  \fi
+  \XeKo at fontAO\XeKo at startAO
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAC{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                   % HG AC
+      \or \unkern\unkern                                   % ID AC
+      \or \unkern\unkern                                   % SY AC
+      \or \unkern\unkern                                   % AA AC
+      \or \unkern\unkern                                   % AO AC
+      \or \unkern\unkern \XeKo at maybe@gobble % AC AC
+      \or \unkern\unkern                                   % AP AC
+      \or \unkern\unkern                                   % AM AC
+      \or \unkern\unkern                                   % AH AC
+      \or \unkern\unkern                                   % OP AC
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % CL AC
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD AC
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfzero       % FS AC
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % EX AC
+      \or \unkern\unkern                                   % LD AC
+      \or \unkern\unkern                                   % VC AC
+    \fi
+  \fi
+  \XeKo at fontAC\XeKo at startAC
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAP{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                   % HG AP
+      \or \unkern\unkern                                   % ID AP
+      \or \unkern\unkern                                   % SY AP
+      \or \unkern\unkern                                   % AA AP
+      \or \unkern\unkern                                   % AO AP
+      \or \unkern\unkern                                   % AC AP
+      \or \unkern\unkern \XeKo at maybe@gobble % AP AP
+      \or \unkern\unkern                                   % AM AP
+      \or \unkern\unkern                                   % AH AP
+      \or \unkern\unkern                                   % OP AP
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % CL AP
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD AP
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfzero       % FS AP
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % EX AP
+      \or \unkern\unkern                                   % LD AP
+      \or \unkern\unkern                                   % VC AP
+    \fi
+  \fi
+  \XeKo at fontAP\XeKo at startAP
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAM{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XeKo at nobreak\XeKo at latincjk       % HG AM
+      \or \unkern\unkern \XeKo at nobreak\XeKo at latincjk       % ID AM
+      \or \unkern\unkern \XeKo at nobreak\XeKo at latincjk       % SY AM
+      \or \unkern\unkern                                   % AA AM
+      \or \unkern\unkern                                   % AO AM
+      \or \unkern\unkern                                   % AC AM
+      \or \unkern\unkern                                   % AP AM
+      \or \unkern\unkern \XeKo at maybe@gobble % AM AM
+      \or \unkern\unkern                                   % AH AM
+      \or \unkern\unkern                                   % OP AM
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % CL AM
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD AM
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfzero       % FS AM
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % EX AM
+      \or \unkern\unkern                                   % LD AM
+      \or \unkern\unkern                                   % VC AM
+    \fi
+  \fi
+  \XeKo at fontAM\XeKo at startAM
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAH{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XeKo at nobreak % HG AH
+      \or \unkern\unkern \XeKo at nobreak % ID AH
+      \or \unkern\unkern \XeKo at nobreak % SY AH
+      \or \unkern\unkern               % AA AH
+      \or \unkern\unkern               % AO AH
+      \or \unkern\unkern               % AC AH
+      \or \unkern\unkern               % AP AH
+      \or \unkern\unkern               % AM AH
+      \or \unkern\unkern \XeKo at maybe@gobble % AH AH
+      \or \unkern\unkern               % OP AH
+      \or \unkern\unkern \XeKo at nobreak % CL AH
+      \or \unkern\unkern \XeKo at nobreak % MD AH
+      \or \unkern\unkern \XeKo at nobreak % FS AH
+      \or \unkern\unkern \XeKo at nobreak % EX AH
+      \or \unkern\unkern \XeKo at nobreak % LD AH
+      \or \unkern\unkern \XeKo at nobreak % VC AH
+    \fi
+  \fi
+  \XeKo at fontAH\XeKo at startAH
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassOP{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XeKo at halfhalf              % HG OP
+      \or \unkern\unkern \XeKo at halfhalf              % ID OP
+      \or \unkern\unkern \XeKo at halfhalf              % SY OP
+      \or \unkern\unkern \XeKo at halfhalf              % AA OP
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf % AO OP
+      \or \unkern\unkern \XeKo at halfhalf              % AC OP
+      \or \unkern\unkern \XeKo at halfhalf              % AP OP
+      \or \unkern\unkern \XeKo at halfhalf              % AM OP
+      \or \unkern\unkern                             % AH OP
+      \or \unkern\unkern \XeKo at maybe@gobble % OP OP
+      \or \unkern\unkern \XeKo at halfhalf              % CL OP
+      \or \unkern\unkern \XeKo at quarterquarter        % MD OP
+      \or \unkern\unkern \XeKo at halfzero              % FS OP
+      \or \unkern\unkern \XeKo at halfhalf              % EX OP
+      \or \unkern\unkern \XeKo at halfhalf              % LD OP
+      \or \unkern\unkern \XeKo at quarterquarter        % VC OP
+    \fi
+  \else\ifnum\lastnodetype=10 % mathoff
+    \XeKo at halfhalf
+  \fi\fi
+  \XeKo at fontOP\XeKo at startOP
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassCL{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                   % HG CL
+      \or \unkern\unkern                                   % ID CL
+      \or \unkern\unkern                                   % SY CL
+      \or \unkern\unkern                                   % AA CL
+      \or \unkern\unkern                                   % AO CL
+      \or \unkern\unkern                                   % AC CL
+      \or \unkern\unkern                                   % AP CL
+      \or \unkern\unkern                                   % AM CL
+      \or \unkern\unkern                                   % AH CL
+      \or \unkern\unkern                                   % OP CL
+      \or \unkern\unkern \XeKo at maybe@gobble % CL CL
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD CL
+      \or \unkern\unkern                                   % FS CL
+      \or \unkern\unkern                                   % EX CL
+      \or \unkern\unkern                                   % LD CL
+      \or \unkern\unkern                                   % VC CL
+    \fi
+  \fi
+  \XeKo at fontCL\XeKo at startCL
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassMD{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % HG MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % ID MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % SY MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % AA MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % AO MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % AC MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % AP MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % AM MD
+      \or \unkern\unkern                                      % AH MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % OP MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % CL MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfquarter \XeKo at maybe@gobble % MD MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at iiiquarterquarter % FS MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % EX MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % LD MD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter    % VC MD
+    \fi
+  \else\ifnum\lastnodetype=10 % mathoff
+    \XeKo at nobreak\XeKo at quarterquarter
+  \fi\fi
+  \XeKo at fontMD\XeKo at startMD
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassFS{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                   % HG FS
+      \or \unkern\unkern                                   % ID FS
+      \or \unkern\unkern                                   % SY FS
+      \or \unkern\unkern                                   % AA FS
+      \or \unkern\unkern                                   % AO FS
+      \or \unkern\unkern                                   % AC FS
+      \or \unkern\unkern                                   % AP FS
+      \or \unkern\unkern                                   % AM FS
+      \or \unkern\unkern                                   % AH FS
+      \or \unkern\unkern                                   % OP FS
+      \or \unkern\unkern                                   % CL FS
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD FS
+      \or \unkern\unkern \XeKo at maybe@gobble % FS FS
+      \or \unkern\unkern                                   % EX FS
+      \or \unkern\unkern                                   % LD FS
+      \or \unkern\unkern                                   % VC FS
+    \fi
+  \fi
+  \XeKo at fontFS\XeKo at startFS
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassEX{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                   % HG EX
+      \or \unkern\unkern                                   % ID EX
+      \or \unkern\unkern                                   % SY EX
+      \or \unkern\unkern                                   % AA EX
+      \or \unkern\unkern                                   % AO EX
+      \or \unkern\unkern                                   % AC EX
+      \or \unkern\unkern                                   % AP EX
+      \or \unkern\unkern                                   % AM EX
+      \or \unkern\unkern                                   % AH EX
+      \or \unkern\unkern                                   % OP EX
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % CL EX
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD EX
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfzero       % FS EX
+      \or \unkern\unkern \XeKo at maybe@gobble % EX EX
+      \or \unkern\unkern                                   % LD EX
+      \or \unkern\unkern                                   % VC EX
+    \fi
+  \fi
+  \XeKo at fontEX\XeKo at startEX
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassLD{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                   % HG LD
+      \or \unkern\unkern                                   % ID LD
+      \or \unkern\unkern                                   % SY LD
+      \or \unkern\unkern                                   % AA LD
+      \or \unkern\unkern                                   % AO LD
+      \or \unkern\unkern                                   % AC LD
+      \or \unkern\unkern                                   % AP LD
+      \or \unkern\unkern                                   % AM LD
+      \or \unkern\unkern                                   % AH LD
+      \or \unkern\unkern                                   % OP LD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfhalf       % CL LD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at quarterquarter % MD LD
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfzero       % FS LD
+      \or \unkern\unkern                                   % EX LD
+      \or \unkern\unkern \XeKo at maybe@gobble % LD LD
+      \or \unkern\unkern                                   % VC LD
+    \fi
+  \fi
+  \XeKo at fontLD\XeKo at startLD
+  }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassVC{%
+  \ifnum\lastnodetype=12 %
+    \ifcase\lastkern
+      \or \unkern\unkern                                % HG VC
+      \or \unkern\unkern                                % ID VC
+      \or \unkern\unkern                                % SY VC
+      \or \unkern\unkern                                % AA VC
+      \or \unkern\unkern                                % AO VC
+      \or \unkern\unkern                                % AC VC
+      \or \unkern\unkern                                % AP VC
+      \or \unkern\unkern                                % AM VC
+      \or \unkern\unkern                                % AH VC
+      \or \unkern\unkern                                % OP VC
+      \or \unkern\unkern                                % CL VC
+      \or \unkern\unkern \XeKo at nobreak\XeKo at halfquarter % MD VC
+      \or \unkern\unkern                                % FS VC
+      \or \unkern\unkern                                % EX VC
+      \or \unkern\unkern                                % LD VC
+      \or \unkern\unkern \XeKo at maybe@gobble % VC VC
+    \fi
+  \fi
+  \XeKo at fontVC\XeKo at startVC
+  }
+
+%%% josa selection
+\begingroup
+\catcode`A=11\relax \global\let\XeKo at catcode@letter=A
+\catcode`0=12\relax \global\let\XeKo at catcode@other =0
+\endgroup
+\def\XeKo at striptw@words#1 #2 #3{#3}
+\def\XeKo at get@charslot{%
+  \if\noexpand\XeKo at let@token\relax
+    \chardef\XeKo at charslot="FFFF
+  \else
+    \expandafter\XeKo at get@charslot@
+  \fi
+  }
+\def\XeKo at get@charslot@{%
+  \ifnum 0\ifcat\XeKo at let@token\XeKo at catcode@letter 1\else
+          \ifcat\XeKo at let@token\XeKo at catcode@other  1\fi\fi >\z@
+    \edef\@tempa{\expandafter\XeKo at striptw@words\meaning\XeKo at let@token}%
+    \expandafter\chardef\expandafter\XeKo at charslot\expandafter`\@tempa\relax
+  \else
+    \chardef\XeKo at charslot="FFFF
+  \fi
+  }
+
+\def\XeKo at read@hanja at hangul@file#1{%
+  \begingroup
+  \@tempcnta=\z@
+  \openin1=#1\relax \XeKo at read@hanja at hangul@line \closein1
+  \endgroup
+  }
+\def\XeKo at read@hanja at hangul@line{%
+  \read1 to \@tempa
+  \ifnum\count@=\@tempcnta
+    \global\count@\@tempa
+  \else
+    \advance\@tempcnta\@ne \expandafter\XeKo at read@hanja at hangul@line
+  \fi
+  }
+
+\def\XeKo at num@josa{%
+  \ifnum\XeKo at count@<\z@ \XeKo at count@=-\XeKo at count@ \fi
+  \count@\XeKo at count@
+  \divide\count@ 10
+  \multiply\count@ 10
+  \advance\XeKo at count@-\count@
+  \XeKo at count@=\ifcase\XeKo at count@ \z@
+    \or \@ne
+    \or \tw@
+    \or \z@
+    \or \tw@
+    \or \tw@
+    \or \z@
+    \or \@ne
+    \or \@ne
+    \or \tw@
+  \fi
+  \XeKo at do@make at josa
+  }
+\def\XeKo at alph@josa{%
+  \XeKo at count@=\ifnum "4C=\XeKo at count@ \@ne % L
+          \else\ifnum "4D=\XeKo at count@ \z@  % M
+          \else\ifnum "4E=\XeKo at count@ \z@  % N
+          \else\ifnum "6C=\XeKo at count@ \@ne % l
+          \else\ifnum "6D=\XeKo at count@ \z@  % m
+          \else\ifnum "6E=\XeKo at count@ \z@  % n
+          \else \tw@
+          \fi\fi\fi\fi\fi \fi
+  \XeKo at do@make at josa
+  }
+
+\protected\def\jong {\global\let\XeKo at josatoken=0}\jong
+\protected\def\rieul{\global\let\XeKo at josatoken=1}
+\protected\def\jung {\global\let\XeKo at josatoken=2}
+\protected\def\가{\XeKo at make@josa 가이}
+\protected\def\이{\futurelet\XeKo at let@token\XeKo at make@josa at I}
+\protected\def\은{\XeKo at make@josa 는은} \let\는\은
+\protected\def\을{\XeKo at make@josa 를을} \let\를\을
+\protected\def\와{\XeKo at make@josa 와과} \let\과\와
+\protected\def\으{\XeKo at make@josa \empty 으}
+\protected\def\로{\으로}
+\protected\def\라{\XeKo at make@josa 라{이라}}
+\def\XeKo at make@josa at II{\XeKo at make@josa\relax 이}
+\def\XeKo at make@josa at I{%
+  \XeKo at get@charslot
+  \ifnum\XeKo at charslot="FFFF
+    \expandafter\가%
+  \else
+    \ifnum 0\ifnum\XeKo at charslot>"ABFF \ifnum\XeKo at charslot<"D7A4 1\fi\fi >\z@
+      \expandafter\expandafter\expandafter\XeKo at make@josa at II
+    \else
+      \expandafter\expandafter\expandafter\가%
+    \fi
+  \fi
+  }
+\def\XeKo at make@josa{%
+  \let\XeKo at let@token=\XeKo at josatoken
+  \XeKo at get@charslot
+  \XeKo at count@=\XeKo at charslot
+  \ifnum\XeKo at count@<"FF00
+  \else\ifnum\XeKo at count@<"FF5B
+    \advance\XeKo at count@-"FEE0
+  \fi\fi
+  \let\XeKo at next\XeKo at make@josa@
+  \ifnum\XeKo at count@<"30 % 0
+  \else\ifnum\XeKo at count@<"3A
+    \advance\XeKo at count@-"30 \let\XeKo at next\XeKo at num@josa
+  \else\ifnum\XeKo at count@<"41
+  \else\ifnum\XeKo at count@<"7B \let\XeKo at next\XeKo at alph@josa
+  \else\ifnum\XeKo at count@<"2160 % roman numneral I
+  \else\ifnum\XeKo at count@<"216C
+    \advance\XeKo at count@-"215F \let\XeKo at next\XeKo at num@josa
+  \else\ifnum\XeKo at count@<"2170 % roman numneral i
+  \else\ifnum\XeKo at count@<"217C
+    \advance\XeKo at count@-"216F \let\XeKo at next\XeKo at num@josa
+  \else\ifnum\XeKo at count@<"2460 % ①
+  \else\ifnum\XeKo at count@<"249C % ⒜
+    \advance\XeKo at count@-"245F \let\XeKo at next\XeKo at num@josa
+  \else\ifnum\XeKo at count@<"24B6 % Ⓐ
+    \advance\XeKo at count@-"245B \let\XeKo at next\XeKo at alph@josa
+  \else\ifnum\XeKo at count@<"24D0 % ⓐ
+    \advance\XeKo at count@-"2475 \let\XeKo at next\XeKo at alph@josa
+  \else\ifnum\XeKo at count@<"24EA
+    \advance\XeKo at count@-"248F \let\XeKo at next\XeKo at alph@josa
+  \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi
+  \XeKo at next
+  }
+\def\XeKo at make@josa@{%
+  \ifnum\XeKo at count@<"3260 % ㉠
+  \else\ifnum\XeKo at count@<"3280
+    \advance\XeKo at count@-"60
+  \fi\fi
+  \let\XeKo at next\XeKo at make@josa@@
+  \ifnum\XeKo at count@<"3131 % ㄱ
+  \else\ifnum\XeKo at count@<"318F
+    \ifnum     \XeKo at count@="3139 \XeKo at count@\@ne
+    \else\ifnum\XeKo at count@<"314F \XeKo at count@\z@
+    \else\ifnum\XeKo at count@>"3164
+         \ifnum\XeKo at count@<"3187 \XeKo at count@\z@ \fi
+    \fi\fi\fi
+    \let\XeKo at next\XeKo at do@make at josa
+  \else\ifnum\XeKo at count@<"3200 % ㈀
+  \else\ifnum\XeKo at count@<"321F
+    \ifnum     \XeKo at count@="3203 \XeKo at count@\@ne
+    \else\ifnum\XeKo at count@<"320E \XeKo at count@\z@
+    \fi\fi
+    \let\XeKo at next\XeKo at do@make at josa
+  \fi\fi\fi\fi
+  \XeKo at next
+  }
+\def\XeKo at make@josa@@{%
+  \ifnum\XeKo at count@<"3400 \else\ifnum\XeKo at count@<"4DB6
+    \advance\XeKo at count@-"3400 \XeKo at read@hanja at hangul@file{hanjaexa_hangul.tab}%
+  \else\ifnum\XeKo at count@<"4E00 \else\ifnum\XeKo at count@<"9FA6
+    \advance\XeKo at count@-"4E00 \XeKo at read@hanja at hangul@file{hanja_hangul.tab}%
+  \else\ifnum\XeKo at count@<"F900 \else\ifnum\XeKo at count@<"FA2E
+    \advance\XeKo at count@-"F900 \XeKo at read@hanja at hangul@file{hanjacom_hangul.tab}%
+  \fi\fi\fi\fi\fi \fi
+  \ifnum\XeKo at count@<"AC00 \else\ifnum\XeKo at count@<"D7A4 % Hangul syllables
+    \advance\XeKo at count@-"AC00
+    \@tempcnta\XeKo at count@ \divide\@tempcnta28 \multiply\@tempcnta28
+    \advance\XeKo at count@-\@tempcnta \advance\XeKo at count@"11A7
+  \fi\fi
+  \ifnum\XeKo at count@<"11A8
+  \else\ifnum\XeKo at count@<"1200
+    \ifnum\XeKo at count@="11AF \XeKo at count@\@ne \else \XeKo at count@\z@ \fi
+  \else\ifnum\XeKo at count@<"D7CB
+  \else\ifnum\XeKo at count@<"D7FC
+    \XeKo at count@\z@
+  \fi\fi\fi\fi
+  \XeKo at do@make at josa
+  }
+\def\XeKo at do@make at josa#1#2{%
+  \ifcase\XeKo at count@ #2% jong
+    \or \ifx#1\empty\else#2\fi % rieul
+    \else #1% jung
+  \fi
+  }
+
+% dotemph
+\def\dotemphraise{0.4em }
+\ifcsname bfseries\endcsname
+  \def\dotemphchar{\bfseries ^^^^02d9}
+\else
+  \def\dotemphchar{\bf \char95 }
+\fi
+
+\newbox\XeKo at dotemph@box
+\protected\def\dotemph#1{%
+  \leavevmode
+  \begingroup
+  \setbox\XeKo at dotemph@box\hbox{\dotemphchar}%
+  \edef\XeKo at flush@char at orphan{%
+    \unexpanded{%
+      \edef\XeKo at tempa{%
+        \XeKo at toks@{%
+          \setbox\z@\hbox{\the\XeKo at toks@}%
+          \setbox\tw@\hbox to\wd\z@{\hss\unhcopy\XeKo at dotemph@box\hss}\ht\tw@\z@\dp\tw@\z@
+          \rlap{\raise\dotemphraise\box\tw@}\the\XeKo at toks@ }%
+        }\XeKo at tempa }%
+    \unexpanded\expandafter{\XeKo at flush@char at orphan}}%
+  #1\relax
+  \endgroup
+  }
+
+%
+\let\enablecjksymbolspacing\compresspunctuations
+\let\disablecjksymbolspacing\nocompresspunctuations
+\protected\def\disablekoreanfonts{%
+  \let\XeKo at fontHG\relax
+  \let\XeKo at fontID\relax
+  \let\XeKo at fontCJ\relax
+  \let\XeKo at fontSY\relax
+  \let\XeKo at fontAA\relax
+  \let\XeKo at fontAO\relax
+  \let\XeKo at fontAC\relax
+  \let\XeKo at fontAP\relax
+  \let\XeKo at fontAM\relax
+  \let\XeKo at fontAH\relax
+  \let\XeKo at fontOP\relax
+  \let\XeKo at fontCL\relax
+  \let\XeKo at fontMD\relax
+  \let\XeKo at fontFS\relax
+  \let\XeKo at fontEX\relax
+  \let\XeKo at fontLD\relax
+  \let\XeKo at fontVC\relax
+  }
+\protected\def\disablehangulspacing{%
+  \let\XeKo at halfzero          \inhibitglue
+  \let\XeKo at halfhalf          \inhibitglue
+  \let\XeKo at halfquarter       \inhibitglue
+  \let\XeKo at quarterquarter    \inhibitglue
+  \let\XeKo at iiiquarterquarter \inhibitglue
+  \let\XeKo at latincjk          \inhibitglue
+  \let\XeKo at postmath          \inhibitglue
+  \let\XKinterhangulbreak     \XKinterhanjabreak
+  \let\XeKo at latincjk@classic  \inhibitglue
+  \let\XeKo at latincjk@modern   \inhibitglue
+  \let\XeKo at postmath@modern   \inhibitglue
+  \let\XeKo at suppress@char at orphan  \relax
+  \chardef\XeKo at hangingpuncts     \z@
+  \chardef\XeKo at cjk@ignorespaces  \z@
+  }
+\protected\def\disablehangulspacingandlinebreak{%
+  \let\XeKo at halfzero          \relax
+  \let\XeKo at halfhalf          \relax
+  \let\XeKo at halfquarter       \relax
+  \let\XeKo at quarterquarter    \relax
+  \let\XeKo at iiiquarterquarter \relax
+  \let\XeKo at latincjk          \relax
+  \let\XeKo at postmath          \relax
+  \let\XKinterhangulbreak     \relax
+  \let\XKinterhanjabreak      \relax
+  \let\XeKo at latincjk@classic  \relax
+  \let\XeKo at latincjk@modern   \relax
+  \let\XeKo at postmath@modern   \relax
+  \let\XeKo at suppress@char at orphan  \relax
+  \chardef\XeKo at hangingpuncts     \z@
+  \chardef\XeKo at cjk@ignorespaces  \z@
+  \XeTeXlinebreaklocale""
+  }
+\protected\def\enablehangulspacingandlinebreak{%
+  \XeTeXinterchartokenstate\@ne
+  \XeTeXlinebreaklocale"ko"
+  }
+\enablehangulspacingandlinebreak
+% no longer support these two \disable...
+\let\disableautojosa\relax
+\let\disablejamoautojosa\relax
+% no need xetexkoulemsupport any more
+\let\xetexkoulemsupport\relax
+
+% math hangul
+\def\setmathhangulblock#1#2{%
+  \count@="#1
+  \loop
+    \Umathcode\count@ = 7 \symmathhangul\count@
+    \ifnum\count@<"#2 \advance\count@\@ne
+  \repeat
+  }
+
+%%% plain
+\ifcsname ver at xetexko.sty\endcsname \else
+  \protected\def\hangulfont{\afterassignment\XeKo at hangul@font at setup\font\XeKo at hangul@font}
+  \def\XeKo at hangul@font at setup{%
+    \begingroup
+    \XeKo at hangul@font
+    \xdef\xetexkohanguloption{%
+      \ifdefined\xetexkohu \def\noexpand\xetexkohu{\xetexkohu}\fi
+      \ifdefined\xetexkointerhchar \def\noexpand\xetexkointerhchar{\xetexkointerhchar}\fi
+      \ifdefined\xetexkocharraise \def\noexpand\xetexkocharraise{\xetexkocharraise}\fi
+      }
+    \edef\x{%
+      \endgroup
+      \def\noexpand\XeKo at hangul@font{\the\font
+        \unexpanded\expandafter{\xetexkohanguloption}}}\x
+    }
+  \protected\def\hanjafont{\afterassignment\XeKo at hanja@font at setup\font\XeKo at hanja@font}
+  \def\XeKo at hanja@font at setup{%
+    \begingroup
+    \XeKo at hanja@font
+    \xdef\xetexkohanjaoption{%
+      \ifdefined\xetexkohu \def\noexpand\xetexkohu{\xetexkohu}\fi
+      \ifdefined\xetexkointerhchar \def\noexpand\xetexkointerhchar{\xetexkointerhchar}\fi
+      \ifdefined\xetexkocharraise \def\noexpand\xetexkocharraise{\xetexkocharraise}\fi
+      }
+    \edef\x{\endgroup
+      \def\noexpand\XeKo at hanja@font{\the\font
+        \unexpanded\expandafter{\xetexkohanjaoption}}}\x
+    }
+  \protected\def\hanjabyhangulfont{%
+    \let\XeKo at hanja@font\XeKo at hangul@font
+    \let\xetexkohanjaoption\xetexkohanguloption
+    }
+  % math hangul
+  \newfam\symmathhangul
+  \protected\def\setmathhangulfonts#1#2#3{% font identifiers
+    \ifnum\Umathcodenum"AC00="AC00\relax
+      \setmathhangulblock{AC00}{D7A3}%
+    \fi
+    \textfont\symmathhangul=#1\relax
+    \scriptfont\symmathhangul=#2\relax
+    \scriptscriptfont\symmathhangul=#3\relax
+    }
+  \protected\def\mathhangulfont{%
+    \afterassignment\xetexkosetmathhangulfonts\font\textmathhangul
+    }
+  \def\xetexkosetmathhangulfonts{%
+    \edef\@tempa{%
+      \expandafter\expandafter\expandafter\XeKo at strip@at at size@from at font
+      \expandafter\fontname\expandafter\textmathhangul\detokenize{ at }\relax
+      }%
+    \dimen@\fontdimen 6 \textmathhangul
+    \font\scriptmathhangul= \@tempa\space at .7\dimen@
+    \font\scriptscriptmathhangul = \@tempa\space at .5\dimen@
+    \setmathhangulfonts\textmathhangul\scriptmathhangul\scriptscriptmathhangul
+    }
+  \expandafter\def\expandafter\XeKo at strip@at at size@from at font
+    \expandafter#\expandafter1\detokenize{ at }#2\relax{#1}
+  % default unbatang
+  \hangulfont="[UnBatang.ttf]:mapping=tex-text;script=hang" at 10pt
+  \hanjabyhangulfont
+  \XeKocatcodeofATchar
+\endinput\fi
+
+%%% latex
+\RequirePackage{fontspec}[2020/02/03]
+\AddToHook{rmfamily}{%
+  \let \xetexkohangulfont   \xetexkomainhangulfont
+  \let \xetexkohanguloption \xetexkomainhanguloption
+  \let \xetexkohanjafont    \xetexkomainhanjafont
+  \let \xetexkohanjaoption  \xetexkomainhanjaoption
+  }
+\AddToHook{sffamily}{%
+  \let \xetexkohangulfont   \xetexkosanshangulfont
+  \let \xetexkohanguloption \xetexkosanshanguloption
+  \let \xetexkohanjafont    \xetexkosanshanjafont
+  \let \xetexkohanjaoption  \xetexkosanshanjaoption
+  }
+\AddToHook{ttfamily}{%
+  \let \xetexkohangulfont   \xetexkomonohangulfont
+  \let \xetexkohanguloption \xetexkomonohanguloption
+  \let \xetexkohanjafont    \xetexkomonohanjafont
+  \let \xetexkohanjaoption  \xetexkomonohanjaoption
+  \latinalphs\latinparens\latinpuncts\latincolons\latinhyphens
+  \disablehangulspacing
+  }
+\edef\verbatim at font{%
+  \unexpanded\expandafter{%
+    \verbatim at font
+    \disablehangulspacingandlinebreak
+    \aftergroup\enablehangulspacingandlinebreak
+    }}
+\AddToHook{normalfont}{%
+  \let \xetexkohangulfont   \xetexkodefaulthangulfont
+  \let \xetexkohanguloption \xetexkodefaulthanguloption
+  \let \xetexkohanjafont    \xetexkodefaulthanjafont
+  \let \xetexkohanjaoption  \xetexkodefaulthanjaoption
+  }
+\IfHookExistsTF{selectfont}{
+  \AddToHook{selectfont}{%
+    \XeKo at hanja@selectfont
+    \XeKo at hangul@selectfont
+    }
+}{
+  \RequirePackage{everysel}
+  \EverySelectfont{%
+    \XeKo at hanja@selectfont
+    \XeKo at hangul@selectfont
+    }
+}
+
+\def\XeKo at hangul@selectfont{%
+  \ifdefined\XeKo at in@selectfont\else
+    \ifdefined\xetexkohangulfont
+      \begingroup
+      \let\XeKo at in@selectfont\empty
+      \xetexkohangulfont
+      \edef\x{\endgroup
+        \def\noexpand\XeKo at hangul@font{\the\font
+          \unexpanded\expandafter{\xetexkohanguloption}}%
+          \noexpand\xetexkohanguloption % for 영문자-한글 interlatincjk
+          }\x
+    \else
+      \let\XeKo at hangul@font\XeKo at undefined
+    \fi
+  \fi
+  }
+\def\XeKo at hanja@selectfont{%
+  \ifdefined\XeKo at in@selectfont\else
+    \ifdefined\xetexkohanjafont
+      \begingroup
+      \let\XeKo at in@selectfont\empty
+      \xetexkohanjafont
+      \edef\x{\endgroup
+        \def\noexpand\XeKo at hanja@font{\the\font
+          \unexpanded\expandafter{\xetexkohanjaoption}}%
+          \noexpand\xetexkohanjaoption
+          }\x
+    \else
+      \let\XeKo at hanja@font\XeKo at undefined
+    \fi
+  \fi }
+
+\ExplSyntaxOn
+\tl_new:N \l_xtxko_font_opts_tl
+\tl_new:N \l_xtxko_rest_opts_tl
+\keys_define:nn { xtxko-font }
+{
+  hu            .code:n = { \__xtxko_add_font_opt:Nn \xetexkohu         {#1} } ,
+  interhchar    .code:n = { \__xtxko_add_font_opt:Nn \xetexkointerhchar {#1} } ,
+  charraise     .code:n = { \__xtxko_add_font_opt:Nn \xetexkocharraise  {#1} } ,
+  InterLatinCJK .meta:n = { hu         = {#1} } ,
+  InterHangul   .meta:n = { interhchar = {#1} } ,
+  CharRaise     .meta:n = { charraise  = {#1} } ,
+  lowerexclamation    .code:n = { },
+  lowerperiod         .code:n = { },
+  lowercomma          .code:n = { },
+  lowerquestion       .code:n = { },
+  postexclamationkern .code:n = { },
+  postmathskip        .code:n = { },
+  postperiodkern      .code:n = { },
+  postcommakern       .code:n = { },
+  postquestionkern    .code:n = { },
+  preexclamationkern  .code:n = { },
+  preperiodkern       .code:n = { },
+  precommakern        .code:n = { },
+  prequestionkern     .code:n = { },
+  quoteraise          .code:n = { },
+  quotewidth          .code:n = { },
+  PunctRaise          .code:n = { },
+}
+\cs_new:Nn \__xtxko_add_font_opt:Nn
+{
+  \tl_put_right:Nn \l_xtxko_font_opts_tl { \cs_set_nopar:Npn #1 {#2} }
+}
+\cs_new:Nn \__xtxko_assign_font_opts:n
+{
+  \tl_clear:N \l_xtxko_font_opts_tl
+  \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rest_opts_tl
+}
+% suppress upshape font warnings
+\cs_new_nopar:Npn \l_xetexko_pacify_upshape {
+  \tl_map_inline:nn { \mddefault \bfdefault }
+  {
+    \cs_if_exist:cF { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\updefault }
+    {
+      \cs_if_exist:cT { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\shapedefault }
+      {
+        \cs_set_eq:cc
+        { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\updefault }
+        { \g_fontspec_encoding_tl/\l_fontspec_family_tl/##1/\shapedefault }
+      }
+    }
+  }
+}
+\DeclareDocumentCommand \setmainhangulfont { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \XeKo at mainhangulfamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_protected_nopar:Npn \xetexkomainhangulfont
+  {
+    \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo at mainhangulfamily \selectfont
+  }
+  \cs_set_eq:NN \xetexkomainhanguloption \l_xtxko_font_opts_tl
+  \str_if_eq:eeT \familydefault \rmdefault
+  {
+    \cs_set_eq:NN \xetexkohangulfont \xetexkomainhangulfont
+    \cs_set_eq:NN \xetexkohanguloption \xetexkomainhanguloption
+    \cs_set_eq:NN \xetexkodefaulthangulfont \xetexkomainhangulfont
+    \cs_set_eq:NN \xetexkodefaulthanguloption \xetexkomainhanguloption
+    \XeKo at hangul@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \setsanshangulfont { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \XeKo at sanshangulfamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_protected_nopar:Npn \xetexkosanshangulfont
+  {
+    \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo at sanshangulfamily \selectfont
+  }
+  \cs_set_eq:NN \xetexkosanshanguloption \l_xtxko_font_opts_tl
+  \str_if_eq:eeT \familydefault \sfdefault
+  {
+    \cs_set_eq:NN \xetexkohangulfont \xetexkosanshangulfont
+    \cs_set_eq:NN \xetexkohanguloption \xetexkosanshanguloption
+    \cs_set_eq:NN \xetexkodefaulthangulfont \xetexkosanshangulfont
+    \cs_set_eq:NN \xetexkodefaulthanguloption \xetexkosanshanguloption
+    \XeKo at hangul@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \setmonohangulfont { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \XeKo at monohangulfamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_protected_nopar:Npn \xetexkomonohangulfont
+  {
+    \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo at monohangulfamily \selectfont
+  }
+  \cs_set_eq:NN \xetexkomonohanguloption \l_xtxko_font_opts_tl
+  \str_if_eq:eeT \familydefault \ttdefault
+  {
+    \cs_set_eq:NN \xetexkohangulfont \xetexkomonohangulfont
+    \cs_set_eq:NN \xetexkohanguloption \xetexkomonohanguloption
+    \cs_set_eq:NN \xetexkodefaulthangulfont \xetexkomonohangulfont
+    \cs_set_eq:NN \xetexkodefaulthanguloption \xetexkomonohanguloption
+    \XeKo at hangul@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \newhangulfontfamily { m O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #2, #4 }
+  \fontspec_set_family:cnn { xetexko_user_family_ \cs_to_str:N #1 } { \l_xtxko_rest_opts_tl } { #3 }
+  \cs_set_nopar:cpn { xetexko_user_font_ \cs_to_str:N #1 }
+  {
+    \fontencoding \g_fontspec_encoding_tl
+    \exp_args:Nc \fontfamily { xetexko_user_family_ \cs_to_str:N #1 } \selectfont
+  }
+  \cs_set_nopar:cpx { xetexko_user_option_ \cs_to_str:N #1 }
+  {
+    \exp_not:o { \l_xtxko_font_opts_tl }
+  }
+  \cs_set_protected_nopar:Npn #1
+  {
+    \cs_set_eq:Nc \xetexkohangulfont   { xetexko_user_font_ \cs_to_str:N #1 }
+    \cs_set_eq:Nc \xetexkohanguloption { xetexko_user_option_ \cs_to_str:N #1 }
+    \XeKo at hangul@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \newhangulfontface { m O{} m O{} }
+{
+  \newhangulfontfamily #1 { #3 } [ BoldFont={}, ItalicFont={}, SmallCapsFont={}, #2, #4 ]
+}
+\DeclareDocumentCommand \hangulfontspec { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \xetexkohangulfontfamily { \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_nopar:Npn \xetexkohangulfont
+  {
+    \fontencoding \g_fontspec_encoding_tl
+    \fontfamily \xetexkohangulfontfamily \selectfont
+  }
+  \cs_set_nopar:Npx \xetexkohanguloption
+  {
+    \exp_not:o { \l_xtxko_font_opts_tl }
+  }
+  \XeKo at hangul@selectfont
+  \ignorespaces
+}
+\cs_set_eq:NN \adhochangulfont \hangulfontspec
+\DeclareDocumentCommand \addhangulfontfeature { m }
+{
+  \group_begin:
+  \fontseries\mddefault\fontshape\shapedefault \xetexkohangulfont
+  \cs_set_eq:NN \l_xtxko_font_opts_tl \xetexkohanguloption
+  \keys_set_known:nxN { xtxko-font } { #1 } \l_xtxko_rest_opts_tl
+  \addfontfeature { \l_xtxko_rest_opts_tl }
+  \use:x
+  {
+    \group_end:
+    \exp_not:N \cs_set_nopar:Npn \exp_not:N \xetexkohangulfont
+    {
+      \exp_not:N \fontencoding { \f at encoding }
+      \exp_not:N \fontfamily   { \f at family }
+      \exp_not:N \selectfont
+    }
+    \exp_not:N \cs_set_nopar:Npn \exp_not:N \xetexkohanguloption
+    {
+      \exp_not:o { \l_xtxko_font_opts_tl }
+    }
+  }
+  \XeKo at hangul@selectfont
+  \ignorespaces
+}
+\cs_set_eq:NN \addhangulfontfeatures \addhangulfontfeature
+\DeclareDocumentCommand \setmainhanjafont { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \XeKo at mainhanjafamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_protected_nopar:Npn \xetexkomainhanjafont
+  {
+    \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo at mainhanjafamily \selectfont
+  }
+  \cs_set_eq:NN \xetexkomainhanjaoption \l_xtxko_font_opts_tl
+  \str_if_eq:eeT \familydefault \rmdefault
+  {
+    \cs_set_eq:NN \xetexkohanjafont \xetexkomainhanjafont
+    \cs_set_eq:NN \xetexkohanjaoption \xetexkomainhanjaoption
+    \cs_set_eq:NN \xetexkodefaulthanjafont \xetexkomainhanjafont
+    \cs_set_eq:NN \xetexkodefaulthanjaoption \xetexkomainhanjaoption
+    \XeKo at hanja@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \setsanshanjafont { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \XeKo at sanshanjafamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_protected_nopar:Npn \xetexkosanshanjafont
+  {
+    \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo at sanshanjafamily \selectfont
+  }
+  \cs_set_eq:NN \xetexkosanshanjaoption \l_xtxko_font_opts_tl
+  \str_if_eq:eeT \familydefault \sfdefault
+  {
+    \cs_set_eq:NN \xetexkohanjafont \xetexkosanshanjafont
+    \cs_set_eq:NN \xetexkohanjaoption \xetexkosanshanjaoption
+    \cs_set_eq:NN \xetexkodefaulthanjafont \xetexkosanshanjafont
+    \cs_set_eq:NN \xetexkodefaulthanjaoption \xetexkosanshanjaoption
+    \XeKo at hanja@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \setmonohanjafont { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \XeKo at monohanjafamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_protected_nopar:Npn \xetexkomonohanjafont
+  {
+    \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo at monohanjafamily \selectfont
+  }
+  \cs_set_eq:NN \xetexkomonohanjaoption \l_xtxko_font_opts_tl
+  \str_if_eq:eeT \familydefault \ttdefault
+  {
+    \cs_set_eq:NN \xetexkohanjafont \xetexkomonohanjafont
+    \cs_set_eq:NN \xetexkohanjaoption \xetexkomonohanjaoption
+    \cs_set_eq:NN \xetexkodefaulthanjafont \xetexkomonohanjafont
+    \cs_set_eq:NN \xetexkodefaulthanjaoption \xetexkomonohanjaoption
+    \XeKo at hanja@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \newhanjafontfamily { m O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #2, #4 }
+  \fontspec_set_family:cnn { xetexko_user_family_ \cs_to_str:N #1 } { \l_xtxko_rest_opts_tl } { #3 }
+  \cs_set_nopar:cpn { xetexko_user_font_ \cs_to_str:N #1 }
+  {
+    \fontencoding \g_fontspec_encoding_tl
+    \exp_args:Nc \fontfamily { xetexko_user_family_ \cs_to_str:N #1 } \selectfont
+  }
+  \cs_set_nopar:cpx { xetexko_user_option_ \cs_to_str:N #1 }
+  {
+    \exp_not:o { \l_xtxko_font_opts_tl }
+  }
+  \cs_set_protected_nopar:Npn #1
+  {
+    \cs_set_eq:Nc \xetexkohanjafont   { xetexko_user_font_ \cs_to_str:N #1 }
+    \cs_set_eq:Nc \xetexkohanjaoption { xetexko_user_option_ \cs_to_str:N #1 }
+    \XeKo at hanja@selectfont
+  }
+  \ignorespaces
+}
+\DeclareDocumentCommand \newhanjafontface { m O{} m O{} }
+{
+  \newhanjafontfamily #1 { #3 } [ BoldFont={}, ItalicFont={}, SmallCapsFont={}, #2, #4 ]
+}
+\DeclareDocumentCommand \hanjafontspec { O{} m O{} }
+{
+  \__xtxko_assign_font_opts:n { #1, #3 }
+  \fontspec_set_family:Nnn \xetexkohanjafontfamily { \l_xtxko_rest_opts_tl } { #2 }
+  \cs_set_nopar:Npn \xetexkohanjafont
+  {
+    \fontencoding \g_fontspec_encoding_tl
+    \fontfamily \xetexkohanjafontfamily \selectfont
+  }
+  \cs_set_nopar:Npx \xetexkohanjaoption
+  {
+    \exp_not:o { \l_xtxko_font_opts_tl }
+  }
+  \XeKo at hanja@selectfont
+  \ignorespaces
+}
+\cs_set_eq:NN \adhochanjafont \hanjafontspec
+\DeclareDocumentCommand \addhanjafontfeature { m }
+{
+  \group_begin:
+  \fontseries\mddefault\fontshape\shapedefault \xetexkohanjafont
+  \cs_set_eq:NN \l_xtxko_font_opts_tl \xetexkohanjaoption
+  \keys_set_known:nxN { xtxko-font } { #1 } \l_xtxko_rest_opts_tl
+  \addfontfeature { \l_xtxko_rest_opts_tl }
+  \use:x
+  {
+    \group_end:
+    \exp_not:N \cs_set_nopar:Npn \exp_not:N \xetexkohanjafont
+    {
+      \exp_not:N \fontencoding { \f at encoding }
+      \exp_not:N \fontfamily   { \f at family }
+      \exp_not:N \selectfont
+    }
+    \exp_not:N \cs_set_nopar:Npn \exp_not:N \xetexkohanjaoption
+    {
+      \exp_not:o { \l_xtxko_font_opts_tl }
+    }
+  }
+  \XeKo at hanja@selectfont
+  \ignorespaces
+}
+\cs_set_eq:NN \addhanjafontfeatures \addhanjafontfeature
+% math hangul
+\DeclareDocumentCommand \setmathhangulfont { O{} m O{} }
+{
+  \fontspec_set_family:Nnn \xetexkomathhangulfamily { #1, #3 } { #2 }
+  \l_xetexko_pacify_upshape
+  \DeclareSymbolFont { mathhangul }
+    \g_fontspec_encoding_tl \xetexkomathhangulfamily \mddefault \updefault
+  \int_compare:nNnT { \Umathcodenum"AC00 } = { "AC00 }
+  {
+    \setmathhangulblock{AC00}{D7A3}
+  }
+  \ignorespaces
+}
+% xetexkofontregime
+\keys_define:nn { xtxko-char }
+{
+  alphs       .code:n = \use:c { #1alphs } ,
+  parens      .code:n = \use:c { #1parens } ,
+  puncts      .code:n = \use:c { #1puncts } ,
+  colons      .code:n = \use:c { #1colons } ,
+  hyphens     .code:n = \use:c { #1hyphens } ,
+  cjksymbols  .code:n = \use:c { #1cjksymbols } ,
+  nums        .meta:n = { alphs  = {#1} },
+  quotes      .meta:n = { parens = {#1} },
+}
+\DeclareDocumentCommand \xetexkofontregime { O{} m O{} }
+{
+  \use:c { #2marks }
+  \keys_set:nn { xtxko-char } { #1, #3 }
+}
+% no longer support default hangul/hanja fontfeatures
+\DeclareDocumentCommand \defaulthangulfontfeatures { t+ o m } { }
+\cs_set_eq:NN \defaulthanjafontfeatures \defaulthangulfontfeatures
+\ExplSyntaxOff
+
+\protected\def\hanjabyhangulfont{%
+  \let\xetexkomainhanjafont      \xetexkomainhangulfont
+  \let\xetexkomainhanjaoption    \xetexkomainhanguloption
+  \let\xetexkosanshanjafont      \xetexkosanshangulfont
+  \let\xetexkosanshanjaoption    \xetexkosanshanguloption
+  \let\xetexkomonohanjafont      \xetexkomonohangulfont
+  \let\xetexkomonohanjaoption    \xetexkomonohanguloption
+  \let\xetexkodefaulthanjafont   \xetexkodefaulthangulfont
+  \let\xetexkodefaulthanjaoption \xetexkodefaulthanguloption
+  \let\xetexkohanjafont   \xetexkohangulfont
+  \let\xetexkohanjaoption \xetexkohanguloption
+  \let\XeKo at hanja@font    \XeKo at hangul@font
+  }
+
+\AtBeginDocument{%
+  \ifdefined\xetexkomainhangulfont\else
+    \begingroup\rmfamily \expandafter\endgroup
+    \iffontchar\font"AC00 \else
+      \IfFontExistsTF{UnBatang.ttf}
+      {\setmainhangulfont{UnBatang.ttf}[BoldFont=UnBatangBold.ttf,Script=Hangul,Language=Korean]}{}
+    \fi
+  \fi
+  \ifdefined\xetexkosanshangulfont\else
+    \begingroup\sffamily \expandafter\endgroup
+    \iffontchar\font"AC00 \else
+      \IfFontExistsTF{UnDotum.ttf}
+      {\setsanshangulfont{UnDotum.ttf}[BoldFont=UnDotumBold.ttf]}{}
+    \fi
+  \fi
+  \ifdefined\xetexkomonohangulfont\else
+    \begingroup\ttfamily \expandafter\endgroup
+    \iffontchar\font"AC00 \else
+      \IfFontExistsTF{UnDotum.ttf}{%
+        \ifnum 0\ifnum\strcmp{\ttdefault}{lmtt}=\z@ 1\fi
+                \ifnum\strcmp{\ttdefault}{LatinModernMono(0)}=\z@ 1\fi >\z@
+          \setmonohangulfont{UnDotum.ttf}[
+                   BoldFont=UnDotumBold.ttf,
+            UprightFeatures={SizeFeatures={{Size={-8.5},   FakeStretch=1.062},
+                                           {Size={8.5-11}, FakeStretch=1.05 },
+                                           {Size={11-},    FakeStretch=1.03 }}},
+               BoldFeatures={SizeFeatures={{Size={-},      FakeStretch=1.05 }}},
+                  WordSpace={1.66667,0,0} ]
+        \else
+          \setmonohangulfont{UnDotum.ttf}[BoldFont=UnDotumBold.ttf]
+        \fi
+      }{}
+    \fi
+  \fi
+  \ifdefined\xetexkomainhanjafont\else
+    \let\xetexkomainhanjafont      \xetexkomainhangulfont
+    \let\xetexkomainhanjaoption    \xetexkomainhanguloption
+  \fi
+  \ifdefined\xetexkosanshanjafont\else
+    \let\xetexkosanshanjafont      \xetexkosanshangulfont
+    \let\xetexkosanshanjaoption    \xetexkosanshanguloption
+  \fi
+  \ifdefined\xetexkomonohanjafont\else
+    \let\xetexkomonohanjafont      \xetexkomonohangulfont
+    \let\xetexkomonohanjaoption    \xetexkomonohanguloption
+  \fi
+  \ifdefined\xetexkodefaulthanjafont\else
+    \let\xetexkodefaulthanjafont   \xetexkodefaulthangulfont
+    \let\xetexkodefaulthanjaoption \xetexkodefaulthanguloption
+  \fi
+  \ifdefined\xetexkohanjafont\else
+    \let\xetexkohanjafont   \xetexkohangulfont
+    \let\xetexkohanjaoption \xetexkohanguloption
+  \fi
+  \ifdefined\XeKo at hanja@font\else
+    \let\XeKo at hanja@font    \XeKo at hangul@font
+  \fi
+  \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{%
+    \let\hangulalphs\relax
+    \let\hangulnums\relax
+    \let\hangulparens\relax
+    \let\hangulquotes\relax
+    \let\hangulpuncts\relax
+    \let\hangulmarks\relax
+    \let\hangulcolons\relax
+    \let\hangulhyphens\relax
+    \let\hangulcjksymbols\relax
+    \let\hanjaalphs\relax
+    \let\hanjanums\relax
+    \let\hanjaparens\relax
+    \let\hanjaquotes\relax
+    \let\hanjapuncts\relax
+    \let\hanjamarks\relax
+    \let\hanjacolons\relax
+    \let\hanjahyphens\relax
+    \let\hanjacjksymbols\relax
+    \let\latinalphs\relax
+    \let\latinnums\relax
+    \let\latinparens\relax
+    \let\latinquotes\relax
+    \let\latinpuncts\relax
+    \let\latinmarks\relax
+    \let\latincolons\relax
+    \let\latinhyphens\relax
+    \let\latincjksymbols\relax
+    \let\prevfontalphs\relax
+    \let\prevfontnums\relax
+    \let\prevfontparens\relax
+    \let\prevfontquotes\relax
+    \let\prevfontpuncts\relax
+    \let\prevfontmarks\relax
+    \let\prevfontcolons\relax
+    \let\prevfonthyphens\relax
+    \let\prevfontcjksymbols\relax
+    \let\hanjabyhangulfont\relax
+    \let\inhibitglue\relax
+    \let\typesetclassic\relax
+    \let\typesetmodern\relax
+    \let\hangingpunctuation\relax
+    \let\hangingpunctuations\relax
+    \let\removeclassicspaces\relax
+    \let\nocompresspunctuations\relax
+    \let\compresspunctuations\relax
+    \let\disablekoreanfonts\relax
+    \let\disablehangulspacing\relax
+    \let\disablehangulspacingandlinebreak\relax
+    \let\enablehangulspacingandlinebreak\relax
+    \let\jong\relax
+    \let\jung\relax
+    \let\rieul\relax
+    \let\dotemph\@firstofone
+    \let\addhangulfontfeature\@gobble
+    \let\addhangulfontfeatures\@gobble
+    \let\addhanjafontfeature\@gobble
+    \let\addhanjafontfeatures\@gobble
+    \def\는{는}%
+    \def\은{은}%
+    \def\을{을}%
+    \def\를{를}%
+    \def\와{와}%
+    \def\과{과}%
+    \def\가{가}%
+    \def\이{이}%
+    \def\라{라}%
+    \def\으{으}%
+    \def\로{로}%
+    \def\hellipsis{...}}}{}
+  \if at hangul
+    \RequirePackage{konames-utf}
+  \fi
+  }
+
 \newif\if at hangul
 \newif\if at hanja
 \DeclareOption{hangul}{\@hangultrue}
@@ -53,70 +2276,16 @@
 \DeclareOption{unfonts}{}
 \ProcessOptions\relax
 
-\RequirePackage{xetexko-space}
-\RequirePackage{xetexko-josa}
-\RequirePackage{xetexko-font}
-\RequirePackage{xetexko-vertical}
-
 \RequirePackage{kolabels-utf}
-\if at hangul\AtBeginDocument{\RequirePackage{konames-utf}}\fi
 
-\AtBeginDocument{
-  % for ulem package
-  \ifcsname UL at hook\endcsname \xetexkoulemsupport \fi
-  % for hyperref package
-  \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{%
-      \let\dotemph\@firstofone
-      \let\makejosa\@secondoftwo
-      \let\jong\relax
-      \let\jung\relax
-      \let\rieul\relax
-      \let\latinalphs\relax
-      \let\hangulalphs\relax
-      \let\hanjaalphs\relax
-      \let\prevfontalphs\relax
-      \let\latinnums\relax
-      \let\hangulnums\relax
-      \let\hanjanums\relax
-      \let\prevfontnums\relax
-      \let\latinparens\relax
-      \let\hangulparens\relax
-      \let\hanjaparens\relax
-      \let\prevfontparens\relax
-      \let\latinquotes\relax
-      \let\hangulquotes\relax
-      \let\hanjaquotes\relax
-      \let\prevfontquotes\relax
-      \let\latinpuncts\relax
-      \let\hangulpuncts\relax
-      \let\hanjapuncts\relax
-      \let\prevfontpuncts\relax
-      \let\latinmarks\relax
-      \let\hangulmarks\relax
-      \let\hanjamarks\relax
-      \let\prevfontmarks\relax
-      \let\latincolons\relax
-      \let\hangulcolons\relax
-      \let\hanjacolons\relax
-      \let\prevfontcolons\relax
-      \let\latinhyphens\relax
-      \let\hangulhyphens\relax
-      \let\hanjahyphens\relax
-      \let\prevfonthyphens\relax
-      \let\latincjksymbols\relax
-      \let\hangulcjksymbols\relax
-      \let\hanjacjksymbols\relax
-      \let\prevfontcjksymbols\relax
-      \let\disablekoreanfonts\relax
-      \let\disablehangulspacing\relax
-      \let\disablehangulspacingandlinebreak\relax
-      \let\disableautojosa\relax
-      \let\disablecjksymbolspacing\relax
-      \let\japanese\relax
-      \let\chinese\relax
-      \let\Tchinese\relax
-      \let\Schinese\relax
-  }}{}
-}
+\protected\def\hellipsis{\char"2026\char"2026 }
 
+\if at hangul
+  \linespread{1.3888}
+  \footnotesep=1.3888\footnotesep
+  \skip\footins=\glueexpr\skip\footins/72*100\relax
+  \frenchspacing
+\fi
+
+\XeKocatcodeofATchar
 \endinput



More information about the tex-live-commits mailing list.