diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-14 22:03:09 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-14 22:03:09 +0000 |
commit | 1ffd29c330984928904e5f95a4033d334fba974b (patch) | |
tree | da2c8a81497119292b01e00a76fb78727f65da93 /Master/texmf-dist/tex/latex/ctex | |
parent | 1bafd95e83267f9e55b47de90fa004d4db84971d (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')
44 files changed, 1069 insertions, 253 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 0e85f95f53c..f10c59afe12 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 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> $ {Caption with encoding GBK (CTEX)} \ProvidesExplFile{ctex-name-gbk.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set_known: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 1e5784b9c58..ee0c4412323 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 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> $ {Caption with encoding UTF8 (CTEX)} \ProvidesExplFile{ctex-name-utf8.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set_known: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 20b7d31209b..49e63f873fc 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 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> $ {Configuration file (CTEX)} \ProvidesExplFile{\ExplFileName.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.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 6c50c294638..e4222855db1 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 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> $ {Option configuration file (CTEX)} \ProvidesExplFile{ctexopts.cfg} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.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 3c17fbd5c77..1d4880b4c6f 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 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> $ {Heading modification for article (CTEX)} \ProvidesExplFile{ctex-article.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \seq_new:N \c__ctex_section_headings_seq \seq_gset_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } @@ -117,13 +117,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 } } diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def index c672d635ad3..30b4977388d 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/ctex-beamer.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Heading modification for beamer (CTEX)} \ProvidesExplFile{ctex-beamer.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \seq_new:N \c__ctex_headings_seq \seq_gset_from_clist:Nn \c__ctex_headings_seq { part , section , subsection } @@ -112,13 +112,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 } } + } \ExplSyntaxOff \defbeamertemplate*{part page}{CTEX}[1][]{ \begingroup diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-book.def b/Master/texmf-dist/tex/latex/ctex/ctex-book.def index dc31743dd8a..17546e00669 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 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> $ {Heading modification for book (CTEX)} \ProvidesExplFile{ctex-book.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \seq_new:N \c__ctex_section_headings_seq \seq_gset_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } @@ -118,21 +118,36 @@ { \tl_clear:c { CTEX@post#1 } } { \tl_set:cn { CTEX@post#1 } {#3} } } +\group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , + chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , } \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 } } +\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip + { + \par + \ifdim \pagegoal = \maxdimen + \advance \@tempskipa -\topskip + \advance \@tempskipa -\parskip + \nointerlineskip + \fi + } \renewcommand\part{% \if@openright \cleardoublepage @@ -146,7 +161,11 @@ \else \@tempswafalse \fi - \null\vskip \glueexpr \CTEX@part@beforeskip \relax + \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax + \ifodd \CTEX@part@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -225,7 +244,11 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -242,7 +265,11 @@ \vskip \glueexpr \CTEX@chapter@afterskip \relax }} \def\@makeschapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M diff --git a/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo b/Master/texmf-dist/tex/latex/ctex/ctex-c5size.clo index 2a7a4279063..23492c2aacf 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 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> $ {c5size option (CTEX)} \ProvidesExplFile{ctex-c5size.clo} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.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 f9446a3cabf..56d5956435e 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 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> $ {cs4size option (CTEX)} \ProvidesExplFile{ctex-cs4size.clo} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.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 4dbec90572f..e923e6cba86 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 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> $ {Heading modification for report (CTEX)} \ProvidesExplFile{ctex-report.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \seq_new:N \c__ctex_section_headings_seq \seq_gset_from_clist:Nn \c__ctex_section_headings_seq { section , subsection , subsubsection , paragraph , subparagraph } @@ -118,21 +118,36 @@ { \tl_clear:c { CTEX@post#1 } } { \tl_set:cn { CTEX@post#1 } {#3} } } +\group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , + chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , } \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 } } +\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip + { + \par + \ifdim \pagegoal = \maxdimen + \advance \@tempskipa -\topskip + \advance \@tempskipa -\parskip + \nointerlineskip + \fi + } \renewcommand\part{% \if@openright \cleardoublepage @@ -146,7 +161,11 @@ \else \@tempswafalse \fi - \null\vskip \glueexpr \CTEX@part@beforeskip \relax + \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax + \ifodd \CTEX@part@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -221,7 +240,11 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -236,7 +259,11 @@ \vskip \glueexpr \CTEX@chapter@afterskip \relax }} \def\@makeschapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M diff --git a/Master/texmf-dist/tex/latex/ctex/ctex.sty b/Master/texmf-dist/tex/latex/ctex/ctex.sty index 66bed8e069d..632b12b04f1 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctex.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctex.sty @@ -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 in LaTeX (CTEX)} \ProvidesExplPackage{\ExplFileName} - {\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 } } \msg_new:nnnn { ctex } { subpackage-loaded } @@ -56,15 +56,17 @@ } \@ifpackagelater { expl3 } { 2015/12/20 } { } { \msg_error:nnn { ctex } { l3-too-old } { expl3 } } +\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 @@ -155,7 +157,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 } , @@ -523,15 +525,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 } @@ -823,6 +827,7 @@ %% ctexbook.cls, %% ctexrep.cls, %% ctexbeamer.cls, +%% ctxdoc.cls, %% ctexcap.sty, %% ctexhook.sty, %% ctexpatch.sty, @@ -849,6 +854,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, @@ -868,6 +874,7 @@ %% ctexpunct.spa, %% ctexmakespa.tex, %% ctexspamacro.tex, +%% ctxdocstrip.tex, %% zhadobefonts.tex, %% zhfandolfonts.tex, %% zhfounderfonts.tex, @@ -875,6 +882,6 @@ %% zhwindowsfonts.tex, %% translator-theorem-dictionary-ChineseGBK.dict, %% translator-theorem-dictionary-ChineseUTF8.dict, and -%% README. +%% README.md. %% %% End of file `ctex.sty'. 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'. diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls index d4a46d9237f..44da38a86d4 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexbeamer.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexbeamer.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 beamer (CTEX)} \ProvidesExplClass{ctexbeamer} - {\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 @@ -149,7 +151,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 } , @@ -527,15 +529,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 } @@ -662,13 +666,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 } } + } \ExplSyntaxOff \defbeamertemplate*{part page}{CTEX}[1][]{ \begingroup @@ -942,6 +951,7 @@ %% ctexbook.cls, %% ctexrep.cls, %% ctexbeamer.cls, +%% ctxdoc.cls, %% ctexcap.sty, %% ctexhook.sty, %% ctexpatch.sty, @@ -968,6 +978,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, @@ -987,6 +998,7 @@ %% ctexpunct.spa, %% ctexmakespa.tex, %% ctexspamacro.tex, +%% ctxdocstrip.tex, %% zhadobefonts.tex, %% zhfandolfonts.tex, %% zhfounderfonts.tex, @@ -994,6 +1006,6 @@ %% zhwindowsfonts.tex, %% translator-theorem-dictionary-ChineseGBK.dict, %% translator-theorem-dictionary-ChineseUTF8.dict, and -%% README. +%% README.md. %% %% End of file `ctexbeamer.cls'. diff --git a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls b/Master/texmf-dist/tex/latex/ctex/ctexbook.cls index 19394a51ba8..0944499835d 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexbook.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexbook.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 book (CTEX)} \ProvidesExplClass{ctexbook} - {\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 } @@ -672,21 +676,36 @@ { \tl_clear:c { CTEX@post#1 } } { \tl_set:cn { CTEX@post#1 } {#3} } } +\group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , + chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , } \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 } } +\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip + { + \par + \ifdim \pagegoal = \maxdimen + \advance \@tempskipa -\topskip + \advance \@tempskipa -\parskip + \nointerlineskip + \fi + } \renewcommand\part{% \if@openright \cleardoublepage @@ -700,7 +719,11 @@ \else \@tempswafalse \fi - \null\vskip \glueexpr \CTEX@part@beforeskip \relax + \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax + \ifodd \CTEX@part@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -779,7 +802,11 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -796,7 +823,11 @@ \vskip \glueexpr \CTEX@chapter@afterskip \relax }} \def\@makeschapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M @@ -1327,6 +1358,7 @@ %% ctexbook.cls, %% ctexrep.cls, %% ctexbeamer.cls, +%% ctxdoc.cls, %% ctexcap.sty, %% ctexhook.sty, %% ctexpatch.sty, @@ -1353,6 +1385,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, @@ -1372,6 +1405,7 @@ %% ctexpunct.spa, %% ctexmakespa.tex, %% ctexspamacro.tex, +%% ctxdocstrip.tex, %% zhadobefonts.tex, %% zhfandolfonts.tex, %% zhfounderfonts.tex, @@ -1379,6 +1413,6 @@ %% zhwindowsfonts.tex, %% translator-theorem-dictionary-ChineseGBK.dict, %% translator-theorem-dictionary-ChineseUTF8.dict, and -%% README. +%% README.md. %% %% End of file `ctexbook.cls'. diff --git a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty index d92cd9bd155..6538a076f39 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexcap.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexcap.sty @@ -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 in LaTeX (CTEX)} \ProvidesExplPackage{ctexcap} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \clist_new:N \l__ctex_ctexcap_options_clist \clist_set:Nx \l__ctex_ctexcap_options_clist { \exp_not:v { opt@ \@currname . \@currext } , heading } diff --git a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty index 9e4e58a3886..e2e2478d76b 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexheading.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexheading.sty @@ -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> $ {Heading style modification (CTEX)} \ProvidesExplPackage{ctexheading} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \RequirePackage { xparse , l3keys2e } \RequirePackage { ctexhook , ctexpatch } \tl_new:N \l__ctex_tmp_tl @@ -123,6 +123,7 @@ %% ctexbook.cls, %% ctexrep.cls, %% ctexbeamer.cls, +%% ctxdoc.cls, %% ctexcap.sty, %% ctexhook.sty, %% ctexpatch.sty, @@ -149,6 +150,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, @@ -168,6 +170,7 @@ %% ctexpunct.spa, %% ctexmakespa.tex, %% ctexspamacro.tex, +%% ctxdocstrip.tex, %% zhadobefonts.tex, %% zhfandolfonts.tex, %% zhfounderfonts.tex, @@ -175,6 +178,6 @@ %% zhwindowsfonts.tex, %% translator-theorem-dictionary-ChineseGBK.dict, %% translator-theorem-dictionary-ChineseUTF8.dict, and -%% README. +%% README.md. %% %% End of file `ctexheading.sty'. diff --git a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty index 025e4870b9d..beb15349715 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexhook.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexhook.sty @@ -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> $ {Document and package hooks (CTEX)} \ProvidesExplPackage{ctexhook} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \cs_new_protected:Npn \ctex_at_end_preamble:n #1 { \tl_gput_right:Nn \g__ctex_end_preamble_hook_tl {#1} } \cs_new_protected:Npn \ctex_after_end_preamble:n #1 diff --git a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty index 95c811fb41c..03bbb06dec0 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexpatch.sty @@ -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> $ {Patching commands (CTEX)} \ProvidesExplPackage{ctexpatch} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \cs_if_exist:NF \str_new:N { \RequirePackage { l3str } } \cs_new_protected:Npn \ctex_patch_cmd_once:NnnnTF #1#2 { @@ -153,18 +153,17 @@ \ctex_get_macro_meaning:N ##1 { TF } { \exp_after:wN \__ctex_get_macro_meaning:w - \token_to_meaning:N ##1 \q_mark #1 -> \q_no_value \q_mark \q_stop + \token_to_meaning:N ##1 \q_mark #1 -> \q_mark \q_stop } \cs_new_protected:Npn \__ctex_get_macro_meaning:w ##1 #1 ##2 -> ##3 \q_mark ##4 \q_stop { - \tl_set:Nn \l__ctex_replacement_tl {##3} - \quark_if_no_value:NTF \l__ctex_replacement_tl + \tl_if_empty:nTF { ##4 } { \prg_return_false: } { - \str_set:Nn \l__ctex_prefix_str {##1} - \str_set:Nn \l__ctex_parameter_str {##2} - \str_set:Nn \l__ctex_replacement_str {##3} + \str_set:Nn \l__ctex_prefix_str { ##1 } + \str_set:Nn \l__ctex_parameter_str { ##2 } + \str_set:Nn \l__ctex_replacement_str { ##3 } \prg_return_true: } } @@ -197,7 +196,7 @@ { \str_if_empty:NTF #2 { \tl_clear:N #1 } - { \tl_set_rescan:Nnx #1 {#3} {#2} } + { \tl_set_rescan:Nno #1 {#3} {#2} } } \tl_new:N \l__ctex_prefix_tl \tl_new:N \l__ctex_parameter_tl @@ -232,24 +231,25 @@ \ctex_get_macro_meaning:NTF #1 { \str_if_empty:NTF \l__ctex_parameter_str - { \__ctex_hookto_cmd_parameterless:Nnnw #1 {#2} {#4} } - { \__ctex_hookto_cmd_parameter:Nnnnw #1 {#2} {#3} {#4} } + { \__ctex_hookto_cmd_parameterless:Nnnnw } + { \__ctex_hookto_cmd_parameter:Nnnnw } + #1 {#2} {#3} {#4} } { \__ctex_patch_false:w } } -\cs_new_protected:Npn \__ctex_hookto_cmd_parameterless:Nnnw #1#2#3 +\cs_new_protected:Npn \__ctex_hookto_cmd_parameterless:Nnnnw #1#2#3#4 { \str_if_empty:NF \l__ctex_prefix_str - { \tl_rescan:nx { } { \l__ctex_prefix_str } } + { \tl_rescan:no {#3} { \l__ctex_prefix_str } } \tex_edef:D #1 { \use:c { __ctex_ #2 _hook_aux:nn } { \exp_not:o {#1} } - { \exp_not:n {#3} } + { \exp_not:n {#4} } } \__ctex_patch_true:w } -\cs_generate_variant:Nn \tl_rescan:nn { nx } +\cs_generate_variant:Nn \tl_rescan:nn { no } \cs_new:Npn \__ctex_left_hook_aux:nn #1#2 { #2#1 } \cs_new_eq:NN \__ctex_right_hook_aux:nn \use:nn \cs_new_protected:Npn \__ctex_hookto_cmd_parameter:Nnnnw #1#2#3#4 diff --git a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls b/Master/texmf-dist/tex/latex/ctex/ctexrep.cls index a9efa9be97e..6ed88664664 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexrep.cls +++ b/Master/texmf-dist/tex/latex/ctex/ctexrep.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 report (CTEX)} \ProvidesExplClass{ctexrep} - {\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 } @@ -672,21 +676,36 @@ { \tl_clear:c { CTEX@post#1 } } { \tl_set:cn { CTEX@post#1 } {#3} } } +\group_begin: \tl_set:Nn \l__ctex_tmp_tl { - part / pagestyle .tl_set:N = \CTEX@part@pagestyle , - chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / pagestyle .tl_set:N = \CTEX@part@pagestyle , + chapter / pagestyle .tl_set:N = \CTEX@chapter@pagestyle , + part / fixbeforeskip .bool_set:N = \CTEX@part@fixbeforeskip , + chapter / fixbeforeskip .bool_set:N = \CTEX@chapter@fixbeforeskip , } \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 } } +\cs_new_protected_nopar:Npn \CTEX@fixbeforeskip + { + \par + \ifdim \pagegoal = \maxdimen + \advance \@tempskipa -\topskip + \advance \@tempskipa -\parskip + \nointerlineskip + \fi + } \renewcommand\part{% \if@openright \cleardoublepage @@ -700,7 +719,11 @@ \else \@tempswafalse \fi - \null\vskip \glueexpr \CTEX@part@beforeskip \relax + \@tempskipa = \glueexpr \CTEX@part@beforeskip \relax + \ifodd \CTEX@part@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% \secdef\@part\@spart} \def\@part[#1]#2{% \ifnum \c@secnumdepth >-2\relax @@ -775,7 +798,11 @@ \@afterheading \fi} \def\@makechapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \ifnum \c@secnumdepth >\m@ne @@ -790,7 +817,11 @@ \vskip \glueexpr \CTEX@chapter@afterskip \relax }} \def\@makeschapterhead#1{% - \vspace*{\glueexpr\CTEX@chapter@beforeskip\relax}% + \@tempskipa = \glueexpr \CTEX@chapter@beforeskip \relax + \ifodd \CTEX@chapter@fixbeforeskip + \CTEX@fixbeforeskip + \fi + \vspace*{\@tempskipa}% {\normalfont \parindent \dimexpr \CTEX@chapter@indent \relax \CTEX@chapter@format \interlinepenalty\@M @@ -1321,6 +1352,7 @@ %% ctexbook.cls, %% ctexrep.cls, %% ctexbeamer.cls, +%% ctxdoc.cls, %% ctexcap.sty, %% ctexhook.sty, %% ctexpatch.sty, @@ -1347,6 +1379,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, @@ -1366,6 +1399,7 @@ %% ctexpunct.spa, %% ctexmakespa.tex, %% ctexspamacro.tex, +%% ctxdocstrip.tex, %% zhadobefonts.tex, %% zhfandolfonts.tex, %% zhfounderfonts.tex, @@ -1373,6 +1407,6 @@ %% zhwindowsfonts.tex, %% translator-theorem-dictionary-ChineseGBK.dict, %% translator-theorem-dictionary-ChineseUTF8.dict, and -%% README. +%% README.md. %% %% End of file `ctexrep.cls'. diff --git a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty index 2af9ea66a98..591d9c623ea 100644 --- a/Master/texmf-dist/tex/latex/ctex/ctexsize.sty +++ b/Master/texmf-dist/tex/latex/ctex/ctexsize.sty @@ -28,16 +28,16 @@ %% \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 font size definition (CTEX)} \ProvidesExplPackage{ctexsize} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \RequirePackage { xparse , l3keys2e } \cs_new_eq:NN \g__ctex_font_size_flag \c_minus_one \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 } , @@ -168,6 +168,7 @@ %% ctexbook.cls, %% ctexrep.cls, %% ctexbeamer.cls, +%% ctxdoc.cls, %% ctexcap.sty, %% ctexhook.sty, %% ctexpatch.sty, @@ -194,6 +195,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, @@ -213,6 +215,7 @@ %% ctexpunct.spa, %% ctexmakespa.tex, %% ctexspamacro.tex, +%% ctxdocstrip.tex, %% zhadobefonts.tex, %% zhfandolfonts.tex, %% zhfounderfonts.tex, @@ -220,6 +223,6 @@ %% zhwindowsfonts.tex, %% translator-theorem-dictionary-ChineseGBK.dict, %% translator-theorem-dictionary-ChineseUTF8.dict, and -%% README. +%% README.md. %% %% End of file `ctexsize.sty'. diff --git a/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls new file mode 100644 index 00000000000..5f7839a3a36 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ctex/ctxdoc.cls @@ -0,0 +1,360 @@ +%% +%% This is file `ctxdoc.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ctex.dtx (with options: `ctxdoc') +%% +%% Copyright (C) 2003--2016 +%% 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 f745b21 2016-05-14 12:17:18 +0800 Qing Lee <sobenlee@gmail.com> $ + {ctex documentation (CTEX)} +\ProvidesExplClass{ctxdoc} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} +\ExplSyntaxOff +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{l3doc}} +\PassOptionsToClass{a4paper,full}{l3doc} +\ProcessOptions +\@namedef{ver@thumbpdf.sty}{9999/99/99} +\LoadClass{l3doc} +\RequirePackage[UTF8, punct = kaiming, heading, fontset = none, + linespread = 1.2, sub3section]{ctex} +\ifxetex + \xeCJKsetup{AutoFakeBold=false} +\fi +\ctexset{ + fontset, + abstractname = 简介, + indexname = 代码索引, + section = { + format = \Large\bfseries\raggedright, + name = {第,节}, + }, +} +\RequirePackage[toc]{multitoc} +\RequirePackage{geometry} +\RequirePackage{tabularx} +\RequirePackage{makecell} +\RequirePackage{threeparttable} +\RequirePackage{siunitx} +\RequirePackage{unicode-math} +\RequirePackage{xcolor} +\RequirePackage{caption} +\RequirePackage{fvrb-ex} +\geometry{includemp,hmargin={0mm,15mm},vmargin={25mm,15mm},footskip=7mm} +\hypersetup{pdfstartview=FitH,bookmarksdepth=subparagraph} +\setcounter{secnumdepth}{4} +\setcounter{tocdepth}{2} +\newcommand*\email{\nolinkurl} +\setmainfont{TeX Gyre Pagella} +\setsansfont{TeX Gyre Heros} +\setmonofont[ + UprightFont=* Light, BoldFont=* Bold, + SlantedFont=* Light Oblique]{CMU Typewriter Text} +\setmathfont{texgyrepagella-math.otf} +\captionsetup{strut=off, labelsep=quad, labelfont+=bf} +%% <--- http://tex.stackexchange.com/a/40896 +\patchcmd{\@addtocurcol}% + {\vskip \intextsep}% + {\edef\save@first@penalty{\the\lastpenalty}\unpenalty + \ifnum \lastpenalty = \@M % hopefully the OR penalty + \unpenalty + \else + \penalty \save@first@penalty \relax % put it back + \fi + \ifnum\outputpenalty <-\@Mii + \addvspace\intextsep + \vskip\parskip + \else + \addvspace\intextsep + \fi}% + {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}} +\patchcmd{\@addtocurcol}% + {\vskip\intextsep \ifnum\outputpenalty <-\@Mii \vskip -\parskip\fi}% + {\ifnum\outputpenalty <-\@Mii + \aftergroup\vskip\aftergroup\intextsep + \aftergroup\nointerlineskip + \else + \vskip\intextsep + \fi}% + {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}} +\patchcmd{\@getpen}{\@M}{\@Mi} + {\typeout{*** SUCCESS ***}}{\typeout{*** FAIL ***}} +%% ---> +%% 不对代码实现的 \section 以下标题编目录。 +\AtBeginEnvironment{implementation}{% + \ifnum\value{tocdepth}>\@ne + \addtocontents{toc}{\protect\value{tocdepth}=1\relax}% + \fi} +\ifxetex + \let\ctexdocverbaddon\xeCJKVerbAddon + \def\ctexdisableecglue{\xeCJKsetup{CJKecglue}} + \def\ctexplainps{\xeCJKsetup{PunctStyle=plain}} + \appto\meta@font@select{\ifinner\ctexdisableecglue\fi} +\else + \let\ctexdocverbaddon\relax + \let\ctexplainps\relax + \def\ctexdisableecglue{\ltjsetparameter{autoxspacing=false}} + \appto\meta@font@select{\ctexdisableecglue} +\fi +\setlist{noitemsep,topsep=\smallskipamount} +\setlist[1]{labelindent=\parindent} +\setlist[enumerate]{leftmargin=*} +\setlist[itemize]{leftmargin=*} +\newlist{optdesc}{description}{3} +%% 设置间距为 \marginparsep,与 l3doc 一致 +\setlist[optdesc]{% + font=\mdseries\small\ttfamily,align=right,listparindent=\parindent, + labelsep=\marginparsep,labelindent=-\marginparsep,leftmargin=*} +%% 重新定义 threeparttable 包的 tablenotes 环境 +\renewlist{tablenotes}{description}{1} +\setlist[tablenotes]{% + format=\normalfont\tnote@item,align=right,listparindent=\parindent, + labelindent=\tabcolsep,leftmargin=*,rightmargin=\tabcolsep, + after=\@noparlisttrue} +\AtBeginEnvironment{tablenotes}{% + \setlength\parindent{2\ccwd}% + \normalfont\footnotesize} +\AtBeginEnvironment{threeparttable}{% + \stepcounter{tpt@id}% + \edef\curr@tpt@id{tpt@\arabic{tpt@id}}} +\newcounter{tpt@id} +\def\tnote@item#1{% + \Hy@raisedlink{\hyper@anchor{\curr@tpt@id-#1}}#1} +\def\TPTtagStyle#1{\hyperlink{\curr@tpt@id-#1}{#1}} +\fvset{ + fontsize=\small,baselinestretch=1,numbersep=5pt, + formatcom=\ctexdocverbaddon, + listparameters=\setlength\topsep{\MacrocodeTopsep}} +\DefineVerbatimEnvironment{frameverb}{Verbatim}{% + gobble=4, + frame=single,framesep=8pt, + listparameters= + \setlength\topsep{\medskipamount}% + \appto\FV@EndList{\nointerlineskip}} +\DefineVerbatimEnvironment{ctexexam}{Verbatim}{% + gobble=4, + frame=single,framesep=10pt, + label=\rule{0pt}{12pt}\textnormal{\bfseries 例 \arabic{ctexexam}}, + listparameters= + \setlength\topsep{\bigskipamount}% + \refstepcounter{ctexexam}\ctexexamlabelref + \appto\FV@EndList{\nointerlineskip}} +\define@key{FV}{labelref}{\def\ctexexamlabelref{\label{#1}}} +\let\ctexexamlabelref\empty +\newcounter{ctexexam} +\BeforeBeginEnvironment{function}{\par\nointerlineskip} +\AtEndEnvironment{function}{% + \par\xdef\ctexfixprevdepth{\prevdepth=\the\prevdepth\space}% + \ctexfixdescrcoffinyoffset} +%% l3doc 会在 function 环境的 syntax 和 descr 盒子中间加上 \medskipamount 的距离。 +%% 但是若 syntax 盒子为空(未使用 syntax 环境),就会显得不好看。 +%% 此时我们通过将 \medskipamount 设置为零来修正。 +\def\ctexfixdescrcoffinyoffset{% + \aftergroup\aftergroup\aftergroup\ctexzeromedskipamount} +\def\ctexzeromedskipamount{\setlength\medskipamount{\z@skip}} +\AfterEndEnvironment{syntax}{\let\ctexfixdescrcoffinyoffset\relax} +\AfterEndEnvironment{function}{\ctexfixprevdepth} +\AtBeginEnvironment{syntax}{\linespread{1}\ctexplainps\ctexdisableecglue} +\BeforeBeginEnvironment{SideBySideExample}{\par\addvspace{\medskipamount}} +\preto\MacroFont{\linespread{1}} +\appto\MacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon} +\preto\AltMacroFont{\linespread{1}} +\appto\AltMacroFont{\hyphenchar\font\m@ne\ctexdocverbaddon} +\def\Module#1{\mbox{% + \color{purple}\footnotesize\normalfont\sffamily\textlangle#1\textrangle}} +\newcommand*\exptarget{\Hy@raisedlink{\hypertarget{expstar}{}}} +\newcommand*\rexptarget{\Hy@raisedlink{\hypertarget{rexpstar}{}}} +\newcommand*\expstar{\hyperlink{expstar}{$\star$}} +\newcommand*\rexpstar{\hyperlink{rexpstar}{\ding{73}}} +\ExplSyntaxOn +%% l3doc 会设置列表环境中 \listparindent=\z@,我们在这里恢复它。 +\cs_set_eq:NN \list \__codedoc_oldlist:nn +\cs_new_nopar:Npn \zihaopt #1 + { + \exp_last_unbraced:Nf \tl_head:w + { \prop_item:Nn \c__ctex_font_size_prop {#1} } { } \q_stop + } +%% 用 \vtop 让函数名字和语法盒子首行对齐 +\patchcmd \__codedoc_syntax:w + { { minipage } { \l__codedoc_syntax_dim } } + { { minipage } [t] { \l__codedoc_syntax_dim } } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +%% 左侧边注的函数列表采用单倍行距 +\cs_set_protected_nopar:Npx \__codedoc_typeset_names: + { + \exp_not:N \linespread { 1 } + \exp_not:o { \__codedoc_typeset_names: } + } +\patchcmd \__codedoc_macro_typeset_one:n + { \vbox_unpack_clear:N } + { \linespread { 1 } \selectfont \vbox_unpack_clear:N } + { \iow_term:n { *** ~ SUCCESS ~ *** } } + { \iow_term:n { *** ~ FAIL ~ *** } } +%% 不重复使用 \HD@target,避免索引出现重复页码 +\cs_set_protected:Npn \__codedoc_special_index_aux:nnnnn #1#2#3#4#5 + { + \__codedoc_special_index_set:Nn \l__codedoc_index_escaped_macro_tl {#2} + \str_if_eq:onTF { \@currenvir } { macrocode } + { \codeline@wrindex } + { + \HD@target + \index + } + { + \tl_if_empty:nF { #3 #4 } + { #3 \actualchar #4 \levelchar } + #1 + \actualchar + { + \token_to_str:N \verbatim@font \c_space_tl + \l__codedoc_index_escaped_macro_tl + } + \encapchar + hdclindex{\the\c@HD@hypercount}{#5} + } + } +\DeclareDocumentCommand \cs { O{} m } + { \__codedoc_cmd_aux:no {#1} { \c__codedoc_backslash_tl #2 } } +\DeclareDocumentCommand \tn { O{} m } + { + \__codedoc_cmd_aux:no + { index = TeX , replace = false , #1 } + { \c__codedoc_backslash_tl #2 } + } +\DeclareDocumentCommand \meta { +m } + { \__codedoc_meta_aux:n {#1} } +\DeclareExpandableDocumentCommand \bookmarkcstn { O{} m } + { \textbackslash \tl_to_str:n {#2} } +\cs_new:Npn \bookmarkmeta #1 { < \tl_to_str:n {#1} > } +\cs_generate_variant:Nn \__codedoc_cmd_aux:nn { no } +\AtBeginEnvironment { syntax } + { + \char_set_catcode_active:N \| + \char_set_active_eq:NN \| \orbar + \char_set_catcode_active:N \( + \char_set_active_eq:NN \( \defaultvalaux + } +%% 不对目录中出现的 \cs 和 \tn 等编索引 +\DeclareDocumentCommand \StopSpecialIndexModule { } + { \cs_set_eq:NN \__codedoc_special_index_module:nnnn \use_none:nnnn } +\tl_map_inline:nn { \actualchar \encapchar \levelchar } + { \exp_args:Nx \DoNotIndex { \bslash \tl_to_str:N #1 } } +\DeclareDocumentCommand \package { o m } + { + \exp_args:Nx \href + { + http \c_colon_str //www.ctan.org/pkg/ + \IfNoValueTF {#1} { \str_fold_case:n {#2} } {#1} + } + { \pkg {#2} } + } +\DeclareDocumentCommand \GetFileId { m } + { + \GetFileInfo {#1} + \ior_open:NnTF \g_ctxdoc_ior { \c_sys_jobname_str .id } + { + \ior_get:NN \g_ctxdoc_ior \l_tmpa_tl + \ior_close:N \g_ctxdoc_ior + \exp_after:wN \GetIdInfo \l_tmpa_tl + } + { \GetIdInfo $Id$ } + { \fileinfo } + } +\iow_new:N \g_ctxdoc_ior +\ExplSyntaxOff +\AtBeginDocument{\addtocontents{toc}{\StopSpecialIndexModule}} +\pdfstringdefDisableCommands{% + \let\cs\bookmarkcstn + \let\tn\bookmarkcstn + \let\meta\bookmarkmeta + \let\path\meta + \let\opt\@firstofone} +\preto\@thehead{\cslet{MakeUppercase\space}{\@iden}} +\def\orbar{\textup{\textbar}} +\def\defaultval#1{\textbf{\textup{#1}}} +\def\defaultvalaux#1){\defaultval{#1}} +\def\TF{true\orbar false} +\def\TTF{\defaultval{true}\orbar false} +\def\TFF{true\orbar\defaultval{false}} +\protected\def\opt{\texttt} +\def\pdfTeX{\hologo{pdfTeX}} +\def\XeTeX{\hologo{XeTeX}} +\def\XeLaTeX{\hologo{XeLaTeX}} +\def\LuaLaTeX{\hologo{LuaLaTeX}} +\def\pdfLaTeX{\hologo{pdfLaTeX}} +\def\LaTeX{\hologo{LaTeX}} +\def\LaTeXe{\hologo{LaTeX2e}} +\def\LaTeXiii{\hologo{LaTeX3}} +\def\dvipdfmx{DVIPDFM\textit{x}} +\def\TeX{\hologo{TeX}} +\def\ApTeX{Ap\TeX} +\def\ApLaTeX{Ap\LaTeX} +\def\upTeX{up\TeX} +\def\upLaTeX{up\LaTeX} +\def\bashcmd{\texttt} +\def\TeXLive{\TeX\ Live} +\def\MiKTeX{\hologo{MiKTeX}} +\def\BSTACK{\begin{tabular}[t]{@{}l@{}}} +\def\ESTACK{\end{tabular}} +\newenvironment{defaultcapconfig}{% + \MakePercentComment + \input{ctex-name-utf8.cfg}% + \ExplSyntaxOff + \MakePercentIgnore}{} +\def\ctexkit{\href{https://github.com/CTeX-org/ctex-kit/}{\texttt{ctex-kit}}} +\def\ctexkitrev#1{% + \href{https://github.com/CTeX-org/ctex-kit/commit/#1}{\texttt{ctex-kit} rev. #1}} +\patchcmd\theCodelineNo{\sffamily\tiny}{\normalfont\sffamily\tiny}{}{} +\appto\GlossaryParms{% + \def\@idxitem{\par\hangindent 2em }% + \def\subitem{\@idxitem\hspace*{1em}}% + \def\subsubitem{\@idxitem\hspace*{2em}}} +\patchcmd\l@section{2.5em}{1.5em}{}{} +\patchcmd\l@subsection{2.5em}{1.5em}{}{} +\patchcmd\changes@{\space}{\lbrack}{}{} +\patchcmd\@wrglossary{hdpindex}{% + \ifnum\c@HD@hypercount=\z@ + hdpindex% + \else + hdclindex{\the\c@HD@hypercount}\fi}{}{} +\def\glossaryname{版本历史} +\GlossaryPrologue{\section{\glossaryname}} +\IndexPrologue{% + \section{\indexname} + \textit{意大利体的数字表示描述对应索引项的页码; + 带下划线的数字表示定义对应索引项的代码行号; + 罗马字体的数字表示使用对应索引项的代码行号。}} +\def\IndexLayout{% + \newgeometry{hmargin=15mm,vmargin={25mm,15mm},footskip=7mm}% + \setlength\IndexMin{.5\textheight}% + \ctexset{section/numbering=false}% + \StopSpecialIndexModule} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +%% +%% +%% End of file `ctxdoc.cls'. diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def new file mode 100644 index 00000000000..44b50915e3b --- /dev/null +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-aptex.def @@ -0,0 +1,246 @@ +%% +%% This is file `ctex-engine-aptex.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ctex.dtx (with options: `aptex') +%% +%% Copyright (C) 2003--2016 +%% 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. +%% +%% ------------------------------------------------------------------------------ +%% +\GetIdInfo$Id: ctex.dtx f745b21 2016-05-14 12:17:18 +0800 Qing Lee <sobenlee@gmail.com> $ + {Asian pTeX adapter (CTEX)} +\ProvidesExplFile{ctex-engine-aptex.def} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} +\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 + { + \AtBeginDvi { #1 } + \ctex_at_end_package:nn { atbegshi } + { \AtBeginShipoutFirst { #1 } } + } +\@onlypreamble \ctex_set_zhmap:n +\tl_set:Nn \CJKrmdefault { rm } +\tl_set:Nn \CJKsfdefault { sf } +\tl_set:Nn \CJKttdefault { tt } +\tl_set:Nn \CJKfamilydefault { \CJKrmdefault } +\tl_put_left:Nn \rmfamily { \kanjifamily { \CJKrmdefault } } +\tl_put_left:Nn \sffamily { \kanjifamily { \CJKsfdefault } } +\tl_put_left:Nn \ttfamily { \kanjifamily { \CJKttdefault } } +\NewDocumentCommand \CJKfamily { m } + { + \kanjifamily { #1 } + \selectfont + } +\tl_set:Nn \kanjifamilydefault { \CJKfamilydefault } +\ctex_at_end_preamble:n { \ctex_update_default_family: } +\ctex_patch_cmd:Nnn \em + { \mcfamily \upshape \else \gtfamily \itshape } + { \eminnershape \else \itshape } +\cs_new_protected_nopar:Npn \ctex_set_upfamily:nnn #1 #2 #3 + { + \DeclareKanjiFamily{JY2}{#1}{} + \DeclareKanjiFamily{JT2}{#1}{} + \DeclareFontShape{JY2}{#1}{m}{n}{<->~ #2-h}{} + \DeclareFontShape{JT2}{#1}{m}{n}{<->~ #2-v}{} + \tl_if_empty:nF { #3 } + { + \DeclareFontShape{JY2}{#1}{bx}{n}{<->~ #3-h}{} + \DeclareFontShape{JT2}{#1}{bx}{n}{<->~ #3-v}{} + } + } +\@onlypreamble \ctex_set_upfamily:nnn +\cs_new_protected_nopar:Npn \ctex_set_upmap:nnn #1 #2 #3 + { + \ctex_set_zhmap:n + { + \special{ pdf:mapline~ #1-h~ UniGB-UTF16-H~ #2 } + \special{ pdf:mapline~ #1-v~ UniGB-UTF16-V~ #2 } + \tl_if_empty:nF { #3 } + { + \special{ pdf:mapline~ #1b-h~ UniGB-UTF16-H~ #3 } + \special{ pdf:mapline~ #1b-v~ UniGB-UTF16-V~ #3 } + } + } + } +\@onlypreamble \ctex_set_upmap:nnn +\cs_new_protected_nopar:Npn \ctex_set_upfonts:nnnnnn #1 #2 #3 #4 #5 #6 + { + \ctex_set_upmap:nnn { upserif } { #1 } { #2 } + \ctex_set_upmap:nnn { upserifit } { #3 } {} + \ctex_set_upmap:nnn { upsans } { #4 } { #5 } + \ctex_set_upmap:nnn { upmono } { #6 } {} + } +\@onlypreamble \ctex_set_upfonts:nnnnnn +\cs_set_nopar:Npn \@EverySelectfont@Init + { + \ctex_patch_cmd:Nnn \selectfont + { \enc@update } + { + \@EverySelectfont@EveryHook + \@EverySelectfont@AtNextHook + \gdef \@EverySelectfont@AtNextHook { } + \enc@update + } + \@ifpackageloaded { tracefnt } + { + \EverySelectfont + { + \ifnum \tracingfonts > \tw@ + \@font@info { Switching~ to~ \font@name } + \fi + } + } + { } + \let \@EverySelectfont@Init \undefined + } +\cs_new_protected_nopar:Npn \ctex_update_default_family: + { + \tl_if_eq:NNT \CJKfamilydefault \l__ctex_family_default_init_tl + { + \group_begin: + \cs_set_eq:NN \__ctex_family_default_wrap:n \exp_not:n + \tl_gset:Nx \CJKfamilydefault + { + \str_case:onF { \familydefault } + { + { \rmdefault } { \exp_not:N \CJKrmdefault } + { \sfdefault } { \exp_not:N \CJKsfdefault } + { \ttdefault } { \exp_not:N \CJKttdefault } + } + { \CJKfamilydefault } + } + \group_end: + } + } +\tl_new:N \l__ctex_family_default_init_tl +\cs_new_eq:NN \__ctex_family_default_wrap:n \use:n +\tl_set:Nx \l__ctex_family_default_init_tl + { + \exp_not:N \__ctex_family_default_wrap:n + { \exp_not:o { \CJKfamilydefault } } + } +\tl_gset_eq:NN \CJKfamilydefault \l__ctex_family_default_init_tl +\cs_new_protected_nopar:Npn \ctex_detected_platform: + { + \tl_gset:Nx \g__ctex_fontset_tl + { + \str_case:onF { \ngostype } + { + { Win32 } { windows } + { Win64 } { windows } + { Darwin } { mac } + } + { fandol } + } + } +\ctex_hypersetup:n { driverfallback = dvipdfmx } +\ctex_at_end_package:nn { hyperref } + { + \AtBeginShipoutFirst{ \special{ pdf:tounicode~ UTF8-UTF16 } } + } +\msg_new:nnn { ctex } { fntef-not-available } + { Functions~ of~ `CJKfntef'~ is~ not~ available~ in~ ApLaTeX. } +\msg_warning:nn { ctex } { fntef-not-available } +\clist_map_inline:nn + { underdot , underline , underdblline , underwave , sout , xout } + { \cs_new_eq:cN { CTEX#1 } \use:n } +\cs_new_eq:NN \CTEXfilltwosides \use_none:n +\cs_new_eq:NN \endCTEXfilltwosides \prg_do_nothing: +\cs_new_protected_nopar:Npn \ctex_update_ccwd: + { \skip_set:Nn \ccwd { 1zw + \ptex_kanjiskip:D } } +\dim_new:N \ccwd +\cs_new_protected_nopar:Npn \ctex_update_ccglue: + { \skip_set_eq:NN \ptex_kanjiskip:D \l__ctex_ccglue_skip } +\skip_new:N \l__ctex_ccglue_skip +\prg_new_conditional:Npnn \ctex_if_ccglue_touched: { TF } + { + \skip_if_eq:nnTF { \l__ctex_ccglue_skip } { \ptex_kanjiskip:D } + { \prg_return_false: } { \prg_return_true: } + } +\cs_new_protected_nopar:Npn \ctex_update_em_unit: + { \dim_set:Nn \ccwd { 1zw } } +\cs_new_protected:Npn \ctex_add_to_selectfont:n #1 + { + \cs_set_protected_nopar:Npx \CTEX@selectfont@hook + { \exp_not:o { \CTEX@selectfont@hook #1 } } + } +\cs_new_eq:NN \CTEX@selectfont@hook \prg_do_nothing: +\cs_new_eq:Nc \__ctex_save_selectfont: { selectfont ~ } +\ctex_preto_cmd:NnnTF \selectfont { \ExplSyntaxOff } + { \CTEX@selectfont@hook } + { + \tl_put_left:Nn \@EverySelectfont@Init + { \cs_set_eq:cN { selectfont ~ } \__ctex_save_selectfont: } + } + { \ctex_patch_failure:N \selectfont } +\EverySelectfont { \CTEX@selectfont@hook } +\cs_new_protected_nopar:Npn \ctex_update_xkanjiskip: + { + \skip_if_eq:nnT + { \ptex_xkanjiskip:D } { \l__ctex_xkanjiskip_skip } + { + \skip_set:Nn \l__ctex_xkanjiskip_skip { \l__ctex_xkanjiskip_tl } + \skip_set_eq:NN \ptex_xkanjiskip:D \l__ctex_xkanjiskip_skip + } + } +\tl_new:N \l__ctex_xkanjiskip_tl +\tl_set:Nn \l__ctex_xkanjiskip_tl + { .25zw plus 1pt minus 1pt } +\skip_new:N \l__ctex_xkanjiskip_skip +\skip_set:Nn \l__ctex_xkanjiskip_skip + { \ptex_xkanjiskip:D } +\ctex_add_to_selectfont:n { \ctex_update_xkanjiskip: } +\keys_define:nn { ctex } + { + space .code:n = + { \msg_warning:nn { ctex } { invalid-option } } + } +\keys_define:nn { ctex } + { + punct .code:n = + { + \tl_set:Nx \l__ctex_punct_tl { #1 } + \msg_warning:nn { ctex } { invalid-option } + } , + punct .default:n = { quanjiao } , + } +\tl_set:Nn \l__ctex_encoding_tl { UTF8 } +\DeclareKanjiFamily{JY2}{rm}{} +\DeclareKanjiFamily{JY2}{sf}{} +\DeclareKanjiFamily{JY2}{tt}{} +\DeclareKanjiFamily{JT2}{rm}{} +\DeclareKanjiFamily{JT2}{sf}{} +\DeclareKanjiFamily{JT2}{tt}{} +\DeclareFontShape{JY2}{rm}{m}{n}{<-> upzhserif-h}{} +\DeclareFontShape{JY2}{rm}{m}{it}{<-> upzhserifit-h}{} +\DeclareFontShape{JY2}{rm}{bx}{n}{<-> upzhserifb-h}{} +\DeclareFontShape{JT2}{rm}{m}{n}{<-> upzhserif-v}{} +\DeclareFontShape{JT2}{rm}{m}{it}{<-> upzhserifit-v}{} +\DeclareFontShape{JT2}{rm}{bx}{n}{<-> upzhserifb-v}{} +\DeclareFontShape{JY2}{sf}{m}{n}{<-> upzhsans-h}{} +\DeclareFontShape{JY2}{sf}{bx}{n}{<-> upzhsansb-h}{} +\DeclareFontShape{JT2}{sf}{m}{n}{<-> upzhsans-v}{} +\DeclareFontShape{JT2}{sf}{bx}{n}{<-> upzhsansb-v}{} +\DeclareFontShape{JY2}{tt}{m}{n}{<-> upzhmono-h}{} +\DeclareFontShape{JT2}{tt}{m}{n}{<-> upzhmono-v}{} +%% +%% +%% End of file `ctex-engine-aptex.def'. 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 bb0cfb50ea5..665914d7d9e 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 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> $ {LuaLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-luatex.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \msg_new:nnn { ctex } { luatexja-loaded } { Package~`luatexja'~can~not~be~loaded~before~`ctex'.\\ @@ -968,17 +968,6 @@ } \seq_put_right:No \l__ctex_ltj_alternate_seq { \l__ctex_ltj_tmp_tl } } -\cs_new_protected_nopar:Npn \ctex_ltj_update_xkanjiskip: - { - \skip_if_eq:nnT - { \ltjgetparameter { xkanjiskip } } { \l__ctex_ltj_xkanjiskip_skip } - { - \skip_set:Nn \l__ctex_ltj_xkanjiskip_skip { .25 \zw plus 1pt minus 1pt } - \ltjsetxkanjiskip \l__ctex_ltj_xkanjiskip_skip - } - } -\skip_new:N \l__ctex_ltj_xkanjiskip_skip -\skip_set:Nn \l__ctex_ltj_xkanjiskip_skip { .25 \zw plus 1pt minus 1pt } \AtBeginDocument { \ctex_appto_cmd:NnnTF \verbatim@font @@ -1075,10 +1064,25 @@ { \ctex_ltj_select_font: \ctex_ltj_select_alternate_font: - \ctex_ltj_update_xkanjiskip: } \tl_set:Nn \CJK@family { song } \selectfont \tl_clear:N \CJK@family +\cs_new_protected_nopar:Npn \ctex_update_xkanjiskip: + { + \skip_if_eq:nnT + { \ltjgetparameter { xkanjiskip } } { \l__ctex_xkanjiskip_skip } + { + \skip_set:Nn \l__ctex_xkanjiskip_skip { \l__ctex_xkanjiskip_tl } + \ltjsetxkanjiskip \l__ctex_xkanjiskip_skip + } + } +\tl_new:N \l__ctex_xkanjiskip_tl +\tl_set:Nn \l__ctex_xkanjiskip_tl + { .25\zw plus 1pt minus 1pt } +\skip_new:N \l__ctex_xkanjiskip_skip +\skip_set:Nn \l__ctex_xkanjiskip_skip + { \ltjgetparameter { xkanjiskip } } +\ctex_add_to_selectfont:n { \ctex_update_xkanjiskip: } \keys_define:nn { ctex } { space .code:n = 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 617423d572e..976b01b9c4b 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,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {(pdf)LaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-pdftex.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi { #1 } diff --git a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def index a65526b2deb..581fd65f11b 100644 --- a/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def +++ b/Master/texmf-dist/tex/latex/ctex/engine/ctex-engine-uptex.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {upTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-uptex.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1 { \AtBeginDvi { #1 } @@ -50,6 +50,7 @@ \selectfont } \tl_set:Nn \kanjifamilydefault { \CJKfamilydefault } +\ctex_at_end_preamble:n { \ctex_update_default_family: } \ctex_patch_cmd:Nnn \em { \mcfamily \upshape \else \gtfamily \itshape } { \eminnershape \else \itshape } @@ -101,15 +102,42 @@ \@ifpackageloaded { tracefnt } { \EverySelectfont - { - \ifnum \tracingfonts > \tw@ - \@font@info { Switching~ to~ \font@name } - \fi - } + { + \ifnum \tracingfonts > \tw@ + \@font@info { Switching~ to~ \font@name } + \fi + } } { } \let \@EverySelectfont@Init \undefined } +\cs_new_protected_nopar:Npn \ctex_update_default_family: + { + \tl_if_eq:NNT \CJKfamilydefault \l__ctex_family_default_init_tl + { + \group_begin: + \cs_set_eq:NN \__ctex_family_default_wrap:n \exp_not:n + \tl_gset:Nx \CJKfamilydefault + { + \str_case:onF { \familydefault } + { + { \rmdefault } { \exp_not:N \CJKrmdefault } + { \sfdefault } { \exp_not:N \CJKsfdefault } + { \ttdefault } { \exp_not:N \CJKttdefault } + } + { \CJKfamilydefault } + } + \group_end: + } + } +\tl_new:N \l__ctex_family_default_init_tl +\cs_new_eq:NN \__ctex_family_default_wrap:n \use:n +\tl_set:Nx \l__ctex_family_default_init_tl + { + \exp_not:N \__ctex_family_default_wrap:n + { \exp_not:o { \CJKfamilydefault } } + } +\tl_gset_eq:NN \CJKfamilydefault \l__ctex_family_default_init_tl \cs_new_protected_nopar:Npn \ctex_detected_platform: { \file_if_exist:nTF { /dev/null } @@ -133,25 +161,28 @@ { \tl_gset:Nn \g__ctex_fontset_tl {#2} } } \str_const:Nn \c__ctex_macosx_file_str { /Library/Fonts/Songti.ttc } -\PassOptionsToPackage { dvipdfmx } { hyperref } +\ctex_hypersetup:n { driverfallback = dvipdfmx } \ctex_at_end_package:nn { hyperref } { \AtBeginShipoutFirst{ \special{ pdf:tounicode~ UTF8-UTF16 } } } +\msg_new:nnn { ctex } { fntef-not-available } + { Functions~ of~ `CJKfntef'~ is~ not~ available~ in~ upLaTeX. } +\msg_warning:nn { ctex } { fntef-not-available } \clist_map_inline:nn { underdot , underline , underdblline , underwave , sout , xout } { \cs_new_eq:cN { CTEX#1 } \use:n } \cs_new_eq:NN \CTEXfilltwosides \use_none:n \cs_new_eq:NN \endCTEXfilltwosides \prg_do_nothing: \cs_new_protected_nopar:Npn \ctex_update_ccwd: - { \skip_set:Nn \ccwd { 1zw } } + { \skip_set:Nn \ccwd { 1zw + \ptex_kanjiskip:D } } \dim_new:N \ccwd \cs_new_protected_nopar:Npn \ctex_update_ccglue: - { \kanjiskip \l__ctex_ccglue_skip } + { \skip_set_eq:NN \ptex_kanjiskip:D \l__ctex_ccglue_skip } \skip_new:N \l__ctex_ccglue_skip \prg_new_conditional:Npnn \ctex_if_ccglue_touched: { TF } { - \skip_if_eq:nnTF { \l__ctex_ccglue_skip } { \kanjiskip } + \skip_if_eq:nnTF { \l__ctex_ccglue_skip } { \ptex_kanjiskip:D } { \prg_return_false: } { \prg_return_true: } } \cs_new_protected_nopar:Npn \ctex_update_em_unit: @@ -171,6 +202,22 @@ } { \ctex_patch_failure:N \selectfont } \EverySelectfont { \CTEX@selectfont@hook } +\cs_new_protected_nopar:Npn \ctex_update_xkanjiskip: + { + \skip_if_eq:nnT + { \ptex_xkanjiskip:D } { \l__ctex_xkanjiskip_skip } + { + \skip_set:Nn \l__ctex_xkanjiskip_skip { \l__ctex_xkanjiskip_tl } + \skip_set_eq:NN \ptex_xkanjiskip:D \l__ctex_xkanjiskip_skip + } + } +\tl_new:N \l__ctex_xkanjiskip_tl +\tl_set:Nn \l__ctex_xkanjiskip_tl + { .25zw plus 1pt minus 1pt } +\skip_new:N \l__ctex_xkanjiskip_skip +\skip_set:Nn \l__ctex_xkanjiskip_skip + { \ptex_xkanjiskip:D } +\ctex_add_to_selectfont:n { \ctex_update_xkanjiskip: } \keys_define:nn { ctex } { space .code:n = 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 7feeba4bec6..216baf15a94 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 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> $ {XeLaTeX adapter (CTEX)} \ProvidesExplFile{ctex-engine-xetex.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \RequirePackage { xeCJK } \exp_args:Nx \xeCJKsetup { 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 ba3011e1c30..756039dc8b3 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 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> $ {Adobe fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-adobe.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \sys_if_output_pdf: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 bc41f538eeb..3112c89066c 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 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> $ {Fandol fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-fandol.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \sys_if_output_pdf: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 d8fedd1c174..0639c128723 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 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> $ {Founder fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-founder.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \sys_if_engine_pdftex: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 e064e258d0f..2bffc2b54e7 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 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> $ {Mac OS X fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-mac.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \sys_if_engine_pdftex: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 f48c6c85408..afd068fdef2 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 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> $ {Ubuntu fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-ubuntu.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \sys_if_engine_pdftex:TF { \ctex_zhmap_case:nnn 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 20505f507e8..14d2e7abc15 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,11 +26,11 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Windows fonts definition (CTEX)} \ProvidesExplFile{ctex-fontset-windows.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} -\file_if_exist:nTF { C:/boot.ini } + {\ExplFileDate}{2.4.1}{\ExplFileDescription} +\file_if_exist:nTF { C:/bootfont.bin } { \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 0419b85047b..a2f66355bed 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,16 +26,16 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Windows fonts definition for Vista or later version (CTEX)} \ProvidesExplFile{ctex-fontset-windowsnew.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} -\tl_new:N \l__ctex_msyh_suffix -\tl_set:Nn \l__ctex_msyh_suffix { .ttc } + {\ExplFileDate}{2.4.1}{\ExplFileDescription} +\tl_new:N \l__ctex_msyh_suffix_tl +\tl_set:Nn \l__ctex_msyh_suffix_tl { .ttc } \file_if_exist:nF { C:/Windows/Fonts/msyh.ttc } { \file_if_exist:nF { msyh.ttc } - { \tl_set:Nn \l__ctex_msyh_suffix { .ttf } } + { \tl_set:Nn \l__ctex_msyh_suffix_tl { .ttf } } } \sys_if_engine_pdftex:TF { @@ -44,9 +44,9 @@ \ctex_punct_set:n { windows } \setCJKmainfont [ BoldFont = simhei.ttf , ItalicFont = simkai.ttf ] { simsun.ttc } - \setCJKsansfont [ BoldFont = msyhbd\l__ctex_msyh_suffix ] { msyh\l__ctex_msyh_suffix } + \setCJKsansfont [ BoldFont = msyhbd\l__ctex_msyh_suffix_tl ] { msyh\l__ctex_msyh_suffix_tl } \setCJKfamilyfont { zhyahei } - [ BoldFont = msyhbd\l__ctex_msyh_suffix ] { msyh\l__ctex_msyh_suffix } + [ BoldFont = msyhbd\l__ctex_msyh_suffix_tl ] { msyh\l__ctex_msyh_suffix_tl } \ctex_punct_map_family:nn { \CJKsfdefault } { zhyahei } \ctex_punct_map_bfseries:nn { \CJKsfdefault , zhyahei } { zhyaheib } \setCJKmonofont { simfang.ttf } @@ -79,7 +79,7 @@ { \ctex_set_upfonts:nnnnnn {simsun.ttc} {simhei.ttf} {simkai.ttf} - {msyh\l__ctex_msyh_suffix} {msyhbd\l__ctex_msyh_suffix} + {msyh\l__ctex_msyh_suffix_tl} {msyhbd\l__ctex_msyh_suffix_tl} {simfang.ttf} \ctex_set_upfamily:nnn { zhsong } { upzhserif } {} \ctex_set_upfamily:nnn { zhhei } { upzhserifb } {} 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 5ba0b77c9ae..dc44c9df1e8 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 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> $ {Windows fonts definition for XP or earlier version (CTEX)} \ProvidesExplFile{ctex-fontset-windowsold.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \sys_if_engine_pdftex: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 74052f63371..96793e2e0a1 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,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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 scheme for article (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-article.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , @@ -127,16 +127,16 @@ \keys_set:nn { ctex / appendix } { number = \@Alph \c@section } \pagestyle { headings } +\keys_set:nn { ctex } { today = small } +\ctex_if_autoindent_touched:F + { \keys_set:nn { ctex } { autoindent = true } } \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 } } -\keys_set:nn { ctex } { today = small } \int_compare:nNnF \g__ctex_font_size_flag > \c_minus_one { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } \fp_compare:nNnT { \l__ctex_line_spread_fp } ? { \c_zero_fp } - { \keys_set:nn { ctex / option } { linespread = 1.3 } } -\ctex_if_autoindent_touched:F - { \keys_set:nn { ctex } { autoindent = true } } + { \fp_set:Nn \l__ctex_line_spread_fp { 1.3 } } \ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } \ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } \ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd } diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def index a2c5108e1e3..dc5ea1af9c5 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-chinese-beamer.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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 scheme for beamer (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-beamer.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , @@ -60,6 +60,9 @@ titleformat = \usebeamerfont { subsection ~ title } , aftertitle = \par } +\keys_set:nn { ctex } { today = small } +\ctex_if_autoindent_touched:F + { \keys_set:nn { ctex } { autoindent = true } } \str_if_eq:onTF { \l__ctex_encoding_tl } { GBK } { \uselanguage { ChineseGBK } @@ -72,13 +75,6 @@ \ctex_file_input:n { ctex-name-utf8.cfg } } \clist_put_left:Nn \trans@languagepath { chinese } -\keys_set:nn { ctex } { today = small } -\int_compare:nNnF \g__ctex_font_size_flag > \c_minus_one - { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } -\fp_compare:nNnT { \l__ctex_line_spread_fp } ? { \c_zero_fp } - { \keys_set:nn { ctex / option } { linespread = 1.3 } } -\ctex_if_autoindent_touched:F - { \keys_set:nn { ctex } { autoindent = true } } %% %% %% End of file `ctex-scheme-chinese-beamer.def'. 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 4bd8d9c9fd1..1875794792e 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,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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 scheme for book (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-book.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , @@ -141,16 +141,16 @@ number = \@Alph \c@chapter } \pagestyle { headings } +\keys_set:nn { ctex } { today = small } +\ctex_if_autoindent_touched:F + { \keys_set:nn { ctex } { autoindent = true } } \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 } } -\keys_set:nn { ctex } { today = small } \int_compare:nNnF \g__ctex_font_size_flag > \c_minus_one { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } \fp_compare:nNnT { \l__ctex_line_spread_fp } ? { \c_zero_fp } - { \keys_set:nn { ctex / option } { linespread = 1.3 } } -\ctex_if_autoindent_touched:F - { \keys_set:nn { ctex } { autoindent = true } } + { \fp_set:Nn \l__ctex_line_spread_fp { 1.3 } } \ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } \ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } \ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd } 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 d825a37678e..9f372276648 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,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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 scheme for report (CTEX)} \ProvidesExplFile{ctex-scheme-chinese-report.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , @@ -141,16 +141,16 @@ number = \@Alph \c@chapter } \pagestyle { headings } +\keys_set:nn { ctex } { today = small } +\ctex_if_autoindent_touched:F + { \keys_set:nn { ctex } { autoindent = true } } \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 } } -\keys_set:nn { ctex } { today = small } \int_compare:nNnF \g__ctex_font_size_flag > \c_minus_one { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } \fp_compare:nNnT { \l__ctex_line_spread_fp } ? { \c_zero_fp } - { \keys_set:nn { ctex / option } { linespread = 1.3 } } -\ctex_if_autoindent_touched:F - { \keys_set:nn { ctex } { autoindent = true } } + { \fp_set:Nn \l__ctex_line_spread_fp { 1.3 } } \ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } \ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } \ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd } 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 d2ef35d84c6..b82dbebda32 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,46 +26,40 @@ %% %% ------------------------------------------------------------------------------ %% -\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 scheme for generic (CTEX)} \ProvidesExplFile{ctex-scheme-chinese.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} -\tl_if_exist:NTF \c__ctex_std_class_tl + {\ExplFileDate}{2.4.1}{\ExplFileDescription} +\keys_set:nn { ctex } { today = small } +\ctex_if_autoindent_touched:F + { \keys_set:nn { ctex } { autoindent = true } } +\tl_set:Nn \l__ctex_tmp_tl { beamer } +\tl_if_eq:NNTF \c__ctex_std_class_tl \l__ctex_tmp_tl { - \str_if_eq:onTF { \c__ctex_std_class_tl } { beamer } + \str_if_eq:onTF { \l__ctex_encoding_tl } { GBK } { - \str_if_eq:onTF { \l__ctex_encoding_tl } { GBK } - { - \uselanguage { ChineseGBK } - \languagealias { chinese } { ChineseGBK } - \ctex_file_input:n { ctex-name-gbk.cfg } - } - { - \uselanguage { ChineseUTF8 } - \languagealias { chinese } { ChineseUTF8 } - \ctex_file_input:n { ctex-name-utf8.cfg } - } - \clist_put_left:Nn \trans@languagepath { chinese } + \uselanguage { ChineseGBK } + \languagealias { chinese } { ChineseGBK } + \ctex_file_input:n { ctex-name-gbk.cfg } } { - \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 } } - \RequirePackage { indentfirst } + \uselanguage { ChineseUTF8 } + \languagealias { chinese } { ChineseUTF8 } + \ctex_file_input:n { ctex-name-utf8.cfg } } + \clist_put_left:Nn \trans@languagepath { chinese } } { \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 } } + \int_compare:nNnF \g__ctex_font_size_flag > \c_minus_one + { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } + \fp_compare:nNnT { \l__ctex_line_spread_fp } ? { \c_zero_fp } + { \fp_set:Nn \l__ctex_line_spread_fp { 1.3 } } + \tl_if_exist:NT \c__ctex_std_class_tl + { \RequirePackage { indentfirst } } } -\keys_set:nn { ctex } { today = small } -\int_compare:nNnF \g__ctex_font_size_flag > \c_minus_one - { \cs_gset_eq:NN \g__ctex_font_size_flag \c_zero } -\fp_compare:nNnT { \l__ctex_line_spread_fp } ? { \c_zero_fp } - { \keys_set:nn { ctex / option } { linespread = 1.3 } } -\ctex_if_autoindent_touched:F - { \keys_set:nn { ctex } { autoindent = true } } %% %% %% 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 ab11b96b27a..efdc2209d03 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,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Plain scheme for article (CTEX)} \ProvidesExplFile{ctex-scheme-plain-article.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , diff --git a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def index 796c4b81aac..19beb27cb20 100644 --- a/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def +++ b/Master/texmf-dist/tex/latex/ctex/scheme/ctex-scheme-plain-beamer.def @@ -26,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Plain scheme for beamer (CTEX)} \ProvidesExplFile{ctex-scheme-plain-beamer.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , 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 8903bebe106..19b8fa165f5 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,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Plain scheme for book (CTEX)} \ProvidesExplFile{ctex-scheme-plain-book.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , 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 846177eaa15..380b3ea7c1a 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,10 +26,10 @@ %% %% ------------------------------------------------------------------------------ %% -\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> $ {Plain scheme for report (CTEX)} \ProvidesExplFile{ctex-scheme-plain-report.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} \keys_set:nn { ctex / part } { aftertitle = \par , 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 1823e0390e3..bdf82e589ce 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 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> $ {Plain scheme for generic (CTEX)} \ProvidesExplFile{ctex-scheme-plain.def} - {\ExplFileDate}{2.4}{\ExplFileDescription} + {\ExplFileDate}{2.4.1}{\ExplFileDescription} %% %% %% End of file `ctex-scheme-plain.def'. |