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/ctex-report.def | |
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/ctex-report.def')
-rw-r--r-- | Master/texmf-dist/tex/latex/ctex/ctex-report.def | 45 |
1 files changed, 36 insertions, 9 deletions
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 |