diff --git a/RELEASES.md b/RELEASES.md index 95ed4db94..a894d879e 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -6,11 +6,14 @@ ## [Unreleased] +### Changed + - 注释英文大摘要([#1137](https://github.com/sjtug/SJTUThesis/pull/1137))。 ### Added -- 添加 `sjtuthesis-bachelor.sty` 来补充学士论文额外配置([#1113](https://github.com/sjtug/SJTUThesis/pull/1113))。 +- ~~添加 `sjtuthesis-bachelor.sty` 来补充学士论文额外配置([#1113](https://github.com/sjtug/SJTUThesis/pull/1113))。~~ +- 添加教务处版学位论文模板预设([#1138](https://github.com/sjtug/SJTUThesis/pull/1138))。 ## [v2.2.1] - 2025-04-02 diff --git a/main.tex b/main.tex index 9484c95fb..bc7992097 100644 --- a/main.tex +++ b/main.tex @@ -12,9 +12,7 @@ % [twoside|oneside], % 可选(默认:twoside),双页或单页边距模式 % [openright|openany], % 可选(默认:openright),奇数页或任意页开始新章 % math-style=[ISO|TeX], % 可选 (默认:ISO),数学符号样式 - -% 添加学士学位论文相关的额外设置,硕士和博士学位论文可忽略 -\usepackage{sjtuthesis-bachelor} +% preset=[base|jwc], % 可选(默认:base),预设配置,学士学位论文考虑使用 jwc 预设 % 论文基本配置,加载宏包等全局配置 \input{setup} diff --git a/sjtuthesis-bachelor.sty b/sjtuthesis-bachelor.sty deleted file mode 100644 index 55e883c28..000000000 --- a/sjtuthesis-bachelor.sty +++ /dev/null @@ -1,71 +0,0 @@ -% -% Copyright (C) SJTUG -% 2018--2025 Weijian Wu -% 2022--2025 Zilong Li -% 2024--2025 Boshi Yuan -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either -% version 1.3c of this license or (at your option) any later -% version. The latest version of this license is in: -% -% http://www.latex-project.org/lppl.txt -% -% and version 1.3 or later is part of all distributions of -% LaTeX version 2005/12/01 or later. -% -\NeedsTeXFormat{LaTeX2e}[2024-06-01] -\ProvidesExplPackage{sjtuthesis-bachelor} - {2025-04-14}{2.2}{Bachelor thesis patch for SJTUThesis} -\IfClassLoadedTF{sjtuthesis} - { - \int_compare:nNnT { \g__sjtu_thesis_type_int } = { 1 } - { - % 设置标题页字段名称宽度 - \def\SJTU@CT@W@width{4em} - - % 修改标题页字段 - \clist_map_inline:nn - { - { department } { 学院 } , - { major } { 专业名称 } , - { degree } { \hfill\llap{申请学位层次} } - } - { \__sjtu_name_set:nnn { zh } #1 } - - % 加粗标题页字段名称 - \EditInstance{sjtu/element}{titlea/info} - {format=\zihao{4}\setbaselineskip{30bp}\heiti\bfseries} - - % 修改主题 - \sjtusetup{info/zh/subject={上海交通大学学位论文}} - - % 修改文中图、表、公式、定理编号中的分隔符 - \sjtusetup{style/num-sep={-}} - - % 修改章节为中文编号 - \ctexset{chapter/name={第,章}} - \ctexset{chapter/number=\chinese{chapter}} - - % 修改目录格式 - \titlecontents{chapter} - [0pt]{\addvspace{6bp}\zihao{4}\setbaselineskip{24bp}\bfseries} - {\contentspush{\thecontentslabel\enskip}}{} - {\SJTU@leaders\thecontentspage}[\addvspace{6bp}] - \titlecontents{section} - [1em]{\zihao{-4}\setbaselineskip{20bp}} - {\contentspush{\thecontentslabel\enskip}}{} - {\SJTU@leaders\thecontentspage} - \titlecontents{subsection} - [2em]{\zihao{5}\setbaselineskip{16bp}} - {\contentspush{\thecontentslabel\enskip}}{} - {\SJTU@leaders\thecontentspage} - } - } - { - \PackageWarning{sjtuthesis-bachelor} - { - The~ bachelor~ thesis~ patch~ is~ invalid, \MessageBreak - since~ the~ documentclass~ sjtuthesis~ is~ not~ loaded - } - } diff --git a/texmf/tex/latex/sjtutex/preset/sjtu-thesis-preset-jwc.def b/texmf/tex/latex/sjtutex/preset/sjtu-thesis-preset-jwc.def new file mode 100644 index 000000000..e9ffd2522 --- /dev/null +++ b/texmf/tex/latex/sjtutex/preset/sjtu-thesis-preset-jwc.def @@ -0,0 +1,100 @@ +%% +%% Copyright (C) SJTUG +%% 2018--2026 Weijian Wu +%% 2022--2026 Zilong Li +%% 2024--2026 Boshi Yuan +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% https://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% +\ProvidesExplFile{sjtu-thesis-preset-jwc.def} + {2026-03-02}{v20251010} + {Thesis document preset for Shanghai Jiao Tong University (JWC)} +\file_input:n { sjtu-thesis-preset-base.def } +\__sjtu_conditional_const:nn { main_lang_zh } + { \str_if_eq_p:Vn \g__sjtu_lang_tl { zh } } +\SetInfoEntry { zh } + { + department = { 学院 } , + major = { 专业名称 } , + degree = { \hfill \llap { 申请学位层次 } } + } +\keys_set:nn { sjtu / info } + { zh / subject = { 上海交通大学学位论文 } } +\tl_set:Nn \SJTU@CT@W@width { 4 em } +\EditInstance { sjtu / element } { title a / info } + { format= \zihao { 4 } \setbaselineskip { 30 bp } \heiti \bfseries } +\keys_set:nn { sjtu / private / copyright } + { variant = b } +\bool_lazy_any:nT + { + { \__sjtu_if_main_lang_zh_p: } + { \__sjtu_if_main_lang_ja_p: } + } + { + \ctex_set:nn { chapter } + { + name = { 第 , 章 } , + number = \chinese { chapter } + } + } +\RenewDocumentEnvironment { abstract } { O{ } } + { + \__sjtu_select_language:n {#1} + \tl_set:Ne \l__sjtu_heading_title_tl + { + \exp_not:N \protect \exp_not:N \MakeUppercase + { \exp_not:v { c__sjtu_name_abstract_ \l__sjtu_lang_tl _tl } } + } + \ctex_set:nn { chapter } { format+ = \sffamily } + \__sjtu_make_heading:n { intoc, #1 } + } { } +\titlecontents { chapter } + [ 0 pt ] + { \addvspace { 6 bp } \zihao { 4 } \setbaselineskip { 24 bp } \bfseries } + { \contentspush { \thecontentslabel \enskip } } { } + { \SJTU@leaders \thecontentspage } + [ \addvspace { 6 bp } ] +\titlecontents { section } + [ 1 em ] { \zihao { -4 } \setbaselineskip { 20 bp } } + { \contentspush { \thecontentslabel \enskip } } { } + { \SJTU@leaders \thecontentspage } +\titlecontents { subsection } + [ 2 em ] { \zihao { 5 } \setbaselineskip { 16 bp } } + { \contentspush { \thecontentslabel \enskip } } { } + { \SJTU@leaders \thecontentspage } +\keys_set:nn { sjtu / style } + { num-sep = { - } } +\__sjtu_if_main_lang_zh:T + { + \def \SJTU@fullwidth@paren #1 { ( #1 ) } + \AddToHook { cmd / appendix / before } + { + \ctex_set:nn { chapter } + { tocline = #2 \CTEXifname{\SJTU@fullwidth@paren\CTEXthechapter}{} } + \ctex_patch_cmd:Nnn \@makechapterhead + { {\CTEXifname{\CTEX@chaptername\CTEX@chapter@aftername}{}} } { } + \ctex_patch_cmd:Nnn \@makechapterhead + { \CTEX@chapter@aftertitle } + { + {\CTEXifname{\SJTU@fullwidth@paren\CTEX@chaptername}{}} + \CTEX@chapter@aftertitle + } + \def \chaptermark #1 + { \markboth{#1\CTEXifname{\SJTU@fullwidth@paren\CTEXthechapter}{}}{} } + } + \AddToHook { cmd / appendix / after } + { + \ctex_set:nn { chapter } + { number = \arabic { chapter } } + \def \thechapter { A \arabic { chapter } } + } + } +\endinput +%% +%% End of file `sjtu-thesis-preset-jwc.def'.