diff options
author | Karl Berry <karl@freefriends.org> | 2012-02-04 00:54:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-02-04 00:54:02 +0000 |
commit | e5ef52124ad078285133094925a787ff19172c5e (patch) | |
tree | 0f9afa05bdc66dd39aa1c8d998eafa920932e931 /Master/texmf-dist/tex/xelatex | |
parent | 6520e34c1a3077670ffdee218186448cfa45a839 (diff) |
xecjk (1feb12)
git-svn-id: svn://tug.org/texlive/trunk@25283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | 65 |
1 files changed, 50 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty index 441dc0605fe..eeed2ec6cf4 100644 --- a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty +++ b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `xeCJK') %% -%% Version 2.4.4 (17-Sep-2011) +%% Version 2.4.5 (31-Jan-2012) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -18,8 +18,8 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% -\def\fileversion{2.4.4} -\def\filedate{2011/09/17} +\def\fileversion{2.4.5} +\def\filedate{2012/01/31} \ProvidesPackage{xeCJK}[\filedate\space\fileversion\space package for typesetting CJK scripts with XeLaTeX] \RequirePackage{ifxetex} \RequireXeTeX @@ -178,8 +178,13 @@ \AtBeginDocument{% \xeCJK@patch\textellipsis {\begingroup\makexeCJKinactive}{\endgroup} + \xeCJK@patch\textemdash {\begingroup\makexeCJKinactive}{\endgroup} \xeCJK@patch\textperiodcentered {\begingroup\makexeCJKinactive}{\endgroup} \xeCJK@patch\textcentereddot {\begingroup\makexeCJKinactive}{\endgroup} + \xeCJK@patch\textquoteleft {\begingroup\makexeCJKinactive}{\endgroup} + \xeCJK@patch\textquoteright {\begingroup\makexeCJKinactive}{\endgroup} + \xeCJK@patch\textquotedblleft {\begingroup\makexeCJKinactive}{\endgroup} + \xeCJK@patch\textquotedblright {\begingroup\makexeCJKinactive}{\endgroup} \xeCJK@patch\tipaencoding {\makexeCJKinactive}{} % tipa package in T3 encoding \let\xeCJK@save@r\r \def\r#1{{\makexeCJKinactive\xeCJK@save@r{#1}}} % \r{u} in T1 encoding @@ -895,6 +900,10 @@ {\not@math@alphabet\sffamily\mathsf \fontfamily\sfdefault\CJKfamily{\CJKsfdefault}\selectfont} +\DeclareRobustCommand\ttfamily + {\not@math@alphabet\ttfamily\mathtt + \fontfamily\ttdefault\CJKfamily{\CJKttdefault}\selectfont} + \newcommand*\xeCJK@newfontfamily[1]{ \@ifnextchar[ {\xeCJK@newfontfamily@{#1}} @@ -1046,12 +1055,45 @@ \newcommand*\setCJKmonoexspace{ \xecjk_set_monoexspace: - \CJKsetecglue{\skip_horizontal:N .5\g_xecjk_exspace_dim} - \def\CJKglue{\skip_horizontal:N \g_xecjk_exspace_dim} +} + +\cs_new:Nn \xecjk_fixed_ecglue: +{ + \skip_horizontal:N .5\g_xecjk_exspace_dim +} + +\cs_new:Nn \xecjk_fixed_cjkglue: +{ + \skip_horizontal:N \g_xecjk_exspace_dim +} + +\tl_set_eq:NN \l_xecjk_flexible_punctstyle_tl \xeCJK@punctstyle +\cs_set_eq:NN \xecjk_flexible_ecglue: \CJKecglue +\cs_set_eq:NN \xecjk_flexible_cjkglue: \CJKglue + +\newcommand*\CJKfixedspacing{ + \unless\ifnum \xeCJK@punctstyle = \xeCJK@ps@plain + \tl_set_eq:NN \l_xecjk_flexible_punctstyle_tl \xeCJK@punctstyle +\punctstyle{plain} + \fi + \unless\ifx \CJKecglue \xecjk_fixed_ecglue: + \cs_set_eq:NN \xecjk_flexible_ecglue: \CJKecglue + \let \CJKecglue \xecjk_fixed_ecglue: + \fi + \unless\ifx \CJKglue \xecjk_fixed_cjkglue: + \cs_set_eq:NN \xecjk_flexible_cjkglue: \CJKglue + \let \CJKglue \xecjk_fixed_cjkglue: + \fi +} + +\newcommand*\CJKflexiblespacing{ + \let \xeCJK@punctstyle \l_xecjk_flexible_punctstyle_tl + \let \CJKecglue \xecjk_flexible_ecglue: + \let \cjkglue \xecjk_flexible_cjkglue: } \DeclareRobustCommand\setCJKmonoexspacefont[2][]{ - \setCJKmonoexspace + \xecjk_set_monoexspace: \xeCJK@newfontfamily{\CJKttdefault}[#1]{#2}} \def\xeCJK@ifplus#1{\@ifnextchar +{\@firstoftwo{#1}}} @@ -1062,17 +1104,10 @@ {\setCJKmonoexspacefont} {\xeCJK@newfontfamily{\CJKttdefault}}}} -\DeclareRobustCommand\ttfamily - {\not@math@alphabet\ttfamily\mathtt - \fontfamily\ttdefault\CJKfamily{\CJKttdefault}\selectfont - \CJKsetecglue{\skip_horizontal:N .5\g_xecjk_exspace_dim} - \def\CJKglue{\skip_horizontal:N \g_xecjk_exspace_dim}} - \AtBeginDocument{ \tl_put_right:Nn \verbatim@font { - \punctstyle{plain} - \CJKsetecglue{\skip_horizontal:N \g_xecjk_exspace_dim} - \def\CJKglue{\skip_horizontal:N \g_xecjk_exspace_dim}} + \CJKfixedspacing + } } \ExplSyntaxOff |