diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/ChangeLog | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/README | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf | bin | 251319 -> 250218 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex | 23 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko.sty | 427 |
5 files changed, 328 insertions, 132 deletions
diff --git a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog index cdad25a5664..3d2c82eba23 100644 --- a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog +++ b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog @@ -1,3 +1,11 @@ +2021-04-20 Dohyun Kim <nomos at ktug org> + + Version 3.3 + + * more fix on ulem package support + * suppress linebreak before ellipsis etc. + * assign U+327E to cjksymbols class + 2021-04-08 Dohyun Kim <nomos at ktug org> Version 3.2 diff --git a/Master/texmf-dist/doc/xetex/xetexko/README b/Master/texmf-dist/doc/xetex/xetexko/README index c311723be57..4d0dfb8182e 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.2 (2021/04/08) +XeTeX-ko Package version 3.3 (2021/04/20) ========================================= 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 Binary files differindex c03bfa8a4db..baec8abd9f7 100644 --- a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf +++ b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf diff --git a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex index 616c9fcc5bc..37e1e49f7fa 100644 --- a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex +++ b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex @@ -70,7 +70,7 @@ \title{\xetexko\ 간단 매뉴얼} \author{Dohyun Kim \normalsize <\texttt{nomos at ktug org}> \and \normalsize <\url{http://github.com/dohyunkim/xetexko}>} -\date{Version 3.2\quad 2021/04/08} +\date{Version 3.3\quad 2021/04/20} \maketitle \begin{quote}\small @@ -490,10 +490,10 @@ horizontal 환경에는 가로쓰기 박스의 너비를 인자로 주어야 한 간단한 일본어, 중국어 문단 정도를 식자하는 데도 이 환경을 이용할 수 있으나 각 언어의 전용 패키지들에 비해 기능이 많이 모자란다.\footnote{% - 그러나 \texttt{japanese}, \texttt{chinese} 환경이 여전히 제공된다. - 특히 중국어 간체를 식자할 때는 \texttt{chinese}를 명시적으로 이용하는 게 좋다. - \texttt{Schinese} 환경은 \texttt{chinese}의 다른 이름이다. - \texttt{Tchinese}도 호환성을 위해 남겨두었다. } + 그러나 \texttt{japanese}, \texttt{Schinese}, \texttt{Tchinese} 환경이 여전히 제공된다. + \texttt{chinese}는 \texttt{Schinese}의 다른 이름이다. + 특히 중국어 폰트를 사용할 때는 \texttt{Schinese}나 \texttt{Tchinese}를 명시하는 게 좋다. + } \begin{plaintex} 플레인텍에서는 다음 방식으로 사용한다. @@ -673,11 +673,11 @@ microtype 패키지의 protrusion 기능이 잘 작동하지 않는 경우가 따위를 사용한다. \section{밑줄긋기} -\uwave{ulem 패키지}를 로드하는 것만으로 자동 지원된다. +\LaTeX 에서는 \uwave{ulem 패키지}를 로드하는 것만으로 자동 지원된다. + +\cs{xetexkoulemsupport} 명령이 \vernote{3.3}3.3 버전부터 부활하였으므로 +플레인텍에서는 이 명령을 명시해야 할 경우가 있을 것이다. -3.0 버전부터는\vernote{3.0} \cs{xetexkoulemsupport} 선언이 -불필요하게 되었다. 이 명령은 호환성을 위해 남겨두었으나 아무 일도 -하지 않는다. %\hfill \fboxsep=-\fboxrule \fbox{\vbox to1em{\hbox to1em{\hss}\vss}} @@ -687,6 +687,11 @@ microtype 패키지의 protrusion 기능이 잘 작동하지 않는 경우가 \begin{small}\linespread{1.2}\selectfont \begin{description}\itemsep=0pt + \item[v3.3] 2021-04-20 + \begin{itemize} + \item \cs{xetexkoulemsupport} 명령 부활 + \item `㉾' 등 한글기호를 \verb=cjksymbols=에 할당 + \end{itemize} \item[v3.2] 2021-04-08 \begin{itemize} \item 매달린 구두점이 기본값으로 따옴표에는 작동하지 않고 마침표^^b7쉼표에만 작동한다. diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty index 63108b667c2..67de1e2aa98 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/04/08 v3.2 typesetting Korean with XeTeX] + \ProvidesPackage{xetexko}[2021/04/20 v3.3 typesetting Korean with XeTeX] \else \ifdefined\@tempcnta\else \newcount\@tempcnta \fi \ifdefined\@gobble\else \def\@gobble#1{} \fi @@ -33,8 +33,8 @@ \newXeTeXintercharclass\XeTeXcharclassOP \newXeTeXintercharclass\XeTeXcharclassCL \newXeTeXintercharclass\XeTeXcharclassEX -\let\XeTeXcharclassIS\XeTeXcharclassID -\let\XeTeXcharclassNS\XeTeXcharclassID +\let\XeTeXcharclassIS\XeTeXcharclassCJ +\let\XeTeXcharclassNS\XeTeXcharclassCJ \newXeTeXintercharclass\XeTeXcharclassCM \input load-unicode-xetex-classes % @@ -99,6 +99,7 @@ % ascii colons \XeTeXcharclass "3A=\XeTeXcharclassAM % : COLON \XeTeXcharclass "3B=\XeTeXcharclassAM % ; SEMICOLON +\XeTeXcharclass "7E=\XeTeXcharclassAM % ~ TILDE % ascii hyphen \XeTeXcharclass "2D =\XeTeXcharclassAH % - \XeTeXcharclass "2F =\XeTeXcharclassAH % / @@ -115,6 +116,10 @@ % \XeTeXcharclass "2019=\XeTeXcharclassCL % ’ RIGHT SINGLE QUOTATION MARK \XeTeXcharclass "201D=\XeTeXcharclassCL % ” RIGHT DOUBLE QUOTATION MARK +% IS : these are not expected to be input +\XeTeXcharclass "FE10=\XeTeXcharclassCL % ︐ PRESENTATION FORM FOR VERTICAL COMMA +\XeTeXcharclass "FE13=\XeTeXcharclassVC % ︓ PRESENTATION FORM FOR VERTICAL COLON +\XeTeXcharclass "FE14=\XeTeXcharclassVC % ︔ PRESENTATION FORM FOR VERTICAL SEMICOLON % NS \XeTeXcharclass "00B7=\XeTeXcharclassMD % · MIDDLE DOT \XeTeXcharclass "30FB=\XeTeXcharclassMD % ・ KATAKANA MIDDLE DOT @@ -133,26 +138,50 @@ \XeTeXcharclass "2015=\XeTeXcharclassLD % ― HORIZONTAL BAR \XeTeXcharclass "2025=\XeTeXcharclassLD % ‥ TWO DOT LEADER \XeTeXcharclass "2026=\XeTeXcharclassLD % … HORIZONTAL ELLIPSIS +\XeTeXcharclass "FF5E=\XeTeXcharclassLD % ~ FULLWIDTH TILDE : KS symbol +\XeTeXcharclass "3003=\XeTeXcharclassLD % 〃 DITTO MARK : KS symbol % 결락기호 \XeTeXcharclass "25A1=\XeTeXcharclassID % □ % some KS symbols +\XeTeXcharclass "00AE=\XeTeXcharclassSY % ® +\XeTeXcharclass "00B0=\XeTeXcharclassSY % ° +\XeTeXcharclass "2030=\XeTeXcharclassSY % ‰ +\XeTeXcharclass "2032=\XeTeXcharclassSY % ′ +\XeTeXcharclass "2033=\XeTeXcharclassSY % ″ \XeTeXcharclass "203B=\XeTeXcharclassSY % ※ \XeTeXcharclass "2103=\XeTeXcharclassSY % ℃ \XeTeXcharclass "2109=\XeTeXcharclassSY % ℉ \XeTeXcharclass "2113=\XeTeXcharclassSY % ℓ +\XeTeXcharclass "2116=\XeTeXcharclassSY % № \XeTeXcharclass "2121=\XeTeXcharclassSY % ℡ \XeTeXcharclass "2122=\XeTeXcharclassSY % ™ -\XeTeXcharclass "212B=\XeTeXcharclassSY % Å -\count@="2160 \loop % Ⅰ..Ⅻ +\count@="2160 \loop % Ⅰ..Ⅹ \XeTeXcharclass\count@=\XeTeXcharclassSY - \ifnum\count@<"216B \advance\count@\@ne \repeat -\count@="2170 \loop % ⅰ..ⅻ + \ifnum\count@<"2169 \advance\count@\@ne \repeat +\count@="2170 \loop % ⅰ..ⅹ \XeTeXcharclass\count@=\XeTeXcharclassSY - \ifnum\count@<"217B \advance\count@\@ne \repeat -\XeTeXcharclass "223C=\XeTeXcharclassSY % ∼ -\count@="2460 \loop % ①..⓪ + \ifnum\count@<"2179 \advance\count@\@ne \repeat +\count@="2190 \loop % ←..↙ \XeTeXcharclass\count@=\XeTeXcharclassSY - \ifnum\count@<"24EA \advance\count@\@ne \repeat + \ifnum\count@<"2199 \advance\count@\@ne \repeat +\XeTeXcharclass "21D2=\XeTeXcharclassSY % ⇒ +\XeTeXcharclass "21D4=\XeTeXcharclassSY % ⇔ +\XeTeXcharclass "2225=\XeTeXcharclassSY % ∥ +\XeTeXcharclass "226A=\XeTeXcharclassSY % ≪ 꽉찬 전각! 어디에 배정해야 하나? +\XeTeXcharclass "226B=\XeTeXcharclassSY % ≫ 꽉찬 전각! 어디에 배정해야 하나? +\XeTeXcharclass "2299=\XeTeXcharclassSY % ⊙ +\count@="2460 \loop % ①..⑮ + \XeTeXcharclass\count@=\XeTeXcharclassSY + \ifnum\count@<"246E \advance\count@\@ne \repeat +\count@="2474 \loop % ⑴..⒂ + \XeTeXcharclass\count@=\XeTeXcharclassSY + \ifnum\count@<"2482 \advance\count@\@ne \repeat +\count@="249C \loop % ⒜..⒵ + \XeTeXcharclass\count@=\XeTeXcharclassSY + \ifnum\count@<"24B5 \advance\count@\@ne \repeat +\count@="24D0 \loop % ⓐ..ⓩ + \XeTeXcharclass\count@=\XeTeXcharclassSY + \ifnum\count@<"24E9 \advance\count@\@ne \repeat \XeTeXcharclass "2500 = \XeTeXcharclassSY % ─ \XeTeXcharclass "2501 = \XeTeXcharclassSY % ━ \XeTeXcharclass "2502 = \XeTeXcharclassSY % │ @@ -204,22 +233,30 @@ \XeTeXcharclass "266A = \XeTeXcharclassSY % ♪ \XeTeXcharclass "266C = \XeTeXcharclassSY % ♬ \XeTeXcharclass "266D = \XeTeXcharclassSY % ♭ -\XeTeXcharclass "3012 = \XeTeXcharclassSY % 〒 -\XeTeXcharclass "301C = \XeTeXcharclassSY % 〜 +\XeTeXcharclass "3013 = \XeTeXcharclassSY % 〓 +\count@="3200 \loop % ㈀..㈞ + \XeTeXcharclass\count@=\XeTeXcharclassSY + \ifnum\count@<"321E \advance\count@\@ne \repeat +\count@="3260 \loop % ㉠..㉿ + \XeTeXcharclass\count@=\XeTeXcharclassSY + \ifnum\count@<"327F \advance\count@\@ne \repeat +\XeTeXcharclass "33C2 = \XeTeXcharclassSY % ㏂ +\XeTeXcharclass "33C7 = \XeTeXcharclassSY % ㏇ +\XeTeXcharclass "33D8 = \XeTeXcharclassSY % ㏘ \XeTeXcharclass "FF04 = \XeTeXcharclassSY % $ \XeTeXcharclass "FF05 = \XeTeXcharclassSY % % -\XeTeXcharclass "FF5E = \XeTeXcharclassSY % ~ +\XeTeXcharclass "FF3C = \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} +\def\XeKo@halfzero {\hskip 2\XeKo@quarterdim \relax} +\def\XeKo@halfhalf {\hskip 2\XeKo@quarterdim minus 2\XeKo@quarterdim \relax} +\def\XeKo@halfquarter {\hskip 2\XeKo@quarterdim minus \XeKo@quarterdim \relax} +\def\XeKo@quarterquarter {\hskip \XeKo@quarterdim minus \XeKo@quarterdim \relax} +\def\XeKo@iiiquarterquarter{\hskip 3\XeKo@quarterdim minus \XeKo@quarterdim \relax} \let\XeKo@nobreak\nobreak \def\XKinterhangulbreak{% compat @@ -242,20 +279,21 @@ \ifdefined\xetexkohu \xetexkohu plus .5\dimexpr\xetexkohu\relax minus.25\dimexpr\xetexkohu\relax \else - \XeKo@halfdim plus .5\XeKo@halfdim minus.25\XeKo@halfdim + \XeKo@quarterdim plus .5\XeKo@quarterdim minus.25\XeKo@quarterdim \fi + \relax } \def\XeKo@latincjk@modern{% - \hskip \ifdefined\xetexkohu \xetexkohu \else \XeKo@halfdim \fi + \hskip \ifdefined\xetexkohu \xetexkohu \else \XeKo@quarterdim \fi \XeKo@stretchshrink } \def\XeKo@postmath@modern{% - \hskip 2\ifdefined\xetexkohu \dimexpr\xetexkohu\relax \else \XeKo@halfdim \fi + \hskip 2\ifdefined\xetexkohu \dimexpr\xetexkohu\relax \else \XeKo@quarterdim \fi \XeKo@stretchshrink } % 고아글자 억제. verbatim 에서는 이 명령을 꺼야 한다 -\def\XeKo@suppress@char@orphan{% +\def\XeKo@suppress@linebreak{% \XeKo@skip@=\lastskip \unskip \XeKo@count@=\lastpenalty \unpenalty \ifnum\XeKo@count@<5000 \XeKo@count@=5000 \fi @@ -268,8 +306,8 @@ % typesetting modes \protected\def\typesetclassic{% \chardef\XeKo@typesetclassic\@ne - \def\XeKo@halfdim{\dimexpr.25em\relax}% - \def\XeKo@stretchshrink{plus.08em minus.04em}% + \def\XeKo@quarterdim{\dimexpr.25em\relax}% + \def\XeKo@stretchshrink{plus.08em minus.04em\relax}% \let\XeKo@latincjk\XeKo@latincjk@classic \let\XeKo@postmath\XeKo@latincjk@classic \XeTeXlinebreakpenalty=\z@ @@ -278,8 +316,8 @@ } \protected\def\typesetmodern{% \chardef\XeKo@typesetclassic\z@ - \def\XeKo@halfdim{\dimexpr.05em\relax}% - \def\XeKo@stretchshrink{plus.04em minus.02em}% + \def\XeKo@quarterdim{\dimexpr.05em\relax}% + \def\XeKo@stretchshrink{plus.04em minus.02em\relax}% \let\XeKo@latincjk\XeKo@latincjk@modern \let\XeKo@postmath\XeKo@postmath@modern \XeTeXlinebreakpenalty=50 @@ -288,14 +326,21 @@ \typesetmodern \let\japanese\typesetclassic -\protected\def\Tchinese{\typesetclassic\parindent=2em } -\protected\def\Schinese{\typesetclassic\parindent=2em - \chardef\XeKo@typesetSchinese\@ne +\protected\def\Tchinese{% + \typesetclassic + \chardef\XeKo@typesetSTchinese\tw@ + \XeKo@Tchinese@classes + \parindent=2em + } +\protected\def\Schinese{% + \typesetclassic + \chardef\XeKo@typesetSTchinese\@ne \ifnum\XeKo@typesetvertical=\@ne \XeKo@Schinese@vertical \else \XeKo@Schinese@horizontal \fi + \parindent=2em } \let\chinese\Schinese \def\XeKo@Schinese@horizontal{% these glyphs in simplified chinese fonts are left-aligned. @@ -310,22 +355,34 @@ \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ; \XeTeXcharclass "FF1F = \XeTeXcharclassEX % ? } +\def\XeKo@Tchinese@classes{% these glyphs in traditional chinese fonts are center-aligned + \XeTeXcharclass "3001 = \XeTeXcharclassMD % 、 + \XeTeXcharclass "3002 = \XeTeXcharclassMD % 。 + \XeTeXcharclass "FF0C = \XeTeXcharclassMD % , + \XeTeXcharclass "FF0E = \XeTeXcharclassMD % . + } \chardef\XeKo@typesetvertical\z@ -\chardef\XeKo@typesetSchinese\z@ +\chardef\XeKo@typesetSTchinese\z@ \protected\def\typesetvertical{% \chardef\XeKo@typesetvertical\@ne \XeTeXcharclass "FF1A = \XeTeXcharclassVC % : \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ; - \ifnum\XeKo@typesetSchinese=\@ne \XeKo@Schinese@vertical \fi - \parindent=1em + \ifcase\XeKo@typesetSTchinese + \parindent=1em + \or \XeKo@Schinese@vertical + \or \XeKo@Tchinese@classes + \fi } \protected\def\typesethorizontal{% \chardef\XeKo@typesetvertical\z@ \XeTeXcharclass "FF1A = \XeTeXcharclassMD % : \XeTeXcharclass "FF1B = \XeTeXcharclassMD % ; - \ifnum\XeKo@typesetSchinese=\@ne \XeKo@Schinese@horizontal \fi + \ifcase\XeKo@typesetSTchinese + \or \XeKo@Schinese@horizontal + \or \XeKo@Tchinese@classes + \fi \parindent\z@ } \protected\def\vertical#1{% @@ -552,11 +609,12 @@ \ifnum\XeKo@charslot="FFFF % 다음 한 줄이 없으면 한글과 한글 사이에 폰트가 변경되는 경우 글자 누락. % 폰트 변경은 kern 에 아무 영향을 주지 않기 때문. - \def\XeKo@maybe@gobble{\def\XeKo@maybe@gobble{% - \ifdefined\XeKo@curr@font\expandafter\XeKo@maybe@gobble@\fi }}% + \let\XeKo@maybe@gobble\relax \expandafter\XeKo@flush@toks \else - \ifnum\XeKo@currclass>\tw@ + \let\XeKo@maybe@gobble\XeKo@do@maybe@gobble + \ifnum 0\ifnum\XeKo@currclass>4 \ifnum\XeKo@currclass<11 % AA..AH + 1\fi\fi >\z@ \expandafter\expandafter\expandafter\XeKo@check@next@tok@latin \else % HG ID \expandafter\expandafter\expandafter\XeKo@check@next@tok@cjk @@ -574,7 +632,10 @@ \def\XeKo@check@next@tok@latin{% % load-unicode-xetex-classes가 설정하는 모든 CM은 한글, 한자, 가나 뒤에 온다. % 따라서 영문자는 CM을 고려할 필요가 없다. - \ifnum\XeTeXcharclass\XeKo@charslot=\csname XeKo@\XeKo@currclass @class\endcsname + % 아니다!!! 위에서 FE00-FE0F를 CM으로 지정했으므로 CJK에 한정되지 않는다. + \ifnum 0% + \ifnum\XeTeXcharclass\XeKo@charslot=\csname XeKo@\XeKo@currclass @class\endcsname 1\else + \ifnum\XeTeXcharclass\XeKo@charslot=\XeTeXcharclassCM 1\fi\fi >\z@ \expandafter\XeKo@addto@toks \else \expandafter\XeKo@flush@toks @@ -600,7 +661,7 @@ } \def\XeKo@char@orphan{% \ifx\XeKo@let@token\par - \XeKo@suppress@char@orphan + \XeKo@suppress@linebreak \let\XeKo@next\XeKo@flush@char@orphan \else \ifx\@sptoken\XeKo@let@token \XeKo@toks@ii\expandafter{\the\XeKo@toks@ii \@sptoken}% @@ -627,7 +688,7 @@ } \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@flush@char@orphan{\expandafter \XeKo@do@flush@toks \the\XeKo@toks@ii } \def\XeKo@char@raise@start{% \ifdefined\xetexkocharraise \ifx\XeKo@curr@font\XeKo@latin@font\else @@ -655,7 +716,21 @@ \ifnum\XeKo@currclass=\tw@ \XeKo@everyhanja{\the\XeKo@toks@}% everyhanja \else - \the\XeKo@toks@ + \ifnum\XeKo@compresspuncts=\@ne + \ifnum\XeKo@currclass=11 % OP + \hbox to.5em\bgroup\hss \the\XeKo@toks@ \egroup + \else\ifnum\XeKo@currclass=12 % CL + \hbox to.5em\bgroup \the\XeKo@toks@ \hss\egroup + \else\ifnum\XeKo@currclass=13 % MD + \hbox to.5em\bgroup\hss \the\XeKo@toks@ \hss\egroup + \else\ifnum\XeKo@currclass=14 % FS + \hbox to.5em\bgroup \the\XeKo@toks@ \hss\egroup + \else + \the\XeKo@toks@ + \fi\fi\fi\fi + \else + \the\XeKo@toks@ + \fi \fi \fi \XeKo@char@raise@stop % charraise @@ -663,13 +738,8 @@ \XeKo@post@hang % hanging punctuations \fi \endgroup - \ifnum\XeKo@currclass<\thr@@ % \the\XeKo@toks@ii - \expandafter\expandafter\expandafter\XeKo@maybe@kern@i - \else - \expandafter\XeKo@maybe@kern@i - \fi + \futurelet\XeKo@let@token\XeKo@maybe@kern@ii } -\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 @@ -855,72 +925,57 @@ \def\XeKo@startOP#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\hss #1\egroup}% - \else - \XeKo@toks@{#1}% - \fi + \XeKo@toks@{#1}% \XeKo@def@pre@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@startCL#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 #1\hss\egroup}% - \else - \XeKo@toks@{#1}% - \fi + \XeKo@toks@{#1}% \XeKo@def@post@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@startMD#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\hss #1\hss\egroup}% - \else - \XeKo@toks@{#1}% - \fi + \XeKo@toks@{#1}% \XeKo@def@post@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@startFS#1{% \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined \def\XeKo@currclass{14}% - \ifnum\XeKo@compresspuncts=\@ne - \XeKo@toks@{\hbox to.5em\bgroup #1\hss\egroup}% - \else - \XeKo@toks@{#1}% - \fi + \XeKo@toks@{#1}% \XeKo@def@post@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@startEX#1{% \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined \def\XeKo@currclass{15}% \XeKo@toks@{#1}% \XeKo@def@post@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@startLD#1{% \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined \def\XeKo@currclass{16}% \XeKo@toks@{#1}% \XeKo@def@post@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@startVC#1{% \let\XeKo@pre@hang\XeKo@undefined \let\XeKo@post@hang\XeKo@undefined \def\XeKo@currclass{17}% \XeKo@toks@{#1}% \XeKo@def@post@hang{#1}% - \XeKo@do@flush@toks + \XeKo@check@next@tok } \def\XeKo@maybe@gobble{% \ifdefined\XeKo@curr@font\expandafter\XeKo@maybe@gobble@\fi } +\let\XeKo@do@maybe@gobble\XeKo@maybe@gobble \def\XeKo@maybe@gobble@{% \expandafter\expandafter\expandafter\@gobble } @@ -933,7 +988,7 @@ \or \or \unkern\unkern % SY HG \or \unkern\unkern \XeKo@latincjk % AA HG - \or \unkern\unkern \XeKo@nobreak % AO HG + \or \unkern\unkern % AO HG \or \unkern\unkern \XeKo@latincjk % AC HG \or \unkern\unkern \XeKo@latincjk % AP HG \or \unkern\unkern \XeKo@latincjk % AM HG @@ -959,7 +1014,7 @@ \or \or \unkern\unkern % SY ID \or \unkern\unkern \XeKo@latincjk % AA ID - \or \unkern\unkern \XeKo@nobreak % AO ID + \or \unkern\unkern % AO ID \or \unkern\unkern \XeKo@latincjk % AC ID \or \unkern\unkern \XeKo@latincjk % AP ID \or \unkern\unkern \XeKo@latincjk % AM ID @@ -980,23 +1035,23 @@ \XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassCJ{% \ifnum\lastnodetype=12 % \ifcase\lastkern - \or \unkern\unkern \XKinterhanjabreak % HG CJ - \or \unkern\unkern \XKinterhanjabreak\XeKo@suppress@char@orphan \XeKo@maybe@gobble % ID CJ + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % HG CJ + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak \XeKo@maybe@gobble % ID CJ \or - \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 \XKinterhanjabreak % 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 + \or \unkern\unkern % SY CJ + \or \unkern\unkern \XeKo@latincjk % AA CJ + \or \unkern\unkern % 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 \XKinterhanjabreak % AH CJ + \or \unkern\unkern % OP CJ + \or \unkern\unkern \XeKo@halfhalf \XeKo@suppress@linebreak % CL CJ + \or \unkern\unkern \XeKo@quarterquarter \XeKo@suppress@linebreak % MD CJ + \or \unkern\unkern \XeKo@halfzero \XeKo@suppress@linebreak % FS CJ + \or \unkern\unkern \XeKo@halfhalf \XeKo@suppress@linebreak % EX CJ + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % LD CJ + \or \unkern\unkern \XeKo@quarterquarter \XeKo@suppress@linebreak % VC CJ \fi \else\ifnum\lastnodetype=10 % mathoff \XeKo@postmath @@ -1011,7 +1066,7 @@ \or \or \unkern\unkern \XeKo@maybe@gobble % SY SY \or \unkern\unkern % AA SY - \or \unkern\unkern \XeKo@nobreak % AO SY + \or \unkern\unkern % AO SY \or \unkern\unkern \XeKo@latincjk % AC SY \or \unkern\unkern \XeKo@latincjk % AP SY \or \unkern\unkern \XeKo@latincjk % AM SY @@ -1300,23 +1355,23 @@ \XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassLD{% \ifnum\lastnodetype=12 % \ifcase\lastkern - \or \unkern\unkern % HG LD - \or \unkern\unkern % ID LD + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % HG LD + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % ID LD \or - \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 % 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@halfhalf \XeKo@suppress@linebreak % CL LD + \or \unkern\unkern \XeKo@quarterquarter \XeKo@suppress@linebreak % MD LD + \or \unkern\unkern \XeKo@halfzero \XeKo@suppress@linebreak % FS LD + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % EX LD \or \unkern\unkern \XeKo@maybe@gobble % LD LD - \or \unkern\unkern % VC LD + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % VC LD \fi \fi \XeKo@fontLD\XeKo@startLD @@ -1375,25 +1430,62 @@ \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 + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % HG + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % ID + \or + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % SY + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % AA + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % AO + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % AC + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % AP + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % AM + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % AH + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % OP + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % CL + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % MD + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % FS + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % EX + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % LD + \or \unkern\unkern \expandafter\expandafter\expandafter\XeKo@startCM % VC \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 + \ifnum\lastnodetype=\@ne % hbox + \ifdefined\xetexkocharraise + \setbox\XeKo@box@=\lastbox % charraise box + \XeKo@char@raise@start + \unhbox\XeKo@box@ + \ifnum\lastnodetype=\@ne % hbox again + \XeKo@rebox@punctbox{#1}% compressed punctuation box + \else + #1\relax + \fi + \XeKo@char@raise@stop + \else + \XeKo@rebox@punctbox{#1}% compressed punctuation box + \fi \else #1\relax \fi \endgroup \XeKo@insert@kerns } +\def\XeKo@rebox@punctbox#1{% + \ifnum 0\ifnum\XeKo@currclass>10 \ifnum\XeKo@currclass<15 + 1\fi\fi >\z@ + \setbox\XeKo@box@=\lastbox + \hbox to.5em\bgroup + \unhbox\XeKo@box@ + \XeKo@skip@\lastskip \unskip + #1\hskip\XeKo@skip@ + \egroup + \else + #1\relax + \fi + } %%% josa selection \begingroup @@ -1633,7 +1725,7 @@ \let\XeKo@latincjk@classic \inhibitglue \let\XeKo@latincjk@modern \inhibitglue \let\XeKo@postmath@modern \inhibitglue - \let\XeKo@suppress@char@orphan \relax + \let\XeKo@suppress@linebreak \relax \chardef\XeKo@cjk@ignorespaces \z@ \chardef\XeKo@compresspuncts \z@ } @@ -1651,8 +1743,64 @@ % no longer support these two \disable... \let\disableautojosa\relax \let\disablejamoautojosa\relax -% no need xetexkoulemsupport any more -\let\xetexkoulemsupport\relax +% ulem support +\ifcsname ver@xetexko.sty\endcsname + \def\xetexkoulemsupport{% + \ifdefined\UL@hook + \UL@hook\expandafter{% + \the\UL@hook + \let\XeKo@char@orphan\XeKo@flush@char@orphan + % uline 안에서 폰트가 변경되는 경우를 대비 + \expandafter\def\expandafter\XeKo@hangul@selectfont\expandafter{% + \XeKo@hangul@selectfont + \ifdefined\XeKo@in@selectfont\else + \global\let\XeKo@temp@hangul@font\XeKo@hangul@font + \gdef\XeKo@UL@hangul@font{\let\XeKo@hangul@font\XeKo@temp@hangul@font}% + \aftergroup\aftergroup\aftergroup\XeKo@UL@hangul@font + \fi }% + \expandafter\def\expandafter\XeKo@hanja@selectfont\expandafter{% + \XeKo@hanja@selectfont + \ifdefined\XeKo@in@selectfont\else + \global\let\XeKo@temp@hanja@font\XeKo@hanja@font + \gdef\XeKo@UL@hanja@font{\let\XeKo@hanja@font\XeKo@temp@hanja@font}% + \aftergroup\aftergroup\aftergroup\XeKo@UL@hanja@font + \fi }% + \expandafter\def\expandafter\XeKo@latin@selectfont\expandafter{% + \XeKo@latin@selectfont + \ifdefined\XeKo@in@selectfont\else + \global\let\XeKo@temp@latin@font\XeKo@latin@font + \gdef\XeKo@UL@latin@font{\let\XeKo@latin@font\XeKo@temp@latin@font}% + \aftergroup\aftergroup\aftergroup\XeKo@UL@latin@font + \fi }% + }% + \fi + } +\else + \let\XeKo@UL@hangul@patch\relax + \let\XeKo@UL@hanja@patch \relax + \def\xetexkoulemsupport{% + \ifdefined\UL@hook + \UL@hook\expandafter{% + \the\UL@hook + \let\XeKo@char@orphan\XeKo@flush@char@orphan + \def\XeKo@UL@hangul@patch{% + \global\let\XeKo@temp@hangul@font\XeKo@hangul@font + \global\let\XeKo@temp@latin@font\XeKo@latin@font + \gdef\XeKo@UL@hangul@font{% + \let\XeKo@hangul@font\XeKo@temp@hangul@font + \let\XeKo@latin@font\XeKo@temp@latin@font }% + \aftergroup\aftergroup\aftergroup\XeKo@UL@hangul@font }% + \def\XeKo@UL@hanja@patch{% + \global\let\XeKo@temp@hanja@font\XeKo@hanja@font + \global\let\XeKo@temp@latin@font\XeKo@latin@font + \gdef\XeKo@UL@hanja@font{% + \let\XeKo@hanja@font\XeKo@temp@hanja@font + \let\XeKo@latin@font\XeKo@temp@latin@font }% + \aftergroup\aftergroup\aftergroup\XeKo@UL@hanja@font }% + }% + \fi + } +\fi % math hangul \def\setmathhangulblock#1#2{% @@ -1669,13 +1817,21 @@ \afterassignment\XeKo@hangulfont@setup\font\XeKo@hangul@font } \def\XeKo@hangulfont@setup{% - \expandafter\let\expandafter\XeKo@latin@font\the\font + \ifdefined\XeKo@curr@font + \ifx\XeKo@curr@font\XeKo@hangul@font\else + \ifx\XeKo@curr@font\XeKo@hanja@font\else + \expandafter\let\expandafter\XeKo@latin@font\the\font + \fi\fi + \else + \expandafter\let\expandafter\XeKo@latin@font\the\font + \fi \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 }% + \XeKo@UL@hangul@patch } \protected\def\sethangulfont#1{% \def\@tempa{#1}% @@ -1685,26 +1841,43 @@ } \def\XeKo@sethangulfont@setup{% \expandafter\edef\@tempa{% - \let\noexpand\XeKo@latin@font=\the\font + \let\noexpand\XeKo@latin@font=% + \ifdefined\XeKo@curr@font + \ifx\XeKo@curr@font\XeKo@hangul@font \the\XeKo@latin@font \else + \ifx\XeKo@curr@font\XeKo@hanja@font \the\XeKo@latin@font \else + \the\font + \fi\fi + \else + \the\font + \fi \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 }% + \noexpand\XeKo@UL@hangul@patch }% } \protected\def\hanjafont{% \afterassignment\XeKo@hanjafont@setup\font\XeKo@hanja@font } \def\XeKo@hanjafont@setup{% - \expandafter\let\expandafter\XeKo@latin@font\the\font + \ifdefined\XeKo@curr@font + \ifx\XeKo@curr@font\XeKo@hangul@font\else + \ifx\XeKo@curr@font\XeKo@hanja@font\else + \expandafter\let\expandafter\XeKo@latin@font\the\font + \fi\fi + \else + \expandafter\let\expandafter\XeKo@latin@font\the\font + \fi \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 }% + \XeKo@UL@hanja@patch } \protected\def\sethanjafont#1{% \def\@tempa{#1}% @@ -1714,13 +1887,22 @@ } \def\XeKo@sethanjafont@setup{% \expandafter\edef\@tempa{% - \let\noexpand\XeKo@latin@font=\the\font + \let\noexpand\XeKo@latin@font=% + \ifdefined\XeKo@curr@font + \ifx\XeKo@curr@font\XeKo@hangul@font \the\XeKo@latin@font \else + \ifx\XeKo@curr@font\XeKo@hanja@font \the\XeKo@latin@font \else + \the\font + \fi\fi + \else + \the\font + \fi \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 }% + \noexpand\XeKo@UL@hanja@patch }% } \protected\def\hanjabyhangulfont{\let\XeKo@hanja@font\XeKo@hangul@font } @@ -2257,6 +2439,7 @@ \ifdefined\XeKo@hanja@font\else \let\XeKo@hanja@font \XeKo@hangul@font \fi + \@ifpackageloaded{ulem}{\xetexkoulemsupport}{} \@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{% \let\hangulalphs\relax \let\hangulnums\relax |