summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xetex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-19 20:24:46 +0000
committerKarl Berry <karl@freefriends.org>2014-06-19 20:24:46 +0000
commitc37e450248a4325fc7cdbedfac9a92094dfa97e3 (patch)
tree2af0754f514262627478842b444bd646e5eca94b /Master/texmf-dist/tex/xetex
parent2ab598832d6c69a43f55cc0fce844b2464d1b339 (diff)
xetexko (19jun14)
git-svn-id: svn://tug.org/texlive/trunk@34321 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xetex')
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty173
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty2
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-josa.sty2
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-space.sty8
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty2
-rw-r--r--Master/texmf-dist/tex/xetex/xetexko/xetexko.sty2
6 files changed, 114 insertions, 75 deletions
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
index a959de576e4..bdca890d47a 100644
--- a/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
+++ b/Master/texmf-dist/tex/xetex/xetexko/xetexko-font.sty
@@ -10,10 +10,10 @@
% and version 1.3c or later is part of all distributions of LaTeX
% version 2006/05/20 or later.
-\ProvidesPackage{xetexko-font}[2014/05/11 v2.6 Font commands for XeTeX-ko]
+\ProvidesPackage{xetexko-font}[2014/06/17 v2.7 LaTeX Font commands for XeTeX-ko]
\let\xetexko@f@size\f@size
-\RequirePackage{fontspec}
+\RequirePackage{fontspec}[2014/05/25]
\let\f@size\xetexko@f@size
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -89,98 +89,103 @@
{ \__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} } } ,
+ InterLatinCJK .meta:n = { hu = {#1} } ,
+ InterHangul .meta:n = { interhchar = {#1} } ,
+ PunctRaise .meta:n = { lowerperiod = { \dim_eval:n {-#1} } } ,
+ CharRaise .meta:n = { charraise = {#1} } ,
}
\tl_new:N \l_xtxko_rem_tl
-\cs_new:Nn \__xtxko_assign_font_opts:Nn
+\tl_set_eq:NN \l_xtxko_hangul_font_opts_init_tl \l_xtxko_font_opts_init_tl
+\cs_new:Nn \__xtxko_hangul_assign_font_opts:n
{
- \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
+ \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hangul_font_opts_init_tl
+ \keys_set_known:nxN { xtxko-font } {#1} \l_xtxko_rem_tl
+ }
+\tl_set_eq:NN \l_xtxko_hanja_font_opts_init_tl \l_xtxko_font_opts_init_tl
+\cs_new:Nn \__xtxko_hanja_assign_font_opts:n
+ {
+ \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_generate_variant:Nn \__xtxko_assign_font_opts:Nn { c }
%%%%%%%%%%%%%%%%%%%%
% user font commands
-\DeclareDocumentCommand \setmainhangulfont { O{} m }
+\DeclareDocumentCommand \setmainhangulfont { O{} m O{} }
{
- \__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}
+ \__xtxko_hangul_assign_font_opts:n {#1,#3}
+ \newfontfamily \kormainfont [\l_xtxko_rem_tl] {#2}
+ \tl_put_right:NV \kormainfont \l_xtxko_font_opts_tl
\ignorespaces
}
-\DeclareDocumentCommand \setsanshangulfont { O{} m }
+\DeclareDocumentCommand \setsanshangulfont { O{} m O{} }
{
- \__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}
+ \__xtxko_hangul_assign_font_opts:n {#1,#3}
+ \newfontfamily \korsansfont [\l_xtxko_rem_tl] {#2}
+ \tl_put_right:NV \korsansfont \l_xtxko_font_opts_tl
\ignorespaces
}
-\DeclareDocumentCommand \setmonohangulfont { O{} m }
+\DeclareDocumentCommand \setmonohangulfont { O{} m O{} }
{
- \newfontfamily \kormonofont [#1] {#2}
+ \newfontfamily \kormonofont [#1,#3] {#2}
\ignorespaces
}
-\DeclareDocumentCommand \setmainhanjafont { O{} m }
+\DeclareDocumentCommand \setmainhanjafont { O{} m O{} }
{
- \__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}
+ \__xtxko_hanja_assign_font_opts:n {#1,#3}
+ \newfontfamily \hnjmainfont [\l_xtxko_rem_tl] {#2}
+ \tl_put_right:NV \hnjmainfont \l_xtxko_font_opts_tl
\ignorespaces
}
-\DeclareDocumentCommand \setsanshanjafont { O{} m }
+\DeclareDocumentCommand \setsanshanjafont { O{} m O{} }
{
- \__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}
+ \__xtxko_hanja_assign_font_opts:n {#1,#3}
+ \newfontfamily \hnjsansfont [\l_xtxko_rem_tl] {#2}
+ \tl_put_right:NV \hnjsansfont \l_xtxko_font_opts_tl
\ignorespaces
}
-\DeclareDocumentCommand \setmonohanjafont { O{} m }
+\DeclareDocumentCommand \setmonohanjafont { O{} m O{} }
{
- \newfontfamily \hnjmonofont [#1] {#2}
+ \newfontfamily \hnjmonofont [#1,#3] {#2}
\ignorespaces
}
%% {hangul,hanja}fontspec = adhoc{hangul,hanja}font
-\DeclareDocumentCommand \adhochangulfont { O{} m }
+\DeclareDocumentCommand \adhochangulfont { O{} m O{} }
{
- \__xtxko_assign_font_opts:Nn \XK@adhoc@hangul@options {#1}
+ \__xtxko_hangul_assign_font_opts:n {#1,#3}
\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
{
\XK@storeltnfont
\tl_set_eq:NN \XKcurrentfont \c_one
- \XK@adhoc@hangul@font \XK@adhoc@hangul@options
+ \XK@adhoc@hangul@font
\XK@storecjkfont
}
\ignorespaces
}
\cs_set_eq:NN \hangulfontspec \adhochangulfont
-\DeclareDocumentCommand \adhochanjafont { O{} m }
+\DeclareDocumentCommand \adhochanjafont { O{} m O{} }
{
- \__xtxko_assign_font_opts:Nn \XK@adhoc@hanja@options {#1}
+ \__xtxko_hanja_assign_font_opts:n {#1,#3}
\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
{
\XK@storeltnfont
\tl_set_eq:NN \XKcurrentfont \c_two
- \XK@adhoc@hanja@font \XK@adhoc@hanja@options
+ \XK@adhoc@hanja@font
\XK@storecjkfont
}
\ignorespaces
}
\cs_set_eq:NN \hanjafontspec \adhochanjafont
%% new{hangul,hanja}font{family,face}
-\DeclareDocumentCommand \newhangulfontfamily { m O{} m }
+\DeclareDocumentCommand \newhangulfontfamily { m O{} m O{} }
{
- \__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}
+ \__xtxko_hangul_assign_font_opts:n {#2,#4}
+ \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 }
+ \l_xtxko_font_opts_tl
\DeclareRobustCommand #1
{
\tl_set:Nn \XKhangulfont
@@ -188,16 +193,17 @@
\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 }
+\DeclareDocumentCommand \newhanjafontfamily { m O{} m O{} }
{
- \__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}
+ \__xtxko_hanja_assign_font_opts:n {#2,#4}
+ \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 }
+ \l_xtxko_font_opts_tl
\DeclareRobustCommand #1
{
\tl_set:Nn \XKhanjafont
@@ -205,16 +211,17 @@
\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 }
+\DeclareDocumentCommand \newhangulfontface { m O{} m O{} }
{
- \__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}
+ \__xtxko_hangul_assign_font_opts:n {#2,#4}
+ \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 }
+ \l_xtxko_font_opts_tl
\DeclareRobustCommand #1
{
\tl_set:Nn \XKhangulfont
@@ -222,16 +229,17 @@
\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 }
+\DeclareDocumentCommand \newhanjafontface { m O{} m O{} }
{
- \__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}
+ \__xtxko_hanja_assign_font_opts:n {#2,#4}
+ \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 }
+ \l_xtxko_font_opts_tl
\DeclareRobustCommand #1
{
\tl_set:Nn \XKhanjafont
@@ -239,7 +247,6 @@
\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
}
}
@@ -257,8 +264,7 @@
\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:V \XKhangulfont
\exp_not:N \fontfamily { \f@family } \exp_not:N \selectfont
\exp_not:V \l_xtxko_font_opts_tl
\exp_not:N \XK@storecjkfont
@@ -279,8 +285,7 @@
\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:V \XKhanjafont
\exp_not:N \fontfamily { \f@family } \exp_not:N \selectfont
\exp_not:V \l_xtxko_font_opts_tl
\exp_not:N \XK@storecjkfont
@@ -289,10 +294,40 @@
\ignorespaces
}
\cs_set_eq:NN \addhanjafontfeatures \addhanjafontfeature
+%% default font features
+\defaultfontfeatures
+ [
+ \kormainfont, \korsansfont, \hnjmainfont, \hnjsansfont,
+ ]
+ {Ligatures=TeX}
+\DeclareDocumentCommand \defaulthangulfontfeatures { t+ o m } % o is ignored
+ {
+ \IfBooleanTF {#1}
+ {
+ \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hangul_font_opts_init_tl
+ }
+ {
+ \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_font_opts_init_tl
+ }
+ \keys_set_known:nxN { xtxko-font } {#3} \l_xtxko_rem_tl % rem_tl ignored
+ \tl_set_eq:NN \l_xtxko_hangul_font_opts_init_tl \l_xtxko_font_opts_tl
+ }
+\DeclareDocumentCommand \defaulthanjafontfeatures { t+ o m } % o is ignored
+ {
+ \IfBooleanTF {#1}
+ {
+ \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_hanja_font_opts_init_tl
+ }
+ {
+ \tl_set_eq:NN \l_xtxko_font_opts_tl \l_xtxko_font_opts_init_tl
+ }
+ \keys_set_known:nxN { xtxko-font } {#3} \l_xtxko_rem_tl % rem_tl ignored
+ \tl_set_eq:NN \l_xtxko_hanja_font_opts_init_tl \l_xtxko_font_opts_tl
+ }
%% math hangul font
-\DeclareDocumentCommand \setmathhangulfont { O{} m }
+\DeclareDocumentCommand \setmathhangulfont { O{} m O{} }
{
- \fontspec_set_family:Nnn \xetexko@math@hangul@family {#1} {#2}
+ \fontspec_set_family:Nnn \xetexko@math@hangul@family {#1,#3} {#2}
}
%%%%%%%%%%%%%%%%%%%%
%% xetexkofontregime
@@ -307,10 +342,10 @@
hyphens .code:n = \use:c { #1hyphens } ,
cjksymbols .code:n = \use:c { #1cjksymbols } ,
}
-\DeclareDocumentCommand \xetexkofontregime { O{} m }
+\DeclareDocumentCommand \xetexkofontregime { O{} m O{} }
{
\use:c { #2marks }
- \keys_set:nn { xtxko-char } { #1 }
+ \keys_set:nn { xtxko-char } { #1, #3 }
}
\ExplSyntaxOff
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-hanging.sty
index e079a7aa1ec..993dcc241fd 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/05/11 v2.6 Hanging punctuations for XeTeX-ko]
+ [2014/06/17 v2.7 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 a78fa8a511a..160c7df8308 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/05/11 v2.6 Auto-josa for XeTeX-ko]
+ \ProvidesPackage{xetexko-josa}[2014/06/17 v2.7 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 87ba623421c..9b62734ee61 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/05/11 v2.6 Spacings and fonts for XeTeX-ko]
+ [2014/06/17 v2.7 Spacings and fonts for XeTeX-ko]
\fi
%%% we need XeTeX > 0.997
@@ -1380,7 +1380,11 @@
\let\@let@token#1\XK@save@last@char
% and supress char orphan
\toks@{\XK@every@hangul{#1}}% everyhangul 가
- \XK@futurelet@let@token
+ \ifnum\lastpenalty=\z@ % bypass 가\\나 case
+ \expandafter\XK@futurelet@let@token
+ \else
+ \expandafter\XK@normal@the@toks@
+ \fi
}
\def\XK@check@next@char{%
\ifx\par\@let@token
diff --git a/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty b/Master/texmf-dist/tex/xetex/xetexko/xetexko-vertical.sty
index d29ad6b6e0e..1ac187205c0 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/05/11 v2.6 Vertical environment for XeTeX-ko]
+ [2014/06/17 v2.7 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 6b006a773f9..d50d7d31906 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/05/11 v2.6 Typesetting Korean with XeLaTeX]
+\ProvidesPackage{xetexko}[2014/06/17 v2.7 Typesetting Korean with XeLaTeX]
\newif\if@hangul
\newif\if@hanja