-
Notifications
You must be signed in to change notification settings - Fork 792
feat: replace bachelor thesis patch with new JWC thesis preset #1138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
eafa8b4
feat: replace bachelor thesis patch with new JWC thesis preset
AlexaraWu ce2c3da
chore: mv preset file into texmf
AlexaraWu 14300d1
feat: set appendix chapter headings in JWC thesis preset
AlexaraWu 54cf795
feat: show frontmatter headings in TOC
AlexaraWu 0f25913
feat: update abstract heading in JWC thesis preset
AlexaraWu c2fbe99
feat: set appendix chapter numbering format in JWC thesis preset
AlexaraWu e5af258
docs: add preset notes in main
LogCreative File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
texmf/tex/latex/sjtutex/preset/sjtu-thesis-preset-jwc.def
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| %% | ||
| %% Copyright (C) SJTUG | ||
| %% 2018--2026 Weijian Wu <alexarawu@outlook.com> | ||
| %% 2022--2026 Zilong Li <logcreative@outlook.com> | ||
| %% 2024--2026 Boshi Yuan <nemoyuan2008@outlook.com> | ||
| %% | ||
| %% 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'. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.