diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-15 22:19:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-15 22:19:28 +0000 |
commit | 953f11c8761fc6eee458f57c36974515bc365b3b (patch) | |
tree | 237e154241f213e44d2dc65d321ba1b85b520ced /Master/texmf-dist/tex/xelatex | |
parent | 84add25b1941f4a2447c8d13da3b056007dd98b4 (diff) |
xecjk 2.3.19 (14may11)
git-svn-id: svn://tug.org/texlive/trunk@22487 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty index 8113393abe5..e97b05950d6 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.3.17 (20-Nov-2010) +%% Version 2.3.19 (01-May-2011) %% %% 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.3.17} -\def\filedate{2010/11/20} +\def\fileversion{2.3.19} +\def\filedate{2011/05/01} \ProvidesPackage{xeCJK}[\filedate\space\fileversion\space package for typesetting CJK scripts with XeLaTeX] \RequirePackage{ifxetex} \RequireXeTeX @@ -29,6 +29,8 @@ \newif\ifxeCJK@BoldFont@ +\newif\ifxeCJK@fallback@ + \newif\ifxeCJK@num \newif\ifxeCJK@checksingle @@ -40,6 +42,7 @@ \DeclareOption{BoldFont}{\ExecuteOptions{boldfont}} \DeclareOption{slantfont}{\xeCJK@SlantFont@true} \DeclareOption{SlantFont}{\ExecuteOptions{slantfont}} +\DeclareOption{fallback}{\xeCJK@fallback@true} \DeclareOption{CJKnumber}{\xeCJK@numtrue} \DeclareOption{normalindentfirst}{\xeCJK@indentfirstfalse} \DeclareOption{CJKchecksingle}{\AtEndOfPackage{\let\xeCJK@i@i\xeCJK@checksingle}} @@ -117,6 +120,7 @@ \xeCJK@postPunct{FF}{01,05,09,0C,0E,1A,1B,1F,3D,5D, 61,63,64,65,67,68,69,6A,6B,6C,6D,6E,6F,70,9E,9F} + \xeCJK@setPunct{1}{0}{B7} \xeCJK@setPunct{4}{0}{28,2D,5B,60,7B} \xeCJK@setPunct{5}{0}{21,22,25,27,29,2C,2E,3A,3B,3F,5D,7D}} @@ -158,6 +162,17 @@ \normalspacedchars{/} +\AtBeginDocument{% + \let\xeCJK@save@textellipsis\textellipsis + \def\textellipsis{\begingroup\makexeCJKinactive + \xeCJK@save@textellipsis\endgroup} + \let\xeCJK@save@textperiodcentered\textperiodcentered + \def\textperiodcentered{\begingroup\makexeCJKinactive + \xeCJK@save@textperiodcentered\endgroup} + \let\xeCJK@save@textcentereddot\textcentereddot + \def\textcentereddot{\begingroup\makexeCJKinactive + \xeCJK@save@textcentereddot\endgroup} +} \XeTeXinterchartoks 1 0{\egroup\CJKecglue} \XeTeXinterchartoks 1 1{\xeCJK@i@i} \XeTeXinterchartoks 1 2{\xeCJK@i@ii} @@ -753,6 +768,26 @@ \def\CJKsymbol#1{#1} \def\CJKpunctsymbol#1{#1} +\def\xeCJK@fallback@testsymbol#1{ + \iffontchar\font`#1 + #1 + \else + {\csname xeCJK@fallback@\xeCJK@family\endcsname #1} + \fi} +\newcommand\xeCJKenablefallback{\let\xeCJK@fallback@CJKsymbol\CJKsymbol + \def\CJKsymbol##1{\xeCJK@fallback@CJKsymbol{\xeCJK@fallback@testsymbol{##1}}}} +\newcommand\xeCJKdisablefallback{\let\CJKsymbol\xeCJK@fallback@CJKsymbol} +\ifxeCJK@fallback@ + \xeCJKenablefallback +\fi +\newcommand\setCJKfallbackfamilyfont[1]{ + \@ifnextchar[ + {\xeCJK@setfallbackfamilyfont{#1}} + {\xeCJK@setfallbackfamilyfont{#1}[]}} +\def\xeCJK@setfallbackfamilyfont#1[#2]#3{ + \expandafter\newfontfamily\csname xeCJK@fallback@#1\endcsname[#2]{#3} +} + \DeclareRobustCommand{\xeCJK@ULprepunctchar}[1]{ {\XeTeXinterchartokenstate=0 \CJKpunctsymbol{#1} @@ -779,8 +814,11 @@ \AtBeginDocument{ \ifcsname UL@hook\endcsname \addto@hook\UL@hook{ - \def\CJKsymbol#1{{\xeCJK@setfont #1}\kern -1sp\kern 1sp\xeCJK@ignorespaces} - \def\CJKpunctsymbol#1{{\xeCJK@setfont #1}} + \let\xeCJK@UL@CJKsymbol\CJKsymbol + \let\xeCJK@UL@CJKpunctsymbol\CJKpunctsymbol + \def\CJKsymbol#1{{\xeCJK@setfont \xeCJK@UL@CJKsymbol{#1}} + \kern -1sp\kern 1sp\xeCJK@ignorespaces} + \def\CJKpunctsymbol#1{{\xeCJK@setfont \xeCJK@UL@CJKpunctsymbol{#1}}} \xeCJK@ULroutines} \fi \ifcsname ver@CJKfntef.sty\endcsname |