diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf | bin | 917309 -> 916050 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf | bin | 162719 -> 162728 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis-template.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf | bin | 410642 -> 410643 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx | 516 | ||||
-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 |
12 files changed, 491 insertions, 522 deletions
diff --git a/Master/texmf-dist/doc/latex/fduthesis/README.md b/Master/texmf-dist/doc/latex/fduthesis/README.md index b47bd09e422..563fb4b89de 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/README.md +++ b/Master/texmf-dist/doc/latex/fduthesis/README.md @@ -1,7 +1,7 @@ The `fduthesis` Class ===================== -*LaTeX thesis template for Fudan University, v0.7c* +*LaTeX thesis template for Fudan University, v0.7d* Overview -------- diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf Binary files differindex 06cba4d2332..6848703e9aa 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-code.pdf diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf Binary files differindex 5b38e773b6f..abbd1460030 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.pdf diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex index 63f6062269d..e4f2dc71409 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-en.tex @@ -60,7 +60,7 @@ \textbf{The \textsf{fduthesis} Class \\ \LaTeX{} Thesis Template for Fudan University}}} \author{Xiangdong Zeng} -\date{2019/03/17\quad v0.7c% +\date{2019/04/03\quad v0.7d% \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} \begin{document} diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-template.tex b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-template.tex index 3db6babcc34..1f2826e6f8a 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis-template.tex +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis-template.tex @@ -20,7 +20,7 @@ %>******************************************************************** %> fduthesis: 复旦大学论文模板 -%> 2019/03/17 v0.7c +%> 2019/04/03 v0.7d %> %> 重要提示: %> 1. 请确保使用 UTF-8 编码保存 diff --git a/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf b/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf Binary files differindex 4e774d0ccb2..d3662983bfe 100644 --- a/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf +++ b/Master/texmf-dist/doc/latex/fduthesis/fduthesis.pdf diff --git a/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx b/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx index 3e2cada62e3..cd50a39ec62 100644 --- a/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx +++ b/Master/texmf-dist/source/latex/fduthesis/fduthesis.dtx @@ -47,7 +47,7 @@ The `fduthesis` Class ===================== -*LaTeX thesis template for Fudan University, v0.7c* +*LaTeX thesis template for Fudan University, v0.7d* Overview -------- @@ -236,7 +236,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. %<class|class-en|doc|logo>\NeedsTeXFormat{LaTeX2e} %<class|class-en|doc|logo>\RequirePackage{expl3} %<*!(driver|install|ex-logo|cover)> -%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.7c 2019-03-17 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ +%<!readme>\GetIdInfo $Id: fduthesis.dtx 0.7d 2019-04-03 12:00:00Z Xiangdong Zeng <xdzeng96@gmail.com> $ %<class> {Thesis template for Fudan University} %<class>\ProvidesExplClass{\ExplFileName} %<class-en> {Thesis template for Fudan University (English version)} @@ -280,13 +280,13 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. \title{\textcolor{MaterialIndigo800}{% \textbf{fduthesis: 复旦大学论文\xpinyin[font=\sffamily]{模}{mu2}板}}} \author{曾祥东} -\date{2019/03/17\quad v0.7c% +\date{2019/04/03\quad v0.7d% \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} %^^A! \title{\textcolor{MaterialIndigo800}{% %^^A! \textbf{The \textsf{fduthesis} Class \\ %^^A! \LaTeX{} Thesis Template for Fudan University}}} %^^A! \author{Xiangdong Zeng} -%^^A! \date{2019/03/17\quad v0.7c% +%^^A! \date{2019/04/03\quad v0.7d% %^^A! \thanks{\url{https://github.com/stone-zeng/fduthesis}.}} %^^A! @@ -316,7 +316,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \changes{v0.3}{2017/07/10}{添加英文模板。} % \changes{v0.3}{2017/07/19}{使用 \pkg{l3docstrip} 管理名字空间。} % \changes{v0.3}{2017/07/28}{整理代码,编写用户文档。} -% \changes{v0.4}{2017/08/03}{拆分 \file{dtx} 文件。} +% \changes{v0.4}{2017/08/03}{拆分 \file{.dtx} 文件。} % \changes{v0.4}{2017/08/11}{添加错误信息提示。} % \changes{v0.6}{2017/11/23}{同步 \pkg{ctex} v2.4.11。} % \changes{v0.6}{2017/11/29}{添加英文版用户文档。} @@ -2548,7 +2548,6 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \bibitem{孔雀计划} % 刘庆(\textsc{Eric Q L}). % \newblock \textit{孔雀计划:中文字体排印的思路} [EB/OL]. -% \newblock (2009-10-06) % \urlprefix\url{https://thetype.com/kongque/} % % \end{thebibliography} @@ -3033,13 +3032,13 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \changes{v0.7c}{2019/03/05}{重构字体配置,并兼容 macOS。} % -% \begin{macro}{\g_@@_font_set_tl, \g_@@_cjk_font_set_tl} +% \begin{variable}{\g_@@_font_set_tl, \g_@@_cjk_font_set_tl} % 存放字体选项值。 % \begin{macrocode} \tl_new:N \g_@@_font_set_tl %<class>\tl_new:N \g_@@_cjk_font_set_tl % \end{macrocode} -% \end{macro} +% \end{variable} % % \begin{macro}{style/font} % \changes{v0.7c}{2019/03/05}{新增 \opt{garamond} 和 \opt{times*} 样式。} @@ -3117,23 +3116,26 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% \begin{macro}{\c_@@_cjk_font_options_tl, +% \changes{v0.7d}{2019/03/29}{在字体未提供对应粗体的情况下,允许使用伪粗。} +% +% \begin{macro}{ +% \@@_cjk_font_options:, % \@@_setCJKmainfont:n, % \@@_setCJKsansfont:n, % \@@_setCJKmonofont:n, % \@@_set_cjk_font_kai:n} % 将 bold、italic 和 bold italic 统一按照 roman 设置。 % \begin{macrocode} -\tl_const:Nn \c_@@_cjk_font_options_tl - { UprightFont = *, BoldFont = *, ItalicFont = *, BoldItalicFont = * } +\tl_const:Nn \@@_cjk_font_options: + { UprightFont = *, ItalicFont = *, AutoFakeBold = true } \cs_new_protected:Npx \@@_setCJKmainfont:n #1 - { \@@_setCJKmainfont:nn {#1} { \c_@@_cjk_font_options_tl } } + { \@@_setCJKmainfont:nn {#1} { \@@_cjk_font_options: } } \cs_new_protected:Npx \@@_setCJKsansfont:n #1 - { \@@_setCJKsansfont:nn {#1} { \c_@@_cjk_font_options_tl } } + { \@@_setCJKsansfont:nn {#1} { \@@_cjk_font_options: } } \cs_new_protected:Npx \@@_setCJKmonofont:n #1 - { \@@_setCJKmonofont:nn {#1} { \c_@@_cjk_font_options_tl } } + { \@@_setCJKmonofont:nn {#1} { \@@_cjk_font_options: } } \cs_new_protected:Npx \@@_set_cjk_font_kai:n #1 - { \@@_set_cjk_font_kai:nn {#1} { \c_@@_cjk_font_options_tl } } + { \@@_set_cjk_font_kai:nn {#1} { \@@_cjk_font_options: } } % \end{macrocode} % \end{macro} % @@ -3497,8 +3499,8 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new_protected:Npn \@@_load_font: { - \use:c { @@_load_font_ \tl_use:N \g_@@_font_set_tl : } -%<class> \use:c { @@_load_cjk_font_ \tl_use:N \g_@@_cjk_font_set_tl : } + \use:c { @@_load_font_ \g_@@_font_set_tl : } +%<class> \use:c { @@_load_cjk_font_ \g_@@_cjk_font_set_tl : } } \ctex_at_end_preamble:n { \@@_load_font: } % \end{macrocode} @@ -3583,9 +3585,8 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. { \@@_set_fullwidth_stop_catcode: }, % \end{macrocode} % 利用 TECKit 映射机制切换,相当于设置了 \tn{defaultCJKfontfeatures} -% |{|\kvopt{Map\-ping}{fullwidth-stop}|}|。这种手段会 -% 替换所有出现的\FSID,并且将影响所有字体。只在 \XeTeX{} -% 下可用。 +% |{|\kvopt{Map\-ping}{fullwidth-stop}|}|。这种手段会替换所有出现的\FSID, +% 并且将影响所有字体。只在 \XeTeX{} 下可用。 % \begin{macrocode} fullwidth-stop / mapping .code:n = { @@ -3624,59 +3625,15 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new:Npn \@@_set_fullwidth_stop_catcode: { - \char_set_active_eq:nN { "3002 } \c_@@_fullwidth_full_stop_tl + \char_set_active_eq:nN { "3002 } \c_@@_fwid_full_stop_tl \char_set_catcode_active:n { "3002 } } %</class> % \end{macrocode} % \end{macro} % -% \changes{v0.6}{2017/10/28}{优化 \LuaTeX{} 下希腊字母、西里尔字母 -% 和带圈数字的显示(\pkg{ctex} v2.4.11 已默认进行处理)。} -% -% \subsection{章节标题结构} -% -% |\keys_set:nn{ctex}| 实际相当于 \cs{ctexset}。 -% \begin{macrocode} -\keys_set:nn { ctex } - { -% \end{macrocode} -% -% 设置章(chapter)、节(section)与小节(sub-section)标题样式。 -% 此处使用 \kvopt{fixskip}{true} 选项来抑制前后的多余间距。 -% \begin{macrocode} - chapter = - { -%<class> format = \huge \normalfont \sffamily \centering, -%<*class-en> - format = \centering, - nameformat = \LARGE \bfseries, - titleformat = \huge \bfseries, - aftername = \par \nobreak \vskip 10 pt, -%</class-en> - beforeskip = 50 pt, - afterskip = 40 pt, - number = \@@_arabic:n { chapter }, - fixskip = true - }, - section = - { -%<class> format = \Large \normalfont \sffamily \raggedright, -%<class-en> format = \Large \bfseries \raggedright, - beforeskip = 3.5 ex plus 1.0 ex minus 0.2 ex, - afterskip = 2.7 ex plus 0.5 ex, - fixskip = true - }, - subsection = - { -%<class> format = \large \normalfont \sffamily \raggedright, -%<class-en> format = \large \bfseries \raggedright, - beforeskip = 3.25 ex plus 1.0 ex minus 0.2 ex, - afterskip = 2.5 ex plus 0.3 ex, - fixskip = true - } - } -% \end{macrocode} +% \changes{v0.6}{2017/10/28}{优化 \LuaTeX{} 下希腊字母、西里尔字母和带圈数字的 +% 显示(\pkg{ctex} v2.4.11 已默认进行处理)。} % % \subsection{页眉页脚} % @@ -3686,8 +3643,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % % \begin{variable}{\l_@@_header_center_mark_tl} -% 保存中间页眉的文字。正文中设置为空,目录、摘要、符号表等设置为 -% 相应标题。 +% 保存中间页眉的文字。正文中设置为空,目录、摘要、符号表等设置为相应标题。 % \begin{macrocode} \tl_new:N \l_@@_header_center_mark_tl % \end{macrocode} @@ -3744,26 +3700,10 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \RenewDocumentCommand \headrulewidth { } { 0 pt } % \end{macrocode} % -% \begin{macro}{\fdu_front_matter_header:n} -% 在单页模式下,设置前导部分(包括目录、摘要、符号表等)的页眉中间 -% 为相应标题,左右为空。 -% \begin{macrocode} -\cs_new:Npn \fdu_front_matter_header:n #1 - { - \bool_if:NTF \g_@@_twoside_bool - { \markboth {#1} {#1} } - { - \markboth { } { } - \tl_gset:Nn \l_@@_header_center_mark_tl {#1} - } - } -% \end{macrocode} -% \end{macro} -% % \begin{macro}{\cleardoublepage} -% 重定义 \tn{cleardoublepage},使得偶数页面在没有内容时也不显示 -% 页眉页脚,见 \url{https://tex.stackexchange.com/a/1683}。 \\ -% 最后清空中间页眉,确保正文部分页眉显示正确。 +% 重定义 \tn{cleardoublepage},使得偶数页面在没有内容时也不显示页眉页脚,见 +% \url{https://tex.stackexchange.com/a/1683}。最后清空中间页眉,确保正文部分 +% 页眉显示正确。 % \begin{macrocode} \RenewDocumentCommand \cleardoublepage { } { @@ -3778,13 +3718,101 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% \pkg{ctex} 宏包使用 \opt{heading} 选项后,会把页面格式设置为 -% |headings|。因此必须在 \pkg{ctex} 调用之后重新设置 \cs{pagestyle} -% 为 |fancy|。 +% \pkg{ctex} 宏包使用 \opt{heading} 选项后,会把页面格式设置为 |headings|。 +% 因此必须在 \pkg{ctex} 调用之后重新设置 \cs{pagestyle} 为 |fancy|。 % \begin{macrocode} \pagestyle { fancy } % \end{macrocode} % +% \subsection{章节标题结构} +% +% |\keys_set:nn{ctex}| 实际相当于 \cs{ctexset}。 +% \begin{macrocode} +\keys_set:nn { ctex } + { +% \end{macrocode} +% 设置章(chapter)、节(section)与小节(sub-section)标题样式。 +% 此处使用 \kvopt{fixskip}{true} 选项来抑制前后的多余间距。 +% \begin{macrocode} + chapter = + { +%<class> format = \huge \normalfont \sffamily \centering, +%<*class-en> + format = \centering, + nameformat = \LARGE \bfseries, + titleformat = \huge \bfseries, + aftername = \par \nobreak \vskip 10 pt, +%</class-en> + beforeskip = 50 pt, + afterskip = 40 pt, + number = \@@_arabic:n { chapter }, + fixskip = true + }, + section = + { +%<class> format = \Large \normalfont \sffamily \raggedright, +%<class-en> format = \Large \bfseries \raggedright, + beforeskip = 3.5 ex plus 1.0 ex minus 0.2 ex, + afterskip = 2.7 ex plus 0.5 ex, + fixskip = true + }, + subsection = + { +%<class> format = \large \normalfont \sffamily \raggedright, +%<class-en> format = \large \bfseries \raggedright, + beforeskip = 3.25 ex plus 1.0 ex minus 0.2 ex, + afterskip = 2.5 ex plus 0.3 ex, + fixskip = true + } + } +% \end{macrocode} +% +% \changes{v0.7d}{2019/03/24}{优化目录、摘要、参考文献等的标题实现。} +% +% \begin{macro}{\@@_chapter:n,\@@_chapter:V} +% 手动生成章的标题,用于摘要、参考文献等。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_chapter:n #1 + { + \group_begin: + \ctexset { chapter / numbering = false } + \chapter {#1} + \@@_chapter_header:n {#1} + \group_end: + } +\cs_generate_variant:Nn \@@_chapter:n { V } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_chapter_no_toc:n,\@@_chapter_no_toc:V} +% 目录自身不出现在目录中,需特别处理。参考 +% \url{https://tex.stackexchange.com/a/1821}。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_chapter_no_toc:n #1 + { + \chapter * {#1} + \@@_chapter_header:n {#1} + \pdfbookmark [0] {#1} { toc } + } +\cs_generate_variant:Nn \@@_chapter_no_toc:n { V } +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@@_chapter_header:n} +% 单页模式下,目录、摘要、符号表等的页眉中间为相应标题,左右为空。 +% \begin{macrocode} +\cs_new_protected:Npn \@@_chapter_header:n #1 + { + \bool_if:NTF \g_@@_twoside_bool + { \markboth {#1} {#1} } + { + \markboth { } { } + \tl_gset:Nn \l_@@_header_center_mark_tl {#1} + } + } +% \end{macrocode} +% \end{macro} +% % \subsection{脚注} % % \changes{v0.3}{2017/02/21}{支持脚注。} @@ -4667,7 +4695,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. \cs_new:Npn \@@_cover_id_aux:n #1 { \tl_use:c { c_@@_name_ #1 _tl } - \c_@@_fullwidth_colon_tl + \c_@@_fwid_colon_tl \tl_use:c { l_@@_info_ #1 _tl } } % \end{macrocode} @@ -4718,10 +4746,10 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. { \int_compare:nT { \g_@@_thesis_type_int != 3 } { - \c_@@_fullwidth_left_paren_tl + \c_@@_fwid_left_paren_tl \clist_item:Nn \c_@@_degree_type_clist { \l_@@_info_degree_type_int } - \c_@@_fullwidth_right_paren_tl + \c_@@_fwid_right_paren_tl } } % \end{macrocode} @@ -4767,7 +4795,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. \clist_pop:NN \l_@@_tmpa_clist \l_@@_tmpa_tl \clist_pop:NN \l_@@_tmpb_clist \l_@@_tmpb_tl \@@_spread_box:nn { 6 em } { \l_@@_tmpa_tl } - \c_@@_fullwidth_colon_tl + \c_@@_fwid_colon_tl \@@_center_box:Vn \l_@@_tmpb_dim { \l_@@_tmpb_tl } \skip_vertical:n { 1 ex } } @@ -4783,7 +4811,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. { \clist_map_inline:Nn #1 { - ##1 \c_@@_fullwidth_colon_tl + ##1 \c_@@_fwid_colon_tl \@@_blank_underline:n { 6 em } \@@_quad: } @@ -4836,7 +4864,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. \skip_new:c { l_@@ / #1 / ##1 / bottom_skip } } % \end{macrocode} -% 声明模板代码。 +% 声明模板代码。^^A 以下名字空间为 `fdu_cover' 而非 `fdu' % \begin{macrocode} \@@_declare_template_code:nxn {#1} { @@ -5001,12 +5029,13 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. } % \end{macrocode} % +% \changes{v0.7d}{2019/03/29}{封面中文标题改为加粗宋体(可能使用伪粗)。} +% % 定义封面的具体配置参数。 % \begin{macrocode} \DeclareInstance { fdu / cover } { cover-i-default } { cover-i } { -%<class-en> format = -%<class-en> \@@_line_spread:N \c_@@_line_spread_fp, +%<class-en> format = \@@_line_spread:N \c_@@_line_spread_fp, bottom-skip = 0 pt plus 1.5 fill, id / content = \@@_cover_id:, logo / content = \@@_cover_logo:, @@ -5022,9 +5051,8 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. id / format = \zihao { -5 }, type / format = \zihao { 2 }, degree / format = \zihao { 4 }, - title / format = \zihao { -2 } \sffamily, - title-en / format = - \@@_line_spread:n { 1.2 } \zihao { 4 } \bfseries, + title / format = \zihao { -2 } \bfseries, + title-en / format = \@@_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, @@ -5040,8 +5068,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. } \DeclareInstance { fdu / cover } { cover-ii-default } { cover-ii } { -%<class-en> format = -%<class-en> \@@_line_spread:N \c_@@_line_spread_fp, +%<class-en> format = \@@_line_spread:N \c_@@_line_spread_fp, title / content = \@@_spread_box:nn { 7 em } { \c_@@_name_instructors_tl }, name-list / content = @@ -5117,15 +5144,6 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % % \subsection{目录} % -% \begin{variable}{\@@_chapter_toc_format:,\@@_chapter_toc_en_format:} -% 目录中章标题的样式还要用在摘要、符号表中。因为摘要分中英文,所以这里 -% 需要分别定义其样式。 -% \begin{macrocode} -\tl_const:Nn \@@_chapter_toc_format: { \normalfont \sffamily } -\tl_const:Nn \@@_chapter_toc_en_format: { \bfseries } -% \end{macrocode} -% \end{variable} -% % 设置目录标题。 % \begin{macrocode} \keys_set:nn { ctex } @@ -5138,8 +5156,8 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} chapter / tocline = { -%<class> \@@_chapter_toc_format: -%<class-en> \@@_chapter_toc_en_format: +%<class> \normalfont \sffamily +%<class-en> \bfseries \CTEXnumberline {#1} #2 }, section / tocline = @@ -5156,8 +5174,8 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % % \begin{macro}{\tableofcontents} -% 修改 \tn{tableofcontents} 的定义,使得页眉正确显示。第二个参数中的 -% 代码来源于 \LaTeXe{} 标准文档类 \file{book.cls}。 +% 修改 \cs{tableofcontents} 的定义,使得页眉正确显示,并出现在目录中。原代码 +% 来自于 \LaTeXe{} 标准文档类 \file{book.cls}。 % \begin{macrocode} \@@_patch_cmd:Nnn \tableofcontents { @@ -5165,11 +5183,7 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% } - { - \chapter* { \contentsname } -%<class> \fdu_front_matter_header:n { \c_@@_name_toc_tl } -%<class-en> \fdu_front_matter_header:n { \c_@@_name_toc_en_tl } - } + { \@@_chapter_no_toc:V \contentsname } % \end{macrocode} % \end{macro} % @@ -5207,71 +5221,66 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{environment} % % \begin{macro}{\@@_abstract_begin:,\@@_abstract_en_begin:} -% 摘要页需要修改页眉,并添加到目录。 +% 摘要页标题。 % \begin{macrocode} %<*class> \cs_new_protected:Npn \@@_abstract_begin: - { - \chapter* { \c_@@_name_abstract_tl } - \fdu_front_matter_header:n { \c_@@_name_abstract_tl } - \addcontentsline { toc } { chapter } - { - \@@_chapter_toc_format: - \c_@@_name_abstract_tl - } - } + { \@@_chapter:V \c_@@_name_abstract_tl } %</class> \cs_new_protected:Npn \@@_abstract_en_begin: - { - \chapter* { \c_@@_name_abstract_en_tl } - \fdu_front_matter_header:n { \c_@@_name_abstract_en_tl } - \addcontentsline { toc } { chapter } - { -%<class> \@@_chapter_toc_format: -%<class-en> \@@_chapter_toc_en_format: - \c_@@_name_abstract_en_tl - } - } + { \@@_chapter:V \c_@@_name_abstract_en_tl } % \end{macrocode} % \end{macro} % +% \changes{v0.7d}{2019/03/28}{优化关键字列表的显示。} +% % \begin{macro}{\@@_abstract_end:,\@@_abstract_en_end:} % 摘要正文完成后,输出关键字列表和中图分类号(CLC)。 % \begin{macrocode} %<*class> \cs_new_protected:Npn \@@_abstract_end: { - \@@_keywords_par: - \textsf { \c_@@_name_keywords_tl \c_@@_fullwidth_colon_tl } - \clist_use:Nn \l_@@_info_keywords_clist - { \c_@@_fullwidth_semicolon_tl } - \@@_clc_par: - \textsf { \c_@@_name_clc_tl \c_@@_fullwidth_colon_tl } - \l_@@_info_clc_tl + \@@_keywords:nNn + { \sffamily \c_@@_name_keywords_tl \c_@@_fwid_colon_tl } + \l_@@_info_keywords_clist { \c_@@_fwid_semicolon_tl } + \@@_clc:nn + { \sffamily \c_@@_name_clc_tl \c_@@_fwid_colon_tl } + { \l_@@_info_clc_tl } } %</class> \cs_new_protected:Npn \@@_abstract_en_end: { - \@@_keywords_par: - \textbf { \c_@@_name_keywords_en_tl } \@@_quad: - \clist_use:Nn \l_@@_info_keywords_en_clist { \@@_quad: } - \@@_clc_par: - \textbf { \c_@@_name_clc_en_tl } \@@_quad: - \l_@@_info_clc_tl + \@@_keywords:nNn + { \bfseries \c_@@_name_keywords_en_tl \@@_quad: } + \l_@@_info_keywords_en_clist { ; ~ } + \@@_clc:nn + { \bfseries \c_@@_name_clc_en_tl \@@_quad: } + { \l_@@_info_clc_tl } } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_keywords_par:,\@@_clc_par:} -% 关键字列表前要空一行,使用悬挂缩进;中图分类号不缩进。 +% \begin{macro}{\@@_keywords:nNn,\@@_keywords_prevdepth:,\@@_clc:nn} +% 关键字列表前要空一行,使用悬挂缩进;中图分类号不缩进。|\parbox| 之后的间距 +% 需要调整,见 \url{https://tex.stackexchange.com/a/34982}。 % \begin{macrocode} -\cs_new:Npn \@@_keywords_par: +\cs_new_protected:Npn \@@_keywords:nNn #1#2#3 { - \par \mode_leave_vertical: \par - \noindent \hangindent = 4 em \hangafter = 1 + \par \mode_leave_vertical: \par \noindent + \@@_get_text_width:Nn \l_@@_tmpa_dim {#1} + \group_begin: #1 \group_end: + \parbox [t] { \dim_eval:n { \textwidth - \l_@@_tmpa_dim } } + { + \clist_use:Nn #2 {#3} \par + \cs_gset:Npx \@@_keywords_prevdepth: { \dim_use:N \tex_prevdepth:D } + } + } +\cs_new_protected:Npn \@@_clc:nn #1#2 + { + \par \tex_prevdepth:D \@@_keywords_prevdepth: \noindent + \group_begin: #1 \group_end: + #2 } -\cs_new:Npn \@@_clc_par: - { \par \noindent } % \end{macrocode} % \end{macro} % @@ -5296,28 +5305,12 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{environment} % % \begin{macro}{\@@_notation_begin:} -% 与摘要类似,符号表页需要修改页眉,并添加到目录。 +% 符号表页标题。 % \begin{macrocode} \cs_new_protected:Npn \@@_notation_begin: { -%<*class> - \chapter* { \c_@@_name_notation_tl } - \fdu_front_matter_header:n { \c_@@_name_notation_tl } - \addcontentsline { toc } { chapter } - { - \@@_chapter_toc_format: - \c_@@_name_notation_tl - } -%</class> -%<*class-en> - \chapter* { \c_@@_name_notation_en_tl } - \fdu_front_matter_header:n { \c_@@_name_notation_en_tl } - \addcontentsline { toc } { chapter } - { - \@@_chapter_toc_en_format: - \c_@@_name_notation_en_tl - } -%</class-en> +%<class> \@@_chapter:V \c_@@_name_notation_tl +%<class-en> \@@_chapter:V \c_@@_name_notation_en_tl } % \end{macrocode} % \end{macro} @@ -5329,9 +5322,9 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \cs_new_protected:Npn \@@_notation_long_table_setup: { -%<class-en> \tl_set:Nn \arraystretch { 1.3 } - \dim_set_eq:NN \LTpre \c_zero_dim - \dim_set_eq:NN \LTpost \c_zero_dim +%<class-en> \tl_set:Nn \arraystretch { 1.3 } + \dim_set_eq:NN \LTpre \c_zero_dim + \dim_set_eq:NN \LTpost \c_zero_dim } % \end{macrocode} % \end{macro} @@ -5368,14 +5361,13 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{variable} % % \changes{v0.6}{2017/10/28}{新增 \opt{style/bib-style} 选项。} -% \changes{v0.7}{2018/01/25}{新增 \opt{style/bib-backend}、 -% \opt{style/cite-style} 和 \opt{style/bib-resource} 选项。} +% \changes{v0.7}{2018/01/25}{新增 \opt{style/bib-backend}、\opt{style/cite-style} +% 和 \opt{style/bib-resource} 选项。} % % \begin{macrocode} \keys_define:nn { fdu / style } { % \end{macrocode} -% % \begin{macro}{style/bib-backend} % 参考文献后端。 % \begin{macrocode} @@ -5387,7 +5379,6 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. { \bool_set_false:N \l_@@_bibtex_bool }, % \end{macrocode} % \end{macro} -% % \begin{macro}{style/bib-style} % 参考文献样式。 % \begin{macrocode} @@ -5407,7 +5398,6 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. { \tl_set_eq:NN \l_@@_bib_style_tl \l_keys_value_tl }, % \end{macrocode} % \end{macro} -% % \begin{macro}{style/cite-style} % 引用样式。 % \begin{macrocode} @@ -5419,7 +5409,6 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. }, % \end{macrocode} % \end{macro} -% % \begin{macro}{style/bib-resource} % 参考文献数据源。 % \begin{macrocode} @@ -5430,64 +5419,32 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \end{macrocode} % \end{macro} % -% 为了保证导言区中的设置能起作用,\pkg{natbib} 或 \pkg{biblatex} 宏包 -% 均需要在导言区末尾载入(仍在 \pkg{hyperref} 之前)。 +% 为了保证导言区中的设置能起作用,\pkg{natbib} 或 \pkg{biblatex} 宏包均需要在 +% 导言区末尾载入(仍在 \pkg{hyperref} 之前),并做相关设置。 % \begin{macrocode} \ctex_at_end_preamble:n { -% \end{macrocode} -% -% 调用 \pkg{natbib} 宏包并进行配置。 -% \begin{macrocode} \bool_if:NTF \l_@@_bibtex_bool { \RequirePackage [ sort & compress ] { natbib } \@@_bibtex_setup: -% \end{macrocode} -% -% \changes{v0.7}{2018/01/25}{统一使用 \cs{printbibliography} 命令 -% 生成参考文献列表。} -% -% \begin{macro}{\printbibliography} -% \BibTeX{} 下接口与 \pkg{biblatex} 统一。 -% \begin{macrocode} - \NewDocumentCommand \printbibliography { o } - { - \exp_args:NV \bibliography \l_@@_bib_resource_tl - \IfValueT {#1} - { \@@_warning:nn { invalid-option-in-bibtex } {#1} } - } } -% \end{macrocode} -% \end{macro} -% -% 调用 \pkg{biblatex} 宏包,并载入参考文献数据库。 -% \cs{@@_biblatex_setup:} 依靠传入宏包选项,因此要放在 -% \tn{RequirePackage} 之前。 -% \begin{macrocode} { - \@@_biblatex_setup: - \RequirePackage [ backend = biber, hyperref = manual, natbib ] - { biblatex } - \exp_args:NV \addbibresource \l_@@_bib_resource_tl - \@@_biblatex_allow_url_break: -% \end{macrocode} -% 英文模板需要重定义参考文献标题。 -% \begin{macrocode} -%<*class-en> - \exp_args:Nnx \DefineBibliographyStrings { english } - { bibliography = { \c_@@_name_bib_en_tl } } -%</class-en> + \@@_biblatex_pre_setup: + \RequirePackage { biblatex } + \@@_biblatex_post_setup: } } -\@@_msg_new:nn { invalid-option-in-bibtex } - { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } % \end{macrocode} % -% \begin{macro}{\@@_bibtex_setup:} -% \BibTeX{} 设置。 +% \changes{v0.7}{2018/01/25}{统一使用 \cs{printbibliography} 命令 +% 生成参考文献列表。} +% \changes{v0.7d}{2019/03/23}{使参考文献在目录中正常显示。} +% +% \begin{macro}{\@@_bibtex_setup:,\bibsection,\printbibliography} +% \BibTeX{} 相关设置。 % \begin{macrocode} -\cs_new:Npn \@@_bibtex_setup: +\cs_new_protected:Npn \@@_bibtex_setup: { \tl_if_empty:NTF \l_@@_bib_style_tl { @@ -5506,14 +5463,32 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. } } { \exp_args:NV \bibliographystyle \l_@@_bib_style_tl } +% \end{macrocode} +% 修改参考文献标题。 +% \begin{macrocode} + \cs_set:Npn \bibsection { \@@_chapter:V \bibname } +% \end{macrocode} +% \BibTeX{} 下接口与 \pkg{biblatex} 保持统一。 +% \begin{macrocode} + \NewDocumentCommand \printbibliography { o } + { + \exp_args:NV \bibliography \l_@@_bib_resource_tl + \IfValueT {##1} + { \@@_warning:nn { invalid-option-in-bibtex } {##1} } + } } +\@@_msg_new:nn { invalid-option-in-bibtex } + { Option(s)~ "#1"~ are~ invalid~ in~ BibTeX. } % \end{macrocode} % \end{macro} % -% \begin{macro}{\@@_biblatex_setup:} -% \pkg{biblatex} 设置。 +% \begin{macro}{ +% \@@_biblatex_pre_setup:, +% \@@_biblatex_post_setup:, +% \@@_pass_options_to_biblatex:n} +% \pkg{biblatex} 相关设置。 % \begin{macrocode} -\cs_new:Npn \@@_biblatex_setup: +\cs_new_protected:Npn \@@_biblatex_pre_setup: { % \end{macrocode} % 参考文献样式。 @@ -5521,23 +5496,35 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. \tl_if_empty:NTF \l_@@_bib_style_tl { \tl_if_eq:VnTF \l_@@_bib_gb_style_tl { numerical } - { \PassOptionsToPackage { style = gb7714-2015 } } + { \@@_pass_options_to_biblatex:n { style = gb7714-2015 } } { \tl_if_eq:VnT \l_@@_bib_gb_style_tl { author-year } - { \PassOptionsToPackage { style = gb7714-2015ay } } + { \@@_pass_options_to_biblatex:n { style = gb7714-2015ay } } } } - { \PassOptionsToPackage { style = \l_@@_bib_style_tl } } - { biblatex } + { \@@_pass_options_to_biblatex:n { style = \l_@@_bib_style_tl } } % \end{macrocode} % 引用样式。 % \begin{macrocode} \tl_if_empty:NF \l_@@_cite_style_tl - { - \PassOptionsToPackage { citestyle = \l_@@_bib_style_tl } - { biblatex } - } + { \@@_pass_options_to_biblatex:n { citestyle = \l_@@_bib_style_tl } } + \@@_pass_options_to_biblatex:n { backend = biber, hyperref = manual, natbib } + } +\cs_new_protected:Npn \@@_biblatex_post_setup: + { + \exp_args:NV \addbibresource \l_@@_bib_resource_tl + \@@_biblatex_allow_url_break: +% \end{macrocode} +% 修改参考文献标题。 +% \begin{macrocode} + \defbibheading { bibliography } [ \bibname ] { \@@_chapter:n {##1} } +%<*class-en> + \exp_args:Nnx \DefineBibliographyStrings { english } + { bibliography = { \c_@@_name_bib_en_tl } } +%</class-en> } +\cs_new_protected:Npn \@@_pass_options_to_biblatex:n #1 + { \PassOptionsToPackage {#1} { biblatex } } % \end{macrocode} % \end{macro} % @@ -5573,29 +5560,16 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. { \NAT@numbersfalse %<*class> - \cs_set_eq:NN \NAT@open \c_@@_fullwidth_left_paren_tl - \cs_set_eq:NN \NAT@close \c_@@_fullwidth_right_paren_tl - \cs_set_eq:NN \NAT@sep \c_@@_fullwidth_semicolon_tl - \cs_set_eq:NN \NAT@aysep \c_@@_fullwidth_comma_tl - \cs_set_eq:NN \NAT@yrsep \c_@@_ideographic_comma_tl + \cs_set_eq:NN \NAT@open \c_@@_fwid_left_paren_tl + \cs_set_eq:NN \NAT@close \c_@@_fwid_right_paren_tl + \cs_set_eq:NN \NAT@sep \c_@@_fwid_semicolon_tl + \cs_set_eq:NN \NAT@aysep \c_@@_fwid_comma_tl + \cs_set_eq:NN \NAT@yrsep \c_@@_ideo_comma_tl %</class> } % \end{macrocode} % \end{macro} % -% \begin{macro}{\bibsection} -% 修改参考文献部分的页眉,并将其添加到目录。 -% \begin{macrocode} -\cs_set:Npn \bibsection - { - \chapter* { \bibname } - \fdu_front_matter_header:n { \bibname } - \addcontentsline { toc } { chapter } - { \@@_chapter_toc_format: \bibname } - } -% \end{macrocode} -% \end{macro} -% % \changes{v0.7}{2018/01/25}{同步 \pkg{gbt7714} v1.0,移除有关超链接 % 的额外设置。} % @@ -5889,14 +5863,14 @@ Copyright (C) 2017–2019 by Xiangdong Zeng <xdzeng96@gmail.com>. % \begin{macrocode} \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 } } { \@@_define_punct:nn #1 } % \end{macrocode} 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 |