diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/ChangeLog | 11 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.pdf | bin | 218628 -> 222140 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex | 41 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty | 559 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty | 99 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xetex/xetexko/xetexko.sty | 2 |
10 files changed, 368 insertions, 354 deletions
diff --git a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog index 5cce96b8786..3e66de6bfe4 100644 --- a/Master/texmf-dist/doc/xetex/xetexko/ChangeLog +++ b/Master/texmf-dist/doc/xetex/xetexko/ChangeLog @@ -1,3 +1,14 @@ +2014-05-11 Dohyun Kim <nomos at ktug org> + + Version 2.6 + + * xetexko-space.sty: assign U+FE00 block to IVS char as per + unicode 6.3 + * xetexko-font.sty: font option YetHangul is still there, but + YetHangul=Off has been removed + * xetexko-font.sty: use latex3 syntax for defining font commands; + remove dependency on xkeyval package + 2014-03-28 Dohyun Kim <nomos at ktug org> Version 2.5 diff --git a/Master/texmf-dist/doc/xetex/xetexko/README b/Master/texmf-dist/doc/xetex/xetexko/README index b695f16a8ca..d6f22cdc972 100644 --- a/Master/texmf-dist/doc/xetex/xetexko/README +++ b/Master/texmf-dist/doc/xetex/xetexko/README @@ -1,5 +1,5 @@ -XeTeX-ko Package version 2.4 (2014/03/28) +XeTeX-ko Package version 2.6 (2014/05/11) ========================================= XeTeX-ko is a macro package for Xe(La)TeX which supports typesetting @@ -25,7 +25,7 @@ Author ------ Please report any errors or suggestions to Dohyun Kim <nomos at ktug org> -or leave messages in the issue tracker at: +or leave messages in the issue tracker at: <http://github.com/dohyunkim/xetexko> 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 220f4d27315..fd1a04f7b51 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 fc3a7b59ea1..e4440b38aec 100644 --- a/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex +++ b/Master/texmf-dist/doc/xetex/xetexko/xetexko-doc.tex @@ -52,7 +52,7 @@ \title{\xetexko\ 간단 매뉴얼} \author{Dohyun Kim \normalsize <\texttt{nomos at ktug org}> \and \normalsize <\url{http://github.com/dohyunkim/xetexko}>} -\date{Version 2.5\quad\today} +\date{Version 2.6\quad 2014/05/11} \maketitle \begin{quote}\small @@ -248,20 +248,23 @@ latin, hangul, hanja, prevfont 가운데 하나를 허용한다. 명령에 이런 옵션을 쓸 수 있다. 허용되는 옵션은 다음과 같다. 각 항목의 길이값은 디폴트값을 뜻한다. \begin{description}\itemsep0pt -\item[hu] - 영문자와 한글 사이 간격. 영문 괄호와 한글 사이 간격은 그 두 배이다. 0.06em. -\item[interhchar] - {\addhangulfontfeature{interhchar=0.3em} 한글 자간.}% +\item[hu, InterLatinCJK] + 영문자와 한글 사이 간격을 지시한다. + 영문 괄호와 한글 사이 간격은 그 두 배이다. 0.06em. +\item[interhchar, InterHangul] + {\addhangulfontfeature{interhchar=0.3em} 한글 자간을} 지시한다.% \footnote{한자 자간 옵션은 제공하지 않는다. 혹시 한자 자간을 조절하고 싶다면 \cs{XKinterhanjabreak}을 재정의하라. 참고로 한글 자간을 조절하는 저수준 명령은 \cs{XKinterhangulbreak} 이다.} 0pt. -\item[charraise] 버전 2.2의 새로운 옵션으로 +\item[charraise, CharRaise] + 버전 2.2의 새로운 옵션으로 글자의 \hemph{\addhangulfontfeature{charraise=.5ex}수직 위치}를 조절한다. 다른 글꼴 관련 효과와 충돌할 수 있어 주의를 요한다. 0pt. -\item[lowerperiod] - CJK 문자 직후의 마침표를 아래로 끌어내리는 - {\addhangulfontfeature{lowerperiod=.5ex}정도. 0pt.} +\item[lowerperiod, PunctRaise] + \verb+lowerperiod+는 CJK 문자 직후의 마침표를 아래로 끌어내리는 + {\addhangulfontfeature{lowerperiod=.5ex}정도를 지시한다. + 반대로 \verb+PunctRaise+ 옵션은 끌어올리는 정도를 지시한다. 0pt.} \item[lowerquestion] CJK 문자 직후의 물음표를 아래로 끌어내리는 정도. 0pt. \item[lowerexclamation] @@ -368,7 +371,7 @@ CJK 구두점의 폭을 0.5em으로 강제설정하는 것을 방지한다. \begin{figure} \begin{example} - \hangulfontspec[YetHangul]{HCR Dotum LVT} + \hangulfontspec[Script=Hangul]{HCR Dotum LVT} \hanjabyhangulfont%\parindent1em \obeylines\leftskip10em 뎨 가ᄂᆞᆫ 뎌 각시 본 듯도 ᄒᆞᆫ뎌이고. @@ -405,14 +408,10 @@ CJK 구두점의 폭을 0.5em으로 강제설정하는 것을 방지한다. \begin{figure} \begin{example} - \verticalem=1.05em % hcr fonts' vertical em -\hfil\begin{vertical}{16\verticalem} - \sffamily % hcr fonts do not have vrt2 feature - \hangulfontspec[RawFeature=vertical;+vert;+vhal,charraise=.5ex] - {HCR Dotum LVT} - \hanjabyhangulfont \parindent-\verticalem\leftskip\verticalem - \def\hellipsis{$\cdots\cdots$} % hcr fonts' ellipsis not good -\noindent 님의 침묵 (The Silent Beloved) +\hfil\begin{vertical}{16em} + \hangulfontspec[Vertical=RotatedGlyphs]{AdobeMyungjoStd-Medium.otf} + \hangulmarks \hanjabyhangulfont \parindent-1em\leftskip1em +\noindent 님의 침묵 {\small(The Silent Beloved)} \smallbreak \hfil\hfil 한 용 운\hfil \bigbreak @@ -430,7 +429,9 @@ CJK 구두점의 폭을 0.5em으로 강제설정하는 것을 방지한다. 세로쓰기를 위한 글꼴 지정은 다음과 같다. 역시 고급 오픈타입 기능을 이용하는 것이므로 -폰트가 이를 지원해야 한다. +폰트가 이를 지원해야 한다.\footnote{% +만일 폰트의 세로쓰기 em 박스 크기가 가로쓰기와 다르다면 +\cs{verticalem=1.05em}과 같은 선언을 미리 해두는 것이 좋다.} \begin{verbatim} \setmainhangulfont[ Vertical=RotatedGlyphs ]{Adobe Myungjo Std} \end{verbatim} @@ -447,8 +448,6 @@ vertical 환경의 인자는 세로쓰기 박스의 세로 길이이다. 세로쓰기로 식자할 부분 \end{vertical} \end{verbatim} -만일 세로쓰기의 em 박스 크기가 가로쓰기와 다르다면 -\cs{verticalem=1.05em}과 같은 선언을 미리 해두는 것이 좋다. 혹시 세로로 식자되지 않는 라틴문자 부분이 있다면 베이스라인이 한글과 어울리지 않을 수 있다. 이를 교정하려면 diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty index e61331944e8..a959de576e4 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty @@ -10,264 +10,309 @@ % and version 1.3c or later is part of all distributions of LaTeX % version 2006/05/20 or later. -\ProvidesPackage{xetexko-font}[2014/03/28 v2.5 Font commands for XeTeX-ko] +\ProvidesPackage{xetexko-font}[2014/05/11 v2.6 Font commands for XeTeX-ko] \let\xetexko@f@size\f@size \RequirePackage{fontspec} \let\f@size\xetexko@f@size -\RequirePackage{xkeyval} %%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% for old hangul rendering -\ExplSyntaxOn -\fontspec_define_font_feature:n {YetHangul} -\keys_define:nn {fontspec} - { - YetHangul .default:n = {On} , - YetHangul / On .code:n = { - \fontspec_update_fontid:n {yethangul:on} - \fontspec_update_featstr:n {script=hang} - } , - YetHangul / Off .code:n = { - \fontspec_update_fontid:n {yethangul:off} - \fontspec_update_featstr:n {-ljmo;-vjmo;-tjmo} - } - } -\ExplSyntaxOff +\newfontfeature{YetHangul}{script=hang} +\ExplSyntaxOn %%%%%%%%%%%%%%%%%%%%% % hangul font options -\newtoks\XK@font@options\XK@font@options{} -\define@key[xtxko]{font}{hu}{\addto@hook\XK@font@options{\def\xetexkohu{#1}}} -\define@key[xtxko]{font}{interhchar}{\addto@hook\XK@font@options{\def\xetexkointerhchar{#1}}} -\define@key[xtxko]{font}{lowerexclamation}{\addto@hook\XK@font@options{\def\xetexkolowerexclamation{#1}}} -\define@key[xtxko]{font}{lowerperiod}{\addto@hook\XK@font@options{\def\xetexkolowerperiod{#1}}} -\define@key[xtxko]{font}{lowerquestion}{\addto@hook\XK@font@options{\def\xetexkolowerquestion{#1}}} -\define@key[xtxko]{font}{lowercomma}{\addto@hook\XK@font@options{\def\xetexkolowercomma{#1}}} -\define@key[xtxko]{font}{postexclamationkern}{\addto@hook\XK@font@options{\def\xetexkopostexclamationkern{#1}}} -\define@key[xtxko]{font}{postmathskip}{\addto@hook\XK@font@options{\def\xetexkopostmathskip{#1}}} -\define@key[xtxko]{font}{postperiodkern}{\addto@hook\XK@font@options{\def\xetexkopostperiodkern{#1}}} -\define@key[xtxko]{font}{postquestionkern}{\addto@hook\XK@font@options{\def\xetexkopostquestionkern{#1}}} -\define@key[xtxko]{font}{postcommakern}{\addto@hook\XK@font@options{\def\xetexkopostcommakern{#1}}} -\define@key[xtxko]{font}{preexclamationkern}{\addto@hook\XK@font@options{\def\xetexkopreexclamationkern{#1}}} -\define@key[xtxko]{font}{preperiodkern}{\addto@hook\XK@font@options{\def\xetexkopreperiodkern{#1}}} -\define@key[xtxko]{font}{prequestionkern}{\addto@hook\XK@font@options{\def\xetexkoprequestionkern{#1}}} -\define@key[xtxko]{font}{precommakern}{\addto@hook\XK@font@options{\def\xetexkoprecommakern{#1}}} -\define@key[xtxko]{font}{quoteraise}{\addto@hook\XK@font@options{\def\xetexkoquoteraise{#1}}} -\define@key[xtxko]{font}{quotewidth}{\addto@hook\XK@font@options{\def\xetexkoquotewidth{#1}}} -\define@key[xtxko]{font}{charraise}{\addto@hook\XK@font@options{\def\xetexkocharraise{#1}}} - -\presetkeys[xtxko]{font}{ - hu=0.06em, - interhchar={}, - lowerexclamation={}, - lowerperiod={}, - lowercomma={}, - lowerquestion={}, - postexclamationkern={}, - postmathskip=\dimexpr\xetexkohu*\tw@\relax, - postperiodkern={}, - postcommakern={}, - postquestionkern={}, - preexclamationkern={}, - preperiodkern={}, - precommakern={}, - prequestionkern={}, - quoteraise={}, - quotewidth={}, - charraise={} -}{} - +\tl_new:N \l_xtxko_font_opts_tl +\tl_new:N \l_xtxko_font_opts_init_tl +\tl_set:Nn \l_xtxko_font_opts_init_tl + { + \tl_clear:N \xetexkointerhchar + \tl_clear:N \xetexkointerhchar + \tl_clear:N \xetexkolowerexclamation + \tl_clear:N \xetexkolowerperiod + \tl_clear:N \xetexkolowercomma + \tl_clear:N \xetexkolowerquestion + \tl_clear:N \xetexkopostexclamationkern + \tl_clear:N \xetexkopostperiodkern + \tl_clear:N \xetexkopostcommakern + \tl_clear:N \xetexkopostquestionkern + \tl_clear:N \xetexkopreexclamationkern + \tl_clear:N \xetexkopreperiodkern + \tl_clear:N \xetexkoprecommakern + \tl_clear:N \xetexkoprequestionkern + \tl_clear:N \xetexkoquoteraise + \tl_clear:N \xetexkoquotewidth + \tl_clear:N \xetexkocharraise + \tl_set:Nn \xetexkohu {0.06em} + \tl_set:Nn \xetexkopostmathskip {\dim_eval:n {\xetexkohu*2}} + } +\cs_new:Nn \__xtxko_add_font_opt:Nn + { + \tl_put_right:Nn \l_xtxko_font_opts_tl { \tl_set:Nn #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 .code:n = + { \keys_set:nn { xtxko-font } { hu = {#1} } } , + InterHangul .code:n = + { \keys_set:nn { xtxko-font } { interhchar = {#1} } } , + PunctRaise .code:n = + { \keys_set:nn { xtxko-font } { lowerperiod = { \dim_eval:n {-#1} } } } , + CharRaise .code:n = + { \keys_set:nn { xtxko-font } { charraise = {#1} } } , + } +\tl_new:N \l_xtxko_rem_tl +\cs_new:Nn \__xtxko_assign_font_opts:Nn + { + \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_font_opts_init_tl + \keys_set_known:nxN { xtxko-font } {#2} \l_xtxko_rem_tl + \tl_set_eq:NN #1 \l_xtxko_font_opts_tl + } +\cs_generate_variant:Nn \__xtxko_assign_font_opts:Nn { c } %%%%%%%%%%%%%%%%%%%% % user font commands -\protected\def\setmainhangulfont - {\@ifnextchar[\@setmainhangulfont{\@setmainhangulfont[]}} -\def\@setmainhangulfont[#1]{% - \def\kormainfont{\XK@main@hangul@font\XK@main@hangul@options}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \edef\XK@main@hangul@options{\the\XK@font@options}% - \expandafter\newfontfamily\expandafter\XK@main@hangul@font\expandafter[\XKV@rm]} - -\protected\def\setsanshangulfont - {\@ifnextchar[\@setsanshangulfont{\@setsanshangulfont[]}} -\def\@setsanshangulfont[#1]{% - \def\korsansfont{\XK@sans@hangul@font\XK@sans@hangul@options}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \edef\XK@sans@hangul@options{\the\XK@font@options}% - \expandafter\newfontfamily\expandafter\XK@sans@hangul@font\expandafter[\XKV@rm]} - -\protected\def\setmonohangulfont{\newfontfamily\kormonofont} - -\protected\def\setmainhanjafont - {\@ifnextchar[\@setmainhanjafont{\@setmainhanjafont[]}} -\def\@setmainhanjafont[#1]{% - \def\hnjmainfont{\XK@main@hanja@font\XK@main@hanja@options}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \edef\XK@main@hanja@options{\the\XK@font@options}% - \expandafter\newfontfamily\expandafter\XK@main@hanja@font\expandafter[\XKV@rm]} - -\protected\def\setsanshanjafont - {\@ifnextchar[\@setsanshanjafont{\@setsanshanjafont[]}} -\def\@setsanshanjafont[#1]{% - \def\hnjsansfont{\XK@sans@hanja@font\XK@sans@hanja@options}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \edef\XK@sans@hanja@options{\the\XK@font@options}% - \expandafter\newfontfamily\expandafter\XK@sans@hanja@font\expandafter[\XKV@rm]} - -\protected\def\setmonohanjafont {\newfontfamily\hnjmonofont} - -% adhochangulfont/adhochanjafont, hangulfontspec/hanjafontspec -\protected\def\adhochangulfont{\@ifnextchar[\@adhochangulfont{\@adhochangulfont[]}} -\def\@adhochangulfont[#1]{% - \def\XKhangulfont{% - \XK@storeltnfont\chardef\XKcurrentfont\@ne - \XK@adhoc@hangul@font\XK@adhoc@hangul@options - \XK@storecjkfont - }% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \edef\XK@adhoc@hangul@options{\the\XK@font@options}% - \expandafter\newfontfamily\expandafter\XK@adhoc@hangul@font\expandafter[\XKV@rm]} -\let\hangulfontspec\adhochangulfont - -\protected\def\adhochanjafont{\@ifnextchar[\@adhochanjafont{\@adhochanjafont[]}} -\def\@adhochanjafont[#1]{% - \def\XKhanjafont{% - \XK@storeltnfont\chardef\XKcurrentfont\tw@ - \XK@adhoc@hanja@font\XK@adhoc@hanja@options - \XK@storecjkfont - }% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \edef\XK@adhoc@hanja@options{\the\XK@font@options}% - \expandafter\newfontfamily\expandafter\XK@adhoc@hanja@font\expandafter[\XKV@rm]} -\let\hanjafontspec\adhochanjafont - -% newhangulfontfamily/newhanjafontfamily -\def\XK@newfont@family{XK@newfont@family} -\def\XK@newfont@options{XK@newfont@options} - -\protected\def\newhangulfontfamily#1{% - \@ifnextchar[{\@newhangulfontfamily#1}{\@newhangulfontfamily#1[]}} -\def\@newhangulfontfamily#1[#2]{% - \protected\def#1{\def\XKhangulfont{% - \XK@storeltnfont\chardef\XKcurrentfont\@ne - \csname\XK@newfont@family \string#1\endcsname - \csname\XK@newfont@options\string#1\endcsname - \XK@storecjkfont - }}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#2}% - \expandafter\edef\csname\XK@newfont@options\string#1\endcsname - {\the\XK@font@options}% - \expandafter\expandafter\expandafter\newfontfamily\expandafter - \csname\expandafter\XK@newfont@family\expandafter - \string\expandafter#1\expandafter\endcsname\expandafter[\XKV@rm]} - -\protected\def\newhanjafontfamily#1{% - \@ifnextchar[{\@newhanjafontfamily#1}{\@newhanjafontfamily#1[]}} -\def\@newhanjafontfamily#1[#2]{% - \protected\def#1{\def\XKhanjafont{% - \XK@storeltnfont\chardef\XKcurrentfont\tw@ - \csname\XK@newfont@family\string#1\endcsname - \csname\XK@newfont@options\string#1\endcsname - \XK@storecjkfont - }}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#2}% - \expandafter\edef\csname\XK@newfont@options\string#1\endcsname - {\the\XK@font@options}% - \expandafter\expandafter\expandafter\newfontfamily\expandafter - \csname\expandafter\XK@newfont@family\expandafter - \string\expandafter#1\expandafter\endcsname\expandafter[\XKV@rm]} - -% newhangulfontface/newhanjafontface -\protected\def\newhangulfontface#1{% - \@ifnextchar[{\@newhangulfontface#1}{\@newhangulfontface#1[]}} -\def\@newhangulfontface#1[#2]{% - \protected\def#1{\def\XKhangulfont{% - \XK@storeltnfont\chardef\XKcurrentfont\@ne - \csname\XK@newfont@family\string#1\endcsname - \csname\XK@newfont@options\string#1\endcsname - \XK@storecjkfont - }}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#2}% - \expandafter\edef\csname\XK@newfont@options\string#1\endcsname - {\the\XK@font@options}% - \expandafter\expandafter\expandafter\newfontface\expandafter - \csname\expandafter\XK@newfont@family\expandafter - \string\expandafter#1\expandafter\endcsname\expandafter[\XKV@rm]} - -\protected\def\newhanjafontface#1{% - \@ifnextchar[{\@newhanjafontface#1}{\@newhanjafontface#1[]}} -\def\@newhanjafontface#1[#2]{% - \protected\def#1{\def\XKhanjafont{% - \XK@storeltnfont - \chardef\XKcurrentfont\tw@ - \csname\XK@newfont@family\string#1\endcsname - \csname\XK@newfont@options\string#1\endcsname - \XK@storecjkfont - }}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#2}% - \expandafter\edef\csname\XK@newfont@options\string#1\endcsname - {\the\XK@font@options}% - \expandafter\expandafter\expandafter\newfontface\expandafter - \csname\expandafter\XK@newfont@family\expandafter - \string\expandafter#1\expandafter\endcsname\expandafter[\XKV@rm]} - -% addhangulfontfeature/addhanjafontfeature -\protected\def\addhangulfontfeature#1{% - \begingroup - \XKhangulfont - \unpresetkeys[xtxko]{font}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \global\toks@\expandafter{\the\XK@font@options}% - \addfontfeature{\XKV@rm}% - \global\let\XK@curr@family\f@family - \endgroup - \edef\XKhangulfont{\unexpanded\expandafter{\XKhangulfont\fontfamily}{\XK@curr@family}% - \noexpand\selectfont\the\toks@}% -} -\let\addhangulfontfeatures\addhangulfontfeature - -\protected\def\addhanjafontfeature#1{% - \begingroup - \XKhanjafont - \unpresetkeys[xtxko]{font}% - \XK@font@options{}% - \setkeys*[xtxko]{font}{#1}% - \global\toks@\expandafter{\the\XK@font@options}% - \addfontfeature{\XKV@rm}% - \global\let\XK@curr@family\f@family - \endgroup - \edef\XKhanjafont{\unexpanded\expandafter{\XKhanjafont\fontfamily}{\XK@curr@family}% - \noexpand\selectfont\the\toks@}% -} -\let\addhanjafontfeatures\addhanjafontfeature - +\DeclareDocumentCommand \setmainhangulfont { O{} m } + { + \__xtxko_assign_font_opts:Nn \XK@main@hangul@options {#1} + \newfontfamily \XK@main@hangul@font [\l_xtxko_rem_tl] {#2} + \tl_set:Nn \kormainfont {\XK@main@hangul@font \XK@main@hangul@options} + \ignorespaces + } +\DeclareDocumentCommand \setsanshangulfont { O{} m } + { + \__xtxko_assign_font_opts:Nn \XK@sans@hangul@options {#1} + \newfontfamily \XK@sans@hangul@font [\l_xtxko_rem_tl] {#2} + \tl_set:Nn \korsansfont {\XK@sans@hangul@font \XK@sans@hangul@options} + \ignorespaces + } +\DeclareDocumentCommand \setmonohangulfont { O{} m } + { + \newfontfamily \kormonofont [#1] {#2} + \ignorespaces + } +\DeclareDocumentCommand \setmainhanjafont { O{} m } + { + \__xtxko_assign_font_opts:Nn \XK@main@hanja@options {#1} + \newfontfamily \XK@main@hanja@font [\l_xtxko_rem_tl] {#2} + \tl_set:Nn \hnjmainfont {\XK@main@hanja@font \XK@main@hanja@options} + \ignorespaces + } +\DeclareDocumentCommand \setsanshanjafont { O{} m } + { + \__xtxko_assign_font_opts:Nn \XK@sans@hanja@options {#1} + \newfontfamily \XK@sans@hanja@font [\l_xtxko_rem_tl] {#2} + \tl_set:Nn \hnjsansfont {\XK@sans@hanja@font \XK@sans@hanja@options} + \ignorespaces + } +\DeclareDocumentCommand \setmonohanjafont { O{} m } + { + \newfontfamily \hnjmonofont [#1] {#2} + \ignorespaces + } +%% {hangul,hanja}fontspec = adhoc{hangul,hanja}font +\DeclareDocumentCommand \adhochangulfont { O{} m } + { + \__xtxko_assign_font_opts:Nn \XK@adhoc@hangul@options {#1} + \newfontfamily \XK@adhoc@hangul@font [\l_xtxko_rem_tl] {#2} + \tl_set:Nn \XKhangulfont + { + \XK@storeltnfont + \tl_set_eq:NN \XKcurrentfont \c_one + \XK@adhoc@hangul@font \XK@adhoc@hangul@options + \XK@storecjkfont + } + \ignorespaces + } +\cs_set_eq:NN \hangulfontspec \adhochangulfont +\DeclareDocumentCommand \adhochanjafont { O{} m } + { + \__xtxko_assign_font_opts:Nn \XK@adhoc@hanja@options {#1} + \newfontfamily \XK@adhoc@hanja@font [\l_xtxko_rem_tl] {#2} + \tl_set:Nn \XKhanjafont + { + \XK@storeltnfont + \tl_set_eq:NN \XKcurrentfont \c_two + \XK@adhoc@hanja@font \XK@adhoc@hanja@options + \XK@storecjkfont + } + \ignorespaces + } +\cs_set_eq:NN \hanjafontspec \adhochanjafont +%% new{hangul,hanja}font{family,face} +\DeclareDocumentCommand \newhangulfontfamily { m O{} m } + { + \__xtxko_assign_font_opts:cn { XK@newfont@options \token_to_str:N #1 } {#2} + \exp_after:wN \newfontfamily + \cs:w XK@newfont@family \token_to_str:N #1 \cs_end: [\l_xtxko_rem_tl] {#3} + \DeclareRobustCommand #1 + { + \tl_set:Nn \XKhangulfont + { + \XK@storeltnfont + \tl_set_eq:NN \XKcurrentfont \c_one + \use:c { XK@newfont@family \token_to_str:N #1 } + \use:c { XK@newfont@options \token_to_str:N #1 } + \XK@storecjkfont + } + } + } +\DeclareDocumentCommand \newhanjafontfamily { m O{} m } + { + \__xtxko_assign_font_opts:cn { XK@newfont@options \token_to_str:N #1 } {#2} + \exp_after:wN \newfontfamily + \cs:w XK@newfont@family \token_to_str:N #1 \cs_end: [\l_xtxko_rem_tl] {#3} + \DeclareRobustCommand #1 + { + \tl_set:Nn \XKhanjafont + { + \XK@storeltnfont + \tl_set_eq:NN \XKcurrentfont \c_two + \use:c { XK@newfont@family \token_to_str:N #1 } + \use:c { XK@newfont@options \token_to_str:N #1 } + \XK@storecjkfont + } + } + } +\DeclareDocumentCommand \newhangulfontface { m O{} m } + { + \__xtxko_assign_font_opts:cn { XK@newfont@options \token_to_str:N #1 } {#2} + \exp_after:wN \newfontface + \cs:w XK@newfont@family \token_to_str:N #1 \cs_end: [\l_xtxko_rem_tl] {#3} + \DeclareRobustCommand #1 + { + \tl_set:Nn \XKhangulfont + { + \XK@storeltnfont + \tl_set_eq:NN \XKcurrentfont \c_one + \use:c { XK@newfont@family \token_to_str:N #1 } + \use:c { XK@newfont@options \token_to_str:N #1 } + \XK@storecjkfont + } + } + } +\DeclareDocumentCommand \newhanjafontface { m O{} m } + { + \__xtxko_assign_font_opts:cn { XK@newfont@options \token_to_str:N #1 } {#2} + \exp_after:wN \newfontface + \cs:w XK@newfont@family \token_to_str:N #1 \cs_end: [\l_xtxko_rem_tl] {#3} + \DeclareRobustCommand #1 + { + \tl_set:Nn \XKhanjafont + { + \XK@storeltnfont + \tl_set_eq:NN \XKcurrentfont \c_two + \use:c { XK@newfont@family \token_to_str:N #1 } + \use:c { XK@newfont@options \token_to_str:N #1 } + \XK@storecjkfont + } + } + } +%% add{hangul,hanja}fontfeature[s] +\DeclareDocumentCommand \addhangulfontfeature { m } + { + \group_begin: + \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} + \use:x + { + \group_end: + \exp_not:N \tl_set:Nn \exp_not:N \XKhangulfont + { + \exp_not:N \XK@storeltnfont + \exp_not:N \tl_set_eq:NN \exp_not:N \XKcurrentfont \exp_not:N \c_one + \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: + \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} + \use:x + { + \group_end: + \exp_not:N \tl_set:Nn \exp_not:N \XKhanjafont + { + \exp_not:N \XK@storeltnfont + \exp_not:N \tl_set_eq:NN \exp_not:N \XKcurrentfont \exp_not:N \c_two + \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 +%% math hangul font +\DeclareDocumentCommand \setmathhangulfont { O{} m } + { + \fontspec_set_family:Nnn \xetexko@math@hangul@family {#1} {#2} + } %%%%%%%%%%%%%%%%%%%% %% xetexkofontregime -\define@key[xtxko]{char}{alphs}{\csname #1alphs\endcsname} -\define@key[xtxko]{char}{nums}{\csname #1nums\endcsname} -\define@key[xtxko]{char}{parens}{\csname #1parens\endcsname} -\define@key[xtxko]{char}{quotes}{\csname #1quotes\endcsname} -\define@key[xtxko]{char}{puncts}{\csname #1puncts\endcsname} -\define@key[xtxko]{char}{colons}{\csname #1colons\endcsname} -\define@key[xtxko]{char}{hyphens}{\csname #1hyphens\endcsname} -\define@key[xtxko]{char}{cjksymbols}{\csname #1cjksymbols\endcsname} - -\protected\def\xetexkofontregime{% - \@ifnextchar[\@xetexkofontregime{\@xetexkofontregime[]}} -\def\@xetexkofontregime[#1]#2{% - \csname #2marks\endcsname - \setkeys*[xtxko]{char}{#1}} +\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 } + { + \use:c { #2marks } + \keys_set:nn { xtxko-char } { #1 } + } +\ExplSyntaxOff %%%%%%%%%%%%%%%%%%%%%%%%%% % set unfonts if [unfonts] @@ -319,8 +364,12 @@ %%%%%%%%%%%%%%%%%%%%%%%%%% % 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\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}% @@ -372,7 +421,9 @@ \edef\rmfamily{\unexpanded\expandafter{\rmfamily\XK@rm@korean@font}} \edef\sffamily{\unexpanded\expandafter{\sffamily\XK@sf@korean@font}} -\edef\ttfamily{\unexpanded\expandafter{\ttfamily\XK@tt@korean@font\disablehangulspacing}} +\edef\ttfamily{\unexpanded\expandafter{\ttfamily + \XK@tt@korean@font\disablehangulspacing +}} \edef\verbatim@font{\unexpanded\expandafter{\verbatim@font \disablehangulspacingandlinebreak \let\XKstoreprevfont\XKlatinfont @@ -380,23 +431,21 @@ \expandafter\ifx\familydefault\rmdefault \XK@rm@korean@font - \protected\edef\normalfont{\unexpanded\expandafter{\normalfont\XK@rm@korean@font}} + \protected\edef\normalfont{\unexpanded\expandafter{\normalfont + \XK@rm@korean@font}} \else \expandafter\ifx\familydefault\sfdefault \XK@sf@korean@font - \protected\edef\normalfont{\unexpanded\expandafter{\normalfont\XK@sf@korean@font}} + \protected\edef\normalfont{\unexpanded\expandafter{\normalfont + \XK@sf@korean@font}} \else \XK@tt@korean@font - \protected\edef\normalfont{\unexpanded\expandafter{\normalfont\XK@tt@korean@font}} + \protected\edef\normalfont{\unexpanded\expandafter{\normalfont + \XK@tt@korean@font}} \fi\fi \let\reset@font\normalfont %%%%%%%%%%%%%%%%%%%%% % hangul in math mode -\def\setmathhangulfont{% - \@ifnextchar[{\setmathhangulfont@}{\setmathhangulfont@[]}} -\def\setmathhangulfont@[#1]#2{% - \zf@fontspec{#1}{#2}% - \xdef\xetexko@math@hangul@family{\zf@family}} \AtBeginDocument{% \begingroup \ifx\xetexko@math@hangul@family\undefined diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty index e6794ab5625..e079a7aa1ec 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty @@ -13,7 +13,7 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else \ProvidesPackage{xetexko-hanging} - [2014/03/28 v2.5 Hanging punctuations for XeTeX-ko] + [2014/05/11 v2.6 Hanging punctuations for XeTeX-ko] \fi \chardef\catcodeofATcharacter\catcode`@ diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty index 3f6a81bb3aa..a78fa8a511a 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty @@ -12,7 +12,7 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else - \ProvidesPackage{xetexko-josa}[2014/03/28 v2.5 Auto-josa for XeTeX-ko] + \ProvidesPackage{xetexko-josa}[2014/05/11 v2.6 Auto-josa for XeTeX-ko] \fi \unless\ifcsname @tempcnta\endcsname\newcount\@tempcnta\fi diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty index 2b285822e5a..87ba623421c 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty @@ -13,7 +13,7 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else \ProvidesPackage{xetexko-space} - [2014/03/28 v2.5 Spacings and fonts for XeTeX-ko] + [2014/05/11 v2.6 Spacings and fonts for XeTeX-ko] \fi %%% we need XeTeX > 0.997 @@ -33,6 +33,14 @@ %%%%%%%%%%%%%%%%%%%%% % assign char classes +\def\XK@assign@char@class#1#2#3{% + \count@=#1\relax + \loop + \XeTeXcharclass\count@ = #3\relax + \ifnum\count@<#2\relax \advance\count@\@ne + \repeat +} + %%% default assignments (see unicode-letters.tex) % CJK hanja = class 1 % CJK openings = class 2 @@ -70,12 +78,8 @@ \XeTeXcharclass "30F5 = \XKsmallkana \XeTeXcharclass "30F6 = \XKsmallkana \XeTeXcharclass "30FC = \XKsmallkana -\count@="31F0 \loop - \XeTeXcharclass\count@ = \XKsmallkana - \ifnum\count@<"31FF \advance\count@\@ne \repeat -\count@="FF67 \loop - \XeTeXcharclass\count@ = \XKsmallkana - \ifnum\count@<"FF70 \advance\count@\@ne \repeat +\XK@assign@char@class{"31F0}{"31FF}\XKsmallkana +\XK@assign@char@class{"FF67}{"FF70}\XKsmallkana %%% \XeTeXcharclass "25A1 = \XKhanja % □ @@ -179,22 +183,10 @@ \XeTeXcharclass "215C = \XKcjksymbol % ⅜ \XeTeXcharclass "215D = \XKcjksymbol % ⅝ \XeTeXcharclass "215E = \XKcjksymbol % ⅞ -\count@ "2160 % Ⅰ -\loop - \XeTeXcharclass\count@\XKcjksymbol - \ifnum\count@ < "216B % Ⅻ - \advance\count@\@ne \repeat -\count@ "2170 % ⅰ -\loop - \XeTeXcharclass\count@\XKcjksymbol - \ifnum\count@ < "217B % ⅻ - \advance\count@\@ne \repeat +\XK@assign@char@class{"2160}{"216B}\XKcjksymbol % Ⅰ .. Ⅻ +\XK@assign@char@class{"2170}{"217B}\XKcjksymbol % ⅰ .. ⅻ %% math symbols (?) -\count@ "2190 % ← -\loop - \XeTeXcharclass\count@\XKcjksymbol - \ifnum\count@ < "2199 % ↙ - \advance\count@\@ne \repeat +\XK@assign@char@class{"2190}{"2199}\XKcjksymbol % ← .. ↙ \XeTeXcharclass "21D2 = \XKcjksymbol % ⇒ \XeTeXcharclass "21D4 = \XKcjksymbol % ⇔ \XeTeXcharclass "2200 = \XKcjksymbol % ∀ @@ -234,20 +226,12 @@ \XeTeXcharclass "2299 = \XKcjksymbol % ⊙ \XeTeXcharclass "22A5 = \XKcjksymbol % ⊥ \XeTeXcharclass "2312 = \XKcjksymbol % ⌒ -\count@ "2460 % ① -\loop - \XeTeXcharclass\count@\XKcjksymbol - \ifnum\count@ < "24EA % ⓪ - \advance\count@\@ne \repeat +\XK@assign@char@class{"2460}{"24EA}\XKcjksymbol % ① .. ⓪ \XeTeXcharclass "2500 = \XKcjksymbol % ─ \XeTeXcharclass "2501 = \XKcjksymbol % ━ \XeTeXcharclass "2502 = \XKcjksymbol % │ \XeTeXcharclass "2503 = \XKcjksymbol % ┃ -\count@ "250C % ─ -\loop - \XeTeXcharclass\count@\XKcjksymbol - \ifnum\count@ < "254B % ╋ - \advance\count@\@ne \repeat +\XK@assign@char@class{"250C}{"254B}\XKcjksymbol % ─ .. ╋ \XeTeXcharclass "2592 = \XKcjksymbol % ▒ \XeTeXcharclass "25A0 = \XKcjksymbol % ■ %\XeTeXcharclass "25A1 = \XKcjksymbol % □ @@ -305,40 +289,17 @@ %%% hangul syllables \newXeTeXintercharclass \XKhangulsyllable -\count@ "AC00 -\loop - \XeTeXcharclass\count@\XKhangulsyllable - \ifnum\count@ < "D7A3 - \advance\count@\@ne \repeat -\count@ "3131 % treat compatibility jamo as hangul syllable -\loop - \XeTeXcharclass\count@\XKhangulsyllable - \ifnum\count@ < "318E - \advance\count@\@ne \repeat -%%% leading consonants jamo as well -\count@ "1100 -\loop - \XeTeXcharclass\count@\XKhangulsyllable - \ifnum\count@ < "115F - \advance\count@\@ne \repeat -\count@ "A960 -\loop - \XeTeXcharclass\count@\XKhangulsyllable - \ifnum\count@ < "A97C - \advance\count@\@ne \repeat +\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 -\count@ "1160 -\loop - \XeTeXcharclass\count@\XKhanguljungjong - \ifnum\count@ < "11FF - \advance\count@\@ne \repeat -\count@ "D7B0 -\loop - \XeTeXcharclass\count@\XKhanguljungjong - \ifnum\count@ < "D7FB - \advance\count@\@ne \repeat +\XK@assign@char@class{"1160}{"11FF}\XKhanguljungjong +\XK@assign@char@class{"D7B0}{"D7FB}\XKhanguljungjong \XeTeXcharclass "302E = \XKhanguljungjong \XeTeXcharclass "302F = \XKhanguljungjong @@ -391,18 +352,12 @@ %%% latin numbers \newXeTeXintercharclass \XKlatinnumber -\count@ `0 -\loop - \XeTeXcharclass\count@\XKlatinnumber - \ifnum\count@ < `9 - \advance\count@\@ne \repeat +\XK@assign@char@class{`0}{`9}\XKlatinnumber %%% variation selectors \newXeTeXintercharclass \XKhanjacombining -\count@="E0100 \loop - \XeTeXcharclass\count@ = \XKhanjacombining - \ifnum\count@<"E01EF \advance\count@\@ne \repeat - +\XK@assign@char@class{"FE00}{"FE0F}\XKhanjacombining +\XK@assign@char@class{"E0100}{"E01EF}\XKhanjacombining %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% define inter char tokes diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty index 2bc1c8a512d..d29ad6b6e0e 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty @@ -13,7 +13,7 @@ \begingroup\expandafter\expandafter\expandafter\endgroup \expandafter\ifx\csname ProvidesPackage\endcsname\relax\else \ProvidesPackage{xetexko-vertical} - [2014/03/28 v2.5 Vertical environment for XeTeX-ko] + [2014/05/11 v2.6 Vertical environment for XeTeX-ko] \fi \unless\ifcsname @tempdima\endcsname\newdimen\@tempdima\fi diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty index 7f25fae6146..6b006a773f9 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty @@ -42,7 +42,7 @@ \expandafter\endinput \fi -\ProvidesPackage{xetexko}[2014/03/28 v2.5 Typesetting Korean with XeLaTeX] +\ProvidesPackage{xetexko}[2014/05/11 v2.6 Typesetting Korean with XeLaTeX] \newif\if@hangul \newif\if@hanja |