summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/xecjk
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-06-24 18:06:45 +0000
committerKarl Berry <karl@freefriends.org>2014-06-24 18:06:45 +0000
commit72da0e4e151286052461baf9b51b9e4f74f964c2 (patch)
tree0fcdcda1fd557e00843db95a1a5d6361a8a775b4 /Master/texmf-dist/source/xelatex/xecjk
parenta773f956133dd46fdbb8d5c972ae248089cbc1b0 (diff)
xecjk (20jun14)
git-svn-id: svn://tug.org/texlive/trunk@34383 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex/xecjk')
-rw-r--r--Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx97
-rw-r--r--Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins4
2 files changed, 82 insertions, 19 deletions
diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
index 973717ab586..05160b253ca 100644
--- a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
+++ b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.dtx
@@ -95,7 +95,7 @@ CJK scripts fonts (TrueType or OpenType).
\askforoverwritefalse
\preamble
-$Id: xeCJK.dtx 656 2014-05-13 03:14:47Z sobenlee $
+$Id: xeCJK.dtx 692 2014-06-20 12:25:35Z sobenlee $
$URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
-----------------------------------------------------------------
Author:
@@ -201,7 +201,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
%</!config&!xunextra>
-\GetIdInfo$Id: xeCJK.dtx 656 2014-05-13 03:14:47Z sobenlee $
+\GetIdInfo$Id: xeCJK.dtx 692 2014-06-20 12:25:35Z sobenlee $
%<*driver|package>
{Typesetting CJK scripts with XeLaTeX}
%</driver|package>
@@ -223,7 +223,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%<fntef> {xeCJKfntef}
%<listings> {xeCJK-listings}
%<xunicode> {xunicode-addon}
- {\ExplFileDate}{3.2.12}{\ExplFileDescription}
+ {\ExplFileDate}{3.2.13}{\ExplFileDescription}
%<xunextra>\ExplSyntaxOff
%<*driver>
\let\xeCJKrevnum\ExplFileVersion
@@ -240,15 +240,20 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
\usepackage{geometry}
\usepackage[toc]{multitoc}
\usepackage{indentfirst}
+\usepackage{unicode-math}
\fvset{formatcom=\xeCJKVerbAddon}
\linespread{1.1}
\setlist{noitemsep,topsep=1ex}
\newlist{optiondesc}{description}{3}
\setlist[optiondesc]{font=\mdseries\ttfamily,align=right,labelsep=.5em,leftmargin=4.5em}
\def\PSKeyVal#1#2{\item[#1]\makebox[4em][l]{\meta{#2}}\ignorespaces}
-\setmainfont[Ligatures=TeX]{TeX Gyre Pagella}
-\setmonofont{CMU Typewriter Text}
+\setmainfont{TeX Gyre Pagella}
+\setsansfont{CMU Sans Serif}
+\setmonofont[
+ UprightFont=* Light, BoldFont=* Bold,
+ SlantedFont=* Light Oblique]{CMU Typewriter Text}
\setCJKmainfont[BoldFont=Adobe Heiti Std,ItalicFont=Adobe Kaiti Std]{Adobe Song Std}
+\setmathfont{texgyrepagella-math.otf}
\setCJKmonofont{Adobe Kaiti Std}
\xeCJKDeclareSubCJKBlock{HKMD} { "FF65 }
\xeCJKDeclareSubCJKBlock{Ext-B} { "20000 -> "2A6DF }
@@ -274,6 +279,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
\begingroup\edef\x{\endgroup\lowercase{%
\noexpand\href{http://www.ctan.org/pkg/\IfNoValueTF{#1}{#2}{#1}}}}%
\x{\pkg{#2}}}
+\makeatletter
\ExplSyntaxOn
\NewDocumentCommand \PrintPunctList { O{7} m m }
{
@@ -303,9 +309,59 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
\endgroup
\par
}
+\cs_set_protected_nopar:Npn \__codedoc_special_main_index:n #1
+ {
+ \tl_if_empty:NTF \l__codedoc_function_name_prefix_tl
+ { \SpecialOptionIndex }
+ { \SpecialUsageIndex }
+ {#1}
+ }
+\cs_new_eq:NN \@@_special_main_index:n \SpecialMainIndex
+\group_begin:
+ \char_set_lccode:nn { `\/ } { `\\ }
+ \char_set_lccode:nn { `\L } { `\L }
+ \char_set_lccode:nn { `\T } { `\T }
+ \char_set_lccode:nn { `\X } { `\X }
+\tex_lowercase:D
+ {
+ \group_end:
+ \DeclareDocumentCommand \SpecialMainIndex { m }
+ {
+ \tl_if_head_eq_meaning:nNTF {#1} /
+ { \@@_special_main_index:n }
+ { \@@_special_main_option_index:n }
+ {#1}
+ }
+ \cs_new_protected:Npn \@@_special_main_option_index:n #1
+ {
+ \@bsphack
+ \group_begin:
+ \special@index
+ {
+ #1 \actualchar { /ttfamily ~ #1 } ~ (option)
+ \encapchar main
+ }
+ \special@index
+ {
+ options: \levelchar #1 \actualchar { /ttfamily ~ #1 }
+ \encapchar main
+ }
+ \group_end:
+ \@esphack
+ }
+ \DeclareDocumentCommand \tn { m }
+ {
+ { \ttfamily /#1 }
+ \SortIndex
+ { TeX~and~LaTeX2e~commands }
+ {
+ /TeX{} ~ and ~ /LaTeXe{} ~ commands: \levelchar
+ #1 \actualchar { /ttfamily /bslash ~ #1 }
+ }
+ }
+ }
\ExplSyntaxOff
\geometry{includemp,hmargin={0mm,15mm},vmargin=15mm,footskip=7mm}
-\makeatletter
\preto\IndexParms{\linespread{1}}
\appto\GlossaryParms{%
\def\@idxitem{\par\hangindent 2em}%
@@ -351,7 +407,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
% \changes{v3.2.4}{2013/07/02}{遵循 \hologo{LaTeX3} 变量需要预先声明的原则。}
% \changes{v3.2.6}{2013/07/29}{\texttt{case} 类函数的用法与 \hologo{LaTeX3} 同步。}
%
-% \CheckSum{9020}
+% \CheckSum{9027}
% \GetFileInfo{\jobname.dtx}
%
% \title{\bfseries\pkg{xeCJK} 宏包}
@@ -5670,18 +5726,18 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
}
\cs_new_nopar:Npn \@@_msg_def_family_map:n #1
{
- \str_case_x:nnn {#1}
+ \str_case_x:nnF {#1}
{
\CJKrmdefault { \token_to_str:N \setCJKmainfont }
\CJKsfdefault { \token_to_str:N \setCJKsansfont }
\CJKttdefault { \token_to_str:N \setCJKmonofont }
}
- { \token_to_str:N \setCJKfamilyfont {#1} }
- [...]{...}
+ { \token_to_str:N \setCJKfamilyfont \{ #1 \} }
+ [...]\{...\}
}
\cs_new_nopar:Npn \@@_msg_family_map:n #1
{
- \str_case_x:nnn {#1}
+ \str_case_x:nnF {#1}
{
\CJKrmdefault { \token_to_str:N \CJKrmdefault }
\CJKsfdefault { \token_to_str:N \CJKsfdefault }
@@ -5892,6 +5948,7 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
% \end{macro}
%
% \changes{v3.1.2}{2013/01/01}{修正重定义 \cs{CJKfamilydefault} 无效的问题,恢复容错能力。}
+% \changes{v3.2.13}{2014/06/02}{自动调整 \cs{CJKfamilydefault} 时,只将 \cs{familydefault} 展开一次。}
%
% 在导言区结束的时候,若没有声明 CJK 字体,则给出一个警告。如果 \cs{CJKfamilydefault}
% 没有被更改,则在此时根据西文字体的情况更新 \cs{CJKfamilydefault}。
@@ -5901,12 +5958,13 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
% \begin{macrocode}
\@@_at_end_preamble:n
{
- \cs_set_eq:NN \@@_family_default_wrap:n \exp_not:n
\tl_if_eq:NNT \CJKfamilydefault \l_@@_family_default_init_tl
{
+ \group_begin:
+ \cs_set_eq:NN \@@_family_default_wrap:n \exp_not:n
\tl_gset:Nx \CJKfamilydefault
{
- \str_case_x:nnn { \familydefault }
+ \str_case:onF { \familydefault }
{
{ \rmdefault } { \exp_not:N \CJKrmdefault }
{ \sfdefault } { \exp_not:N \CJKsfdefault }
@@ -5914,8 +5972,8 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
}
{ \CJKfamilydefault }
}
+ \group_end:
}
- \cs_undefine:N \@@_family_default_wrap:n
\prop_if_empty:NTF \g_@@_family_font_name_prop
{
\bool_if:NTF \g_@@_fandol_bool
@@ -5995,14 +6053,15 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
% \begin{macro}[internal]{\xeCJK_set_mathfont:}
% \changes{v3.2.6}{2013/08/01}{设置粗体时先检查对应字体是否存在。}
% \changes{v3.2.7}{2013/11/09}{将 CJK 字符的数学归类由 $7$ 改为 $0$,解决汉字路径的问题。}
+% \changes{v3.2.13}{2014/06/20}{修复参数类型错误。}
% 当没有设置 CJK 数学字体时,使用 \cs{CJKfamilydefault} 作为数学字体。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \xeCJK_set_mathfont:
{
- \xeCJK_family_if_exist:xF { \c_@@_math_tl }
+ \xeCJK_family_if_exist:xTF { \c_@@_math_tl }
{ \use:n }
{
- \xeCJK_family_if_exist:xF { \CJKfamilydefault }
+ \xeCJK_family_if_exist:xTF { \CJKfamilydefault }
{ \use:n } { \use_none:n }
}
{
@@ -6706,7 +6765,11 @@ $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
\exp_not:o
{
\fontspec_setup_maths:
- \tl_if_empty:NT \g_fontspec_bfmathrm_tl
+ \bool_if:nT
+ {
+ \tl_if_empty_p:N \g__fontspec_bfmathrm_tl ||
+ \tl_if_empty_p:N \g_fontspec_bfmathrm_tl
+ }
{ \DeclareSymbolFontAlphabet \mathrm { operators } }
}
}
diff --git a/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins b/Master/texmf-dist/source/xelatex/xecjk/xeCJK.ins
index f8c9dfb341d..7ac58f7da5d 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: `install')
%%
-%% $Id: xeCJK.dtx 656 2014-05-13 03:14:47Z sobenlee $
+%% $Id: xeCJK.dtx 692 2014-06-20 12:25:35Z sobenlee $
%% $URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
%% -----------------------------------------------------------------
%% Author:
@@ -37,7 +37,7 @@
\askforoverwritefalse
\preamble
-$Id: xeCJK.dtx 656 2014-05-13 03:14:47Z sobenlee $
+$Id: xeCJK.dtx 692 2014-06-20 12:25:35Z sobenlee $
$URL: https://ctex-kit.googlecode.com/svn/trunk/xeCJK/xeCJK.dtx $
-----------------------------------------------------------------
Author: