diff options
Diffstat (limited to 'macros/xetex/generic')
-rw-r--r-- | macros/xetex/generic/xetexko/ChangeLog | 7 | ||||
-rw-r--r-- | macros/xetex/generic/xetexko/README | 2 | ||||
-rw-r--r-- | macros/xetex/generic/xetexko/xetexko-doc.pdf | bin | 254362 -> 254326 bytes | |||
-rw-r--r-- | macros/xetex/generic/xetexko/xetexko-doc.tex | 7 | ||||
-rw-r--r-- | macros/xetex/generic/xetexko/xetexko.sty | 103 |
5 files changed, 61 insertions, 58 deletions
diff --git a/macros/xetex/generic/xetexko/ChangeLog b/macros/xetex/generic/xetexko/ChangeLog index 8bd1ebb212..3bf0a6d42f 100644 --- a/macros/xetex/generic/xetexko/ChangeLog +++ b/macros/xetex/generic/xetexko/ChangeLog @@ -1,3 +1,10 @@ +2021-05-20 Dohyun Kim <nomos at ktug org> + + Version 3.5 + + * internal changes regarding font-switching method + (remove Xeko@maybe@gobble) + 2021-05-15 Dohyun Kim <nomos at ktug org> Version 3.4 diff --git a/macros/xetex/generic/xetexko/README b/macros/xetex/generic/xetexko/README index 9cae875e93..4c6fb27c10 100644 --- a/macros/xetex/generic/xetexko/README +++ b/macros/xetex/generic/xetexko/README @@ -1,4 +1,4 @@ -XeTeX-ko Package version 3.4 (2021/05/15) +XeTeX-ko Package version 3.5 (2021/05/20) ========================================= XeTeX-ko is a macro package for Xe(La)TeX which supports typesetting diff --git a/macros/xetex/generic/xetexko/xetexko-doc.pdf b/macros/xetex/generic/xetexko/xetexko-doc.pdf Binary files differindex d20c61d0da..40ea182bff 100644 --- a/macros/xetex/generic/xetexko/xetexko-doc.pdf +++ b/macros/xetex/generic/xetexko/xetexko-doc.pdf diff --git a/macros/xetex/generic/xetexko/xetexko-doc.tex b/macros/xetex/generic/xetexko/xetexko-doc.tex index 3aad0c1b2b..7969d1ca5a 100644 --- a/macros/xetex/generic/xetexko/xetexko-doc.tex +++ b/macros/xetex/generic/xetexko/xetexko-doc.tex @@ -67,10 +67,13 @@ \hangingpunctuations \begin{document} + +\latinparens + \title{\xetexko\ 간단 매뉴얼} \author{Dohyun Kim \normalsize <\texttt{nomos at ktug org}> \and \normalsize <\url{http://github.com/dohyunkim/xetexko}>} -\date{Version 3.4\quad 2021/05/15} +\date{Version 3.5\quad 2021/05/20} \maketitle \begin{quote}\small @@ -78,6 +81,8 @@ please see \verb+README+ file in this package. \end{quote} +\hangulparens + \section{입력 인코딩} 입력은 원칙적으로 UTF-8으로 한다. BOM (Byte Order Mark)은 있어도 좋고 없어도 좋다. diff --git a/macros/xetex/generic/xetexko/xetexko.sty b/macros/xetex/generic/xetexko/xetexko.sty index d2fc815549..ce95a1488b 100644 --- a/macros/xetex/generic/xetexko/xetexko.sty +++ b/macros/xetex/generic/xetexko/xetexko.sty @@ -16,10 +16,9 @@ \ifdefined\ProvidesPackage \NeedsTeXFormat{LaTeX2e}[2020/10/01] - \ProvidesPackage{xetexko}[2021/05/15 v3.4 typesetting Korean with XeTeX] + \ProvidesPackage{xetexko}[2021/05/20 v3.5 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 @@ -294,11 +293,13 @@ % 고아글자 억제. verbatim 에서는 이 명령을 꺼야 한다 \def\XeKo@suppress@linebreak{% - \XeKo@skip@=\lastskip \unskip - \XeKo@count@=\lastpenalty \unpenalty - \ifnum\XeKo@count@<5000 \XeKo@count@=5000 \fi - \penalty\XeKo@count@ - \hskip\XeKo@skip@ + \ifnum\lastnodetype=11 % glue node + \XeKo@skip@=\lastskip \unskip + \XeKo@count@=\lastpenalty \unpenalty + \ifnum\XeKo@count@<5000 \XeKo@count@=5000 \fi + \penalty\XeKo@count@ + \hskip\XeKo@skip@ + \fi } \protected\def\inhibitglue{\hskip\z@\XeKo@stretchshrink} @@ -325,16 +326,23 @@ } \typesetmodern -\let\japanese\typesetclassic +\chardef\XeKo@typesetvertical\z@ +\chardef\XeKo@STchineseJapanese\z@ % 0=KOR, 1=SC, 2=TC, 3=JPN + +\protected\def\japanese{% + \typesetclassic + \chardef\XeKo@STchineseJapanese\thr@@ + \XeTeXcharclass "FF1A = \XeTeXcharclassMD % : both horizontal and vertical glyphs + } \protected\def\Tchinese{% \typesetclassic - \chardef\XeKo@typesetSTchinese\tw@ + \chardef\XeKo@STchineseJapanese\tw@ \XeKo@Tchinese@classes \parindent=2em } \protected\def\Schinese{% \typesetclassic - \chardef\XeKo@typesetSTchinese\@ne + \chardef\XeKo@STchineseJapanese\@ne \ifnum\XeKo@typesetvertical=\@ne \XeKo@Schinese@vertical \else @@ -362,24 +370,22 @@ \XeTeXcharclass "FF0E = \XeTeXcharclassLD % . } -\chardef\XeKo@typesetvertical\z@ -\chardef\XeKo@typesetSTchinese\z@ - \protected\def\typesetvertical{% \chardef\XeKo@typesetvertical\@ne \XeTeXcharclass "FF1A = \XeTeXcharclassVC % : \XeTeXcharclass "FF1B = \XeTeXcharclassVC % ; - \ifcase\XeKo@typesetSTchinese + \ifcase\XeKo@STchineseJapanese \parindent=1em \or \XeKo@Schinese@vertical \or \XeKo@Tchinese@classes + \or \XeTeXcharclass "FF1A = \XeTeXcharclassMD % : \fi } \protected\def\typesethorizontal{% \chardef\XeKo@typesetvertical\z@ \XeTeXcharclass "FF1A = \XeTeXcharclassMD % : \XeTeXcharclass "FF1B = \XeTeXcharclassMD % ; - \ifcase\XeKo@typesetSTchinese + \ifcase\XeKo@STchineseJapanese \or \XeKo@Schinese@horizontal \or \XeKo@Tchinese@classes \fi @@ -496,8 +502,6 @@ \XeKo@latin@font \else \expandafter\ifx\the\font\XeKo@raw@hanja@font \XeKo@latin@font - \else - \expandafter\let\expandafter\XeKo@latin@font\the\font \fi\fi } \let\XeKo@fontHG\XeKo@font@Hangul @@ -634,12 +638,8 @@ \def\XeKo@check@next@tok@{% \XeKo@get@charslot \ifnum\XeKo@charslot="FFFF - % 다음 한 줄이 없으면 한글과 한글 사이에 폰트가 변경되는 경우 글자 누락. - % 폰트 변경은 kern 에 아무 영향을 주지 않기 때문. - \let\XeKo@maybe@gobble\relax \expandafter\XeKo@flush@toks \else - \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 @@ -1003,15 +1003,10 @@ \XeKo@check@next@tok } -\def\XeKo@maybe@gobble{% - \expandafter\expandafter\expandafter\@gobble - } -\let\XeKo@do@maybe@gobble\XeKo@maybe@gobble - \XeTeXinterchartoks\XeTeXcharclassBoundary\XeTeXcharclassHG{% \ifnum\lastnodetype=12 % \ifcase\lastkern - \or \unkern\unkern \XKinterhangulbreak \XeKo@maybe@gobble % HG HG + \or \unkern\unkern \XKinterhangulbreak % HG HG \or \unkern\unkern \XKinterhanjabreak % ID HG \or \or \unkern\unkern % SY HG @@ -1038,7 +1033,7 @@ \ifnum\lastnodetype=12 % \ifcase\lastkern \or \unkern\unkern \XKinterhanjabreak % HG ID - \or \unkern\unkern \XKinterhanjabreak \XeKo@maybe@gobble % ID ID + \or \unkern\unkern \XKinterhanjabreak % ID ID \or \or \unkern\unkern % SY ID \or \unkern\unkern \XeKo@latincjk % AA ID @@ -1064,7 +1059,7 @@ \ifnum\lastnodetype=12 % \ifcase\lastkern \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % HG CJ - \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak \XeKo@maybe@gobble % ID CJ + \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % ID CJ \or \or \unkern\unkern % SY CJ \or \unkern\unkern \XeKo@latincjk % AA CJ @@ -1092,7 +1087,7 @@ \or \unkern\unkern % HG SY \or \unkern\unkern % ID SY \or - \or \unkern\unkern \XeKo@maybe@gobble % SY SY + \or \unkern\unkern % SY SY \or \unkern\unkern % AA SY \or \unkern\unkern % AO SY \or \unkern\unkern \XeKo@latincjk % AC SY @@ -1119,7 +1114,7 @@ \or \unkern\unkern \XeKo@latincjk % ID AA \or \or \unkern\unkern % SY AA - \or \unkern\unkern \XeKo@maybe@gobble % AA AA + \or \unkern\unkern % AA AA \or \unkern\unkern % AO AA \or \unkern\unkern % AC AA \or \unkern\unkern % AP AA @@ -1144,7 +1139,7 @@ \or \or \unkern\unkern \XeKo@latincjk % SY AO \or \unkern\unkern % AA AO - \or \unkern\unkern \XeKo@maybe@gobble % AO AO + \or \unkern\unkern % AO AO \or \unkern\unkern % AC AO \or \unkern\unkern % AP AO \or \unkern\unkern % AM AO @@ -1169,7 +1164,7 @@ \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 % AC AC \or \unkern\unkern % AP AC \or \unkern\unkern % AM AC \or \unkern\unkern % AH AC @@ -1194,7 +1189,7 @@ \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 % AP AP \or \unkern\unkern % AM AP \or \unkern\unkern % AH AP \or \unkern\unkern % OP AP @@ -1219,7 +1214,7 @@ \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 % AM AM \or \unkern\unkern % AH AM \or \unkern\unkern % OP AM \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % CL AM @@ -1244,7 +1239,7 @@ \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 % AH AH \or \unkern\unkern % OP AH \or \unkern\unkern \XeKo@nobreak\XeKo@halfhalf % CL AH \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD AH @@ -1269,7 +1264,7 @@ \or \unkern\unkern \XeKo@halfhalf % AP OP \or \unkern\unkern \XeKo@halfhalf % AM OP \or \unkern\unkern \XeKo@halfhalf % AH OP - \or \unkern\unkern \XeKo@maybe@gobble % OP OP + \or \unkern\unkern % OP OP \or \unkern\unkern \XeKo@halfhalf % CL OP \or \unkern\unkern \XeKo@quarterquarter % MD OP \or \unkern\unkern \XeKo@halfzero % FS OP @@ -1296,7 +1291,7 @@ \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 % CL CL \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % MD CL \or \unkern\unkern % FS CL \or \unkern\unkern % EX CL @@ -1321,7 +1316,7 @@ \or \unkern\unkern \XeKo@nobreak\XeKo@quarterquarter % 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@halfquarter % 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 @@ -1348,7 +1343,7 @@ \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 % FS FS \or \unkern\unkern % EX FS \or \unkern\unkern % LD FS \or \unkern\unkern % VC FS @@ -1373,7 +1368,7 @@ \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 % EX EX \or \unkern\unkern % LD EX \or \unkern\unkern % VC EX \fi @@ -1398,7 +1393,7 @@ \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 % LD LD \or \unkern\unkern \XKinterhanjabreak \XeKo@suppress@linebreak % VC LD \fi \fi @@ -1423,7 +1418,7 @@ \or \unkern\unkern % FS VC \or \unkern\unkern % EX VC \or \unkern\unkern % LD VC - \or \unkern\unkern \XeKo@maybe@gobble % VC VC + \or \unkern\unkern % VC VC \fi \fi \XeKo@fontVC\XeKo@startVC @@ -1776,14 +1771,12 @@ \def\xetexkoulemsupport{% \ifdefined\UL@hook \UL@hook\expandafter{\the\UL@hook - \let\XeKo@char@orphan\XeKo@flush@char@orphan - \let\XeKo@maybe@gobble\relax % 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}% + \xdef\XeKo@UL@hangul@font{% + \def\noexpand\XeKo@hangul@font{\unexpanded\expandafter{\XeKo@hangul@font}}}% \aftergroup\aftergroup\aftergroup\XeKo@UL@hangul@font % 여기서 라틴폰트 지정을 보존한다. \global\let\XeKo@UL@latin@font\font@name @@ -1792,8 +1785,8 @@ \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}% + \xdef\XeKo@UL@hanja@font{% + \def\noexpand\XeKo@hanja@font{\unexpanded\expandafter{\XeKo@hanja@font}}}% \aftergroup\aftergroup\aftergroup\XeKo@UL@hanja@font \fi }% }% @@ -1805,18 +1798,16 @@ \def\xetexkoulemsupport{% \ifdefined\UL@hook \UL@hook\expandafter{\the\UL@hook - \let\XeKo@char@orphan\XeKo@flush@char@orphan - \let\XeKo@maybe@gobble\relax % uline 안에서 폰트가 변경되는 경우를 대비 \def\XeKo@UL@hangul@patch{% - \global\let\XeKo@temp@hangul@font\XeKo@hangul@font - \gdef\XeKo@UL@hangul@font{\let\XeKo@hangul@font\XeKo@temp@hangul@font}% + \xdef\XeKo@UL@hangul@font{% + \def\noexpand\XeKo@hangul@font{\unexpanded\expandafter{\XeKo@hangul@font}}}% \aftergroup\aftergroup\aftergroup\XeKo@UL@hangul@font \XeKo@UL@latin@patch }% \def\XeKo@UL@hanja@patch{% - \global\let\XeKo@temp@hanja@font\XeKo@hanja@font - \gdef\XeKo@UL@hanja@font{\let\XeKo@hanja@font\XeKo@temp@hanja@font}% + \xdef\XeKo@UL@hanja@font{% + \def\noexpand\XeKo@hanja@font{\unexpanded\expandafter{\XeKo@hanja@font}}}% \aftergroup\aftergroup\aftergroup\XeKo@UL@hanja@font \XeKo@UL@latin@patch }% @@ -2514,7 +2505,7 @@ \RequirePackage{kolabels-utf} -\protected\def\hellipsis{\char"2026\char"2026 } +\protected\def\hellipsis{^^^^2026^^^^2026} \if@hangul \linespread{1.3888} |