summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-06-19 22:32:36 +0000
committerKarl Berry <karl@freefriends.org>2015-06-19 22:32:36 +0000
commit24a26d6f89a97e7ba548a2c42c0e6a6c80e6fb2a (patch)
treec87c15ce0105a3b7f9dfef8548ea2b0bb368d91c /Master/texmf-dist/tex/latex/ctex
parent28cb2b214ad9bcb5ac65fdf512b438f388a68b1e (diff)
ctex (19jun15)
git-svn-id: svn://tug.org/texlive/trunk@37615 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctex.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-article.def74
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-book.def92
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex-report.def92
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctex.sty159
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexart.cls199
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexbook.cls217
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexcap.sty7
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexheading.sty278
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexrep.cls217
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexsize.sty7
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexspa.def2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def6
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def64
-rw-r--r--Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def18
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd2
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def7
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def4
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def12
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def12
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def12
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def10
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def11
-rw-r--r--Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def4
42 files changed, 1090 insertions, 496 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg
index fe33f135e5d..445383b47fd 100644
--- a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg
+++ b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-gbk.cfg
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Caption with encoding GBK (CTEX)}
\ProvidesExplFile{ctex-name-gbk.cfg}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex }
{
contentsname = Ŀ¼ ,
diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg
index 4f86d6bebf7..28f8903bb40 100644
--- a/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg
+++ b/Master/texmf-dist/tex/latex/ctex/config/ctex-name-utf8.cfg
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Caption with encoding UTF8 (CTEX)}
\ProvidesExplFile{ctex-name-utf8.cfg}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex }
{
contentsname = 目录 ,
diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg
index 1c91052f246..9441ebf9045 100644
--- a/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg
+++ b/Master/texmf-dist/tex/latex/ctex/config/ctex.cfg
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Configuration file (CTEX)}
\ProvidesExplFile{\ExplFileName.cfg}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
%%
%%
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg
index be98a7d9e94..0d1bf614b7e 100644
--- a/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg
+++ b/Master/texmf-dist/tex/latex/ctex/config/ctexopts.cfg
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Option configuration file (CTEX)}
\ProvidesExplFile{ctexopts.cfg}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
%%
%% \keys_set:nn { ctex / option } { fontset = windowsnew }
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-article.def b/Master/texmf-dist/tex/latex/ctex/ctex-article.def
index ba0af7ce82d..be98bfc12e0 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctex-article.def
+++ b/Master/texmf-dist/tex/latex/ctex/ctex-article.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for article (CTEX)}
\ProvidesExplFile{ctex-article.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\seq_new:N \c__ctex_headings_seq
\seq_gset_from_clist:Nn \c__ctex_headings_seq
{
@@ -49,16 +49,18 @@
\tl_const:cx { CTEX@#1name }
{
\exp_not:c { CTEX@#1@nameformat }
- \exp_not:c { CTEX@pre#1 }
- \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
- { \exp_not:c { CTEX@the#1 } }
{
- \group_begin:
- \exp_not:c { CTEX@#1@numberformat }
- \exp_not:c { CTEX@the#1 }
- \group_end:
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
}
- \exp_not:c { CTEX@post#1 }
\exp_not:c { CTEX@#1@aftername }
}
}
@@ -75,19 +77,34 @@
#1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
#1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
#1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / format~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / nameformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
#1 / numberformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / numberformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
#1 / aftername+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / aftername~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
#1 / titleformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / titleformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / aftertitle~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
#1 / beforeskip .initial:n = \c_zero_skip ,
#1 / afterskip .initial:n = \c_zero_skip ,
#1 / indent .initial:n = \c_zero_dim ,
@@ -106,7 +123,6 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
-\tl_clear:N \l__ctex_tmp_tl
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
@@ -138,14 +154,16 @@
\CTEX@partname
\fi
\CTEX@part@titleformat{#2}%
- \markboth{}{}\par}%
+ \markboth{}{}%
+ \CTEX@part@aftertitle}%
\nobreak
\vskip \CTEX@part@afterskip
\@afterheading}
\def\@spart#1{%
{\interlinepenalty \@M
\normalfont \parindent \CTEX@part@indent \CTEX@part@format
- \CTEX@part@titleformat{#1}\par}%
+ \CTEX@part@titleformat{#1}%
+ \CTEX@part@aftertitle}%
\nobreak
\vskip \CTEX@part@afterskip
\@afterheading}
@@ -166,7 +184,8 @@
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M
- \csname CTEX@#1@titleformat\endcsname{#8}\@@par}%
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
@@ -179,7 +198,9 @@
\else
\def\@svsechd{%
#6{\hskip #3\relax
- \@svsec \csname CTEX@#1@titleformat\endcsname{#8}}%
+ \@svsec
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
@@ -197,15 +218,20 @@
#4{%
\@hangfrom{\hskip #1}%
\interlinepenalty \@M
- \CTEX@titleformat@n{#5}\@@par}%
+ \CTEX@titleformat@n{#5}%
+ \CTEX@aftertitle}%
\endgroup
\else
- \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}}}%
+ \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}\CTEX@aftertitle}}%
\fi
\@xsect{#3}}
\cs_new_protected_nopar:Npn \CTEX@set@titleformat@n #1
- { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } }
+ {
+ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat }
+ \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle }
+ }
\cs_new_eq:NN \CTEX@titleformat@n \use:n
+\cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing:
\int_zero:N \l__ctex_tmp_int
\clist_map_inline:nn
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -224,15 +250,15 @@
}
}
}
-\tl_new:N \CTEX@preappendix
-\tl_new:N \CTEX@postappendix
\keys_define:nn { ctex }
- { appendix .meta:nn = { ctex / appendix } {#1} }
-\keys_define:nn { ctex / appendix }
{
- name .code:n = { \ctex_assign_heading_name:nn { appendix } {#1} } ,
- number .tl_set:N = \CTEX@appendixnumber
+ appendix .meta:nn = { ctex / appendix } {#1} ,
+ appendix / name .code:n =
+ { \ctex_assign_heading_name:nn { appendix } {#1} } ,
+ appendix / number .tl_set:N = \CTEX@appendixnumber
}
+\tl_new:N \CTEX@preappendix
+\tl_new:N \CTEX@postappendix
\cs_new_eq:NN \CTEX@save@appendix \appendix
\cs_gset_protected_nopar:Npn \appendix
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-book.def b/Master/texmf-dist/tex/latex/ctex/ctex-book.def
index 82bd4be7ebb..43125e9a69b 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctex-book.def
+++ b/Master/texmf-dist/tex/latex/ctex/ctex-book.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for book (CTEX)}
\ProvidesExplFile{ctex-book.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\seq_new:N \c__ctex_headings_seq
\seq_gset_from_clist:Nn \c__ctex_headings_seq
{
@@ -49,16 +49,18 @@
\tl_const:cx { CTEX@#1name }
{
\exp_not:c { CTEX@#1@nameformat }
- \exp_not:c { CTEX@pre#1 }
- \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
- { \exp_not:c { CTEX@the#1 } }
{
- \group_begin:
- \exp_not:c { CTEX@#1@numberformat }
- \exp_not:c { CTEX@the#1 }
- \group_end:
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
}
- \exp_not:c { CTEX@post#1 }
\exp_not:c { CTEX@#1@aftername }
}
}
@@ -75,19 +77,34 @@
#1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
#1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
#1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / format~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / nameformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
#1 / numberformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / numberformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
#1 / aftername+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / aftername~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
#1 / titleformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / titleformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / aftertitle~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
#1 / beforeskip .initial:n = \c_zero_skip ,
#1 / afterskip .initial:n = \c_zero_skip ,
#1 / indent .initial:n = \c_zero_dim ,
@@ -106,7 +123,11 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
-\tl_clear:N \l__ctex_tmp_tl
+\tl_set:Nn \l__ctex_tmp_tl
+ {
+ part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
+ chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle ,
+ }
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
@@ -114,11 +135,6 @@
}
\use:x { \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } } }
\tl_clear:N \l__ctex_tmp_tl
-\keys_define:nn { ctex }
- {
- part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
- chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle
- }
\def\@part[#1]#2{%
\thispagestyle{\CTEX@part@pagestyle}%
\ifnum \c@secnumdepth >-2\relax
@@ -133,12 +149,14 @@
\ifnum \c@secnumdepth >-2\relax
\CTEX@partname
\fi
- \CTEX@part@titleformat{#2}\par}%
+ \CTEX@part@titleformat{#2}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
- \CTEX@part@titleformat{#1}\par}%
+ \CTEX@part@titleformat{#1}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
@@ -178,7 +196,9 @@
\fi
\fi
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}%
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@makeschapterhead#1{%
@@ -192,7 +212,9 @@
\vspace*{\@tempskipa}%
{\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@seccntformat#1{%
@@ -212,7 +234,8 @@
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M
- \csname CTEX@#1@titleformat\endcsname{#8}\@@par}%
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
@@ -225,7 +248,9 @@
\else
\def\@svsechd{%
#6{\hskip #3\relax
- \@svsec \csname CTEX@#1@titleformat\endcsname{#8}}%
+ \@svsec
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
@@ -243,15 +268,20 @@
#4{%
\@hangfrom{\hskip #1}%
\interlinepenalty \@M
- \CTEX@titleformat@n{#5}\@@par}%
+ \CTEX@titleformat@n{#5}%
+ \CTEX@aftertitle}%
\endgroup
\else
- \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}}}%
+ \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}\CTEX@aftertitle}}%
\fi
\@xsect{#3}}
\cs_new_protected_nopar:Npn \CTEX@set@titleformat@n #1
- { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } }
+ {
+ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat }
+ \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle }
+ }
\cs_new_eq:NN \CTEX@titleformat@n \use:n
+\cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing:
\int_zero:N \l__ctex_tmp_int
\clist_map_inline:nn
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -270,15 +300,15 @@
}
}
}
-\tl_new:N \CTEX@preappendix
-\tl_new:N \CTEX@postappendix
\keys_define:nn { ctex }
- { appendix .meta:nn = { ctex / appendix } {#1} }
-\keys_define:nn { ctex / appendix }
{
- name .code:n = { \ctex_assign_heading_name:nn { appendix } {#1} } ,
- number .tl_set:N = \CTEX@appendixnumber
+ appendix .meta:nn = { ctex / appendix } {#1} ,
+ appendix / name .code:n =
+ { \ctex_assign_heading_name:nn { appendix } {#1} } ,
+ appendix / number .tl_set:N = \CTEX@appendixnumber
}
+\tl_new:N \CTEX@preappendix
+\tl_new:N \CTEX@postappendix
\cs_new_eq:NN \CTEX@save@appendix \appendix
\cs_gset_protected_nopar:Npn \appendix
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo
index d77593121a1..963071bf90b 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo
+++ b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{c5size option (CTEX)}
\ProvidesExplFile{ctex-c5size.clo}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\ctex_set_font_size:Nnn \normalsize { 5 }
{
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo
index a93c92bae43..36ea15530d6 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo
+++ b/Master/texmf-dist/tex/latex/ctex/ctex-cs4size.clo
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{cs4size option (CTEX)}
\ProvidesExplFile{ctex-cs4size.clo}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\ctex_set_font_size:Nnn \normalsize { -4 }
{
\abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-report.def b/Master/texmf-dist/tex/latex/ctex/ctex-report.def
index ed27e9c8adb..42b4b0b15bd 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctex-report.def
+++ b/Master/texmf-dist/tex/latex/ctex/ctex-report.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Heading modification for report (CTEX)}
\ProvidesExplFile{ctex-report.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\seq_new:N \c__ctex_headings_seq
\seq_gset_from_clist:Nn \c__ctex_headings_seq
{
@@ -49,16 +49,18 @@
\tl_const:cx { CTEX@#1name }
{
\exp_not:c { CTEX@#1@nameformat }
- \exp_not:c { CTEX@pre#1 }
- \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
- { \exp_not:c { CTEX@the#1 } }
{
- \group_begin:
- \exp_not:c { CTEX@#1@numberformat }
- \exp_not:c { CTEX@the#1 }
- \group_end:
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
}
- \exp_not:c { CTEX@post#1 }
\exp_not:c { CTEX@#1@aftername }
}
}
@@ -75,19 +77,34 @@
#1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
#1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
#1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / format~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / nameformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
#1 / numberformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / numberformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
#1 / aftername+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / aftername~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
#1 / titleformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / titleformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / aftertitle~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
#1 / beforeskip .initial:n = \c_zero_skip ,
#1 / afterskip .initial:n = \c_zero_skip ,
#1 / indent .initial:n = \c_zero_dim ,
@@ -106,7 +123,11 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
-\tl_clear:N \l__ctex_tmp_tl
+\tl_set:Nn \l__ctex_tmp_tl
+ {
+ part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
+ chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle ,
+ }
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
@@ -114,11 +135,6 @@
}
\use:x { \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } } }
\tl_clear:N \l__ctex_tmp_tl
-\keys_define:nn { ctex }
- {
- part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
- chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle
- }
\def\@part[#1]#2{%
\thispagestyle{\CTEX@part@pagestyle}%
\ifnum \c@secnumdepth >-2\relax
@@ -133,12 +149,14 @@
\ifnum \c@secnumdepth >-2\relax
\CTEX@partname
\fi
- \CTEX@part@titleformat{#2}\par}%
+ \CTEX@part@titleformat{#2}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
- \CTEX@part@titleformat{#1}\par}%
+ \CTEX@part@titleformat{#1}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
@@ -172,7 +190,9 @@
\CTEX@chaptername
\fi
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}%
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@makeschapterhead#1{%
@@ -186,7 +206,9 @@
\vspace*{\@tempskipa}%
{\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@seccntformat#1{%
@@ -206,7 +228,8 @@
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M
- \csname CTEX@#1@titleformat\endcsname{#8}\@@par}%
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
@@ -219,7 +242,9 @@
\else
\def\@svsechd{%
#6{\hskip #3\relax
- \@svsec \csname CTEX@#1@titleformat\endcsname{#8}}%
+ \@svsec
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
@@ -237,15 +262,20 @@
#4{%
\@hangfrom{\hskip #1}%
\interlinepenalty \@M
- \CTEX@titleformat@n{#5}\@@par}%
+ \CTEX@titleformat@n{#5}%
+ \CTEX@aftertitle}%
\endgroup
\else
- \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}}}%
+ \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}\CTEX@aftertitle}}%
\fi
\@xsect{#3}}
\cs_new_protected_nopar:Npn \CTEX@set@titleformat@n #1
- { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } }
+ {
+ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat }
+ \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle }
+ }
\cs_new_eq:NN \CTEX@titleformat@n \use:n
+\cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing:
\int_zero:N \l__ctex_tmp_int
\clist_map_inline:nn
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -264,15 +294,15 @@
}
}
}
-\tl_new:N \CTEX@preappendix
-\tl_new:N \CTEX@postappendix
\keys_define:nn { ctex }
- { appendix .meta:nn = { ctex / appendix } {#1} }
-\keys_define:nn { ctex / appendix }
{
- name .code:n = { \ctex_assign_heading_name:nn { appendix } {#1} } ,
- number .tl_set:N = \CTEX@appendixnumber
+ appendix .meta:nn = { ctex / appendix } {#1} ,
+ appendix / name .code:n =
+ { \ctex_assign_heading_name:nn { appendix } {#1} } ,
+ appendix / number .tl_set:N = \CTEX@appendixnumber
}
+\tl_new:N \CTEX@preappendix
+\tl_new:N \CTEX@postappendix
\cs_new_eq:NN \CTEX@save@appendix \appendix
\cs_gset_protected_nopar:Npn \appendix
{
diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty
index c7201874053..615e615d807 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctex.sty
+++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% ctex.dtx (with options: `package,style')
+%% ctex.dtx (with options: `style,ctex')
%%
%% Copyright (C) 2003--2015
%% CTEX.ORG and any individual authors listed in the documentation.
@@ -28,48 +28,43 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter in LaTeX (CTEX)}
\ProvidesExplPackage{\ExplFileName}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
+\tl_const:Nx \c__ctex_version_tl
+ { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } }
+\msg_new:nnnn { ctex } { subpackage-loaded }
+ { Package~`#1'~can~not~be~loaded~with~`ctex'. }
+ {
+ `#1'~is~actually~a~part~of~`ctex'.\\
+ It~is~not~necessary~to~load~it~separately.
+ }
+\@ifpackageloaded { ctexsize }
+ { \msg_error:nnn { ctex } { subpackage-loaded } { ctexsize } }
+ { \cs_new_eq:cN { ver@ctexsize. \@pkgextension } \c__ctex_version_tl }
+\@ifpackageloaded { ctexheading }
+ { \msg_error:nnn { ctex } { subpackage-loaded } { ctexheading } }
+ { \cs_new_eq:cN { ver@ctexheading. \@pkgextension } \c__ctex_version_tl }
\RequirePackage { xparse , l3keys2e }
-\RequirePackage { etoolbox , ifpdf , fix-cm , everysel }
+\RequirePackage { etoolbox }
+\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
-\msg_new:nnnn { ctex } { package-too-old }
- { Support~package~`#1'~too~old. }
- {
- Please~update~an~up~to~date~version~of~the~package~`#1'\\
- using~your~TeX~package~manager~or~from~CTAN.
- }
-\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
-\ifpdf
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
-\else:
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
-\fi:
-\prg_new_conditional:Npnn \ctex_if_preamble: { TF }
- {
- \if_meaning:w \@onlypreamble \@notprerr
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
\cs_new_protected:Npn \ctex_at_end_package:nn #1#2
{
- \@ifpackageloaded { #1 }
- { #2 }
- { \ctex_add_hook:cn { g__ctex_at_end_ #1 _hook_tl } { #2 } }
+ \@ifpackageloaded {#1}
+ {#2}
+ { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} }
}
-\cs_new_protected:Npn \ctex_add_hook:Nn #1#2
+\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2
{
\tl_if_exist:NF #1 { \tl_new:N #1 }
- \tl_gput_right:Nn #1 { #2 }
+ \tl_gput_right:Nn #1 {#2}
}
-\cs_generate_variant:Nn \ctex_add_hook:Nn { c }
+\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c }
\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1
{
\cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl }
@@ -77,7 +72,10 @@
}
\cs_generate_variant:Nn \ctex_package_end_hook:n { o }
\tl_put_left:Nn \@popfilename
- { \ctex_package_end_hook:o { \@currname } }
+ {
+ \cs_if_eq:NNT \@currext \@pkgextension
+ { \ctex_package_end_hook:o { \@currname } }
+ }
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -127,15 +125,15 @@
\group_begin:
\use:x
{
+ \group_end:
\__ctex_parse_name:nNNNnN { \token_get_replacement_spec:N #2 }
- \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 } {#3}
- } #1
+ \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 }
+ } {#3} #1
}
{ #1#2 }
}
\cs_new_protected:Npn \__ctex_parse_name:nNNNnN #1#2#3#4#5#6
{
- \group_end:
\exp_args:Nc #6
{
\str_case:nnTF {#1}
@@ -164,9 +162,9 @@
\cs_new:Npn \__ctex_parse_name:w #1 AESAOPA ~ #2 < #3 \q_stop { #1#2 }
}
\cs_generate_variant:Nn \ctex_parse_name:NNn { NNx }
-\cs_new_protected:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
-\cs_new_protected:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
-\cs_new_protected:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
+\cs_new_protected_nopar:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
+\cs_new_protected_nopar:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
+\cs_new_protected_nopar:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
\cs_new_protected:Npn \ctex_patch_cmd:Nnn
{
\group_begin:
@@ -194,6 +192,29 @@
Patching~command~`#1'~failed.\\
ctex~may~not~work~as~expected.
}
+\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
+\msg_new:nnnn { ctex } { package-too-old }
+ { Support~package~`#1'~too~old. }
+ {
+ Please~update~an~up~to~date~version~of~the~package~`#1'\\
+ using~your~TeX~package~manager~or~from~CTAN.
+ }
+\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
+\cs_if_exist:NTF \pdftex_pdfoutput:D
+ {
+ \int_compare:nNnTF \pdftex_pdfoutput:D > \c_zero
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iftrue:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
+ }
+ }
+ { \use:n }
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iffalse:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
+ }
+\cs_new_eq:NN \ctex_if_preamble:TF \use_i:nn
+\AfterEndPreamble { \cs_set_eq:NN \ctex_if_preamble:TF \use_ii:nn }
\cs_new:Npn \ctex_set_default_ccwd:Nn #1#2
{
\dim_compare:nNnTF
@@ -217,7 +238,6 @@
\tl_new:N \l__ctex_encoding_tl
\tl_set:Nx \l__ctex_encoding_tl
{ \pdftex_if_engine:TF { GBK } { UTF8 } }
-\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
\bool_new:N \g__ctex_zhmCJK_bool
\tl_new:N \l__ctex_autoindent_tl
\cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n
@@ -316,7 +336,7 @@
Option~ `fontset=adobe'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = adobe }
} ,
winfonts .code:n =
{
@@ -325,7 +345,7 @@
Option~ `fontset=windows'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = windows }
} ,
nofonts .value_forbidden: ,
winfonts .value_forbidden: ,
@@ -379,9 +399,15 @@
} ,
nospace .value_forbidden: ,
heading .bool_set:N = \l__ctex_heading_bool ,
+ sub3section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
+ sub4section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
+ sub3section .value_forbidden: ,
+ sub4section .value_forbidden: ,
scheme .tl_set:N = \l__ctex_scheme_tl ,
- scheme .default:n = { chinese },
- scheme .initial:n = { chinese },
+ scheme .default:n = { chinese } ,
+ scheme .initial:n = { chinese } ,
cap .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -396,12 +422,6 @@
} ,
cap .value_forbidden: ,
nocap .value_forbidden: ,
- sub3section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
- sub4section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
- sub3section .value_forbidden: ,
- sub4section .value_forbidden: ,
fntef .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -411,12 +431,17 @@
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `fancyhdr'~ package~ is~ loaded. }
- \RequirePackage{ fancyhdr }
+ \RequirePackage { fancyhdr }
} ,
hyperref .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `hyperref'~ package~ will~ be~ loaded. }
+ \ctex_at_end:n
+ {
+ \cs_if_exist:NF \hypersetup
+ { \cs_new_eq:NN \hypersetup \ctex_hypersetup:n }
+ }
\AtEndPreamble { \RequirePackage { hyperref } }
} ,
}
@@ -438,18 +463,7 @@
\tl_clear:N \l__ctex_tmp_tl
\ctex_file_input:n { ctexopts.cfg }
\ProcessKeysOptions { ctex / option }
-\tl_set_eq:Nc \l__ctex_tmp_tl { ver@ \@currname . \@currext }
-\msg_new:nnnn { ctex } { ctexsize-loaded }
- { Package~`ctexsize'~can~not~be~loaded~before~`ctex'. }
- {
- `ctexsize'~is~actually~a~part~of~`ctex'.\\
- It~is~not~necessary~to~load~it~separately.
- }
-\@ifpackageloaded { ctexsize }
- { \msg_error:nn { ctex } { ctexsize-loaded } }
- { \cs_new_eq:cN { ver@ctexsize. \@pkgextension } \l__ctex_tmp_tl }
-\NewDocumentCommand \ctexset { +m }
- { \keys_set:nn { ctex } {#1} }
+\NewDocumentCommand \ctexset { } { \keys_set:nn { ctex } }
\NewDocumentCommand \CTEXsetup { +o > { \TrimSpaces } m }
{
\msg_warning:nnnn { ctex } { deprecated-command } { \CTEXsetup }
@@ -471,7 +485,6 @@
\cs_new_protected_nopar:Npn \ctex_hypersetup:n #1
{ \PassOptionsToPackage {#1} { hyperref } }
}
-\ctex_hypersetup:n { colorlinks = true }
\pdftex_if_engine:TF
{
\tl_set:Nx \l__ctex_encoding_tl { \l__ctex_encoding_tl }
@@ -677,6 +690,12 @@
\keys_define:nn { ctex } { bibname .tl_set:N = \ctexbibname }
}
}
+\clist_map_inline:nn { article , book , report }
+ {
+ \@ifclassloaded {#1}
+ { \clist_map_break:n { \tl_const:Nn \c__ctex_std_class_tl {#1} } }
+ { }
+ }
\msg_new:nnn { ctex } { not-standard-class }
{
None~of~the~standard~document~classes~was~loaded.\\
@@ -685,12 +704,8 @@
}
\bool_if:NTF \l__ctex_heading_bool
{
- \clist_map_inline:nn { article , book , report }
- {
- \@ifclassloaded {#1}
- { \clist_map_break:n { \tl_const:Nn \c__ctex_class_tl {#1} } } { }
- }
- \tl_if_exist:NF \c__ctex_class_tl
+ \tl_if_exist:NTF \c__ctex_std_class_tl
+ { \cs_new_eq:NN \c__ctex_class_tl \c__ctex_std_class_tl }
{
\cs_if_exist:NTF \chapter
{
@@ -810,11 +825,8 @@
\normalsize
\NewDocumentCommand \CTeX { }
{ \ifincsname CTeX \else: C \TeX \fi: }
-\AtBeginDocument
- {
- \cs_if_exist_use:NT \pdfstringdefDisableCommands
- { { \tl_set:Nn \CTeX { CTeX } } }
- }
+\ctex_at_end_package:nn { hyperref }
+ { \pdfstringdefDisableCommands { \tl_set:Nn \CTeX { CTeX } } }
\keys_define:nn { ctex }
{
captiondelimiter .code:n =
@@ -918,6 +930,7 @@
%% ctex.sty,
%% ctexcap.sty,
%% ctexsize.sty,
+%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
index ed34c9d861a..0af93272ce1 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexart.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
@@ -28,10 +28,16 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class article (CTEX)}
\ProvidesExplClass{ctexart}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
+\tl_const:Nx \c__ctex_version_tl
+ { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } }
+\cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexheading. \@pkgextension } \c__ctex_version_tl
\RequirePackage { xparse , l3keys2e }
\msg_new:nnnn { ctex } { l3-too-old }
{ Support~package~`#1'~too~old. }
@@ -44,43 +50,24 @@
{ \msg_error:nnn { ctex } { l3-too-old } { expl3 } }
\@ifpackagelater { l3keys2e } { 2014/05/05 } { }
{ \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } }
-\RequirePackage { etoolbox , ifpdf , fix-cm , everysel }
+\RequirePackage { etoolbox }
+\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
-\msg_new:nnnn { ctex } { package-too-old }
- { Support~package~`#1'~too~old. }
- {
- Please~update~an~up~to~date~version~of~the~package~`#1'\\
- using~your~TeX~package~manager~or~from~CTAN.
- }
-\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
-\ifpdf
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
-\else:
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
-\fi:
-\prg_new_conditional:Npnn \ctex_if_preamble: { TF }
- {
- \if_meaning:w \@onlypreamble \@notprerr
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
\cs_new_protected:Npn \ctex_at_end_package:nn #1#2
{
- \@ifpackageloaded { #1 }
- { #2 }
- { \ctex_add_hook:cn { g__ctex_at_end_ #1 _hook_tl } { #2 } }
+ \@ifpackageloaded {#1}
+ {#2}
+ { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} }
}
-\cs_new_protected:Npn \ctex_add_hook:Nn #1#2
+\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2
{
\tl_if_exist:NF #1 { \tl_new:N #1 }
- \tl_gput_right:Nn #1 { #2 }
+ \tl_gput_right:Nn #1 {#2}
}
-\cs_generate_variant:Nn \ctex_add_hook:Nn { c }
+\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c }
\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1
{
\cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl }
@@ -88,7 +75,10 @@
}
\cs_generate_variant:Nn \ctex_package_end_hook:n { o }
\tl_put_left:Nn \@popfilename
- { \ctex_package_end_hook:o { \@currname } }
+ {
+ \cs_if_eq:NNT \@currext \@pkgextension
+ { \ctex_package_end_hook:o { \@currname } }
+ }
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -138,15 +128,15 @@
\group_begin:
\use:x
{
+ \group_end:
\__ctex_parse_name:nNNNnN { \token_get_replacement_spec:N #2 }
- \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 } {#3}
- } #1
+ \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 }
+ } {#3} #1
}
{ #1#2 }
}
\cs_new_protected:Npn \__ctex_parse_name:nNNNnN #1#2#3#4#5#6
{
- \group_end:
\exp_args:Nc #6
{
\str_case:nnTF {#1}
@@ -175,9 +165,9 @@
\cs_new:Npn \__ctex_parse_name:w #1 AESAOPA ~ #2 < #3 \q_stop { #1#2 }
}
\cs_generate_variant:Nn \ctex_parse_name:NNn { NNx }
-\cs_new_protected:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
-\cs_new_protected:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
-\cs_new_protected:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
+\cs_new_protected_nopar:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
+\cs_new_protected_nopar:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
+\cs_new_protected_nopar:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
\cs_new_protected:Npn \ctex_patch_cmd:Nnn
{
\group_begin:
@@ -205,6 +195,29 @@
Patching~command~`#1'~failed.\\
ctex~may~not~work~as~expected.
}
+\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
+\msg_new:nnnn { ctex } { package-too-old }
+ { Support~package~`#1'~too~old. }
+ {
+ Please~update~an~up~to~date~version~of~the~package~`#1'\\
+ using~your~TeX~package~manager~or~from~CTAN.
+ }
+\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
+\cs_if_exist:NTF \pdftex_pdfoutput:D
+ {
+ \int_compare:nNnTF \pdftex_pdfoutput:D > \c_zero
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iftrue:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
+ }
+ }
+ { \use:n }
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iffalse:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
+ }
+\cs_new_eq:NN \ctex_if_preamble:TF \use_i:nn
+\AfterEndPreamble { \cs_set_eq:NN \ctex_if_preamble:TF \use_ii:nn }
\cs_new:Npn \ctex_set_default_ccwd:Nn #1#2
{
\dim_compare:nNnTF
@@ -228,7 +241,6 @@
\tl_new:N \l__ctex_encoding_tl
\tl_set:Nx \l__ctex_encoding_tl
{ \pdftex_if_engine:TF { GBK } { UTF8 } }
-\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
\bool_new:N \g__ctex_zhmCJK_bool
\tl_new:N \l__ctex_autoindent_tl
\cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n
@@ -328,7 +340,7 @@
Option~ `fontset=adobe'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = adobe }
} ,
winfonts .code:n =
{
@@ -337,7 +349,7 @@
Option~ `fontset=windows'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = windows }
} ,
nofonts .value_forbidden: ,
winfonts .value_forbidden: ,
@@ -391,9 +403,15 @@
} ,
nospace .value_forbidden: ,
heading .bool_set:N = \l__ctex_heading_bool ,
+ sub3section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
+ sub4section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
+ sub3section .value_forbidden: ,
+ sub4section .value_forbidden: ,
scheme .tl_set:N = \l__ctex_scheme_tl ,
- scheme .default:n = { chinese },
- scheme .initial:n = { chinese },
+ scheme .default:n = { chinese } ,
+ scheme .initial:n = { chinese } ,
cap .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -408,12 +426,6 @@
} ,
cap .value_forbidden: ,
nocap .value_forbidden: ,
- sub3section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
- sub4section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
- sub3section .value_forbidden: ,
- sub4section .value_forbidden: ,
fntef .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -423,12 +435,17 @@
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `fancyhdr'~ package~ is~ loaded. }
- \RequirePackage{ fancyhdr }
+ \RequirePackage { fancyhdr }
} ,
hyperref .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `hyperref'~ package~ will~ be~ loaded. }
+ \ctex_at_end:n
+ {
+ \cs_if_exist:NF \hypersetup
+ { \cs_new_eq:NN \hypersetup \ctex_hypersetup:n }
+ }
\AtEndPreamble { \RequirePackage { hyperref } }
} ,
}
@@ -466,12 +483,7 @@
\tl_const:Nn \c__ctex_class_tl { article }
\PassOptionsToClass { \g__ctex_std_options_clist } { article }
\LoadClass { article }
-\tl_set_eq:Nc \l__ctex_tmp_tl { ver@ \@currname . \@currext }
-\cs_new_eq:cN { ver@ctex. \@pkgextension } \l__ctex_tmp_tl
-\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \l__ctex_tmp_tl
-\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \l__ctex_tmp_tl
-\NewDocumentCommand \ctexset { +m }
- { \keys_set:nn { ctex } {#1} }
+\NewDocumentCommand \ctexset { } { \keys_set:nn { ctex } }
\NewDocumentCommand \CTEXsetup { +o > { \TrimSpaces } m }
{
\msg_warning:nnnn { ctex } { deprecated-command } { \CTEXsetup }
@@ -493,7 +505,6 @@
\cs_new_protected_nopar:Npn \ctex_hypersetup:n #1
{ \PassOptionsToPackage {#1} { hyperref } }
}
-\ctex_hypersetup:n { colorlinks = true }
\pdftex_if_engine:TF
{
\tl_set:Nx \l__ctex_encoding_tl { \l__ctex_encoding_tl }
@@ -704,16 +715,18 @@
\tl_const:cx { CTEX@#1name }
{
\exp_not:c { CTEX@#1@nameformat }
- \exp_not:c { CTEX@pre#1 }
- \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
- { \exp_not:c { CTEX@the#1 } }
{
- \group_begin:
- \exp_not:c { CTEX@#1@numberformat }
- \exp_not:c { CTEX@the#1 }
- \group_end:
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
}
- \exp_not:c { CTEX@post#1 }
\exp_not:c { CTEX@#1@aftername }
}
}
@@ -730,19 +743,34 @@
#1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
#1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
#1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / format~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / nameformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
#1 / numberformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / numberformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
#1 / aftername+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / aftername~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
#1 / titleformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / titleformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / aftertitle~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
#1 / beforeskip .initial:n = \c_zero_skip ,
#1 / afterskip .initial:n = \c_zero_skip ,
#1 / indent .initial:n = \c_zero_dim ,
@@ -761,7 +789,6 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
-\tl_clear:N \l__ctex_tmp_tl
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
@@ -793,14 +820,16 @@
\CTEX@partname
\fi
\CTEX@part@titleformat{#2}%
- \markboth{}{}\par}%
+ \markboth{}{}%
+ \CTEX@part@aftertitle}%
\nobreak
\vskip \CTEX@part@afterskip
\@afterheading}
\def\@spart#1{%
{\interlinepenalty \@M
\normalfont \parindent \CTEX@part@indent \CTEX@part@format
- \CTEX@part@titleformat{#1}\par}%
+ \CTEX@part@titleformat{#1}%
+ \CTEX@part@aftertitle}%
\nobreak
\vskip \CTEX@part@afterskip
\@afterheading}
@@ -821,7 +850,8 @@
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M
- \csname CTEX@#1@titleformat\endcsname{#8}\@@par}%
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
@@ -834,7 +864,9 @@
\else
\def\@svsechd{%
#6{\hskip #3\relax
- \@svsec \csname CTEX@#1@titleformat\endcsname{#8}}%
+ \@svsec
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
@@ -852,15 +884,20 @@
#4{%
\@hangfrom{\hskip #1}%
\interlinepenalty \@M
- \CTEX@titleformat@n{#5}\@@par}%
+ \CTEX@titleformat@n{#5}%
+ \CTEX@aftertitle}%
\endgroup
\else
- \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}}}%
+ \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}\CTEX@aftertitle}}%
\fi
\@xsect{#3}}
\cs_new_protected_nopar:Npn \CTEX@set@titleformat@n #1
- { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } }
+ {
+ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat }
+ \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle }
+ }
\cs_new_eq:NN \CTEX@titleformat@n \use:n
+\cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing:
\int_zero:N \l__ctex_tmp_int
\clist_map_inline:nn
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -879,15 +916,15 @@
}
}
}
-\tl_new:N \CTEX@preappendix
-\tl_new:N \CTEX@postappendix
\keys_define:nn { ctex }
- { appendix .meta:nn = { ctex / appendix } {#1} }
-\keys_define:nn { ctex / appendix }
{
- name .code:n = { \ctex_assign_heading_name:nn { appendix } {#1} } ,
- number .tl_set:N = \CTEX@appendixnumber
+ appendix .meta:nn = { ctex / appendix } {#1} ,
+ appendix / name .code:n =
+ { \ctex_assign_heading_name:nn { appendix } {#1} } ,
+ appendix / number .tl_set:N = \CTEX@appendixnumber
}
+\tl_new:N \CTEX@preappendix
+\tl_new:N \CTEX@postappendix
\cs_new_eq:NN \CTEX@save@appendix \appendix
\cs_gset_protected_nopar:Npn \appendix
{
@@ -1072,11 +1109,8 @@
\normalsize
\NewDocumentCommand \CTeX { }
{ \ifincsname CTeX \else: C \TeX \fi: }
-\AtBeginDocument
- {
- \cs_if_exist_use:NT \pdfstringdefDisableCommands
- { { \tl_set:Nn \CTeX { CTeX } } }
- }
+\ctex_at_end_package:nn { hyperref }
+ { \pdfstringdefDisableCommands { \tl_set:Nn \CTeX { CTeX } } }
\keys_define:nn { ctex }
{
captiondelimiter .code:n =
@@ -1180,6 +1214,7 @@
%% ctex.sty,
%% ctexcap.sty,
%% ctexsize.sty,
+%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
index 9c713e37a3f..3e6a5d76736 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls
@@ -28,10 +28,16 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class book (CTEX)}
\ProvidesExplClass{ctexbook}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
+\tl_const:Nx \c__ctex_version_tl
+ { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } }
+\cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexheading. \@pkgextension } \c__ctex_version_tl
\RequirePackage { xparse , l3keys2e }
\msg_new:nnnn { ctex } { l3-too-old }
{ Support~package~`#1'~too~old. }
@@ -44,43 +50,24 @@
{ \msg_error:nnn { ctex } { l3-too-old } { expl3 } }
\@ifpackagelater { l3keys2e } { 2014/05/05 } { }
{ \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } }
-\RequirePackage { etoolbox , ifpdf , fix-cm , everysel }
+\RequirePackage { etoolbox }
+\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
-\msg_new:nnnn { ctex } { package-too-old }
- { Support~package~`#1'~too~old. }
- {
- Please~update~an~up~to~date~version~of~the~package~`#1'\\
- using~your~TeX~package~manager~or~from~CTAN.
- }
-\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
-\ifpdf
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
-\else:
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
-\fi:
-\prg_new_conditional:Npnn \ctex_if_preamble: { TF }
- {
- \if_meaning:w \@onlypreamble \@notprerr
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
\cs_new_protected:Npn \ctex_at_end_package:nn #1#2
{
- \@ifpackageloaded { #1 }
- { #2 }
- { \ctex_add_hook:cn { g__ctex_at_end_ #1 _hook_tl } { #2 } }
+ \@ifpackageloaded {#1}
+ {#2}
+ { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} }
}
-\cs_new_protected:Npn \ctex_add_hook:Nn #1#2
+\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2
{
\tl_if_exist:NF #1 { \tl_new:N #1 }
- \tl_gput_right:Nn #1 { #2 }
+ \tl_gput_right:Nn #1 {#2}
}
-\cs_generate_variant:Nn \ctex_add_hook:Nn { c }
+\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c }
\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1
{
\cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl }
@@ -88,7 +75,10 @@
}
\cs_generate_variant:Nn \ctex_package_end_hook:n { o }
\tl_put_left:Nn \@popfilename
- { \ctex_package_end_hook:o { \@currname } }
+ {
+ \cs_if_eq:NNT \@currext \@pkgextension
+ { \ctex_package_end_hook:o { \@currname } }
+ }
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -138,15 +128,15 @@
\group_begin:
\use:x
{
+ \group_end:
\__ctex_parse_name:nNNNnN { \token_get_replacement_spec:N #2 }
- \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 } {#3}
- } #1
+ \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 }
+ } {#3} #1
}
{ #1#2 }
}
\cs_new_protected:Npn \__ctex_parse_name:nNNNnN #1#2#3#4#5#6
{
- \group_end:
\exp_args:Nc #6
{
\str_case:nnTF {#1}
@@ -175,9 +165,9 @@
\cs_new:Npn \__ctex_parse_name:w #1 AESAOPA ~ #2 < #3 \q_stop { #1#2 }
}
\cs_generate_variant:Nn \ctex_parse_name:NNn { NNx }
-\cs_new_protected:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
-\cs_new_protected:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
-\cs_new_protected:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
+\cs_new_protected_nopar:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
+\cs_new_protected_nopar:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
+\cs_new_protected_nopar:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
\cs_new_protected:Npn \ctex_patch_cmd:Nnn
{
\group_begin:
@@ -205,6 +195,29 @@
Patching~command~`#1'~failed.\\
ctex~may~not~work~as~expected.
}
+\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
+\msg_new:nnnn { ctex } { package-too-old }
+ { Support~package~`#1'~too~old. }
+ {
+ Please~update~an~up~to~date~version~of~the~package~`#1'\\
+ using~your~TeX~package~manager~or~from~CTAN.
+ }
+\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
+\cs_if_exist:NTF \pdftex_pdfoutput:D
+ {
+ \int_compare:nNnTF \pdftex_pdfoutput:D > \c_zero
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iftrue:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
+ }
+ }
+ { \use:n }
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iffalse:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
+ }
+\cs_new_eq:NN \ctex_if_preamble:TF \use_i:nn
+\AfterEndPreamble { \cs_set_eq:NN \ctex_if_preamble:TF \use_ii:nn }
\cs_new:Npn \ctex_set_default_ccwd:Nn #1#2
{
\dim_compare:nNnTF
@@ -228,7 +241,6 @@
\tl_new:N \l__ctex_encoding_tl
\tl_set:Nx \l__ctex_encoding_tl
{ \pdftex_if_engine:TF { GBK } { UTF8 } }
-\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
\bool_new:N \g__ctex_zhmCJK_bool
\tl_new:N \l__ctex_autoindent_tl
\cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n
@@ -328,7 +340,7 @@
Option~ `fontset=adobe'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = adobe }
} ,
winfonts .code:n =
{
@@ -337,7 +349,7 @@
Option~ `fontset=windows'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = windows }
} ,
nofonts .value_forbidden: ,
winfonts .value_forbidden: ,
@@ -391,9 +403,15 @@
} ,
nospace .value_forbidden: ,
heading .bool_set:N = \l__ctex_heading_bool ,
+ sub3section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
+ sub4section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
+ sub3section .value_forbidden: ,
+ sub4section .value_forbidden: ,
scheme .tl_set:N = \l__ctex_scheme_tl ,
- scheme .default:n = { chinese },
- scheme .initial:n = { chinese },
+ scheme .default:n = { chinese } ,
+ scheme .initial:n = { chinese } ,
cap .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -408,12 +426,6 @@
} ,
cap .value_forbidden: ,
nocap .value_forbidden: ,
- sub3section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
- sub4section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
- sub3section .value_forbidden: ,
- sub4section .value_forbidden: ,
fntef .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -423,12 +435,17 @@
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `fancyhdr'~ package~ is~ loaded. }
- \RequirePackage{ fancyhdr }
+ \RequirePackage { fancyhdr }
} ,
hyperref .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `hyperref'~ package~ will~ be~ loaded. }
+ \ctex_at_end:n
+ {
+ \cs_if_exist:NF \hypersetup
+ { \cs_new_eq:NN \hypersetup \ctex_hypersetup:n }
+ }
\AtEndPreamble { \RequirePackage { hyperref } }
} ,
}
@@ -466,12 +483,7 @@
\tl_const:Nn \c__ctex_class_tl { book }
\PassOptionsToClass { \g__ctex_std_options_clist } { book }
\LoadClass { book }
-\tl_set_eq:Nc \l__ctex_tmp_tl { ver@ \@currname . \@currext }
-\cs_new_eq:cN { ver@ctex. \@pkgextension } \l__ctex_tmp_tl
-\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \l__ctex_tmp_tl
-\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \l__ctex_tmp_tl
-\NewDocumentCommand \ctexset { +m }
- { \keys_set:nn { ctex } {#1} }
+\NewDocumentCommand \ctexset { } { \keys_set:nn { ctex } }
\NewDocumentCommand \CTEXsetup { +o > { \TrimSpaces } m }
{
\msg_warning:nnnn { ctex } { deprecated-command } { \CTEXsetup }
@@ -493,7 +505,6 @@
\cs_new_protected_nopar:Npn \ctex_hypersetup:n #1
{ \PassOptionsToPackage {#1} { hyperref } }
}
-\ctex_hypersetup:n { colorlinks = true }
\pdftex_if_engine:TF
{
\tl_set:Nx \l__ctex_encoding_tl { \l__ctex_encoding_tl }
@@ -704,16 +715,18 @@
\tl_const:cx { CTEX@#1name }
{
\exp_not:c { CTEX@#1@nameformat }
- \exp_not:c { CTEX@pre#1 }
- \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
- { \exp_not:c { CTEX@the#1 } }
{
- \group_begin:
- \exp_not:c { CTEX@#1@numberformat }
- \exp_not:c { CTEX@the#1 }
- \group_end:
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
}
- \exp_not:c { CTEX@post#1 }
\exp_not:c { CTEX@#1@aftername }
}
}
@@ -730,19 +743,34 @@
#1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
#1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
#1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / format~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / nameformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
#1 / numberformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / numberformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
#1 / aftername+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / aftername~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
#1 / titleformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / titleformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / aftertitle~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
#1 / beforeskip .initial:n = \c_zero_skip ,
#1 / afterskip .initial:n = \c_zero_skip ,
#1 / indent .initial:n = \c_zero_dim ,
@@ -761,7 +789,11 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
-\tl_clear:N \l__ctex_tmp_tl
+\tl_set:Nn \l__ctex_tmp_tl
+ {
+ part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
+ chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle ,
+ }
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
@@ -769,11 +801,6 @@
}
\use:x { \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } } }
\tl_clear:N \l__ctex_tmp_tl
-\keys_define:nn { ctex }
- {
- part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
- chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle
- }
\def\@part[#1]#2{%
\thispagestyle{\CTEX@part@pagestyle}%
\ifnum \c@secnumdepth >-2\relax
@@ -788,12 +815,14 @@
\ifnum \c@secnumdepth >-2\relax
\CTEX@partname
\fi
- \CTEX@part@titleformat{#2}\par}%
+ \CTEX@part@titleformat{#2}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
- \CTEX@part@titleformat{#1}\par}%
+ \CTEX@part@titleformat{#1}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
@@ -833,7 +862,9 @@
\fi
\fi
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}%
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@makeschapterhead#1{%
@@ -847,7 +878,9 @@
\vspace*{\@tempskipa}%
{\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@seccntformat#1{%
@@ -867,7 +900,8 @@
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M
- \csname CTEX@#1@titleformat\endcsname{#8}\@@par}%
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
@@ -880,7 +914,9 @@
\else
\def\@svsechd{%
#6{\hskip #3\relax
- \@svsec \csname CTEX@#1@titleformat\endcsname{#8}}%
+ \@svsec
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
@@ -898,15 +934,20 @@
#4{%
\@hangfrom{\hskip #1}%
\interlinepenalty \@M
- \CTEX@titleformat@n{#5}\@@par}%
+ \CTEX@titleformat@n{#5}%
+ \CTEX@aftertitle}%
\endgroup
\else
- \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}}}%
+ \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}\CTEX@aftertitle}}%
\fi
\@xsect{#3}}
\cs_new_protected_nopar:Npn \CTEX@set@titleformat@n #1
- { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } }
+ {
+ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat }
+ \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle }
+ }
\cs_new_eq:NN \CTEX@titleformat@n \use:n
+\cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing:
\int_zero:N \l__ctex_tmp_int
\clist_map_inline:nn
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -925,15 +966,15 @@
}
}
}
-\tl_new:N \CTEX@preappendix
-\tl_new:N \CTEX@postappendix
\keys_define:nn { ctex }
- { appendix .meta:nn = { ctex / appendix } {#1} }
-\keys_define:nn { ctex / appendix }
{
- name .code:n = { \ctex_assign_heading_name:nn { appendix } {#1} } ,
- number .tl_set:N = \CTEX@appendixnumber
+ appendix .meta:nn = { ctex / appendix } {#1} ,
+ appendix / name .code:n =
+ { \ctex_assign_heading_name:nn { appendix } {#1} } ,
+ appendix / number .tl_set:N = \CTEX@appendixnumber
}
+\tl_new:N \CTEX@preappendix
+\tl_new:N \CTEX@postappendix
\cs_new_eq:NN \CTEX@save@appendix \appendix
\cs_gset_protected_nopar:Npn \appendix
{
@@ -1119,11 +1160,8 @@
\normalsize
\NewDocumentCommand \CTeX { }
{ \ifincsname CTeX \else: C \TeX \fi: }
-\AtBeginDocument
- {
- \cs_if_exist_use:NT \pdfstringdefDisableCommands
- { { \tl_set:Nn \CTeX { CTeX } } }
- }
+\ctex_at_end_package:nn { hyperref }
+ { \pdfstringdefDisableCommands { \tl_set:Nn \CTeX { CTeX } } }
\keys_define:nn { ctex }
{
captiondelimiter .code:n =
@@ -1227,6 +1265,7 @@
%% ctex.sty,
%% ctexcap.sty,
%% ctexsize.sty,
+%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty
index 840c30bcb31..f899abbf14f 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty
+++ b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% ctex.dtx (with options: `package,ctexcap')
+%% ctex.dtx (with options: `ctexcap')
%%
%% Copyright (C) 2003--2015
%% CTEX.ORG and any individual authors listed in the documentation.
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter in LaTeX (CTEX)}
\ProvidesExplPackage{ctexcap}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\PassOptionsToPackage { heading = true } { ctexcap }
\RequirePackageWithOptions { ctex }
%%
@@ -41,6 +41,7 @@
%% ctex.sty,
%% ctexcap.sty,
%% ctexsize.sty,
+%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty
new file mode 100644
index 00000000000..efff90fbbdd
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty
@@ -0,0 +1,278 @@
+%%
+%% This is file `ctexheading.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ctex.dtx (with options: `style,ctexheading')
+%%
+%% Copyright (C) 2003--2015
+%% CTEX.ORG and any individual authors listed in the documentation.
+%% ------------------------------------------------------------------------------
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c of this license or (at your option) any later
+%% version. This version of this license is in
+%% http://www.latex-project.org/lppl/lppl-1-3c.txt
+%% and the latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainers of this work are Leo Liu, Qing Lee and Liam Huang.
+%%
+%% ------------------------------------------------------------------------------
+%%
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
+ {Heading style modification (CTEX)}
+\ProvidesExplPackage{ctexheading}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
+\RequirePackage { xparse , l3keys2e }
+\RequirePackage { etoolbox }
+\tl_new:N \l__ctex_tmp_tl
+\int_new:N \l__ctex_tmp_int
+\box_new:N \l__ctex_tmp_box
+\cs_new_protected:Npn \ctex_at_end_package:nn #1#2
+ {
+ \@ifpackageloaded {#1}
+ {#2}
+ { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} }
+ }
+\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2
+ {
+ \tl_if_exist:NF #1 { \tl_new:N #1 }
+ \tl_gput_right:Nn #1 {#2}
+ }
+\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c }
+\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1
+ {
+ \cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl }
+ { \cs_undefine:c { g__ctex_at_end_ #1 _hook_tl } }
+ }
+\cs_generate_variant:Nn \ctex_package_end_hook:n { o }
+\tl_put_left:Nn \@popfilename
+ {
+ \cs_if_eq:NNT \@currext \@pkgextension
+ { \ctex_package_end_hook:o { \@currname } }
+ }
+\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
+ {
+ \use:x
+ {
+ \ExplSyntaxOff
+ \char_set_catcode_letter:n { 64 }
+ #1
+ \exp_not:n {#2}
+ \bool_if:NTF \l__kernel_expl_bool
+ { \ExplSyntaxOn }
+ { \ExplSyntaxOff }
+ \char_set_catcode:nn { 64 } { \char_value_catcode:n { 64 } }
+ #3
+ }
+ }
+\cs_new_protected_nopar:Npn \ctex_file_input:n #1
+ { \ctex_file_wrapper:nnn { } { \file_input:n {#1} } { } }
+\cs_new_protected_nopar:Npn \ctex_scheme_input:n #1
+ {
+ \ctex_file_wrapper:nnn
+ { }
+ {
+ \tl_if_exist:NTF \c__ctex_class_tl
+ {
+ \file_if_exist_input:nF { ctex-scheme- #1 - \c__ctex_class_tl .def }
+ { \file_input:n { ctex-scheme- #1 .def } }
+ }
+ { \file_input:n { ctex-scheme- #1 .def } }
+ }
+ { }
+ }
+\cs_generate_variant:Nn \ctex_scheme_input:n { o }
+\cs_new_protected:Npn \ctex_parse_name:NN #1#2
+ { \ctex_parse_name:NNx #1#2 { \cs_to_str:N #2 } }
+\group_begin:
+\char_set_lccode:nn { `\< } { `\{ }
+\char_set_lccode:nn { `\/ } { `\\ }
+\char_set_lccode:nn { `\A } { `\t }
+\tl_map_function:nN { \A \E \S \O \P } \char_set_catcode_other:N
+\tex_lowercase:D
+ {
+ \group_end:
+ \cs_new_protected:Npn \ctex_parse_name:NNn #1#2#3
+ {
+ \bool_if:nTF { \cs_if_exist_p:c { #3 ~ } || \cs_if_exist_p:c { /#3 } }
+ {
+ \group_begin:
+ \use:x
+ {
+ \group_end:
+ \__ctex_parse_name:nNNNnN { \token_get_replacement_spec:N #2 }
+ \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 }
+ } {#3} #1
+ }
+ { #1#2 }
+ }
+ \cs_new_protected:Npn \__ctex_parse_name:nNNNnN #1#2#3#4#5#6
+ {
+ \exp_args:Nc #6
+ {
+ \str_case:nnTF {#1}
+ {
+ { \protect #3 } { }
+ { \x@protect #2 \protect #3 } { }
+ }
+ {
+ \str_if_eq_x:nnTF { \exp_not:n { /@protected@ #3 /#3 } }
+ {
+ \exp_last_unbraced:Nf \__ctex_parse_name:w
+ \token_get_replacement_spec:N #3 AESAOPA ~ < \q_stop
+ }
+ { /#5 ~ } { #5 ~ }
+ }
+ {
+ \str_case:onTF { \__ctex_parse_name:w #1 AESAOPA ~ < \q_stop }
+ {
+ { /@protected@ #2 #4 } { }
+ { /@ #4 } { }
+ }
+ { /#5 } {#5}
+ }
+ }
+ }
+ \cs_new:Npn \__ctex_parse_name:w #1 AESAOPA ~ #2 < #3 \q_stop { #1#2 }
+ }
+\cs_generate_variant:Nn \ctex_parse_name:NNn { NNx }
+\cs_new_protected_nopar:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
+\cs_new_protected_nopar:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
+\cs_new_protected_nopar:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
+\cs_new_protected:Npn \ctex_patch_cmd:Nnn
+ {
+ \group_begin:
+ \char_set_catcode_other:N \#
+ \__ctex_patch_cmd:Nnn
+ }
+\cs_new_protected:Npn \__ctex_patch_cmd:Nnn #1#2#3
+ {
+ \group_end:
+ \group_begin:
+ \ExplSyntaxOff
+ \ctex_patch_cmd:NnnTF #1 {#2} {#3}
+ {
+ \cs_gset_eq:NN \__ctex_tmp:w #1
+ \group_end:
+ \cs_set_eq:NN #1 \__ctex_tmp:w
+ \cs_undefine:N \__ctex_tmp:w
+ }
+ { \group_end: \ctex_patch_failure:N #1 }
+ }
+\cs_new_protected:Npn \ctex_patch_failure:N #1
+ { \msg_warning:nnx { ctex } { patch-failure } { \token_to_str:N #1 } }
+\msg_new:nnn { ctex } { patch-failure }
+ {
+ Patching~command~`#1'~failed.\\
+ ctex~may~not~work~as~expected.
+ }
+\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
+\keys_define:nn { ctex / option }
+ {
+ sub3section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
+ sub4section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
+ sub3section .value_forbidden: ,
+ sub4section .value_forbidden: ,
+ scheme .tl_set:N = \l__ctex_scheme_tl ,
+ scheme .default:n = { plain } ,
+ scheme .initial:n = { plain }
+ }
+\ProcessKeysOptions { ctex / option }
+\NewDocumentCommand \ctexset { } { \keys_set:nn { ctex } }
+\clist_map_inline:nn { article , book , report }
+ {
+ \@ifclassloaded {#1}
+ { \clist_map_break:n { \tl_const:Nn \c__ctex_std_class_tl {#1} } }
+ { }
+ }
+\msg_new:nnn { ctex } { not-standard-class }
+ {
+ None~of~the~standard~document~classes~was~loaded.\\
+ Heading~`#1'~is~selected.\\
+ ctex~may~not~work~as~expected.
+ }
+\use:n
+ {
+ \tl_if_exist:NTF \c__ctex_std_class_tl
+ { \cs_new_eq:NN \c__ctex_class_tl \c__ctex_std_class_tl }
+ {
+ \cs_if_exist:NTF \chapter
+ {
+ \cs_if_exist:NF \if@mainmatter
+ { \cs_new_eq:NN \if@mainmatter \tex_iftrue:D }
+ \tl_const:Nn \c__ctex_class_tl { book }
+ }
+ { \tl_const:Nn \c__ctex_class_tl { article } }
+ \msg_warning:nnx { ctex } { not-standard-class } { \c__ctex_class_tl }
+ }
+ \ctex_file_input:n { ctex- \c__ctex_class_tl .def }
+ }
+%%
+%% This package consists of the file ctex.dtx,
+%% and the derived files ctex.pdf,
+%% ctex.ins,
+%% ctex.sty,
+%% ctexcap.sty,
+%% ctexsize.sty,
+%% ctexheading.sty,
+%% ctexart.cls,
+%% ctexbook.cls,
+%% ctexrep.cls,
+%% ctex-c5size.clo,
+%% ctex-cs4size.clo,
+%% ctex-article.def,
+%% ctex-book.def,
+%% ctex-report.def,
+%% ctex-scheme-plain.def,
+%% ctex-scheme-plain-article.def,
+%% ctex-scheme-plain-book.def,
+%% ctex-scheme-plain-report.def,
+%% ctex-scheme-chinese.def,
+%% ctex-scheme-chinese-article.def,
+%% ctex-scheme-chinese-book.def,
+%% ctex-scheme-chinese-report.def,
+%% ctex-name-gbk.cfg,
+%% ctex-name-utf8.cfg,
+%% ctex.cfg,
+%% ctexopts.cfg,
+%% ctex-engine-pdftex.def,
+%% ctex-engine-xetex.def,
+%% ctex-engine-luatex.def,
+%% c19rm.fd,
+%% c19sf.fd,
+%% c19tt.fd,
+%% c70rm.fd,
+%% c70sf.fd,
+%% c70tt.fd,
+%% ctex-fontset-windows.def,
+%% ctex-fontset-windowsnew.def,
+%% ctex-fontset-windowsold.def,
+%% ctex-fontset-adobe.def,
+%% ctex-fontset-fandol.def,
+%% ctex-fontset-mac.def,
+%% ctex-fontset-founder.def,
+%% ctex-fontset-ubuntu.def,
+%% ctexspa.def,
+%% ctexpunct.spa,
+%% ctexmakespa.tex,
+%% ctexspamacro.tex,
+%% zhadobefonts.tex,
+%% zhfandolfonts.tex,
+%% zhfounderfonts.tex,
+%% zhubuntufonts.tex,
+%% zhwindowsfonts.tex, and
+%% README.
+%%
+%% End of file `ctexheading.sty'.
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls
index d32a3d7e999..0f7dfdeff5a 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls
@@ -28,10 +28,16 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class report (CTEX)}
\ProvidesExplClass{ctexrep}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
+\tl_const:Nx \c__ctex_version_tl
+ { \cs_if_exist_use:cF { ver@ \@currname . \@currext } { 9999/99/99 } }
+\cs_new_eq:cN { ver@ctex. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \c__ctex_version_tl
+\cs_new_eq:cN { ver@ctexheading. \@pkgextension } \c__ctex_version_tl
\RequirePackage { xparse , l3keys2e }
\msg_new:nnnn { ctex } { l3-too-old }
{ Support~package~`#1'~too~old. }
@@ -44,43 +50,24 @@
{ \msg_error:nnn { ctex } { l3-too-old } { expl3 } }
\@ifpackagelater { l3keys2e } { 2014/05/05 } { }
{ \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } }
-\RequirePackage { etoolbox , ifpdf , fix-cm , everysel }
+\RequirePackage { etoolbox }
+\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
\int_new:N \l__ctex_tmp_int
\dim_new:N \l__ctex_tmp_dim
\box_new:N \l__ctex_tmp_box
-\msg_new:nnnn { ctex } { package-too-old }
- { Support~package~`#1'~too~old. }
- {
- Please~update~an~up~to~date~version~of~the~package~`#1'\\
- using~your~TeX~package~manager~or~from~CTAN.
- }
-\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
-\ifpdf
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
-\else:
- \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
-\fi:
-\prg_new_conditional:Npnn \ctex_if_preamble: { TF }
- {
- \if_meaning:w \@onlypreamble \@notprerr
- \prg_return_false:
- \else:
- \prg_return_true:
- \fi:
- }
\cs_new_protected:Npn \ctex_at_end_package:nn #1#2
{
- \@ifpackageloaded { #1 }
- { #2 }
- { \ctex_add_hook:cn { g__ctex_at_end_ #1 _hook_tl } { #2 } }
+ \@ifpackageloaded {#1}
+ {#2}
+ { \ctex_gadd_hook:cn { g__ctex_at_end_ #1 _hook_tl } {#2} }
}
-\cs_new_protected:Npn \ctex_add_hook:Nn #1#2
+\cs_new_protected:Npn \ctex_gadd_hook:Nn #1#2
{
\tl_if_exist:NF #1 { \tl_new:N #1 }
- \tl_gput_right:Nn #1 { #2 }
+ \tl_gput_right:Nn #1 {#2}
}
-\cs_generate_variant:Nn \ctex_add_hook:Nn { c }
+\cs_generate_variant:Nn \ctex_gadd_hook:Nn { c }
\cs_new_protected_nopar:Npn \ctex_package_end_hook:n #1
{
\cs_if_exist_use:cT { g__ctex_at_end_ #1 _hook_tl }
@@ -88,7 +75,10 @@
}
\cs_generate_variant:Nn \ctex_package_end_hook:n { o }
\tl_put_left:Nn \@popfilename
- { \ctex_package_end_hook:o { \@currname } }
+ {
+ \cs_if_eq:NNT \@currext \@pkgextension
+ { \ctex_package_end_hook:o { \@currname } }
+ }
\cs_new_protected:Npn \ctex_file_wrapper:nnn #1#2#3
{
\use:x
@@ -138,15 +128,15 @@
\group_begin:
\use:x
{
+ \group_end:
\__ctex_parse_name:nNNNnN { \token_get_replacement_spec:N #2 }
- \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 } {#3}
- } #1
+ \exp_not:N #2 \exp_not:c { #3 ~ } \exp_not:c { /#3 }
+ } {#3} #1
}
{ #1#2 }
}
\cs_new_protected:Npn \__ctex_parse_name:nNNNnN #1#2#3#4#5#6
{
- \group_end:
\exp_args:Nc #6
{
\str_case:nnTF {#1}
@@ -175,9 +165,9 @@
\cs_new:Npn \__ctex_parse_name:w #1 AESAOPA ~ #2 < #3 \q_stop { #1#2 }
}
\cs_generate_variant:Nn \ctex_parse_name:NNn { NNx }
-\cs_new_protected:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
-\cs_new_protected:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
-\cs_new_protected:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
+\cs_new_protected_nopar:Npn \ctex_patch_cmd:NnnTF { \ctex_parse_name:NN \patchcmd }
+\cs_new_protected_nopar:Npn \ctex_preto_cmd:NnTF { \ctex_parse_name:NN \pretocmd }
+\cs_new_protected_nopar:Npn \ctex_appto_cmd:NnTF { \ctex_parse_name:NN \apptocmd }
\cs_new_protected:Npn \ctex_patch_cmd:Nnn
{
\group_begin:
@@ -205,6 +195,29 @@
Patching~command~`#1'~failed.\\
ctex~may~not~work~as~expected.
}
+\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
+\msg_new:nnnn { ctex } { package-too-old }
+ { Support~package~`#1'~too~old. }
+ {
+ Please~update~an~up~to~date~version~of~the~package~`#1'\\
+ using~your~TeX~package~manager~or~from~CTAN.
+ }
+\cs_new_eq:NN \ctex_lua_now_x:n \luatex_directlua:D
+\cs_if_exist:NTF \pdftex_pdfoutput:D
+ {
+ \int_compare:nNnTF \pdftex_pdfoutput:D > \c_zero
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iftrue:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_i:nn
+ }
+ }
+ { \use:n }
+ {
+ \cs_new_eq:NN \ifctexpdf \tex_iffalse:D
+ \cs_new_eq:NN \ctex_if_pdfmode:TF \use_ii:nn
+ }
+\cs_new_eq:NN \ctex_if_preamble:TF \use_i:nn
+\AfterEndPreamble { \cs_set_eq:NN \ctex_if_preamble:TF \use_ii:nn }
\cs_new:Npn \ctex_set_default_ccwd:Nn #1#2
{
\dim_compare:nNnTF
@@ -228,7 +241,6 @@
\tl_new:N \l__ctex_encoding_tl
\tl_set:Nx \l__ctex_encoding_tl
{ \pdftex_if_engine:TF { GBK } { UTF8 } }
-\cs_new_eq:NN \g__ctex_section_depth_flag \c_two
\bool_new:N \g__ctex_zhmCJK_bool
\tl_new:N \l__ctex_autoindent_tl
\cs_new_eq:NN \ctex_if_autoindent_touched:F \use:n
@@ -328,7 +340,7 @@
Option~ `fontset=adobe'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = adobe }
} ,
winfonts .code:n =
{
@@ -337,7 +349,7 @@
Option~ `fontset=windows'~ is~ set.~ It~ is~ better~ to~ use~
fontset~ option.
}
- \keys_set:nn { ctex / option } { fontset = none }
+ \keys_set:nn { ctex / option } { fontset = windows }
} ,
nofonts .value_forbidden: ,
winfonts .value_forbidden: ,
@@ -391,9 +403,15 @@
} ,
nospace .value_forbidden: ,
heading .bool_set:N = \l__ctex_heading_bool ,
+ sub3section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
+ sub4section .code:n =
+ { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
+ sub3section .value_forbidden: ,
+ sub4section .value_forbidden: ,
scheme .tl_set:N = \l__ctex_scheme_tl ,
- scheme .default:n = { chinese },
- scheme .initial:n = { chinese },
+ scheme .default:n = { chinese } ,
+ scheme .initial:n = { chinese } ,
cap .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -408,12 +426,6 @@
} ,
cap .value_forbidden: ,
nocap .value_forbidden: ,
- sub3section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_three } ,
- sub4section .code:n =
- { \cs_gset_eq:NN \g__ctex_section_depth_flag \c_four } ,
- sub3section .value_forbidden: ,
- sub4section .value_forbidden: ,
fntef .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
@@ -423,12 +435,17 @@
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `fancyhdr'~ package~ is~ loaded. }
- \RequirePackage{ fancyhdr }
+ \RequirePackage { fancyhdr }
} ,
hyperref .code:n =
{
\msg_warning:nnn { ctex } { deprecated-option }
{ `hyperref'~ package~ will~ be~ loaded. }
+ \ctex_at_end:n
+ {
+ \cs_if_exist:NF \hypersetup
+ { \cs_new_eq:NN \hypersetup \ctex_hypersetup:n }
+ }
\AtEndPreamble { \RequirePackage { hyperref } }
} ,
}
@@ -466,12 +483,7 @@
\tl_const:Nn \c__ctex_class_tl { report }
\PassOptionsToClass { \g__ctex_std_options_clist } { report }
\LoadClass { report }
-\tl_set_eq:Nc \l__ctex_tmp_tl { ver@ \@currname . \@currext }
-\cs_new_eq:cN { ver@ctex. \@pkgextension } \l__ctex_tmp_tl
-\cs_new_eq:cN { ver@ctexcap. \@pkgextension } \l__ctex_tmp_tl
-\cs_new_eq:cN { ver@ctexsize. \@pkgextension } \l__ctex_tmp_tl
-\NewDocumentCommand \ctexset { +m }
- { \keys_set:nn { ctex } {#1} }
+\NewDocumentCommand \ctexset { } { \keys_set:nn { ctex } }
\NewDocumentCommand \CTEXsetup { +o > { \TrimSpaces } m }
{
\msg_warning:nnnn { ctex } { deprecated-command } { \CTEXsetup }
@@ -493,7 +505,6 @@
\cs_new_protected_nopar:Npn \ctex_hypersetup:n #1
{ \PassOptionsToPackage {#1} { hyperref } }
}
-\ctex_hypersetup:n { colorlinks = true }
\pdftex_if_engine:TF
{
\tl_set:Nx \l__ctex_encoding_tl { \l__ctex_encoding_tl }
@@ -704,16 +715,18 @@
\tl_const:cx { CTEX@#1name }
{
\exp_not:c { CTEX@#1@nameformat }
- \exp_not:c { CTEX@pre#1 }
- \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
- { \exp_not:c { CTEX@the#1 } }
{
- \group_begin:
- \exp_not:c { CTEX@#1@numberformat }
- \exp_not:c { CTEX@the#1 }
- \group_end:
+ \exp_not:c { CTEX@pre#1 }
+ \exp_not:N \tl_if_empty:NTF \exp_not:c { CTEX@#1@numberformat }
+ { \exp_not:c { CTEX@the#1 } }
+ {
+ \group_begin:
+ \exp_not:c { CTEX@#1@numberformat }
+ \exp_not:c { CTEX@the#1 }
+ \group_end:
+ }
+ \exp_not:c { CTEX@post#1 }
}
- \exp_not:c { CTEX@post#1 }
\exp_not:c { CTEX@#1@aftername }
}
}
@@ -730,19 +743,34 @@
#1 / numberformat .tl_set:N = \exp_not:c { CTEX@#1@numberformat } ,
#1 / aftername .tl_set:N = \exp_not:c { CTEX@#1@aftername } ,
#1 / titleformat .tl_set:N = \exp_not:c { CTEX@#1@titleformat } ,
+ #1 / aftertitle .tl_set:N = \exp_not:c { CTEX@#1@aftertitle } ,
#1 / beforeskip .tl_set:N = \exp_not:c { CTEX@#1@beforeskip } ,
#1 / afterskip .tl_set:N = \exp_not:c { CTEX@#1@afterskip} ,
#1 / indent .tl_set:N = \exp_not:c { CTEX@#1@indent } ,
#1 / format+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
+ #1 / format~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@format } { ####1 } } ,
#1 / nameformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
+ #1 / nameformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@nameformat } { ####1 } } ,
#1 / numberformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
+ #1 / numberformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@numberformat } { ####1 } } ,
#1 / aftername+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
+ #1 / aftername~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftername } { ####1 } } ,
#1 / titleformat+ .code:n =
{ \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / titleformat~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@titleformat } { ####1 } } ,
+ #1 / aftertitle+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
+ #1 / aftertitle~+ .code:n =
+ { \tl_put_right:Nn \exp_not:c { CTEX@#1@aftertitle } { ####1 } } ,
#1 / beforeskip .initial:n = \c_zero_skip ,
#1 / afterskip .initial:n = \c_zero_skip ,
#1 / indent .initial:n = \c_zero_dim ,
@@ -761,7 +789,11 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
-\tl_clear:N \l__ctex_tmp_tl
+\tl_set:Nn \l__ctex_tmp_tl
+ {
+ part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
+ chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle ,
+ }
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
@@ -769,11 +801,6 @@
}
\use:x { \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } } }
\tl_clear:N \l__ctex_tmp_tl
-\keys_define:nn { ctex }
- {
- part / pagestyle .tl_set:N = \CTEX@part@pagestyle ,
- chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle
- }
\def\@part[#1]#2{%
\thispagestyle{\CTEX@part@pagestyle}%
\ifnum \c@secnumdepth >-2\relax
@@ -788,12 +815,14 @@
\ifnum \c@secnumdepth >-2\relax
\CTEX@partname
\fi
- \CTEX@part@titleformat{#2}\par}%
+ \CTEX@part@titleformat{#2}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@spart#1{%
{\interlinepenalty \@M
\normalfont \CTEX@part@format
- \CTEX@part@titleformat{#1}\par}%
+ \CTEX@part@titleformat{#1}%
+ \CTEX@part@aftertitle}%
\@endpart}
\def\@chapter[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
@@ -827,7 +856,9 @@
\CTEX@chaptername
\fi
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}%
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@makeschapterhead#1{%
@@ -841,7 +872,9 @@
\vspace*{\@tempskipa}%
{\normalfont \parindent \CTEX@chapter@indent \CTEX@chapter@format
\interlinepenalty\@M
- \CTEX@chapter@titleformat{#1}\par\nobreak
+ \CTEX@chapter@titleformat{#1}
+ \CTEX@chapter@aftertitle
+ \nobreak
\vskip \CTEX@chapter@afterskip
}}
\def\@seccntformat#1{%
@@ -861,7 +894,8 @@
#6{%
\@hangfrom{\hskip #3\relax\@svsec}%
\interlinepenalty \@M
- \csname CTEX@#1@titleformat\endcsname{#8}\@@par}%
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\endgroup
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
@@ -874,7 +908,9 @@
\else
\def\@svsechd{%
#6{\hskip #3\relax
- \@svsec \csname CTEX@#1@titleformat\endcsname{#8}}%
+ \@svsec
+ \csname CTEX@#1@titleformat\endcsname{#8}%
+ \csname CTEX@#1@aftertitle\endcsname}%
\csname #1mark\endcsname{#7}%
\addcontentsline{toc}{#1}{%
\ifnum #2>\c@secnumdepth \else
@@ -892,15 +928,20 @@
#4{%
\@hangfrom{\hskip #1}%
\interlinepenalty \@M
- \CTEX@titleformat@n{#5}\@@par}%
+ \CTEX@titleformat@n{#5}%
+ \CTEX@aftertitle}%
\endgroup
\else
- \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}}}%
+ \def\@svsechd{#4{\hskip #1\relax \CTEX@titleformat@n{#5}\CTEX@aftertitle}}%
\fi
\@xsect{#3}}
\cs_new_protected_nopar:Npn \CTEX@set@titleformat@n #1
- { \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat } }
+ {
+ \cs_set_eq:Nc \CTEX@titleformat@n { CTEX@#1@titleformat }
+ \cs_set_eq:Nc \CTEX@aftertitle { CTEX@#1@aftertitle }
+ }
\cs_new_eq:NN \CTEX@titleformat@n \use:n
+\cs_new_eq:NN \CTEX@aftertitle \prg_do_nothing:
\int_zero:N \l__ctex_tmp_int
\clist_map_inline:nn
{ section , subsection , subsubsection , paragraph , subparagraph }
@@ -919,15 +960,15 @@
}
}
}
-\tl_new:N \CTEX@preappendix
-\tl_new:N \CTEX@postappendix
\keys_define:nn { ctex }
- { appendix .meta:nn = { ctex / appendix } {#1} }
-\keys_define:nn { ctex / appendix }
{
- name .code:n = { \ctex_assign_heading_name:nn { appendix } {#1} } ,
- number .tl_set:N = \CTEX@appendixnumber
+ appendix .meta:nn = { ctex / appendix } {#1} ,
+ appendix / name .code:n =
+ { \ctex_assign_heading_name:nn { appendix } {#1} } ,
+ appendix / number .tl_set:N = \CTEX@appendixnumber
}
+\tl_new:N \CTEX@preappendix
+\tl_new:N \CTEX@postappendix
\cs_new_eq:NN \CTEX@save@appendix \appendix
\cs_gset_protected_nopar:Npn \appendix
{
@@ -1113,11 +1154,8 @@
\normalsize
\NewDocumentCommand \CTeX { }
{ \ifincsname CTeX \else: C \TeX \fi: }
-\AtBeginDocument
- {
- \cs_if_exist_use:NT \pdfstringdefDisableCommands
- { { \tl_set:Nn \CTeX { CTeX } } }
- }
+\ctex_at_end_package:nn { hyperref }
+ { \pdfstringdefDisableCommands { \tl_set:Nn \CTeX { CTeX } } }
\keys_define:nn { ctex }
{
captiondelimiter .code:n =
@@ -1221,6 +1259,7 @@
%% ctex.sty,
%% ctexcap.sty,
%% ctexsize.sty,
+%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
index 575169b7625..59d56038732 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
+++ b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty
@@ -4,7 +4,7 @@
%%
%% The original source files were:
%%
-%% ctex.dtx (with options: `package,ctexsize')
+%% ctex.dtx (with options: `style,ctexsize')
%%
%% Copyright (C) 2003--2015
%% CTEX.ORG and any individual authors listed in the documentation.
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese font size definition (CTEX)}
\ProvidesExplPackage{ctexsize}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\RequirePackage { xparse , l3keys2e }
\cs_new_eq:NN \g__ctex_font_size_flag \c_minus_one
\keys_define:nn { ctex / option }
@@ -164,6 +164,7 @@
%% ctex.sty,
%% ctexcap.sty,
%% ctexsize.sty,
+%% ctexheading.sty,
%% ctexart.cls,
%% ctexbook.cls,
%% ctexrep.cls,
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexspa.def b/Master/texmf-dist/tex/latex/ctex/ctexspa.def
index 3f5c6a67a98..91048dd0a27 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexspa.def
+++ b/Master/texmf-dist/tex/latex/ctex/ctexspa.def
@@ -28,7 +28,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{ctexspa.def}%
- [2015/05/15 v2.0.2 Space info for CJKpunct (CTEX)]
+ [2015/05/15 v2.1 Space info for CJKpunct (CTEX)]
\ctexspadef{adobezhsong}{70,15,61,8,63,14,58,7,64,13,62,12,60,11,61,15,62,14,51,6,58,5,58,8,7,5,12,12,10,68,13,63,17,63,20,69,19,69,17,63,19,70,17,55,10,10,14,63,10,65,10,61,13,62,15,61,7,49,7,56,8,58,15,69,8,61,14,63,8,57,,,}
\ctexspadef{adobezhhei}{78,3,64,3,64,2,61,3,72,3,70,3,72,3,70,3,60,3,51,3,62,3,66,3,0,0,10,10,3,70,5,70,6,75,6,78,17,67,13,67,17,67,4,50,8,8,3,72,3,70,3,72,3,70,3,60,3,51,3,62,3,66,3,78,7,62,3,63,3,61,,,}
\ctexspadef{adobezhkai}{76,10,55,8,63,4,62,4,71,4,65,4,71,4,74,4,54,4,54,4,62,4,62,4,0,0,11,11,5,72,6,71,7,78,7,79,18,68,18,68,18,68,2,46,14,12,4,71,4,65,4,71,4,74,4,54,4,54,4,62,4,62,10,76,8,55,4,63,4,62,,,}
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def
index 04434db1c8b..b8c8b3e325b 100644
--- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-luatex.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{LuaLaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-luatex.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\msg_new:nnn { ctex } { luatexja-loaded }
{
Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\
@@ -171,7 +171,7 @@
}
\exp_after:wN \globaljfont \font@name \external@font \scan_stop:
\font@name
- \ctex_lua_now_x:n { font.current(tex.attribute['ltj@curjfnt']) }
+ \ctex_lua_now_x:n { font.current(tex.getattribute('ltj@curjfnt')) }
\use:c { \f@encoding + \f@family }
\use:c { \curr@fontshape }
}
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def
index acaafe40e19..8b8d9f876cb 100644
--- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-pdftex.def
@@ -26,10 +26,59 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{(pdf)LaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-pdftex.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
+\seq_new:N \c__ctex_cmap_encoding_seq
+\seq_set_from_clist:Nn \c__ctex_cmap_encoding_seq
+ { C19 , C10 , C00 , C09 , C40 , C60 }
+\cs_new_protected_nopar:Npn \ctex_family_cmap:nn #1#2
+ {
+ \cs_if_free:cF { #1 + #2 }
+ {
+ \seq_if_in:NnT \c__ctex_cmap_encoding_seq {#1}
+ { \tl_gput_right:cn { #1 + #2 } { \ctex_add_cmap:n {#1} } }
+ }
+ }
+\cs_generate_variant:Nn \ctex_family_cmap:nn { x }
+\cs_new_eq:NN \CTEX@Family@CMap \ctex_family_cmap:xn
+\cs_new_protected_nopar:Npn \ctex_add_cmap:n #1
+ {
+ \cs_if_free:NF \CJK@plane
+ { \ctex_add_cmap:cn { __ctex_add_cmap_ #1 \CJK@plane : } {#1} }
+ }
+\cs_new_protected_nopar:Npn \ctex_add_cmap:Nn #1#2
+ {
+ \cs_if_exist:NF #1 { \__ctex_save_cmap:Nn #1 {#2} }
+ #1
+ }
+\cs_generate_variant:Nn \ctex_add_cmap:Nn { c }
+\cs_new_protected_nopar:Npn \__ctex_save_cmap:Nn #1#2
+ {
+ \tex_lowercase:D { \tl_set:Nx \l__ctex_tmp_tl { #2 \CJK@plane } }
+ \tex_immediate:D \pdfobj stream ~ file { \l__ctex_tmp_tl .cmap }
+ \cs_new_protected_nopar:Npx #1
+ {
+ \exp_not:N \pdffontattr \exp_not:N \font
+ { /ToUnicode ~ \int_use:N \pdflastobj \c_space_tl 0 ~ R }
+ }
+ }
+\group_begin:
+\char_set_catcode_other:N \#
+\ctex_if_pdfmode:TF
+ {
+ \group_end:
+ \ExplSyntaxOff
+ \ctex_appto_cmd:NnTF \DeclareFontFamily { \CTEX@Family@CMap {#1} {#2} }
+ {
+ \ctex_at_end_package:nn { cmap }
+ { \cs_gset_eq:NN \CTEX@Family@CMap \use_none:nn }
+ }
+ { \ctex_patch_failure:N \DeclareFontFamily }
+ \ExplSyntaxOn
+ }
+ { \group_end: }
\if_bool:N \g__ctex_zhmCJK_bool
\PassOptionsToPackage { encoding = \l__ctex_encoding_tl } { zhmCJK }
\RequirePackage { zhmCJK }
@@ -127,7 +176,7 @@
}
\cs_new_protected_nopar:Npn \ctex_set_ignorespaces:
{ \cs_set_eq:NN \CJK@ignorespaces \ctex_auto_ignorespaces: }
-\ctex_add_hook:Nn \CJKhook { \ctex_set_ignorespaces: }
+\ctex_gadd_hook:Nn \CJKhook { \ctex_set_ignorespaces: }
\cs_new_protected_nopar:Npn \ctex_punct_set:n #1
{
\clist_map_inline:Nn \c__ctex_punct_family_clist
@@ -233,7 +282,7 @@
{ \tl_gset:Nn \g__ctex_fontset_tl {#1} }
{ \tl_gset:Nn \g__ctex_fontset_tl {#2} }
}
-\tl_const:Nn \c__ctex_macosx_file_tl { /mach_kernel }
+\tl_const:Nn \c__ctex_macosx_file_tl { /Library/Fonts/Songti.ttc }
\ctex_hypersetup:n { driverfallback = dvipdfmx }
\str_if_eq:onTF { \l__ctex_encoding_tl } { GBK }
{
@@ -253,11 +302,14 @@
}
}
{ \ctex_hypersetup:n { pdfencoding = unicode } }
-\RequirePackage { CJKfntef } \normalem
+\RequirePackage { CJKfntef }
+\normalem
+\cs_new_protected_nopar:Npn \__ctex_clear_fntef_color:n #1
+ { \tl_clear:c { CJK#1color } }
\clist_map_inline:nn
{ underdot , underline , underdblline , underwave , sout , xout }
{
- \tl_clear:c { CJK#1color }
+ \__ctex_clear_fntef_color:n {#1}
\cs_new_protected_nopar:cpx { CTEX#1 }
{
\msg_warning:nnnn { ctex } { deprecated-command } { \exp_not:c { CTEX#1 } }
diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def
index 138f0e14797..11f036799e0 100644
--- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def
+++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-xetex.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{XeLaTeX adapter (CTEX)}
\ProvidesExplFile{ctex-engine-xetex.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\RequirePackage { xeCJK }
\exp_args:Nx \xeCJKsetup
{
@@ -64,13 +64,23 @@
{ \tl_gset:Nn \g__ctex_fontset_tl {#1} }
{ \tl_gset:Nn \g__ctex_fontset_tl {#2} }
}
-\tl_const:Nn \c__ctex_macosx_file_tl { /mach_kernel }
+\tl_const:Nn \c__ctex_macosx_file_tl { /Library/Fonts/Songti.ttc }
\ctex_hypersetup:n { pdfencoding = unicode }
\RequirePackage { xeCJKfntef }
+\@ifpackagelater { xeCJKfntef } { 2014/11/04 }
+ {
+
+ \cs_new_protected_nopar:Npn \__ctex_clear_fntef_color:n #1
+ { \xeCJKsetup { #1 / format = { } } }
+ }
+ {
+ \cs_new_protected_nopar:Npn \__ctex_clear_fntef_color:n #1
+ { \tl_clear:c { CJK#1color } }
+ }
\clist_map_inline:nn
{ underdot , underline , underdblline , underwave , sout , xout }
{
- \keys_set:nn { xeCJK / options } { #1 / format = { } }
+ \__ctex_clear_fntef_color:n {#1}
\cs_new_protected_nopar:cpx { CTEX#1 }
{
\msg_warning:nnnn { ctex } { deprecated-command } { \exp_not:c { CTEX#1 } }
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd
index a2f2a1b9831..30d2f7fce75 100644
--- a/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19rm.fd
@@ -27,7 +27,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{c19rm.fd}%
- [2015/05/15 v2.0.2 Chinese font definition (CTEX)]
+ [2015/05/15 v2.1 Chinese font definition (CTEX)]
%%
%% Chinese characters
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd
index ddd788a1e39..704ad030883 100644
--- a/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19sf.fd
@@ -27,7 +27,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{c19sf.fd}%
- [2015/05/15 v2.0.2 Chinese font definition (CTEX)]
+ [2015/05/15 v2.1 Chinese font definition (CTEX)]
%%
%% Chinese characters
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd
index dc38700e6bc..0986f6b8be2 100644
--- a/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c19tt.fd
@@ -27,7 +27,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{c19tt.fd}%
- [2015/05/15 v2.0.2 Chinese font definition (CTEX)]
+ [2015/05/15 v2.1 Chinese font definition (CTEX)]
%%
%% Chinese characters
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd
index 263726b5cff..914baac86f3 100644
--- a/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c70rm.fd
@@ -27,7 +27,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{c70rm.fd}%
- [2015/05/15 v2.0.2 Chinese font definition (CTEX)]
+ [2015/05/15 v2.1 Chinese font definition (CTEX)]
%%
%% Chinese characters
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd
index 198ceb4f04f..492cf166309 100644
--- a/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c70sf.fd
@@ -27,7 +27,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{c70sf.fd}%
- [2015/05/15 v2.0.2 Chinese font definition (CTEX)]
+ [2015/05/15 v2.1 Chinese font definition (CTEX)]
%%
%% Chinese characters
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd
index a1a2a6fb968..305df75675f 100644
--- a/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd
+++ b/Master/texmf-dist/tex/latex/ctex/fd/c70tt.fd
@@ -27,7 +27,7 @@
%% ------------------------------------------------------------------------------
%%
\ProvidesFile{c70tt.fd}%
- [2015/05/15 v2.0.2 Chinese font definition (CTEX)]
+ [2015/05/15 v2.1 Chinese font definition (CTEX)]
%%
%% Chinese characters
%%
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def
index 801dacb47f1..5fd609c3abf 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-adobe.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Adobe fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-adobe.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{
\ctex_if_pdfmode:TF
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def
index 90d7e04c293..bcdabfb49ff 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-fandol.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Fandol fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-fandol.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{
\ctex_if_pdfmode:TF
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def
index cbf9434afd2..715bd19771b 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-founder.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Founder fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-founder.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{
\ctex_zhmap_case:nnn
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def
index a8038e84f00..041926b2c35 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-mac.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Mac OS X fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-mac.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{ \ctex_fontset_error:n { mac } }
{
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def
index 0c930c754b3..b24ab4be269 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-ubuntu.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Ubuntu fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-ubuntu.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{
\ctex_zhmap_case:nnn
@@ -58,7 +58,8 @@
{ \ctex_fontset_error:n { ubuntu } }
}
{
- \setCJKmainfont [ ItalicFont = AR~PL~UKai~CN ] { AR~PL~UMing~CN }
+ \setCJKmainfont
+ [ BoldFont = WenQuanYi~Zen~Hei , ItalicFont = AR~PL~UKai~CN ] { AR~PL~UMing~CN }
\setCJKsansfont { WenQuanYi~Zen~Hei }
\setCJKmonofont { AR~PL~UMing~CN }
\setCJKfamilyfont { zhsong } { AR~PL~UMing~CN }
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def
index f3b7dfb6b47..296514caca3 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windows.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Windows fonts definition (CTEX)}
\ProvidesExplFile{ctex-fontset-windows.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\file_if_exist:nTF { C:/boot.ini }
{ \ctex_file_input:n { ctex-fontset-windowsold.def } }
{ \ctex_file_input:n { ctex-fontset-windowsnew.def } }
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def
index 2a00e97336c..bd52407f505 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsnew.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Windows fonts definition for Vista or later version (CTEX)}
\ProvidesExplFile{ctex-fontset-windowsnew.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{
\ctex_zhmap_case:nnn
diff --git a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def
index 1a45fc950c4..6156c9e30e8 100644
--- a/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def
+++ b/Master/texmf-dist/tex/latex/ctex/fontset/ctex-fontset-windowsold.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Windows fonts definition for XP or earlier version (CTEX)}
\ProvidesExplFile{ctex-fontset-windowsold.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\pdftex_if_engine:TF
{
\ctex_zhmap_case:nnn
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def
index 3a0fa752e60..b21208988d8 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-article.def
@@ -26,15 +26,16 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for article (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-article.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
+ aftertitle = \par ,
+ number = \chinese { part } ,
nameformat = \Large \bfseries ,
afterskip = 3ex ,
- number = \chinese { part } ,
format = \centering ,
aftername = \quad ,
titleformat = \Large \bfseries ,
@@ -44,6 +45,7 @@
{
number = \thesection ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 2.3ex \@plus .2ex ,
format = \Large \bfseries \centering ,
beforeskip = 3.5ex \@plus 1ex \@minus .2ex
@@ -53,6 +55,7 @@
number = \thesubsection ,
format = \large \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex
}
@@ -61,6 +64,7 @@
number = \thesubsubsection ,
format = \normalsize \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex
}
@@ -80,6 +84,7 @@
{
\keys_set:nn { ctex / paragraph }
{
+ aftertitle = \@@par ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1ex \@plus .2ex
}
@@ -95,6 +100,7 @@
{
\keys_set:nn { ctex / subparagraph }
{
+ aftertitle = \@@par ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1ex \@plus .2ex
}
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def
index d44baaf59f3..2d83f7e708f 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-book.def
@@ -26,12 +26,14 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for book (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-book.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
+ aftertitle = \par ,
+ number = \chinese { part } ,
format = \centering ,
nameformat = \huge \bfseries ,
aftername = \par \vskip 20 \p@ ,
@@ -42,6 +44,7 @@
{
pagestyle = plain ,
nameformat = \huge \bfseries ,
+ aftertitle = \par ,
afterskip = 40 \p@ ,
number = \chinese { chapter } ,
format = \centering ,
@@ -53,6 +56,7 @@
{
number = \thesection ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 2.3ex \@plus .2ex ,
format = \Large \bfseries \centering ,
beforeskip = 3.5ex \@plus 1ex \@minus .2ex
@@ -62,6 +66,7 @@
number = \thesubsection ,
format = \large \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex
}
@@ -70,6 +75,7 @@
number = \thesubsubsection ,
format = \normalsize \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex
}
@@ -89,6 +95,7 @@
{
\keys_set:nn { ctex / paragraph }
{
+ aftertitle = \@@par ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1ex \@plus .2ex
}
@@ -104,6 +111,7 @@
{
\keys_set:nn { ctex / subparagraph }
{
+ aftertitle = \@@par ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1ex \@plus .2ex
}
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def
index 0b723c70b6d..0bf4aa05931 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-report.def
@@ -26,12 +26,14 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for report (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese-report.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
+ aftertitle = \par ,
+ number = \chinese { part } ,
format = \centering ,
nameformat = \huge \bfseries ,
aftername = \par \vskip 20 \p@ ,
@@ -42,6 +44,7 @@
{
pagestyle = plain ,
nameformat = \huge \bfseries ,
+ aftertitle = \par ,
afterskip = 40 \p@ ,
number = \chinese { chapter } ,
format = \centering ,
@@ -53,6 +56,7 @@
{
number = \thesection ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 2.3ex \@plus .2ex ,
format = \Large \bfseries \centering ,
beforeskip = 3.5ex \@plus 1ex \@minus .2ex
@@ -62,6 +66,7 @@
number = \thesubsection ,
format = \large \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex
}
@@ -70,6 +75,7 @@
number = \thesubsubsection ,
format = \normalsize \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex
}
@@ -89,6 +95,7 @@
{
\keys_set:nn { ctex / paragraph }
{
+ aftertitle = \@@par ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1ex \@plus .2ex
}
@@ -104,6 +111,7 @@
{
\keys_set:nn { ctex / subparagraph }
{
+ aftertitle = \@@par ,
beforeskip = 3.25ex \@plus 1ex \@minus .2ex ,
afterskip = 1ex \@plus .2ex
}
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def
index fbe8be476d4..b3be5572070 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese scheme for generic (CTEX)}
\ProvidesExplFile{ctex-scheme-chinese.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\str_if_eq:onTF { \l__ctex_encoding_tl } { GBK }
{ \ctex_file_input:n { ctex-name-gbk.cfg } }
{ \ctex_file_input:n { ctex-name-utf8.cfg } }
@@ -40,11 +40,8 @@
{ \keys_set:nn { ctex / option } { linespread = 1.3 } }
\ctex_if_autoindent_touched:F
{ \keys_set:nn { ctex } { autoindent = true } }
-\clist_map_inline:nn { article , book , report }
- {
- \@ifclassloaded {#1}
- { \RequirePackage{ indentfirst } } { }
- }
+\tl_if_exist:NT \c__ctex_std_class_tl
+ { \RequirePackage{ indentfirst } }
%%
%%
%% End of file `ctex-scheme-chinese.def'.
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def
index 0596bf66e9e..752fefd584d 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-article.def
@@ -26,12 +26,13 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for article (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-article.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
+ aftertitle = \par ,
name = \partname \space ,
number = \thepart ,
nameformat = \Large \bfseries ,
@@ -45,6 +46,7 @@
{
number = \thesection ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 2.3ex \@plus .2ex ,
format = \Large \bfseries ,
beforeskip = -3.5ex \@plus -1ex \@minus -.2ex
@@ -54,6 +56,7 @@
number = \thesubsection ,
format = \large \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex
}
@@ -62,6 +65,7 @@
number = \thesubsubsection ,
format = \normalsize \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex
}
@@ -81,6 +85,7 @@
{
\keys_set:nn { ctex / paragraph }
{
+ aftertitle = \@@par ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex ,
afterskip = 1ex \@plus .2ex
}
@@ -96,6 +101,7 @@
{
\keys_set:nn { ctex / subparagraph }
{
+ aftertitle = \@@par ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex ,
afterskip = 1ex \@plus .2ex
}
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def
index 9f0898b3b42..202db21f8c7 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-book.def
@@ -26,12 +26,13 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for book (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-book.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
+ aftertitle = \par ,
name = \partname \space ,
number = \thepart ,
format = \centering ,
@@ -44,6 +45,7 @@
{
pagestyle = plain ,
nameformat = \huge \bfseries ,
+ aftertitle = \par ,
afterskip = 40 \p@ ,
name = \chaptername \space ,
number = \thechapter ,
@@ -56,6 +58,7 @@
{
number = \thesection ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 2.3ex \@plus .2ex ,
format = \Large \bfseries ,
beforeskip = -3.5ex \@plus -1ex \@minus -.2ex
@@ -65,6 +68,7 @@
number = \thesubsection ,
format = \large \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex
}
@@ -73,6 +77,7 @@
number = \thesubsubsection ,
format = \normalsize \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex
}
@@ -92,6 +97,7 @@
{
\keys_set:nn { ctex / paragraph }
{
+ aftertitle = \@@par ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex ,
afterskip = 1ex \@plus .2ex
}
@@ -107,6 +113,7 @@
{
\keys_set:nn { ctex / subparagraph }
{
+ aftertitle = \@@par ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex ,
afterskip = 1ex \@plus .2ex
}
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def
index e7fa5adda1e..fac90d7aea7 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-report.def
@@ -26,12 +26,13 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for report (CTEX)}
\ProvidesExplFile{ctex-scheme-plain-report.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
\keys_set:nn { ctex / part }
{
+ aftertitle = \par ,
name = \partname \space ,
number = \thepart ,
format = \centering ,
@@ -44,6 +45,7 @@
{
pagestyle = plain ,
nameformat = \huge \bfseries ,
+ aftertitle = \par ,
afterskip = 40 \p@ ,
name = \chaptername \space ,
number = \thechapter ,
@@ -56,6 +58,7 @@
{
number = \thesection ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 2.3ex \@plus .2ex ,
format = \Large \bfseries ,
beforeskip = -3.5ex \@plus -1ex \@minus -.2ex
@@ -65,6 +68,7 @@
number = \thesubsection ,
format = \large \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex
}
@@ -73,6 +77,7 @@
number = \thesubsubsection ,
format = \normalsize \bfseries ,
aftername = \quad ,
+ aftertitle = \@@par ,
afterskip = 1.5ex \@plus .2ex ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex
}
@@ -92,6 +97,7 @@
{
\keys_set:nn { ctex / paragraph }
{
+ aftertitle = \@@par ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex ,
afterskip = 1ex \@plus .2ex
}
@@ -107,6 +113,7 @@
{
\keys_set:nn { ctex / subparagraph }
{
+ aftertitle = \@@par ,
beforeskip = -3.25ex \@plus -1ex \@minus -.2ex ,
afterskip = 1ex \@plus .2ex
}
diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def
index ef554f86843..7823ef28251 100644
--- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def
+++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain.def
@@ -26,10 +26,10 @@
%%
%% ------------------------------------------------------------------------------
%%
-\GetIdInfo$Id: ctex.dtx 3216ced 2015-05-16 11:29:03 +0800 Qing Lee <sobenlee@gmail.com> $
+\GetIdInfo$Id: ctex.dtx ca75f0e 2015-06-19 17:39:23 +0800 Qing Lee <sobenlee@gmail.com> $
{Plain scheme for generic (CTEX)}
\ProvidesExplFile{ctex-scheme-plain.def}
- {\ExplFileDate}{2.0.2}{\ExplFileDescription}
+ {\ExplFileDate}{2.1}{\ExplFileDescription}
%%
%%
%% End of file `ctex-scheme-plain.def'.