diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-09 22:19:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-09 22:19:47 +0000 |
commit | c02aeef45b983ed627811c3fb323ce89b4c778d5 (patch) | |
tree | 8b791563cde13ba00dcdef2733939580c247e9de /Master | |
parent | cbff04af8ef44a84b301ef7e606946111c6b2676 (diff) |
xecjk update (9jun10)
git-svn-id: svn://tug.org/texlive/trunk@18848 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/README | 16 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/README.txt | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/example-CJKchecksingle.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/example-CJKfntef.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/example-addspaces.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKchecksingle.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKfntef.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/examples/example-addspaces.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf | bin | 296020 -> 301841 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx | 271 | ||||
-rw-r--r-- | Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty | 215 |
12 files changed, 182 insertions, 361 deletions
diff --git a/Master/texmf-dist/doc/xelatex/xecjk/README b/Master/texmf-dist/doc/xelatex/xecjk/README deleted file mode 100644 index 3bbf9ce6216..00000000000 --- a/Master/texmf-dist/doc/xelatex/xecjk/README +++ /dev/null @@ -1,16 +0,0 @@ -xeCJK is a package written for XeLaTeX which allows users to typeset -CJK scripts easily. - - - different default fonts for CJK and other characters; - - spaces automatically ignored between CJK characters; - - special effects on full-width CJK punctuation; and - - automatic adjustment of the space between CJK and other characters. - -This package is licensed in LPPL. - -If you are interested in the process of development you -may observe - - http://code.google.com/p/ctex-kit/updates/list - -- Sun Wenchang <sunwch@hotmail.com> diff --git a/Master/texmf-dist/doc/xelatex/xecjk/README.txt b/Master/texmf-dist/doc/xelatex/xecjk/README.txt index c508dcc0802..c7e23e2f142 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/README.txt +++ b/Master/texmf-dist/doc/xelatex/xecjk/README.txt @@ -7,3 +7,12 @@ CJK scripts easily. - special effects on full-width CJK punctuation; and - automatic adjustment of the space between CJK and other characters. +This package is licensed in LPPL. + +If you are interested in the process of development you +may observe + + http://code.google.com/p/ctex-kit/updates/list + +- Sun Wenchang <sunwch@hotmail.com> + diff --git a/Master/texmf-dist/doc/xelatex/xecjk/example-CJKchecksingle.tex b/Master/texmf-dist/doc/xelatex/xecjk/example-CJKchecksingle.tex index c90fed53b6c..ac3946f2c7e 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/example-CJKchecksingle.tex +++ b/Master/texmf-dist/doc/xelatex/xecjk/example-CJKchecksingle.tex @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `example-CJKchecksingle') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -20,7 +20,7 @@ %% \documentclass{article} \usepackage[boldfont,slantfont,CJKaddspaces,CJKchecksingle]{xeCJK} -\setCJKmainfont{AR PL SungtiL GB} +\setCJKmainfont{AR PLBaosong2GBK Light} \textwidth 120mm \oddsidemargin 0pt \def\usemacro#1{\csname#1\endcsname $\backslash$#1} diff --git a/Master/texmf-dist/doc/xelatex/xecjk/example-CJKfntef.tex b/Master/texmf-dist/doc/xelatex/xecjk/example-CJKfntef.tex index 9d3528ad8aa..4703769f538 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/example-CJKfntef.tex +++ b/Master/texmf-dist/doc/xelatex/xecjk/example-CJKfntef.tex @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `example-CJKfntef') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -29,8 +29,8 @@ \usepackage{CJKfntef} \begin{document} -\setCJKmainfont{AR PL SungtiL GB}% 设置缺省中文字体 -\setCJKmonofont{AR PL SungtiL GB}% 设置缺省中文字体 +\setCJKmainfont{AR PLBaosong2GBK Light}% 设置缺省中文字体 +\setCJKmonofont{AR PLBaosong2GBK Light}% 设置缺省中文字体 \baselineskip 16pt \parindent 2em diff --git a/Master/texmf-dist/doc/xelatex/xecjk/example-addspaces.tex b/Master/texmf-dist/doc/xelatex/xecjk/example-addspaces.tex index 4b62b0747cd..7b41a5eb124 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/example-addspaces.tex +++ b/Master/texmf-dist/doc/xelatex/xecjk/example-addspaces.tex @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `example-addspaces') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -21,7 +21,7 @@ \documentclass{article} \usepackage[boldfont,slantfont]{xeCJK} \usepackage{xcolor} -\setCJKmainfont{AR PL SungtiL GB} +\setCJKmainfont{AR PLBaosong2GBK Light} \textwidth 190mm \oddsidemargin 0pt \begin{document} diff --git a/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKchecksingle.tex b/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKchecksingle.tex index c90fed53b6c..ac3946f2c7e 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKchecksingle.tex +++ b/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKchecksingle.tex @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `example-CJKchecksingle') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -20,7 +20,7 @@ %% \documentclass{article} \usepackage[boldfont,slantfont,CJKaddspaces,CJKchecksingle]{xeCJK} -\setCJKmainfont{AR PL SungtiL GB} +\setCJKmainfont{AR PLBaosong2GBK Light} \textwidth 120mm \oddsidemargin 0pt \def\usemacro#1{\csname#1\endcsname $\backslash$#1} diff --git a/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKfntef.tex b/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKfntef.tex index 9d3528ad8aa..4703769f538 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKfntef.tex +++ b/Master/texmf-dist/doc/xelatex/xecjk/examples/example-CJKfntef.tex @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `example-CJKfntef') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -29,8 +29,8 @@ \usepackage{CJKfntef} \begin{document} -\setCJKmainfont{AR PL SungtiL GB}% 设置缺省中文字体 -\setCJKmonofont{AR PL SungtiL GB}% 设置缺省中文字体 +\setCJKmainfont{AR PLBaosong2GBK Light}% 设置缺省中文字体 +\setCJKmonofont{AR PLBaosong2GBK Light}% 设置缺省中文字体 \baselineskip 16pt \parindent 2em diff --git a/Master/texmf-dist/doc/xelatex/xecjk/examples/example-addspaces.tex b/Master/texmf-dist/doc/xelatex/xecjk/examples/example-addspaces.tex index 4b62b0747cd..7b41a5eb124 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/examples/example-addspaces.tex +++ b/Master/texmf-dist/doc/xelatex/xecjk/examples/example-addspaces.tex @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `example-addspaces') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -21,7 +21,7 @@ \documentclass{article} \usepackage[boldfont,slantfont]{xeCJK} \usepackage{xcolor} -\setCJKmainfont{AR PL SungtiL GB} +\setCJKmainfont{AR PLBaosong2GBK Light} \textwidth 190mm \oddsidemargin 0pt \begin{document} diff --git a/Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf b/Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf Binary files differindex 3749e6aff65..b0615a1bca7 100644 --- a/Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf +++ b/Master/texmf-dist/doc/xelatex/xecjk/xeCJK.pdf diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx index dd6ecf2cf46..c11a199ab17 100644 --- a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx +++ b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx @@ -13,6 +13,16 @@ CJK scripts easily. - special effects on full-width CJK punctuation; and - automatic adjustment of the space between CJK and other characters. + +This package is licensed in LPPL. + +If you are interested in the process of development you +may observe + + http://code.google.com/p/ctex-kit/updates/list + +- Sun Wenchang <sunwch@hotmail.com> + %</readme> %<*internal> \fi @@ -26,7 +36,7 @@ CJK scripts easily. \keepsilent \preamble - Version 2.3.10 (30-Sept-2009) + Version 2.3.15 (31-May-2010) Copyright (C) Wenchang Sun <sunwch@hotmail.com> @@ -65,7 +75,7 @@ CJK scripts easily. \defaultfontfeatures{Mapping=tex-text} \ifcsname CJKmainfont\endcsname \else - \def\CJKmainfont{AR PL SungtiL GB} + \def\CJKmainfont{AR PLBaosong2GBK Light} \fi \setCJKmainfont{\CJKmainfont}% 设置缺省中文字体 \setCJKmonofont[Scale=1.1]{\CJKmainfont}% 设置 中文字体 @@ -129,9 +139,9 @@ CJK scripts easily. %</driver> % %<*xeCJK> -\def\fileversion{2.3.10} -\def\filedate{2009/09/30} -\ProvidesPackage{xeCJK}[\filedate\space\fileversion] +\def\fileversion{2.3.15} +\def\filedate{2010/05/31} +\ProvidesPackage{xeCJK}[\filedate\space\fileversion\space package for typesetting CJK scripts with XeLaTeX] %</xeCJK> % % \fi @@ -142,9 +152,11 @@ CJK scripts easily. % \GetFileInfo{xeCJK.sty} % % \title{\hypertarget{Chinese}{xeCJK 宏包} -% \hbox to 0pt{\hskip 40mm\hyperlink{English}{\normalsize\texttt{English Version}}}} +% \hbox to 0pt{\hskip 40mm\hyperlink{English}{\normalsize\texttt{English Version}}} +% \\[1ex] +% \normalsize 版本:\fileversion} % \author{孙文昌} -% \date{} +% \date{\filedate} % \maketitle % % \newpage @@ -233,12 +245,12 @@ CJK scripts easily. % % \subsection*{例子} % -% 以下命令设置缺省英文字体为 TeX Gyre Termes, 缺省中文字体为 AR PL SungtiL GB (文鼎 PL简报宋), +% 以下命令设置缺省英文字体为 TeX Gyre Termes, 缺省中文字体为 AR PLBaosong2GBK Light (文鼎PL报宋二\kern 0sp GBK), % 最后一个命令设置 CJKfamily “song”。 % \begin{verbatim} % \setmainfont{TeX Gyre Termes} -% \setCJKmainfont{AR PL SungtiL GB} -% \setCJKfamilyfont{song}{AR PL SungtiL GB} +% \setCJKmainfont{AR PLBaosong2GBK Light} +% \setCJKfamilyfont{song}{AR PLBaosong2GBK Light} % \end{verbatim} % % \noindent @@ -311,12 +323,14 @@ CJK scripts easily. % % \defmacro{\CJKsetecglue}: 设置中英文间距. 缺省值为\defmacro{\CJKsetecglue\{ \}}. % 注意: 这个宏命令仅仅影响自动添加的空格. 源文件中直接输入的中英文之间的空格不受影响(直接输出). -% \begin{verbatim} +% \bgroup\let\CJKecglue\relax +% \begin{verbatim} % 这是 English 中文 \textit{Chinese} 中文 \LaTeX\ % 中文\textbf{字体} a {\bfseries 数学} $c$ $d$-th\par % 这是English中文\textit{Chinese}中文\LaTeX\ % 中文\textbf{字体}a{\bfseries 数学}$c$ $d$-th\par % \end{verbatim} +% \egroup % % \noindent % 排版效果: @@ -402,9 +416,10 @@ CJK scripts easily. % % % \title{ \hypertarget{English}{The xeCJK Package} -% \hbox to 0pt{\hskip 40mm\hyperlink{Chinese}{\normalsize 中文版}} } +% \hbox to 0pt{\hskip 40mm\hyperlink{Chinese}{\normalsize 中文版}}\\[1ex] +% \normalsize Ver. \fileversion} % \author{Wenchang Sun} -% \date{\today} +% \date{\filedate} % \maketitle % % \newpage @@ -567,11 +582,15 @@ CJK scripts easily. \newif\ifxeCJK@checksingle \xeCJK@checksinglefalse +\newif\ifxeCJK@indentfirst +\xeCJK@indentfirsttrue + \DeclareOption{boldfont}{\xeCJK@BoldFont@true} \DeclareOption{BoldFont}{\ExecuteOptions{boldfont}} \DeclareOption{slantfont}{\xeCJK@SlantFont@true} \DeclareOption{SlantFont}{\ExecuteOptions{slantfont}} \DeclareOption{CJKnumber}{\xeCJK@numtrue} +\DeclareOption{normalindentfirst}{\xeCJK@indentfirstfalse} \DeclareOption{CJKnormalspaces}{} \DeclareOption{CJKaddspaces}{} \DeclareOption{CJKtextspaces}{} @@ -584,6 +603,10 @@ CJK scripts easily. \RequirePackage{fontspec} \relax + +\ifxeCJK@indentfirst + \let\@afterindentfalse\relax +\fi % \end{macrocode} % 抑制换行符产生的空格 % \begin{macrocode} @@ -1007,6 +1030,8 @@ CJK scripts easily. \def\xeCJK@@@checksingle#1{ \def\xeCJK@setcurrentchar@ii{ \xeCJK@setcurrentchar@i #1} + \def\xeCJK@setcurrentchar@ii@s{ + \xeCJK@setcurrentchar@i #1 } \def\xeCJK@setcurrentnobreakchar@ii{ \xeCJK@setcurrentnobreakchar@i #1} \futurelet\@let@token\xeCJK@@@@checksingle} @@ -1020,7 +1045,7 @@ CJK scripts easily. \let\xeCJK@par\par \def\xeCJK@checkpar{ - \@ifnextchar\xeCJK@par{\xeCJK@setcurrentnobreakchar@ii}{\xeCJK@setcurrentchar@ii}} + \@ifnextchar\xeCJK@par{\xeCJK@setcurrentnobreakchar@ii}{\xeCJK@setcurrentchar@ii@s}} % \end{macrocode} % % 设置中英文间距。 @@ -1032,7 +1057,6 @@ CJK scripts easily. \let\CJKsetecglue\xeCJKsetecglue \CJKsetecglue{ } - % \end{macrocode} % % 缺省状态下,不允许在相邻标点中间换行。 @@ -1046,6 +1070,19 @@ CJK scripts easily. \xeCJKnobreakbetweenpuncts % \end{macrocode} +% +% 重定义\verb+\/+ +% \begin{macrocode} +\let\xeCJK@itcorr\/ +\def\/{% + \relax + \ifnum\lastkern=4 % + \unkern\unkern + \fi + \xeCJK@itcorr} +\let\@@italiccorr=\/ + +% \end{macrocode} % \section{标点挤压规则} % \begin{macrocode} \newcount\xeCJK@cnta @@ -1200,8 +1237,6 @@ CJK scripts easily. \def\xeCJK@ps@plain{5} \punctstyle{quanjiao} -\let\@afterindentfalse\relax - \def\xeCJKplainchr{\punctstyle{plain}} \def\xeCJK@sidespace{10} @@ -1329,8 +1364,18 @@ CJK scripts easily. \def\setCJKfamilyfont#1{ \xeCJK@newfontfamily{#1}} % \end{macrocode} -% Redefine \string\rmfamily, \string\sffamily and \string\ttfamily to set CJKfamily +% Redefine \string\normalfont, \string\rmfamily, \string\sffamily +% and \string\ttfamily\ to set CJKfamily % \begin{macrocode} +\DeclareRobustCommand\normalfont + {\CJKfamily{rm}% + \usefont\encodingdefault + \familydefault + \seriesdefault + \shapedefault + \relax} +\let\reset@font\normalfont + \DeclareRobustCommand\rmfamily {\not@math@alphabet\rmfamily\mathrm \fontfamily\rmdefault\CJKfamily{rm}\selectfont} @@ -1351,17 +1396,24 @@ CJK scripts easily. {\xeCJK@newfontfamily@{#1}} {\xeCJK@newfontfamily@{#1}[]}} +\def\xeCJK@setmacro@define@key#1{ + \define@key[xeCJK]{preparse}{#1}{ + \expandafter\xdef\csname xeCJK@#1\endcsname{##1}}} + +\xeCJK@setmacro@define@key{ItalicFont} +\xeCJK@setmacro@define@key{BoldFont} +\xeCJK@setmacro@define@key{BoldItalicFont} + \def\xeCJK@newfontfamily@#1[#2]#3{ % % Get user defined options - \def\xeCJK@temp{#2,} - \expandafter - \xeCJK@getBoldFont\xeCJK@temp BoldFont={},{}\relax - \expandafter - \xeCJK@getBoldItalicFont\xeCJK@temp BoldItalicFont={},{}\relax - \expandafter - \xeCJK@getItalicFont\xeCJK@temp ItalicFont={},{}\relax + \let\xeCJK@BoldFont\@empty + \let\xeCJK@ItalicFont\@empty + \let\xeCJK@BoldItalicFont\@empty + \bgroup + \setkeys*[xeCJK]{preparse}{#2} + \egroup \edef\xeCJK@Features{} \ifxeCJK@BoldFont@ @@ -1403,143 +1455,15 @@ CJK scripts easily. \fi \fi - \edef\@tempa{\noexpand\zf@fontspec{\xeCJK@Features}{#3}} - \@tempa - \edef\@tempa{ - \noexpand\DeclareRobustCommand\expandafter\noexpand\csname xeCJK@font@#1\endcsname - {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}} - \@tempa - \expandafter\edef\csname xeCJK@nsff#1\endcsname{\zf@family}} - -\def\xeCJK@setmacro@getkey#1{ - \expandafter\def\csname xeCJK@get#1\endcsname ##1#1=##2,##3\relax{ - \expandafter\edef\csname xeCJK@#1\endcsname{##2} - \edef\xeCJK@temp{##1##3}}} - -\xeCJK@setmacro@getkey{BoldFont} -\xeCJK@setmacro@getkey{ItalicFont} -\xeCJK@setmacro@getkey{BoldItalicFont} - -\define@key[zf]{preparse}{ItalicFeatures}{ - \edef\zf@it@feat{,#1} - \edef\zf@family@long{\zf@family@long itfeat:#1}} + \expandafter\edef\csname xeCJK@font@#1\endcsname{ + \noexpand\fontspec[\xeCJK@Features]{#3}} + \expandafter\edef\csname xeCJK@fontoptions@#1\endcsname{\xeCJK@Features} + \expandafter\edef\csname xeCJK@fontname@#1\endcsname{#3}} + % \end{macrocode} -% Redefine \string\zf@fontspec to set slant shape. +% Redefine \verb+\addfontfeatures+ % \begin{macrocode} -\renewcommand*\zf@fontspec[2]{% - \begingroup - \zf@init - \edef\zf@fontname{#2}% - \let\zf@family@long\zf@fontname - \setkeys*[zf]{prepreparse}{#1}% - \let\zf@up\zf@fontname - \edef\@tempa{\noexpand\setkeys*[zf]{preparse}{\XKV@rm}}\@tempa - \let\zf@fontname\zf@up - \let\zf@font@feat\XKV@rm - \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt - \unless\ifzf@icu - \zf@set@font@type - \fi - \ifx\zf@suffix\@empty - \ifzf@atsui - \def\zf@suffix{/AAT}% - \else - \ifzf@icu - \def\zf@suffix{/ICU}% - \fi - \fi - \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt - \fi - \zf@firsttimetrue - \zf@get@feature@requests{\zf@font@feat}% - \zf@firsttimefalse - \unless\ifcsname zf@UID@\zf@family@long\endcsname - \edef\@tempa{#2}% - \ifcsname c@zf@famc@\@tempa\endcsname - \expandafter\stepcounter\else - \expandafter\newcounter\fi - {zf@famc@\@tempa}% - \gdef@cx{zf@UID@\zf@family@long}{% - \expandafter\expandafter\expandafter - \zap@space\expandafter\@tempa\space\@empty - (\expandafter\the\csname c@zf@famc@\@tempa\endcsname)}% - \fi - \xdef\zf@family{\@nameuse{zf@UID@\zf@family@long}}% - \unless\ifcsname zf@family@fontname\zf@family\endcsname - \zf@PackageInfo{Defining font family for '#2' - with options [\zf@default@options #1]}% - \gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}% - \gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}% - \gdef@cx{zf@family@fontdef\zf@family} - {\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}% - \DeclareFontFamily{\zf@enc}{\zf@family}{}% - \zf@make@font@shapes{\zf@fontname} - {\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}% - \unless\ifzf@nobf - \ifx\zf@bf\@empty - \zf@make@font@shapes[\zf@fontname]{/B} - {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}% - \else - \zf@make@font@shapes{\zf@bf} - {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}% - \fi - \fi - \unless\ifzf@noit - \ifx\zf@it\@empty - \zf@make@font@shapes[\zf@fontname]{/I} - {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}% - \else - \zf@make@font@shapes{\zf@it} - {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}% - \fi - \fi - \@tempswatrue - \ifzf@nobf\@tempswafalse\fi - \ifzf@noit\@tempswafalse\fi - \if@tempswa - \ifx\zf@bfit\@empty - \ifx\zf@bf\@empty - \ifx\zf@it\@empty - \zf@make@font@shapes[\zf@fontname]{/BI} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \else - \zf@make@font@shapes[\zf@it]{/B} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \fi - \else - \zf@make@font@shapes[\zf@bf]{/I} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \fi - \else - \zf@make@font@shapes{\zf@bfit} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \fi - \fi - \ifxeCJK@SlantFont@ - \zf@make@font@shapes{\zf@fontname}{\mddefault}{\sldefault} - {\zf@font@feat,RawFeature={slant=0.167}} - \ifx\zf@bf\@empty - \ifzf@nobf - \zf@make@font@shapes{\zf@fontname}{\bfdefault}{\sldefault} - {\zf@font@feat,RawFeature={embolden=4,slant=0.167}} - \else - \zf@make@font@shapes[\zf@fontname]{/B} - {\bfdefault}{\sldefault}{\zf@font@feat\zf@bf@feat,RawFeature={slant=0.167}} - \fi - \else - \ifx\zf@fontname\zf@bf - \zf@make@font@shapes{\zf@fontname}{\bfdefault}{\sldefault} - {\zf@font@feat,RawFeature={embolden=4,slant=0.167}} - \else - \zf@make@font@shapes{\zf@bf}{\bfdefault}{\sldefault} - {\zf@font@feat\zf@bf@feat,RawFeature={slant=0.167}} - \fi - \fi - \fi - \fi - \endgroup} - \newcount\xeCJK@featureadded \xeCJK@featureadded=0 @@ -1547,22 +1471,21 @@ CJK scripts easily. \def\addCJKfontfeatures#1{ \global\advance\xeCJK@featureadded\@ne \ifcsname xeCJK@family\endcsname - \edef\xeCJK@temp{\csname xeCJK@nsff\xeCJK@family\endcsname} - \edef\xeCJK@Features{[\csname zf@family@options\xeCJK@temp\endcsname,#1]} - \expandafter - \newfontfamily@i\csname xeCJK@font@\xeCJK@family @\the\xeCJK@featureadded\expandafter\endcsname - \xeCJK@Features - {\csname zf@family@fontname\xeCJK@temp\endcsname} - \expandafter\edef\csname xeCJK@nsff\xeCJK@family @\the\xeCJK@featureadded\endcsname{\zf@family} - \CJKfamily{\xeCJK@family @\the\xeCJK@featureadded} + \edef\xeCJK@tempa{\csname xeCJK@fontoptions@\xeCJK@family\endcsname,#1} + \edef\xeCJK@tempb{\csname xeCJK@fontname@\xeCJK@family\endcsname} + \edef\xeCJK@tempf{\xeCJK@family @\the\xeCJK@featureadded} + \expandafter\edef\csname xeCJK@font@\xeCJK@tempf\endcsname{ + \noexpand\fontspec[\xeCJK@tempa]{\xeCJK@tempb}} + \expandafter\edef\csname xeCJK@fontoptions@\xeCJK@tempf\endcsname{\xeCJK@tempa} + \expandafter\edef\csname xeCJK@fontname@\xeCJK@tempf\endcsname{\xeCJK@tempb} + \CJKfamily{\xeCJK@tempf} \fi} \def\addfontfeatures#1{ \xeCJK@addfontfeatures{#1} \addCJKfontfeatures{#1}} - -% redefine \CJKfamily. +% redefine \verb+\CJKfamily+ \def\xeCJK@font@rm{} @@ -1644,7 +1567,7 @@ CJK scripts easily. \documentclass{article} \usepackage[boldfont,slantfont]{xeCJK} \usepackage{xcolor} -\setCJKmainfont{AR PL SungtiL GB} +\setCJKmainfont{AR PLBaosong2GBK Light} \textwidth 190mm \oddsidemargin 0pt \begin{document} @@ -1687,7 +1610,7 @@ This is an example. 这是一个例子 % \begin{macrocode} \documentclass{article} \usepackage[boldfont,slantfont,CJKaddspaces,CJKchecksingle]{xeCJK} -\setCJKmainfont{AR PL SungtiL GB} +\setCJKmainfont{AR PLBaosong2GBK Light} \textwidth 120mm \oddsidemargin 0pt \def\usemacro#1{\csname#1\endcsname $\backslash$#1} @@ -1734,8 +1657,8 @@ xeCJK 改进了中英文间距的处理, 并且还可以避免单个汉字独 \usepackage{CJKfntef} \begin{document} -\setCJKmainfont{AR PL SungtiL GB}% 设置缺省中文字体 -\setCJKmonofont{AR PL SungtiL GB}% 设置缺省中文字体 +\setCJKmainfont{AR PLBaosong2GBK Light}% 设置缺省中文字体 +\setCJKmonofont{AR PLBaosong2GBK Light}% 设置缺省中文字体 \baselineskip 16pt \parindent 2em @@ -1752,7 +1675,7 @@ xeCJK 改进了中英文间距的处理, 并且还可以避免单个汉字独 \ifcsname CJKunderanyline\endcsname \CJKunderanyline{0.5em}{\sixly \kern-.021em\char58 \kern-.021em}{自定义下划线} - + \CJKunderanyline{0.2em}{\kern-.03em\vtop{\kern.2ex\hrule width.2em\kern 0.11em \hrule height .1em}\kern-.03em}{自定义下划线} diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins index a9faa771836..49a014988fd 100644 --- a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins +++ b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins @@ -6,7 +6,7 @@ %% %% xeCJK.dtx (with options: `batchfile') %% -%% Version 2.3.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -22,7 +22,7 @@ \keepsilent \preamble - Version 2.3.10 (30-Sept-2009) + Version 2.3.15 (31-May-2010) Copyright (C) Wenchang Sun <sunwch@hotmail.com> diff --git a/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty b/Master/texmf-dist/tex/xelatex/xecjk/xeCJK.sty index ce72b7ce0ac..53e47711b36 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.10 (30-Sept-2009) +%% Version 2.3.15 (31-May-2010) %% %% Copyright (C) Wenchang Sun <sunwch@hotmail.com> %% @@ -18,9 +18,9 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% -\def\fileversion{2.3.10} -\def\filedate{2009/09/30} -\ProvidesPackage{xeCJK}[\filedate\space\fileversion] +\def\fileversion{2.3.15} +\def\filedate{2010/05/31} +\ProvidesPackage{xeCJK}[\filedate\space\fileversion\space package for typesetting CJK scripts with XeLaTeX] \RequirePackage{ifxetex} \RequireXeTeX \expandafter\def\csname ver@CJK.sty\endcsname{2020/01/01} @@ -37,11 +37,15 @@ \newif\ifxeCJK@checksingle \xeCJK@checksinglefalse +\newif\ifxeCJK@indentfirst +\xeCJK@indentfirsttrue + \DeclareOption{boldfont}{\xeCJK@BoldFont@true} \DeclareOption{BoldFont}{\ExecuteOptions{boldfont}} \DeclareOption{slantfont}{\xeCJK@SlantFont@true} \DeclareOption{SlantFont}{\ExecuteOptions{slantfont}} \DeclareOption{CJKnumber}{\xeCJK@numtrue} +\DeclareOption{normalindentfirst}{\xeCJK@indentfirstfalse} \DeclareOption{CJKnormalspaces}{} \DeclareOption{CJKaddspaces}{} \DeclareOption{CJKtextspaces}{} @@ -54,6 +58,10 @@ \RequirePackage{fontspec} \relax + +\ifxeCJK@indentfirst + \let\@afterindentfalse\relax +\fi \endlinechar \m@ne \def\makexeCJKactive{ \XeTeXinterchartokenstate=1\relax} @@ -463,6 +471,8 @@ \def\xeCJK@@@checksingle#1{ \def\xeCJK@setcurrentchar@ii{ \xeCJK@setcurrentchar@i #1} + \def\xeCJK@setcurrentchar@ii@s{ + \xeCJK@setcurrentchar@i #1 } \def\xeCJK@setcurrentnobreakchar@ii{ \xeCJK@setcurrentnobreakchar@i #1} \futurelet\@let@token\xeCJK@@@@checksingle} @@ -476,7 +486,7 @@ \let\xeCJK@par\par \def\xeCJK@checkpar{ - \@ifnextchar\xeCJK@par{\xeCJK@setcurrentnobreakchar@ii}{\xeCJK@setcurrentchar@ii}} + \@ifnextchar\xeCJK@par{\xeCJK@setcurrentnobreakchar@ii}{\xeCJK@setcurrentchar@ii@s}} \def\xeCJKsetecglue#1{ \def\CJK@ecglue{#1} @@ -492,6 +502,15 @@ \let\xeCJKpunctnobreak\nobreak} \xeCJKnobreakbetweenpuncts +\let\xeCJK@itcorr\/ +\def\/{% + \relax + \ifnum\lastkern=4 % + \unkern\unkern + \fi + \xeCJK@itcorr} +\let\@@italiccorr=\/ + \newcount\xeCJK@cnta \newcount\xeCJK@cntb \newcount\xeCJK@cntc @@ -636,8 +655,6 @@ \def\xeCJK@ps@plain{5} \punctstyle{quanjiao} -\let\@afterindentfalse\relax - \def\xeCJKplainchr{\punctstyle{plain}} \def\xeCJK@sidespace{10} @@ -759,6 +776,15 @@ \def\setCJKfamilyfont#1{ \xeCJK@newfontfamily{#1}} +\DeclareRobustCommand\normalfont + {\CJKfamily{rm}% + \usefont\encodingdefault + \familydefault + \seriesdefault + \shapedefault + \relax} +\let\reset@font\normalfont + \DeclareRobustCommand\rmfamily {\not@math@alphabet\rmfamily\mathrm \fontfamily\rmdefault\CJKfamily{rm}\selectfont} @@ -775,17 +801,24 @@ {\xeCJK@newfontfamily@{#1}} {\xeCJK@newfontfamily@{#1}[]}} +\def\xeCJK@setmacro@define@key#1{ + \define@key[xeCJK]{preparse}{#1}{ + \expandafter\xdef\csname xeCJK@#1\endcsname{##1}}} + +\xeCJK@setmacro@define@key{ItalicFont} +\xeCJK@setmacro@define@key{BoldFont} +\xeCJK@setmacro@define@key{BoldItalicFont} + \def\xeCJK@newfontfamily@#1[#2]#3{ % % Get user defined options - \def\xeCJK@temp{#2,} - \expandafter - \xeCJK@getBoldFont\xeCJK@temp BoldFont={},{}\relax - \expandafter - \xeCJK@getBoldItalicFont\xeCJK@temp BoldItalicFont={},{}\relax - \expandafter - \xeCJK@getItalicFont\xeCJK@temp ItalicFont={},{}\relax + \let\xeCJK@BoldFont\@empty + \let\xeCJK@ItalicFont\@empty + \let\xeCJK@BoldItalicFont\@empty + \bgroup + \setkeys*[xeCJK]{preparse}{#2} + \egroup \edef\xeCJK@Features{} \ifxeCJK@BoldFont@ @@ -827,139 +860,11 @@ \fi \fi - \edef\@tempa{\noexpand\zf@fontspec{\xeCJK@Features}{#3}} - \@tempa - \edef\@tempa{ - \noexpand\DeclareRobustCommand\expandafter\noexpand\csname xeCJK@font@#1\endcsname - {\noexpand\fontfamily{\zf@family}\noexpand\selectfont}} - \@tempa - \expandafter\edef\csname xeCJK@nsff#1\endcsname{\zf@family}} - -\def\xeCJK@setmacro@getkey#1{ - \expandafter\def\csname xeCJK@get#1\endcsname ##1#1=##2,##3\relax{ - \expandafter\edef\csname xeCJK@#1\endcsname{##2} - \edef\xeCJK@temp{##1##3}}} - -\xeCJK@setmacro@getkey{BoldFont} -\xeCJK@setmacro@getkey{ItalicFont} -\xeCJK@setmacro@getkey{BoldItalicFont} - -\define@key[zf]{preparse}{ItalicFeatures}{ - \edef\zf@it@feat{,#1} - \edef\zf@family@long{\zf@family@long itfeat:#1}} - -\renewcommand*\zf@fontspec[2]{% - \begingroup - \zf@init - \edef\zf@fontname{#2}% - \let\zf@family@long\zf@fontname - \setkeys*[zf]{prepreparse}{#1}% - \let\zf@up\zf@fontname - \edef\@tempa{\noexpand\setkeys*[zf]{preparse}{\XKV@rm}}\@tempa - \let\zf@fontname\zf@up - \let\zf@font@feat\XKV@rm - \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt - \unless\ifzf@icu - \zf@set@font@type - \fi - \ifx\zf@suffix\@empty - \ifzf@atsui - \def\zf@suffix{/AAT}% - \else - \ifzf@icu - \def\zf@suffix{/ICU}% - \fi - \fi - \font\zf@basefont="\zf@font@wrap\zf@fontname\zf@suffix" at \f@size pt - \fi - \zf@firsttimetrue - \zf@get@feature@requests{\zf@font@feat}% - \zf@firsttimefalse - \unless\ifcsname zf@UID@\zf@family@long\endcsname - \edef\@tempa{#2}% - \ifcsname c@zf@famc@\@tempa\endcsname - \expandafter\stepcounter\else - \expandafter\newcounter\fi - {zf@famc@\@tempa}% - \gdef@cx{zf@UID@\zf@family@long}{% - \expandafter\expandafter\expandafter - \zap@space\expandafter\@tempa\space\@empty - (\expandafter\the\csname c@zf@famc@\@tempa\endcsname)}% - \fi - \xdef\zf@family{\@nameuse{zf@UID@\zf@family@long}}% - \unless\ifcsname zf@family@fontname\zf@family\endcsname - \zf@PackageInfo{Defining font family for '#2' - with options [\zf@default@options #1]}% - \gdef@cx{zf@family@fontname\zf@family}{\zf@fontname}% - \gdef@cx{zf@family@options\zf@family}{\zf@default@options #1}% - \gdef@cx{zf@family@fontdef\zf@family} - {\zf@fontname\zf@suffix:\zf@pre@ff\zf@ff}% - \DeclareFontFamily{\zf@enc}{\zf@family}{}% - \zf@make@font@shapes{\zf@fontname} - {\mddefault}{\updefault}{\zf@font@feat\zf@up@feat}% - \unless\ifzf@nobf - \ifx\zf@bf\@empty - \zf@make@font@shapes[\zf@fontname]{/B} - {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}% - \else - \zf@make@font@shapes{\zf@bf} - {\bfdefault}{\updefault}{\zf@font@feat\zf@bf@feat}% - \fi - \fi - \unless\ifzf@noit - \ifx\zf@it\@empty - \zf@make@font@shapes[\zf@fontname]{/I} - {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}% - \else - \zf@make@font@shapes{\zf@it} - {\mddefault}{\itdefault}{\zf@font@feat\zf@it@feat}% - \fi - \fi - \@tempswatrue - \ifzf@nobf\@tempswafalse\fi - \ifzf@noit\@tempswafalse\fi - \if@tempswa - \ifx\zf@bfit\@empty - \ifx\zf@bf\@empty - \ifx\zf@it\@empty - \zf@make@font@shapes[\zf@fontname]{/BI} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \else - \zf@make@font@shapes[\zf@it]{/B} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \fi - \else - \zf@make@font@shapes[\zf@bf]{/I} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \fi - \else - \zf@make@font@shapes{\zf@bfit} - {\bfdefault}{\itdefault}{\zf@font@feat\zf@bfit@feat}% - \fi - \fi - \ifxeCJK@SlantFont@ - \zf@make@font@shapes{\zf@fontname}{\mddefault}{\sldefault} - {\zf@font@feat,RawFeature={slant=0.167}} - \ifx\zf@bf\@empty - \ifzf@nobf - \zf@make@font@shapes{\zf@fontname}{\bfdefault}{\sldefault} - {\zf@font@feat,RawFeature={embolden=4,slant=0.167}} - \else - \zf@make@font@shapes[\zf@fontname]{/B} - {\bfdefault}{\sldefault}{\zf@font@feat\zf@bf@feat,RawFeature={slant=0.167}} - \fi - \else - \ifx\zf@fontname\zf@bf - \zf@make@font@shapes{\zf@fontname}{\bfdefault}{\sldefault} - {\zf@font@feat,RawFeature={embolden=4,slant=0.167}} - \else - \zf@make@font@shapes{\zf@bf}{\bfdefault}{\sldefault} - {\zf@font@feat\zf@bf@feat,RawFeature={slant=0.167}} - \fi - \fi - \fi - \fi - \endgroup} + \expandafter\edef\csname xeCJK@font@#1\endcsname{ + \noexpand\fontspec[\xeCJK@Features]{#3}} + \expandafter\edef\csname xeCJK@fontoptions@#1\endcsname{\xeCJK@Features} + \expandafter\edef\csname xeCJK@fontname@#1\endcsname{#3}} + \newcount\xeCJK@featureadded \xeCJK@featureadded=0 @@ -968,14 +873,14 @@ \def\addCJKfontfeatures#1{ \global\advance\xeCJK@featureadded\@ne \ifcsname xeCJK@family\endcsname - \edef\xeCJK@temp{\csname xeCJK@nsff\xeCJK@family\endcsname} - \edef\xeCJK@Features{[\csname zf@family@options\xeCJK@temp\endcsname,#1]} - \expandafter - \newfontfamily@i\csname xeCJK@font@\xeCJK@family @\the\xeCJK@featureadded\expandafter\endcsname - \xeCJK@Features - {\csname zf@family@fontname\xeCJK@temp\endcsname} - \expandafter\edef\csname xeCJK@nsff\xeCJK@family @\the\xeCJK@featureadded\endcsname{\zf@family} - \CJKfamily{\xeCJK@family @\the\xeCJK@featureadded} + \edef\xeCJK@tempa{\csname xeCJK@fontoptions@\xeCJK@family\endcsname,#1} + \edef\xeCJK@tempb{\csname xeCJK@fontname@\xeCJK@family\endcsname} + \edef\xeCJK@tempf{\xeCJK@family @\the\xeCJK@featureadded} + \expandafter\edef\csname xeCJK@font@\xeCJK@tempf\endcsname{ + \noexpand\fontspec[\xeCJK@tempa]{\xeCJK@tempb}} + \expandafter\edef\csname xeCJK@fontoptions@\xeCJK@tempf\endcsname{\xeCJK@tempa} + \expandafter\edef\csname xeCJK@fontname@\xeCJK@tempf\endcsname{\xeCJK@tempb} + \CJKfamily{\xeCJK@tempf} \fi} \def\addfontfeatures#1{ |