summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-20 22:19:52 +0000
committerKarl Berry <karl@freefriends.org>2021-03-20 22:19:52 +0000
commit18d932604c99399d6fd9d26967b6e9bd2553898b (patch)
treeaaf4a48d30832247931699646404e0653eaf5213 /Master
parent4f3f1acc81147436b6d0077d72876be7a20df1e7 (diff)
xetexko (20mar21)
git-svn-id: svn://tug.org/texlive/trunk@58562 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/ChangeLog29
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/README8
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdfbin227251 -> 241892 bytes
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex512
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty586
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty125
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty215
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty1640
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty169
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko.sty2357
10 files changed, 2624 insertions, 3017 deletions
diff --git a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
index 3f4fe3a16c8..3419947e033 100644
--- a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
+++ b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
@@ -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
diff --git a/Master/texmf-dist/doc/xetex/xetexko/README b/Master/texmf-dist/doc/xetex/xetexko/README
index 4b9931cf3e7..456c0f9a691 100644
--- a/Master/texmf-dist/doc/xetex/xetexko/README
+++ b/Master/texmf-dist/doc/xetex/xetexko/README
@@ -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,10 +111,8 @@ Set spacing between Hangul/Hanja and Latin characters.
[InterHangul=<dimen>]
Set spacing between Hangul characters.
- [PunctRaise=<dimen>]
-Raise Latin fullstop after Hangul character.
-
-See xetexko-doc.pdf for more options.
+ [CharRaise=<dimen>]
+Raise the baseline of Hangul/Hanja characters.
Other User Commands
diff --git a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf
index a84c7279191..98315b58f32 100644
--- a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf
+++ b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
index 4fd17522348..af2d1dfaca9 100644
--- a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
+++ b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
@@ -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 @@ fontspec에 옵션을 주려면 \xetexko를 부르기 전에 fontspec을 따로
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 @@ main/sans hangul/hanja 폰트에는 따로 \verb|Ligatures=TeX| 옵션을 지시
\keyword{fallbackhanjafont}%
\cs{fallbackhanjafont}를 정의해두면 \hemph{한자 글꼴에도 없는 한자}를
-이 글꼴에서 찾아 식자한다. \verb|\newfontfamily| 명령 등으로 정의한다.
+이 글꼴에서 찾아 식자한다. \cs{newfontfamily} 명령 등으로 정의한다.
\section{글꼴 명령 (계속)}
\begin{verbatim}
@@ -209,31 +171,30 @@ main/sans hangul/hanja 폰트에는 따로 \verb|Ligatures=TeX| 옵션을 지시
\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'를 붙여도 된다.
참고로, 한자와 한글을 같은 글꼴로 식자하고 싶을 때 글꼴 설정을
번거롭게 두 번 할 필요 없이 한글 글꼴만 설정한 뒤 간단히
\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 @@ fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
옵션 키의 종류와 의미는 다음과 같으며 각 키 값은 인자의 경우와 같다.
\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 @@ fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
플레인텍에서는 다음 명령을 사용한다. \LaTeX에서도 쓸 수 있다.
\begin{verbatim}
\latinalphs \hangulalphs \hanjaalphs \prevfontalphs
- \latinnums \hangulnums \hanjanums \prevfontnums
\latinparens \hangulparens \hanjaparens \prevfontparens
- \latinquotes \hangulquotes \hanjaquotes \prevfontquotes
- \latinhyphens \hangulhyphens \hanjahyphens \prevfonthyphens
\latincolons \hangulcolons \hanjacolons \prevfontcolons
+ \latinhyphens \hangulhyphens \hanjahyphens \prevfonthyphens
\latinpuncts \hangulpuncts \hanjapuncts \prevfontpuncts
\latincjksymbols \hangulcjksymbols \hanjacjksymbols \prevfontcjksymbols
\end{verbatim}
@@ -277,95 +239,70 @@ fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
\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}
@@ -373,42 +310,43 @@ fontspec 패키지의 \cs{defaultfontfeatures}에 상응하는 것이지만,
한글 또는 한자에 대해 글자마다 지시한 명령을 수행한다. 예컨대
\verb|\everyhangul{\fbox{#1}}| 명령은 모든
{\everyhangul{\fbox{#1}}\fboxsep=1pt 한글 주위에 박스}를
- 두른다. 다른 글꼴 옵션과 충돌할 수 있으므로
- 주의를 요한다.
+ 두른다.
\item[\cs{disablekoreanfonts}]
-한글폰트를 따로 설정하지 않고 영문 폰트를 따라간다.
-이 때 \verb|\setmainfont| 따위가 한글과 한자에도 적용된다.
-
- \item[\cs{disableautojosa}]
-혹시 있을지 모를 예기치 못한 기능간 충돌에 대비하여 자동조사 기능을
-끄는 명령을 제공한다.
-
- \item[\cs{disablejamoautojosa}]
-옛한글 자모에 한해서 자동조사 기능을 끈다.
-옛한글 자모에 영향을 주는 \verb+Mapping+ 글꼴 옵션을 사용해야 한다면
-이 명령을 선언해두어야 정상 작동한다.
+ 한글폰트를 따로 설정하지 않고 영문 폰트를 따라간다.
+ 이 때 \cs{setmainfont} 따위가 한글과 한자에도 적용된다.
\item[\cs{disablecjksymbolspacing}]
-CJK 구두점의 폭을 0.5em으로 강제설정하는 것을 방지한다.
-\xetexko는 낡은 고정폭 한글 폰트들을 고려하여 이 기능을 구현하였으나
-현대적인 한글 폰트는 이러한 과잉친절이 오히려 성가실 경우가 있다.
+ CJK 구두점의 폭을 \verb|0.5em|으로 강제설정하는 것을 방지한다.
+ \xetexko는 낡은 고정폭 한글 폰트들을 고려하여 이 기능을 구현하였으나
+ 현대적인 한글 폰트는 이러한 과잉친절이 오히려 성가실 경우가 있다.
+
+ \cs{nocompresspunctuations}는 이 명령과 동의어이다.\\
+ 반대로
+ \keyword{compresspunctuations}%
+ \cs{compresspunctuations}는 반각을 강제하라는 명령이다.
+ 이것이 기본값이므로 특별한 경우가 아니면 따로 선언할 필요가 없다.
\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 @@ CJK 구두점의 폭을 0.5em으로 강제설정하는 것을 방지한다.
있으며 공개폰트로는 은바탕, 함초롬~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 @@ Source Han Serif (본명조), Noto Sans CJK, Noto Serif CJK,
\section{세로쓰기}\label{sec:verttype}
세로쓰기를 위한 글꼴 지정은 다음과 같다.
-역시 고급 오픈타입 기능을 이용하는 것이므로 폰트가 이를 지원해야 한다.%
-\footnote{폰트의 세로쓰기 글자폭이 가로쓰기와 다르다면
- \cs{verticalem=1.05em} 같은 선언을 미리 해두는 게 좋다.}
+역시 고급 오픈타입 기능을 이용하는 것이므로 폰트가 이를 지원해야 한다.
\begin{verbatim}
\setmainhangulfont{Noto Sans CJK KR}[
Vertical=Alternates, RawFeature=vertical ]
@@ -462,17 +401,19 @@ Source Han Serif (본명조), Noto Sans CJK, Noto Serif CJK,
\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 @@ vertical 환경의 인자는 세로쓰기 박스의 세로 길이이다.
제곡조를못이기는 사랑의노래는 님의沈默을 휩싸고돔니다\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 @@ vertical 환경의 인자는 세로쓰기 박스의 세로 길이이다.
horizontal 환경에는 가로쓰기 박스의 너비를 인자로 주어야 한다.
가로쓰기 영역의 폰트 설정은 사용자의 몫이다.
-\section{고문헌·일본어·중국어}
+\section{고문헌 조판}
+
+\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}도 호환성을 위해 남겨두었다. }
-띄어쓰기가 없는 옛문헌이나 일본어 단락 따위를 삽입할 때
-\verb|japanese| 혹은 \verb|chinese| 환경을 선언하는 것이 좋다.
-들여쓰기\footnote {들여쓰기 기본값은 japanese는 1em 이고 chinese는 2em 이다.}
-및 자간 조절이 자동으로 이루어지며
-사용자가 입력한 불필요한 공백도 없애준다.
-\verb|Schinese| 환경은 chinese의 다른 이름이다.
-\verb|Tchinese|도 제공하는데 중국어 번체 글꼴을 사용한다면 이 환경을 이용하라.
-일반적으로 우리 고문헌 조판에는 japanese 환경이 더 적합하다.
+\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 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
\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 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
{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 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
명령으로 유니코드 블럭을 추가 지정해야 한다.
\section{자동조사}
-자동조사는 \kotex 의 경우와 기본적으로 동일하게 동작한다.
+자동조사는 \kotex 의 경우와 대체로 동일하게 동작한다.
게다가 문장 중에서도 동작하고
플레인텍에서까지 사용할 수 있다.
그럼에도 불구하고 사용자가 임의로 제어할 필요가 생긴다면
@@ -622,24 +632,100 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
\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}
-
-\hfill \fboxsep=-\fboxrule \fbox{\vbox to1em{\hbox to1em{\hss}\vss}}
-
+\LaTeX에서는 \uwave{ulem 패키지}를 로드하는 것만으로 자동 지원된다.
+
+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}
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
index 42c0913587e..96552f79d5e 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
@@ -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@storeltnfont
- \chardef\XKcurrentfont \c__xtxko_one_int #3
- \XK@storecjkfont
- }
- }
- {
- \cs_set_nopar:Npn #1
- {
- \XK@storeltnfont
- \chardef\XKcurrentfont \c__xtxko_two_int #3
- \XK@storecjkfont
- }
- }
- \cs_if_eq:NNTF \rmdefault #2
- {
- \cs_set_eq:NN \XK@default@korean@font \XK@rm@korean@font
- }
- {
- \cs_if_eq:NNTF \sfdefault #2
- {
- \cs_set_eq:NN \XK@default@korean@font \XK@sf@korean@font
- }
- {
- \cs_set_eq:NN \XK@default@korean@font \XK@tt@korean@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@adhoc@hangul@font {#2} [\l_xtxko_rem_tl]
- \l_xetexko_pacify_bfseries
- \tl_put_right:NV \XK@adhoc@hangul@font \l_xtxko_font_opts_tl
- \cs_set_nopar:Npn \XKhangulfont
- {
- \XK@storeltnfont
- \cs_set_eq:NN \XKcurrentfont \c__xtxko_one_int
- \XK@adhoc@hangul@font
- \XK@storecjkfont
- }
- \ignorespaces
- }
-\cs_set_eq:NN \hangulfontspec \adhochangulfont
-\DeclareDocumentCommand \adhochanjafont { O{} m O{} }
- {
- \__xtxko_hanja_assign_font_opts:n {#1,#3}
- \setfontfamily \XK@adhoc@hanja@font {#2} [\l_xtxko_rem_tl]
- \l_xetexko_pacify_bfseries
- \tl_put_right:NV \XK@adhoc@hanja@font \l_xtxko_font_opts_tl
- \cs_set_nopar:Npn \XKhanjafont
- {
- \XK@storeltnfont
- \cs_set_eq:NN \XKcurrentfont \c__xtxko_two_int
- \XK@adhoc@hanja@font
- \XK@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@newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
- \l_xetexko_pacify_bfseries
- \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
- \DeclareRobustCommand #1
- {
- \cs_set_nopar:Npn \XKhangulfont
- {
- \XK@storeltnfont
- \cs_set_eq:NN \XKcurrentfont \c__xtxko_one_int
- \use:c { XK@newfont@family \token_to_str:N #1 }
- \XK@storecjkfont
- }
- }
- }
-\DeclareDocumentCommand \newhanjafontfamily { m O{} m O{} }
- {
- \__xtxko_hanja_assign_font_opts:n {#2,#4}
- \exp_args:Nc \setfontfamily { XK@newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
- \l_xetexko_pacify_bfseries
- \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
- \DeclareRobustCommand #1
- {
- \cs_set_nopar:Npn \XKhanjafont
- {
- \XK@storeltnfont
- \cs_set_eq:NN \XKcurrentfont \c__xtxko_two_int
- \use:c { XK@newfont@family \token_to_str:N #1 }
- \XK@storecjkfont
- }
- }
- }
-\DeclareDocumentCommand \newhangulfontface { m O{} m O{} }
- {
- \__xtxko_hangul_assign_font_opts:n {#2,#4}
- \exp_args:Nc \setfontface { XK@newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
- \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
- \DeclareRobustCommand #1
- {
- \cs_set_nopar:Npn \XKhangulfont
- {
- \XK@storeltnfont
- \cs_set_eq:NN \XKcurrentfont \c__xtxko_one_int
- \use:c { XK@newfont@family \token_to_str:N #1 }
- \XK@storecjkfont
- }
- }
- }
-\DeclareDocumentCommand \newhanjafontface { m O{} m O{} }
- {
- \__xtxko_hanja_assign_font_opts:n {#2,#4}
- \exp_args:Nc \setfontface { XK@newfont@family \token_to_str:N #1 } {#3} [\l_xtxko_rem_tl]
- \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } \l_xtxko_font_opts_tl
- \DeclareRobustCommand #1
- {
- \cs_set_nopar:Npn \XKhanjafont
- {
- \XK@storeltnfont
- \cs_set_eq:NN \XKcurrentfont \c__xtxko_two_int
- \use:c { XK@newfont@family \token_to_str:N #1 }
- \XK@storecjkfont
- }
- }
- }
-%% add{hangul,hanja}fontfeature[s]
-\cs_set_nopar:Npn \xetexkopacifybfseries {
- \tl_map_inline:nn { \mddefault \bfdefault }
- {
- \cs_if_exist:cF { \f@encoding/\f@family/##1/\updefault }
- {
- \cs_gset_eq:cc
- { \f@encoding/\f@family/##1/\updefault }
- { \f@encoding/\f@family/##1/\shapedefault }
- }
- }
- \tl_map_inline:nn { \shapedefault \updefault \itdefault \sldefault }
- {
- \cs_if_exist:cF { \f@encoding/\f@family/bx/##1 }
- {
- \cs_gset_eq:cc
- { \f@encoding/\f@family/bx/##1 }
- { \f@encoding/\f@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@family } \exp_not:N \selectfont
- \exp_not:V \l_xtxko_font_opts_tl
- \exp_not:N \XK@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@family } \exp_not:N \selectfont
- \exp_not:V \l_xtxko_font_opts_tl
- \exp_not:N \XK@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@math@hangul@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@family\XKcjkprevfont\let\f@family\XKltnprevfont\fi
-}
-\def\XK@storeltnfont{%
- \ifx\f@family\XKcjkprevfont\else\let\XKltnprevfont\f@family\fi
-}
-\def\XK@storecjkfont{%
- \let\XKcjkprevfont\f@family
- \edef\XKplaincjkprevfont{\the\font}%
-}
-\edef\XKlatinfont{\unexpanded\expandafter{\XKstoreprevfont
- \chardef\XKcurrentfont\z@
- \edef\XK@plain@curr@font{\the\font}%
- \ifx\XK@plain@curr@font\XKplaincjkprevfont
- \selectfont
- \fi
-}}
-
-\def\XK@rm@korean@font{%
- \ifx\XKhangulfont\relax\else
- \def\XKhangulfont{%
- \XK@storeltnfont
- \chardef\XKcurrentfont\@ne\kormainfont
- \XK@storecjkfont
- }%
- \fi
- \ifx\XKhanjafont\relax\else
- \def\XKhanjafont {%
- \XK@storeltnfont
- \chardef\XKcurrentfont\tw@\hnjmainfont
- \XK@storecjkfont
- }%
- \fi
-}
-\def\XK@sf@korean@font{%
- \ifx\XKhangulfont\relax\else
- \def\XKhangulfont{%
- \XK@storeltnfont
- \chardef\XKcurrentfont\@ne\korsansfont
- \XK@storecjkfont
- }%
- \fi
- \ifx\XKhanjafont\relax\else
- \def\XKhanjafont {%
- \XK@storeltnfont
- \chardef\XKcurrentfont\tw@\hnjsansfont
- \XK@storecjkfont
- }%
- \fi
-}
-\def\XK@tt@korean@font{%
- \ifx\XKhangulfont\relax\else
- \def\XKhangulfont{%
- \XK@storeltnfont
- \chardef\XKcurrentfont\@ne\kormonofont
- \XK@storecjkfont
- }%
- \fi
- \ifx\XKhanjafont\relax\else
- \def\XKhanjafont {%
- \XK@storeltnfont
- \chardef\XKcurrentfont\tw@\hnjmonofont
- \XK@storecjkfont
- }%
- \fi
- \disablehangulspacing
-}
-
-% using latex 2020's font family hooks
-\edef\@rmfamilyhook{\unexpanded\expandafter{\@rmfamilyhook \XK@rm@korean@font}}
-\edef\@sffamilyhook{\unexpanded\expandafter{\@sffamilyhook \XK@sf@korean@font}}
-\edef\@ttfamilyhook{\unexpanded\expandafter{\@ttfamilyhook \XK@tt@korean@font}}
-\edef\@defaultfamilyhook{\unexpanded\expandafter{\@defaultfamilyhook
- \XK@default@korean@font }}
-\let\XK@default@korean@font\relax
-
-\edef\verbatim@font{\unexpanded\expandafter{\verbatim@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@default@korean@font\XK@sf@korean@font
- \else \expandafter\ifx\familydefault\ttdefault
- \let\XK@default@korean@font\XK@tt@korean@font
- \else
- \let\XK@default@korean@font\XK@rm@korean@font
- \fi\fi
- \XK@default@korean@font
- %%%%%%%%%%%%%%%%%%%%%
- % hangul in math mode
- \begingroup
- \ifx\xetexko@math@hangul@family\undefined
- \edef\@tempb{\sfdefault}\edef\@tempc{\ttdefault}%
- \ifx\f@family\@tempb \korsansfont \else
- \ifx\f@family\@tempc \kormonofont \else
- \kormainfont \fi\fi
- \xdef\xetexko@math@hangul@family{\f@family}\fi
- \endgroup
- \DeclareSymbolFont{mathhangul}\f@encoding\xetexko@math@hangul@family
- \mddefault\updefault
- \ifcsname \f@encoding/\xetexko@math@hangul@family/\bfdefault/\updefault\endcsname
- \SetSymbolFont{mathhangul}{bold}\f@encoding\xetexko@math@hangul@family
- \bfdefault\updefault
- \fi
- \setmathhangulblock{AC00}{D7A3}
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%
-% under [hangul] option
-\if@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
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty
index a96761370f1..180c2200156 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty
@@ -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
-
-\let\XK@orig@periodboxstop \XKperiodboxstop
-\let\XK@orig@commaboxstop \XKcommaboxstop
-\let\XK@orig@closingquotestop \XKclosingquotestop
-\let\XK@orig@openingquotestart\XKopeningquotestart
-\let\XK@orig@postcjkfullstop \postcjkfullstop
-\let\XK@orig@postcjkcloseparen\postcjkcloseparen
-\let\XK@orig@precjkopenparen@ \precjkopenparen@
-
-\def\disablehangingpunctuation{%
- \let\XKperiodboxstop \XK@orig@periodboxstop
- \let\XKcommaboxstop \XK@orig@commaboxstop
- \let\XKclosingquotestop \XK@orig@closingquotestop
- \let\XKopeningquotestart\XK@orig@openingquotestart
- \let\postcjkfullstop \XK@orig@postcjkfullstop
- \let\postcjkcloseparen \XK@orig@postcjkcloseparen
- \let\precjkopenparen@ \XK@orig@precjkopenparen@
-}
-\let\disablehangingpunctuations\disablehangingpunctuation
-
-\ifdefined\strip@pt\else
- \begingroup
- \catcode`P=12
- \catcode`T=12
- \lowercase{\def\x{\def\rem@pt##1.##2PT{##1\ifnum##2>\z@.##2\fi}}}
- \expandafter\endgroup\x
- \def\strip@pt{\expandafter\rem@pt\the}
-\fi
-
-\ifcsname AtBeginDocument\endcsname\else \def\AtBeginDocument#1{#1} \fi
-
-\AtBeginDocument{
- \begingroup
- \setbox\z@\hbox{가.}\setbox\tw@\hbox{가}%
- \xdef\temp@a
- {\strip@pt\dimexpr(\wd\z@-\wd\tw@)*65536/\number\dimexpr 1em\relax\relax}%
- \setbox\z@\hbox{가'}%
- \xdef\temp@b
- {\strip@pt\dimexpr(\wd\z@-\wd\tw@)*65536/\number\dimexpr 1em\relax\relax}%
- \endgroup
- \edef\xetexko@periodwidth{\temp@a em}%
- \edef\xetexko@quotewidth {\temp@b em}%
- \def\XKperiodboxstop{%
- \XK@orig@periodboxstop
- %\ifnum\XKcurrentfont>\z@
- \count@\spacefactor
- \XKH@post@hang\xetexko@periodwidth
- \spacefactor\count@
- %\fi
- }%
- \def\XKcommaboxstop{%
- \XK@orig@commaboxstop
- %\ifnum\XKcurrentfont>\z@
- \count@\spacefactor
- \XKH@post@hang\xetexko@periodwidth
- \spacefactor\count@
- %\fi
- }%
- \def\XKclosingquotestop{%
- \XK@orig@closingquotestop \XKH@post@hang\xetexko@quotewidth
- }%
- \def\XKopeningquotestart{%
- \XKH@pre@hang\xetexko@quotewidth \XK@orig@openingquotestart
- }%
- \def\precjkopenparen@{%
- \@josa@char@to@number\@let@token\count@
- \XK@side@bearing\count@\@ne
- \ifx^^^^201c\@let@token
- \dimen@ii\dimen@ \advance\dimen@ii-.125em
- \XKH@pre@hang\dimen@ii
- \else\ifx^^^^2018\@let@token \XKH@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@orig@postcjkcloseparen
- \ifx^^^^3001\@let@token \XKH@post@hang\dimen@
- \else\ifx^^^^ff0c\@let@token \XKH@post@hang\dimen@
- \else\ifx^^^^201d\@let@token
- \dimen@ii\dimen@ \advance\dimen@ii-.125em
- \XKH@post@hang\dimen@ii
- \else\ifx^^^^2019\@let@token \XKH@post@hang\dimen@
- \fi\fi\fi\fi
- }%
- \def\postcjkfullstop{%
- \XK@orig@postcjkfullstop \XKH@post@hang\dimen@
- }%
-}
-\def\XKH@post@hang#1{%
- \nobreak\hskip\z@\relax
- \vrule width-#1 height\z@ depth\z@
- \kern#1\relax
-}
-\def\XKH@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
+\hangingpunctuations
\endinput
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty
index bcdc1aaaf89..a47253af95a 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty
@@ -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@0\count\countdef\insc@unt\@tempcnta\fi
-\unless\ifcsname @tempcntb\endcsname
- \alloc@0\count\countdef\insc@unt\@tempcntb\fi
-
-%%% user commands
-\protected\def\jong {\global\let\XK@last@char=0}
-\protected\def\rieul{\global\let\XK@last@char=1}
-\protected\def\jung {\global\let\XK@last@char=2}
-
-
-\newcount\@josa
-\def\@jong {\global\@josa\z@ }
-\def\@rieul{\global\@josa\@ne}
-\def\@jung {\global\@josa\tw@}
-\@jung
-
-\begingroup
-\catcode`\A=11
-\catcode`\0=12
-\global\let\dhucs@cat@eleven=A
-\global\let\dhucs@cat@twelve=0
-\endgroup
-
-\expandafter\def\expandafter\strip@characternum@meaning@prefix\detokenize
- {the character} #1#2\end{\number`#1\relax}
-\expandafter\def\expandafter\strip@letternum@meaning@prefix\detokenize
- {the letter} #1#2\end{\number`#1\relax}
-
-\def\@josa@char@to@number#1#2{%
- \ifcat#1\dhucs@cat@eleven
- \expandafter\expandafter\expandafter#2\expandafter
- \strip@letternum@meaning@prefix\meaning#1\end
- \else\ifcat#1\dhucs@cat@twelve
- \expandafter\expandafter\expandafter#2\expandafter
- \strip@characternum@meaning@prefix\meaning#1\end
- \else
- #2\z@
- \fi\fi
-}
-
-\def\josa@char@to@number{%
- \XeTeXinterchartokenstate\z@
- \@josa@char@to@number\XK@last@char\count@
- \@josa@char@to@number\XK@lastlast@char\@tempcnta
- \@josa@char@to@number\XK@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@last@char@latin{%
- \ifnum 49=\count@ \@rieul\else % 1
- \ifnum 51=\count@ \@jong \else % 3
- \ifnum 54=\count@ \@jong \else % 6
- \ifnum 55=\count@ \@rieul\else % 7
- \ifnum 56=\count@ \@rieul\else % 8
- \ifnum 48=\count@ \@jong \else % 0
- \ifnum 108=\count@ \@rieul\else % l
- \ifnum 109=\count@ \@jong \else % m
- \ifnum 110=\count@ \@jong \else % n
- \ifnum 76=\count@ \@rieul\else % L
- \ifnum 77=\count@ \@jong \else % M
- \ifnum 78=\count@ \@jong \else % N
- \@jung
- \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@hanja@hangul#1{%
- \begingroup
- \count@=\z@
- \openin1=#1\relax \josa@hanja \closein1
- \endgroup
-}
-\def\josa@hanja{%
- \read1 to \@tempa
- \ifnum\count@=\@josa
- \global\@josa\@tempa \let\next\relax
- \else
- \advance\count@\@ne \let\next\josa@hanja
- \fi
- \next
-}
-
-\def\num@josa#1{%
- \bgroup
- \count@#1%
- \ifnum\count@<\z@ \count@-\count@ \fi
- \count\tw@\count@
- \divide\count\tw@ 10
- \multiply\count\tw@ 10
- \advance\count@-\count\tw@
- \ifcase\count@\@jong\or\@rieul\or\@jung\or\@jong\or\@jung\or
- \@jung\or\@jong\or\@rieul\or\@rieul\or\@jung\fi
- \egroup
-}
-
-\def\josa@last@char@cjk{%
- \ifnum\@josa>19967 \ifnum\@josa<40870 % cjk unified ideographs
- \advance\@josa-19968 % "4E00
- \josa@hanja@hangul{hanja_hangul.tab}\fi\fi
- \ifnum\@josa>13311 \ifnum\@josa<19894 % cjk unified ideographs ext. A
- \advance\@josa-13312 % "3400
- \josa@hanja@hangul{hanjaexa_hangul.tab}\fi\fi
- \ifnum\@josa>63743 \ifnum\@josa<64046 % cjk compatibility ideographs
- \advance\@josa-63744 % "F900
- \josa@hanja@hangul{hanjacom_hangul.tab}\fi\fi
- \ifnum\@josa>44031 \ifnum\@josa<55204 % hangul syllables
- \advance\@josa-44032 % "AC00
- \count@=\@josa \divide\count@28 \multiply\count@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@ne \num@josa{\@josa}\fi\fi
- \ifnum\@josa>9423 \ifnum\@josa<9450 \advance\@josa-26 \fi\fi
- \ifnum\@josa>9397 \ifnum\@josa<9424 \advance\@josa-26 \fi\fi
- \ifnum\@josa>9371 \ifnum\@josa<9398 % ⓐ or ⒜
- \ifnum\@josa=9383 \@rieul\else % l
- \ifnum\@josa=9384 \@jong\else % m
- \ifnum\@josa=9385 \@jong\else % n
- \@jung\fi\fi\fi \fi\fi
- \ifnum\@josa>8543 \ifnum\@josa<8556 % ⅰ ⅱ ⅲ
- \advance\@josa-3 \num@josa{\@josa}\fi\fi
- \ifnum\@josa>8559 \ifnum\@josa<8572 % Ⅰ Ⅱ Ⅲ
- \advance\@josa\@ne \num@josa{\@josa}\fi\fi
-}
-
-\protected\def\makejosa#1#2{%
- \josa@char@to@number
- \ifnum\count@<\@cclvi
- \ifnum\lastskip>\z@\else\XKcjklatinsmallbreak\fi % probably last char is latin ㅠㅠ
- \josa@last@char@latin
- \else
- \@josa\count@
- \josa@last@char@cjk
- \fi
- \ifcase\@josa #2% jong
- \or \ifx\@empty#1\@empty \else#2\fi% rieul
- \else #1% jung
- \fi
-}
-
-\def\가{\makejosa{가}{이}}
-\def\이{\futurelet\dhucs@next\makejosa@I}
-\def\은{\makejosa{는}{은}}
-\def\는{\makejosa{는}{은}}
-\def\을{\makejosa{를}{을}}
-\def\를{\makejosa{를}{을}}
-\def\와{\makejosa{와}{과}}
-\def\과{\makejosa{와}{과}}
-\def\으{\makejosa{}{으}}
-\def\로{\makejosa{}{으}로}
-\def\라{\makejosa{라}{이라}}
-\def\makejosa@I{%
- \ifcat\dhucs@next\dhucs@cat@twelve
- \expandafter\expandafter\expandafter\count@\expandafter
- \strip@characternum@meaning@prefix\meaning\dhucs@next\end
- \ifnum 0\ifnum\count@>"ABFF \ifnum\count@<"D7A4 1\fi\fi>\z@
- \makejosa\relax{이}%
- \else
- \makejosa{가}{이}%
- \fi
- \else
- \makejosa{가}{이}%
- \fi
-}
-
\endinput
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty
index 61e27c81335..73a0e37e368 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty
@@ -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@assign@char@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
-\else
- \chardef\XeTeXcharclassIgnore=4096
- \chardef\XKboundary=4095
-\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@assign@char@class{"31F0}{"31FF}\XKsmallkana
-\XK@assign@char@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@assign@char@class{"2160}{"216B}\XKcjksymbol % Ⅰ .. Ⅻ
-\XK@assign@char@class{"2170}{"217B}\XKcjksymbol % ⅰ .. ⅻ
-%% math symbols (?)
-\XK@assign@char@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@assign@char@class{"2460}{"24EA}\XKcjksymbol % ① .. ⓪
-\XeTeXcharclass "2500 = \XKcjksymbol % ─
-\XeTeXcharclass "2501 = \XKcjksymbol % ━
-\XeTeXcharclass "2502 = \XKcjksymbol % │
-\XeTeXcharclass "2503 = \XKcjksymbol % ┃
-\XK@assign@char@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@assign@char@class{"AC00}{"D7A3}\XKhangulsyllable
-% treat compatibility jamo as hangul syllable
-\XK@assign@char@class{"3131}{"318E}\XKhangulsyllable
-% leading consonants jamo as well
-\XK@assign@char@class{"1100}{"115F}\XKhangulsyllable
-\XK@assign@char@class{"A960}{"A97C}\XKhangulsyllable
-
-%%% jungseong/jongseong jamo including tone marks
-\newXeTeXintercharclass \XKhanguljungjong
-\XK@assign@char@class{"1160}{"11FF}\XKhanguljungjong
-\XK@assign@char@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@assign@char@class{`0}{`9}\XKlatinnumber
-
-%%% variation selectors
-\newXeTeXintercharclass \XKhanjacombining
-\XK@assign@char@class{"FE00}{"FE0F}\XKhanjacombining
-\XK@assign@char@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@latinfont\fi}
-\def\XKhangulfont
- {\ifcase\XKcurrentfont\XK@storeprevfont\XK@hangulfont\or\or\XK@hangulfont\fi}
-\def\XKhanjafont
- {\ifcase\XKcurrentfont\XK@storeprevfont\XK@hanjafont\or\XK@hanjafont\fi}
-\def\XK@latinfont {\chardef\XKcurrentfont\z@\XKprevfont}
-\def\XK@hangulfont{\chardef\XKcurrentfont\@ne\hangfnt}
-\def\XK@hanjafont {\chardef\XKcurrentfont\tw@\hanifnt}
-\def\XK@storeprevfont{\edef\XKprevfont{\the\font}}
-\let\XKstoreprevfont\XKlatinfont
-\chardef\XKcurrentfont\z@ \XK@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@make@quotebox\z@
- \ifx\empty\xetexkoquotewidth
- \ifx\empty\xetexkoquoteraise \else
- \chardef\XK@make@quotebox\tw@
- \fi
- \else
- \chardef\XK@make@quotebox\@ne
- \fi
- \ifnum\XK@make@quotebox>\z@
- \leavevmode
- \ifnum\XK@make@quotebox=\tw@ \raise\xetexkoquoteraise \fi
- \hbox
- \ifnum\XK@make@quotebox=\@ne to\xetexkoquotewidth \fi
- \bgroup\hss
- \fi
-}
-\def\XKopeningquotestop{%
- \ifnum\XK@make@quotebox>\z@
- \egroup\nobreak\hskip\z@
- \fi
-}
-\def\XKclosingquotestart{%
- \chardef\XK@make@quotebox\z@
- \ifx\empty\xetexkoquotewidth
- \ifx\empty\xetexkoquoteraise \else
- \chardef\XK@make@quotebox\tw@
- \fi
- \else
- \chardef\XK@make@quotebox\@ne
- \fi
- \ifnum\XK@make@quotebox>\z@
- \leavevmode\nobreak\hskip\z@
- \ifnum\XK@make@quotebox=\tw@ \raise\xetexkoquoteraise \fi
- \hbox
- \ifnum\XK@make@quotebox=\@ne to\xetexkoquotewidth \fi
- \bgroup
- \fi
-}
-\def\XKclosingquotestop{%
- \ifnum\XK@make@quotebox>\z@
- \hss\egroup
- \fi
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% . , ? !
-\def\XKwaslatinchar{\chardef\XK@after@cjk@punct\z@}
-\def\XKwascjkchar {\chardef\XK@after@cjk@punct\@ne}
-\XKwaslatinchar
-\chardef\XK@inpunctuationbox\z@
-
-\def\XKperiodboxstart{% .
- \ifnum\XK@after@cjk@punct>\z@
- \ifx\empty\xetexkolowerperiod
- \else
- \leavevmode\lower\xetexkolowerperiod\hbox\bgroup
- \chardef\XK@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@inpunctuationbox=\@ne
- \global\count@\spacefactor\egroup\spacefactor\count@
- \fi
-}
-
-\def\XKquestionboxstart{% ?
- \ifnum\XK@after@cjk@punct>\z@
- \ifx\empty\xetexkolowerquestion
- \else
- \leavevmode\lower\xetexkolowerquestion\hbox\bgroup
- \chardef\XK@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@inpunctuationbox=\@ne
- \global\count@\spacefactor\egroup\spacefactor\count@
- \fi
-}
-
-\def\XKexclamationboxstart{% !
- \ifnum\XK@after@cjk@punct>\z@
- \ifx\empty\xetexkolowerexclamation
- \else
- \leavevmode\lower\xetexkolowerexclamation\hbox\bgroup
- \chardef\XK@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@inpunctuationbox=\@ne
- \global\count@\spacefactor\egroup\spacefactor\count@
- \fi
-}
-
-\def\XKcommaboxstart{% ,
- \ifnum\XK@after@cjk@punct>\z@
- \ifx\empty\xetexkolowercomma
- \else
- \leavevmode\lower\xetexkolowercomma\hbox\bgroup
- \chardef\XK@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@inpunctuationbox=\@ne
- \global\count@\spacefactor\egroup\spacefactor\count@
- \fi
-}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%% cjk openings and closings
-%%% considering bounding box
-\def\XK@side@bearing#1#2{% 1: char index; 2: left=1 or right=3 -> dimen@
- \ifdim\XeTeXglyphbounds#2\XeTeXcharglyph#1>.5em
- \dimen@.5em
- \else
- \dimen@\fontcharwd\font\count@
- \fi
-}
-\def\precjkopenparen{\futurelet\@let@token\precjkopenparen@}
-\def\precjkopenparen@{%
- \@josa@char@to@number\@let@token\count@
- \XK@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@token\precjkcloseparen@}
-\def\precjkcloseparen@{%
- \@josa@char@to@number\@let@token\count@
- \XK@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@token\precjkfullstop@}
-\def\precjkfullstop@{%
- \@josa@char@to@number\@let@token\count@
- \XK@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@every@hanja##1{#1}%
- \let\XKcjkcharboxstart\empty
- \let\XKcjkcharboxstop\empty % conflict w. everyhanja
-}
-\def\XK@every@hanja#1{#1}
-\def\everyhangul#1{%
- \def\XK@every@hangul##1{#1}%
- \let\XKcjkcharboxstart\empty
- \let\XKcjkcharboxstop\empty % conflict w. everyhangul
-}
-\def\XK@every@hangul#1{#1}
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% for autojosa, get last chars
-\let\XK@last@char=0
-\let\XK@lastlast@char\XK@last@char
-\let\XK@lastlastlast@char\XK@lastlast@char
-
-\def\XKlastchar{\futurelet\@let@token\XK@save@last@char}
-\def\XK@save@last@char{%
- \global\let\XK@lastlastlast@char\XK@lastlast@char
- \global\let\XK@lastlast@char \XK@last@char
- \global\let\XK@last@char \@let@token
-}
-
-\def\XK@fallback@hanja@font@family#1{%
- \chardef\XK@use@fallback@font\z@
- \iffontchar\font`#1\else
- \ifdefined\fallbackhanjafont
- \chardef\XK@use@fallback@font\@ne
- \expandafter\let\expandafter\XK@fallback@plain@font@temp\the\font
- \let\XK@fallback@latex@family@temp\f@family % redundant for plain
- \fallbackhanjafont
- \fi
- \fi
-}
-
-\def\XKhanjalastchar#1{%
- \let\@let@token#1\XK@save@last@char
- % fallbackhanjafont for, say, HanaMinB
- \XK@fallback@hanja@font@family{#1}%
- \XK@every@hanja{#1}% everyhanja
- \ifcase\XK@use@fallback@font\else
- \XK@fallback@plain@font@temp
- \let\f@family\XK@fallback@latex@family@temp
- \fi
-}
-
-\newtoks\XK@toks@
-
-\def\XKcjklastchar#1{%
- \let\@let@token#1\XK@save@last@char
- % and supress char orphan
- \XK@toks@{\XK@every@hangul{#1}}% everyhangul 가
- \ifnum\lastpenalty=\z@ % bypass 가\\나 case
- \expandafter\XK@futurelet@let@token
- \else
- \expandafter\XK@normal@the@toks@
- \fi
-}
-\def\XK@check@next@char{%
- \ifx\par\@let@token
- \let\next\XK@nobreak@the@toks@
- \else\ifx\@sptoken\@let@token
- \XK@toks@\expandafter{\the\XK@toks@\@sptoken}%
- \let\next\XK@afterassign@let@token
- \else\ifx.\@let@token
- \XK@toks@\expandafter{\the\XK@toks@ .}%
- \let\next\XK@afterassign@let@token
- \else\ifx^^^^3002\@let@token
- \XK@toks@\expandafter{\the\XK@toks@^^^^3002}%
- \let\next\XK@afterassign@let@token
- \else\ifx^^^^ff0e\@let@token
- \XK@toks@\expandafter{\the\XK@toks@^^^^ff0e}%
- \let\next\XK@afterassign@let@token
- \else
- \let\next\XK@normal@the@toks@
- \fi\fi\fi\fi\fi
- \next
-}
-\def\XK@afterassign@let@token{\afterassignment\XK@futurelet@let@token\let\@let@token= }
-\def\XK@futurelet@let@token{\futurelet\@let@token\XK@check@next@char}
-\def\XK@normal@the@toks@{\the\XK@toks@}
-\def\XK@nobreak@the@toks@{\XK@nobreak\the\XK@toks@}
-\def\XK@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@save@last@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@token##1\XK@save@last@char\XK@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@japanese{\cjtypesettrue
- %% killing spaces after cjk chars
- \def\XKignorespaces{\futurelet\XK@let@token\XK@ignorespaces}%
- \def\XK@ignorespaces{\ifx\XK@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@japanese\parindent1em }
-\protected\def\Tchinese{\XK@japanese\parindent2em }
-\protected\def\Schinese{\XK@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@hook\expandafter{\the\UL@hook
- \let\XK@nobreak\relax
- \ifdefined\XK@UL@@@hangulfont\else
- \let\XK@UL@@@hangulfont\XKhangulfont
- \let\XK@UL@@@hanjafont \XKhanjafont
- \def\XKhangulfont{\XK@UL@@@hangulfont
- \aftergroup\aftergroup\aftergroup\XK@UL@@@hangulfont
- }%
- \def\XKhanjafont{\XK@UL@@@hanjafont
- \aftergroup\aftergroup\aftergroup\XK@UL@@@hanjafont
- }%
- \fi
- }%
-}
-
-%%%%%%%%%%
-%% dotemph
-\def\dotemphraise{0.4em }
-\ifcsname bfseries\endcsname
- \def\dotemphchar{\bfseries ^^^^02d9}
+\ifdefined\ProvidesPackage
+ \ProvidesPackage{xetexko-space}[2021/03/20 v3.0 A deprecated addendum to XeTeX-ko]
+ \RequirePackage{xetexko}[2021/03/20]
\else
- \def\dotemphchar{\bf \char95 }
+ \input xetexko.sty
\fi
-\newbox\XKdotemphbox
-
-\protected\def\dotemph#1{%
- \leavevmode
- \begingroup
- \def\XKcjklastchar{\futurelet\@let@token\XK@dotemph@last@char}%
- \let\XKhanjalastchar\XKcjklastchar
- \let\XKcjkcharboxstart\relax
- \let\XKcjkcharboxstop\relax
- \setbox\XKdotemphbox\hbox{\dotemphchar}%
- #1\relax
- \endgroup
-}
-
-\def\XK@dotemph@last@char{\XK@save@last@char\dot@@@emph}
-
-\def\dot@@@emph#1{%
- \setbox\z@\hbox{\XK@fallback@hanja@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
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty
index 801a238b101..3f40bd697fb 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty
@@ -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@rotatebox\z@\box\z@}%
- \maxdepth\z@ \XK@vertical@spacing}
-\else % latex
- \protected\def\verticaltypesetting{%
- \AtBeginDocument{\XK@vertical@spacing}%
- \maxdepth\z@
- \dimen@\textwidth
- \textwidth\textheight
- \textheight\dimen@
- \edef\@outputpage{%
- \unexpanded{\xetexko@rotatebox\@outputbox\textwidth\textheight}%
- \unexpanded\expandafter{\@outputpage}}%
- }
- \@onlypreamble\verticaltypesetting
-\fi
-
-\def\xetexko@rotatebox#1{%
- \ifvbox#1\count@\@ne\else\count@\z@\fi
- \dimen@\wd#1\dimen@ii\dimexpr\ht#1+\dp#1\relax
- \setbox#1\ifnum\count@=\@ne
- \vbox to\dimen@\bgroup\hbox to\dimen@ii\bgroup\hfil\else
- \hbox to\dimen@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@vertical@spacing{%
- \ifnum\verticalem > \z@
- \def\XK@vert@half@em{.5\verticalem}%
- \else
- \def\XK@vert@half@em{.5em}%
- \fi
- \let\xk@horiz@precjkopenparen \precjkopenparen
- \let\xk@horiz@precjkcloseparen\precjkcloseparen
- \let\xk@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@vert@half@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@vert@half@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@vert@half@em
- \fi
- \bgroup}%
- \fi
- \spaceskip\XK@vert@half@em plus\XK@vert@half@em\relax
- \parindent\XK@vert@half@em \parindent2\parindent
-}
-
-\protected\def\vertical#1{%
- \setbox\z@\vbox\bgroup
- \hsize=#1%
- \leftskip\z@
- \rightskip\z@
- \parindent\z@
- \everypar{}%
- \XK@vertical@spacing
-}
-
-\protected\def\endvertical{%
- \egroup
- \dimen@\dimexpr\ht\z@+\dp\z@\relax
- \dimen@ii\dimexpr\wd\z@-\dp\z@\relax
- \setbox\z@\hbox{%
- \kern\dimexpr\ht\z@+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@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@horiz@precjkopenparen
- \let\precjkopenparen \xk@horiz@precjkopenparen
- \let\precjkcloseparen\xk@horiz@precjkcloseparen
- \let\precjkfullstop \xk@horiz@precjkfullstop
- \fi
-}
-\protected\def\endhorizontal{%
- \egroup
- \dimen@\dimexpr\ht\z@+\dp\z@\relax
- \dimen@ii\dimexpr\wd\z@+.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@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}
-
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
index a958782e0e8..6d7403617e0 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
@@ -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
- }
- \setmathhangulblock{AC00}{D7A3}
- %\setmathhangulfont{[UnBatang]}
-
- \catcode`\@\catcodeofATcharacter
- \expandafter\endinput
+\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@halfzero {\hskip 2\XeKo@halfdim \relax}
+\def\XeKo@halfhalf {\hskip 2\XeKo@halfdim minus 2\XeKo@halfdim \relax}
+\def\XeKo@halfquarter {\hskip 2\XeKo@halfdim minus \XeKo@halfdim \relax}
+\def\XeKo@quarterquarter {\hskip \XeKo@halfdim minus \XeKo@halfdim \relax}
+\def\XeKo@iiiquarterquarter{\hskip 3\XeKo@halfdim minus \XeKo@halfdim \relax}
+\let\XeKo@nobreak\nobreak
+
+\def\XKinterhangulbreak{% compat
+ \ifnum\XeKo@typesetclassic=\z@
+ \penalty\XeTeXlinebreakpenalty
+ \fi
+ \hskip
+ \ifdefined\xetexkointerhchar \xetexkointerhchar \else \z@ \fi
+ \XeKo@stretchshrink
+ }
+\def\XKinterhanjabreak{% compat
+ \ifnum\XeKo@typesetclassic=\z@
+ \penalty\XeTeXlinebreakpenalty
+ \fi
+ \hskip\z@ \XeKo@stretchshrink
+ }
+
+\def\XeKo@latincjk@classic{%
+ \hskip
+ \ifdefined\xetexkohu
+ \xetexkohu plus .5\dimexpr\xetexkohu\relax minus.25\dimexpr\xetexkohu\relax
+ \else
+ \XeKo@halfdim plus .5\XeKo@halfdim minus.25\XeKo@halfdim
+ \fi
+ }
+\def\XeKo@latincjk@modern{%
+ \hskip \ifdefined\xetexkohu \xetexkohu \else \XeKo@halfdim \fi
+ \XeKo@stretchshrink
+ }
+\def\XeKo@postmath@modern{%
+ \hskip 2\ifdefined\xetexkohu \dimexpr\xetexkohu\relax \else \XeKo@halfdim \fi
+ \XeKo@stretchshrink
+ }
+
+% 고아글자 억제. verbatim 에서는 이 명령을 꺼야 한다
+\def\XeKo@suppress@char@orphan{%
+ \XeKo@skip@=\lastskip \unskip
+ \XeKo@count@=\lastpenalty \unpenalty
+ \ifnum\XeKo@count@<5000 \XeKo@count@=5000 \fi
+ \penalty\XeKo@count@
+ \hskip\XeKo@skip@
+ }
+
+\protected\def\inhibitglue{\hskip\z@\XeKo@stretchshrink}
+
+% typesetting modes
+\protected\def\typesetclassic{%
+ \chardef\XeKo@typesetclassic\@ne
+ \def\XeKo@halfdim{\dimexpr.25em\relax}%
+ \def\XeKo@stretchshrink{plus.08em minus.04em}%
+ \let\XeKo@latincjk\XeKo@latincjk@classic
+ \let\XeKo@postmath\XeKo@latincjk@classic
+ \XeTeXlinebreakpenalty=\z@
+ \XeTeXlinebreakskip=\z@ \XeKo@stretchshrink
+ \parindent=1em
+ }
+\protected\def\typesetmodern{%
+ \chardef\XeKo@typesetclassic\z@
+ \def\XeKo@halfdim{\dimexpr.05em\relax}%
+ \def\XeKo@stretchshrink{plus.04em minus.02em}%
+ \let\XeKo@latincjk\XeKo@latincjk@modern
+ \let\XeKo@postmath\XeKo@postmath@modern
+ \XeTeXlinebreakpenalty=50
+ \XeTeXlinebreakskip=\z@ \XeKo@stretchshrink
+ }
+\typesetmodern
+
+\let\japanese\typesetclassic
+\protected\def\Tchinese{\typesetclassic\parindent=2em }
+\protected\def\Schinese{\typesetclassic\parindent=2em
+ \chardef\XeKo@typesetSchinese\@ne
+ \ifnum\XeKo@typesetvertical=\@ne
+ \XeKo@Schinese@vertical
+ \else
+ \XeKo@Schinese@horizontal
+ \fi
+ }
+\let\chinese\Schinese
+\def\XeKo@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@Schinese@vertical{%
+ \XeTeXcharclass "FF01 = \XeTeXcharclassEX % !
+ \XeTeXcharclass "FF1A = \XeTeXcharclassVC % :
+ \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ;
+ \XeTeXcharclass "FF1F = \XeTeXcharclassEX % ?
+ }
+
+\chardef\XeKo@typesetvertical\z@
+\chardef\XeKo@typesetSchinese\z@
+
+\protected\def\typesetvertical{%
+ \chardef\XeKo@typesetvertical\@ne
+ \XeTeXcharclass "FF1A = \XeTeXcharclassVC % :
+ \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ;
+ \ifnum\XeKo@typesetSchinese=\@ne \XeKo@Schinese@vertical \fi
+ \parindent=1em
+ }
+\protected\def\typesethorizontal{%
+ \chardef\XeKo@typesetvertical\z@
+ \XeTeXcharclass "FF1A = \XeTeXcharclassMD % :
+ \XeTeXcharclass "FF1B = \XeTeXcharclassMD % ;
+ \ifnum\XeKo@typesetSchinese=\@ne \XeKo@Schinese@horizontal \fi
+ \parindent\z@
+ }
+\protected\def\vertical#1{%
+ \leavevmode
+ \setbox\z@\vbox\bgroup
+ \hsize#1\relax
+ \typesetvertical
+ }
+\protected\def\endvertical{%
+ \egroup
+ \XeKo@rotatebox\z@
+ \box\z@
+ }
+\protected\def\horizontal#1{%
+ \leavevmode
+ \setbox\z@\vbox\bgroup
+ \hsize#1\relax
+ \typesethorizontal
+ }
+\protected\def\endhorizontal{%
+ \egroup
+ \XeKo@unrotatebox\z@
+ \lower.5\ht\z@ \box\z@
+ }
+\def\XeKo@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@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@xetexko.sty\endcsname
+ \def\verticaltypesetting{%
+ \maxdepth\z@ \typesetvertical
+ \dimen@\textwidth \textwidth\textheight \textheight\dimen@
+ \edef\@outputpage{\unexpanded{\XeKo@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@rotatebox\z@\box\z@}%
+ \maxdepth\z@ \typesetvertical }
+\fi
+
+\protected\def\vertlatin#1{\leavevmode\lower.5ex\hbox{\latinmarks #1}} % compat
+
+% fonts
+\newtoks\XeKo@font@options
+\XeKo@font@options{}
+
+\def\XeKo@reset@options{%
+ \let\xetexkohu \XeKo@undefined
+ \let\xetexkocharraise \XeKo@undefined
+ \let\xetexkointerhchar\XeKo@undefined
+ }
+
+\def\XeKo@font@Hangul{%
+ \ifdefined\XeKo@hangul@font
+ \edef\XeKo@curr{\the\font\the\XeKo@font@options}%
+ \ifx\XeKo@curr\XeKo@hangul@font\else
+ \ifx\XeKo@curr\XeKo@hanja@font\else
+ \edef\XeKo@curr@latin{\the\font}%
+ \fi
+ \XeKo@reset@options
+ \XeKo@hangul@font
+ \XeKo@font@options\expandafter{\xetexkohanguloption}%
+ \fi
+ \fi
+ }
+\def\XeKo@font@CJK{%
+ \ifdefined\XeKo@hanja@font
+ \edef\XeKo@curr{\the\font\the\XeKo@font@options}%
+ \ifx\XeKo@curr\XeKo@hanja@font\else
+ \ifx\XeKo@curr\XeKo@hangul@font\else
+ \edef\XeKo@curr@latin{\the\font}%
+ \fi
+ \XeKo@reset@options
+ \XeKo@hanja@font
+ \XeKo@font@options\expandafter{\xetexkohanjaoption}%
+ \fi
+ \fi
+ }
+\def\XeKo@font@Latin{%
+ \ifdefined\XeKo@curr@latin
+ \edef\XeKo@curr{\the\font\the\XeKo@font@options}%
+ \ifx\XeKo@curr\XeKo@hangul@font
+ \XeKo@curr@latin
+ \else
+ \ifx\XeKo@curr\XeKo@hanja@font
+ \XeKo@curr@latin
+ \fi
+ \fi
+ \fi
+ }
+\let\XeKo@fontHG\XeKo@font@Hangul
+\let\XeKo@fontID\XeKo@font@CJK
+\let\XeKo@fontCJ\XeKo@font@CJK
+\let\XeKo@fontSY\XeKo@font@Hangul
+\let\XeKo@fontAA\XeKo@font@Latin
+\let\XeKo@fontAO\XeKo@font@Hangul
+\let\XeKo@fontAC\XeKo@font@Hangul
+\let\XeKo@fontAP\relax % prevfont
+\let\XeKo@fontAM\relax % prevfont
+\let\XeKo@fontAH\XeKo@font@Latin
+\let\XeKo@fontOP\XeKo@font@Hangul
+\let\XeKo@fontCL\XeKo@font@Hangul
+\let\XeKo@fontMD\XeKo@font@Hangul
+\let\XeKo@fontFS\XeKo@font@Hangul
+\let\XeKo@fontEX\XeKo@font@Hangul
+\let\XeKo@fontLD\XeKo@font@Hangul
+\let\XeKo@fontVC\XeKo@font@Hangul
+
+\protected\def\latinalphs {\let\XeKo@fontAA\XeKo@font@Latin}
+\protected\def\latinparens {\let\XeKo@fontAO\XeKo@font@Latin\let\XeKo@fontAC\XeKo@font@Latin}
+\protected\def\latinpuncts {\let\XeKo@fontAP\XeKo@font@Latin}
+\protected\def\latincolons {\let\XeKo@fontAM\XeKo@font@Latin}
+\protected\def\latinhyphens{\let\XeKo@fontAH\XeKo@font@Latin}
+\protected\def\latincjksymbols{%
+ \let\XeKo@fontSY\XeKo@font@Latin
+ \let\XeKo@fontOP\XeKo@font@Latin
+ \let\XeKo@fontCL\XeKo@font@Latin
+ \let\XeKo@fontMD\XeKo@font@Latin
+ \let\XeKo@fontFS\XeKo@font@Latin
+ \let\XeKo@fontEX\XeKo@font@Latin
+ \let\XeKo@fontLD\XeKo@font@Latin
+ \let\XeKo@fontVC\XeKo@font@Latin
+ }
+\protected\def\latinmarks{%
+ \latinalphs\latinparens\latinpuncts\latincolons\latinhyphens\latincjksymbols
+ }
+\let\latinnums\latinalphs
+\let\latinquotes\latinparens
+
+\protected\def\hangulalphs {\let\XeKo@fontAA\XeKo@font@Hangul}
+\protected\def\hangulparens {\let\XeKo@fontAO\XeKo@font@Hangul\let\XeKo@fontAC\XeKo@font@Hangul}
+\protected\def\hangulpuncts {\let\XeKo@fontAP\XeKo@font@Hangul}
+\protected\def\hangulcolons {\let\XeKo@fontAM\XeKo@font@Hangul}
+\protected\def\hangulhyphens{\let\XeKo@fontAH\XeKo@font@Hangul}
+\protected\def\hangulcjksymbols{%
+ \let\XeKo@fontSY\XeKo@font@Hangul
+ \let\XeKo@fontOP\XeKo@font@Hangul
+ \let\XeKo@fontCL\XeKo@font@Hangul
+ \let\XeKo@fontMD\XeKo@font@Hangul
+ \let\XeKo@fontFS\XeKo@font@Hangul
+ \let\XeKo@fontEX\XeKo@font@Hangul
+ \let\XeKo@fontLD\XeKo@font@Hangul
+ \let\XeKo@fontVC\XeKo@font@Hangul
+ }
+\protected\def\hangulmarks{%
+ \hangulalphs\hangulparens\hangulpuncts\hangulcolons\hangulhyphens\hangulcjksymbols
+ }
+\let\hangulnums\hangulalphs
+\let\hangulquotes\hangulparens
+
+\protected\def\hanjaalphs {\let\XeKo@fontAA\XeKo@font@CJK}
+\protected\def\hanjaparens {\let\XeKo@fontAO\XeKo@font@CJK\let\XeKo@fontAC\XeKo@font@CJK}
+\protected\def\hanjapuncts {\let\XeKo@fontAP\XeKo@font@CJK}
+\protected\def\hanjacolons {\let\XeKo@fontAM\XeKo@font@CJK}
+\protected\def\hanjahyphens{\let\XeKo@fontAH\XeKo@font@CJK}
+\protected\def\hanjacjksymbols{%
+ \let\XeKo@fontSY\XeKo@font@Hanja
+ \let\XeKo@fontOP\XeKo@font@Hanja
+ \let\XeKo@fontCL\XeKo@font@Hanja
+ \let\XeKo@fontMD\XeKo@font@Hanja
+ \let\XeKo@fontFS\XeKo@font@Hanja
+ \let\XeKo@fontEX\XeKo@font@Hanja
+ \let\XeKo@fontLD\XeKo@font@Hanja
+ \let\XeKo@fontVC\XeKo@font@Hanja
+ }
+\protected\def\hanjamarks{%
+ \hanjaalphs\hanjaparens\hanjapuncts\hanjacolons\hanjahyphens\hanjacjksymbols
+ }
+\let\hanjanums\hanjaalphs
+\let\hanjaquotes\hanjaparens
+
+\protected\def\prevfontalphs {\let\XeKo@fontAA\relax}
+\protected\def\prevfontparens {\let\XeKo@fontAO\relax\let\XeKo@fontAC\relax}
+\protected\def\prevfontpuncts {\let\XeKo@fontAP\relax}
+\protected\def\prevfontcolons {\let\XeKo@fontAM\relax}
+\protected\def\prevfonthyphens{\let\XeKo@fontAH\relax}
+\protected\def\prevfontcjksymbols{%
+ \let\XeKo@fontSY\relax
+ \let\XeKo@fontOP\relax
+ \let\XeKo@fontCL\relax
+ \let\XeKo@fontMD\relax
+ \let\XeKo@fontFS\relax
+ \let\XeKo@fontEX\relax
+ \let\XeKo@fontLD\relax
+ \let\XeKo@fontVC\relax
+ }
+\protected\def\prevfontmarks{%
+ \prevfontalphs\prevfontparens\prevfontpuncts\prevfontcolons\prevfonthyphens\prevfontcjksymbols
+ }
+\let\prevfontnums\prevfontalphs
+\let\prevfontquotes\prevfontparens
+
+% interchartoks
+\chardef\XeKo@cjk@ignorespaces\z@
+\protected\def\removeclassicspaces{\chardef\XeKo@cjk@ignorespaces\@ne}
+
+\expandafter\let\csname XeKo@1@class\endcsname =\XeTeXcharclassHG
+\expandafter\let\csname XeKo@2@class\endcsname =\XeTeXcharclassID
+\expandafter\let\csname XeKo@3@class\endcsname =\XeTeXcharclassSY
+\expandafter\let\csname XeKo@4@class\endcsname =\XeTeXcharclassAA
+\expandafter\let\csname XeKo@5@class\endcsname =\XeTeXcharclassAO
+\expandafter\let\csname XeKo@6@class\endcsname =\XeTeXcharclassAC
+\expandafter\let\csname XeKo@7@class\endcsname =\XeTeXcharclassAP
+\expandafter\let\csname XeKo@8@class\endcsname =\XeTeXcharclassAM
+\expandafter\let\csname XeKo@9@class\endcsname =\XeTeXcharclassAH
+\expandafter\let\csname XeKo@10@class\endcsname=\XeTeXcharclassOP
+\expandafter\let\csname XeKo@11@class\endcsname=\XeTeXcharclassCL
+\expandafter\let\csname XeKo@12@class\endcsname=\XeTeXcharclassMD
+\expandafter\let\csname XeKo@13@class\endcsname=\XeTeXcharclassFS
+\expandafter\let\csname XeKo@14@class\endcsname=\XeTeXcharclassEX
+\expandafter\let\csname XeKo@15@class\endcsname=\XeTeXcharclassLD
+\expandafter\let\csname XeKo@16@class\endcsname=\XeTeXcharclassVC
+
+\newtoks\XeKo@toks@
+\newtoks\XeKo@toks@ii
+\newskip\XeKo@skip@
+\newcount\XeKo@count@
+\newdimen\XeKo@dimen@
+
+\def\XeKo@check@next@tok{\futurelet\XeKo@let@token\XeKo@check@next@tok@}
+\def\XeKo@check@next@tok@{%
+ \XeKo@get@charslot
+ \ifnum\XeKo@charslot="FFFF
+ % 다음 한 줄이 없으면 한글과 한글 사이에 폰트가 변경되는 경우 글자 누락.
+ % 폰트 변경은 kern 에 아무 영향을 주지 않기 때문.
+ \def\XeKo@maybe@gobble{\def\XeKo@maybe@gobble{\expandafter\expandafter\expandafter\@gobble}}%
+ \expandafter\XeKo@flush@toks
+ \else
+ \ifnum\XeKo@currclass>\tw@
+ \expandafter\expandafter\expandafter\XeKo@check@next@tok@latin
+ \else % HG ID
+ \expandafter\expandafter\expandafter\XeKo@check@next@tok@cjk
+ \fi
+ \fi
+ }
+\def\XeKo@check@next@tok@cjk{%
+ \ifnum 0\ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassJJ 1\else
+ \ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassIgnore 1\fi\fi >\z@
+ \expandafter\XeKo@addto@toks
+ \else
+ \expandafter\XeKo@flush@toks
+ \fi
+ }
+\def\XeKo@check@next@tok@latin{%
+ \ifnum 0%
+ \ifnum\XeTeXcharclass\XeKo@charslot=\csname XeKo@\XeKo@currclass @class\endcsname 1\else
+ \ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassIgnore 1\fi\fi >\z@
+ \expandafter\XeKo@addto@toks
+ \else
+ \expandafter\XeKo@flush@toks
+ \fi
+ }
+\def\XeKo@addto@toks#1{%
+ \ifnum\XeKo@currclass=4 % AA
+ \global\let\XeKo@josatoken=#1\relax
+ \else\ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassJJ
+ \global\let\XeKo@josatoken=#1\relax
+ \else\ifnum\XeKo@currclass=\thr@@ % SY
+ \global\let\XeKo@josatoken=#1\relax
+ \fi\fi\fi
+ \XeKo@toks@\expandafter{\the\XeKo@toks@ #1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@flush@toks{%
+ \ifnum\XeKo@currclass<\thr@@
+ \XeKo@toks@ii{}\expandafter\XeKo@char@orphan % HG, ID
+ \else
+ \expandafter\XeKo@do@flush@toks
+ \fi
+ }
+\def\XeKo@char@orphan{%
+ \ifx\XeKo@let@token\par
+ \XeKo@suppress@char@orphan
+ \let\XeKo@next\XeKo@flush@char@orphan
+ \else \ifx\@sptoken\XeKo@let@token
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii \@sptoken}%
+ \let\XeKo@next\XeKo@char@orphan@
+ \else \ifx ^^2e\XeKo@let@token % .
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii ^^2e}%
+ \let\XeKo@next\XeKo@char@orphan@
+ \else \ifx ^^3f\XeKo@let@token % ?
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii ^^3f}%
+ \let\XeKo@next\XeKo@char@orphan@
+ \else \ifx ^^21\XeKo@let@token % !
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii ^^21}%
+ \let\XeKo@next\XeKo@char@orphan@
+ \else \ifx ^^^^3002\XeKo@let@token % 。
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii ^^^^3002}%
+ \let\XeKo@next\XeKo@char@orphan@
+ \else \ifx ^^^^ff0e\XeKo@let@token % .
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii ^^^^3002}%
+ \let\XeKo@next\XeKo@char@orphan@
+ \else
+ \let\XeKo@next\XeKo@flush@char@orphan
+ \fi\fi\fi\fi\fi \fi\fi
+ \XeKo@next
+ }
+\def\XeKo@char@orphan@{\afterassignment\XeKo@char@orphan@@\let\XeKo@let@token= }
+\def\XeKo@char@orphan@@{\futurelet\XeKo@let@token\XeKo@char@orphan}
+\def\XeKo@flush@char@orphan{\XeKo@do@flush@toks \the\XeKo@toks@ii }
+\def\XeKo@char@raise@start{%
+ \ifdefined\xetexkocharraise
+ \edef\XeKo@curr{\the\font\the\XeKo@font@options}%
+ \ifx\XeKo@curr\XeKo@hangul@font
+ \raise\xetexkocharraise\hbox\bgroup
+ \else
+ \ifx\XeKo@curr\XeKo@hanja@font
+ \raise\xetexkocharraise\hbox\bgroup
+ \fi
+ \fi
+ \fi
+ }
+\def\XeKo@char@raise@stop{%
+ \ifdefined\xetexkocharraise
+ \ifx\XeKo@curr\XeKo@hangul@font
+ \egroup
+ \else
+ \ifx\XeKo@curr\XeKo@hanja@font
+ \egroup
+ \fi
+ \fi
+ \fi
+ }
+\def\XeKo@do@flush@toks{%
+ \begingroup
+ \XeTeXinterchartokenstate\z@
+ \ifdefined\XeKo@pre@hang
+ \XeKo@pre@hang % hanging punctuations
+ \fi
+ \XeKo@char@raise@start % charraise
+ \ifnum\XeKo@currclass=\@ne
+ \XeKo@everyhangul{\the\XeKo@toks@}% everyhangul
+ \else
+ \ifnum\XeKo@currclass=\tw@
+ \XeKo@everyhanja{\the\XeKo@toks@}% everyhanja
+ \else
+ \the\XeKo@toks@
+ \fi
+ \fi
+ \XeKo@char@raise@stop % charraise
+ \ifdefined\XeKo@post@hang
+ \XeKo@post@hang % hanging punctuations
+ \fi
+ \endgroup
+ \XeKo@maybe@kern
+ }
+\def\XeKo@maybe@kern{%
+ \ifnum\XeKo@currclass<\thr@@ % \the\XeKo@toks@ii
+ \expandafter\expandafter\expandafter\XeKo@maybe@kern@i
+ \else
+ \expandafter\XeKo@maybe@kern@i
+ \fi
+ }
+\def\XeKo@maybe@kern@i{\futurelet\XeKo@let@token\XeKo@maybe@kern@ii }
+\def\XeKo@maybe@kern@ii{%
+ \ifx\XeKo@let@token\@sptoken
+ \ifnum\XeKo@cjk@ignorespaces=\@ne % try to remove space
+ \expandafter\expandafter\expandafter\XeKo@maybe@ignorespaces
+ \fi
+ \else
+ \XeKo@insert@kerns
+ \fi
+ }
+\def\XeKo@insert@kerns{%
+ \kern-\XeKo@currclass sp \kern \XeKo@currclass sp
+ }
+% remove space
+\def\XeKo@maybe@ignorespaces{%
+ \ifnum 0\ifnum\XeKo@currclass<4 1\else % HG ID SY
+ \ifnum\XeKo@currclass>9 1\fi\fi % CJK punctuations
+ >\z@
+ \expandafter\XeKo@ignorespaces@iv
+ \fi
+ }
+\def\XeKo@ignorespaces@iv{\afterassignment\XeKo@ignorespaces@v\let\XeKo@let@token= }
+\def\XeKo@ignorespaces@v{\futurelet\XeKo@let@token\XeKo@ignorespaces@vi}
+\def\XeKo@ignorespaces@vi{%
+ \XeKo@get@charslot
+ \XeKo@count@=\XeTeXcharclass\XeKo@charslot
+ \ifnum\XeKo@count@=\XeTeXcharclassAA \@sptoken \else
+ \ifnum\XeKo@count@=\XeTeXcharclassAO \@sptoken \else
+ \ifnum\XeKo@count@=\XeTeXcharclassAC \@sptoken \else
+ \ifnum\XeKo@count@=\XeTeXcharclassAP \@sptoken \else
+ \ifnum\XeKo@count@=\XeTeXcharclassAM \@sptoken \else
+ \ifnum\XeKo@count@=\XeTeXcharclassAH \@sptoken \else
+ \XeKo@insert@kerns
+ \fi\fi\fi\fi\fi \fi
+ }
+
+% hanging punctuations
+\chardef\XeKo@hangingpuncts\z@
+\protected\def\hangingpunctuation{\chardef\XeKo@hangingpuncts\@ne }
+\let\hangingpunctuations\hangingpunctuation
+
+% compress CJK punctuations to .5em
+\protected\def\compresspunctuations{\chardef\XeKo@compresspuncts\@ne }
+\protected\def\nocompresspunctuations{\chardef\XeKo@compresspuncts\z@ }
+\compresspunctuations
+
+%% everyhangul/hanja
+\def\everyhangul#1{\def\XeKo@everyhangul##1{#1}}
+\def\everyhanja #1{\def\XeKo@everyhanja ##1{#1}}
+\def\XeKo@everyhangul#1{#1}
+\def\XeKo@everyhanja #1{#1}
+
+\def\XeKo@startHG#1{%
+ \global\let\XeKo@josatoken=#1\relax
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{1}%
+ \XeKo@toks@{#1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startID#1{%
+ \global\let\XeKo@josatoken=#1\relax
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{2}%
+ \XeKo@toks@{#1}%
+ \ifdefined\fallbackhanjafont
+ \iffontchar\font`#1\else
+ \XeKo@toks@{\fallbackhanjafont #1}%
+ \fi
+ \fi
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startCJ#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{2}% same as ID
+ \XeKo@toks@{#1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startSY#1{%
+ \global\let\XeKo@josatoken=#1\relax
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{3}%
+ \XeKo@toks@{#1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startAA#1{%
+ \global\let\XeKo@josatoken=#1\relax
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{4}%
+ \XeKo@toks@{#1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startAO#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{5}%
+ \XeKo@toks@{#1}%
+ \ifnum\XeKo@hangingpuncts=\@ne
+ \ifnum`#1="60 % `
+ \XeKo@dimen@=\fontcharwd\font"60 %
+ \edef\XeKo@pre@hang{%
+ \kern\the\XeKo@dimen@
+ \vrule width-\the\XeKo@dimen@ height\z@ depth\z@
+ }%
+ \fi
+ \fi
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startAC#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{6}%
+ \XeKo@toks@{#1}%
+ \ifnum\XeKo@hangingpuncts=\@ne
+ \ifnum`#1="27 % '
+ \XeKo@dimen@=\fontcharwd\font"27 %
+ \edef\XeKo@post@hang{%
+ \vrule width-\the\XeKo@dimen@ height\z@ depth\z@
+ \kern\the\XeKo@dimen@
+ }%
+ \fi
+ \fi
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startAP#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{7}%
+ \XeKo@toks@{#1}%
+ \ifnum\XeKo@hangingpuncts=\@ne
+ \ifnum 0\ifnum`#1="2E 1\else % . ,
+ \ifnum`#1="2C 1\fi\fi >\z@
+ \XeKo@dimen@=\fontcharwd\font`#1 %
+ \edef\XeKo@post@hang{%
+ \noexpand\XeKo@count@\noexpand\spacefactor
+ \vrule width-\the\XeKo@dimen@ height\z@ depth\z@
+ \kern\the\XeKo@dimen@
+ \noexpand\spacefactor\noexpand\XeKo@count@
+ }%
+ \fi
+ \fi
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startAM#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{8}%
+ \XeKo@toks@{#1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startAH#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{9}%
+ \XeKo@toks@{#1}%
+ \XeKo@check@next@tok
+ }
+\def\XeKo@startOP#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{10}%
+ \ifnum\XeKo@compresspuncts=\@ne
+ \XeKo@toks@{\hbox to.5em\bgroup\hss #1\egroup}%
+ \else
+ \XeKo@toks@{#1}%
+ \fi
+ \ifnum\XeKo@hangingpuncts=\@ne
+ \ifnum0\ifnum`#1="2018 1\else % ‘ “
+ \ifnum`#1="201C 1\fi\fi >\z@
+ \ifnum\XeKo@compresspuncts=\@ne
+ \XeKo@dimen@=.5em
+ \else
+ \XeKo@dimen@=\fontcharwd\font`#1 %
+ \fi
+ \ifnum`#1="201C %
+ \XeKo@dimen@=.5\XeKo@dimen@
+ \fi
+ \edef\XeKo@pre@hang{%
+ \kern\the\XeKo@dimen@
+ \vrule width-\the\XeKo@dimen@ height\z@ depth\z@
+ }%
+ \fi
+ \fi
+ \XeKo@do@flush@toks
+ }
+\def\XeKo@startCL#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{11}%
+ \ifnum\XeKo@compresspuncts=\@ne
+ \XeKo@toks@{\hbox to.5em\bgroup #1\hss\egroup}%
+ \else
+ \XeKo@toks@{#1}%
+ \fi
+ \ifnum\XeKo@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@compresspuncts=\@ne
+ \XeKo@dimen@=.5em
+ \else
+ \XeKo@dimen@=\fontcharwd\font`#1 %
+ \fi
+ \ifnum`#1="201D %
+ \XeKo@dimen@=.5\XeKo@dimen@
+ \fi
+ \edef\XeKo@post@hang{%
+ \vrule width-\the\XeKo@dimen@ height\z@ depth\z@
+ \kern\the\XeKo@dimen@
+ }%
+ \fi
+ \fi
+ \XeKo@do@flush@toks
+ }
+\def\XeKo@startMD#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{12}%
+ \ifnum\XeKo@compresspuncts=\@ne
+ \XeKo@toks@{\hbox to.5em\bgroup\hss #1\hss\egroup}%
+ \else
+ \XeKo@toks@{#1}%
+ \fi
+ \XeKo@do@flush@toks
+ }
+\def\XeKo@startFS#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{13}%
+ \ifnum\XeKo@compresspuncts=\@ne
+ \XeKo@toks@{\hbox to.5em\bgroup #1\hss\egroup}%
+ \else
+ \XeKo@toks@{#1}%
+ \fi
+ \ifnum\XeKo@hangingpuncts=\@ne
+ \ifnum 0\ifnum`#1="3002 1\else % 。 .
+ \ifnum`#1="FF0E 1\fi\fi >\z@
+ \ifnum\XeKo@compresspuncts=\@ne
+ \XeKo@dimen@=.5em
+ \else
+ \XeKo@dimen@=\fontcharwd\font`#1 %
+ \fi
+ \edef\XeKo@post@hang{%
+ \vrule width-\the\XeKo@dimen@ height\z@ depth\z@
+ \kern\the\XeKo@dimen@
+ }%
+ \fi
+ \fi
+ \XeKo@do@flush@toks
+ }
+\def\XeKo@startEX#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{14}%
+ \XeKo@toks@{#1}%
+ \XeKo@do@flush@toks
+ }
+\def\XeKo@startLD#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{15}%
+ \XeKo@toks@{#1}%
+ \XeKo@do@flush@toks
+ }
+\def\XeKo@startVC#1{%
+ \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined
+ \def\XeKo@currclass{16}%
+ \XeKo@toks@{#1}%
+ \XeKo@do@flush@toks
+ }
+
+\def\XeKo@maybe@gobble{\expandafter\expandafter\expandafter\@gobble}
+
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassHG{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XKinterhangulbreak \XeKo@maybe@gobble % HG HG
+ \or \unkern\unkern \XKinterhanjabreak % ID HG
+ \or \unkern\unkern % SY HG
+ \or \unkern\unkern \XeKo@latincjk % AA HG
+ \or \unkern\unkern \XeKo@nobreak % AO HG
+ \or \unkern\unkern \XeKo@latincjk % AC HG
+ \or \unkern\unkern \XeKo@latincjk % AP HG
+ \or \unkern\unkern \XeKo@latincjk % AM HG
+ \or \unkern\unkern % AH HG
+ \or \unkern\unkern % OP HG
+ \or \unkern\unkern \XeKo@halfhalf % CL HG
+ \or \unkern\unkern \XeKo@quarterquarter % MD HG
+ \or \unkern\unkern \XeKo@halfzero % FS HG
+ \or \unkern\unkern \XeKo@halfhalf % EX HG
+ \or \unkern\unkern \XKinterhanjabreak % LD HG
+ \or \unkern\unkern \XeKo@quarterquarter % VC HG
+ \fi
+ \else\ifnum\lastnodetype=10 % mathoff
+ \XeKo@postmath
+ \fi\fi
+ \XeKo@fontHG\XeKo@startHG
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassID{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XKinterhanjabreak % HG ID
+ \or \unkern\unkern \XKinterhanjabreak \XeKo@maybe@gobble % ID ID
+ \or \unkern\unkern % SY ID
+ \or \unkern\unkern \XeKo@latincjk % AA ID
+ \or \unkern\unkern \XeKo@nobreak % AO ID
+ \or \unkern\unkern \XeKo@latincjk % AC ID
+ \or \unkern\unkern \XeKo@latincjk % AP ID
+ \or \unkern\unkern \XeKo@latincjk % AM ID
+ \or \unkern\unkern % AH ID
+ \or \unkern\unkern % OP ID
+ \or \unkern\unkern \XeKo@halfhalf % CL ID
+ \or \unkern\unkern \XeKo@quarterquarter % MD ID
+ \or \unkern\unkern \XeKo@halfzero % FS ID
+ \or \unkern\unkern \XeKo@halfhalf % EX ID
+ \or \unkern\unkern \XKinterhanjabreak % LD ID
+ \or \unkern\unkern \XeKo@quarterquarter % VC ID
+ \fi
+ \else\ifnum\lastnodetype=10 % mathoff
+ \XeKo@postmath
+ \fi\fi
+ \XeKo@fontID\XeKo@startID
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassCJ{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XKinterhanjabreak % HG CJ
+ \or \unkern\unkern \penalty5000\XKinterhanjabreak \XeKo@maybe@gobble % ID CJ
+ \or \unkern\unkern % SY CJ
+ \or \unkern\unkern \XeKo@latincjk % AA CJ
+ \or \unkern\unkern \XeKo@nobreak % AO CJ
+ \or \unkern\unkern \XeKo@latincjk % AC CJ
+ \or \unkern\unkern \XeKo@latincjk % AP CJ
+ \or \unkern\unkern \XeKo@latincjk % AM CJ
+ \or \unkern\unkern % AH CJ
+ \or \unkern\unkern % OP CJ
+ \or \unkern\unkern \XeKo@halfhalf % CL CJ
+ \or \unkern\unkern \XeKo@quarterquarter % MD CJ
+ \or \unkern\unkern \XeKo@halfzero % FS CJ
+ \or \unkern\unkern \XeKo@halfhalf % EX CJ
+ \or \unkern\unkern \XKinterhanjabreak % LD CJ
+ \or \unkern\unkern \XeKo@quarterquarter % VC CJ
+ \fi
+ \else\ifnum\lastnodetype=10 % mathoff
+ \XeKo@postmath
+ \fi\fi
+ \XeKo@fontCJ\XeKo@startCJ
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassSY{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern % HG SY
+ \or \unkern\unkern % ID SY
+ \or \unkern\unkern \XeKo@maybe@gobble % SY SY
+ \or \unkern\unkern % AA SY
+ \or \unkern\unkern \XeKo@nobreak % AO SY
+ \or \unkern\unkern \XeKo@latincjk % AC SY
+ \or \unkern\unkern \XeKo@latincjk % AP SY
+ \or \unkern\unkern \XeKo@latincjk % AM SY
+ \or \unkern\unkern % AH SY
+ \or \unkern\unkern % OP SY
+ \or \unkern\unkern \XeKo@halfhalf % CL SY
+ \or \unkern\unkern \XeKo@quarterquarter % MD SY
+ \or \unkern\unkern \XeKo@halfzero % FS SY
+ \or \unkern\unkern \XeKo@halfhalf % EX SY
+ \or \unkern\unkern % LD SY
+ \or \unkern\unkern \XeKo@quarterquarter % VC SY
+ \fi
+ \else\ifnum\lastnodetype=10 % mathoff
+ \XeKo@postmath
+ \fi\fi
+ \XeKo@fontSY\XeKo@startSY
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAA{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XeKo@latincjk % HG AA
+ \or \unkern\unkern \XeKo@latincjk % ID AA
+ \or \unkern\unkern % SY AA
+ \or \unkern\unkern \XeKo@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@halfhalf % CL AA
+ \or \unkern\unkern \XeKo@quarterquarter % MD AA
+ \or \unkern\unkern \XeKo@halfzero % FS AA
+ \or \unkern\unkern \XeKo@halfhalf % EX AA
+ \or \unkern\unkern % LD AA
+ \or \unkern\unkern \XeKo@quarterquarter % VC AA
+ \fi
+ \fi
+ \XeKo@fontAA\XeKo@startAA
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAO{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XeKo@latincjk % HG AO
+ \or \unkern\unkern \XeKo@latincjk % ID AO
+ \or \unkern\unkern \XeKo@latincjk % SY AO
+ \or \unkern\unkern % AA AO
+ \or \unkern\unkern \XeKo@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@halfhalf % CL AO
+ \or \unkern\unkern \XeKo@quarterquarter % MD AO
+ \or \unkern\unkern \XeKo@halfzero % FS AO
+ \or \unkern\unkern \XeKo@halfhalf % EX AO
+ \or \unkern\unkern % LD AO
+ \or \unkern\unkern \XeKo@quarterquarter % VC AO
+ \fi
+ \fi
+ \XeKo@fontAO\XeKo@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@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@nobreak\XeKo@halfhalf % CL AC
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD AC
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfzero % FS AC
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % EX AC
+ \or \unkern\unkern % LD AC
+ \or \unkern\unkern % VC AC
+ \fi
+ \fi
+ \XeKo@fontAC\XeKo@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@maybe@gobble % AP AP
+ \or \unkern\unkern % AM AP
+ \or \unkern\unkern % AH AP
+ \or \unkern\unkern % OP AP
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % CL AP
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD AP
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfzero % FS AP
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % EX AP
+ \or \unkern\unkern % LD AP
+ \or \unkern\unkern % VC AP
+ \fi
+ \fi
+ \XeKo@fontAP\XeKo@startAP
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAM{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XeKo@nobreak\XeKo@latincjk % HG AM
+ \or \unkern\unkern \XeKo@nobreak\XeKo@latincjk % ID AM
+ \or \unkern\unkern \XeKo@nobreak\XeKo@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@maybe@gobble % AM AM
+ \or \unkern\unkern % AH AM
+ \or \unkern\unkern % OP AM
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % CL AM
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD AM
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfzero % FS AM
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % EX AM
+ \or \unkern\unkern % LD AM
+ \or \unkern\unkern % VC AM
+ \fi
+ \fi
+ \XeKo@fontAM\XeKo@startAM
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassAH{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XeKo@nobreak % HG AH
+ \or \unkern\unkern \XeKo@nobreak % ID AH
+ \or \unkern\unkern \XeKo@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@maybe@gobble % AH AH
+ \or \unkern\unkern % OP AH
+ \or \unkern\unkern \XeKo@nobreak % CL AH
+ \or \unkern\unkern \XeKo@nobreak % MD AH
+ \or \unkern\unkern \XeKo@nobreak % FS AH
+ \or \unkern\unkern \XeKo@nobreak % EX AH
+ \or \unkern\unkern \XeKo@nobreak % LD AH
+ \or \unkern\unkern \XeKo@nobreak % VC AH
+ \fi
+ \fi
+ \XeKo@fontAH\XeKo@startAH
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassOP{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XeKo@halfhalf % HG OP
+ \or \unkern\unkern \XeKo@halfhalf % ID OP
+ \or \unkern\unkern \XeKo@halfhalf % SY OP
+ \or \unkern\unkern \XeKo@halfhalf % AA OP
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % AO OP
+ \or \unkern\unkern \XeKo@halfhalf % AC OP
+ \or \unkern\unkern \XeKo@halfhalf % AP OP
+ \or \unkern\unkern \XeKo@halfhalf % AM OP
+ \or \unkern\unkern % AH OP
+ \or \unkern\unkern \XeKo@maybe@gobble % OP OP
+ \or \unkern\unkern \XeKo@halfhalf % CL OP
+ \or \unkern\unkern \XeKo@quarterquarter % MD OP
+ \or \unkern\unkern \XeKo@halfzero % FS OP
+ \or \unkern\unkern \XeKo@halfhalf % EX OP
+ \or \unkern\unkern \XeKo@halfhalf % LD OP
+ \or \unkern\unkern \XeKo@quarterquarter % VC OP
+ \fi
+ \else\ifnum\lastnodetype=10 % mathoff
+ \XeKo@halfhalf
+ \fi\fi
+ \XeKo@fontOP\XeKo@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@maybe@gobble % CL CL
+ \or \unkern\unkern \XeKo@nobreak\XeKo@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@fontCL\XeKo@startCL
+ }
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassMD{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % HG MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % ID MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % SY MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % AA MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % AO MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % AC MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % AP MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % AM MD
+ \or \unkern\unkern % AH MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % OP MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % CL MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfquarter \XeKo@maybe@gobble % MD MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@iiiquarterquarter % FS MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % EX MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % LD MD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % VC MD
+ \fi
+ \else\ifnum\lastnodetype=10 % mathoff
+ \XeKo@nobreak\XeKo@quarterquarter
+ \fi\fi
+ \XeKo@fontMD\XeKo@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@nobreak\XeKo@quarterquarter % MD FS
+ \or \unkern\unkern \XeKo@maybe@gobble % FS FS
+ \or \unkern\unkern % EX FS
+ \or \unkern\unkern % LD FS
+ \or \unkern\unkern % VC FS
+ \fi
+ \fi
+ \XeKo@fontFS\XeKo@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@nobreak\XeKo@halfhalf % CL EX
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD EX
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfzero % FS EX
+ \or \unkern\unkern \XeKo@maybe@gobble % EX EX
+ \or \unkern\unkern % LD EX
+ \or \unkern\unkern % VC EX
+ \fi
+ \fi
+ \XeKo@fontEX\XeKo@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@nobreak\XeKo@halfhalf % CL LD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD LD
+ \or \unkern\unkern \XeKo@nobreak\XeKo@halfzero % FS LD
+ \or \unkern\unkern % EX LD
+ \or \unkern\unkern \XeKo@maybe@gobble % LD LD
+ \or \unkern\unkern % VC LD
+ \fi
+ \fi
+ \XeKo@fontLD\XeKo@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@nobreak\XeKo@halfquarter % MD VC
+ \or \unkern\unkern % FS VC
+ \or \unkern\unkern % EX VC
+ \or \unkern\unkern % LD VC
+ \or \unkern\unkern \XeKo@maybe@gobble % VC VC
+ \fi
+ \fi
+ \XeKo@fontVC\XeKo@startVC
+ }
+
+%%% josa selection
+\begingroup
+\catcode`A=11\relax \global\let\XeKo@catcode@letter=A
+\catcode`0=12\relax \global\let\XeKo@catcode@other =0
+\endgroup
+\def\XeKo@striptw@words#1 #2 #3{#3}
+\def\XeKo@get@charslot{%
+ \if\noexpand\XeKo@let@token\relax
+ \chardef\XeKo@charslot="FFFF
+ \else
+ \expandafter\XeKo@get@charslot@
+ \fi
+ }
+\def\XeKo@get@charslot@{%
+ \ifnum 0\ifcat\XeKo@let@token\XeKo@catcode@letter 1\else
+ \ifcat\XeKo@let@token\XeKo@catcode@other 1\fi\fi >\z@
+ \edef\@tempa{\expandafter\XeKo@striptw@words\meaning\XeKo@let@token}%
+ \expandafter\chardef\expandafter\XeKo@charslot\expandafter`\@tempa\relax
+ \else
+ \chardef\XeKo@charslot="FFFF
+ \fi
+ }
+
+\def\XeKo@read@hanja@hangul@file#1{%
+ \begingroup
+ \@tempcnta=\z@
+ \openin1=#1\relax \XeKo@read@hanja@hangul@line \closein1
+ \endgroup
+ }
+\def\XeKo@read@hanja@hangul@line{%
+ \read1 to \@tempa
+ \ifnum\count@=\@tempcnta
+ \global\count@\@tempa
+ \else
+ \advance\@tempcnta\@ne \expandafter\XeKo@read@hanja@hangul@line
+ \fi
+ }
+
+\def\XeKo@num@josa{%
+ \ifnum\XeKo@count@<\z@ \XeKo@count@=-\XeKo@count@ \fi
+ \count@\XeKo@count@
+ \divide\count@ 10
+ \multiply\count@ 10
+ \advance\XeKo@count@-\count@
+ \XeKo@count@=\ifcase\XeKo@count@ \z@
+ \or \@ne
+ \or \tw@
+ \or \z@
+ \or \tw@
+ \or \tw@
+ \or \z@
+ \or \@ne
+ \or \@ne
+ \or \tw@
+ \fi
+ \XeKo@do@make@josa
+ }
+\def\XeKo@alph@josa{%
+ \XeKo@count@=\ifnum "4C=\XeKo@count@ \@ne % L
+ \else\ifnum "4D=\XeKo@count@ \z@ % M
+ \else\ifnum "4E=\XeKo@count@ \z@ % N
+ \else\ifnum "6C=\XeKo@count@ \@ne % l
+ \else\ifnum "6D=\XeKo@count@ \z@ % m
+ \else\ifnum "6E=\XeKo@count@ \z@ % n
+ \else \tw@
+ \fi\fi\fi\fi\fi \fi
+ \XeKo@do@make@josa
+ }
+
+\protected\def\jong {\global\let\XeKo@josatoken=0}\jong
+\protected\def\rieul{\global\let\XeKo@josatoken=1}
+\protected\def\jung {\global\let\XeKo@josatoken=2}
+\protected\def\가{\XeKo@make@josa 가이}
+\protected\def\이{\futurelet\XeKo@let@token\XeKo@make@josa@I}
+\protected\def\은{\XeKo@make@josa 는은} \let\는\은
+\protected\def\을{\XeKo@make@josa 를을} \let\를\을
+\protected\def\와{\XeKo@make@josa 와과} \let\과\와
+\protected\def\으{\XeKo@make@josa \empty 으}
+\protected\def\로{\으로}
+\protected\def\라{\XeKo@make@josa 라{이라}}
+\def\XeKo@make@josa@II{\XeKo@make@josa\relax 이}
+\def\XeKo@make@josa@I{%
+ \XeKo@get@charslot
+ \ifnum\XeKo@charslot="FFFF
+ \expandafter\가%
+ \else
+ \ifnum 0\ifnum\XeKo@charslot>"ABFF \ifnum\XeKo@charslot<"D7A4 1\fi\fi >\z@
+ \expandafter\expandafter\expandafter\XeKo@make@josa@II
+ \else
+ \expandafter\expandafter\expandafter\가%
+ \fi
+ \fi
+ }
+\def\XeKo@make@josa{%
+ \let\XeKo@let@token=\XeKo@josatoken
+ \XeKo@get@charslot
+ \XeKo@count@=\XeKo@charslot
+ \ifnum\XeKo@count@<"FF00
+ \else\ifnum\XeKo@count@<"FF5B
+ \advance\XeKo@count@-"FEE0
+ \fi\fi
+ \let\XeKo@next\XeKo@make@josa@
+ \ifnum\XeKo@count@<"30 % 0
+ \else\ifnum\XeKo@count@<"3A
+ \advance\XeKo@count@-"30 \let\XeKo@next\XeKo@num@josa
+ \else\ifnum\XeKo@count@<"41
+ \else\ifnum\XeKo@count@<"7B \let\XeKo@next\XeKo@alph@josa
+ \else\ifnum\XeKo@count@<"2160 % roman numneral I
+ \else\ifnum\XeKo@count@<"216C
+ \advance\XeKo@count@-"215F \let\XeKo@next\XeKo@num@josa
+ \else\ifnum\XeKo@count@<"2170 % roman numneral i
+ \else\ifnum\XeKo@count@<"217C
+ \advance\XeKo@count@-"216F \let\XeKo@next\XeKo@num@josa
+ \else\ifnum\XeKo@count@<"2460 % ①
+ \else\ifnum\XeKo@count@<"249C % ⒜
+ \advance\XeKo@count@-"245F \let\XeKo@next\XeKo@num@josa
+ \else\ifnum\XeKo@count@<"24B6 % Ⓐ
+ \advance\XeKo@count@-"245B \let\XeKo@next\XeKo@alph@josa
+ \else\ifnum\XeKo@count@<"24D0 % ⓐ
+ \advance\XeKo@count@-"2475 \let\XeKo@next\XeKo@alph@josa
+ \else\ifnum\XeKo@count@<"24EA
+ \advance\XeKo@count@-"248F \let\XeKo@next\XeKo@alph@josa
+ \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi
+ \XeKo@next
+ }
+\def\XeKo@make@josa@{%
+ \ifnum\XeKo@count@<"3260 % ㉠
+ \else\ifnum\XeKo@count@<"3280
+ \advance\XeKo@count@-"60
+ \fi\fi
+ \let\XeKo@next\XeKo@make@josa@@
+ \ifnum\XeKo@count@<"3131 % ㄱ
+ \else\ifnum\XeKo@count@<"318F
+ \ifnum \XeKo@count@="3139 \XeKo@count@\@ne
+ \else\ifnum\XeKo@count@<"314F \XeKo@count@\z@
+ \else\ifnum\XeKo@count@>"3164
+ \ifnum\XeKo@count@<"3187 \XeKo@count@\z@ \fi
+ \fi\fi\fi
+ \let\XeKo@next\XeKo@do@make@josa
+ \else\ifnum\XeKo@count@<"3200 % ㈀
+ \else\ifnum\XeKo@count@<"321F
+ \ifnum \XeKo@count@="3203 \XeKo@count@\@ne
+ \else\ifnum\XeKo@count@<"320E \XeKo@count@\z@
+ \fi\fi
+ \let\XeKo@next\XeKo@do@make@josa
+ \fi\fi\fi\fi
+ \XeKo@next
+ }
+\def\XeKo@make@josa@@{%
+ \ifnum\XeKo@count@<"3400 \else\ifnum\XeKo@count@<"4DB6
+ \advance\XeKo@count@-"3400 \XeKo@read@hanja@hangul@file{hanjaexa_hangul.tab}%
+ \else\ifnum\XeKo@count@<"4E00 \else\ifnum\XeKo@count@<"9FA6
+ \advance\XeKo@count@-"4E00 \XeKo@read@hanja@hangul@file{hanja_hangul.tab}%
+ \else\ifnum\XeKo@count@<"F900 \else\ifnum\XeKo@count@<"FA2E
+ \advance\XeKo@count@-"F900 \XeKo@read@hanja@hangul@file{hanjacom_hangul.tab}%
+ \fi\fi\fi\fi\fi \fi
+ \ifnum\XeKo@count@<"AC00 \else\ifnum\XeKo@count@<"D7A4 % Hangul syllables
+ \advance\XeKo@count@-"AC00
+ \@tempcnta\XeKo@count@ \divide\@tempcnta28 \multiply\@tempcnta28
+ \advance\XeKo@count@-\@tempcnta \advance\XeKo@count@"11A7
+ \fi\fi
+ \ifnum\XeKo@count@<"11A8
+ \else\ifnum\XeKo@count@<"1200
+ \ifnum\XeKo@count@="11AF \XeKo@count@\@ne \else \XeKo@count@\z@ \fi
+ \else\ifnum\XeKo@count@<"D7CB
+ \else\ifnum\XeKo@count@<"D7FC
+ \XeKo@count@\z@
+ \fi\fi\fi\fi
+ \XeKo@do@make@josa
+ }
+\def\XeKo@do@make@josa#1#2{%
+ \ifcase\XeKo@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@dotemph@box
+\protected\def\dotemph#1{%
+ \leavevmode
+ \begingroup
+ \setbox\XeKo@dotemph@box\hbox{\dotemphchar}%
+ \edef\XeKo@flush@char@orphan{%
+ \unexpanded{%
+ \edef\XeKo@tempa{%
+ \XeKo@toks@{%
+ \setbox\z@\hbox{\the\XeKo@toks@}%
+ \setbox\tw@\hbox to\wd\z@{\hss\unhcopy\XeKo@dotemph@box\hss}\ht\tw@\z@\dp\tw@\z@
+ \rlap{\raise\dotemphraise\box\tw@}\the\XeKo@toks@ }%
+ }\XeKo@tempa }%
+ \unexpanded\expandafter{\XeKo@flush@char@orphan}}%
+ #1\relax
+ \endgroup
+ }
+
+%
+\let\enablecjksymbolspacing\compresspunctuations
+\let\disablecjksymbolspacing\nocompresspunctuations
+\protected\def\disablekoreanfonts{%
+ \let\XeKo@fontHG\relax
+ \let\XeKo@fontID\relax
+ \let\XeKo@fontCJ\relax
+ \let\XeKo@fontSY\relax
+ \let\XeKo@fontAA\relax
+ \let\XeKo@fontAO\relax
+ \let\XeKo@fontAC\relax
+ \let\XeKo@fontAP\relax
+ \let\XeKo@fontAM\relax
+ \let\XeKo@fontAH\relax
+ \let\XeKo@fontOP\relax
+ \let\XeKo@fontCL\relax
+ \let\XeKo@fontMD\relax
+ \let\XeKo@fontFS\relax
+ \let\XeKo@fontEX\relax
+ \let\XeKo@fontLD\relax
+ \let\XeKo@fontVC\relax
+ }
+\protected\def\disablehangulspacing{%
+ \let\XeKo@halfzero \inhibitglue
+ \let\XeKo@halfhalf \inhibitglue
+ \let\XeKo@halfquarter \inhibitglue
+ \let\XeKo@quarterquarter \inhibitglue
+ \let\XeKo@iiiquarterquarter \inhibitglue
+ \let\XeKo@latincjk \inhibitglue
+ \let\XeKo@postmath \inhibitglue
+ \let\XKinterhangulbreak \XKinterhanjabreak
+ \let\XeKo@latincjk@classic \inhibitglue
+ \let\XeKo@latincjk@modern \inhibitglue
+ \let\XeKo@postmath@modern \inhibitglue
+ \let\XeKo@suppress@char@orphan \relax
+ \chardef\XeKo@hangingpuncts \z@
+ \chardef\XeKo@cjk@ignorespaces \z@
+ }
+\protected\def\disablehangulspacingandlinebreak{%
+ \let\XeKo@halfzero \relax
+ \let\XeKo@halfhalf \relax
+ \let\XeKo@halfquarter \relax
+ \let\XeKo@quarterquarter \relax
+ \let\XeKo@iiiquarterquarter \relax
+ \let\XeKo@latincjk \relax
+ \let\XeKo@postmath \relax
+ \let\XKinterhangulbreak \relax
+ \let\XKinterhanjabreak \relax
+ \let\XeKo@latincjk@classic \relax
+ \let\XeKo@latincjk@modern \relax
+ \let\XeKo@postmath@modern \relax
+ \let\XeKo@suppress@char@orphan \relax
+ \chardef\XeKo@hangingpuncts \z@
+ \chardef\XeKo@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@xetexko.sty\endcsname \else
+ \protected\def\hangulfont{\afterassignment\XeKo@hangul@font@setup\font\XeKo@hangul@font}
+ \def\XeKo@hangul@font@setup{%
+ \begingroup
+ \XeKo@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@hangul@font{\the\font
+ \unexpanded\expandafter{\xetexkohanguloption}}}\x
+ }
+ \protected\def\hanjafont{\afterassignment\XeKo@hanja@font@setup\font\XeKo@hanja@font}
+ \def\XeKo@hanja@font@setup{%
+ \begingroup
+ \XeKo@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@hanja@font{\the\font
+ \unexpanded\expandafter{\xetexkohanjaoption}}}\x
+ }
+ \protected\def\hanjabyhangulfont{%
+ \let\XeKo@hanja@font\XeKo@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@strip@at@size@from@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@strip@at@size@from@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@font{%
+ \unexpanded\expandafter{%
+ \verbatim@font
+ \disablehangulspacingandlinebreak
+ \aftergroup\enablehangulspacingandlinebreak
+ }}
+\AddToHook{normalfont}{%
+ \let \xetexkohangulfont \xetexkodefaulthangulfont
+ \let \xetexkohanguloption \xetexkodefaulthanguloption
+ \let \xetexkohanjafont \xetexkodefaulthanjafont
+ \let \xetexkohanjaoption \xetexkodefaulthanjaoption
+ }
+\IfHookExistsTF{selectfont}{
+ \AddToHook{selectfont}{%
+ \XeKo@hanja@selectfont
+ \XeKo@hangul@selectfont
+ }
+}{
+ \RequirePackage{everysel}
+ \EverySelectfont{%
+ \XeKo@hanja@selectfont
+ \XeKo@hangul@selectfont
+ }
+}
+
+\def\XeKo@hangul@selectfont{%
+ \ifdefined\XeKo@in@selectfont\else
+ \ifdefined\xetexkohangulfont
+ \begingroup
+ \let\XeKo@in@selectfont\empty
+ \xetexkohangulfont
+ \edef\x{\endgroup
+ \def\noexpand\XeKo@hangul@font{\the\font
+ \unexpanded\expandafter{\xetexkohanguloption}}%
+ \noexpand\xetexkohanguloption % for 영문자-한글 interlatincjk
+ }\x
+ \else
+ \let\XeKo@hangul@font\XeKo@undefined
+ \fi
+ \fi
+ }
+\def\XeKo@hanja@selectfont{%
+ \ifdefined\XeKo@in@selectfont\else
+ \ifdefined\xetexkohanjafont
+ \begingroup
+ \let\XeKo@in@selectfont\empty
+ \xetexkohanjafont
+ \edef\x{\endgroup
+ \def\noexpand\XeKo@hanja@font{\the\font
+ \unexpanded\expandafter{\xetexkohanjaoption}}%
+ \noexpand\xetexkohanjaoption
+ }\x
+ \else
+ \let\XeKo@hanja@font\XeKo@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@mainhangulfamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+ \cs_set_protected_nopar:Npn \xetexkomainhangulfont
+ {
+ \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo@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@hangul@selectfont
+ }
+ \ignorespaces
+}
+\DeclareDocumentCommand \setsanshangulfont { O{} m O{} }
+{
+ \__xtxko_assign_font_opts:n { #1, #3 }
+ \fontspec_set_family:Nnn \XeKo@sanshangulfamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+ \cs_set_protected_nopar:Npn \xetexkosanshangulfont
+ {
+ \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo@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@hangul@selectfont
+ }
+ \ignorespaces
+}
+\DeclareDocumentCommand \setmonohangulfont { O{} m O{} }
+{
+ \__xtxko_assign_font_opts:n { #1, #3 }
+ \fontspec_set_family:Nnn \XeKo@monohangulfamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+ \cs_set_protected_nopar:Npn \xetexkomonohangulfont
+ {
+ \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo@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@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@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@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@encoding }
+ \exp_not:N \fontfamily { \f@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@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@mainhanjafamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+ \cs_set_protected_nopar:Npn \xetexkomainhanjafont
+ {
+ \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo@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@hanja@selectfont
+ }
+ \ignorespaces
+}
+\DeclareDocumentCommand \setsanshanjafont { O{} m O{} }
+{
+ \__xtxko_assign_font_opts:n { #1, #3 }
+ \fontspec_set_family:Nnn \XeKo@sanshanjafamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+ \cs_set_protected_nopar:Npn \xetexkosanshanjafont
+ {
+ \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo@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@hanja@selectfont
+ }
+ \ignorespaces
+}
+\DeclareDocumentCommand \setmonohanjafont { O{} m O{} }
+{
+ \__xtxko_assign_font_opts:n { #1, #3 }
+ \fontspec_set_family:Nnn \XeKo@monohanjafamily { Ligatures=TeX, \l_xtxko_rest_opts_tl } { #2 }
+ \cs_set_protected_nopar:Npn \xetexkomonohanjafont
+ {
+ \fontencoding \g_fontspec_encoding_tl \fontfamily \XeKo@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@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@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@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@encoding }
+ \exp_not:N \fontfamily { \f@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@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@hanja@font \XeKo@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@hanja@font\else
+ \let\XeKo@hanja@font \XeKo@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@hangul
+ \RequirePackage{konames-utf}
+ \fi
+ }
+
\newif\if@hangul
\newif\if@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@hangul\AtBeginDocument{\RequirePackage{konames-utf}}\fi
-\AtBeginDocument{
- % for ulem package
- \ifcsname UL@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@hangul
+ \linespread{1.3888}
+ \footnotesep=1.3888\footnotesep
+ \skip\footins=\glueexpr\skip\footins/72*100\relax
+ \frenchspacing
+\fi
+\XeKocatcodeofATchar
\endinput