diff options
author | Karl Berry <karl@freefriends.org> | 2019-04-03 21:40:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-04-03 21:40:04 +0000 |
commit | ae02217f0c90b2ddb0efad2ac4c97b3f882f9b31 (patch) | |
tree | 13f81c9bb61c0581543739773b23e480a4b7d92b /Master/texmf-dist/tex/latex | |
parent | bce969eb32e058340df851f61c345ca0bd3e7a46 (diff) |
fduthesis (3apr19)
git-svn-id: svn://tug.org/texlive/trunk@50738 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls | 215 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls | 254 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fduthesis/fduthesis.def | 18 |
5 files changed, 243 insertions, 248 deletions
diff --git a/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls b/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls index b4dabb4142b..84a51a436a0 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls +++ b/Master/texmf-dist/tex/latex/fduthesis/fdudoc.cls @@ -46,7 +46,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo $Id: fduthesis.dtx 0.7c 2019-03-17 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.7d 2019-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Documentation class for fduthesis} \ProvidesExplClass{fdudoc} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty b/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty index 5039052727b..3d8d6d1aef9 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty +++ b/Master/texmf-dist/tex/latex/fduthesis/fdulogo.sty @@ -46,7 +46,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo $Id: fduthesis.dtx 0.7c 2019-03-17 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.7d 2019-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Fudan University's Visual Identity} \ProvidesExplPackage{fdulogo} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} diff --git a/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls b/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls index 3e73df81e4e..c2b6c2b66ff 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls +++ b/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls @@ -45,7 +45,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo $Id: fduthesis.dtx 0.7c 2019-03-17 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.7d 2019-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Thesis template for Fudan University (English version)} \ProvidesExplClass{\ExplFileName-en} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -512,7 +512,7 @@ } \cs_new_protected:Npn \__fdu_load_font: { - \use:c { __fdu_load_font_ \tl_use:N \g__fdu_font_set_tl : } + \use:c { __fdu_load_font_ \g__fdu_font_set_tl : } } \ctex_at_end_preamble:n { \__fdu_load_font: } \keys_set:nn { unicode-math } @@ -539,6 +539,34 @@ \RenewDocumentCommand \Huge { } { \zihao { 1 } } } } +\fancyhf { } +\tl_new:N \l__fdu_header_center_mark_tl +\bool_if:NTF \g__fdu_twoside_bool + { + \fancyhead [ EL ] { \small \nouppercase { \itshape \leftmark } } + \fancyhead [ OR ] { \small \nouppercase { \itshape \rightmark } } + } + { + \fancyhead [ L ] { \small \nouppercase { \itshape \leftmark } } + \fancyhead [ R ] { \small \nouppercase { \itshape \rightmark } } + \fancyhead [ C ] + { + \small \nouppercase + { \itshape \l__fdu_header_center_mark_tl } + } + } +\fancyfoot [ C ] { \small \thepage } +\RenewDocumentCommand \cleardoublepage { } + { + \clearpage + \bool_if:NT \g__fdu_twoside_bool + { + \int_if_odd:nF \c@page + { \hbox:n { } \thispagestyle { empty } \newpage } + } + \tl_gset:Nn \l__fdu_header_center_mark_tl { } + } +\pagestyle { fancy } \keys_set:nn { ctex } { chapter = @@ -567,24 +595,23 @@ fixskip = true } } -\fancyhf { } -\tl_new:N \l__fdu_header_center_mark_tl -\bool_if:NTF \g__fdu_twoside_bool +\cs_new_protected:Npn \__fdu_chapter:n #1 { - \fancyhead [ EL ] { \small \nouppercase { \itshape \leftmark } } - \fancyhead [ OR ] { \small \nouppercase { \itshape \rightmark } } + \group_begin: + \ctexset { chapter / numbering = false } + \chapter {#1} + \__fdu_chapter_header:n {#1} + \group_end: } +\cs_generate_variant:Nn \__fdu_chapter:n { V } +\cs_new_protected:Npn \__fdu_chapter_no_toc:n #1 { - \fancyhead [ L ] { \small \nouppercase { \itshape \leftmark } } - \fancyhead [ R ] { \small \nouppercase { \itshape \rightmark } } - \fancyhead [ C ] - { - \small \nouppercase - { \itshape \l__fdu_header_center_mark_tl } - } + \chapter * {#1} + \__fdu_chapter_header:n {#1} + \pdfbookmark [0] {#1} { toc } } -\fancyfoot [ C ] { \small \thepage } -\cs_new:Npn \fdu_front_matter_header:n #1 +\cs_generate_variant:Nn \__fdu_chapter_no_toc:n { V } +\cs_new_protected:Npn \__fdu_chapter_header:n #1 { \bool_if:NTF \g__fdu_twoside_bool { \markboth {#1} {#1} } @@ -593,17 +620,6 @@ \tl_gset:Nn \l__fdu_header_center_mark_tl {#1} } } -\RenewDocumentCommand \cleardoublepage { } - { - \clearpage - \bool_if:NT \g__fdu_twoside_bool - { - \int_if_odd:nF \c@page - { \hbox:n { } \thispagestyle { empty } \newpage } - } - \tl_gset:Nn \l__fdu_header_center_mark_tl { } - } -\pagestyle { fancy } \clist_map_inline:nn { { plain } { plain }, @@ -957,7 +973,7 @@ \cs_new:Npn \__fdu_cover_id_aux:n #1 { \tl_use:c { c__fdu_name_ #1 _tl } - \c__fdu_fullwidth_colon_tl + \c__fdu_fwid_colon_tl \tl_use:c { l__fdu_info_ #1 _tl } } \cs_new_protected:Npn \__fdu_cover_logo: @@ -988,10 +1004,10 @@ { \int_compare:nT { \g__fdu_thesis_type_int != 3 } { - \c__fdu_fullwidth_left_paren_tl + \c__fdu_fwid_left_paren_tl \clist_item:Nn \c__fdu_degree_type_clist { \l__fdu_info_degree_type_int } - \c__fdu_fullwidth_right_paren_tl + \c__fdu_fwid_right_paren_tl } } \cs_new_protected:Npn \__fdu_cover_info: @@ -1021,7 +1037,7 @@ \clist_pop:NN \l__fdu_tmpa_clist \l__fdu_tmpa_tl \clist_pop:NN \l__fdu_tmpb_clist \l__fdu_tmpb_tl \__fdu_spread_box:nn { 6 em } { \l__fdu_tmpa_tl } - \c__fdu_fullwidth_colon_tl + \c__fdu_fwid_colon_tl \__fdu_center_box:Vn \l__fdu_tmpb_dim { \l__fdu_tmpb_tl } \skip_vertical:n { 1 ex } } @@ -1031,7 +1047,7 @@ { \clist_map_inline:Nn #1 { - ##1 \c__fdu_fullwidth_colon_tl + ##1 \c__fdu_fwid_colon_tl \__fdu_blank_underline:n { 6 em } \__fdu_quad: } @@ -1182,8 +1198,7 @@ } \DeclareInstance { fdu / cover } { cover-i-default } { cover-i } { - format = - \__fdu_line_spread:N \c__fdu_line_spread_fp, + format = \__fdu_line_spread:N \c__fdu_line_spread_fp, bottom-skip = 0 pt plus 1.5 fill, id / content = \__fdu_cover_id:, logo / content = \__fdu_cover_logo:, @@ -1199,9 +1214,8 @@ id / format = \zihao { -5 }, type / format = \zihao { 2 }, degree / format = \zihao { 4 }, - title / format = \zihao { -2 } \sffamily, - title-en / format = - \__fdu_line_spread:n { 1.2 } \zihao { 4 } \bfseries, + title / format = \zihao { -2 } \bfseries, + title-en / format = \__fdu_line_spread:n { 1.2 } \zihao { 4 } \bfseries, id / bottom-skip = 0 pt plus 1.6 fill, logo / bottom-skip = 0 pt plus 0.3 fill, type / bottom-skip = -18 pt, @@ -1217,8 +1231,7 @@ } \DeclareInstance { fdu / cover } { cover-ii-default } { cover-ii } { - format = - \__fdu_line_spread:N \c__fdu_line_spread_fp, + format = \__fdu_line_spread:N \c__fdu_line_spread_fp, title / content = \__fdu_spread_box:nn { 7 em } { \c__fdu_name_instructors_tl }, name-list / content = @@ -1273,14 +1286,12 @@ } \AtEndDocument { \bool_if:NT \l__fdu_auto_make_cover_bool { \makecoveriii } } -\tl_const:Nn \__fdu_chapter_toc_format: { \normalfont \sffamily } -\tl_const:Nn \__fdu_chapter_toc_en_format: { \bfseries } \keys_set:nn { ctex } { contentsname = \c__fdu_name_toc_en_tl, chapter / tocline = { - \__fdu_chapter_toc_en_format: + \bfseries \CTEXnumberline {#1} #2 }, section / tocline = @@ -1299,10 +1310,7 @@ \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% } - { - \chapter* { \contentsname } - \fdu_front_matter_header:n { \c__fdu_name_toc_en_tl } - } + { \__fdu_chapter_no_toc:V \contentsname } \__fdu_patch_cmd:Nnn \@starttoc { \begingroup } { @@ -1312,31 +1320,33 @@ \NewDocumentEnvironment { abstract } { } { \__fdu_abstract_en_begin: } { \__fdu_abstract_en_end: } \cs_new_protected:Npn \__fdu_abstract_en_begin: + { \__fdu_chapter:V \c__fdu_name_abstract_en_tl } +\cs_new_protected:Npn \__fdu_abstract_en_end: { - \chapter* { \c__fdu_name_abstract_en_tl } - \fdu_front_matter_header:n { \c__fdu_name_abstract_en_tl } - \addcontentsline { toc } { chapter } - { - \__fdu_chapter_toc_en_format: - \c__fdu_name_abstract_en_tl - } + \__fdu_keywords:nNn + { \bfseries \c__fdu_name_keywords_en_tl \__fdu_quad: } + \l__fdu_info_keywords_en_clist { ; ~ } + \__fdu_clc:nn + { \bfseries \c__fdu_name_clc_en_tl \__fdu_quad: } + { \l__fdu_info_clc_tl } } -\cs_new_protected:Npn \__fdu_abstract_en_end: +\cs_new_protected:Npn \__fdu_keywords:nNn #1#2#3 { - \__fdu_keywords_par: - \textbf { \c__fdu_name_keywords_en_tl } \__fdu_quad: - \clist_use:Nn \l__fdu_info_keywords_en_clist { \__fdu_quad: } - \__fdu_clc_par: - \textbf { \c__fdu_name_clc_en_tl } \__fdu_quad: - \l__fdu_info_clc_tl + \par \mode_leave_vertical: \par \noindent + \__fdu_get_text_width:Nn \l__fdu_tmpa_dim {#1} + \group_begin: #1 \group_end: + \parbox [t] { \dim_eval:n { \textwidth - \l__fdu_tmpa_dim } } + { + \clist_use:Nn #2 {#3} \par + \cs_gset:Npx \__fdu_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D } + } } -\cs_new:Npn \__fdu_keywords_par: +\cs_new_protected:Npn \__fdu_clc:nn #1#2 { - \par \mode_leave_vertical: \par - \noindent \hangindent = 4 em \hangafter = 1 + \par \tex_prevdepth:D \__fdu_keywords_prevdepth: \noindent + \group_begin: #1 \group_end: + #2 } -\cs_new:Npn \__fdu_clc_par: - { \par \noindent } \NewDocumentEnvironment { notation } { O { l p { 7.5 cm } } } { \__fdu_notation_begin: @@ -1350,19 +1360,13 @@ } \cs_new_protected:Npn \__fdu_notation_begin: { - \chapter* { \c__fdu_name_notation_en_tl } - \fdu_front_matter_header:n { \c__fdu_name_notation_en_tl } - \addcontentsline { toc } { chapter } - { - \__fdu_chapter_toc_en_format: - \c__fdu_name_notation_en_tl - } + \__fdu_chapter:V \c__fdu_name_notation_en_tl } \cs_new_protected:Npn \__fdu_notation_long_table_setup: { - \tl_set:Nn \arraystretch { 1.3 } - \dim_set_eq:NN \LTpre \c_zero_dim - \dim_set_eq:NN \LTpost \c_zero_dim + \tl_set:Nn \arraystretch { 1.3 } + \dim_set_eq:NN \LTpre \c_zero_dim + \dim_set_eq:NN \LTpost \c_zero_dim } \bool_new:N \l__fdu_bibtex_bool \tl_new:N \l__fdu_bib_style_tl @@ -1407,26 +1411,14 @@ { \RequirePackage [ sort & compress ] { natbib } \__fdu_bibtex_setup: - \NewDocumentCommand \printbibliography { o } - { - \exp_args:NV \bibliography \l__fdu_bib_resource_tl - \IfValueT {#1} - { \__fdu_warning:nn { invalid-option-in-bibtex } {#1} } - } } { - \__fdu_biblatex_setup: - \RequirePackage [ backend = biber, hyperref = manual, natbib ] - { biblatex } - \exp_args:NV \addbibresource \l__fdu_bib_resource_tl - \__fdu_biblatex_allow_url_break: - \exp_args:Nnx \DefineBibliographyStrings { english } - { bibliography = { \c__fdu_name_bib_en_tl } } + \__fdu_biblatex_pre_setup: + \RequirePackage { biblatex } + \__fdu_biblatex_post_setup: } } -\__fdu_msg_new:nn { invalid-option-in-bibtex } - { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } -\cs_new:Npn \__fdu_bibtex_setup: +\cs_new_protected:Npn \__fdu_bibtex_setup: { \tl_if_empty:NTF \l__fdu_bib_style_tl { @@ -1445,26 +1437,42 @@ } } { \exp_args:NV \bibliographystyle \l__fdu_bib_style_tl } + \cs_set:Npn \bibsection { \__fdu_chapter:V \bibname } + \NewDocumentCommand \printbibliography { o } + { + \exp_args:NV \bibliography \l__fdu_bib_resource_tl + \IfValueT {##1} + { \__fdu_warning:nn { invalid-option-in-bibtex } {##1} } + } } -\cs_new:Npn \__fdu_biblatex_setup: +\__fdu_msg_new:nn { invalid-option-in-bibtex } + { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } +\cs_new_protected:Npn \__fdu_biblatex_pre_setup: { \tl_if_empty:NTF \l__fdu_bib_style_tl { \tl_if_eq:VnTF \l__fdu_bib_gb_style_tl { numerical } - { \PassOptionsToPackage { style = gb7714-2015 } } + { \__fdu_pass_options_to_biblatex:n { style = gb7714-2015 } } { \tl_if_eq:VnT \l__fdu_bib_gb_style_tl { author-year } - { \PassOptionsToPackage { style = gb7714-2015ay } } + { \__fdu_pass_options_to_biblatex:n { style = gb7714-2015ay } } } } - { \PassOptionsToPackage { style = \l__fdu_bib_style_tl } } - { biblatex } + { \__fdu_pass_options_to_biblatex:n { style = \l__fdu_bib_style_tl } } \tl_if_empty:NF \l__fdu_cite_style_tl - { - \PassOptionsToPackage { citestyle = \l__fdu_bib_style_tl } - { biblatex } - } + { \__fdu_pass_options_to_biblatex:n { citestyle = \l__fdu_bib_style_tl } } + \__fdu_pass_options_to_biblatex:n { backend = biber, hyperref = manual, natbib } } +\cs_new_protected:Npn \__fdu_biblatex_post_setup: + { + \exp_args:NV \addbibresource \l__fdu_bib_resource_tl + \__fdu_biblatex_allow_url_break: + \defbibheading { bibliography } [ \bibname ] { \__fdu_chapter:n {##1} } + \exp_args:Nnx \DefineBibliographyStrings { english } + { bibliography = { \c__fdu_name_bib_en_tl } } + } +\cs_new_protected:Npn \__fdu_pass_options_to_biblatex:n #1 + { \PassOptionsToPackage {#1} { biblatex } } \cs_new:Npn \__fdu_biblatex_allow_url_break: { \int_set_eq:NN \c@biburlucpenalty \c_one_int @@ -1482,13 +1490,6 @@ { \NAT@numbersfalse } -\cs_set:Npn \bibsection - { - \chapter* { \bibname } - \fdu_front_matter_header:n { \bibname } - \addcontentsline { toc } { chapter } - { \__fdu_chapter_toc_format: \bibname } - } \NewDocumentCommand \hypersetup { m } { \fdu_hyperref_setup:n {#1} } \cs_new_protected:Npn \fdu_hyperref_setup:n #1 diff --git a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls index cdfa7c20913..201d345de8a 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls +++ b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.cls @@ -45,7 +45,7 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{expl3} -\GetIdInfo $Id: fduthesis.dtx 0.7c 2019-03-17 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.7d 2019-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Thesis template for Fudan University} \ProvidesExplClass{\ExplFileName} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -283,16 +283,16 @@ { \__fdu_set_family:nnn { fdu@kai } {#2} {#1} } \cs_new_protected:Npn \fdu@kai { \__fdu_switch_family:n { fdu@kai } } -\tl_const:Nn \c__fdu_cjk_font_options_tl - { UprightFont = *, BoldFont = *, ItalicFont = *, BoldItalicFont = * } +\tl_const:Nn \__fdu_cjk_font_options: + { UprightFont = *, ItalicFont = *, AutoFakeBold = true } \cs_new_protected:Npx \__fdu_setCJKmainfont:n #1 - { \__fdu_setCJKmainfont:nn {#1} { \c__fdu_cjk_font_options_tl } } + { \__fdu_setCJKmainfont:nn {#1} { \__fdu_cjk_font_options: } } \cs_new_protected:Npx \__fdu_setCJKsansfont:n #1 - { \__fdu_setCJKsansfont:nn {#1} { \c__fdu_cjk_font_options_tl } } + { \__fdu_setCJKsansfont:nn {#1} { \__fdu_cjk_font_options: } } \cs_new_protected:Npx \__fdu_setCJKmonofont:n #1 - { \__fdu_setCJKmonofont:nn {#1} { \c__fdu_cjk_font_options_tl } } + { \__fdu_setCJKmonofont:nn {#1} { \__fdu_cjk_font_options: } } \cs_new_protected:Npx \__fdu_set_cjk_font_kai:n #1 - { \__fdu_set_cjk_font_kai:nn {#1} { \c__fdu_cjk_font_options_tl } } + { \__fdu_set_cjk_font_kai:nn {#1} { \__fdu_cjk_font_options: } } \sys_if_engine_xetex:TF { \cs_new_eq:NN \__fdu_set_family:nnn \xeCJK_set_family:nnn @@ -549,8 +549,8 @@ } \cs_new_protected:Npn \__fdu_load_font: { - \use:c { __fdu_load_font_ \tl_use:N \g__fdu_font_set_tl : } - \use:c { __fdu_load_cjk_font_ \tl_use:N \g__fdu_cjk_font_set_tl : } + \use:c { __fdu_load_font_ \g__fdu_font_set_tl : } + \use:c { __fdu_load_cjk_font_ \g__fdu_cjk_font_set_tl : } } \ctex_at_end_preamble:n { \__fdu_load_font: } \keys_set:nn { unicode-math } @@ -604,9 +604,37 @@ } \cs_new:Npn \__fdu_set_fullwidth_stop_catcode: { - \char_set_active_eq:nN { "3002 } \c__fdu_fullwidth_full_stop_tl + \char_set_active_eq:nN { "3002 } \c__fdu_fwid_full_stop_tl \char_set_catcode_active:n { "3002 } } +\fancyhf { } +\tl_new:N \l__fdu_header_center_mark_tl +\bool_if:NTF \g__fdu_twoside_bool + { + \fancyhead [ EL ] { \small \nouppercase { \fdu@kai \leftmark } } + \fancyhead [ OR ] { \small \nouppercase { \fdu@kai \rightmark } } + } + { + \fancyhead [ L ] { \small \nouppercase { \fdu@kai \leftmark } } + \fancyhead [ R ] { \small \nouppercase { \fdu@kai \rightmark } } + \fancyhead [ C ] + { + \small \nouppercase + { \fdu@kai \l__fdu_header_center_mark_tl } + } + } +\fancyfoot [ C ] { \small \thepage } +\RenewDocumentCommand \cleardoublepage { } + { + \clearpage + \bool_if:NT \g__fdu_twoside_bool + { + \int_if_odd:nF \c@page + { \hbox:n { } \thispagestyle { empty } \newpage } + } + \tl_gset:Nn \l__fdu_header_center_mark_tl { } + } +\pagestyle { fancy } \keys_set:nn { ctex } { chapter = @@ -632,24 +660,23 @@ fixskip = true } } -\fancyhf { } -\tl_new:N \l__fdu_header_center_mark_tl -\bool_if:NTF \g__fdu_twoside_bool +\cs_new_protected:Npn \__fdu_chapter:n #1 { - \fancyhead [ EL ] { \small \nouppercase { \fdu@kai \leftmark } } - \fancyhead [ OR ] { \small \nouppercase { \fdu@kai \rightmark } } + \group_begin: + \ctexset { chapter / numbering = false } + \chapter {#1} + \__fdu_chapter_header:n {#1} + \group_end: } +\cs_generate_variant:Nn \__fdu_chapter:n { V } +\cs_new_protected:Npn \__fdu_chapter_no_toc:n #1 { - \fancyhead [ L ] { \small \nouppercase { \fdu@kai \leftmark } } - \fancyhead [ R ] { \small \nouppercase { \fdu@kai \rightmark } } - \fancyhead [ C ] - { - \small \nouppercase - { \fdu@kai \l__fdu_header_center_mark_tl } - } + \chapter * {#1} + \__fdu_chapter_header:n {#1} + \pdfbookmark [0] {#1} { toc } } -\fancyfoot [ C ] { \small \thepage } -\cs_new:Npn \fdu_front_matter_header:n #1 +\cs_generate_variant:Nn \__fdu_chapter_no_toc:n { V } +\cs_new_protected:Npn \__fdu_chapter_header:n #1 { \bool_if:NTF \g__fdu_twoside_bool { \markboth {#1} {#1} } @@ -658,17 +685,6 @@ \tl_gset:Nn \l__fdu_header_center_mark_tl {#1} } } -\RenewDocumentCommand \cleardoublepage { } - { - \clearpage - \bool_if:NT \g__fdu_twoside_bool - { - \int_if_odd:nF \c@page - { \hbox:n { } \thispagestyle { empty } \newpage } - } - \tl_gset:Nn \l__fdu_header_center_mark_tl { } - } -\pagestyle { fancy } \clist_map_inline:nn { { plain } { plain }, @@ -1022,7 +1038,7 @@ \cs_new:Npn \__fdu_cover_id_aux:n #1 { \tl_use:c { c__fdu_name_ #1 _tl } - \c__fdu_fullwidth_colon_tl + \c__fdu_fwid_colon_tl \tl_use:c { l__fdu_info_ #1 _tl } } \cs_new_protected:Npn \__fdu_cover_logo: @@ -1053,10 +1069,10 @@ { \int_compare:nT { \g__fdu_thesis_type_int != 3 } { - \c__fdu_fullwidth_left_paren_tl + \c__fdu_fwid_left_paren_tl \clist_item:Nn \c__fdu_degree_type_clist { \l__fdu_info_degree_type_int } - \c__fdu_fullwidth_right_paren_tl + \c__fdu_fwid_right_paren_tl } } \cs_new_protected:Npn \__fdu_cover_info: @@ -1086,7 +1102,7 @@ \clist_pop:NN \l__fdu_tmpa_clist \l__fdu_tmpa_tl \clist_pop:NN \l__fdu_tmpb_clist \l__fdu_tmpb_tl \__fdu_spread_box:nn { 6 em } { \l__fdu_tmpa_tl } - \c__fdu_fullwidth_colon_tl + \c__fdu_fwid_colon_tl \__fdu_center_box:Vn \l__fdu_tmpb_dim { \l__fdu_tmpb_tl } \skip_vertical:n { 1 ex } } @@ -1096,7 +1112,7 @@ { \clist_map_inline:Nn #1 { - ##1 \c__fdu_fullwidth_colon_tl + ##1 \c__fdu_fwid_colon_tl \__fdu_blank_underline:n { 6 em } \__fdu_quad: } @@ -1262,9 +1278,8 @@ id / format = \zihao { -5 }, type / format = \zihao { 2 }, degree / format = \zihao { 4 }, - title / format = \zihao { -2 } \sffamily, - title-en / format = - \__fdu_line_spread:n { 1.2 } \zihao { 4 } \bfseries, + title / format = \zihao { -2 } \bfseries, + title-en / format = \__fdu_line_spread:n { 1.2 } \zihao { 4 } \bfseries, id / bottom-skip = 0 pt plus 1.6 fill, logo / bottom-skip = 0 pt plus 0.3 fill, type / bottom-skip = -18 pt, @@ -1334,14 +1349,12 @@ } \AtEndDocument { \bool_if:NT \l__fdu_auto_make_cover_bool { \makecoveriii } } -\tl_const:Nn \__fdu_chapter_toc_format: { \normalfont \sffamily } -\tl_const:Nn \__fdu_chapter_toc_en_format: { \bfseries } \keys_set:nn { ctex } { contentsname = \c__fdu_name_toc_tl, chapter / tocline = { - \__fdu_chapter_toc_format: + \normalfont \sffamily \CTEXnumberline {#1} #2 }, section / tocline = @@ -1360,60 +1373,50 @@ \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% } - { - \chapter* { \contentsname } - \fdu_front_matter_header:n { \c__fdu_name_toc_tl } - } + { \__fdu_chapter_no_toc:V \contentsname } \NewDocumentEnvironment { abstract } { } { \__fdu_abstract_begin: } { \__fdu_abstract_end: } \NewDocumentEnvironment { abstract* } { } { \__fdu_abstract_en_begin: } { \__fdu_abstract_en_end: } \cs_new_protected:Npn \__fdu_abstract_begin: - { - \chapter* { \c__fdu_name_abstract_tl } - \fdu_front_matter_header:n { \c__fdu_name_abstract_tl } - \addcontentsline { toc } { chapter } - { - \__fdu_chapter_toc_format: - \c__fdu_name_abstract_tl - } - } + { \__fdu_chapter:V \c__fdu_name_abstract_tl } \cs_new_protected:Npn \__fdu_abstract_en_begin: - { - \chapter* { \c__fdu_name_abstract_en_tl } - \fdu_front_matter_header:n { \c__fdu_name_abstract_en_tl } - \addcontentsline { toc } { chapter } - { - \__fdu_chapter_toc_format: - \c__fdu_name_abstract_en_tl - } - } + { \__fdu_chapter:V \c__fdu_name_abstract_en_tl } \cs_new_protected:Npn \__fdu_abstract_end: { - \__fdu_keywords_par: - \textsf { \c__fdu_name_keywords_tl \c__fdu_fullwidth_colon_tl } - \clist_use:Nn \l__fdu_info_keywords_clist - { \c__fdu_fullwidth_semicolon_tl } - \__fdu_clc_par: - \textsf { \c__fdu_name_clc_tl \c__fdu_fullwidth_colon_tl } - \l__fdu_info_clc_tl + \__fdu_keywords:nNn + { \sffamily \c__fdu_name_keywords_tl \c__fdu_fwid_colon_tl } + \l__fdu_info_keywords_clist { \c__fdu_fwid_semicolon_tl } + \__fdu_clc:nn + { \sffamily \c__fdu_name_clc_tl \c__fdu_fwid_colon_tl } + { \l__fdu_info_clc_tl } } \cs_new_protected:Npn \__fdu_abstract_en_end: { - \__fdu_keywords_par: - \textbf { \c__fdu_name_keywords_en_tl } \__fdu_quad: - \clist_use:Nn \l__fdu_info_keywords_en_clist { \__fdu_quad: } - \__fdu_clc_par: - \textbf { \c__fdu_name_clc_en_tl } \__fdu_quad: - \l__fdu_info_clc_tl + \__fdu_keywords:nNn + { \bfseries \c__fdu_name_keywords_en_tl \__fdu_quad: } + \l__fdu_info_keywords_en_clist { ; ~ } + \__fdu_clc:nn + { \bfseries \c__fdu_name_clc_en_tl \__fdu_quad: } + { \l__fdu_info_clc_tl } + } +\cs_new_protected:Npn \__fdu_keywords:nNn #1#2#3 + { + \par \mode_leave_vertical: \par \noindent + \__fdu_get_text_width:Nn \l__fdu_tmpa_dim {#1} + \group_begin: #1 \group_end: + \parbox [t] { \dim_eval:n { \textwidth - \l__fdu_tmpa_dim } } + { + \clist_use:Nn #2 {#3} \par + \cs_gset:Npx \__fdu_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D } + } } -\cs_new:Npn \__fdu_keywords_par: +\cs_new_protected:Npn \__fdu_clc:nn #1#2 { - \par \mode_leave_vertical: \par - \noindent \hangindent = 4 em \hangafter = 1 + \par \tex_prevdepth:D \__fdu_keywords_prevdepth: \noindent + \group_begin: #1 \group_end: + #2 } -\cs_new:Npn \__fdu_clc_par: - { \par \noindent } \NewDocumentEnvironment { notation } { O { l p { 7.5 cm } } } { \__fdu_notation_begin: @@ -1427,18 +1430,12 @@ } \cs_new_protected:Npn \__fdu_notation_begin: { - \chapter* { \c__fdu_name_notation_tl } - \fdu_front_matter_header:n { \c__fdu_name_notation_tl } - \addcontentsline { toc } { chapter } - { - \__fdu_chapter_toc_format: - \c__fdu_name_notation_tl - } + \__fdu_chapter:V \c__fdu_name_notation_tl } \cs_new_protected:Npn \__fdu_notation_long_table_setup: { - \dim_set_eq:NN \LTpre \c_zero_dim - \dim_set_eq:NN \LTpost \c_zero_dim + \dim_set_eq:NN \LTpre \c_zero_dim + \dim_set_eq:NN \LTpost \c_zero_dim } \bool_new:N \l__fdu_bibtex_bool \tl_new:N \l__fdu_bib_style_tl @@ -1483,24 +1480,14 @@ { \RequirePackage [ sort & compress ] { natbib } \__fdu_bibtex_setup: - \NewDocumentCommand \printbibliography { o } - { - \exp_args:NV \bibliography \l__fdu_bib_resource_tl - \IfValueT {#1} - { \__fdu_warning:nn { invalid-option-in-bibtex } {#1} } - } } { - \__fdu_biblatex_setup: - \RequirePackage [ backend = biber, hyperref = manual, natbib ] - { biblatex } - \exp_args:NV \addbibresource \l__fdu_bib_resource_tl - \__fdu_biblatex_allow_url_break: + \__fdu_biblatex_pre_setup: + \RequirePackage { biblatex } + \__fdu_biblatex_post_setup: } } -\__fdu_msg_new:nn { invalid-option-in-bibtex } - { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } -\cs_new:Npn \__fdu_bibtex_setup: +\cs_new_protected:Npn \__fdu_bibtex_setup: { \tl_if_empty:NTF \l__fdu_bib_style_tl { @@ -1519,26 +1506,40 @@ } } { \exp_args:NV \bibliographystyle \l__fdu_bib_style_tl } + \cs_set:Npn \bibsection { \__fdu_chapter:V \bibname } + \NewDocumentCommand \printbibliography { o } + { + \exp_args:NV \bibliography \l__fdu_bib_resource_tl + \IfValueT {##1} + { \__fdu_warning:nn { invalid-option-in-bibtex } {##1} } + } } -\cs_new:Npn \__fdu_biblatex_setup: +\__fdu_msg_new:nn { invalid-option-in-bibtex } + { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } +\cs_new_protected:Npn \__fdu_biblatex_pre_setup: { \tl_if_empty:NTF \l__fdu_bib_style_tl { \tl_if_eq:VnTF \l__fdu_bib_gb_style_tl { numerical } - { \PassOptionsToPackage { style = gb7714-2015 } } + { \__fdu_pass_options_to_biblatex:n { style = gb7714-2015 } } { \tl_if_eq:VnT \l__fdu_bib_gb_style_tl { author-year } - { \PassOptionsToPackage { style = gb7714-2015ay } } + { \__fdu_pass_options_to_biblatex:n { style = gb7714-2015ay } } } } - { \PassOptionsToPackage { style = \l__fdu_bib_style_tl } } - { biblatex } + { \__fdu_pass_options_to_biblatex:n { style = \l__fdu_bib_style_tl } } \tl_if_empty:NF \l__fdu_cite_style_tl - { - \PassOptionsToPackage { citestyle = \l__fdu_bib_style_tl } - { biblatex } - } + { \__fdu_pass_options_to_biblatex:n { citestyle = \l__fdu_bib_style_tl } } + \__fdu_pass_options_to_biblatex:n { backend = biber, hyperref = manual, natbib } + } +\cs_new_protected:Npn \__fdu_biblatex_post_setup: + { + \exp_args:NV \addbibresource \l__fdu_bib_resource_tl + \__fdu_biblatex_allow_url_break: + \defbibheading { bibliography } [ \bibname ] { \__fdu_chapter:n {##1} } } +\cs_new_protected:Npn \__fdu_pass_options_to_biblatex:n #1 + { \PassOptionsToPackage {#1} { biblatex } } \cs_new:Npn \__fdu_biblatex_allow_url_break: { \int_set_eq:NN \c@biburlucpenalty \c_one_int @@ -1555,18 +1556,11 @@ \cs_new:Npn \__fdu_set_cite_style_author_year: { \NAT@numbersfalse - \cs_set_eq:NN \NAT@open \c__fdu_fullwidth_left_paren_tl - \cs_set_eq:NN \NAT@close \c__fdu_fullwidth_right_paren_tl - \cs_set_eq:NN \NAT@sep \c__fdu_fullwidth_semicolon_tl - \cs_set_eq:NN \NAT@aysep \c__fdu_fullwidth_comma_tl - \cs_set_eq:NN \NAT@yrsep \c__fdu_ideographic_comma_tl - } -\cs_set:Npn \bibsection - { - \chapter* { \bibname } - \fdu_front_matter_header:n { \bibname } - \addcontentsline { toc } { chapter } - { \__fdu_chapter_toc_format: \bibname } + \cs_set_eq:NN \NAT@open \c__fdu_fwid_left_paren_tl + \cs_set_eq:NN \NAT@close \c__fdu_fwid_right_paren_tl + \cs_set_eq:NN \NAT@sep \c__fdu_fwid_semicolon_tl + \cs_set_eq:NN \NAT@aysep \c__fdu_fwid_comma_tl + \cs_set_eq:NN \NAT@yrsep \c__fdu_ideo_comma_tl } \NewDocumentCommand \hypersetup { m } { \fdu_hyperref_setup:n {#1} } diff --git a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def index 995b0e5c9d3..50492e0c90e 100644 --- a/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def +++ b/Master/texmf-dist/tex/latex/fduthesis/fduthesis.def @@ -43,7 +43,7 @@ %% fduthesis-code.pdf, %% and README.md. %% -\GetIdInfo $Id: fduthesis.dtx 0.7c 2019-03-17 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +\GetIdInfo $Id: fduthesis.dtx 0.7d 2019-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ {Definition file for fduthesis} \ProvidesExplFile{\ExplFileName.def} {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} @@ -52,14 +52,14 @@ \tl_const:Nn \c__fdu_name_en_tl { Fudan~ University } \clist_map_inline:nn { - { ideographic_comma } { "3001 }, - { ideographic_full_stop } { "3002 }, - { fullwidth_comma } { "FF0C }, - { fullwidth_full_stop } { "FF0E }, - { fullwidth_colon } { "FF1A }, - { fullwidth_semicolon } { "FF1B }, - { fullwidth_left_paren } { "FF08 }, - { fullwidth_right_paren } { "FF09 } + { ideo_comma } { "3001 }, + { ideo_full_stop } { "3002 }, + { fwid_comma } { "FF0C }, + { fwid_full_stop } { "FF0E }, + { fwid_colon } { "FF1A }, + { fwid_semicolon } { "FF1B }, + { fwid_left_paren } { "FF08 }, + { fwid_right_paren } { "FF09 } } { \__fdu_define_punct:nn #1 } \fp_const:Nn \c__fdu_line_spread_fp |