summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls')
-rw-r--r--Master/texmf-dist/tex/latex/fduthesis/fduthesis-en.cls215
1 files changed, 108 insertions, 107 deletions
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