diff options
Diffstat (limited to 'Master/texmf-dist/tex/xetex')
5 files changed, 99 insertions, 57 deletions
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty index bdca890d47a..1bc55c448c7 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty @@ -10,7 +10,7 @@ % and version 1.3c or later is part of all distributions of LaTeX % version 2006/05/20 or later. -\ProvidesPackage{xetexko-font}[2014/06/17 v2.7 LaTeX Font commands for XeTeX-ko] +\ProvidesPackage{xetexko-font}[2014/07/27 v2.8 LaTeX Font commands for XeTeX-ko] \let\xetexko@f@size\f@size \RequirePackage{fontspec}[2014/05/25] @@ -107,50 +107,72 @@ \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hanja_font_opts_init_tl \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rem_tl } +\cs_new:Nn \__xtxko_pass_args:nnn + { + \IfNoValueTF {#2} + { \__xtxko_post_args:w {#1} {#3} } + { #1 {#2} {#3} } + } +\NewDocumentCommand \__xtxko_post_args:w { m m O{} } + { #1 {#3} {#2} } %%%%%%%%%%%%%%%%%%%% % user font commands -\DeclareDocumentCommand \setmainhangulfont { O{} m O{} } +\DeclareDocumentCommand \setmainhangulfont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setmainhangulfont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setmainhangulfont:nn { - \__xtxko_hangul_assign_font_opts:n {#1,#3} + \__xtxko_hangul_assign_font_opts:n {#1} \newfontfamily \kormainfont [\l_xtxko_rem_tl] {#2} \tl_put_right:NV \kormainfont \l_xtxko_font_opts_tl \ignorespaces } -\DeclareDocumentCommand \setsanshangulfont { O{} m O{} } +\DeclareDocumentCommand \setsanshangulfont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setsanshangulfont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setsanshangulfont:nn { - \__xtxko_hangul_assign_font_opts:n {#1,#3} + \__xtxko_hangul_assign_font_opts:n {#1} \newfontfamily \korsansfont [\l_xtxko_rem_tl] {#2} \tl_put_right:NV \korsansfont \l_xtxko_font_opts_tl \ignorespaces } -\DeclareDocumentCommand \setmonohangulfont { O{} m O{} } +\DeclareDocumentCommand \setmonohangulfont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setmonohangulfont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setmonohangulfont:nn { - \newfontfamily \kormonofont [#1,#3] {#2} + \newfontfamily \kormonofont [#1] {#2} \ignorespaces } -\DeclareDocumentCommand \setmainhanjafont { O{} m O{} } +\DeclareDocumentCommand \setmainhanjafont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setmainhanjafont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setmainhanjafont:nn { - \__xtxko_hanja_assign_font_opts:n {#1,#3} + \__xtxko_hanja_assign_font_opts:n {#1} \newfontfamily \hnjmainfont [\l_xtxko_rem_tl] {#2} \tl_put_right:NV \hnjmainfont \l_xtxko_font_opts_tl \ignorespaces } -\DeclareDocumentCommand \setsanshanjafont { O{} m O{} } +\DeclareDocumentCommand \setsanshanjafont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setsanshanjafont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setsanshanjafont:nn { - \__xtxko_hanja_assign_font_opts:n {#1,#3} + \__xtxko_hanja_assign_font_opts:n {#1} \newfontfamily \hnjsansfont [\l_xtxko_rem_tl] {#2} \tl_put_right:NV \hnjsansfont \l_xtxko_font_opts_tl \ignorespaces } -\DeclareDocumentCommand \setmonohanjafont { O{} m O{} } +\DeclareDocumentCommand \setmonohanjafont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setmonohanjafont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setmonohanjafont:nn { - \newfontfamily \hnjmonofont [#1,#3] {#2} + \newfontfamily \hnjmonofont [#1] {#2} \ignorespaces } %% {hangul,hanja}fontspec = adhoc{hangul,hanja}font -\DeclareDocumentCommand \adhochangulfont { O{} m O{} } +\DeclareDocumentCommand \adhochangulfont { o m } + { \__xtxko_pass_args:nnn \__xtxko_adhochangulfont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_adhochangulfont:nn { - \__xtxko_hangul_assign_font_opts:n {#1,#3} + \__xtxko_hangul_assign_font_opts:n {#1} \newfontfamily \XK@adhoc@hangul@font [\l_xtxko_rem_tl] {#2} \tl_put_right:NV \XK@adhoc@hangul@font \l_xtxko_font_opts_tl \tl_set:Nn \XKhangulfont @@ -163,9 +185,11 @@ \ignorespaces } \cs_set_eq:NN \hangulfontspec \adhochangulfont -\DeclareDocumentCommand \adhochanjafont { O{} m O{} } +\DeclareDocumentCommand \adhochanjafont { o m } + { \__xtxko_pass_args:nnn \__xtxko_adhochanjafont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_adhochanjafont:nn { - \__xtxko_hanja_assign_font_opts:n {#1,#3} + \__xtxko_hanja_assign_font_opts:n {#1} \newfontfamily \XK@adhoc@hanja@font [\l_xtxko_rem_tl] {#2} \tl_put_right:NV \XK@adhoc@hanja@font \l_xtxko_font_opts_tl \tl_set:Nn \XKhanjafont @@ -179,9 +203,11 @@ } \cs_set_eq:NN \hanjafontspec \adhochanjafont %% new{hangul,hanja}font{family,face} -\DeclareDocumentCommand \newhangulfontfamily { m O{} m O{} } +\DeclareDocumentCommand \newhangulfontfamily { m o m } + { \__xtxko_pass_args:nnn { \__xtxko_newhangulfontfamily:Nnn #1 } {#2} {#3} } +\cs_new:Nn \__xtxko_newhangulfontfamily:Nnn { - \__xtxko_hangul_assign_font_opts:n {#2,#4} + \__xtxko_hangul_assign_font_opts:n {#2} \exp_args:Nc \newfontfamily { XK@newfont@family \token_to_str:N #1 } [\l_xtxko_rem_tl] {#3} \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } @@ -197,9 +223,11 @@ } } } -\DeclareDocumentCommand \newhanjafontfamily { m O{} m O{} } +\DeclareDocumentCommand \newhanjafontfamily { m o m } + { \__xtxko_pass_args:nnn { \__xtxko_newhanjafontfamily:Nnn #1 } {#2} {#3} } +\cs_new:Nn \__xtxko_newhanjafontfamily:Nnn { - \__xtxko_hanja_assign_font_opts:n {#2,#4} + \__xtxko_hanja_assign_font_opts:n {#2} \exp_args:Nc \newfontfamily { XK@newfont@family \token_to_str:N #1 } [\l_xtxko_rem_tl] {#3} \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } @@ -215,9 +243,11 @@ } } } -\DeclareDocumentCommand \newhangulfontface { m O{} m O{} } +\DeclareDocumentCommand \newhangulfontface { m o m } + { \__xtxko_pass_args:nnn { \__xtxko_newhangulfontface:Nnn #1 } {#2} {#3} } +\cs_new:Nn \__xtxko_newhangulfontface:Nnn { - \__xtxko_hangul_assign_font_opts:n {#2,#4} + \__xtxko_hangul_assign_font_opts:n {#2} \exp_args:Nc \newfontface { XK@newfont@family \token_to_str:N #1 } [\l_xtxko_rem_tl] {#3} \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } @@ -233,9 +263,11 @@ } } } -\DeclareDocumentCommand \newhanjafontface { m O{} m O{} } +\DeclareDocumentCommand \newhanjafontface { m o m } + { \__xtxko_pass_args:nnn { \__xtxko_newhanjafontface:Nnn #1 } {#2} {#3} } +\cs_new:Nn \__xtxko_newhanjafontface:Nnn { - \__xtxko_hanja_assign_font_opts:n {#2,#4} + \__xtxko_hanja_assign_font_opts:n {#2} \exp_args:Nc \newfontface { XK@newfont@family \token_to_str:N #1 } [\l_xtxko_rem_tl] {#3} \tl_put_right:cV { XK@newfont@family \token_to_str:N #1 } @@ -325,9 +357,11 @@ \tl_set_eq:NN \l_xtxko_hanja_font_opts_init_tl \l_xtxko_font_opts_tl } %% math hangul font -\DeclareDocumentCommand \setmathhangulfont { O{} m O{} } +\DeclareDocumentCommand \setmathhangulfont { o m } + { \__xtxko_pass_args:nnn \__xtxko_setmathhangulfont:nn {#1} {#2} } +\cs_new:Nn \__xtxko_setmathhangulfont:nn { - \fontspec_set_family:Nnn \xetexko@math@hangul@family {#1,#3} {#2} + \fontspec_set_family:Nnn \xetexko@math@hangul@family {#1} {#2} } %%%%%%%%%%%%%%%%%%%% %% xetexkofontregime @@ -342,10 +376,12 @@ hyphens .code:n = \use:c { #1hyphens } , cjksymbols .code:n = \use:c { #1cjksymbols } , } -\DeclareDocumentCommand \xetexkofontregime { O{} m O{} } +\DeclareDocumentCommand \xetexkofontregime { o m } + { \__xtxko_pass_args:nnn \__xtxko_xetexkofontregime:nn {#1} {#2} } +\cs_new:Nn \__xtxko_xetexkofontregime:nn { \use:c { #2marks } - \keys_set:nn { xtxko-char } { #1, #3 } + \keys_set:nn { xtxko-char } { #1 } } \ExplSyntaxOff diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty index 160c7df8308..2208e6b9f15 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty @@ -15,8 +15,10 @@ \ProvidesPackage{xetexko-josa}[2014/06/17 v2.7 Auto-josa for XeTeX-ko] \fi -\unless\ifcsname @tempcnta\endcsname\newcount\@tempcnta\fi -\unless\ifcsname @tempcntb\endcsname\newcount\@tempcntb\fi +\unless\ifcsname @tempcnta\endcsname + \alloc@0\count\countdef\insc@unt\@tempcnta\fi +\unless\ifcsname @tempcntb\endcsname + \alloc@0\count\countdef\insc@unt\@tempcntb\fi %%% user commands \protected\def\jong {\global\let\XK@last@char=0} diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty index 9b62734ee61..640785485da 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/06/17 v2.7 Spacings and fonts for XeTeX-ko] + [2014/07/27 v2.8 Spacings and fonts for XeTeX-ko] \fi %%% we need XeTeX > 0.997 @@ -289,7 +289,12 @@ %%% hangul syllables \newXeTeXintercharclass \XKhangulsyllable -\XK@assign@char@class{"AC00}{"D7A3}\XKhangulsyllable +\count@="AC00 +\loop + \catcode\count@ = 12 % revert recent change of unicode-letters.tex + \XeTeXcharclass\count@ = \XKhangulsyllable + \ifnum\count@<"D7A3 \advance\count@\@ne +\repeat % treat compatibility jamo as hangul syllable \XK@assign@char@class{"3131}{"318E}\XKhangulsyllable % leading consonants jamo as well @@ -1602,6 +1607,6 @@ %%% declare to use interchartoken \XeTeXinterchartokenstate\@ne -\def\hellipsis{^^^^2026\kern-.1ex^^^^2026} +\def\hellipsis{^^^^2026^^^^2026} \endinput diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty index 1ac187205c0..2d94aec0744 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty @@ -16,12 +16,17 @@ [2014/06/17 v2.7 Vertical environment for XeTeX-ko] \fi -\unless\ifcsname @tempdima\endcsname\newdimen\@tempdima\fi -\unless\ifcsname @tempdimb\endcsname\newdimen\@tempdimb\fi -\unless\ifcsname @tempdimc\endcsname\newdimen\@tempdimc\fi - % do not veticalize headline/footline -\ifdefined\ProvidesPackage % for latex +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname selectfont\endcsname\relax % plain + \protected\def\verticaltypesetting{% + \dimen@\hsize\hsize\vsize\vsize\dimen@ + \edef\plainoutput{\unexpanded{\dimen@\hsize\hsize\vsize\vsize\dimen@}% + \unexpanded\expandafter{\plainoutput}}% + \def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth + \pagecontents}\xetexko@rotatebox\z@\box\z@}% + \maxdepth\z@ \XK@vertical@spacing} +\else % latex \protected\def\verticaltypesetting{% \AtBeginDocument{\XK@vertical@spacing}% \maxdepth\z@ @@ -33,14 +38,6 @@ \unexpanded\expandafter{\@outputpage}}% } \@onlypreamble\verticaltypesetting -\else % for plain - \protected\def\verticaltypesetting{% - \dimen@\hsize\hsize\vsize\vsize\dimen@ - \edef\plainoutput{\unexpanded{\dimen@\hsize\hsize\vsize\vsize\dimen@}% - \unexpanded\expandafter{\plainoutput}}% - \def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth - \pagecontents}\xetexko@rotatebox\z@\box\z@}% - \maxdepth\z@ \XK@vertical@spacing} \fi \def\xetexko@rotatebox#1{% @@ -88,11 +85,10 @@ \protected\def\endvertical{% \egroup - \@tempdima\wd\z@ - \@tempdimb\ht\z@ - \@tempdimc\dp\z@ + \dimen@\dimexpr\ht\z@+\dp\z@\relax + \dimen@ii\dimexpr\wd\z@-\dp\z@\relax \setbox\z@\hbox{% - \kern\dimexpr\@tempdimb+0.5em\relax + \kern\dimexpr\ht\z@+0.5em\relax \wd\z@\z@ \ht\z@\z@ \dp\z@\z@ @@ -100,11 +96,11 @@ \special{x:rotate -90}% \box\z@ \special{x:grestore}}% - \wd\z@\dimexpr\@tempdimb+\@tempdimc\relax + \wd\z@\dimen@ \ht\z@\z@ \dp\z@\z@ \leavevmode - \raise\dimexpr\@tempdima-\@tempdimc\relax\box\z@ + \raise\dimen@ii\box\z@ } \protected\def\vertlatin#1{\leavevmode\lower0.5ex\hbox{\latinmarks #1}} diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty index d50d7d31906..80e061cbc97 100644 --- a/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty +++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko.sty @@ -10,8 +10,13 @@ % and version 1.3c or later is part of all distributions of LaTeX % version 2006/05/20 or later. -\ifx\ProvidesPackage\relax \let\ProvidesPackage\undefined \fi -\ifx\ProvidesPackage\undefined +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname ProvidesPackage\endcsname\relax\else + \ProvidesPackage{xetexko}[2014/06/17 v2.7 Typesetting Korean with XeTeX] +\fi + +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname selectfont\endcsname\relax \chardef\catcodeofATcharacter\catcode`@ \catcode`\@ = 11 @@ -42,8 +47,6 @@ \expandafter\endinput \fi -\ProvidesPackage{xetexko}[2014/06/17 v2.7 Typesetting Korean with XeLaTeX] - \newif\if@hangul \newif\if@hanja \newif\if@unfonts |