summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ctex/ctexart.cls
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-05-14 22:03:09 +0000
committerKarl Berry <karl@freefriends.org>2016-05-14 22:03:09 +0000
commit1ffd29c330984928904e5f95a4033d334fba974b (patch)
treeda2c8a81497119292b01e00a76fb78727f65da93 /Master/texmf-dist/tex/latex/ctex/ctexart.cls
parent1bafd95e83267f9e55b47de90fa004d4db84971d (diff)
ctex (14may16)
git-svn-id: svn://tug.org/texlive/trunk@41120 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ctex/ctexart.cls')
-rw-r--r--Master/texmf-dist/tex/latex/ctex/ctexart.cls38
1 files changed, 25 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/latex/ctex/ctexart.cls b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
index 95e59591680..8261a9ec7d8 100644
--- a/Master/texmf-dist/tex/latex/ctex/ctexart.cls
+++ b/Master/texmf-dist/tex/latex/ctex/ctexart.cls
@@ -28,10 +28,10 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\GetIdInfo$Id: ctex.dtx 1fcc459 2016-04-25 13:35:13 +0800 Liu Haiyang <leoliu.pku@gmail.com> $
+\GetIdInfo$Id: ctex.dtx f745b21 2016-05-14 12:17:18 +0800 Qing Lee <sobenlee@gmail.com> $
{Chinese adapter for class article (CTEX)}
\ProvidesExplClass{ctexart}
- {\ExplFileDate}{2.4}{\ExplFileDescription}
+ {\ExplFileDate}{2.4.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
@@ -50,15 +50,17 @@
{ \msg_error:nnn { ctex } { l3-too-old } { expl3 } }
\@ifpackagelater { l3keys2e } { 2015/12/20 } { }
{ \msg_error:nnn { ctex } { l3-too-old } { l3keys2e } }
+\str_const:Nx \c__ctex_engine_str
+ { \cs_if_exist:NTF \ngostype { aptex } { \c_sys_engine_str } }
\msg_new:nnnn { ctex } { engine-not-supported }
{ Engine~`#1'~is~not~yet~supported,~ctex~will~abort! }
- { You~can~switch~to~xelatex,~lualatex~or~pdflatex.}
-\file_if_exist:nTF { ctex-engine- \c_sys_engine_str .def }
+ { You~can~switch~to~xelatex,~lualatex,~pdflatex,~uplatex,~or~aplatex. }
+\file_if_exist:nTF { ctex-engine- \c__ctex_engine_str .def }
{
\str_const:Nx \c__ctex_engine_file_str
- { ctex-engine- \c_sys_engine_str .def }
+ { ctex-engine- \c__ctex_engine_str .def }
}
- { \msg_critical:nnx { ctex } { engine-not-supported } { \c_sys_engine_str } }
+ { \msg_critical:nnx { ctex } { engine-not-supported } { \c__ctex_engine_str } }
\RequirePackage { ctexhook , ctexpatch }
\RequirePackage { fix-cm , everysel }
\tl_new:N \l__ctex_tmp_tl
@@ -150,7 +152,7 @@
\keys_define:nn { ctex / option }
{
zihao .choice: ,
- zihao .default:n = { 5 } ,
+ zihao .value_required:n = true ,
zihao / 5 .code:n = { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } ,
zihao / -4 .code:n = { \cs_gset_eq:NN \g__ctex_font_size_flag \c_one } ,
zihao / false .code:n = { \cs_gset_eq:NN \g__ctex_font_size_flag \c_two } ,
@@ -534,15 +536,17 @@
}
\PassOptionsToPackage { encoding = \l__ctex_encoding_tl } { zhnumber }
\RequirePackage { zhnumber }
-\cs_new_eq:NN \chinese \zhnum
+\cs_new_nopar:Npn \chinese { \zhnum_counter:n }
+\cs_new_eq:NN \@chinese \@zhnum
\cs_new_eq:NN \Chinese \chinese
\cs_new_eq:NN \CTEXcounter \use_none:n
\ctex_at_end_package:nn { enumitem }
{
\cs_if_free:NF \AddEnumerateCounter
{
- \AddEnumerateCounter * { \zhnum } { \zhnum_int:n } { 1 }
- \AddEnumerateCounter * { \chinese } { \zhnum_int:n } { 1 }
+ \AddEnumerateCounter * { \zhnum } { \@zhnum } { 1 }
+ \AddEnumerateCounter * { \zhdig } { \@zhdig } { 1 }
+ \AddEnumerateCounter * { \chinese } { \@chinese } { 1 }
}
}
\NewDocumentCommand \CTEXnumber { m m }
@@ -671,13 +675,18 @@
{ \tl_clear:c { CTEX@post#1 } }
{ \tl_set:cn { CTEX@post#1 } {#3} }
}
+\group_begin:
+\tl_clear:N \l__ctex_tmp_tl
\seq_map_inline:Nn \c__ctex_headings_seq
{
\__ctex_initial_heading:n {#1}
\__ctex_def_heading_keys:n {#1}
}
-\use:x { \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } } }
-\tl_clear:N \l__ctex_tmp_tl
+\use:x
+ {
+ \group_end:
+ \keys_define:nn { ctex } { \exp_not:o { \l__ctex_tmp_tl } }
+ }
\cs_new_protected_nopar:Npn \CTEX@makeheadinganchor { }
\ctex_at_end_package:nn { hyperref }
{ \cs_gset_protected_nopar:Npn \CTEX@makeheadinganchor { \phantomsection } }
@@ -1245,6 +1254,7 @@
%% ctexbook.cls,
%% ctexrep.cls,
%% ctexbeamer.cls,
+%% ctxdoc.cls,
%% ctexcap.sty,
%% ctexhook.sty,
%% ctexpatch.sty,
@@ -1271,6 +1281,7 @@
%% ctex-engine-pdftex.def,
%% ctex-engine-xetex.def,
%% ctex-engine-luatex.def,
+%% ctex-engine-aptex.def,
%% ctex-engine-uptex.def,
%% c19rm.fd,
%% c19sf.fd,
@@ -1290,6 +1301,7 @@
%% ctexpunct.spa,
%% ctexmakespa.tex,
%% ctexspamacro.tex,
+%% ctxdocstrip.tex,
%% zhadobefonts.tex,
%% zhfandolfonts.tex,
%% zhfounderfonts.tex,
@@ -1297,6 +1309,6 @@
%% zhwindowsfonts.tex,
%% translator-theorem-dictionary-ChineseGBK.dict,
%% translator-theorem-dictionary-ChineseUTF8.dict, and
-%% README.
+%% README.md.
%%
%% End of file `ctexart.cls'.