summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-03-22 23:00:03 +0000
committerKarl Berry <karl@freefriends.org>2021-03-22 23:00:03 +0000
commit67dc05bd2bd2076af8198facd733819c6d87cf9d (patch)
tree1b19c0cd603bdf044e5f36d6e799bb1b22687650
parent6bfd0cbc5bfeef682d2194c7439172852c107617 (diff)
xetexko (22mar21)
git-svn-id: svn://tug.org/texlive/trunk@58633 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/ChangeLog6
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/README2
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdfbin241892 -> 244622 bytes
-rw-r--r--Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex43
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko.sty226
5 files changed, 184 insertions, 93 deletions
diff --git a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
index 3419947e033..f8e4013e58b 100644
--- a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
+++ b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog
@@ -1,3 +1,9 @@
+2021-03-22 Dohyun Kim <nomos at ktug org>
+
+ Version 3.1
+
+ * new plain TeX commands \sethangulfont, \sethanjafont
+
2021-03-20 Dohyun Kim <nomos at ktug org>
Version 3.0
diff --git a/Master/texmf-dist/doc/xetex/xetexko/README b/Master/texmf-dist/doc/xetex/xetexko/README
index 456c0f9a691..50575ee4a2c 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 3.0 (2021/03/20)
+XeTeX-ko Package version 3.1 (2021/03/22)
=========================================
XeTeX-ko is a macro package for Xe(La)TeX which supports typesetting
diff --git a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf
index 98315b58f32..7d5f60a656a 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 af2d1dfaca9..481a2a0a570 100644
--- a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
+++ b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex
@@ -40,7 +40,8 @@
\newenvironment{plaintex}
{\setbox0=\vbox\bgroup\hsize=\dimexpr\textwidth-12pt\relax
\hrule width0pt\kern5pt\par\small
- \noindent}
+ \parindent0pt }
+% \noindent}
{\par \vskip-\lastskip\kern5pt\hrule width0pt\egroup \par\medskip\par
\dimen0=\dimexpr\pagegoal-\pagetotal\relax
\ifdim\dimen0<2\baselineskip\relax \dimen0\maxdimen \fi
@@ -70,7 +71,7 @@
\title{\xetexko\ 간단 매뉴얼}
\author{Dohyun Kim \normalsize <\texttt{nomos at ktug org}> \and
\normalsize <\url{http://github.com/dohyunkim/xetexko}>}
-\date{Version 3.0\quad 2021/03/20}
+\date{Version 3.1\quad 2021/03/22}
\maketitle
\begin{quote}\small
@@ -144,6 +145,9 @@ main/sans hangul/hanja 폰트에는 따로 \verb|Ligatures=TeX| 옵션을 지시
지시하지 않았다면 \hemph{은바탕/은돋움 트루타입}을 한글·한자 글꼴의 기본값으로
사용한다.
+\bigskip
+
+※ 버전 3.1부터 플레인텍에 주요 변경사항이 있다:\vernote{3.1}%
\begin{plaintex}
플레인텍에서도 기본값으로 은바탕을 한글에 사용한다. 한글폰트를 지시하는 방법은 다음과 같다.
\begin{verbatim}
@@ -151,6 +155,18 @@ main/sans hangul/hanja 폰트에는 따로 \verb|Ligatures=TeX| 옵션을 지시
\hangulfont="[UnBatang]:mapping=tex-text" at 10pt
\hanjafont ="Naver Dictionary:mapping=tex-text" at 10pt
\end{verbatim}
+ 그런데 3.1 버전부터는 이렇게 하면 문서 중간에 영문글꼴을 바꾸더라도
+ \cs{hangulfont} 선언시의 영문글꼴이 계속 적용되도록 바뀌었다.
+ 그래서 다음과 같은 새로운 명령을 제공한다.
+\begin{verbatim}
+ \tt
+ \sethangulfont\untaza ="[UnTaza.ttf]" at 10pt
+ \sethanjafont \undotum="[UnDotum.ttf]" at 10pt
+ \def\tt{\untaza\undotum}
+\end{verbatim}
+ 이 경우 \cs{untaza}, \cs{undotum} 명령에 \cs{set...font} 실행시의 현재폰트 명령이
+ 자동으로 포함된다. 뒤에서 설명할 글꼴옵션이 포함되는 것과 같은 개념이다.
+ 그리하여 예의 \cs{tt} 명령으로 이제 한글, 한자, 영문 글꼴을 동시에 바꿀 수 있게 된다.
\end{plaintex}
\keyword{fallbackhanjafont}%
@@ -202,10 +218,10 @@ fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
옵션 키의 종류와 의미는 다음과 같으며 각 키 값은 인자의 경우와 같다.
\begin{description}\itemsep0pt\hangulparens
-\item[alphs] 라틴 알파벳 및 아래에 해당하지 않는 모든 라틴 문자
-\item[parens] 라틴 괄호, 중괄호, 대괄호, 꺽쇠
-\item[colons] 라틴 콜론, 세미콜론, endash, emdash
-\item[hyphens] 하이픈, 하이픈으로 이루어지는 리거쳐, 슬래시
+\item[alphs] 라틴 알파벳, 숫자, 아래에 해당않는 모든 non-CJK 문자
+\item[parens] 라틴 괄호, 중괄호, 대괄호, 꺽쇠, 인용부호 및 그 리거쳐
+\item[colons] 라틴 콜론, 세미콜론
+\item[hyphens] 하이픈 및 그 리거쳐, 슬래시, en dash, em dash
\item[puncts] 마침표, 물음표, 느낌표, 쉼표
\item[cjksymbols] CJK 구두점, 괄호 및 상징기호
\end{description}
@@ -215,6 +231,8 @@ fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
라틴 인용부호에 적용되던 \verb|quotes| 옵션이
3.0버전부터는
각각 \verb|alphs| 옵션과 \verb|parens| 옵션에 통합되었음에 유의하라.
+또한\vernote{3.0} en dash, em dash가 종래 \verb|colons|에 속하던 것이 이제
+\verb|hyphens|에 속하게 되었음도 주의하라.
기본값은 다음 명령을 준 것과 동일하다.
\begin{verbatim}
@@ -292,7 +310,7 @@ fontspec과 마찬가지로 각 명령의 끝에 `s'를 붙여도 된다.
\def\xetexkointerhchar{-0.04em }
\def\xetexkocharraise{-0.1ex }
\end{verbatim}
- 이것들을 선언해두고나서 \cs{hangulfont} 명령으로 글꼴을
+ 이것들을 선언해두고나서 \cs{hangulfont} 명령 등으로 글꼴을
지정하면 기 정의된 옵션들이 한글폰트 명령에 자동 포함된다.
한자폰트의 경우도 같다. 따라서 한글폰트 옵션과
한자폰트 옵션을 서로 달리 지시할 수 있다.
@@ -582,7 +600,7 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
]
\end{verbatim}
\begin{plaintex}
- 플레인텍에서는 \cs{mathhangulfont=UnBatang}과 같이 설정한다.
+ 플레인텍에서는 \cs{mathhangulfont="[UnBatang.ttf]"}와 같이 설정한다.
또는 좀 더 그럴듯하게 하려면:\par
\leftskip=3em\noindent
@@ -657,6 +675,10 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
\begin{small}\linespread{1.2}\selectfont
\begin{description}\itemsep=0pt
+ \item[v3.1] 2021-03-22
+ \begin{itemize}
+ \item 플레인텍 명령 \cs{sethangulfont}, \cs{sethanjafont} 추가
+ \end{itemize}
\item[v3.0] 2021-03-20
\begin{itemize}
\item \verb|typesetclassic|, \verb|typesetmodern| 환경이 추가되었다.
@@ -667,11 +689,12 @@ microtype 패키지를 로드하는 것으로도 유사한 결과를 얻을 수
맞추어 조정하였다.
\item 글꼴옵션이 \verb|InterLatinCJK|, \verb|InterHangul|, \verb|CharRaise|
외에는 모두 무력화되었다.
- \item \cs{xetexkoregime}의 키값 \verb|nums|와 \verb|quotes|가
+ \item \cs{xetexkofontregime}의 키값 \verb|nums|와 \verb|quotes|가
각각 \verb|alphs|와 \verb|parens|에 통합되었다.
\item \cs{xetexkoulemsupport} 명령이 무력화되었다.
\item \cs{disableautojosa}, \cs{disablejamoautojosa} 명령이 무력화되었다.
- \item \cs{defaulthanjafontfeatures} 등의 명령이 무력화되었다.
+ \item \cs{defaulthangulfontfeatures} \cs{defaulthanjafontfeatures}
+ 명령이 무력화되었다.
\item 수식한글을 자동으로 잡아주지 않는다.
\end{itemize}
\item[v2.23] 2020-02-17
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
index 6d7403617e0..9b155d3c737 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty
@@ -16,7 +16,7 @@
\ifdefined\ProvidesPackage
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
- \ProvidesPackage{xetexko}[2021/03/20 v3.0 typesetting Korean with XeTeX]
+ \ProvidesPackage{xetexko}[2021/03/22 v3.1 typesetting Korean with XeTeX]
\else
\ifdefined\@tempcnta\else \newcount\@tempcnta \fi
\ifdefined\@gobble\else \def\@gobble#1{} \fi
@@ -35,7 +35,7 @@
\newXeTeXintercharclass\XeTeXcharclassEX
\let\XeTeXcharclassIS\XeTeXcharclassID
\let\XeTeXcharclassNS\XeTeXcharclassID
-\let\XeTeXcharclassCM\XeTeXcharclassIgnore
+\newXeTeXintercharclass\XeTeXcharclassCM
\input load-unicode-xetex-classes %
\newXeTeXintercharclass\XeTeXcharclassHG
@@ -54,10 +54,10 @@
% more CM
\count@"FE00 \loop
- \XeTeXcharclass\count@=\XeTeXcharclassIgnore
+ \XeTeXcharclass\count@=\XeTeXcharclassCM
\ifnum\count@<"FE0F \advance\count@\@ne \repeat
\count@"E0100 \loop
- \XeTeXcharclass\count@=\XeTeXcharclassIgnore
+ \XeTeXcharclass\count@=\XeTeXcharclassCM
\ifnum\count@<"E01EF \advance\count@\@ne \repeat
% hangul
@@ -390,9 +390,6 @@
\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
@@ -401,40 +398,22 @@
\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
+ \XeKo@reset@options
+ \XeKo@hangul@font
+ \let\XeKo@curr@font\XeKo@hangul@font
\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
+ \XeKo@reset@options
+ \XeKo@hanja@font
+ \let\XeKo@curr@font\XeKo@hanja@font
\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
+ \ifdefined\XeKo@latin@font
+ \XeKo@latin@font
+ \let\XeKo@curr@font\XeKo@latin@font
\fi
}
\let\XeKo@fontHG\XeKo@font@Hangul
@@ -583,17 +562,17 @@
\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@
+ \ifnum 0\ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassJJ 1\else
+ \ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassCM 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@
+ % load-unicode-xetex-classes가 설정하는 모든 CM은 한글, 한자, 가나 뒤에 온다.
+ % 따라서 영문자는 CM을 고려할 필요가 없다.
+ \ifnum\XeTeXcharclass\XeKo@charslot=\csname XeKo@\XeKo@currclass @class\endcsname
\expandafter\XeKo@addto@toks
\else
\expandafter\XeKo@flush@toks
@@ -637,7 +616,7 @@
\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}%
+ \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii ^^^^ff0e}%
\let\XeKo@next\XeKo@char@orphan@
\else
\let\XeKo@next\XeKo@flush@char@orphan
@@ -649,24 +628,15 @@
\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
+ \ifx\XeKo@curr@font\XeKo@latin@font\else
\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
+ \ifx\XeKo@curr@font\XeKo@latin@font\else
\egroup
- \else
- \ifx\XeKo@curr\XeKo@hanja@font
- \egroup
- \fi
\fi
\fi
}
@@ -691,9 +661,6 @@
\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
@@ -1366,6 +1333,55 @@
\XeKo@fontVC\XeKo@startVC
}
+\newbox\XeKo@box@
+
+% \char"1112\char"119E\char"11AB etc.
+% !!!!! 이 경우 \everyhangul 등이 제대로 작동 않는다 !!!!!
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassJJ{%
+ \ifnum\lastnodetype=12 %
+ \ifnum\lastkern=\@ne
+ \unkern\unkern
+ \expandafter\expandafter\expandafter\XeKo@startJJ
+ \fi
+ \fi
+ }
+\def\XeKo@startJJ#1{%
+ \global\let\XeKo@josatoken=#1\relax
+ \begingroup
+ \XeTeXinterchartokenstate\z@
+ \ifnum\lastnodetype=\@ne % hbox (charraise box)
+ \setbox\XeKo@box@=\lastbox
+ \XeKo@char@raise@start \unhbox\XeKo@box@ #1\XeKo@char@raise@stop
+ \else
+ #1\relax
+ \fi
+ \endgroup
+ \XeKo@insert@kerns
+ }
+% \char"9AA8\char"E0102 etc.
+\XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassCM{%
+ \ifnum\lastnodetype=12 %
+ \ifcase\lastkern
+ \or % HG
+ \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM
+ \or % ID
+ \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM
+ \fi
+ \fi
+ }
+\def\XeKo@startCM#1{%
+ \begingroup
+ \XeTeXinterchartokenstate\z@
+ \ifnum\lastnodetype=\@ne % hbox (charraise box)
+ \setbox\XeKo@box@=\lastbox
+ \XeKo@char@raise@start \unhbox\XeKo@box@ #1\XeKo@char@raise@stop
+ \else
+ #1\relax
+ \fi
+ \endgroup
+ \XeKo@insert@kerns
+ }
+
%%% josa selection
\begingroup
\catcode`A=11\relax \global\let\XeKo@catcode@letter=A
@@ -1569,7 +1585,7 @@
\endgroup
}
-%
+% other commands
\let\enablecjksymbolspacing\compresspunctuations
\let\disablecjksymbolspacing\nocompresspunctuations
\protected\def\disablekoreanfonts{%
@@ -1647,37 +1663,65 @@
%%% 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{%
+ \protected\def\hangulfont{%
+ \afterassignment\XeKo@hangulfont@setup\font\XeKo@hangul@font
+ }
+ \def\XeKo@hangulfont@setup{%
+ \expandafter\let\expandafter\XeKo@latin@font\the\font
+ \edef\XeKo@hangul@font{%
+ \the\XeKo@hangul@font
\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{%
+ \protected\def\sethangulfont#1{%
+ \def\@tempa{#1}%
+ \edef\@tempb{\string#1}%
+ \expandafter\afterassignment\expandafter\XeKo@sethangulfont@setup
+ \expandafter\font\csname XeKo@hangul@font@\@tempb\endcsname
+ }
+ \def\XeKo@sethangulfont@setup{%
+ \expandafter\edef\@tempa{%
+ \let\noexpand\XeKo@latin@font=\the\font
+ \def\noexpand\XeKo@hangul@font{%
+ \csname XeKo@hangul@font@\@tempb\endcsname
+ \ifdefined\xetexkohu \def\noexpand\xetexkohu{\xetexkohu}\fi
+ \ifdefined\xetexkointerhchar \def\noexpand\xetexkointerhchar{\xetexkointerhchar}\fi
+ \ifdefined\xetexkocharraise \def\noexpand\xetexkocharraise{\xetexkocharraise}\fi
+ }%
+ }%
+ }
+ \protected\def\hanjafont{%
+ \afterassignment\XeKo@hanjafont@setup\font\XeKo@hanja@font
+ }
+ \def\XeKo@hanjafont@setup{%
+ \expandafter\let\expandafter\XeKo@latin@font\the\font
+ \edef\XeKo@hanja@font{%
+ \the\XeKo@hanja@font
\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
+ \protected\def\sethanjafont#1{%
+ \def\@tempa{#1}%
+ \edef\@tempb{\string#1}%
+ \expandafter\afterassignment\expandafter\XeKo@sethanjafont@setup
+ \expandafter\font\csname XeKo@hanja@font@\@tempb\endcsname
}
+ \def\XeKo@sethanjafont@setup{%
+ \expandafter\edef\@tempa{%
+ \let\noexpand\XeKo@latin@font=\the\font
+ \def\noexpand\XeKo@hanja@font{%
+ \csname XeKo@hanja@font@\@tempb\endcsname
+ \ifdefined\xetexkohu \def\noexpand\xetexkohu{\xetexkohu}\fi
+ \ifdefined\xetexkointerhchar \def\noexpand\xetexkointerhchar{\xetexkointerhchar}\fi
+ \ifdefined\xetexkocharraise \def\noexpand\xetexkocharraise{\xetexkocharraise}\fi
+ }%
+ }%
+ }
+ \protected\def\hanjabyhangulfont{\let\XeKo@hanja@font\XeKo@hangul@font }
% math hangul
\newfam\symmathhangul
\protected\def\setmathhangulfonts#1#2#3{% font identifiers
@@ -1745,17 +1789,18 @@
}
\IfHookExistsTF{selectfont}{
\AddToHook{selectfont}{%
+ \XeKo@latin@selectfont
\XeKo@hanja@selectfont
\XeKo@hangul@selectfont
}
}{
\RequirePackage{everysel}
\EverySelectfont{%
+ \XeKo@latin@selectfont
\XeKo@hanja@selectfont
\XeKo@hangul@selectfont
}
}
-
\def\XeKo@hangul@selectfont{%
\ifdefined\XeKo@in@selectfont\else
\ifdefined\xetexkohangulfont
@@ -1765,8 +1810,8 @@
\edef\x{\endgroup
\def\noexpand\XeKo@hangul@font{\the\font
\unexpanded\expandafter{\xetexkohanguloption}}%
- \noexpand\xetexkohanguloption % for 영문자-한글 interlatincjk
- }\x
+ }\x
+ \xetexkohanguloption % for 영문자-한글 interlatincjk
\else
\let\XeKo@hangul@font\XeKo@undefined
\fi
@@ -1781,12 +1826,22 @@
\edef\x{\endgroup
\def\noexpand\XeKo@hanja@font{\the\font
\unexpanded\expandafter{\xetexkohanjaoption}}%
- \noexpand\xetexkohanjaoption
- }\x
+ }\x
+ \xetexkohanjaoption
\else
\let\XeKo@hanja@font\XeKo@undefined
\fi
\fi }
+\def\XeKo@latin@selectfont{%
+ \ifdefined\XeKo@in@selectfont\else
+ \begingroup
+ \let\XeKo@in@selectfont\empty
+ \selectfont
+ \edef\x{\endgroup
+ \def\noexpand\XeKo@latin@font{\the\font}%
+ }\x
+ \fi
+ }
\ExplSyntaxOn
\tl_new:N \l_xtxko_font_opts_tl
@@ -1855,6 +1910,7 @@
\cs_set_eq:NN \xetexkohanguloption \xetexkomainhanguloption
\cs_set_eq:NN \xetexkodefaulthangulfont \xetexkomainhangulfont
\cs_set_eq:NN \xetexkodefaulthanguloption \xetexkomainhanguloption
+ \XeKo@latin@selectfont
\XeKo@hangul@selectfont
}
\ignorespaces
@@ -1874,6 +1930,7 @@
\cs_set_eq:NN \xetexkohanguloption \xetexkosanshanguloption
\cs_set_eq:NN \xetexkodefaulthangulfont \xetexkosanshangulfont
\cs_set_eq:NN \xetexkodefaulthanguloption \xetexkosanshanguloption
+ \XeKo@latin@selectfont
\XeKo@hangul@selectfont
}
\ignorespaces
@@ -1893,6 +1950,7 @@
\cs_set_eq:NN \xetexkohanguloption \xetexkomonohanguloption
\cs_set_eq:NN \xetexkodefaulthangulfont \xetexkomonohangulfont
\cs_set_eq:NN \xetexkodefaulthanguloption \xetexkomonohanguloption
+ \XeKo@latin@selectfont
\XeKo@hangul@selectfont
}
\ignorespaces
@@ -1979,6 +2037,7 @@
\cs_set_eq:NN \xetexkohanjaoption \xetexkomainhanjaoption
\cs_set_eq:NN \xetexkodefaulthanjafont \xetexkomainhanjafont
\cs_set_eq:NN \xetexkodefaulthanjaoption \xetexkomainhanjaoption
+ \XeKo@latin@selectfont
\XeKo@hanja@selectfont
}
\ignorespaces
@@ -1998,6 +2057,7 @@
\cs_set_eq:NN \xetexkohanjaoption \xetexkosanshanjaoption
\cs_set_eq:NN \xetexkodefaulthanjafont \xetexkosanshanjafont
\cs_set_eq:NN \xetexkodefaulthanjaoption \xetexkosanshanjaoption
+ \XeKo@latin@selectfont
\XeKo@hanja@selectfont
}
\ignorespaces
@@ -2017,10 +2077,12 @@
\cs_set_eq:NN \xetexkohanjaoption \xetexkomonohanjaoption
\cs_set_eq:NN \xetexkodefaulthanjafont \xetexkomonohanjafont
\cs_set_eq:NN \xetexkodefaulthanjaoption \xetexkomonohanjaoption
+ \XeKo@latin@selectfont
\XeKo@hanja@selectfont
}
\ignorespaces
}
+ \XeKo@latin@selectfont
\DeclareDocumentCommand \newhanjafontfamily { m O{} m O{} }
{
\__xtxko_assign_font_opts:n { #2, #4 }