% \iffalse meta-comment % % Copyright (C) SJTUG % 2018--2025 Weijian Wu <alexarawu@outlook.com> % 2022--2025 Zilong Li <logcreative@outlook.com> % 2024--2025 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: % % 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. % %<*internal> \iffalse %</internal> % %<*internal> \fi \begingroup \def\NameOfLaTeXe{LaTeX2e} \expandafter\endgroup\ifx\NameOfLaTeXe\fmtname\else \csname fi\endcsname %</internal> % %<*install> \input ctxdocstrip.tex \keepsilent \askforoverwritefalse \preamble Copyright (C) SJTUG 2018--2025 Weijian Wu <alexarawu@outlook.com> 2022--2025 Zilong Li <logcreative@outlook.com> 2024--2025 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: 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. \endpreamble \generate{ \usedir{tex/latex/sjtutex} \file{sjtuthesis.cls} {\from{\jobname.dtx}{class,thesis}} \file{sjtureport.cls} {\from{\jobname.dtx}{class,report}} \file{sjtuarticle.cls} {\from{\jobname.dtx}{class,article}} \file{sjtu-lang-zh.def} {\from{\jobname.dtx}{lang,zh}} \file{sjtu-lang-en.def} {\from{\jobname.dtx}{lang,en}} \file{sjtu-lang-de.def} {\from{\jobname.dtx}{lang,de}} \file{sjtu-lang-ja.def} {\from{\jobname.dtx}{lang,ja}} \file{sjtu-scheme-zh.def} {\from{\jobname.dtx}{scheme,zh}} \file{sjtu-scheme-en.def} {\from{\jobname.dtx}{scheme,en}} \file{sjtu-scheme-de.def} {\from{\jobname.dtx}{scheme,de}} \file{sjtu-scheme-ja.def} {\from{\jobname.dtx}{scheme,ja}} \file{sjtu-thesis-zh.def} {\from{\jobname.dtx}{thesis-i18n,zh}} \file{sjtu-thesis-en.def} {\from{\jobname.dtx}{thesis-i18n,en}} \file{sjtu-thesis-de.def} {\from{\jobname.dtx}{thesis-i18n,de}} \file{sjtu-thesis-ja.def} {\from{\jobname.dtx}{thesis-i18n,ja}} \file{sjtu-text-font-newtx.def} {\from{\jobname.dtx}{font,text,type1,newtx}} \file{sjtu-text-font-newpx.def} {\from{\jobname.dtx}{font,text,type1,newpx}} \file{sjtu-text-font-lm.def} {\from{\jobname.dtx}{font,text,type1,lm}} \file{sjtu-text-font-times.def} {\from{\jobname.dtx}{font,text,type1,times}} \file{sjtu-text-font-libertinus.def}{\from{\jobname.dtx}{font,text,libertinus}} \file{sjtu-text-font-stixtwo.def} {\from{\jobname.dtx}{font,text,stixtwo}} \file{sjtu-text-font-cambria.def} {\from{\jobname.dtx}{font,text,otf,cambria}} \file{sjtu-text-font-newcm.def} {\from{\jobname.dtx}{font,text,otf,newcm}} \file{sjtu-text-font-xits.def} {\from{\jobname.dtx}{font,text,otf,xits}} \file{sjtu-math-font-newtx.def} {\from{\jobname.dtx}{font,math,type1,newtx}} \file{sjtu-math-font-newpx.def} {\from{\jobname.dtx}{font,math,type1,newpx}} \file{sjtu-math-font-lm.def} {\from{\jobname.dtx}{font,math,type1,lm}} \file{sjtu-math-font-times.def} {\from{\jobname.dtx}{font,math,type1,times}} \file{sjtu-math-font-libertinus.def}{\from{\jobname.dtx}{font,math,libertinus}} \file{sjtu-math-font-stixtwo.def} {\from{\jobname.dtx}{font,math,stixtwo}} \file{sjtu-math-font-cambria.def} {\from{\jobname.dtx}{font,math,otf,cambria}} \file{sjtu-math-font-newcm.def} {\from{\jobname.dtx}{font,math,otf,newcm}} \file{sjtu-math-font-xits.def} {\from{\jobname.dtx}{font,math,otf,xits}} \file{sjtu-cjk-font-windows.def} {\from{\jobname.dtx}{font,cjk,windows}} \file{sjtu-cjk-font-mac.def} {\from{\jobname.dtx}{font,cjk,mac}} \file{sjtu-cjk-font-ubuntu.def} {\from{\jobname.dtx}{font,cjk,ubuntu}} \file{sjtu-cjk-font-adobe.def} {\from{\jobname.dtx}{font,cjk,adobe}} \file{sjtu-cjk-font-fandol.def} {\from{\jobname.dtx}{font,cjk,fandol}} \file{sjtu-cjk-font-founder.def} {\from{\jobname.dtx}{font,cjk,founder}} \file{sjtu-cjk-font-hanyi.def} {\from{\jobname.dtx}{font,cjk,hanyi}} %</install> %<*internal> \usedir{source/latex/sjtutex} \file{\jobname.ins} {\from{\jobname.dtx}{install}} %</internal> %<*install> } \obeyspaces \Msg{*************************************************************} \Msg{* *} \Msg{* To finish the installation you have to move the following *} \Msg{* files into a directory searched by TeX: *} \Msg{* *} \Msg{* The recommended directory is TDS:tex/latex/sjtutex *} \Msg{* *} \Msg{* sjtuthesis.cls *} \Msg{* sjtureport.cls *} \Msg{* sjtuarticle.cls *} \Msg{* sjtu-lang-de.def *} \Msg{* sjtu-lang-en.def *} \Msg{* sjtu-lang-ja.def *} \Msg{* sjtu-lang-zh.def *} \Msg{* sjtu-scheme-de.def *} \Msg{* sjtu-scheme-en.def *} \Msg{* sjtu-scheme-ja.def *} \Msg{* sjtu-scheme-zh.def *} \Msg{* sjtu-thesis-de.def *} \Msg{* sjtu-thesis-en.def *} \Msg{* sjtu-thesis-ja.def *} \Msg{* sjtu-thesis-zh.def *} \Msg{* sjtu-text-font-cambria.def *} \Msg{* sjtu-text-font-libertinus.def *} \Msg{* sjtu-text-font-lm.def *} \Msg{* sjtu-text-font-newcm.def *} \Msg{* sjtu-text-font-newpx.def *} \Msg{* sjtu-text-font-newtx.def *} \Msg{* sjtu-text-font-stixtwo.def *} \Msg{* sjtu-text-font-times.def *} \Msg{* sjtu-text-font-xits.def *} \Msg{* sjtu-math-font-cambria.def *} \Msg{* sjtu-math-font-libertinus.def *} \Msg{* sjtu-math-font-lm.def *} \Msg{* sjtu-math-font-newcm.def *} \Msg{* sjtu-math-font-newpx.def *} \Msg{* sjtu-math-font-newtx.def *} \Msg{* sjtu-math-font-stixtwo.def *} \Msg{* sjtu-math-font-times.def *} \Msg{* sjtu-math-font-xits.def *} \Msg{* sjtu-cjk-font-adobe.def *} \Msg{* sjtu-cjk-font-fandol.def *} \Msg{* sjtu-cjk-font-founder.def *} \Msg{* sjtu-cjk-font-hanyi.def *} \Msg{* sjtu-cjk-font-mac.def *} \Msg{* sjtu-cjk-font-ubuntu.def *} \Msg{* sjtu-cjk-font-windows.def *} \Msg{* sjtu-vi-badge-cor-red.pdf *} \Msg{* sjtu-vi-badge-reg-red.pdf *} \Msg{* sjtu-vi-logo-eng-h-cor-red.pdf *} \Msg{* sjtu-vi-logo-eng-h-reg-red.pdf *} \Msg{* sjtu-vi-logo-std-c-cor-red.pdf *} \Msg{* sjtu-vi-logo-std-c-reg-red.pdf *} \Msg{* sjtu-vi-logo-std-h-cor-red.pdf *} \Msg{* sjtu-vi-logo-std-h-reg-red.pdf *} \Msg{* sjtu-vi-logo-std-v-cor-red.pdf *} \Msg{* sjtu-vi-logo-std-v-reg-red.pdf *} \Msg{* *} \Msg{* To produce the documentation, run the file sjtutex.dtx *} \Msg{* through XeLaTeX. *} \Msg{* *} \Msg{* Happy TeXing! *} \Msg{* *} \Msg{*************************************************************} \endbatchfile %</install> % %<*internal> \fi %</internal> % %<*class> \NeedsTeXFormat{LaTeX2e}[2024-06-01] \providecommand\IfFormatAtLeastTF{\@ifl@t@r\fmtversion} \IfFormatAtLeastTF{2024-06-01}{} {\PackageError{sjtutex} {Your LaTeX format is outdated!\MessageBreak\MessageBreak Release '2024-06-01' or newer is required to\MessageBreak compile this document.\MessageBreak\MessageBreak Please update your TeX distribution}{}} %</class> %<*!(driver|install)> %<+!driver>\GetIdInfo$Id: sjtutex.dtx 24e1ee7 2025-03-29 01:12:32 +0800 Alexara Wu <alexarawu@outlook.com> $ %<class&thesis> {Thesis document class for Shanghai Jiao Tong University (SJTUTeX)} %<class&thesis>\ProvidesExplClass{sjtuthesis} %<class&report> {Report document class for Shanghai Jiao Tong University (SJTUTeX)} %<class&report>\ProvidesExplClass{sjtureport} %<class&article> {Article document class for Shanghai Jiao Tong University (SJTUTeX)} %<class&article>\ProvidesExplClass{sjtuarticle} %<lang&zh> {Chinese specific definition (SJTUTeX)} %<lang&zh>\ProvidesExplFile{sjtu-lang-zh.def} %<lang&en> {English specific definition (SJTUTeX)} %<lang&en>\ProvidesExplFile{sjtu-lang-en.def} %<lang&de> {German specific definition (SJTUTeX)} %<lang&de>\ProvidesExplFile{sjtu-lang-de.def} %<lang&ja> {Japanese specific definition (SJTUTeX)} %<lang&ja>\ProvidesExplFile{sjtu-lang-ja.def} %<scheme&zh> {Chinese scheme (SJTUTeX)} %<scheme&zh>\ProvidesExplFile{sjtu-scheme-zh.def} %<scheme&en> {English scheme (SJTUTeX)} %<scheme&en>\ProvidesExplFile{sjtu-scheme-en.def} %<scheme&de> {German scheme (SJTUTeX)} %<scheme&de>\ProvidesExplFile{sjtu-scheme-de.def} %<scheme&ja> {Japanese scheme (SJTUTeX)} %<scheme&ja>\ProvidesExplFile{sjtu-scheme-ja.def} %<thesis-i18n&zh> {Chinese config for thesis (SJTUTeX)} %<thesis-i18n&zh>\ProvidesExplFile{sjtu-thesis-zh.def} %<thesis-i18n&en> {English config for thesis (SJTUTeX)} %<thesis-i18n&en>\ProvidesExplFile{sjtu-thesis-en.def} %<thesis-i18n&de> {German config for thesis (SJTUTeX)} %<thesis-i18n&de>\ProvidesExplFile{sjtu-thesis-de.def} %<thesis-i18n&ja> {Japanese config for thesis (SJTUTeX)} %<thesis-i18n&ja>\ProvidesExplFile{sjtu-thesis-ja.def} %<font&text&newtx> {New TX text fonts definition (SJTUTeX)} %<font&text&newtx>\ProvidesExplFile{sjtu-text-font-newtx.def} %<font&text&newpx> {New PX text fonts definition (SJTUTeX)} %<font&text&newpx>\ProvidesExplFile{sjtu-text-font-newpx.def} %<font&text&lm> {Latin Modern text fonts definition (SJTUTeX)} %<font&text&lm>\ProvidesExplFile{sjtu-text-font-lm.def} %<font&text×> {Times text fonts definition (SJTUTeX)} %<font&text×>\ProvidesExplFile{sjtu-text-font-times.def} %<font&text&stixtwo> {STIX Two text fonts definition (SJTUTeX)} %<font&text&stixtwo>\ProvidesExplFile{sjtu-text-font-stixtwo.def} %<font&text&libertinus> {Libertinus text fonts definition (SJTUTeX)} %<font&text&libertinus>\ProvidesExplFile{sjtu-text-font-libertinus.def} %<font&text&cambria> {Cambria text fonts definition (SJTUTeX)} %<font&text&cambria>\ProvidesExplFile{sjtu-text-font-cambria.def} %<font&text&newcm> {New Computer Modern text fonts definition (SJTUTeX)} %<font&text&newcm>\ProvidesExplFile{sjtu-text-font-newcm.def} %<font&text&xits> {XITS text fonts definition (SJTUTeX)} %<font&text&xits>\ProvidesExplFile{sjtu-text-font-xits.def} %<font&math&newtx> {New TX math fonts definition (SJTUTeX)} %<font&math&newtx>\ProvidesExplFile{sjtu-math-font-newtx.def} %<font&math&newpx> {New PX math fonts definition (SJTUTeX)} %<font&math&newpx>\ProvidesExplFile{sjtu-math-font-newpx.def} %<font&math&lm> {Latin Modern math fonts definition (SJTUTeX)} %<font&math&lm>\ProvidesExplFile{sjtu-math-font-lm.def} %<font&math×> {Times math fonts definition (SJTUTeX)} %<font&math×>\ProvidesExplFile{sjtu-math-font-times.def} %<font&math&stixtwo> {STIX Two math fonts definition (SJTUTeX)} %<font&math&stixtwo>\ProvidesExplFile{sjtu-math-font-stixtwo.def} %<font&math&libertinus> {Libertinus math fonts definition (SJTUTeX)} %<font&math&libertinus>\ProvidesExplFile{sjtu-math-font-libertinus.def} %<font&math&cambria> {Cambria math fonts definition (SJTUTeX)} %<font&math&cambria>\ProvidesExplFile{sjtu-math-font-cambria.def} %<font&math&newcm> {New Computer Modern math fonts definition (SJTUTeX)} %<font&math&newcm>\ProvidesExplFile{sjtu-math-font-newcm.def} %<font&math&xits> {XITS math fonts definition (SJTUTeX)} %<font&math&xits>\ProvidesExplFile{sjtu-math-font-xits.def} %<font&cjk&windows> {Windows CJK fonts definition (SJTUTeX)} %<font&cjk&windows>\ProvidesExplFile{sjtu-cjk-font-windows.def} %<font&cjk&mac> {macOS CJK fonts definition (SJTUTeX)} %<font&cjk&mac>\ProvidesExplFile{sjtu-cjk-font-mac.def} %<font&cjk&ubuntu> {Ubuntu CJK fonts definition (SJTUTeX)} %<font&cjk&ubuntu>\ProvidesExplFile{sjtu-cjk-font-ubuntu.def} %<font&cjk&adobe> {Adobe CJK fonts definition (SJTUTeX)} %<font&cjk&adobe>\ProvidesExplFile{sjtu-cjk-font-adobe.def} %<font&cjk&fandol> {Fandol CJK fonts definition (SJTUTeX)} %<font&cjk&fandol>\ProvidesExplFile{sjtu-cjk-font-fandol.def} %<font&cjk&founder> {Founder CJK fonts definition (SJTUTeX)} %<font&cjk&founder>\ProvidesExplFile{sjtu-cjk-font-founder.def} %<font&cjk&hanyi> {Hanyi CJK fonts definition (SJTUTeX)} %<font&cjk&hanyi>\ProvidesExplFile{sjtu-cjk-font-hanyi.def} %<!driver> {\ExplFileDate}{2.2.1}{\ExplFileDescription} %</!(driver|install)> % %<*driver> \PassOptionsToPackage{fontset=ubuntu}{ctex} \documentclass{ctxdoc} \newcommand{\sjtutex}{SJTU\TeX} \expandafter\def\csname ver@\jobname.dtx\endcsname {2025/03/29 v2.2.1 SJTUTeX} \usepackage{float} \usepackage{multirow} \usepackage{longtable} \usepackage{listings} \AtEndOfClass{\sloppy} \definecolor{sjtu-red}{RGB}{200,22,30} \definecolor{sjtu-dark-red}{RGB}{167,32,56} \definecolor{sjtu-amber}{RGB}{253,208,0} \definecolor{sjtu-orange}{RGB}{240,131,0} \definecolor{sjtu-blue}{RGB}{0,134,209} \definecolor{sjtu-dark-blue}{RGB}{0,64,152} \definecolor{sjtu-green}{RGB}{51,141,39} \definecolor{sjtu-dark-green}{RGB}{0,81,78} \lstdefinestyle{style@base}{^^A basewidth = 0.5 em, gobble = 2, lineskip = 2 pt, frame = l, framerule = 1.2 pt, framesep = 0 pt, escapeinside = {(*}{*)}, basicstyle = \small\ttfamily, xleftmargin = 0.5 em, xrightmargin = 0.5 em, framexleftmargin = 0.5 em, framexrightmargin = 0.5 em} \lstdefinestyle{style@shell}{^^A style = style@base, rulecolor = \color{sjtu-dark-green}, backgroundcolor = \color{sjtu-dark-green!2}, language = bash, alsoletter = {-}, keywordstyle = \color{sjtu-green}, emphstyle = \color{sjtu-amber}} \lstdefinestyle{style@latex}{^^A style = style@base, rulecolor = \color{sjtu-dark-blue}, backgroundcolor = \color{sjtu-dark-blue!2}, language = [LaTeX]TeX, alsoletter = {*, -}, keywordstyle = \color{sjtu-dark-red!80}, texcsstyle = *\color{sjtu-blue}, emphstyle = [1]\color{sjtu-orange}, emphstyle = [2]\color{sjtu-green}, emphstyle = [3]\color{sjtu-dark-blue!80}} \lstnewenvironment{shell}[1][]{^^A \lstset{style=style@shell, #1}}{} \lstnewenvironment{latex}[1][]{^^A \lstset{style=style@latex, #1}}{} \newcommand\TNA[1]{\textcolor{sjtu-blue}{\tn{#1}}} \newcommand\TNB[1]{\textcolor{sjtu-dark-red!80}{\tn{#1}}} \newcommand\OPT[1]{\textcolor{sjtu-dark-blue!80}{#1}} \newcommand\OPS[1]{\textcolor{sjtu-green}{#1}} \newcommand\ENV[1]{\textcolor{sjtu-orange}{#1}} \newcommand\BEV[1]{\TNA{begin}\{\ENV{#1}\}} \newcommand\EEV[1]{\TNA{end}\{\ENV{#1}\}} \newcommand\note[1]{{^^A \color{sjtu-dark-green}{\noindent\bfseries 说明:}~\emph{#1}}} \newcommand\sjtutexrev[1]{^^A \href{https://github.com/sjtug/SJTUTeX/commit/#1}{\texttt{sjtutex} rev. #1}} \hypersetup{^^A bookmarksnumbered = true, bookmarksopen = true} \makeatletter \pdfstringdefDisableCommands{^^A \let\color\@gobble} \makeatother \begin{document} \DocInput{\jobname.dtx} \IndexLayout \PrintChanges \PrintIndex \end{document} %</driver> % \fi % % \changes{v2.0}{2021/09/10}{应用 \LaTeXiii{} 釿ž„代ç 。} % \changes{v2.0}{2022/12/27}{新增文档类 \cls{sjtuarticle} å’Œ \cls{sjtureport}。} % % \GetFileId{\jobname.dtx} % % \title{\bfseries\color{sjtu-red}\sjtutex{}: ä¸Šæµ·äº¤é€šå¤§å¦æ–‡æ¡£ç±»é›†} % \author{SJTUG} % \date{\filedate\quad\fileversion\thanks{\sjtutexrev{\ExplFileVersion}.}} % % \hypersetup{^^A % pdfsubject = {ä¸Šæµ·äº¤é€šå¤§å¦æ–‡æ¡£ç±»é›†ä½¿ç”¨è¯´æ˜Ž}, % pdfkeywords = {模æ¿; 上海交通大å¦; 使用说明}} % % \maketitle % % \begin{abstract} % æ¤å®åŒ…æ—¨åœ¨å»ºç«‹ä¸€ä¸ªç®€å•æ˜“ç”¨çš„ä¸Šæµ·äº¤é€šå¤§å¦æ–‡æ¡£ç±»é›†ï¼ŒåŒ…括å¦ä½è®ºæ–‡æ–‡æ¡£ç±» % \cls{sjtuthesis} ä»¥åŠæ™®é€šæ–‡æ¡£ç±» \cls{sjtuarticle} å’Œ \cls{sjtureport}。 % \end{abstract} % % \def\abstractname{å…责声明} % \begin{abstract} % \noindent % \begin{enumerate} % \item 本模æ¿çš„å‘布éµå®ˆ \href{https://www.latex-project.org/lppl/lppl-1-3c.txt} % {\LaTeX{} Project Public License (1.3c)},使用å‰è¯·è®¤çœŸé˜…读å议内容。 % \item å¦ä½è®ºæ–‡æ¨¡æ¿æ ¹æ® \href{https://www.gs.sjtu.edu.cn/post/detail/Z3MxNDc=} % {《上海交通大å¦åšå£«ã€ç¡•士å¦ä½è®ºæ–‡æ’°å†™æŒ‡å—》} ,并å‚考 % \href{https://www.jwc.sjtu.edu.cn/info/1041/117021.htm} % {ã€Šä¸Šæµ·äº¤é€šå¤§å¦æœ¬ç§‘生毕业设计(论文)撰写规范》} % 编写而æˆã€‚旨在供上海交通大å¦å‡†æ¯•业生撰写å¦ä½è®ºæ–‡ä½¿ç”¨ã€‚ % \item å¦ä½è®ºæ–‡æ¨¡æ¿ä»…为撰写指å—çš„å‚考实现,ä¸ä¿è¯å®¡æŸ¥è€å¸ˆä¸ææ„è§ã€‚任何由于使用 % 本模æ¿è€Œå¼•èµ·çš„è®ºæ–‡æ ¼å¼å®¡æŸ¥é—®é¢˜å‡ä¸Žæœ¬æ¨¡æ¿ä½œè€…æ— å…³ã€‚ % \item 任何个人或组织以本模æ¿ä¸ºåŸºç¡€è¿›è¡Œä¿®æ”¹ã€æ‰©å±•而生æˆçš„æ–°çš„专用模æ¿ï¼Œè¯·ä¸¥æ ¼éµ % 守 \LaTeX{} Project Public License å议。由于è¿çНåè®®è€Œå¼•èµ·çš„ä»»ä½•çº çº·äº‰ç«¯å‡ % 与本模æ¿ä½œè€…æ— å…³ã€‚ % \end{enumerate} % \end{abstract} % % \tableofcontents % % \begin{documentation} % % \section{介ç»} % % 最早的一版 \LaTeX{} å¦ä½è®ºæ–‡æ¨¡æ¿ç”±ä¸€ä½çƒå¿ƒçš„物ç†ç³»åŒå¦åˆ¶ä½œï¼Œä¸æ–‡å—符处ç†é‡‡ç”¨äº† % 当时最为æµè¡Œçš„ CJK--\LaTeX{} 方案。在æ¤åŸºç¡€ä¸Šï¼Œweijianwen æ ¹æ®äº¤å¤§ç ”ç©¶ç”Ÿé™¢å¯¹å¦ % ä½è®ºæ–‡çš„è¦æ±‚,完æˆäº†ä¸€ä»½åŸºæœ¬å¯ç”¨çš„交大 \LaTeX{} å¦ä½è®ºæ–‡æ¨¡æ¿ã€‚由于 CJK--\LaTeX{} % æ–¹æ¡ˆä¸æ˜“使用,weijianwen 与 William Wang å¼€å§‹ç€æ‰‹æŠŠæ¨¡æ¿å‘ \XeTeX{} 引擎移æ¤ã€‚ % ä¹‹åŽ weijianwenåˆæ–æ–ç»ç»åšäº†ä¸€äº›å®Œå–„模æ¿çš„工作,在原有硕士å¦ä½è®ºæ–‡æ¨¡æ¿çš„基础 % 上完æˆäº†äº¤å¤§å¦å£«å’Œåšå£«å¦ä½è®ºæ–‡æ¨¡æ¿ã€‚ % % 2012 å¹´ 5 月模æ¿å¼€å§‹åœ¨ GitHub^^A % \footnote{\url{https://github.com/weijianwen/SJTUThesis},项目转移åŽè¯¥é“¾æŽ¥å·²é‡å®šå‘。}^^A % 上管ç†å’Œæ›´æ–°ï¼Œ2018 å¹´ 1 月项目转移至 SJTUG å下。2019 å¹´ 6 月 Alexara Wu 釿ž„ % 了整个å®åŒ…的代ç ,并使用 Doc\TeX{} 文档和\textsc{DocStrip} 工具进行代ç 的管ç†ï¼Œ % å‡çº§ç‰ˆæœ¬å·ä¸º 1.0。2022 å¹´ 11 æœˆï¼Œè®ºæ–‡æ¨¡æ¿æ”¹ç‰ˆåŽï¼Œä½¿ç”¨ \LaTeXiii{} 釿ž„了代ç , % æ·»åŠ \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类,å‡çº§ç‰ˆæœ¬å·ä¸º 2.0。 % 2024 å¹´ 2 月,\pkg{sjtutex} 文档类集在 CTAN 上å‘布,被 \TeX{} Live 2024 åŠä¹‹åŽ % 的版本收录。 % % 现在,\sjtutex{} 代ç 在 GitHub^^A % \footnote{\url{https://github.com/sjtug/SJTUTeX}}^^A % ä¸Šç»´æŠ¤ï¼Œå¹¶åŒæ¥å‘布至 CTAN\footnote{\url{https://www.ctan.org/pkg/sjtutex}} 上。 % 原 \href{https://github.com/sjtug/SJTUThesis}{SJTUThesis} 仓库则作为å¦ä½è®ºæ–‡ % 示例文档,æä¾›å¼€ç®±å³ç”¨çš„æ¨¡æ¿ã€‚å¦ä½è®ºæ–‡æ¨¡æ¿ç”¨æˆ·å¯ä»¥åœ¨ % \href{https://github.com/sjtug/SJTUThesis/discussions}{Discussions} % 上æé—®ä½¿ç”¨é—®é¢˜ï¼Œä¹Ÿå¯ä»¥åœ¨ % \href{https://github.com/sjtug/SJTUThesis/issues}{Issues} % ä¸è¿›è¡Œ Bug åé¦ˆä¸Žæ–°åŠŸèƒ½ææ¡ˆã€‚如果需è¦å¯¹æ–‡æ¡£ç±»ä»£ç 进行修改,欢迎å‰å¾€ % \href{https://github.com/sjtug/SJTUTeX}{\sjtutex} 仓库进行 Pull Request。 % \sjtutex{} 模æ¿çš„许多实现细节离ä¸å¼€ % \href{https://github.com/sjtug/SJTUThesis/graphs/contributors}{çƒå¿ƒåŒå¦ä»¬} % çš„è´¡çŒ®ï¼Œåœ¨æ¤æ„Ÿè°¢æ‰€æœ‰ä¸ºæ¨¡æ¿è´¡çŒ®è¿‡ä»£ç çš„åŒå¦ä»¬ï¼Œä»¥åŠæ‰€æœ‰æµ‹è¯•和使用模æ¿çš„å„ä½åŒå¦ï¼ % % \note{模æ¿çš„作用在于å‡å°‘è®ºæ–‡å†™ä½œè¿‡ç¨‹ä¸æ ¼å¼è°ƒæ•´çš„æ—¶é—´ï¼Œå‰ææ˜¯éµå®ˆæ¨¡æ¿çš„ç”¨æ³•ï¼Œå¦ % 则å³ä¾¿ç”¨äº† \sjtutex{} 也难以ä¿è¯è¾“出的论文符åˆå¦æ ¡è§„范。} % % \section{简明教程} % % \subsection{安装 \TeX{} å‘行版} % % å› ä¸º \LaTeXiii{} 和相关å®åŒ…åœ¨ä¸æ–更新,所以推è使用最新的 \TeX{} å‘行版。 % \sjtutex{} 支æŒä¸»æµçš„ \TeX{} å‘行版,包括 \TeX{} Liveã€\hologo{MiKTeX}〠% Mac\TeX{}ï¼Œä½†ä¸æ”¯æŒ \CTeX{} 套装。安装方法具体å¯ä»¥å‚考 % \href{https://github.com/sjtug/SJTUThesis/wiki/TeX-å‘行版åŠå…¶å®‰è£…} % {Wiki 页é¢ã€Š\TeX{} å‘行版åŠå…¶å®‰è£…》}。 % % \sjtutex{} éœ€è¦ \LaTeXe{} å†…æ ¸ 2024-06-01 或以上版本,\pkg{ctex} å®åŒ…版本应当 % 在 v2.5 åŠä»¥ä¸Šã€‚ç‰ˆæœ¬è¿‡ä½Žå°†æ— æ³•æ£å¸¸ç¼–译。 % % \subsection{文件组æˆ} % % 表~\ref{tab:files} 列出了 \sjtutex{} çš„ä¸»è¦æ–‡ä»¶åŠå…¶åŠŸèƒ½ä»‹ç»ã€‚ % % \begin{table}[!hbt] % \centering % \begin{threeparttable} % \caption{模æ¿çš„æ–‡ä»¶ç»„æˆ} % \label{tab:files} % \begin{tabular}{l|l|p{4cm}} % \toprule % \strong{类别} & \strong{文件} & \strong{说明} \\ % \midrule % 文档类 & \file{sjtuthesis.cls} & å¦ä½è®ºæ–‡æ–‡æ¡£ç±» \\ % & \file{sjtureport.cls} & 报告文档类 \\ % & \file{sjtuarticle.cls} & 文稿文档类 \\ % & \file{sjtu-lang-*.def} & 文档类è¯è¨€é…ç½® \\ % & \file{sjtu-scheme-*.def} & 文档类è¯è¨€æ–¹æ¡ˆ \\ % & \file{sjtu-thesis-*.def} & å¦ä½è®ºæ–‡è¯è¨€é…ç½® \\ % \midrule % å—体é…置文件 & \file{sjtu-text-font-*.def} & 西文å—体é…ç½® \\ % & \file{sjtu-math-font-*.def} & æ•°å¦å—体é…ç½® \\ % & \file{sjtu-cjk-font-*.def} & CJK å—体é…ç½® \\ % \midrule % 视觉形象系统\tnote{a} & \file{sjtu-vi-logo-*.pdf} & æ ¡æ ‡å›¾ç‰‡ \\ % & \file{sjtu-vi-badge-*.pdf} & æ ¡å¾½å›¾ç‰‡ \\ % % \bottomrule % \end{tabular} % \begin{tablenotes} % \item[a] \href{https://vi.sjtu.edu.cn}{交大视觉形象系统} % 的相关图åƒèµ„æºç‰ˆæƒå½’ä¸Šæµ·äº¤é€šå¤§å¦æ‰€æœ‰ã€‚ % \end{tablenotes} % \end{threeparttable} % \end{table} % % \subsection{使用文档类} % % 共有 3 ç§æ–‡æ¡£ç±»ï¼Œ\cls{sjtuthesis} 用于å¦ä½è®ºæ–‡çš„æŽ’版,\cls{sjtureport} % 用于课程大报告的排版,\cls{sjtuarticle} 用于课程å°è®ºæ–‡çš„æŽ’版。 % % 将文档ä¿å˜åœ¨ä¸‹è½½å¥½çš„ \sjtutex{} æ¨¡æ¿æ ¹ç›®å½•下,或者直接使用 \TeX{} å‘行版 % ä¸çš„ \pkg{sjtutex} 文档类集^^A % \footnote{为了使用最新版本的 \sjtutex{}ï¼Œè¯·åŠæ—¶æ›´æ–°å‘行版至最新的版本:^^A % \TeX{} Live 用户请使用命令 \texttt{tlmgr update --self --all} æ¥æ›´æ–°å…¨éƒ¨å®åŒ…ï¼›^^A % \hologo{MiKTeX} 用户请在 MiKTeX Console 更新选项å¡ä¸æ›´æ–°æ‰€æœ‰å®åŒ…。}, % 文件以 \texttt{.tex} åŽç¼€ç»“尾。 % 注æ„在使用文档类时,需è¦å°†æ¶‰åŠåˆ°çš„æ‰€æœ‰æºæ–‡ä»¶ä½¿ç”¨ UTF-8 ç¼–ç ä¿å˜ã€‚ % 对于ä¸åŒçš„æ–‡æ¡£ç±»ï¼Œä½¿ç”¨æ–¹æ³•略有ä¸åŒï¼Œè¿™é‡Œç»™å‡ºè¿™ä¸‰ç§æ–‡æ¡£ç±»çš„æœ€å°ä½¿ç”¨ç¤ºä¾‹ã€‚ % % 下é¢è¿™ä»½ \TeX{} 文档展示了 \cls{sjtuthesis} æ–‡æ¡£ç±»çš„åŸºæœ¬ç”¨æ³•ï¼Œä¸€èˆ¬éœ€è¦æŒ‡å®š % ä¸è‹±æ–‡å称。该文档将包å«ä¸è‹±æ–‡å°é¢ï¼Œé¡µçœ‰ä¸ºæ–‡æ¡£ä¸»é¢˜åŠç« 节å称。 % \begin{latex}[moretexcs={\sjtusetup,\maketitle,\tableofcontents,\chapter}, % morekeywords={\frontmatter,\mainmatter}, emph={[1]sjtuthesis,document}, % emph={[2]info},emph={[3]type,zh,en,title,author}] % \documentclass[type=master]{sjtuthesis} % \sjtusetup{ % info = { % zh/title = {上海交通大å¦å¦ä½è®ºæ–‡æ¨¡æ¿ç¤ºä¾‹æ–‡æ¡£}, % en/title = {A Sample Document for SJTU Thesis Template}, % zh/author = {æŸæŸ}, % en/author = {Mo Mo}, % } % } % \begin{document} % \maketitle % \frontmatter % \tableofcontents % \mainmatter % \chapter{欢迎} % \section{欢迎使用 SJTUThesis} % ä½ å¥½ï¼Œ\LaTeX{}! % \end{document} % \end{latex} % % 下é¢è¿™ä»½ \TeX{} 文档展示了 \cls{sjtureport} æ–‡æ¡£ç±»çš„åŸºæœ¬ç”¨æ³•ï¼Œå»ºè®®ä½¿ç”¨æ ‡å‡†å‘½ä»¤ % å®šä¹‰ä¸æ–‡åç§°ã€‚è¯¥æ–‡æ¡£å°†åŒ…å«æ ‡é¢˜é¡µï¼Œé¡µçœ‰ä¸ºæ ¡æ ‡å›¾ç‰‡ã€æ–‡æ¡£ä¸»é¢˜åŠç« 节å称。 % \begin{latex}[moretexcs={\subject,\keywords,\maketitle,\chapter}, % emph={[1]sjtureport,document}] % \documentclass{sjtureport} % \title{ä¸Šæµ·äº¤é€šå¤§å¦æŠ¥å‘Šæ¨¡æ¿ç¤ºä¾‹æ–‡æ¡£} % \author{æŸæŸ} % \subject{XX期末课程论文} % \keywords{上海交大, é¥®æ°´æ€æº, çˆ±å›½è£æ ¡} % \begin{document} % \maketitle % \chapter{欢迎} % \section{欢迎使用 SJTUReport} % ä½ å¥½ï¼Œ\LaTeX{}! % \end{document} % \end{latex} % % 下é¢è¿™ä»½ \TeX{} 文档展示了 \cls{sjtuarticle} æ–‡æ¡£ç±»çš„åŸºæœ¬ç”¨æ³•ï¼Œå»ºè®®ä½¿ç”¨æ ‡å‡† % å‘½ä»¤å®šä¹‰ä¸æ–‡å称,ä¸èƒ½å¤Ÿä½¿ç”¨ \tn{chapter} è¿™ä¸€çº§ã€‚è¯¥æ–‡æ¡£åŒ…å«æ ‡é¢˜æ ,页眉为 % æ ¡æ ‡å›¾ç‰‡ã€æ–‡æ¡£ä¸»é¢˜åŠç« 节å称。 % \begin{latex}[moretexcs={\maketitle}, emph={[1]sjtuarticle,document}] % \documentclass{sjtuarticle} % \title{示例文档} % \author{æŸæŸ} % \begin{document} % \maketitle % \section{欢迎使用 SJTUArticle} % ä½ å¥½ï¼Œ\LaTeX{}! % \end{document} % \end{latex} % % \subsection{编译文档} % % 文档类推è使用 \XeLaTeX{} 或 \LuaLaTeX{} ç¼–è¯‘ï¼ŒåŒæ—¶ä¹Ÿæ”¯æŒ \pdfTeX{} 引擎。为了 % ç”Ÿæˆæ£ç¡®çš„目录ã€è„𿳍以åŠäº¤å‰å¼•用,至少需è¦è¿žç»ç¼–译两次。 % % 在实际使用ä¸ï¼Œä¸€èˆ¬æŽ¨è使用自动生æˆå·¥å…· \pkg{latexmk} 编译文档。\pkg{latexmk} % 命令å¯ä»¥è‡ªåŠ¨è¿›è¡Œå¤šæ¥ç¼–译,直到交å‰å¼•用都被解决。 % å‡è®¾æ‚¨çš„ \TeX{} æºæ–‡ä»¶å为 \file{main.tex}, % å¯åœ¨å‘½ä»¤è¡Œä¸æ‰§è¡Œå¦‚下命令使用 \XeLaTeX{} 编译文档: % \begin{shell}[morekeywords={latexmk},emph={-xelatex}] % latexmk -xelatex main % \end{shell} % 也å¯é€šè¿‡ä¿®æ”¹ \file{latexmkrc} é…ç½®æ–‡ä»¶æ¥æŽ§åˆ¶ \pkg{latexmk} 的行为, % 具体å¯ä»¥å‚考 \pkg{latexmk} 文档。 % % \section{文档é…ç½®} % % 本模æ¿ä¸çš„选项ã€å‘½ä»¤æˆ–环境å¯ä»¥åˆ†ä¸ºä»¥ä¸‹ä¸‰ç±»ï¼š % \begin{itemize} % \item åå—åŽé¢å¸¦æœ‰ \rexptarget\rexpstar{} 的,表示åªèƒ½åœ¨ \cls{sjtuthesis} % 文档类ä¸ä½¿ç”¨ï¼› % \item åå—åŽé¢å¸¦æœ‰ \exptarget\expstar{} 的,表示åªèƒ½åœ¨ \cls{sjtureport} % å’Œ \cls{sjtuarticle} 文档类ä¸ä½¿ç”¨ï¼› % \item åå—åŽé¢ä¸å¸¦æœ‰ç‰¹æ®Šç¬¦å·çš„,一般表示在 \cls{sjtuthesis}ã€\cls{sjtureport} % å’Œ \cls{sjtuarticle} 文档类ä¸éƒ½å¯ä»¥ä½¿ç”¨ï¼Œç‰¹æ®Šæƒ…况å¦ä½œè¯´æ˜Žã€‚ % \end{itemize} % % \subsection{文档类选项} % % æœ¬èŠ‚æ‰€æŒ‡â€œæ–‡æ¡£ç±»é€‰é¡¹â€æ˜¯æŒ‡éœ€è¦åœ¨å¼•入文档类的时候指定的选项: % % \begin{latex}[emph={[1]sjtuthesis}] % \documentclass(*\oarg{文档类选项}*){sjtuthesis} % \end{latex} % % 部分选项采用 \meta{key}|=|\meta{value} 的形å¼ï¼Œéœ€è¦ä½¿ç”¨é€—å·åˆ†éš”å„选项。 % 当 \meta{value} çœç•¥æ—¶ï¼Œå°†é‡‡ç”¨é»˜è®¤å€¼ã€‚ % 在下文的说明ä¸ï¼Œå°†ç”¨\textbf{粗体}表示默认值。 % % \subsubsection{通用选项} % % \begin{function}[rEXP,updated=2022-12-03]{type} % \begin{syntax} % \OPT{type} = <bachelor|(master)|doctor> % \end{syntax} % 论文类型。三ç§é€‰é¡¹åˆ†åˆ«ä»£è¡¨å¦å£«å¦ä½è®ºæ–‡ã€ç¡•士å¦ä½è®ºæ–‡ã€åšå£«å¦ä½è®ºæ–‡ã€‚ % \end{function} % % \begin{function}[updated=2023-03-23]{lang} % \begin{syntax} % \OPT{lang} = <(zh)|en|de|ja> % \end{syntax} % 论文主è¦è¯è¨€ã€‚å¯é€‰ä¸æ–‡ã€è‹±æ–‡ã€å¾·æ–‡æˆ–æ—¥æ–‡ï¼Œè¯¥é€‰é¡¹ä¼šæ”¹å˜æ–‡æ¡£ä¸çš„ä¸€äº›æ ‡é¢˜çš„åå—。 % ä¸‹æ–‡ä¸ \meta{lang} å¯ä»¥æŒ‡å®šä¸ºè¿™äº›é€‰é¡¹ä¸çš„å…¶ä¸ä¹‹ä¸€ã€‚ % \end{function} % % \begin{function}{draft, final} % 是å¦å¼€å¯è‰ç¨¿æ¨¡å¼ã€‚ % \opt{draft} å¼€å¯è‰ç¨¿æ¨¡å¼ï¼Œæ‰€æœ‰çš„图片将ä¸ä¼šè¢«åŠ è½½ï¼Œè¶…è¿‡è¾¹ç•Œçš„åŒºåŸŸå°†ä¼šè¢«æ¶‚ä¸Šé»‘è‰²è‰²å—。 % \opt{final} å…³é—è‰ç¨¿æ¨¡å¼ã€‚ % 默认为 \opt{final}。 % \end{function} % % \begin{function}[rEXP,updated=2025-01-14]{review} % 盲审模å¼ã€‚å¼€å¯ç›²å®¡æ¨¡å¼ä¼šå°†ä½œè€…å§“åã€å¯¼å¸ˆå§“åã€å¦å·ã€åŸºé‡‘ç‰ä¸ªäººä¿¡æ¯ç•™ç©ºï¼Œ % å¹¶ä½¿å¾—æ ‡é¢˜é¡µçš„ä¿¡æ¯è¡¨æ ¼å¼ºåˆ¶æ˜¾ç¤ºç›¸å…³å—段, % 相关说明详è§ç¬¬ \ref{sec:sjtuthesiskey} 节; % å¼€å¯ç›²å®¡æ¨¡å¼è¿˜ä¼šåˆ 去版æƒä½¿ç”¨æŽˆæƒä¹¦ã€åŽŸåˆ›æ€§å£°æ˜Žå’Œè‡´è°¢é¡µã€‚é»˜è®¤å…³é—。 % \end{function} % % \subsubsection{页é¢è®¾ç½®} % % \begin{function}{oneside, twoside} % 指明论文的å•åŒé¢æ¨¡å¼ã€‚ % \opt{oneside} 为å•颿¨¡å¼ï¼Œ % \opt{twoside} 为åŒé¢æ¨¡å¼ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{twoside}。 % \item 在 \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{oneside}。 % \end{itemize} % \end{function} % % \begin{function}{openright, openany} % 指明论文是å¦å¥‡æ•°é¡µå¼€ç« 。 % \opt{openright} ä¸ºä»Žå¥‡æ•°é¡µå¼€å§‹æ–°ç« ï¼Œ % \opt{openany} 为从任æ„é¡µå¼€å§‹æ–°ç« ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{openright}。 % \item 在 \cls{sjtureport} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{openany}。 % \item 在 \cls{sjtuarticle} 文档类ä¸ï¼Œè¯¥é€‰é¡¹ä¸å¯ç”¨ã€‚ % \end{itemize} % \end{function} % % \begin{function}[EXP,added=2022-12-23]{titlepage, notitlepage} % æŒ‡æ˜Žè®ºæ–‡çš„æ ‡é¢˜å½¢å¼ã€‚ % \opt{titlepage} ä¸ºä½¿ç”¨æ ‡é¢˜é¡µã€‚ % \opt{notitlepage} ä¸ºä½¿ç”¨æ ‡é¢˜å—。 % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼Œè¯¥é€‰é¡¹ä¸å¯ç”¨ï¼Œåªèƒ½ä½¿ç”¨æ ‡é¢˜é¡µã€‚ % \item 在 \cls{sjtureport} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{titlepage}。 % \item 在 \cls{sjtuarticle} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{notitlepage}。 % \end{itemize} % \end{function} % % \subsubsection{å—体选项} % \label{sec:fontsetup} % % \begin{function}[updated=2022-12-18]{zihao} % \begin{syntax} % \OPT{zihao} = <(-4)|5> % \end{syntax} % 论文默认å—å·ï¼Œå¯ä»¥è®¾å®šä¸ºå°å››å·æˆ–五å·ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} å’Œ \cls{sjtureport} 文档类ä¸é»˜è®¤ä¸ºå°å››å·; % \item 在 \cls{sjtuarticle} 文档类ä¸é»˜è®¤ä¸ºäº”å·ã€‚ % \end{itemize} % \end{function} % % \begin{function}[added=2023-10-24]{linespread} % \begin{syntax} % \OPT{linespread} = <数值> % \end{syntax} % 设置行è·å€æ•°ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸é»˜è®¤ä¸è°ƒæ•´è¡Œè·å€æ•°; % \item 在 \cls{sjtuarticle} å’Œ \cls{sjtureport} 文档类ä¸é»˜è®¤ä¸º 1.3。 % \end{itemize} % \end{function} % % \begin{function}[added=2023-10-24]{baselineskip} % \begin{syntax} % \OPT{baselineskip} = <长度|false> % \end{syntax} % æ£æ–‡åŸºçº¿é—´è·ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼Œé»˜è®¤ä¸º 20 磅。 % \item 在 \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类ä¸ï¼Œé»˜è®¤ä¸º \opt{false}ï¼› % æ¤æ—¶æ£æ–‡åŸºçº¿é—´è·ä¸ºå—å·çš„ 1.2 å€ã€‚ % \end{itemize} % \end{function} % % \begin{function}{cjk-font} % \begin{syntax} % \OPT{cjk-font} = <(auto)|windows|mac|ubuntu|adobe|(fandol)|founder|hanyi|none> % \end{syntax} % 指定 CJK å—体集。\sjtutex{} 预定义了一些 CJK å—体组åˆï¼Œ % 具体é…ç½®è§è¡¨ \ref{tab:cjkfonts}。 % é»˜è®¤æƒ…å†µä¸‹ä¼šæ ¹æ®æ“作系统自动é…置: % Windows 系统默认使用 \opt{windows}, % macOS 系统默认使用 \opt{mac}, % Linux 系统默认使用 \opt{fandol}。 % 找ä¸åˆ°å¯¹åº”定义的 CJK å—体集时的回退选项为 \opt{fandol}。 % % \textbf{ä»…} \opt{windows}ã€\opt{founder} å’Œ \opt{hanyi} å—ä½“é›†æ”¯æŒ \pdfLaTeX{} ç›´æŽ¥ç”Ÿæˆ PDF。 % å…¶ä»– CJK å—体集使用 \pdfTeX{} 引擎需è¦å…ˆé€šè¿‡ \LaTeX{} ç”Ÿæˆ DVI, % ç„¶åŽå†ä½¿ç”¨ DVIPDFM\textit{x} 转æ¢ä¸º PDF。 % \end{function} % % \begin{table}[ht] % \centering\small % \setlength\leftskip{0pt plus 1 fil minus \marginparwidth} % \begin{threeparttable} % \caption{CJK å—体é…ç½®} % \label{tab:cjkfonts} % \tabcolsep=3pt % \begin{tabular}{ccccccc} % \toprule % & \strong{宋体} & \strong{黑体} & \strong{仿宋} & \strong{楷体} & \strong{明æœä½“}\tnote{c} & \strong{哥特体}\tnote{c} \\ % \midrule % |windows| & ï¼ˆä¸æ˜“)宋体 & ï¼ˆä¸æ˜“)黑体 & ï¼ˆä¸æ˜“)仿宋 & ï¼ˆä¸æ˜“)楷体 & MS Mincho & MS Gothic \\ % |mac| & ï¼ˆåŽæ–‡ï¼‰å®‹ä½“-简 & ï¼ˆåŽæ–‡ï¼‰é»‘体-简 & åŽæ–‡ä»¿å®‹ & ï¼ˆåŽæ–‡ï¼‰æ¥·ä½“-简 & Hiragino Mincho ProN & Hiragino Kaku Gothic ProN \\ % |ubuntu| & Noto Serif CJK SC & Noto Sans CJK SC & --- & 文鼎 PL ç®€ä¸æ¥· & Noto Serif CJK JP & Noto Sans CJK JP \\ % |adobe| & Adobe 宋体 & Adobe 黑体 & Adobe 仿宋 & Adobe 楷体 & Kozuka Mincho Pr6N & Kozuka Gothic Pr6N \\ % |fandol|\tnote{a} & Fandol 宋体 & Fandol 黑体 & Fandol 仿宋 & Fandol 楷体 & HaranoAjiMincho & HaranoAjiGothic \\ % |founder|\tnote{b} & æ–¹æ£ä¹¦å®‹ & æ–¹æ£é»‘体 & æ–¹æ£ä»¿å®‹ & æ–¹æ£æ¥·ä½“ & IPAMincho & IPAGothic \\ % |hanyi| & 汉仪书宋二 S & 汉仪ä¸é»‘ S & 汉仪仿宋 S & 汉仪楷体 S & HaranoAjiMincho & HaranoAjiGothic \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \item[a] å‘行版ä¸è‡ªå¸¦çš„ Fandol 䏿–‡å—库容易出现缺å—的情况; % 我们建议 Linux 用户使用 \opt{ubuntu} 选项或自行é…ç½®åˆé€‚çš„å—体;å‚è§ % \href{https://github.com/sjtug/SJTUThesis/wiki/在线使用说明} % {Wiki 页é¢ã€Šåœ¨çº¿ä½¿ç”¨è¯´æ˜Žã€‹}。 % \item[b] é…ç½® \opt{founder} 选项使用方æ£ç®€ç¹æ‰©å±•ç‰ˆï¼ˆå³ GBK 版)å—体。 % \item[c] æ—¥æ–‡æ¨¡æ¿æ‰éœ€è¦æ—¥æ–‡æ˜Žæœä½“与哥特体;日文å—体使用 \pkg{fontspec} % å®åŒ…设置,故日文模æ¿ä¸æ”¯æŒ \pdfTeX{} 引擎,请使用 \XeLaTeX{} 或 % \LuaLaTeX{} 编译。 % \end{tablenotes} % \end{threeparttable} % \end{table} % % \begin{function}{text-font} % \begin{syntax} % \OPT{text-font} = <(newtx)|times|stixtwo|xits|newpx|cambria|newcm|lm|libertinus|none> % \end{syntax} % 指定西文å—体集。\sjtutex{} 预定义了一些西文å—体组åˆï¼Œ % 具体é…ç½®è§è¡¨ \ref{tab:latinfonts}。 % 找ä¸åˆ°å®šä¹‰çš„西文å—体集时的回退选项为 \opt{newtx}。 % \end{function} % % \begin{function}{math-font} % \begin{syntax} % \OPT{math-font} = <(auto)|(newtx)|times|stixtwo|xits|newpx|cambria|newcm|lm|libertinus|none> % \end{syntax} % 指定数å¦å—体集。\sjtutex{} 预定义了一些数å¦å—体组åˆï¼Œ % 具体é…ç½®è§è¡¨ \ref{tab:latinfonts} æ•°å¦å—体列。 % 默认跟éšè¥¿æ–‡å—体 \opt{text-font} 的设置。 % 找ä¸åˆ°å®šä¹‰çš„æ•°å¦å—体集时的回退选项为 \opt{newtx}。 % % \opt{xits},\opt{newcm},\opt{cambria} é€‰é¡¹ä»…æ”¯æŒ \XeLaTeX/\LuaLaTeX{} 编译。 % \end{function} % % \begin{table}[ht] % \centering\small % \begin{threeparttable} % \caption{西文å—体与数å¦å—体é…ç½®} % \label{tab:latinfonts} % \begin{tabular}{ccccc} % \toprule % & \strong{æ£æ–‡å—体} & \strong{æ— è¡¬çº¿å—体} & \strong{ç‰å®½å—体} & \strong{æ•°å¦å—体} \\ % \midrule % |newtx| & TG Termes X\tnote{a} & TG Heros & TG Cursor & newtx \\ % \multirow{2}{*}{|times|} & Times New Roman\tnote{b} & Arial & Courier New & \multirow{2}{*}{mathptmx} \\ % & Times\tnote{c} & Helvetica & Courier & \\ % |stixtwo| & STIX Two Text & TG Heros & TG Cursor & STIX Two Math \\ % |xits| & XITS & TG Heros & TG Cursor & XITS Math \\ % |newpx| & TG Pagella X & TG Heros & TG Cursor & newpx \\ % |cambria| & Cambria & Calibri & Consolas & Cambria Math \\ % |newcm| & New CM\tnote{d} & New CM Sans & New CM Mono & New CM Math \\ % |lm| & LM Roman\tnote{e} & LM Sans & LM Mono & LM Math \\ % |libertinus| & Libertinus Serif & Libertinus Sans & LM Mono & Libertinus Math \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \item[a] “TGâ€æ˜¯ TeX Gyre 的缩写。 % \item[b] 本行ä¸ï¼ŒTimes New Romanã€Arial å’Œ Courier New 是商业å—体, % 在 Windows å’Œ macOS 系统上å‡é»˜è®¤å®‰è£…。 % \item[c] 使用 \pdfTeX{} 引擎时,实际使用对应å—体的 Type 1 å¼€æºç‰ˆæœ¬ã€‚ % \item[d] “CMâ€æ˜¯ Computer Modern 的缩写。 % \item[e] “LMâ€æ˜¯ Latin Modern 的缩写。 % \end{tablenotes} % \end{threeparttable} % \end{table} % % \begin{function}[added=2022-12-03,updated=2023-01-05]{math-style} % \begin{syntax} % \OPT{math-style} = <(ISO)|TeX> % \end{syntax} % æ•°å¦ç¬¦å·æ ·å¼ã€‚è¯¥é€‰é¡¹å°†å½±å“ \opt{uppercase-greek}ã€\opt{integral}〠% \opt{integral-limits} 选项。 % 默认éµå¾ª ISO 80000-2 æ ‡å‡†è®¾ç½®ï¼Œå³æ–œä½“çš„å¤§å†™å¸Œè…Šå—æ¯ã€ç›´ç«‹çš„ç§¯åˆ†å· % 以åŠç§¯åˆ†å·ä¸Šä¸‹é™ç½®äºŽä¸Šä¸‹æ–¹ã€‚ % 用户也å¯ä»¥é€é¡¹ä¿®æ”¹æ•°å¦æ ·å¼ã€‚ % \end{function} % % \begin{function}[added=2023-01-05]{uppercase-greek} % \begin{syntax} % \OPT{uppercase-greek} = <slanted|upright> % \end{syntax} % å¤§å†™å¸Œè…Šå—æ¯çš„æ£/斜体。 % \end{function} % % \begin{function}[added=2023-01-05]{integral} % \begin{syntax} % \OPT{integral} = <slanted|upright> % \end{syntax} % 积分å·çš„æ£/斜体。 % \end{function} % % \begin{function}[added=2023-01-05]{integral-limits} % \begin{syntax} % \OPT{integral-limits} = <true|false> % \end{syntax} % 行间公å¼ä¸ç§¯åˆ†å·ä¸Šä¸‹é™çš„ä½ç½®ï¼Œ % \opt{true} 使得上下é™åœ¨ç§¯åˆ†å·ä¸Šä¸‹æ–¹ï¼Œ % \opt{false} 使得上下é™åœ¨ç§¯åˆ†å·å³ä¾§ã€‚ % 该选项åªå½±å“行间公å¼ï¼Œè¡Œå†…å…¬å¼ç»Ÿä¸€å±…å³ä¾§ï¼Œä¸å—å½±å“。 % \end{function} % % \subsubsection{其他选项} % % å…¶ä»–çš„æ–‡æ¡£ç±»é€‰é¡¹ä¼šè¢«ä¼ é€’ç»™å¯¹åº”çš„ \CTeX{} 文档类, % è¯·æ³¨æ„ \opt{GBK}ã€\opt{scheme} ç‰é€‰é¡¹ä¸å— \sjtutex{} 支æŒã€‚ % % \subsection{论文信æ¯è®¾ç½®} % % \begin{function}{\sjtusetup} % \begin{syntax} % \TNA{sjtusetup}\marg{键值列表} % \end{syntax} % æœ¬æ¨¡æ¿æä¾›äº†ä¸€ç³»åˆ—é€‰é¡¹ï¼Œå¯ç”±æ‚¨è‡ªè¡Œé…置。载入文档类之åŽï¼Œä»¥ä¸‹ % 所有选项å‡å¯é€šè¿‡ç»Ÿä¸€çš„命令 \tn{sjtusetup} æ¥è®¾ç½®ã€‚ % \end{function} % % \tn{sjtusetup} çš„å‚æ•°æ˜¯ä¸€ç»„由(英文)逗å·éš”开的选项列表,列表ä¸çš„选项通常是 % \meta{key}|=|\meta{value} 的形å¼ã€‚对于åŒä¸€é¡¹ï¼ŒåŽé¢çš„设置将会覆盖å‰é¢çš„设置。在 % 下文的说明ä¸ï¼Œå°†ç”¨\textbf{粗体}表示默认值。\tn{sjtusetup} 支æŒä¸åŒç±»åž‹ä»¥åŠå¤šç§ % 层次的选项设定。键值列表ä¸ï¼Œâ€œ|=|â€å·¦å³çš„ç©ºæ ¼ä¸å½±å“设置;但需注æ„ï¼Œå‚æ•°åˆ—表ä¸ä¸ % å¯ä»¥å‡ºçŽ°ç©ºè¡Œã€‚ % % \begin{latex}[moretexcs={\sjtusetup}, emph={[2]info,style,name}, % emph={[3]zh,en,title,author,float-num-sep,achv}] % \sjtusetup{ % info = { % zh/title = {上海交通大å¦å¦ä½è®ºæ–‡æ¨¡æ¿ç¤ºä¾‹æ–‡æ¡£}, % en/title = {A Sample Document for SJTU Thesis Template}, % zh/author = {æŸæŸ}, % en/author = {Mo Mo}, % }, % style = { % float-num-sep = {-}, % }, % name = { % achv = {攻读å¦ä½æœŸé—´å®Œæˆçš„论文}, % }, % } % \end{latex} % % \subsubsection{ä¿¡æ¯åŸŸ} % % \begin{function}[updated=2025-01-14]{info} % \begin{syntax} % \OPS{info} = \marg{键值列表} % \end{syntax} % 该选项包å«è®¸å¤šå项目,用于录入论文信æ¯ã€‚具体内容è§ä¸‹ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼ŒæŽ¨è使用带è¯è¨€ä»£ç å‰ç¼€ \meta{lang} % (比如 \opt{zh} 或 \opt{en})的键æ¥è®¾å®šå¯¹åº”è¯è¨€çš„论文信æ¯ï¼Œè§ç¬¬ % \ref{sec:sjtuthesiskey} 节;çœç•¥è¯è¨€å‰ç¼€ä¸å¸¦â€œ*â€çš„é¡¹ç›®è¡¨ç¤ºå¯¹åº”çš„ä¸æ–‡ % å—æ®µã€å¸¦â€œ*â€çš„é¡¹ç›®è¡¨ç¤ºå¯¹åº”çš„è‹±æ–‡å—æ®µå±žäºŽè€ç”¨æ³•,ä»ç„¶å…¼å®¹ä½†è¯·åŠæ—¶æ›´æ–° % è‡³æ–°ç”¨æ³•ï¼›å„æ ‡é¢˜é¡µä¸çš„ä¿¡æ¯è¡¨æ ¼ä¼šæ ¹æ®è®¾å®šä¿¡æ¯çš„顺åºè¿›è¡Œæ˜¾ç¤ºä¸ŽæŽ’列, % 未设置的信æ¯å°†ä¸ä¼šæ˜¾ç¤ºï¼Œä½†åœ¨ç›²å®¡æ¨¡å¼å¼€å¯æ—¶ä¼šä¾‹å¤–åœ°å¼ºåˆ¶æ˜¾ç¤ºç›¸å…³å—æ®µï¼Œ % 䏿–‡æ ‡é¢˜é¡µä¼šå¼ºåˆ¶æ˜¾ç¤º \texttt{info/zh} ä¸çš„ \texttt{author, id, % supervisor, assoc_supervisor, co_supervisor, department, major, degree} % å—æ®µï¼Œå…¶ä»–è¯è¨€æ ‡é¢˜é¡µä¼šå¼ºåˆ¶æ˜¾ç¤º \texttt{info/<lang>} ä¸çš„ % \texttt{author, supervisor, assoc_supervisor, co_supervisor} å—æ®µï¼Œ % è¿™ç§é¡ºåºä¹Ÿæ˜¯è¿™äº›ä¿¡æ¯çš„æŽ¨è设置顺åºã€‚ % \item 在 \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类ä¸ï¼Œä¸éœ€è¦ä½¿ç”¨è¯è¨€ä»£ % ç å‰ç¼€ã€‚æ¤æ—¶æŽ¨èç›´æŽ¥ä½¿ç”¨æ ‡å‡†æŽ¥å£æ¥è®¾å®šè¿™äº›ä¿¡æ¯ï¼Œè¿™äº›æ ‡å‡†æŽ¥å£ä¸å±žäºŽé”® % 值列表,应当直接写在导言区内,è§ç¬¬ \ref{sec:sjtureportcmd} 节。 % \end{itemize} % \end{function} % % \paragraph{适用于 \cls{sjtuthesis} 文档类的键} % \label{sec:sjtuthesiskey} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/title} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{title} = \marg{æ ‡é¢˜} % \end{syntax} % æ ‡é¢˜ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/display-title} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{display-title} = \marg{æ ‡é¢˜é¡µæ ‡é¢˜} % \end{syntax} % æ ‡é¢˜é¡µä¸çš„题目。默认为跟éšå¯¹åº”è¯è¨€çš„æ ‡é¢˜ã€‚ % å¦‚æžœæ ‡é¢˜è¿‡é•¿ï¼Œå¯ä»¥å°è¯•使用“|\\|â€æ‰‹åЍæ–行。 % \end{function} % % \begin{function}[rEXP,added=2022-12-17,updated=2023-03-14]{info/<lang>/subject} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{subject} = \marg{主题} % \end{syntax} % æ–‡æ¡£ä¸»é¢˜ã€‚ä¸€èˆ¬æ˜¾ç¤ºåœ¨ä¸æ–‡æ ‡é¢˜é¡µæ ¡å¾½ä¸‹æ–¹ã€‚ % 默认值类似于 “上海交通大å¦å¦å£«å¦ä½è®ºæ–‡â€ 或 “A Dissertation Submitted to % Shanghai Jiao Tong University for the Degree of Bachelorâ€ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/keywords} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{keywords} = \marg{䏿–‡å…³é”®å—} % \end{syntax} % 关键å—列表。å„关键å—之间需使用英文逗å·éš”开。 % ä¸ºé˜²æ¢æ§ä¹‰ï¼Œå¯ä»¥ç”¨åˆ†ç»„括å·â€œ|{...}|â€æŠŠå„å—æ®µæ‹¬èµ·æ¥ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/author} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{author} = \marg{å§“å} % \end{syntax} % 作者姓å。 % \end{function} % % \begin{function}[rEXP]{info/id} % \begin{syntax} % \OPT{id} = \marg{å¦å·} % \end{syntax} % å¦å·ã€‚该键ä¸éœ€è¦è¯è¨€å‰ç¼€ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/supervisor, % info/<lang>/assoc-supervisor,info/<lang>/co-supervisor} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{supervisor} = \marg{导师姓å} % \OPT{\meta{lang}}/\OPT{assoc-supervisor} = \marg{副导师姓å} % \OPT{\meta{lang}}/\OPT{co-supervisor} = \marg{è”åˆå¯¼å¸ˆå§“å} % \end{syntax} % 导师ã€å‰¯å¯¼å¸ˆã€è”åˆå¯¼å¸ˆå§“å。 % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/department} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{department} = \marg{院系åç§°} % \end{syntax} % 院系å称。 % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/major} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{major} = \marg{专业åç§°} % \end{syntax} % 专业å称。 % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/degree} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{degree} = \marg{å¦ä½åç§°} % \end{syntax} % 申请å¦ä½ä¸è‹±æ–‡å称。 % 包括申请的å¦ä½ç±»åˆ«å’Œçº§åˆ«ï¼Œå¦‚“工å¦ç¡•士â€ã€â€œç†å¦åšå£«â€ç‰ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/fund} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{fund} = \marg{资助基金åç§°} % \end{syntax} % 资助基金列表。å„资助基金å称之间需使用英文逗å·éš”开。 % ä¸ºé˜²æ¢æ§ä¹‰ï¼Œå¯ä»¥ç”¨åˆ†ç»„括å·â€œ|{...}|â€æŠŠå„å—æ®µæ‹¬èµ·æ¥ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2023-02-25]{info/date} % \begin{syntax} % \OPT{date} = \marg{ISO 日期} % \end{syntax} % 日期。默认值为文档编译日期。也å¯ä»¥è‡ªå·±æŒ‡å®šï¼Œè¦æ±‚使用 ISO æ ¼å¼ï¼Œ % å³ |yyyy-mm-dd| 或 |yyyy-mm|,å¦åˆ™è®¾å®šæ— 效。该键è¯è¨€å‰ç¼€ä¸æ˜¯å¿…须的。 % \end{function} % % \begin{function}[rEXP,updated=2023-03-14]{info/<lang>/display-date} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{display-date} = \marg{日期文å—} % \end{syntax} % 显示日期,å¯ä»¥æ˜¾ç¤ºä¸åŒäºŽæ ‡å‡†æ—¥æœŸæ ¼å¼çš„æ—¥æœŸï¼Œæ—¥æœŸæ–‡å—å°†ä¼šè¢«åŽŸæ ·è¾“å‡ºã€‚ % 设定该键时,将会覆盖 \opt{info/date} 键在对应è¯è¨€ä¸‹çš„设定。 % \end{function} % % \begin{function}[rEXP,added=2025-01-14]{info/<lang>/custom} % \begin{syntax} % \OPT{\meta{lang}}/\OPT{custom}/\OPT{\meta{å˜é‡å}} = \marg{第一列内容}\marg{第二列内容} % \end{syntax} % 对应è¯è¨€æ ‡é¢˜é¡µä¿¡æ¯è¡¨æ ¼ä¸æ˜¾ç¤ºçš„é¢å¤–ä¿¡æ¯ï¼Œå¯ä»¥è®¾ç½®å¤šä¸ªå˜é‡ã€‚ % 需è¦ä½¿ç”¨ä¸€ä¸ªå˜é‡å作为索引键(å˜é‡ååº”å½“ç”±è‹±æ–‡å—æ¯ã€æ•°å—〠% 连å—符 \texttt{-} 组æˆï¼Œä¸”第一个ä½ç½®åªèƒ½ä¸ºè‹±æ–‡å—æ¯ï¼‰ï¼› % å¹¶èµ‹äºˆä¸¤ä¸ªå‚æ•°æ¥è®¾ç½®ä¿¡æ¯è¡¨æ ¼ä¸ä¸¤åˆ—的内容: % 通常第一列作为该信æ¯çš„属性åç§°ä¼šè¢«åŠ ç²—ï¼Œç¬¬äºŒåˆ—ä½œä¸ºè¯¥ä¿¡æ¯çš„内容。 % 该信æ¯ä¼šæ ¹æ®åœ¨ \cmd{\sjtusetup} ä¸çš„设置相对ä½ç½®æ˜¾ç¤ºåœ¨å¯¹åº”çš„ä½ç½®ä¸Šã€‚ % 当 \opt{review} 选项开坿—¶ï¼Œè¯¥é€‰é¡¹çš„设置ä¸ä¼šç”Ÿæ•ˆã€‚ % \end{function} % % \paragraph{适用于 \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类的命令} % \label{sec:sjtureportcmd} % % \begin{function}[EXP,added=2022-12-17,updated=2023-03-14]{\title} % \begin{syntax} % \TNA{title}\marg{æ ‡é¢˜} % \end{syntax} % è®¾ç½®æ ‡é¢˜ï¼Œè¦†ç›– \opt{info/title} 键的值。 % \end{function} % % \begin{function}[EXP,added=2022-12-17,updated=2023-03-14]{\author} % \begin{syntax} % \TNA{author}\marg{å§“å} % \end{syntax} % 设置作者姓å,覆盖 \opt{info/author} 键的值。 % \end{function} % % \begin{function}[EXP,added=2022-12-17,updated=2023-03-14]{\date} % \begin{syntax} % \TNA{date}\marg{日期} % \end{syntax} % 设置日期,覆盖 \opt{info/display-date} 键的值。 % æ—¥æœŸä¼šè¢«åŽŸæ ·æ˜¾ç¤ºã€‚ % \end{function} % % \begin{function}[EXP,added=2023-03-14]{\subject} % \begin{syntax} % \TNA{subject}\marg{主题} % \end{syntax} % 文档主题。覆盖 \opt{info/subject} 键的值。 % \end{function} % % \begin{function}[EXP,added=2023-03-14]{\keywords} % \begin{syntax} % \TNA{keywords}\marg{关键è¯} % \end{syntax} % 文档关键è¯ï¼Œä½¿ç”¨è‹±æ–‡é€—å·éš”å¼€ä¸åŒçš„关键è¯ã€‚覆盖 \opt{info/keywords} 键的值。 % \end{function} % % \subsubsection{æ ·å¼åŸŸ} % % \begin{function}{style} % \begin{syntax} % \OPS{style} = \marg{键值列表} % \end{syntax} % 该选项包å«è®¸å¤šåé¡¹ç›®ï¼Œç”¨äºŽè®¾ç½®è®ºæ–‡æ ·å¼ã€‚具体内容è§ä¸‹ã€‚ % \end{function} % % \begin{function}[added=2024-01-10]{style/indent-first} % \begin{syntax} % \OPT{indent-first} = <(true)|false> % \end{syntax} % ç« èŠ‚æ ‡é¢˜åŽé¦–段是å¦ç¼©è¿›ã€‚ % \end{function} % % \begin{function}[added=2023-11-30]{style/equation-font} % \begin{syntax} % \OPT{equation-font} = \marg{å—体设置} % \end{syntax} % 行间数å¦å…¬å¼çš„å—体设置,该选项主è¦ç”¨äºŽè°ƒæ•´è¡Œé—´å…¬å¼çš„行è·ï¼Œ % ä¸å»ºè®®ä¿®æ”¹å—å·å—形。 % \cls{sjtuthesis} ä¸é»˜è®¤æ•°å¦å…¬å¼çš„行è·ä¸ºå—å·çš„ 1.2 å€ã€‚ % \end{function} % % \begin{function}[added=2022-12-03,updated=2022-12-27]{style/float-font} % \begin{syntax} % \OPT{float-font} = \marg{å—体设置} % \end{syntax} % 图ã€è¡¨ç‰æµ®åŠ¨ä½“çš„é¢å¤–å—体设置。 % 默认为 |\zihao{5}|,五å·å—。 % \end{function} % % \begin{function}[added=2022-12-20]{style/caption-font} % \begin{syntax} % \OPT{caption-font} = \marg{å—体设置} % \end{syntax} % 题注å—体。 % 默认为 |\zihao{5}\bfseries|,粗体五å·å—。 % \end{function} % % \begin{function}[added=2022-12-20]{style/subcaption-font} % \begin{syntax} % \OPT{subcaption-font} = \marg{å—体设置} % \end{syntax} % å图题注å—体。 % 默认为 |\zihao{5}\normalfont|,æ£å¸¸å—é‡äº”å·å—。 % \end{function} % % \begin{function}[added=2024-03-21]{style/theorem-header-font} % \begin{syntax} % \OPT{theorem-header-font} = \marg{å—体设置} % \end{syntax} % 定ç†å¤´ï¼ˆå³æ ‡é¢˜ï¼‰å—体。 % 默认为 |\bfseries\CJKsffamily|ï¼Œé»‘ä½“åŠ ç²—ã€‚ % \end{function} % % \begin{function}[added=2024-03-21]{style/theorem-body-font} % \begin{syntax} % \OPT{theorem-body-font} = \marg{å—体设置} % \end{syntax} % 定ç†å†…容å—体。 % 默认为 |\normalfont|ï¼Œå’Œæ£æ–‡å—体相åŒã€‚ % \end{function} % % \begin{function}[added=2023-03-28]{style/fnmark-style} % \begin{syntax} % \OPT{fnmark-style} = <plain|circled> % \end{syntax} % 脚注数å—ç¼–å·æ ·å¼ã€‚ % \opt{plain} 表示使用普通数å—ç¼–å·ï¼› % \opt{circled} 表示使用带圈数å—ç¼–å·ã€‚ % 在 \opt{zh} å’Œ \opt{ja} è¯è¨€è®¾ç½®ä¸ï¼Œé»˜è®¤ä¸º \opt{circled}ï¼› % 在 \opt{en} å’Œ \opt{de} è¯è¨€è®¾ç½®ä¸ï¼Œé»˜è®¤ä¸º \opt{plain}。 % % 使用带圈数å—ç¼–å·æ—¶ï¼Œç”±äºŽè¶…过 50 çš„å¸¦åœˆæ•°å—æ²¡æœ‰å¯¹åº”çš„ Unicode ç ä½ï¼Œ % 所以æ¯é¡µè„šæ³¨æœ€å¥½ä¸è¦è¶…过 50 个。 % 带圈数å—默认使用 CJK å—体。通常情况下默认å—体ä¸ä¸€å®šåŒ…嫿‰€æœ‰å¸¦åœˆæ•°å—çš„å—符, % æ¤æ—¶å¯ä»¥è®¾ç½® \opt{fnmark-font} 选项给带圈数å—设置åˆé€‚çš„å—体。 % \end{function} % % \begin{function}[added=2022-12-03,updated=2023-03-28]{style/fnmark-font} % \begin{syntax} % \OPT{fnmark-font} = <haranoaji|\marg{å—体设置}> % \end{syntax} % 脚注编å·çš„é¢å¤–å—体设置。 % 默认为空。 % å¯ä»¥ä½¿ç”¨é¢„设 \opt{haranoaji},支æŒåœ¨ Unicode 引擎ä¸ä½¿ç”¨ HaranoAjiMincho å—体 % ä¸çš„带圈数å—。 % \end{function} % % \begin{function}[added=2023-12-02]{style/num-sep} % \begin{syntax} % \OPT{num-sep} = \marg{分隔符} % \end{syntax} % 图ã€è¡¨ã€å…¬å¼ä»¥åŠå®šç†ç¼–å·ä¸çš„分隔符。该选项将统一设定 \opt{float-num-sep}〠% \opt{equation-num-sep}ã€\opt{theorem-num-sep} 选项。 % 用户也å¯ä»¥é€é¡¹ä¿®æ”¹ç¼–å·åˆ†éš”符。 % 默认为 \opt{.} å¥ç‚¹ã€‚ % \end{function} % % \begin{function}[updated=2023-11-29]{style/float-num-sep} % \begin{syntax} % \OPT{float-num-sep} = \marg{分隔符} % \end{syntax} % 图ã€è¡¨ç‰æµ®åŠ¨ä½“ç¼–å·ä¸çš„分隔符。 % \end{function} % % \begin{function}[updated=2023-11-29]{style/equation-num-sep} % \begin{syntax} % \OPT{equation-num-sep} = \marg{分隔符} % \end{syntax} % å…¬å¼ç¼–å·ä¸çš„分隔符。 % \end{function} % % \begin{function}[added=2023-12-02]{style/theorem-num-sep} % \begin{syntax} % \OPT{theorem-num-sep} = \marg{分隔符} % \end{syntax} % 定ç†ç¼–å·ä¸çš„分隔符。 % \end{function} % % \begin{function}[added=2022-12-20,updated=2023-03-14]{style/header-uppercase} % \begin{syntax} % \OPT{header-uppercase} = <true|(false)> % \end{syntax} % é¡µçœ‰è‹±æ–‡å—æ¯æ˜¯å¦å¤§å†™ã€‚默认为 \opt{false}。 % \end{function} % % \begin{function}[added=2022-12-20]{style/header-font} % \begin{syntax} % \OPT{header-font} = \marg{页眉å—体} % \end{syntax} % 页眉å—体。 % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼Œé»˜è®¤ä¸º |\zihao{-5}|,å°äº”å·å—。 % \item 在 \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类ä¸ï¼Œé»˜è®¤ä¸º |\zihao{-5}\sffamily|,å°äº”å·å—黑体。 % \end{itemize} % \end{function} % % \begin{function}[added=2022-12-20]{style/footer-font} % \begin{syntax} % \OPT{footer-font} = \marg{页脚å—体} % \end{syntax} % 页脚å—体。默认为 |\zihao{-5}|,å°äº”å·å—。 % \end{function} % % \begin{function}[added=2022-12-03,updated=2024-12-30]{style/page-number} % \begin{syntax} % \OPT{page-number} = \marg{æ ¼å¼å®šä¹‰} % \end{syntax} % 设置页ç çš„æ˜¾ç¤ºæ ¼å¼ï¼Œ\meta{æ ¼å¼å®šä¹‰} æœ‰ä¸¤ä¸ªå‚æ•°ï¼šå‚æ•° |#1| 是当å‰é¡µç ï¼Œå‚æ•° |#2| 是当å‰ç¼–ç çš„æ€»é¡µç æ•°ã€‚ % èŽ·å–æ€»é¡µç 数需è¦ä½¿ç”¨ \pkg{pageslts} å®åŒ…。 % 默认为 |{#1}|,å³ä»…显示当å‰é¡µç 。 % \end{function} % % \begin{function}[added=2023-11-30]{style/keywords-format} % \begin{syntax} % \OPT{keywords-format} = <(plain)|hang> % \end{syntax} % è®¾ç½®å…³é”®è¯æ ¼å¼ã€‚默认为 \opt{plain} æ— ç¼©è¿›çš„æ™®é€šæ®µè½ï¼Œå¦å¯é€‰ \opt{hang} æ‚¬æŒ‚æ ¼å¼ã€‚ % \end{function} % % \subsubsection{å称域} % % \begin{function}{name} % \begin{syntax} % \OPS{name} = \marg{键值列表} % \end{syntax} % 选项包å«è®¸å¤šå项目,用于设置论文ä¸ä¸€äº›æ ‡é¢˜çš„å称。部分选项åªèƒ½åœ¨ \cls{sjtuthesis} ä¸ä½¿ç”¨ã€‚ % 具体内容è§è¡¨ \ref{tab:names}。 % \end{function} % % \begin{function}[updated=2023-03-18]{name/contents,name/listfigure,name/listtable, % name/figure,name/table,name/abstract,name/index,name/appendix,name/proof,name/bib, % name/figure*,name/table*,name/algorithm,name/listalgorithm, % name/abbr,name/nom,name/ack,name/resume,name/digest,name/achv} % \end{function} % % \begingroup % \vspace{-48ex} % \small \tabcolsep=3pt % \begin{longtable}{l|p{7em}|>{\raggedright\arraybackslash}p{9em}|p{11em}|p{8em}} % \caption{\opt{name} 选项的默认设置} \label{tab:names} \\ % \toprule % \strong{选项} & \strong{|lang = zh|} & \strong{|lang = en|} & \strong{|lang = de|} & \strong{|lang = ja|} \\ % \midrule % \endfirsthead % \multicolumn{5}{r}{ç»è¡¨~\thetable} \\ % \toprule % \strong{选项} & \strong{|lang = zh|} & \strong{|lang = en|} & \strong{|lang = de|} & \strong{|lang = ja|} \\ % \midrule % \endhead % \bottomrule % \multicolumn{5}{r}{ç»ä¸‹é¡µ} % \endfoot % \bottomrule % \endlastfoot % |contents| & 目录 & Contents & Inhaltsverzeichnis & 目次 \\ % |listfigure| & æ’图 & List of Figures & Abbildungsverzeichnis & 図目次 \\ % |listtable| & è¡¨æ ¼ & List of Tables & Tabellenverzeichnis & 表目次 \\ % |figure| & 图 & Figure & Abbildung & 図 \\ % |table| & 表 & Table & Tabelle & 表 \\ % |abstract| \expstar & æ‘˜è¦ & Abstract & Zusammenfassung & æ¦‚è¦ \\ % |index| & 索引 & Index & Index & 索引 \\ % |appendix| & 附录 & Appendix & Anhang & 付録 \\ % |proof| & è¯æ˜Ž & Proof & Beweis & è¯æ˜Ž \\ % |bib| & å‚考文献 & Bibliography & Literaturverzeichnis & å‚考文献 \\ % \midrule % |figure*| & Figure & 图 & Figure & Figure \\ % |table*| & Table & 表 & Table & Table \\ % |algorithm| & 算法 & Algorithm & Algorithmus & アルゴリズム\\ % |listalgorithm| & 算法 & List of Algorithms & Algorithmenverzeichnis & アルゴリズム目次 \\ % |abbr| \rexpstar & 缩略è¯å¯¹ç…§è¡¨ & Abbreviation & Abkürzungsverzeichnis & 略語表 \\ % |nom| \rexpstar & 主è¦ç¬¦å·å¯¹ç…§è¡¨ & Nomenclature & Symbolverzeichnis & 記å·è¡¨ \\ % |ack| \rexpstar & 致谢 & Acknowledgements & Danksagungen & è¬è¾ž \\ % |resume| \rexpstar & 个人简历 & Resume & Lebenslauf & å±¥æ´æ›¸ \\ % |digest| \rexpstar & å¤§æ‘˜è¦ & Digest & Kurzfassung & è¦ç´„ \\ % |achv| \rexpstar & 妿œ¯è®ºæ–‡å’Œç§‘ç ”æˆæžœç›®å½• & List of Research Achievements & Forschungsleistungen & ç ”ç©¶æ¥ç¸¾æ›¸ \\ % \end{longtable} % \endgroup % % \section{内容编写} % % \begin{function}{document} % \begin{syntax} % \BEV{document} % \ \meta{文档内容} % \EEV{document} % \end{syntax} % 在文档开始åŽè¿›è¡Œå†…容编写,文档内容由 |document| 环境包裹。 % \end{function} % % \subsection{ç”¨äºŽæœ¬èŠ‚çŽ¯å¢ƒæˆ–å‘½ä»¤çš„å‚æ•°} % % 本节æè¿°çš„部分环境和命令æä¾› \meta{æ ‡é¢˜å‚æ•°}ï¼Œç”¨äºŽè¿›è¡Œå±€éƒ¨çš„æ ‡é¢˜ç›¸å…³è®¾ç½®ã€‚ % å¯ä»¥ä½¿ç”¨é€—å·åˆ†éš”的选项列表作为å¯é€‰å‚æ•°ä¼ å…¥è¯¥çŽ¯å¢ƒï¼Œä¾‹å¦‚ï¼š % \begin{latex} % \begin{acknowledgements}[intoc,title={è‡ªå®šä¹‰æ ‡é¢˜}] % \end{acknowledgements} % \end{latex} % % \begin{function}[added=2025-01-12]{intoc, notintoc} % æŒ‡æ˜Žè¯¥çŽ¯å¢ƒçš„å°æ ‡é¢˜æ˜¯å¦åœ¨ç›®å½•ä¸å‡ºçŽ°ã€‚ % \opt{intoc} 表示出现在目录ä¸ï¼Œ % \opt{notintoc} 表示ä¸å‡ºçŽ°åœ¨ç›®å½•ä¸ã€‚ % 默认 \tn{mainmatter} 之å‰çš„环境为 \opt{notintoc}, % \tn{mainmatter} 之åŽçš„环境为 \opt{intoc}。 % \end{function} % % \begin{function}[added=2025-01-12]{title} % \begin{syntax} % \OPT{title} = \marg{å°æ ‡é¢˜} % \end{syntax} % è®¾ç½®è¯¥çŽ¯å¢ƒçš„å°æ ‡é¢˜ï¼Œé»˜è®¤æ˜¯å…¨å±€è¯è¨€ä¸‹çš„å°æ ‡é¢˜ã€‚ % \end{function} % % \begin{function}[added=2025-01-12]{marking} % \begin{syntax} % \OPT{marking} = \marg{目录ä¸çš„å°æ ‡é¢˜} % \end{syntax} % 设置该环境在目录ä¸çš„å°æ ‡é¢˜ï¼Œé»˜è®¤ä¸Žå°æ ‡é¢˜ç›¸åŒã€‚ % åªæœ‰åœ¨è®¾ç½® \opt{intoc} å°æ ‡é¢˜å‡ºçŽ°åœ¨ç›®å½•ä¸æ‰ä¼šæ˜¾ç¤ºã€‚ % \end{function} % % 部分环境还æä¾›äº†å‚æ•° \opt{lang},用于设置环境的è¯è¨€ã€‚ % \begin{function}[added=2025-01-12,label=]{lang} % \begin{syntax} % \OPT{lang} = <(zh)|en|de|ja> % \end{syntax} % 设置该环境的局部è¯è¨€é€‰é¡¹ï¼Œé»˜è®¤ä¸Žå…¨å±€è¯è¨€é€‰é¡¹ç›¸åŒã€‚ % 该选项会设置该环境的局部è¯è¨€æŽ’版设置。 % \end{function} % % å¯¹äºŽåŒæ—¶æä¾›äº† \meta{æ ‡é¢˜å‚æ•°} å’Œ \opt{lang} 傿•°çš„环境,二者å¯ä»¥ä¸€åŒä½¿ç”¨ï¼Œä¾‹å¦‚: % \begin{latex} % \begin{abstract}[lang=en,intoc,title={è‡ªå®šä¹‰æ ‡é¢˜},marking={目录ä¸çš„æ ‡é¢˜}] % \end{abstract} % \end{latex} % % \subsection{æ ‡é¢˜é¡µå’Œå£°æ˜Žé¡µ} % % \begin{function}[updated=2022-12-03]{\maketitle} % \begin{syntax} % \TNA{maketitle} % \end{syntax} % ç”Ÿæˆæ ‡é¢˜ã€‚ % \begin{itemize} % \item 在 \cls{sjtuthesis} 文档类ä¸ï¼Œç”Ÿæˆæ ‡é¢˜é¡µã€‚ % \item 在 \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类ä¸ï¼Œ % \begin{itemize} % \item 若处于 \opt{titlepage} 文档类选项ä¸ï¼Œç”Ÿæˆæ ‡é¢˜é¡µã€‚\cls{sjtureport} 文档类默认。 % \item 若处于 \opt{notitlepage} 文档类选项ä¸ï¼Œç”Ÿæˆæ ‡é¢˜å—。\cls{sjtuarticle} 文档类默认。 % \end{itemize} % \end{itemize} % \end{function} % % \begin{function}[rEXP,updated=2025-03-22]{\copyrightpage} % \begin{syntax} % \TNA{copyrightpage} % \TNA{copyrightpage}\oarg{file=授æƒä¹¦æ‰«æä»¶,variant=<a|b>,é¢å¤–选项} % \end{syntax} % 生æˆç©ºç™½ç‰ˆæƒä½¿ç”¨æŽˆæƒä¹¦ã€‚ % 接å—å¯é€‰å‚æ•° \opt{file} 用于æ’入版æƒä½¿ç”¨æŽˆæƒä¹¦æ‰«æä»¶ï¼Œæ’入外置 PDF é¡µæ—¶éœ€è¦æ‰‹åŠ¨åŠ è½½ \pkg{pdfpages} å®åŒ…。 % 接å—å¯é€‰å‚æ•° \opt{variant} 用于选择版æƒä½¿ç”¨æŽˆæƒä¹¦çš„æ–‡æœ¬å˜ç§ï¼Œ\opt{a} 为硕士åŠåšå£«å¦ä½è®ºæ–‡çš„默认å˜ç§ï¼Œ\opt{b} 为å¦å£«å¦ä½è®ºæ–‡çš„默认å˜ç§ã€‚ % é¢å¤–é€‰é¡¹å°†ä¼ é€’ç»™ \tn{includepdf} 命令。 % \end{function} % % \subsection{剿–‡éƒ¨åˆ†} % % \begin{function}[rEXP]{\frontmatter} % \begin{syntax} % \TNB{frontmatter} % \end{syntax} % å£°æ˜Žå‰æ–‡éƒ¨åˆ†å¼€å§‹ã€‚ % \end{function} % % \begin{function}[updated=2024-12-20]{abstract} % \begin{syntax} % \BEV{abstract}\oarg{lang=<(zh)|en|de|ja>,æ ‡é¢˜å‚æ•°} % \ \meta{\textup{\cls{sjtuthesis}} ä¸çš„æ‘˜è¦} % \EEV{abstract} % \BEV{abstract} % \ \meta{\textup{\cls{sjtuarticle}} å’Œ \textup{\cls{sjtureport}} ä¸çš„æ‘˜è¦} % \EEV{abstract} % \end{syntax} % 摘è¦çŽ¯å¢ƒã€‚ä¼šåœ¨ç»“å°¾æ·»åŠ å…³é”®è¯ã€‚ % \begin{itemize} % \item \cls{sjtuthesis} 文档类ä¸ï¼Œå¯ä»¥è®¾ç½®å¯é€‰å‚数, % 指定摘è¦çš„局部è¯è¨€ä¼šåŒæ¥æ›´æ”¹å°æ ‡é¢˜ä¸ºå¯¹åº”è¯è¨€è®¾ç½®ã€‚ % \item \cls{sjtuarticle} å’Œ \cls{sjtureport} 文档类ä¸ï¼Œä¸è®¾ç½®å¯é€‰å‚数。 % \end{itemize} % \end{function} % % \begin{function}[updated=2024-12-20]{\tableofcontents,\listoffigures,\listoftables,\listofalgorithms} % \begin{syntax} % \TNA{tableofcontents}\oarg{æ ‡é¢˜å‚æ•°} % \TNA{listoffigures}\oarg{æ ‡é¢˜å‚æ•°} % \TNA{listoftables}\oarg{æ ‡é¢˜å‚æ•°} % \TNA{listofalgorithms}\oarg{æ ‡é¢˜å‚æ•°} % \end{syntax} % ç›®å½•ã€æ’图ã€è¡¨æ ¼å’Œç®—法ç‰ç´¢å¼•命令如表 \ref{tab:list} 所示,将其æ’入到期望的 % ä½ç½®å³å¯ï¼Œè¿™äº›å‘½ä»¤å¯ä»¥ä½¿ç”¨å¯é€‰çš„ \meta{æ ‡é¢˜å‚æ•°} æ¥è°ƒæ•´æ ‡é¢˜ç›¸å…³è®¾ç½®ã€‚ % \begin{table}[H] % \centering\small % \begin{threeparttable} % \caption{目录和索引表} % \label{tab:list} % \begin{tabular}{lp{4cm}lp{4cm}} % \toprule % \strong{用途} & \strong{命令} & \strong{用途} & \strong{命令} \\ % \midrule % 目录 & \tn{tableofcontents} & æ’图索引 & \tn{listoffigures} \\ % \midrule % è¡¨æ ¼ç´¢å¼• & \tn{listoftables} & 算法索引\tnote{a} & \tn{listofalgorithms} \\ % \bottomrule % \end{tabular} % \begin{tablenotes} % \item[a] å¯ç”¨ \pkg{algorithm2e} 或 \pkg{algorithm} åŽæœ‰æ•ˆã€‚ % \end{tablenotes} % \end{threeparttable} % \end{table} % \end{function} % % \subsection{æ£æ–‡éƒ¨åˆ†} % % \begin{function}[rEXP]{\mainmatter} % \begin{syntax} % \TNB{mainmatter} % \end{syntax} % å£°æ˜Žæ£æ–‡éƒ¨åˆ†å¼€å§‹ã€‚æ£æ–‡éƒ¨åˆ†æ˜¯è®ºæ–‡çš„æ ¸å¿ƒï¼Œæ‚¨å¯ä»¥åˆ†ç« 节撰写。 % 如有需求,也å¯ä»¥é‡‡ç”¨å¤šæ–‡ä»¶ç¼–译的方å¼ã€‚ % \end{function} % % \begin{function}[updated=2022-12-03]{\footnote} % \begin{syntax} % \TNA{footnote}\oarg{脚注编å·}\marg{脚注文å—} % \end{syntax} % æ’入脚注。其ä¸è„šæ³¨ç¼–å·å‚数是å¯é€‰çš„,一般ä¸éœ€è¦è¾“入。 % \end{function} % % \begin{function}{assumption,axiom,conjecture,corollary,definition,example, % exercise,lemma,problem,proposition,theorem} % \sjtutex{} 预定义了一系列数å¦çŽ¯å¢ƒï¼Œå¦‚è¡¨ \ref{tab:theorems} 所示, % 在å¯ç”¨ \pkg{amsthm} 或 \pkg{ntheorem} å®åŒ…åŽæœ‰æ•ˆã€‚ % \begin{table}[H] % \centering\small % \caption{预定义的数å¦çŽ¯å¢ƒ} % \label{tab:theorems} % \begin{tabular}{*{7}{l}} % \toprule % \env{assumption} & \env{axiom} & \env{conjecture} & \env{corollary} & \env{definition} & \env{example} & \env{exercise} \\ % å‡è®¾ & å…¬ç† & 猜想 & 推论 & 定义 & 例 & ç»ƒä¹ \\ % \midrule % \env{lemma} & \env{problem} & \env{proof} & \env{proposition} & \env{remark} & \env{solution} & \env{theorem} \\ % å¼•ç† & 问题 & è¯æ˜Ž & 命题 & 注 & è§£ & å®šç† \\ % \bottomrule % \end{tabular} % \end{table} % \end{function} % % \begin{function}[added=2023-10-24]{\setbaselineskip} % \begin{syntax} % \TNA{setbaselineskip}\marg{长度} % \end{syntax} % 设置当å‰çš„基线间è·ï¼Œä¸€èˆ¬åœ¨å—å·å‘½ä»¤ä¹‹åŽä½¿ç”¨ã€‚ % \end{function} % % \begin{function}{\appendix} % \begin{syntax} % \TNA{appendix} % \end{syntax} % 附录由 \tn{appendix} 命令开å¯ï¼Œç„¶åŽåƒæ£æ–‡ä¸€æ ·ä¹¦å†™ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2024-12-20]{nomenclature} % \begin{syntax} % \BEV{nomenclature}\oarg{æ ‡é¢˜å‚æ•°} % \ \meta{符å·å¯¹ç…§è¡¨} % \EEV{nomenclature} % \end{syntax} % 符å·å¯¹ç…§è¡¨çŽ¯å¢ƒã€‚å¯ä»¥ä½¿ç”¨ \meta{æ ‡é¢˜å‚æ•°} æ‰‹åŠ¨è®¾ç½®æ ‡é¢˜ã€‚ % 符å·å¯¹ç…§è¡¨çŽ¯å¢ƒä»…è®¾ç½®æ ‡é¢˜ï¼Œå†…éƒ¨å®žçŽ°å¯ç”±ç”¨æˆ·è‡ªè¡Œå†³å®šï¼š % å¯ä»¥ä½¿ç”¨ \pkg{longtable},也å¯ä»¥ä½¿ç”¨ \pkg{nomencl} å®åŒ…。 % \end{function} % % \begin{function}[rEXP,updated=2024-12-20]{abbreviation} % \begin{syntax} % \BEV{abbreviation}\oarg{æ ‡é¢˜å‚æ•°} % \ \meta{缩略è¯å¯¹ç…§è¡¨} % \EEV{abbreviation} % \end{syntax} % 缩略è¯å¯¹ç…§è¡¨çŽ¯å¢ƒã€‚å¯ä»¥ä½¿ç”¨å¯é€‰å‚æ•°æ‰‹åŠ¨è®¾ç½®æ ‡é¢˜ã€‚ % 缩略è¯å¯¹ç…§è¡¨çŽ¯å¢ƒä»…è®¾ç½®æ ‡é¢˜ï¼Œå†…éƒ¨å®žçŽ°å¯ç”±ç”¨æˆ·è‡ªè¡Œå†³å®šã€‚ % \end{function} % % \subsection{åŽæ–‡éƒ¨åˆ†} % % \begin{function}[rEXP]{\backmatter} % \begin{syntax} % \TNB{backmatter} % \end{syntax} % å£°æ˜ŽåŽæ–‡éƒ¨åˆ†å¼€å§‹ã€‚ åŽæ–‡éƒ¨åˆ†åŒ…å«è‡´è°¢ç‰ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2024-12-20]{acknowledgements} % \begin{syntax} % \BEV{acknowledgements}\oarg{æ ‡é¢˜å‚æ•°} % \ \meta{致谢内容} % \EEV{acknowledgements} % \end{syntax} % 致谢环境。盲审模å¼ä¸‹è‡´è°¢å°†è¢«éšåŽ»ã€‚å¯ä»¥ä½¿ç”¨ \meta{æ ‡é¢˜å‚æ•°} æ‰‹åŠ¨è®¾ç½®æ ‡é¢˜ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2024-12-20]{achievements} % \begin{syntax} % \BEV{achievements}\oarg{æ ‡é¢˜å‚æ•°} % \ \meta{èŽ·å¾—çš„ç§‘ç ”æˆæžœ} % \EEV{achievements} % \end{syntax} % ç§‘ç ”æˆæžœçŽ¯å¢ƒï¼Œå¯ä»¥ä½¿ç”¨ \meta{æ ‡é¢˜å‚æ•°} æ‰‹åŠ¨è®¾ç½®æ ‡é¢˜ã€‚å†…éƒ¨è¯·é…åˆä½¿ç”¨ä¸‹é¢çš„附录用文献列表环境 % \env{bibliolist} å’Œ \env{bibliolist*}ã€‚ä½ å¯ä»¥åœ¨è¯¥çŽ¯å¢ƒä¸ä½¿ç”¨å¸¦æ˜Ÿå·çš„节次命令 % 以分隔ä¸åŒçš„ç±»åž‹çš„æˆæžœï¼ˆæ¯”如妿œ¯è®ºæ–‡ã€ä¸“利ç‰ï¼‰ï¼›ä½ 也å¯ä»¥ä½¿ç”¨å¤šä¸ª \env{achievements} % 环境,é…åˆä¸åŒçš„ \meta{æ ‡é¢˜å‚æ•°},展示ä¸åŒç±»åž‹çš„æˆæžœã€‚ % \end{function} % % \begin{function}[rEXP,updated=2024-12-08]{bibliolist,bibliolist*} % \begin{syntax} % \BEV{bibliolist}\oarg{å¯é€‰å‚æ•°}\marg{最长æ¡ç›®ç¼–å·} % \ \TNA{item} \meta{文献æ¡ç›®} % \EEV{bibliolist} % \BEV{bibliolist*}\oarg{å¯é€‰å‚æ•°}\marg{最长æ¡ç›®ç¼–å·} % \ \TNA{item} \meta{文献æ¡ç›®ï¼ˆéšå޻姓å)} % \EEV{bibliolist*} % \end{syntax} % ç”¨äºŽå±•ç¤ºç§‘ç ”æˆæžœçš„æ–‡çŒ®åˆ—è¡¨ï¼Œæ¯”å¦‚å¦æœ¯è®ºæ–‡ã€ä¸“利ç‰ã€‚ % éœ€è¦æŒ‡å®šæœ€é•¿æ¡ç›®çš„ç¼–å·ä½œä¸ºå‚数,比如 \opt{99}ï¼› % å¦‚æžœå°†è¯¥å¼ºåˆ¶å‚æ•°è¢«æŒ‡å®šä¸ºç©ºï¼Œå°†ä¸æ˜¾ç¤ºç¼–å·ï¼Œæ¯æ¡ä»¥æ‚¬æŒ‚缩进åšåŒºåˆ†ã€‚ % å¯ä»¥ä½¿ç”¨å¯é€‰å‚æ•° \opt{resume} 设置连ç»ç¼–å·ã€‚ % 环境内部使用 \tn{item} æ¥åˆ†éš”儿¡ç›®ã€‚ % 普通模å¼ä¸‹æ˜¾ç¤º \env{bibliolist} ä¸çš„内容,盲审模å¼ä¸‹æ˜¾ç¤º \env{bibliolist*} ä¸çš„内容。 % \end{function} % % \begin{function}[rEXP,updated=2024-12-20]{resume} % \begin{syntax} % \BEV{resume}\oarg{æ ‡é¢˜å‚æ•°} % \ \meta{简历内容} % \EEV{resume} % \end{syntax} % 简历环境。盲审模å¼ä¸‹ç®€åŽ†å°†è¢«éšåŽ»ã€‚å¯ä»¥ä½¿ç”¨ \meta{æ ‡é¢˜å‚æ•°} æ‰‹åŠ¨è®¾ç½®æ ‡é¢˜ã€‚ % \end{function} % % \begin{function}[rEXP,updated=2024-12-20]{digest} % \begin{syntax} % \BEV{digest}\oarg{lang=<zh|(en)|de|ja>,æ ‡é¢˜å‚æ•°} % \ \meta{大摘è¦} % \EEV{digest} % \end{syntax} % å¦å£«è®ºæ–‡å¤§æ‘˜è¦ï¼Œå¯ä»¥è®¾ç½®å¯é€‰å‚数,指定大摘è¦çš„局部è¯è¨€ä¼šåŒæ¥æ›´æ”¹å°æ ‡é¢˜ % 为对应è¯è¨€è®¾ç½®ï¼Œé»˜è®¤ä¸º \opt{lang=en}。 % \end{function} % % \section{å®åŒ…ä¾èµ–情况} % % 使用ä¸åŒç¼–译方å¼ã€æŒ‡å®šä¸åŒé€‰é¡¹ï¼Œä¼šå¯¼è‡´å®åŒ…ä¾èµ–情况有所ä¸åŒã€‚ % 具体如下: % \begin{itemize} % \item 在任何情况下,文档类都会\emph{显å¼}调用以下å®åŒ… % (或文档类): % \begin{itemize} % \item \cls{ctexbook}ã€\cls{ctexrep} å’Œ \cls{ctexart}, % æä¾›ä¸æ–‡æŽ’版的通用框架。属于 \CTeX{} å®é›† \cite{CTeX}。 % \item \pkg{array},æä¾›è¡¨æ ¼çŽ¯å¢ƒçš„å¢žå¼ºåŠŸèƒ½ã€‚ % \item \pkg{mathtools},对 \LaTeX{} çš„æ•°å¦æŽ’ç‰ˆåŠŸèƒ½è¿›è¡Œäº†å…¨é¢æ‰©å±•。 % 是 \pkg{amsmath} 的扩充。 % \item \pkg{geometry},用于调整页é¢å°ºå¯¸ã€‚ % \item \pkg{fancyhdr},处ç†é¡µçœ‰é¡µè„šã€‚ % \item \pkg{titletoc}ï¼Œè®¾ç½®ç›®å½•æ ¼å¼ã€‚ % \item \pkg{caption}ã€\cls{bicaption} å’Œ \cls{subcaption},用于设置题注。 % \item \pkg{graphicx},æä¾›å›¾å½¢æ’入的接å£ã€‚ % \item \pkg{enumitem}ï¼Œè®¾ç½®åˆ—è¡¨çŽ¯å¢ƒæ ¼å¼ã€‚ % \end{itemize} % \item 部分西文与数å¦å—体预设会调用相关的å—体å®åŒ…,具体调用情况请å‚è§å¯¹åº”çš„ % å—体预设文件。 % \item 部分数å—å—体预设会调用 \pkg{unicode-math} å¤„ç† Unicode ç¼–ç çš„ % OpenType æ•°å¦å—体。在未å¯ç”¨ \pkg{unicode-math} 的情况下,会调用 \pkg{bm} % æ¥é€‰æ‹©ç²—体数å¦ç¬¦å·ã€‚ % \item å½“éœ€è¦æ˜¾ç¤ºæ€»é¡µç 数时,会调用 \pkg{pageslts} å®åŒ…。 % \end{itemize} % % 这里åªåˆ—出了本模æ¿ç›´æŽ¥è°ƒç”¨çš„å®åŒ…。这些å®åŒ…自身的调用情况, % æ¤å¤„ä¸å†å…·ä½“展开。如有需è¦ï¼Œè¯·å‚阅相关文档。 % % \begin{thebibliography}{99} % % \addcontentsline{toc}{section}{\refname} % % \newcommand\urlprefix{\newline\hspace*{\fill}} % \let\OldUrl=\url % \renewcommand\url[2][]{{\small\textit{#1}~\OldUrl{#2}}} % \newcommand\CTANurl[2][]{{^^A % \small\textit{#1}~\href{https://mirror.ctan.org/#2}{\texttt{CTAN://#2}}}} % % \subsection*{图书} % % \bibitem{Knuth1986} % \textsc{Knuth D E}. % \newblock \textit{The \TeX book: Computers \& Typesetting, volume A}\allowbreak[M]. % \newblock Boston: Addison--Wesley Publishing Company, 1986. % \urlprefix \CTANurl[æºä»£ç ^^A % \footnote{æ¤ä»£ç åªå¯ä½œä¸ºå¦ä¹ ä¹‹ç”¨ã€‚æœªç» Knuth æœ¬äººåŒæ„,您ä¸åº”å½“ç¼–è¯‘æ¤æ–‡æ¡£ã€‚}:]^^A % {systems/knuth/dist/tex/texbook.tex} % % \bibitem{MittelbachF2023} % \textsc{Mittelbach F} and \textsc{Fischer U}. % \newblock \textit{The \LaTeX{} Companion}\allowbreak[M]. % \newblock 3rd ed. % \newblock Boston: Addison--Wesley Publishing Company, 2023. % % \bibitem{LiuHY2013} % 刘海洋. % \newblock \textit{\LaTeX{} 入门}\allowbreak[M]. % \newblock 北京: 电å工业出版社, 2013. % % \subsection*{æ ‡å‡†ã€è§„范} % % \bibitem{gb-t-7713.1-2006} % 国务院å¦ä½å§”员会办公室, 全国信æ¯ä¸Žæ–‡çŒ®æ ‡å‡†åŒ–技术委员会. % \newblock \textit{å¦ä½è®ºæ–‡ç¼–写规则: GB/T 7713.1--2006}\allowbreak[S]. % \newblock 北京: ä¸å›½æ ‡å‡†å‡ºç‰ˆç¤¾, 2007. % % \bibitem{cy-t-35-2001} % 全国信æ¯ä¸Žæ–‡çŒ®æ ‡å‡†åŒ–技术委员会第七分委员会, ä¸åŽäººæ°‘共和国新闻出版总署. % \newblock \textit{ç§‘æŠ€æ–‡çŒ®çš„ç« èŠ‚ç¼–å·æ–¹æ³•: CY/T 35--2001}\allowbreak[S]. % \newblock [S.l. : s.n.], 2001. % % \bibitem{SJTUGS2023} % 上海交通大å¦ç ”究生院. % \newblock \textit{上海交通大å¦åšå£«ã€ç¡•士å¦ä½è®ºæ–‡æ’°å†™æŒ‡å—}\allowbreak[EB/OL]. % \newblock (2023-11-03)[2023-12-04]. % \urlprefix\url{https://www.gs.sjtu.edu.cn/post/detail/Z3MxNDc=} % % \subsection*{å®åŒ…ã€æ¨¡ç‰ˆ} % % \bibitem{source2e} % \textsc{Braams J}, \textsc{Carlisle D}, \textsc{Jeffrey A}, et~al. % \newblock \textit{The \LaTeXe{} Sources}\allowbreak[CP/OL]. % \newblock (2024-11-01). % \urlprefix\url{https://ctan.org/pkg/latex} % \urlprefix\CTANurl[æºä»£ç :]{macros/latex/base/source2e.pdf} % % \bibitem{interface3} % \textsc{The \LaTeX{} Project}. % \newblock \textit{The \LaTeXiii{} Interfaces}\allowbreak[EB/OL]. % \newblock (2024-11-02). % \urlprefix\url{https://ctan.org/pkg/l3kernel} % \urlprefix\CTANurl[文档:]{macros/latex/l3kernel/interface3.pdf} % % \bibitem{CTeX} % \textsc{CTEX.ORG}. % \newblock \textit{\CTeX{} å®é›†æ‰‹å†Œ}\allowbreak[EB/OL]. % \newblock version 2.5.10, % \newblock (2022-07-14). % \urlprefix\url{https://ctan.org/pkg/ctex} % \urlprefix\CTANurl[æ–‡æ¡£åŠæºä»£ç :]{language/chinese/ctex/ctex.pdf} % % \bibitem{zhlineskip} % å¼ ç‘žç†¹. % \newblock \textit{zhlineskip å®åŒ…}\allowbreak[EB/OL]. % \newblock version 1.0e, % \newblock (2019-05-15). % \urlprefix\url{https://ctan.org/pkg/zhlineskip} % \urlprefix\CTANurl[文档:]{language/chinese/zhlineskip/zhlineskip.pdf} % % \bibitem{fduthesis} % 曾祥东. % \newblock \textit{fduthesis: 夿—¦å¤§å¦è®ºæ–‡æ¨¡æ¿}\allowbreak[EB/OL]. % \newblock version 0.9a, % \newblock (2023-05-27). % \urlprefix\url{https://ctan.org/pkg/fduthesis} % \urlprefix\CTANurl[æ–‡æ¡£åŠæºä»£ç :]{macros/latex/contrib/fduthesis/fduthesis-code.pdf} % % \bibitem{thuthesis} % 清åŽå¤§å¦ TUNA å会. % \newblock \textit{\textsc{ThuThesis}:清åŽå¤§å¦å¦ä½è®ºæ–‡æ¨¡æ¿}\allowbreak[EB/OL]. % \newblock version 7.5.2, % \newblock (2025-07-01). % \urlprefix\url{https://ctan.org/pkg/thuthesis} % \urlprefix\CTANurl[æ–‡æ¡£åŠæºä»£ç :]{macros/latex/contrib/thuthesis/thuthesis.pdf} % % \end{thebibliography} % % \end{documentation} % % \begin{implementation} % % \clearpage % \section{代ç 实现} % % \changes{v2.1}{2023/12/05}{åŒæ¥ \LaTeX{} 2020-10-01ï¼Œæ— éœ€æ˜¾å¼è°ƒç”¨ % \pkg{expl3} å’Œ \pkg{xparse} å®åŒ…。} % \changes{v2.2}{2024/11/22}{åŒæ¥ \LaTeX{} 2024-06-01ï¼Œæ— éœ€æ˜¾å¼è°ƒç”¨ % \pkg{xtemplate} å®åŒ…。} % \changes{v2.2}{2025/02/10}{é‡å‘½å视觉形象系统文件å称。} % 本模æ¿ä½¿ç”¨ \LaTeXiii{} è¯æ³•编写,ä¾èµ– \pkg{expl3} 环境, % 并需调用 \pkg{l3packages} ä¸çš„相关å®åŒ…。 % % \subsection{å‰ç½®å‡†å¤‡} % % ç›®å‰ \pkg{sjtutex} æ–‡æ¡£ç±»ä»…æ”¯æŒ \XeLaTeX{}ã€\LuaLaTeX{} å’Œ \pdfLaTeX{} 编译。 % \begin{macrocode} %<@@=sjtu> %<*class> \msg_new:nnn { sjtutex } { unsupported-engine } { The~sjtutex~classes~does~NOT~support~'#1'~engine. \\\\ Please~set~your~typesetting~program~to~either~ 'xelatex'~or~'lualatex'. } \bool_lazy_any:nF { { \sys_if_engine_xetex_p: } { \sys_if_engine_luatex_p: } { \sys_if_engine_pdftex_p: } } { \msg_fatal:nnV { sjtutex } { unsupported-engine } \c_sys_engine_str } % \end{macrocode} % % \subsection{内部定义} % % \begin{variable}{\l_@@_tmp_tl,\l_@@_tmp_clist,\l_@@_tmp_box} % 临时å˜é‡ã€‚ % \begin{macrocode} \tl_new:N \l_@@_tmp_tl \clist_new:N \l_@@_tmp_clist %<thesis>\box_new:N \l_@@_tmp_box % \end{macrocode} % \end{variable} % % \begin{macro}[int]{\clist_use:Nv,\clist_use:cv, % \exp_args:NNnv,\exp_last_unbraced:ce} % \LaTeX3{} 函数å˜ä½“。 % \begin{macrocode} \cs_generate_variant:Nn \clist_use:Nn { Nv, cv } \exp_args_generate:n { Nnv } \cs_generate_variant:Nn \exp_last_unbraced:Ne { ce } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_conditional_const:nn} % \begin{macrocode} \cs_new_protected:Npn \@@_conditional_const:nn #1#2 { \bool_if:nTF {#2} { \cs_new_eq:cN { @@_if_ #1 :T } \use:n \cs_new_eq:cN { @@_if_ #1 :F } \use_none:n \cs_new_eq:cN { @@_if_ #1 :TF } \use_i:nn \cs_new_eq:cN { @@_if_ #1 _p: } \c_true_bool } { \cs_new_eq:cN { @@_if_ #1 :T } \use_none:n \cs_new_eq:cN { @@_if_ #1 :F } \use:n \cs_new_eq:cN { @@_if_ #1 :TF } \use_ii:nn \cs_new_eq:cN { @@_if_ #1 _p: } \c_false_bool } } % \end{macrocode} % \end{macro} % % \begin{macro}[int,pTF]{\@@_if_engine_opentype:} % \begin{macrocode} \@@_conditional_const:nn { engine_opentype } { \bool_lazy_or_p:nn { \sys_if_engine_xetex_p: } { \sys_if_engine_luatex_p: } } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_disable_package_load:n} % \begin{macrocode} \msg_new:nnn { sjtutex } { package-disabled } { The~loading~of~package~'#1'~is~disabled. } \cs_new_protected:Npn \@@_disable_package_load:n #1 { \disable@package@load {#1} { \msg_warning:nnn { sjtutex } { package-disabled } {#1} } } % \end{macrocode} % \end{macro} % % \changes{v2.0.2}{2023/03/31}{区分 \texttt{dim} 与 \texttt{skip} 类型å˜é‡ã€‚} % \begin{macro}[int]{\@@_dim_set_to_wd:Nn} % æ“作长度å˜é‡çš„辅助函数。 % \begin{macrocode} %<*thesis> \cs_new:Npn \@@_dim_set_to_wd:Nn #1#2 { \hbox_set:Nn \l_@@_tmp_box {#2} \dim_set:Nn #1 { \box_wd:N \l_@@_tmp_box } } \cs_generate_variant:Nn \@@_dim_set_to_wd:Nn { Nv } %</thesis> % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_cs_provide_eq:NN} % \begin{macrocode} \cs_new_protected:Npn \@@_cs_provide_eq:NN #1#2 { \cs_if_exist:NF #1 { \cs_set_eq:NN #1 #2 } } \cs_generate_variant:Nn \@@_cs_provide_eq:NN { cc } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_name_set:nnn,\@@_name_const:nnn, % \@@_name_const_from_clist:nnnn} % 定义默认å称的辅助函数。 % \begin{macrocode} \cs_new_protected:Npn \@@_name_set:nnn #1#2#3 { \tl_set:cn { l_@@_name_ #2 _ #1 _tl } {#3} } \cs_new_protected:Npn \@@_name_const:nnn #1#2#3 { \tl_const:cn { c_@@_name_ #2 _ #1 _tl } {#3} } %<*thesis> \cs_new_protected:Npn \@@_name_const_from_clist:nnnn #1#2#3#4 { \tl_const:ce { c_@@_name_ #2 _ #1 _tl } { \clist_item:nn {#4} {#3} } } %</thesis> % \end{macrocode} % \end{macro} % % \subsection{文档选项} % % \begin{variable}{\g_@@_thesis_type_int} % 论文类型。 % \begin{macrocode} %<thesis>\int_new:N \g_@@_thesis_type_int % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_lang_tl,\g_@@_lang_clist} % 论文主è¦è¯è¨€ã€‚ % \begin{macrocode} \tl_new:N \g_@@_lang_tl %<thesis>\clist_set:Nn \g_@@_lang_clist { zh, en } % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_baseline_skip_dim,\g_@@_fixed_baselineskip_bool} % 固定行è·ã€‚ % \begin{macrocode} \dim_new:N \g_@@_baseline_skip_dim \bool_new:N \g_@@_fixed_baselineskip_bool % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_text_font_tl,\g_@@_math_font_tl,\g_@@_cjk_font_tl} % å—体é…置。 % \begin{macrocode} \tl_new:N \g_@@_text_font_tl \tl_new:N \g_@@_math_font_tl \tl_new:N \g_@@_cjk_font_tl % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_slanted_uppercase_greek_bool} % å¤§å†™å¸Œè…Šå—æ¯çš„æ£/斜体。 % \begin{macrocode} \bool_new:N \g_@@_slanted_uppercase_greek_bool % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_upright_integral_bool} % 积分å·çš„æ£/斜体。 % \begin{macrocode} \bool_new:N \g_@@_upright_integral_bool % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_integral_limits_bool} % 积分å·ä¸Šä¸‹é™çš„ä½ç½®ã€‚ % \begin{macrocode} \bool_new:N \g_@@_integral_limits_bool % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_math_font_options_clist} % ä¼ å…¥æ•°å¦å—体å®åŒ…的选项列表。 % \begin{macrocode} \clist_new:N \g_@@_math_font_options_clist % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_review_bool} % 盲审模å¼ã€‚ % \begin{macrocode} %<thesis>\bool_new:N \g_@@_review_bool % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_options_to_ctex_class_clist} % ä¿å˜ç”± \pkg{sjtutex} ä¼ å…¥ \pkg{ctex} 文档类的选项列表。 % 默认 \pkg{ctex} 文档类的选项: % 使用 UTF8 ç¼–ç ,ä¸è°ƒæ•´åŸºç¡€ç±»çš„版å¼ä»¥åŠä¸è½½å…¥ \pkg{ctex} å—体预设é…置。 % \cls{sjtuthesis} å’Œ \cls{sjtureport} 文档类默认å—å·ä¸ºå°å››å·ã€‚ % \cls{sjtureport} å’Œ \cls{sjtuarticle} 文档类默认使用 1.3 行è·å€æ•°ã€‚ % \begin{macrocode} \clist_set:Nn \g_@@_options_to_ctex_class_clist { UTF8, %<!article> zihao = -4, %<!thesis> linespread = 1.3, scheme = plain, fontset = none } % \end{macrocode} % \end{variable} % % \begin{variable}{\g_@@_options_to_packages_clist} % ä¿å˜ç”±ä¼ 入其他å®åŒ…的选项列表。 % \begin{macrocode} \clist_set:Nn \g_@@_options_to_packages_clist { { no-math } { fontspec } , { list = off } { bicaption } , { warnings-off = { mathtools-overbracket, mathtools-colon } } { unicode-math } , %<!article> { chapter } { algorithm } , %<!article> { algochapter } { algorithm2e } , { amsmath, thmmarks } { ntheorem } } % \end{macrocode} % \end{variable} % % \begin{macro}[int]{\@@_set_deprecated_option:n} % 对过时选项给出è¦å‘Šã€‚ % \begin{macrocode} \msg_new:nnn { sjtutex } { deprecated-option } { Option~'\l_keys_key_str'~is~deprecated! \\ #1 } \cs_new_protected:Npn \@@_set_deprecated_option:n #1 { \msg_warning:nnn { sjtutex } { deprecated-option } { Option~'#1'~is~set. } \keys_set:nn { sjtu / option } {#1} } % \end{macrocode} % \end{macro} % % \begin{macrocode} \msg_new:nnn { sjtutex } { unsupported-option } { Option~'\l_keys_key_str'~is~not~supported! \\ Will~be~ignored. } % \end{macrocode} % % 定义 |sjtu/option| 键值类。 % \begin{macrocode} \keys_define:nn { sjtu / option } { % \end{macrocode} % % \changes{v2.0}{2022/10/25}{\cls{sjtuthesis} 类型选项移除 \opt{course}, % ä¸å†æ”¯æŒè¯¾ç¨‹è®ºæ–‡ã€‚} % \begin{macro}{type} % 论文类型。 % \begin{macrocode} %<*thesis> type .choice: , type .value_required:n = true , type .choices:nn = { bachelor, master, doctor } { \int_gset_eq:NN \g_@@_thesis_type_int \l_keys_choice_int } , type .initial:n = { master } , %</thesis> % \end{macrocode} % \end{macro} % % \changes{v2.0}{2023/03/19}{è¯è¨€é€‰é¡¹æ–°å¢ž \opt{ja}ï¼Œæ·»åŠ æ—¥æ–‡æ¨¡æ¿ã€‚} % \changes{v2.0}{2023/03/23}{è¯è¨€é€‰é¡¹æ–°å¢ž \opt{de}ï¼Œæ·»åŠ å¾·æ–‡æ¨¡æ¿ã€‚} % \begin{macro}{lang} % 论文主è¦è¯è¨€ã€‚ % \begin{macrocode} lang .choice: , lang .value_required:n = true , lang .choices:nn = { zh, en, de, ja } { \tl_gset_eq:NN \g_@@_lang_tl \l_keys_choice_tl %<*thesis> \clist_if_in:NnF \g_@@_lang_clist {#1} { \clist_gput_right:Nn \g_@@_lang_clist {#1} } %</thesis> } , lang .initial:n = { zh } , % \end{macrocode} % \end{macro} % % \changes{v2.0}{2022/12/03}{æ·»åŠ \opt{lineskip} 文档类选项。} % \changes{v2.1}{2023/10/24}{æ·»åŠ \opt{baselineskip} 文档类选项, % 替æ¢åŽŸ \opt{lineskip} 选项。} % \begin{macro}{baselineskip} % æ£æ–‡åŸºçº¿é—´è·ã€‚ % \begin{macrocode} baselineskip .choice: , baselineskip .value_required:n = true , baselineskip / false .code:n = { \bool_gset_false:N \g_@@_fixed_baselineskip_bool } , baselineskip / unknown .code:n = { \bool_gset_true:N \g_@@_fixed_baselineskip_bool \dim_gset:Nn \g_@@_baseline_skip_dim {#1} } , %<thesis> baselineskip .initial:n = { 20 bp } , %<!thesis> baselineskip .initial:n = { false } , % \end{macrocode} % \end{macro} % % \begin{macro}{text-font,math-font,cjk-font} % å—体é…置。 % \begin{macrocode} text-font .tl_gset:N = \g_@@_text_font_tl , text-font .initial:n = { newtx } , math-font .tl_gset:N = \g_@@_math_font_tl , cjk-font .tl_gset:N = \g_@@_cjk_font_tl , % \end{macrocode} % \end{macro} % % \opt{fontset} ç‰æ˜¯è¿‡æ—¶é€‰é¡¹ã€‚ % \begin{macrocode} fontset .code:n = { \@@_set_deprecated_option:n { cjk-font = #1 } } , nofonts .code:n = { \@@_set_deprecated_option:n { cjk-font = none } } , adobefonts .code:n = { \@@_set_deprecated_option:n { cjk-font = adobe } } , winfonts .code:n = { \@@_set_deprecated_option:n { cjk-font = windows } } , % \end{macrocode} % % \changes{v2.0}{2023/01/05}{æ·»åŠ \opt{math-style} 文档类选项,默认值为 \opt{ISO}。} % \begin{macro}{math-style} % æ•°å¦ç¬¦å·æ ·å¼ã€‚ % \begin{macrocode} math-style .choice: , math-style .value_required:n = true, math-style / TeX .code:n = { \bool_gset_false:N \g_@@_slanted_uppercase_greek_bool \bool_gset_false:N \g_@@_upright_integral_bool \bool_gset_false:N \g_@@_integral_limits_bool } , math-style / ISO .code:n = { \bool_gset_true:N \g_@@_slanted_uppercase_greek_bool \bool_gset_true:N \g_@@_upright_integral_bool \bool_gset_true:N \g_@@_integral_limits_bool } , math-style .initial:n = { ISO } , % \end{macrocode} % \end{macro} % % \begin{macro}{uppercase-greek} % å¤§å†™å¸Œè…Šå—æ¯çš„æ£/斜体。 % \begin{macrocode} uppercase-greek .choice: , uppercase-greek .value_required:n = true , uppercase-greek / slanted .code:n = { \bool_gset_true:N \g_@@_slanted_uppercase_greek_bool } , uppercase-greek / upright .code:n = { \bool_gset_false:N \g_@@_slanted_uppercase_greek_bool } , % \end{macrocode} % \end{macro} % % \begin{macro}{integral} % 积分å·çš„æ£/斜体。 % \begin{macrocode} integral .choice: , integral .value_required:n = true , integral / slanted .code:n = { \bool_gset_false:N \g_@@_upright_integral_bool } , integral / upright .code:n = { \bool_gset_true:N \g_@@_upright_integral_bool } , % \end{macrocode} % \end{macro} % % \begin{macro}{integral-limits} % 积分å·ä¸Šä¸‹é™çš„ä½ç½®ã€‚ % \begin{macrocode} integral-limits .choice: , integral-limits .value_required:n = true , integral-limits / false .code:n = { \bool_gset_false:N \g_@@_integral_limits_bool } , integral-limits / true .code:n = { \bool_gset_true:N \g_@@_integral_limits_bool } , % \end{macrocode} % \end{macro} % % \begin{macro}{review} % 盲审模å¼ã€‚ % \begin{macrocode} %<thesis> review .bool_gset:N = \g_@@_review_bool , %<thesis> review .initial:n = false , % \end{macrocode} % \end{macro} % % å°†æœªçŸ¥é€‰é¡¹ä¼ ç»™æ ‡å‡†æ–‡æ¡£ç±»ã€‚ % \begin{macrocode} unknown .code:n = { \clist_gput_right:No \g_@@_options_to_ctex_class_clist { \CurrentOption } } } % \end{macrocode} % % å±è”½ä¸æ”¯æŒçš„ \pkg{ctex} 选项。 % \begin{macrocode} \clist_map_inline:nn { GBK, scheme, cap, nocap } { \keys_define:nn { sjtu / option } { #1 .code:n = { \msg_warning:nn { sjtutex } { unsupported-option } } } } % \end{macrocode} % % å°†æ–‡æ¡£ç±»é€‰é¡¹ä¼ ç»™ |sjtu/option|。 % \begin{macrocode} \ProcessKeyOptions [ sjtu / option ] % \end{macrocode} % % \begin{macro}[int,pTF]{\@@_if_main_lang_de:,\@@_if_main_lang_ja:} % å¿«æ·åˆ¤æ–主è¦è¯è¨€ã€‚ % \begin{macrocode} \@@_conditional_const:nn { main_lang_de } { \str_if_eq_p:Vn \g_@@_lang_tl { de } } \@@_conditional_const:nn { main_lang_ja } { \str_if_eq_p:Vn \g_@@_lang_tl { ja } } % \end{macrocode} % \end{macro} % % æ•°å—å—体å®åŒ…选项。 % \begin{macrocode} \bool_if:NT \g_@@_slanted_uppercase_greek_bool { \clist_put_right:Nn \g_@@_math_font_options_clist { slantedGreek } } \bool_if:NT \g_@@_upright_integral_bool { \clist_put_right:Nn \g_@@_math_font_options_clist { upint } } % \end{macrocode} % % è¿½åŠ é€‰é¡¹ã€‚ % \begin{macrocode} \clist_put_left:Nn \@classoptionslist { a4paper } \@@_if_main_lang_de:T { \clist_put_right:Nn \@classoptionslist { german, ngerman } } \bool_if:NTF \g_@@_integral_limits_bool { \clist_put_right:Nn \@classoptionslist { intlimits } \clist_put_right:Nn \g_@@_options_to_packages_clist { { displaylimits } { cmupint } } } { \clist_put_right:Nn \g_@@_options_to_packages_clist { { nolimits } { cmupint } } } \clist_concat:NNN \@classoptionslist \@classoptionslist \g_@@_math_font_options_clist % \end{macrocode} % % 内部设置接å£ã€‚ % \begin{macrocode} %<*thesis> \cs_set_protected:Npe \@@_setup:n { \bool_if:NTF \g_@@_review_bool { \exp_not:N \keys_set_exclude_groups:nnn { sjtu } { sensitive } } { \exp_not:N \keys_set:nn { sjtu } } } %</thesis> % \end{macrocode} % % % \subsection{载入å®åŒ…ã€æ–‡æ¡£ç±»} % % å°†é€‰é¡¹ä¼ å…¥ \pkg{ctex} 文档类。 % \begin{macrocode} \exp_args:No \PassOptionsToClass { \g_@@_options_to_ctex_class_clist } %<thesis> { ctexbook } %<report> { ctexrep } %<article> { ctexart } % \end{macrocode} % % ä¼ å…¥å„å®åŒ…选项。 % \begin{macrocode} \clist_map_inline:Nn \g_@@_options_to_packages_clist { \PassOptionsToPackage #1 } % \end{macrocode} % % 载入 \pkg{ctex} 文档类。 % 在使用 \XeLaTeX{} 编译时,\pkg{ctex} 的底层将调用 \pkg{xeCJK} % å®åŒ…;而在使用 \LuaLaTeX{} 编译时,则将调用 \pkg{LuaTeX-ja} å®åŒ…。 % ä¸¤ç§æƒ…况下 \pkg{ctex} å‡ä¼šè°ƒç”¨ \pkg{fontspec} å®åŒ…。 % \begin{macrocode} %<thesis>\LoadClass { ctexbook } %<report>\LoadClass { ctexrep } %<article>\LoadClass { ctexart } % \end{macrocode} % % \changes{v2.2.1}{2025/03/27}{ä¸å†è‡ªåŠ¨è½½å…¥ \pkg{xcolor} å®åŒ…。} % 载入å„å®åŒ…。 % \begin{macrocode} \RequirePackage { array, mathtools, geometry, fancyhdr, titletoc, caption, bicaption, subcaption, graphicx, enumitem } % \end{macrocode} % % \subsection{æ–‡æ¡£æ ¼å¼} % % \subsubsection{å—å·è¡Œè·} % % \begin{macro}[int]{\SJTU@orig@normalsize} % ä¿å˜åŽŸå§‹ \tn{normalsize} å—å·å¤§å°ã€‚ % \begin{macrocode} \normalsize \cs_set_protected:Npe \SJTU@orig@normalsize { \exp_not:N \fontsize { \f@size } { \f@baselineskip } \exp_not:N \selectfont } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_set_font_size:nnNn} % \begin{macro}{\normalsize} % é‡å®šä¹‰ \tn{normalsize}ï¼Œè®¾ç½®æ£æ–‡çš„基线间è·ã€‚ % \begin{macrocode} \msg_new:nnn { sjtutex } { baselineskip-invalid } { Invalid~baselineskip~value~'#1'! \\ Using~default~value~instead. } \cs_new_protected:Npn \@@_set_font_size:nnNn #1#2#3#4 { \cs_set_protected:Npn #3 { \@setfontsize #3 {#1} {#2} #4 } } \bool_if:NT \g_@@_fixed_baselineskip_bool { \dim_compare:nNnTF { \f@size pt } > { \g_@@_baseline_skip_dim } { \msg_warning:nne { sjtutex } { baselineskip-invalid } { \dim_to_decimal:n { \g_@@_baseline_skip_dim } pt } } { \tl_set:Ne \l_@@_font_size_tl { { \f@size } { \dim_to_decimal:n { \g_@@_baseline_skip_dim } } } \int_case:nn { \@ptsize } { { 0 } { \exp_after:wN \@@_set_font_size:nnNn \l_@@_font_size_tl \normalsize { \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ \abovedisplayshortskip \z@ \@plus3\p@ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ \belowdisplayskip \abovedisplayskip \let\@listi\@listI } } { 1 } { \exp_after:wN \@@_set_font_size:nnNn \l_@@_font_size_tl \normalsize { \abovedisplayskip 11\p@ \@plus3\p@ \@minus6\p@ \abovedisplayshortskip \z@ \@plus3\p@ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ \belowdisplayskip \abovedisplayskip \let\@listi\@listI } } { 2 } { \exp_after:wN \@@_set_font_size:nnNn \l_@@_font_size_tl \normalsize { \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ \abovedisplayshortskip \z@ \@plus3\p@ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ \belowdisplayskip \abovedisplayskip \let\@listi\@listI } } } \normalsize } } % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{\setbaselineskip} % 设置基线间è·ï¼Œåœ¨å—å·å‘½ä»¤ä¹‹åŽä½¿ç”¨ã€‚ % \begin{macrocode} \NewDocumentCommand \setbaselineskip { m } { \fontsize { \f@size } {#1} \selectfont } % \end{macrocode} % \end{macro} % % \subsubsection{å—体é…ç½®} % % \begin{macro}[int]{\@@_fontset_error:nn} % å—库ä¸å¯ç”¨æ—¶ç»™å‡ºç´§æ€¥é”™è¯¯ä¿¡æ¯ï¼Œåœæ¢è¯»å–定义文件。 % \begin{macrocode} \msg_new:nnn { sjtutex } { font-unavailable } { '#1-font~=~#2'~is~unavailable~in~current~mode. } \cs_new_protected:Npn \@@_fontset_error:nn #1#2 { \msg_critical:nnnn { sjtutex } { font-unavailable } {#1} {#2} } \cs_set_protected:Npn \ctex_fontset_error:n #1 { \msg_critical:nnnn { sjtutex } { font-unavailable } { cjk } {#1} } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_declare_math_symbol:nnNn} % \begin{macrocode} \cs_new_protected:Nn \@@_declare_math_symbol:nnNn { \cs_undefine:N #3 \DeclareMathSymbol {#3} {#1} {#2} {#4} } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_set_slanted_greek:} % \begin{macrocode} \cs_new_protected:Nn \@@_set_slanted_greek: { \clist_const:Nn \c_@@_uppercase_greek_clist { Gamma, Delta, Theta, Lambda, Xi, Pi, Sigma, Upsilon, Phi, Psi, Omega } \clist_map_inline:Nn \c_@@_uppercase_greek_clist { \cs_set_eq:cc { up ##1 } { ##1 } \cs_set_eq:cc { it ##1 } { var ##1 } } \bool_if:NT \g_@@_slanted_uppercase_greek_bool { \clist_map_inline:Nn \c_@@_uppercase_greek_clist { \cs_set_eq:cc { ##1 } { it ##1 } } } } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_set_unimath_symbol:} % \begin{macrocode} \cs_new_protected:Nn \@@_set_unimath_symbol: { \clist_map_inline:nn { { increment } { upDelta } , { QED } { blacksquare } } { \@@_cs_provide_eq:cc ##1 } } % \end{macrocode} % \end{macro} % % 如果没有指定数å¦å—ä½“ï¼Œåˆ™æ ¹æ®è¥¿æ–‡å—体设置匹é…的数å—å—体。 % \begin{macrocode} \tl_if_empty:NT \g_@@_math_font_tl { \tl_gset_eq:NN \g_@@_math_font_tl \g_@@_text_font_tl } % \end{macrocode} % % æ ¹æ®æ“作系统判æ–默认 CJK å—体é…置。 % \begin{macrocode} \tl_if_empty:NT \g_@@_cjk_font_tl { \sys_if_platform_windows:TF { \tl_gset:Nn \g_@@_cjk_font_tl { windows } } { \ctex_if_platform_macos:TF { \tl_gset:Nn \g_@@_cjk_font_tl { mac } } { \tl_gset:Nn \g_@@_cjk_font_tl { fandol } } } } % \end{macrocode} % % \begin{macro}[int]{\@@_load_font:nn,\@@_load_fontset:} % 如果å—体é…置文件ä¸å˜åœ¨ï¼Œåˆ™è½½å…¥é»˜è®¤å€¼ï¼Œå¹¶ç»™å‡ºè¦å‘Šã€‚ % \begin{macrocode} \msg_new:nnn { sjtutex } { invalid-font } { Invalid~value~'#1-font~=~\tl_use:c { g_@@_ #1 _font_tl }'! \\ Using~'#2'~instead. } \cs_new_protected:Npn \@@_load_font:nn #1#2 { \str_if_eq:vnF { g_@@_ #1 _font_tl } { none } { \file_if_exist:nF { sjtu- #1 -font- \tl_use:c { g_@@_ #1 _font_tl } .def } { \msg_warning:nnnn { sjtutex } { invalid-font } {#1} {#2} \tl_gset:cn { g_@@_ #1 _font_tl } {#2} } \ctex_file_input:n { sjtu- #1 -font- \tl_use:c { g_@@_ #1 _font_tl } .def } } } \cs_new_protected:Nn \@@_load_fontset: { \clist_map_inline:nn { { math } { newtx }, { text } { newtx }, { cjk } { fandol } } { \@@_load_font:nn ##1 } } \@onlypreamble \@@_load_font:nn \@onlypreamble \@@_load_fontset: %</class> % \end{macrocode} % \end{macro} % % \paragraph{西文与数å¦å—体} % % \changes{v2.0.3}{2023/09/25}{新增 \opt{libertinus} å—体é…置。} % \begin{macrocode} %<*font&(math|text)> %<*math&type1> %<*newtx|newpx> \tl_set_eq:NN \l_@@_save_encodingdefault_tl \encodingdefault \tl_set_eq:NN \l_@@_save_rmdefault_tl \rmdefault \tl_set_eq:NN \l_@@_save_sfdefault_tl \sfdefault \tl_set_eq:NN \l_@@_save_ttdefault_tl \ttdefault \tl_set:Nn \encodingdefault { OT1 } %<newtx>\tl_set:Nn \rmdefault { ntxtlf } %<newpx>\tl_set:Nn \rmdefault { zplTLF } \tl_set:Nn \qhv@scale { 0.94 } \tl_set:Nn \sfdefault { qhv } \tl_set:Nn \ttdefault { qcr } %<newtx>\RequirePackage { newtxmath } %<newpx>\RequirePackage { newpxmath } \tl_set_eq:NN \encodingdefault \l_@@_save_encodingdefault_tl \tl_set_eq:NN \rmdefault \l_@@_save_rmdefault_tl \tl_set_eq:NN \sfdefault \l_@@_save_sfdefault_tl \tl_set_eq:NN \ttdefault \l_@@_save_ttdefault_tl %</newtx|newpx> %<times>\PassOptionsToPackage { Symbol } { upgreek } %<lm|times>\RequirePackage { amssymb, upgreek } %<*lm> \SetSymbolFont { operators } { normal } { OT1 } { lmr } { m } { n } \SetSymbolFont { letters } { normal } { OML } { lmm } { m } { it } \SetSymbolFont { symbols } { normal } { OMS } { lmsy } { m } { n } \SetSymbolFont { largesymbols } { normal } { OMX } { lmex } { m } { n } \SetSymbolFont { operators } { bold } { OT1 } { lmr } { bx } { n } \SetSymbolFont { letters } { bold } { OML } { lmm } { b } { it } \SetSymbolFont { symbols } { bold } { OMS } { lmsy } { b } { n } \SetSymbolFont { largesymbols } { bold } { OMX } { lmex } { m } { n } \SetMathAlphabet { \mathbf } { normal } { OT1 } { lmr } { bx } { n } \SetMathAlphabet { \mathsf } { normal } { OT1 } { lmss } { m } { n } \SetMathAlphabet { \mathit } { normal } { OT1 } { lmr } { m } { it } \SetMathAlphabet { \mathtt } { normal } { OT1 } { lmtt } { m } { n } \SetMathAlphabet { \mathbf } { bold } { OT1 } { lmr } { bx } { n } \SetMathAlphabet { \mathsf } { bold } { OT1 } { lmss } { bx } { n } \SetMathAlphabet { \mathit } { bold } { OT1 } { lmr } { bx } { it } \SetMathAlphabet { \mathtt } { bold } { OT1 } { lmtt } { m } { n } \@@_set_slanted_greek: %</lm> %<*times> \tl_set_eq:NN \l_@@_save_rmdefault_tl \rmdefault \RequirePackage { mathptmx } \tl_set_eq:NN \rmdefault \l_@@_save_rmdefault_tl \tl_set:Nn \Hv@scale { 0.94 } \DeclareMathAlphabet { \mathsf } { OT1 } { phv } { m } { n } \DeclareMathAlphabet { \mathtt } { OT1 } { pcr } { m } { n } \SetMathAlphabet { \mathsf } { bold } { OT1 } { phv } { b } { n } \SetMathAlphabet { \mathtt } { bold } { OT1 } { pcr } { b } { n } \DeclareSymbolFont { SJTU@ptm } { OML } { ptmcm } { m } { it } \@@_declare_math_symbol:nnNn { \mathord } { SJTU@ptm } \upvarsigma { "26 } %</times> %<lm|times>\bool_if:NT \g_@@_upright_integral_bool %<lm|times> { \RequirePackage { cmupint } } \@@_set_unimath_symbol: %</math&type1> %<*!(math&type1)> %<lm>\@@_if_engine_opentype:F %<*!lm> \@@_if_engine_opentype:TF { %<*math> \RequirePackage { unicode-math } %<*stixtwo> \bool_if:NTF \g_@@_upright_integral_bool { \setmathfont { STIXTwoMath-Regular.otf } [ StylisticSet = 8 ] } { \setmathfont { STIXTwoMath-Regular.otf } } \setmathfont { STIXTwoMath-Regular.otf } [ range = { scr, bfscr }, StylisticSet = 1 ] %</stixtwo> %<*libertinus> \bool_if:NTF \g_@@_upright_integral_bool { \setmathfont { LibertinusMath-Regular.otf } } { \setmathfont { LibertinusMath-Regular.otf } [ StylisticSet = 8 ] } \setmathfont { latinmodern-math.otf } [ range = \checkmark ] %</libertinus> %<cambria> \setmathfont { Cambria~Math } %<*newcm> \bool_if:NTF \g_@@_upright_integral_bool { \setmathfont { NewCMMath-Book.otf } [ StylisticSet = 2 ] } { \setmathfont { NewCMMath-Book.otf } } \setmathfont { NewCMMath-Book.otf } [ range = { scr, bfscr }, StylisticSet = 1 ] %</newcm> %<*xits> \bool_if:NTF \g_@@_upright_integral_bool { \setmathfont { XITSMath-Regular } [ Extension = .otf, BoldFont = XITSMath-Bold, StylisticSet = 8 ] } { \setmathfont { XITSMath-Regular } [ Extension = .otf, BoldFont = XITSMath-Bold, ] } \setmathfont { XITSMath-Regular.otf } [ range = { cal, bfcal }, StylisticSet = 1 ] %</xits> %</math> %<*newtx|newpx|stixtwo|xits> %<math> \setmathrm %<text> \setmainfont %<newtx> { TeXGyreTermesX } %<newpx> { TeXGyrePagellaX } %<stixtwo> { STIXTwoText } %<xits> { XITS } [ Extension = .otf, UprightFont = *-Regular, BoldFont = *-Bold, ItalicFont = *-Italic, BoldItalicFont = *-BoldItalic ] %<math> \setmathsf %<text> \setsansfont { texgyreheros } [ Extension = .otf, UprightFont = *-regular, BoldFont = *-bold, ItalicFont = *-italic, BoldItalicFont = *-bolditalic, Scale = 0.94 ] %<math> \setmathtt %<text> \setmonofont { texgyrecursor } [ Extension = .otf, UprightFont = *-regular, BoldFont = *-bold, ItalicFont = *-italic, BoldItalicFont = *-bolditalic, Ligatures = CommonOff ] %</newtx|newpx|stixtwo|xits> %<*text×> \setmainfont { Times~New~Roman } [ Ligatures = Rare ] \setsansfont { Arial } [ Scale = 0.94 ] \setmonofont { Courier~New } %</text×> %<*libertinus> %<math> \setmathrm %<text> \setmainfont { LibertinusSerif } [ Extension = .otf, UprightFont = *-Regular, BoldFont = *-Bold, ItalicFont = *-Italic, BoldItalicFont = *-BoldItalic, SlantedFont = *-Regular, BoldSlantedFont = *-Bold, SlantedFeatures = { FakeSlant = 0.2 }, BoldSlantedFeatures = { FakeSlant = 0.2 } ] %<math> \setmathsf %<text> \setsansfont { LibertinusSans } [ Extension = .otf, UprightFont = *-Regular, BoldFont = *-Bold, ItalicFont = *-Italic, BoldItalicFont = *-Italic, BoldItalicFeatures = { FakeBold = 3 }, SlantedFont = *-Regular, BoldSlantedFont = *-Bold, SlantedFeatures = { FakeSlant = 0.2 }, BoldSlantedFeatures = { FakeSlant = 0.2 } ] %</libertinus> %<*cambria> %<*math> \setmathrm { Cambria } \setmathsf { Calibri } \setmathtt { Consolas } [ Scale = 0.95 ] %</math> %<*text> \setmainfont { Cambria } \setsansfont { Calibri } \setmonofont { Consolas } [ Scale = 0.95 ] %</text> %</cambria> %<*newcm> %<math> \setmathrm %<text> \setmainfont { NewCM10 } [ Extension = .otf, SizeFeatures = { { Size = -9, Font = NewCM08-Book, ItalicFont = NewCM08-BookItalic, SlantedFont = NewCM08-Book, }, { Size = 9- } }, UprightFont = *-Book, BoldFont = *-Bold, ItalicFont = *-BookItalic, BoldItalicFont = *-BoldItalic, SlantedFont = *-Book, SlantedFeatures = { FakeSlant = 0.25 }, BoldSlantedFont = *-Bold, BoldSlantedFeatures = { FakeSlant = 0.25 } ] %<math> \setmathsf %<text> \setsansfont { NewCMSans10 } [ Extension = .otf, SizeFeatures = { { Size = -9, Font = NewCMSans08-Book, ItalicFont = NewCMSans08-BookOblique, }, { Size = 9- } }, UprightFont = *-Book, BoldFont = *-Bold, ItalicFont = *-BookOblique, BoldItalicFont = *-BoldOblique ] %<math> \setmathtt %<text> \setmonofont { NewCMMono10 } [ Extension = .otf, UprightFont = *-Book, BoldFont = *-Bold, ItalicFont = *-BookItalic, BoldItalicFont = *-BoldOblique, SlantedFont = *-Book, SlantedFeatures = { FakeSlant = 0.25 }, BoldSlantedFont = *-Bold, BoldSlantedFeatures = { FakeSlant = 0.25 } ] %</newcm> } %</!lm> %<*text&!otf> { \tl_set:Nn \encodingdefault { T1 } %<lm> \tl_set:Nn \rmdefault { lmr } %<lm> \tl_set:Nn \sfdefault { lmss } %<libertinus> \tl_set:Nn \rmdefault { LibertinusSerif-TLF } %<libertinus> \tl_set:Nn \sfdefault { LibertinusSans-TLF } %<lm|libertinus> \tl_set:Nn \ttdefault { lmtt } %<newtx> \PassOptionsToPackage { nohelv, nott } { newtxtext } %<newpx> \PassOptionsToPackage { nohelv, nott } { newpxtext } %<newtx> \RequirePackage { newtxtext } %<newpx> \RequirePackage { newpxtext } %<*stixtwo> \DeclareEncodingSubset { TS1 } { ? } { 0 } \UndeclareTextCommand { \textpertenthousand } { T1 } \DeclareTextSymbolDefault { \textpertenthousand } { TS1 } \tl_set:Nn \rmdefault { stix2 } %</stixtwo> %<newtx|newpx|stixtwo> \tl_set:Nn \qhv@scale { 0.94 } %<newtx|newpx|stixtwo> \tl_set:Nn \sfdefault { qhv } %<newtx|newpx|stixtwo> \tl_set:Nn \ttdefault { qcr } %<*times> \tl_set:Nn \rmdefault { ptm } \tl_set:Nn \Hv@scale { 0.94 } \tl_set:Nn \sfdefault { phv } \tl_set:Nn \ttdefault { pcr } %</times> } %</text&!otf> %<*text&otf> %<cambria> { \@@_fontset_error:nn { text } { cambria } } %<newcm> { \@@_fontset_error:nn { text } { newcm } } %<xits> { \@@_fontset_error:nn { text } { xits } } %</text&otf> %<*math&!otf> { %<*libertinus> \exp_args:No \PassOptionsToPackage { \g_@@_math_font_options_clist } { libertinust1math } \RequirePackage { libertinust1math } %</libertinus> %<*stixtwo> \DeclareSizeFunction { sub } { \sub@sfcnt \@font@info } \PassOptionsToPackage { notext } { stix2 } \RequirePackage { stix2 } \clist_map_inline:nn { \upalpha { "0B } , \upbeta { "0C } , \upgamma { "0D } , \updelta { "0E } , \upepsilon { "0F } , \upzeta { "10 } , \upeta { "11 } , \uptheta { "12 } , \upiota { "13 } , \upkappa { "14 } , \uplambda { "15 } , \upmu { "16 } , \upnu { "17 } , \upxi { "18 } , \uppi { "19 } , \uprho { "1A } , \upsigma { "1B } , \uptau { "1C } , \upupsilon { "1D } , \upphi { "1E } , \upchi { "1F } , \uppsi { "20 } , \upomega { "21 } , \upvarepsilon { "22 } , \upvartheta { "23 } , \upvarpi { "24 } , \upvarrho { "25 } , \upvarsigma { "26 } , \upvarphi { "27 } } { \@@_declare_math_symbol:nnNn { \stix@lcgc } { operators } #1 } \@@_set_slanted_greek: %</stixtwo> } %</math&!otf> %<*math&otf> %<cambria> { \@@_fontset_error:nn { math } { cambria } } %<newcm> { \@@_fontset_error:nn { math } { newcm } } %<xits> { \@@_fontset_error:nn { math } { xits } } %</math&otf> %</!(math&type1)> %</font&(math|text)> % \end{macrocode} % % \pkg{unicode-math} å®åŒ…设置。 % \begin{macrocode} %<*class> \ctex_at_end_package:nn { unicode-math } { \DeclareDocumentCommand \bm { m } { { \symbf {#1} } } \DeclareDocumentCommand \boldsymbol { m } { { \symbf {#1} } } \bool_if:NTF \g_@@_slanted_uppercase_greek_bool { \keys_set:nn { unicode-math } { math-style = ISO } } { \keys_set:nn { unicode-math } { math-style = TeX } } \bool_if:NTF \g_@@_integral_limits_bool { \removenolimits } { \addnolimits } { \int\iint\iiint\iiiint\oint\oiint\oiiint \intclockwise\varointclockwise\ointctrclockwise\sumint \intbar\intBar\fint\cirfnint\awint\rppolint \scpolint\npolint\pointint\sqint\intlarhk\intx \intcap\intcup\upint\lowint } \clist_map_inline:nn { amsfonts, amssymb, bm, upgreek } { \@@_disable_package_load:n {#1} } } % \end{macrocode} % % 若未使用 \pkg{unicode-math} é…置数å¦å—体,则自动调用 \pkg{bm}, % 并在未定义 \tn{uppi} å’Œ \tn{checkmark} 时分别调用 \pkg{upgreek} å’Œ \pkg{amsfonts}。 % \begin{macrocode} \ctex_at_end_preamble:n { \IfPackageLoadedF { unicode-math } { \RequirePackage { bm } \cs_if_exist:NF \uppi { \RequirePackage { upgreek } } \cs_if_exist:NF \checkmark { \RequirePackage { amsfonts } } } } %</class> % \end{macrocode} % % \paragraph{CJK å—体} % % \changes{v2.2}{2024/11/28}{新增 \opt{hanyi} å—体é…置。} % 在å—体未æä¾›å¯¹åº”粗体的情况下,å…许使用伪粗。 % \begin{macrocode} %<*font&cjk> \@@_if_engine_opentype:TF { \@@_if_main_lang_ja:TF { %<*windows> \setCJKmainfont { MS~Mincho } [ AutoFakeBold = 3 ] \setCJKsansfont { MS~Gothic } [ AutoFakeBold = 3 ] \setCJKmonofont { MS~Mincho } \setCJKfamilyfont { jamin } { MS~Mincho } [ AutoFakeBold = 3 ] \setCJKfamilyfont { jagoth } { MS~Gothic } [ AutoFakeBold = 3 ] %</windows> %<*mac> \setCJKmainfont { HiraMinProN } [ UprightFont = *-W3 , BoldFont = *-W6 ] \setCJKsansfont { HiraKakuProN } [ UprightFont = *-W3 , BoldFont = *-W6 ] \setCJKmonofont { HiraMinProN-W3 } \setCJKfamilyfont { jamin } { HiraMinProN } [ UprightFont = *-W3 , BoldFont = *-W6 ] \setCJKfamilyfont { jagoth } { HiraKakuProN } [ UprightFont = *-W3 , BoldFont = *-W6 ] %</mac> %<*ubuntu> \setCJKmainfont { Noto~Serif~CJK~JP } [ UprightFont = *~Light , BoldFont = *~Bold ] \setCJKsansfont { Noto~Sans~CJK~JP } [ UprightFont = *~Medium , BoldFont = *~Bold ] \setCJKmonofont { Noto~Serif~CJK~JP } [ UprightFont = *~Light , BoldFont = *~Bold ] \setCJKfamilyfont { jamin } { Noto~Serif~CJK~JP } [ UprightFont = *~Light , BoldFont = *~Bold ] \setCJKfamilyfont { jagoth } { Noto~Sans~CJK~JP } [ UprightFont = *~Medium , BoldFont = *~Bold ] %</ubuntu> %<*adobe> \setCJKmainfont { KozMinPr6N } [ UprightFont = *-Light , BoldFont = *-Bold ] \setCJKsansfont { KozGoPr6N } [ UprightFont = *-Medium , BoldFont = *-Bold ] \setCJKmonofont { KozMinPr6N-Light } \setCJKfamilyfont { jamin } { KozMinPr6N } [ UprightFont = *-Light , BoldFont = *-Bold ] \setCJKfamilyfont { jagoth } { KozGoPr6N } [ UprightFont = *-Medium , BoldFont = *-Bold ] %</adobe> %<*fandol|hanyi> \setCJKmainfont { HaranoAjiMincho } [ Extension = .otf , UprightFont = *-Regular , %<fandol> BoldFont = *-Bold %<hanyi> BoldFont = *-Medium ] \setCJKsansfont { HaranoAjiGothic } [ Extension = .otf , UprightFont = *-Medium , BoldFont = *-Bold ] \setCJKmonofont { HaranoAjiGothic } [ Extension = .otf , UprightFont = *-Regular ] \setCJKfamilyfont { jamin } { HaranoAjiMincho } [ Extension = .otf , %<fandol> BoldFont = *-Bold %<hanyi> BoldFont = *-Medium ] \setCJKfamilyfont { jagoth } { HaranoAjiGothic } [ Extension = .otf , UprightFont = *-Medium , BoldFont = *-Bold ] %</fandol|hanyi> %<*founder> \setCJKmainfont { ipam.ttf } [ AutoFakeBold = 3 ] \setCJKsansfont { ipag.ttf } [ AutoFakeBold = 3 ] \setCJKmonofont { ipag.ttf } \setCJKfamilyfont { jamin } { ipam.ttf } [ AutoFakeBold = 3 ] \setCJKfamilyfont { jagoth } { ipag.ttf } [ AutoFakeBold = 3 ] %</founder> \NewDocumentCommand \mincho { } { \CJKfamily { jamin } } \NewDocumentCommand \gothic { } { \CJKfamily { jagoth } } } %<*windows> { \setCJKmainfont { SimSun } [ AutoFakeBold = 3 , ItalicFont = KaiTi ] \setCJKsansfont { SimHei } [ AutoFakeBold = 3 ] \setCJKmonofont { FangSong } } \setCJKfamilyfont { zhsong } { SimSun } [ AutoFakeBold = 3 , ItalicFont = KaiTi ] \setCJKfamilyfont { zhhei } { SimHei } [ AutoFakeBold = 3 ] \setCJKfamilyfont { zhkai } { KaiTi } \setCJKfamilyfont { zhfs } { FangSong } %</windows> %<*mac> { \setCJKmainfont { Songti~SC } [ UprightFont = *~Light , BoldFont = *~Bold , ItalicFont = Kaiti~SC~Regular , BoldItalicFont = Kaiti~SC~Bold ] \setCJKsansfont { Heiti~SC } [ UprightFont = *~Medium , AutoFakeBold = 3 ] \setCJKmonofont { STFangsong } } \setCJKfamilyfont { zhsong } { Songti~SC } [ UprightFont = *~Light , BoldFont = *~Bold , ItalicFont = Kaiti~SC~Regular , BoldItalicFont = Kaiti~SC~Bold ] \setCJKfamilyfont { zhhei } { Heiti~SC } [ UprightFont = *~Medium , AutoFakeBold = 3 ] \setCJKfamilyfont { zhfs } { STFangsong } \setCJKfamilyfont { zhkai } { Kaiti~SC } [ UprightFont = *~Regular , BoldFont = *~Bold ] %</mac> %<*ubuntu> { \setCJKmainfont { Noto~Serif~CJK~SC } [ UprightFont = *~Light , BoldFont = *~Bold , ItalicFont = AR~PL~KaitiM~GB ] \setCJKsansfont { Noto~Sans~CJK~SC } [ UprightFont = *~Medium , BoldFont = *~Bold ] \setCJKmonofont { Noto~Serif~CJK~SC } [ UprightFont = *~Light , BoldFont = *~Bold ] } \setCJKfamilyfont { zhsong } { Noto~Serif~CJK~SC } [ UprightFont = *~Light , BoldFont = *~Bold , ItalicFont = AR~PL~KaitiM~GB ] \setCJKfamilyfont { zhhei } { Noto~Sans~CJK~SC } [ UprightFont = *~Medium , BoldFont = *~Bold ] \setCJKfamilyfont { zhkai } { AR~PL~KaitiM~GB } %</ubuntu> %<*adobe> { \setCJKmainfont { AdobeSongStd-Light } [ AutoFakeBold = 3 , ItalicFont = AdobeKaitiStd-Regular ] \setCJKsansfont { AdobeHeitiStd-Regular } [ AutoFakeBold = 3 ] \setCJKmonofont { AdobeFangsongStd-Regular } } \setCJKfamilyfont { zhsong } { AdobeSongStd-Light } [ AutoFakeBold = 3 , ItalicFont = AdobeKaitiStd-Regular ] \setCJKfamilyfont { zhhei } { AdobeHeitiStd-Regular } [ AutoFakeBold = 3 ] \setCJKfamilyfont { zhfs } { AdobeFangsongStd-Regular } \setCJKfamilyfont { zhkai } { AdobeKaitiStd-Regular } %</adobe> %<*fandol> { \setCJKmainfont { FandolSong } [ Extension = .otf , UprightFont = *-Regular , BoldFont = *-Bold , ItalicFont = FandolKai-Regular ] \setCJKsansfont { FandolHei } [ Extension = .otf , UprightFont = *-Regular , BoldFont = *-Bold ] \setCJKmonofont { FandolFang } [ Extension = .otf , UprightFont = *-Regular ] } \setCJKfamilyfont { zhsong } { FandolSong } [ Extension = .otf , UprightFont = *-Regular , BoldFont = *-Bold , ItalicFont = FandolKai-Regular ] \setCJKfamilyfont { zhhei } { FandolHei } [ Extension = .otf , UprightFont = *-Regular, BoldFont = *-Bold ] \setCJKfamilyfont { zhfs } { FandolFang } [ Extension = .otf , UprightFont = *-Regular ] \setCJKfamilyfont { zhkai } { FandolKai } [ Extension = .otf , UprightFont = *-Regular ] %</fandol> %<*founder> { \setCJKmainfont { FZShuSong-Z01 } [ AutoFakeBold = 3 , ItalicFont = FZKai-Z03 ] \setCJKsansfont { FZHei-B01 } [ AutoFakeBold = 3 ] \setCJKmonofont { FZFangSong-Z02 } } \setCJKfamilyfont { zhsong } { FZShuSong-Z01 } [ AutoFakeBold = 3 , ItalicFont = FZKai-Z03 ] \setCJKfamilyfont { zhhei } { FZHei-B01 } [ AutoFakeBold = 3 ] \setCJKfamilyfont { zhkai } { FZKai-Z03 } \setCJKfamilyfont { zhfs } { FZFangSong-Z02 } %</founder> %<*hanyi> { \setCJKmainfont { HYShuSongEr~S } [ BoldFont = HYZhongSong~S, ItalicFont = HYKaiTi~S ] \setCJKsansfont { HYZhongHei~S } [ BoldFont = HYDaHei~S ] \setCJKmonofont { HYFangSong~S } } \setCJKfamilyfont { zhsong } { HYShuSongEr~S } [ BoldFont = HYZhongSong~S ] \setCJKfamilyfont { zhhei } { HYZhongHei~S } [ BoldFont = HYDaHei~S ] \setCJKfamilyfont { zhkai } { HYKaiTi~S } \setCJKfamilyfont { zhfs } { HYFangSong~S } %</hanyi> \NewDocumentCommand \songti { } { \CJKfamily { zhsong } } \NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } %<!ubuntu> \NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } \NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } } { \@@_if_main_lang_ja:TF %<windows> { \@@_fontset_error:nn { cjk } { windows } } %<windows> { \ctex_file_input:n { ctex-fontset-windows.def } } %<mac> { \@@_fontset_error:nn { cjk } { mac } } %<mac> { \ctex_file_input:n { ctex-fontset-mac.def } } %<ubuntu> { \@@_fontset_error:nn { cjk } { ubuntu } } %<ubuntu> { \ctex_file_input:n { ctex-fontset-ubuntu.def } } %<adobe> { \@@_fontset_error:nn { cjk } { adobe } } %<adobe> { \ctex_file_input:n { ctex-fontset-adobe.def } } %<fandol> { \@@_fontset_error:nn { cjk } { fandol } } %<fandol> { \ctex_file_input:n { ctex-fontset-fandol.def } } %<founder> { \@@_fontset_error:nn { cjk } { founder } } %<founder> { \ctex_file_input:n { ctex-fontset-founder.def } } %<hanyi> { \@@_fontset_error:nn { cjk } { hanyi } } %<hanyi> { \ctex_file_input:n { ctex-fontset-hanyi.def } } } %</font&cjk> % \end{macrocode} % % \begin{macro}{\CJKrmfamily,\CJKsffamily,\CJKttfamily} % åªæ”¹å˜ CJK å—体æ—的命令。 % \begin{macrocode} %<*class> \NewDocumentCommand \CJKrmfamily { } { \CJKfamily { \CJKrmdefault } } \NewDocumentCommand \CJKsffamily { } { \CJKfamily { \CJKsfdefault } } \NewDocumentCommand \CJKttfamily { } { \CJKfamily { \CJKttdefault } } % \end{macrocode} % \end{macro} % % 带圈数å—使用 CJK å—体。 % \begin{macrocode} \sys_if_engine_xetex:T { \xeCJK_declare_char_class:nn { CJK } { "24EA, "2460->"2473, "3251->"32BF, "25A1 } } \sys_if_engine_luatex:T { \ltjdefcharrange { 99 } { "24EA, "2460- "2473, "3251- "32BF, "25A1 } \ltjsetparameter { jacharrange = { +99 } } } % \end{macrocode} % % \begin{macro}[int]{\@@_unicode_char:n} % ç”± Unicode ç ä½ç›´æŽ¥è°ƒç”¨å—符的辅助函数。 % \begin{macrocode} \sys_if_engine_pdftex:TF { \cs_new:Npn \@@_unicode_char:n #1 { \exp_not:N \Unicode { \int_div_truncate:nn {#1} { 256 } } { \int_mod:nn {#1} { 256 } } } } { \cs_new:Npn \@@_unicode_char:n #1 { \tex_Uchar:D #1 \scan_stop: } } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_symbol_const:nn} % 定义符å·çš„辅助函数。 % \begin{macrocode} \cs_new_protected:Npn \@@_symbol_const:nn #1#2 { \tl_const:ce { c_@@_symbol_ #1 _tl } { \@@_unicode_char:n {#2} } } % \end{macrocode} % \end{macro} % % \changes{v2.0.2}{2023/04/01}{延迟载入å—体é…ç½®ï¼Œä¿®å¤ \pkg{unicode-math} % 设置ä¸ç”Ÿæ•ˆçš„问题。} % 载入å—体é…置。 % \begin{macrocode} \@@_load_fontset: % \end{macrocode} % % \subsubsection{å称选项} % % 定义 |sjtu/name| 键值类。 % % è®¾ç½®æ ‡å‡†æ–‡æ¡£ç±»ä¸å·²å®šä¹‰çš„å称。 % \begin{macrocode} \keys_define:nn { sjtu / name } { contents .meta:nn = { ctex } { contentsname = {#1} } , listfigure .meta:nn = { ctex } { listfigurename = {#1} } , listtable .meta:nn = { ctex } { listtablename = {#1} } , figure .meta:nn = { ctex } { figurename = {#1} } , table .meta:nn = { ctex } { tablename = {#1} } , %<!thesis> abstract .meta:nn = { ctex } { abstractname = {#1} } , index .meta:nn = { ctex } { indexname = {#1} } , appendix .meta:nn = { ctex } { appendixname = {#1} } , proof .meta:nn = { ctex } { proofname = {#1} } , bib .meta:nn = { ctex } { bibname = {#1} } , part .tl_set:N = \partname , %<!article> chapter .tl_set:N = \chaptername , % \end{macrocode} % % \changes{v2.0}{2022/12/28}{简化 \opt{sjtu/name} ä¸é”®çš„å称:\opt{abbr}, % \opt{nom}, \opt{ack}, \opt{achv}。} % æ ‡å‡†æ–‡æ¡£ç±»ä¸æœªå®šä¹‰çš„å称。 % \begin{macrocode} figure* .tl_set:N = \SJTU@figurename@bi@second , figure* .initial:n = { 图 } , table* .tl_set:N = \SJTU@tablename@bi@second , table* .initial:n = { 表 } , algorithm .tl_set:N = \SJTU@algorithmname , algorithm .initial:n = { Algorithm } , listalgorithm .tl_set:N = \SJTU@listalgorithmname , listalgorithm .initial:n = { List~of~Algorithms } , %<*thesis> abbr .tl_set:N = \SJTU@abbrname , abbr .initial:n = { Abbreviations } , nom .tl_set:N = \SJTU@nomname , nom .initial:n = { Nomenclature } , ack .tl_set:N = \SJTU@ackname , ack .initial:n = { Acknowledgements } , resume .tl_set:N = \SJTU@resumename , resume .initial:n = { Resume } , digest .tl_set:N = \SJTU@digestname , digest .initial:n = { Digest } , achv .tl_set:N = \SJTU@achvname , achv .initial:n = { List~of~Research~Achievements }, %</thesis> } % \end{macrocode} % % \subsubsection{页é¢è®¾ç½®} % % 利用 \pkg{geometry} å®åŒ…设置页é¢è¾¹è·ä»¥åŠé¡µçœ‰é«˜åº¦ã€‚ % \begin{macrocode} \geometry { vmargin = { 3.5 cm , 4.0 cm } , hmargin = 2.5 cm , %<thesis> bindingoffset = 0.5 cm , headheight = 1.5 cm , headsep = 0.5 cm , footskip = 1.0 cm } % \end{macrocode} % % \changes{v2.0.3}{2023/09/24}{å¦ä½è®ºæ–‡é¡µé¢çºµå‘顶部对é½ã€‚} % å¦ä½è®ºæ–‡é¡µé¢çºµå‘顶部对é½ã€‚ % \begin{macrocode} %<*thesis> \AtEndOfClass { \raggedbottom } %</thesis> % \end{macrocode} % % \subsubsection{页眉页脚} % % \pkg{ctex} å®åŒ…使用 \opt{heading} 选项åŽï¼Œä¼šæŠŠé¡µé¢æ ¼å¼è®¾ç½®ä¸º |headings|。 % å› æ¤å¿…须在 \pkg{ctex} 调用之åŽé‡æ–°è®¾ç½® \tn{pagestyle} 为 |fancy|。 % \begin{macrocode} \pagestyle { fancy } % \end{macrocode} % % 清除所有页眉页脚。 % \begin{macrocode} \fancyhf { } % \end{macrocode} % % \begin{macro}{style/header-font,style/footer-font} % 设置页眉页脚å—体。 % \begin{macrocode} \keys_define:nn { sjtu / style } { header-font .tl_set:N = \l_@@_style_header_font_tl , %<thesis> header-font .initial:n = \zihao { -5 } \setbaselineskip { 12 bp } , %<!thesis> header-font .initial:n = \zihao { -5 } \sffamily , footer-font .tl_set:N = \l_@@_style_footer_font_tl , %<thesis> footer-font .initial:n = \zihao { -5 } \setbaselineskip { 12 bp } %<!thesis> footer-font .initial:n = \zihao { -5 } } \fancyheadinit { \l_@@_style_header_font_tl } \fancyfootinit { \l_@@_style_footer_font_tl } % \end{macrocode} % \end{macro} % % \begin{macro}{style/header-uppercase} % \begin{macro}[int]{\@@_nouppercase:n} % 页眉西文是å¦å¤§å†™ã€‚ % \begin{macrocode} \keys_define:nn { sjtu / style } { header-uppercase .choice: , header-uppercase / true .code:n = { \cs_set_eq:NN \@@_nouppercase:n \use:n } , header-uppercase / false .code:n = { \cs_set:Nn \@@_nouppercase:n { \nouppercase {##1} } } , header-uppercase .default:n = { true } , header-uppercase .initial:n = { false } } \cs_generate_variant:Nn \@@_nouppercase:n { V } % \end{macrocode} % \end{macro} % \end{macro} % % \begin{macro}{style/page-number} % \begin{macro}[int]{\@@_page:nn} % é¡µè„šé¡µç æ ¼å¼ã€‚ % \begin{macrocode} \tl_set:Nn \@@_the_page_tl { \thepage } \tl_new:N \@@_the_last_page_tl \msg_new:nnn { sjtutex } { require-pageslts } { Add~'\token_to_str:N \usepackage{pageslts}'~in~your~preamble \\ to~enable~the~page~number~of~the~last~page. } \keys_define:nn { sjtu / style } { page-number .code:n = { \regex_match:nnT { \#2 } { #1 } { \ctex_if_preamble:TF { \RequirePackage { pageslts } } { \IfPackageLoadedF { pageslts } { \msg_warning:nn { sjtutex } { require-pageslts } } } } \cs_set:Nn \@@_page:nn { #1 } } , page-number .initial:n = { {#1} } } % \end{macrocode} % \end{macro} % \end{macro} % % 设置页眉内容。 % \begin{macrocode} \tl_set:Nn \l_@@_header_tl { %<thesis> { \songti \l_@@_info_subject_zh_tl } %<*!thesis> \includegraphics [ height = 1.2 cm ] { sjtu-vi-logo-std-h-cor-red.pdf } %</!thesis> } %<thesis>\tl_set:Nn \l_@@_leftmark_tl { \leftmark } %<!thesis>\tl_set:Nn \l_@@_leftmark_tl { \l_@@_info_subject_tl } \tl_set:Nn \l_@@_rightmark_tl { \leftmark } % \end{macrocode} % % 设置页眉页脚。 % \begin{macrocode} \legacy_if:nTF { @twoside } { \fancyhead [ LO, RE ] { \l_@@_header_tl } \fancyhead [ LE ] { \@@_nouppercase:V \l_@@_leftmark_tl } \fancyhead [ RO ] { \@@_nouppercase:V \l_@@_rightmark_tl } } { \fancyhead [ L ] { \l_@@_header_tl } \fancyhead [ R ] { \@@_nouppercase:V \l_@@_rightmark_tl } } \fancyfoot [ C ] { \@@_page:nn { \@@_the_page_tl } { \@@_the_last_page_tl } } % \end{macrocode} % % \begin{macro}{\headrule} % \cls{sjtuthesis} 的页眉线。 % \begin{macrocode} %<*thesis> \tl_set:Nn \headrule { \hrule height 2.25 pt width \headwidth \skip_vertical:n { 0.75 pt } \hrule height 0.75 pt width \headwidth \skip_vertical:n { -3.75 pt } } %</thesis> % \end{macrocode} % \end{macro} % % \changes{v2.2}{2024/11/08}{æ›´æ–° \cls{sjtureport} å’Œ \cls{sjtuarticle} çš„ % \texttt{plain} 页颿 ·å¼ã€‚} % é‡å®šä¹‰ |plain| æ ·å¼ã€‚ % \begin{macrocode} %<*!thesis> \legacy_if:nTF { @twoside } { \fancypagestyle { plain } { \fancyhead { } \fancyhead [ LO, RE ] { \l_@@_header_tl } \tl_set:Nn \headrulewidth { 0 pt } } } { \fancypagestyle { plain } { \fancyhead { } \fancyhead [ L ] { \l_@@_header_tl } \tl_set:Nn \headrulewidth { 0 pt } } } %</!thesis> % \end{macrocode} % % |SJTU@null| æ ·å¼ï¼Œä¸å¯¹å½“å‰é¡µé¢æ ·å¼åšä»»ä½•修改。 % \begin{macrocode} \cs_new_eq:NN \ps@SJTU@null \prg_do_nothing: % \end{macrocode} % % \begin{macro}{\cleardoublepage} % 空白页清空页眉页脚。 % \begin{macrocode} \RenewDocumentCommand \cleardoublepage { } { \clearpage \legacy_if:nT { @twoside } { \int_if_odd:nF \c@page { \hbox:n { } \thispagestyle { empty } \newpage } } } % \end{macrocode} % \end{macro} % % \subsubsection{页ç 设置} % % 文档åˆå§‹é¡µç ç¼–ç 设置。 % \begin{macrocode} %<thesis>\pagenumbering { Alph } % \end{macrocode} % % \begin{macro}{\frontmatter} % å‰ç½®éƒ¨åˆ†ä½¿ç”¨å¤§å†™ç½—马数å—ç¼–ç 。 % \begin{macrocode} %<*thesis> \RenewDocumentCommand \frontmatter { } { \cleardoublepage \@mainmatterfalse \pagenumbering { Roman } } %</thesis> % \end{macrocode} % \end{macro} % % \subsubsection{ç« èŠ‚æ ‡é¢˜} % % è®¾ç½®ç« èŠ‚æ ‡é¢˜æ ·å¼ã€‚ % \begin{macrocode} %<*!article> \ctex_set:nn { chapter } { pagestyle = SJTU@null , fixskip = true , %<*thesis> beforeskip = 27 bp , afterskip = 27 bp , format = \zihao { 3 } \setbaselineskip{ 20 bp } \bfseries \CJKsffamily \centering , %</thesis> %<*report> beforeskip = 30 pt , afterskip = 24 pt , format = \Large \bfseries \CJKsffamily \centering , %</report> nameformat = , titleformat = , lofskip = \c_zero_skip , lotskip = \c_zero_skip , aftername = \quad } %</!article> %</class> %<*scheme&(zh|ja)> \keys_set_known:nn { ctex / chapter } { name = { 第 \space , \space ç« } } %</scheme&(zh|ja)> %<*class> \ctex_set:nn { section } %<*thesis> { beforeskip = 24 bp , afterskip = 6 bp , format = \zihao { 4 } \setbaselineskip { 18 bp } \bfseries \CJKsffamily } %</thesis> %<!thesis> { format = \large \bfseries \CJKsffamily } \ctex_set:nn { subsection } %<*thesis> { beforeskip = 12 bp , afterskip = 6 bp , format = \zihao { -4 } \setbaselineskip { 16 bp } \bfseries \CJKsffamily } %</thesis> %<!thesis> { format = \SJTU@orig@normalsize \bfseries \CJKsffamily } \ctex_set:nn { subsubsection } %<*thesis> { beforeskip = 6 bp , afterskip = 6 bp , format = \zihao { -4 } \setbaselineskip { 16 bp } \normalfont } %</thesis> %<!thesis> { format = \SJTU@orig@normalsize \normalfont } \ctex_set:n { secnumdepth = 3 } % \end{macrocode} % % \changes{v2.1}{2024/01/10}{新增 \opt{style/indent-first} 选项。} % \begin{macro}{style/indent-first} % ç« èŠ‚æ ‡é¢˜åŽé¦–段是å¦ç¼©è¿›ã€‚ % \begin{macrocode} \keys_define:nn { sjtu / style } { indent-first .choice: , indent-first .choices:nn = { true, false } { \clist_map_inline:nn { %<article> part, %<!article> chapter, section, subsection, subsubsection, paragraph, subparagraph } { \ctex_set:nn {####1} { afterindent = #1 } } } , indent-first .default:n = { true } , indent-first .initial:n = { true } } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_pdf_bookmark:nn,\@@_phantom_section:} % 在 \pkg{hyperref} è½½å…¥åŽæ‰æœ‰æ„义。 % \begin{macrocode} \cs_new_eq:NN \@@_pdf_bookmark:nn \use_none:nn \cs_new_eq:NN \@@_phantom_section: \prg_do_nothing: %</class> % \end{macrocode} % \end{macro} % % \subsubsection{段è½} % % 设置全文首行缩进。 % \begin{macrocode} %<*scheme> \ctex_if_autoindent_touched:F %<zh> { \ctex_set:n { autoindent = true } } %<en|de> { \ctex_set:n { autoindent = 1.5 em } } %<ja> { \ctex_set:n { autoindent = 1 } } % \end{macrocode} % % \begin{macro}{\verse,\quotation} % 修改诗æŒå’Œå¼•用环境的缩进。 % \begin{macrocode} %<zh|ja>\ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } %<zh|ja>\ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } \ctex_patch_cmd:Nnn \quotation { 1.5em } { \parindent } %</scheme> % \end{macrocode} % \end{macro} % % 使用 \pkg{enumitem} 调整默认列表环境的间è·ã€‚ % \begin{macrocode} %<*class> \setlist { nosep } % \end{macrocode} % % \subsubsection{æ•°å¦å…¬å¼} % % \changes{v2.1}{2023/11/30}{新增 \opt{style/equation-font} 选项。} % \begin{macro}{style/equation-font} % 设置行间数å¦å…¬å¼çš„å—体。 % \begin{macrocode} \keys_define:nn { sjtu / style } { equation-font .tl_set:N = \SJTU@style@equation@font , %<thesis> equation-font .initial:n = \linespread { } \SJTU@orig@normalsize %<!thesis> equation-font .initial:V = \c_empty_tl } % \end{macrocode} % \end{macro} % % 借用 \pkg{zhlineskip} å®åŒ…的代ç 设置行间公å¼å—体。 % \begin{macrocode} \clist_map_inline:nn { array, matrix, pmatrix, bmatrix, Bmatrix, vmatrix, Vmatrix, matrix*, pmatrix*, bmatrix*, Bmatrix*, vmatrix*, Vmatrix*, cases, cases*, dcases, dcases*, rcases, rcases*, drcases, drcases*, aligned, alignedat, gathered, multlined, lgathered, rgathered } { \AtBeginEnvironment {#1} { \SJTU@style@equation@font } } \clist_map_inline:nn { \start@gather, \start@align, \start@multline } { \ctex_patch_cmd:Nnn #1 { \collect@body } { \SJTU@style@equation@font \collect@body } } \ctex_patch_cmd:Nnn \gather@split { \spread@equation } { \SJTU@style@equation@font \spread@equation } % \end{macrocode} % % \subsubsection{æ•°å¦çŽ¯å¢ƒ} % % å¯ä»¥é€‰ç”¨ \pkg{amsthm} 或 \pkg{ntheorem} å®åŒ…控制数å¦çŽ¯å¢ƒæ ·å¼ï¼Œ % å¹¶æä¾›å¯¹è¯æ˜ŽçŽ¯å¢ƒ \env{proof} 的支æŒã€‚ % % \changes{v2.1.1}{2024/03/21}{新增 \opt{style/theorem-header-font}〠% \opt{style/theorem-body-font} 选项。} % \begin{macro}{style/theorem-header-font,style/theorem-body-font} % 预定义的数å¦çŽ¯å¢ƒçš„å®šç†å¤´ï¼ˆå³æ ‡é¢˜ï¼‰ä»¥åŠå®šç†å†…容的å—体。 % \begin{macrocode} \keys_define:nn { sjtu / style } { theorem-header-font .tl_set:N = \SJTU@style@thm@header@font , theorem-header-font .initial:n = \bfseries \CJKsffamily , theorem-body-font .tl_set:N = \SJTU@style@thm@body@font , theorem-body-font .initial:n = \normalfont , } % \end{macrocode} % \end{macro} % % \subsubsection{浮动体} % % 下é¢è¿™ç»„命令使浮动对象的缺çœå€¼ç¨å¾®å®½æ¾ä¸€ç‚¹ï¼Œä»Žè€Œé˜²æ¢å¹…åº¦å¯¹è±¡å æ®è¿‡å¤šçš„ % 文本页é¢ï¼Œä¹Ÿå¯ä»¥é˜²æ¢åœ¨å¾ˆå¤§ç©ºç™½çš„æµ®åŠ¨é¡µä¸Šæ”¾ç½®å¾ˆå°çš„图形。 % \begin{macrocode} \tl_set:Nn \textfraction { 0.15 } \tl_set:Nn \topfraction { 0.85 } \tl_set:Nn \bottomfraction { 0.65 } \tl_set:Nn \floatpagefraction { 0.60 } % \end{macrocode} % % \begin{macro}{style/float-font} % 设置浮动体内的å—体。 % \begin{macrocode} \keys_define:nn { sjtu / style } { float-font .tl_set:N = \SJTU@style@float@font , %<thesis> float-font .initial:n = \zihao { 5 } \setbaselineskip { 14 bp } %<!thesis> float-font .initial:n = \zihao { 5 } } \ctex_patch_cmd:Nnn \@floatboxreset { \normalsize } { \SJTU@style@float@font } % \end{macrocode} % \end{macro} % % \changes{v2.1}{2023/11/29}{æ›´æ–°é¢˜æ³¨æ ¼å¼ã€‚} % \begin{macro}{style/caption-font,style/subcaption-font} % é¢˜æ³¨æ ¼å¼ã€‚ % \begin{macrocode} \keys_define:nn { sjtu / style } { % \end{macrocode} % % \pkg{bicaption} ä¸åŒè¯æ ‡é¢˜ä¹‹é—´çš„é—´è·å— \pkg{caption} å—体定义 \opt{normalsize} % 的影å“,这里我们直接é‡å®šä¹‰ \opt{normalsize}。 % \begin{macrocode} caption-font .code:n = { \DeclareCaptionFont { normalsize } {#1} } , % \end{macrocode} % % \begin{macrocode} %<thesis> caption-font .initial:n = \zihao { 5 } \setbaselineskip { 14 bp } %<thesis> \bfseries , %<!thesis> caption-font .initial:n = \zihao { 5 } \bfseries , subcaption-font .code:n = { \DeclareCaptionFont { SJTU@sub@font } {#1} } , %<thesis> subcaption-font .initial:n = \zihao { 5 } \setbaselineskip { 14 bp } %<thesis> \normalfont %<!thesis> subcaption-font .initial:n = \zihao { 5 } \normalfont } \captionsetup { bi-slc = off , labelsep = quad , %<thesis> skip = 6 bp } \captionsetup [ sub ] { bi-slc = on , font = SJTU@sub@font , format = hang } % \end{macrocode} % \end{macro} % % åŒè¯é¢˜æ³¨ã€‚ % \begin{macrocode} \DeclareCaptionOption { bi-second-names } [ ] { \tl_set:Nn \figurename { \SJTU@figurename@bi@second } \tl_set:Nn \tablename { \SJTU@tablename@bi@second } } \captionsetup [ bi-second ] { bi-second-names } % \end{macrocode} % % \changes{v2.1}{2023/12/02}{新增 \opt{style/num-sep}〠% \opt{style/theorem-num-sep} 选项。} % \begin{macro}{style/num-sep,style/float-num-sep, % style/equation-num-sep,style/theorem-num-sep} % 图ã€è¡¨ã€å…¬å¼ä»¥åŠå®šç†ç¼–å·ä¸çš„分隔符。 % \begin{macrocode} \keys_define:nn { sjtu / style } { num-sep .code:n = { \tl_set:Nn \SJTU@style@fl@num@sep {#1} \tl_set:Nn \SJTU@style@eq@num@sep {#1} \tl_set:Nn \@thmcountersep {#1} } , num-sep .initial:n = { . } , float-num-sep .tl_set:N = \SJTU@style@fl@num@sep , equation-num-sep .tl_set:N = \SJTU@style@eq@num@sep , theorem-num-sep .tl_set:N = \@thmcountersep } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\SJTU@counterwithin} % \begin{macrocode} \NewDocumentCommand \SJTU@counterwithin { s O{ \SJTU@style@fl@num@sep } O{ \arabic } m m } { \@ifbothcounters {#4} {#5} { \@addtoreset {#4} {#5} \IfBooleanF {#1} { \exp_args:Nco \cs_gset:Npn { the #4 } { \cs:w the #5 \cs_end: #2 #3 {#4} } } } } % \end{macrocode} % \end{macro} % % 定义图ã€è¡¨ã€å…¬å¼çš„ç¼–å·æ ¼å¼ã€‚ % \begin{macrocode} %<*!article> \SJTU@counterwithin { figure } { chapter } \SJTU@counterwithin { table } { chapter } \SJTU@counterwithin [ \SJTU@style@eq@num@sep ] { equation } { chapter } %</!article> % \end{macrocode} % % \begin{variable}{\l_@@_counter_without_chapter_clist} % 大摘è¦ä¸ä¸éœ€è¦éšç« ç¼–å·çš„å„计数器。 % \begin{macrocode} %<*thesis> \clist_set:Nn \l_@@_counter_without_chapter_clist { section, figure, table, equation } %</thesis> % \end{macrocode} % \end{variable} % % \subsubsection{脚注} % % \begin{macro}[int]{\@@_circled_number:N} % 通过 Unicode ç ä½è°ƒç”¨å¸¦åœˆæ•°å—。 % \begin{macrocode} \msg_new:nnn { sjtutex } { circled-number-exceed } { Circled~number~exceed~50! } \cs_new:Npn \@@_circled_number:N #1 { \int_compare:nNnTF {#1} < { 21 } { \@@_unicode_char:n { \int_eval:n { "2460 - 1 + #1 } } } { \int_compare:nNnTF {#1} < { 36 } { \@@_unicode_char:n { \int_eval:n { "3251 - 21 + #1 } } } { \int_compare:nNnTF {#1} < { 51 } { \@@_unicode_char:n { \int_eval:n { "32B1 - 36 + #1 } } } { \msg_warning:nn { sjtutex } { circled-number-exceed } \int_to_arabic:n {#1} } } } } % \end{macrocode} % \end{macro} % % \begin{macro}{style/fnmark-font} % 脚注编å·å—体。 % \begin{macrocode} \keys_define:nn { sjtu / style } { fnmark-font .choice: , fnmark-font / haranoaji .code:n = { \@@_if_engine_opentype:TF { \tl_set:Nn \l_@@_style_fnmark_font_tl { \CJKfontspec { HaranoAjiMincho } [ Extension = .otf , UprightFont = *-Regular , BoldFont = *-Bold ] } } { \tl_set_eq:NN \l_@@_style_fnmark_font_tl \c_empty_tl } } , fnmark-font / unknown .tl_set:N = \l_@@_style_fnmark_font_tl , fnmark-font .initial:V = \c_empty_tl } % \end{macrocode} % \end{macro} % % \begin{macro}{style/fnmark-style} % è„šæ³¨ç¼–å·æ ·å¼ã€‚ % é‡å®šä¹‰å†…部脚注文å—命令,使用带圈数å—ç¼–å·æ—¶ï¼Œè„𿳍ä¸ä½¿ç”¨ä¸Šæ ‡ã€‚ % è§ \url{https://www.zhihu.com/question/53030087}。 % \begin{macrocode} \keys_define:nn { sjtu / style } { fnmark-style .choice: , fnmark-style / plain .code:n = { \cs_set:Npn \SJTU@makefnmark { \hbox:n { \@textsuperscript { \normalfont \@thefnmark } } } \tl_set:Nn \thefootnote { \arabic { footnote } } \tl_set:Nn \thempfootnote { { \itshape \alph { mpfootnote } } } } , fnmark-style / circled .code:n = { \cs_set:Npn \SJTU@makefnmark { \hbox:n { \@thefnmark } } \tl_set:Nn \thefootnote { { \l_@@_style_fnmark_font_tl \@@_circled_number:N \c@footnote } } \tl_set:Nn \thempfootnote { { \l_@@_style_fnmark_font_tl \@@_circled_number:N \c@mpfootnote } } } } %</class> % \end{macrocode} % \end{macro} % % \begin{macrocode} %<*scheme> \keys_set:nn { sjtu / style } %<zh|ja> { fnmark-style = circled } %<en|de> { fnmark-style = plain } %</scheme> % \end{macrocode} % % 在导言末尾修改 \tn{@makefntext},支æŒä½¿ç”¨ \pkg{footmisc} ä¿®æ”¹è„šæ³¨æ ¼å¼ã€‚ % \begin{macrocode} %<*class> \ctex_at_end_preamble:n { \cs_set_eq:NN \SJTU@orig@makefntext \@makefntext \cs_set:Npn \@makefntext #1 { \group_begin: \cs_set_eq:NN \@makefnmark \SJTU@makefnmark \SJTU@orig@makefntext {#1} \group_end: } } % \end{macrocode} % % \subsection{多è¯è¨€æ”¯æŒ} % % \begin{variable}{\l_@@_lang_tl} % \begin{macrocode} \tl_set_eq:NN \l_@@_lang_tl \g_@@_lang_tl % \end{macrocode} % \end{variable} % % \begin{macrocode} \msg_new:nnn { sjtutex } { lang-validation } { Invalid~language~argument~'#1'! } \keys_define:nn { sjtu / private } { lang .choice: , lang .value_required:n = true , lang .groups:n = { lang } , lang / unknown .code:n = { \msg_warning:nnn { sjtutex } { lang-validation } {#1} } } % \end{macrocode} % % \begin{macro}[int]{\@@_select_language:n} % 选择局部è¯è¨€ã€‚ % \begin{macrocode} \cs_new_protected:Npn \@@_select_language:n { \keys_set_groups:nnn { sjtu / private } { lang } } % \end{macrocode} % \end{macro} % % 载入è¯è¨€é…置文件。 % \begin{macrocode} %<thesis>\clist_map_inline:Nn \g_@@_lang_clist %<thesis> { \file_input:n { sjtu-lang- #1 .def } } %<!thesis>\file_input:n { sjtu-lang- \g_@@_lang_tl .def } \file_input:n { sjtu-scheme- \g_@@_lang_tl .def } %</class> % \end{macrocode} % % \begin{macro}[int]{\@@_set_cjk_default_zh:,\@@_set_cjk_default_ja:} % 设置 CJK 默认å—体æ—的辅助命令。 % \begin{macrocode} %<*lang> %<*zh> \cs_new_protected:Nn \@@_set_cjk_default_zh: { \tl_set:Nn \CJKrmdefault { zhsong } \tl_set:Nn \CJKsfdefault { zhhei } \tl_set:Nn \CJKttdefault { zhfs } } %</zh> %<*ja> \cs_new_protected:Nn \@@_set_cjk_default_ja: { \tl_set:Nn \CJKrmdefault { jamin } \tl_set:Nn \CJKsfdefault { jagoth } \tl_set:Nn \CJKttdefault { jagoth } } %</ja> % \end{macrocode} % \end{macro} % % \changes{v2.2.1}{2025/03/27}{新增è¯è¨€è®¾ç½®é’©å。} % è¯è¨€è®¾ç½®é’©å。 % \begin{macrocode} %<zh>\NewHook { sjtutex / lang / zh } %<en>\NewHook { sjtutex / lang / en } %<de>\NewHook { sjtutex / lang / de } %<ja>\NewHook { sjtutex / lang / ja } % \end{macrocode} % % \begin{macrocode} \keys_define:nn { sjtu / private } { %<zh> lang / zh .code:n = %<en> lang / en .code:n = %<de> lang / de .code:n = %<ja> lang / ja .code:n = { \tl_set_eq:NN \l_@@_lang_tl \l_keys_value_tl %<zh> \@@_set_cjk_default_zh: %<ja> \@@_set_cjk_default_ja: \normalfont %<zh> \UseHook { sjtutex / lang / zh } %<en> \UseHook { sjtutex / lang / en } %<de> \UseHook { sjtutex / lang / de } %<ja> \UseHook { sjtutex / lang / ja } } , %<zh> zh .meta:n = { lang = zh } , %<zh> zh .groups:n = { lang } %<en> en .meta:n = { lang = en } , %<en> en .groups:n = { lang } %<de> de .meta:n = { lang = de } , %<de> de .groups:n = { lang } %<ja> ja .meta:n = { lang = ja } , %<ja> ja .groups:n = { lang } } % \end{macrocode} % % \begin{macrocode} %<zh>\AddToHook { sjtutex / lang / zh } %<en>\AddToHook { sjtutex / lang / en } %<de>\AddToHook { sjtutex / lang / de } %<ja>\AddToHook { sjtutex / lang / ja } { %<zh> \tl_set:Nn \languagename { chinese } %<en> \tl_set:Nn \languagename { english } %<de> \tl_set:Nn \languagename { ngerman } %<ja> \tl_set:Nn \languagename { japanese } %<zh> \ctex_set:n { autoindent = true } %<en|de> \ctex_set:n { autoindent = 1.5 em } %<ja> \ctex_set:n { autoindent = 1 } } % \end{macrocode} % % \begin{macro}[int]{\@@_title_case_aux_zh:n,\@@_title_case_aux_en:n, % \@@_title_case_aux_de:n,\@@_title_case_aux_ja:n} % è®¾ç½®æ ‡é¢˜å¤§å°å†™è½¬æ¢çš„辅助命令。 % \begin{macrocode} %<zh>\cs_set_eq:NN \@@_title_case_aux_zh:n \use:n %<en>\cs_set_eq:NN \@@_title_case_aux_en:n \MakeUppercase %<de>\cs_set_eq:NN \@@_title_case_aux_de:n \MakeUppercase %<ja>\cs_set_eq:NN \@@_title_case_aux_ja:n \use:n % \end{macrocode} % \end{macro} % % 通用å称常é‡ã€‚ % \begin{macrocode} \clist_map_inline:nn { %<zh> { keywords } { å…³é”®è¯ } , %<en> { keywords } { Key~words } , %<de> { keywords } { Schlüsselwörter } , %<ja> { keywords } { ã‚ーワード } , %<zh|ja> { info_sep } { : \null } , %<en|de> { info_sep } { \hbox { :~ } } , %<zh> { item_sep } { , } %<en|de> { item_sep } { ,~ } %<ja> { item_sep } { \quad } } %<zh> { \@@_name_const:nnn { zh } #1 } %<en> { \@@_name_const:nnn { en } #1 } %<de> { \@@_name_const:nnn { de } #1 } %<ja> { \@@_name_const:nnn { ja } #1 } %</lang> % \end{macrocode} % % åˆå§‹åŒ–è¯è¨€å称。 % \begin{macrocode} %<*scheme> %<zh>\tl_set:Nn \languagename { chinese } %<en>\tl_set:Nn \languagename { english } %<de>\tl_set:Nn \languagename { ngerman } %<ja>\tl_set:Nn \languagename { japanese } % \end{macrocode} % % 设置å称选项。默认值为英文,åªéœ€ä¿®æ”¹å…¶ä»–è¯ç§ã€‚ % \begin{macrocode} %<*!en> \keys_set_known:nn { sjtu / name } { %<*zh> contents = { ç›® \protect \quad 录 } , listfigure = { æ’ \protect \quad 图 } , listtable = { 表 \protect \quad æ ¼ } , figure = { 图 } , table = { 表 } , abstract = { 摘 \protect \quad è¦ } , index = { ç´¢ \protect \quad 引 } , appendix = { 附录 } , proof = { è¯æ˜Ž } , bib = { å‚考文献 } , figure* = { Figure } , table* = { Table } , algorithm = { 算法 } , listalgorithm = { ç®— \protect \quad 法 } , abbr = { 缩略è¯å¯¹ç…§è¡¨ } , nom = { 符å·å¯¹ç…§è¡¨ } , ack = { 致 \protect \quad è°¢ } , resume = { 个人简历 } , digest = { å¤§æ‘˜è¦ } , achv = { 妿œ¯è®ºæ–‡å’Œç§‘ç ”æˆæžœç›®å½• } %</zh> %<*de> contents = { Inhaltsverzeichnis } , listfigure = { Abbildungsverzeichnis } , listtable = { Tabellenverzeichnis } , figure = { Abbildung } , table = { Tabelle } , abstract = { Zusammenfassung } , index = { Index } , appendix = { Anhang } , proof = { Beweis } , bib = { Literaturverzeichnis } , part = { Teil } , chapter = { Kapitel } , figure* = { Figure } , table* = { Table } , algorithm = { Algorithmus } , listalgorithm = { Algorithmenverzeichnis } , abbr = { Abkürzungsverzeichnis } , nom = { Symbolverzeichnis } , ack = { Danksagungen } , resume = { Lebenslauf } , digest = { Kurzfassung } , achv = { Forschungsleistungen } %</de> %<*ja> contents = { ç›® \protect \quad 次 } , listfigure = { 図目次 } , listtable = { 表目次 } , figure = { 図 } , table = { 表 } , abstract = { 概 \protect \quad è¦ } , index = { ç´¢ \protect \quad 引 } , appendix = { 付録 } , proof = { è¯æ˜Ž } , bib = { å‚考文献 } , figure* = { Figure } , table* = { Table } , algorithm = { アルゴリズム} , listalgorithm = { アルゴリズム目次 } , abbr = { 略語表 } , nom = { 記å·è¡¨ } , ack = { è¬ \protect \quad 辞 } , resume = { å±¥æ´æ›¸ } , digest = { è¦ \protect \quad ç´„ } , achv = { ç ”ç©¶æ¥ç¸¾æ›¸ } %</ja> } %</!en> %</scheme> % \end{macrocode} % % å¦ä½è®ºæ–‡å称常é‡ã€‚ % \begin{macrocode} %<*thesis-i18n> %<zh>\@@_symbol_const:nn { white_square } { "25A1 } %<zh>\@@_name_const_from_clist:nnnn { zh } %<en>\@@_name_const_from_clist:nnnn { en } %<de>\@@_name_const_from_clist:nnnn { de } %<ja>\@@_name_const_from_clist:nnnn { ja } { degree_level } { \g_@@_thesis_type_int } %<zh> { å¦å£«, 硕士, åšå£« } %<en> { Bachelor, Master, Doctor } %<de> { Bachelor, Master, Doktor } %<ja> { å¦å£«, 修士, åšå£« } \clist_map_inline:nn { %<*zh> { univ } { ä¸Šæµ·äº¤é€šå¤§å¦ } , { address } { ä¸å›½ãƒ»ä¸Šæµ· } , { thesis } { å¦ä½è®ºæ–‡ } , { title_page } { 题å页 } , { declaration } { 原创性声明åŠä½¿ç”¨æŽˆæƒä¹¦ } , { orig_decl } { 原创性声明 } , { auth_decl } { 使用授æƒä¹¦ } , { decl_author } { å¦ä½è®ºæ–‡ä½œè€… } , { decl_supervisor } { 指导教师 } , { abstract } { 摘 \protect \quad è¦ } %</zh> %<*en> { univ } { Shanghai~ Jiao~ Tong~ University } , { address } { Shanghai,~ P.R.~ China } , { title_page } { Title~ Page } , { declaration } { Statutory~ Declaration } , { abstract } { Abstract } %</en> %<*de> { univ } { Shanghai~ Jiao~ Tong~ Universität } , { address } { Shanghai,~ VR~ China } , { title_page } { Titelblatt } , { declaration } { Eidesstattliche~ Erklärung } , { abstract } { Abstrakt } %</de> %<*ja> { univ } { ä¸Šæµ·äº¤é€šå¤§å¦ } , { address } { ä¸å›½ãƒ»ä¸Šæµ· } , { thesis } { å¦ä½è«‹æ±‚è«–æ–‡ } , { title_page } { 標題紙 } , { declaration } { 誓約書・公表許諾書 } , { abstract } { è¦ \protect \quad æ—¨ } %</ja> } %<zh> { \@@_name_const:nnn { zh } #1 } %<en> { \@@_name_const:nnn { en } #1 } %<de> { \@@_name_const:nnn { de } #1 } %<ja> { \@@_name_const:nnn { ja } #1 } \clist_map_inline:nn { %<*zh> { author } { å§“å } , { id } { å¦å· } , { supervisor } { 导师 } , { assoc_supervisor } { 副导师 } , { co_supervisor } { è”åˆå¯¼å¸ˆ } , { department } { 院系 } , { major } { å¦ç§‘ \, / \, 专业 } , { degree } { 申请å¦ä½ } %</zh> %<*en> { author } { Author } , { supervisor } { Supervisor } , { assoc_supervisor } { Assoc.\ Supervisor } , { co_supervisor } { Co-supervisor } %</en> %<*de> { author } { Autor/in } , { supervisor } { Betreuer/in } , { assoc_supervisor } { Zweitbetreuer/in } , { co_supervisor } { Co-Betreuer/in } %</de> %<*ja> { author } { æ°å } , { supervisor } { 指導教員 } , { assoc_supervisor } { 副指導教員 } , { co_supervisor } { å…±åŒæŒ‡å°Ž } %</ja> } %<zh> { \@@_name_set:nnn { zh } #1 } %<en> { \@@_name_set:nnn { en } #1 } %<de> { \@@_name_set:nnn { de } #1 } %<ja> { \@@_name_set:nnn { ja } #1 } % \end{macrocode} % % \changes{v2.0.3}{2023/04/08}{æ›´æ–°å¦ä½è®ºæ–‡åˆå§‹è‹±æ–‡ä¸»é¢˜ã€‚} % åˆå§‹åŒ–主题。 % \begin{macrocode} %<zh>\keys_define:nn { sjtu / info / zh } %<en>\keys_define:nn { sjtu / info / en } %<de>\keys_define:nn { sjtu / info / de } %<ja>\keys_define:nn { sjtu / info / ja } { subject .initial:n = { %<*zh> \c_@@_name_univ_zh_tl \c_@@_name_degree_level_zh_tl \c_@@_name_thesis_zh_tl %</zh> %<*en> A~ Dissertation~ Submitted~ to \\ { \c_@@_name_univ_en_tl }~ for~ the~ Degree~ of~ { \c_@@_name_degree_level_en_tl } %</en> %<*de> Eine~ Dissertation~ Eingereicht~ an \\ der~ { \c_@@_name_univ_de_tl }~ für~ { \c_@@_name_degree_level_de_tl } titel %</de> %<*ja> \c_@@_name_univ_ja_tl \c_@@_name_degree_level_ja_tl \c_@@_name_thesis_ja_tl %</ja> } } %</thesis-i18n> % \end{macrocode} % % 将形如 |yyyy-mm-dd| 或 |yyyy-mm| çš„ ISO æ—¥æœŸæ ¼å¼å—符串转化为日期表示。 % % 日期常é‡ã€‚ % \begin{macrocode} %<*lang> %<*zh|ja> \clist_map_inline:nn { { year } { å¹´ } , { month } { 月 } , { day } { æ—¥ } } %<zh> { \@@_name_const:nnn { zh } #1 } %<ja> { \@@_name_const:nnn { ja } #1 } %</zh|ja> %<*en> \clist_const:Nn \c_@@_name_month_en_clist { January, February, March, April, May, June, July, August, September, October, November, December } %</en> %<*de> \clist_const:Nn \c_@@_name_month_de_clist { Januar, Februar, März, April, Mai, Juni, Juli, August, September, Oktober, November, Dezember } %</de> % \end{macrocode} % % \begin{macro}[int]{\@@_date_aux_zh:nnn,\@@_date_aux_zh:w, % \@@_date_aux_short_zh:nn,\@@_date_aux_short_zh:w} % 䏿–‡æ—¥æœŸã€‚ % \begin{macrocode} %<*zh> \cs_new:Npn \@@_date_aux_zh:nnn #1#2#3 { \int_to_arabic:n {#1} ~ { \exp_not:V \c_@@_name_year_zh_tl } ~ \int_to_arabic:n {#2} ~ { \exp_not:V \c_@@_name_month_zh_tl } ~ \int_to_arabic:n {#3} ~ { \exp_not:V \c_@@_name_day_zh_tl } } \cs_new:Npn \@@_date_aux_zh:w #1-#2-#3 \q_stop { \@@_date_aux_zh:nnn {#1} {#2} {#3} } \cs_new:Npn \@@_date_aux_short_zh:nn #1#2 { \int_to_arabic:n {#1} ~ { \exp_not:V \c_@@_name_year_zh_tl } ~ \int_to_arabic:n {#2} ~ { \exp_not:V \c_@@_name_month_zh_tl } } \cs_new:Npn \@@_date_aux_short_zh:w #1-#2 \q_stop { \@@_date_aux_short_zh:nn {#1} {#2} } %</zh> % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_ordinal_en:n} % ä¸Šæ ‡å½¢å¼çš„åºæ•°è¯ã€‚ % \begin{macrocode} %<*en> \cs_new:Npn \@@_ordinal_en:n #1 { \int_to_arabic:n {#1} \exp_not:N \textsuperscript { \int_case:nnF { \int_mod:nn {#1} { 100 } } { { 11 } { th } { 12 } { th } { 13 } { th } } { \int_case:nnF { \int_mod:nn {#1} { 10 } } { { 1 } { st } { 2 } { nd } { 3 } { rd } } { th } } } } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_date_aux_en:nnn,\@@_date_aux_en:w, % \@@_date_aux_short_en:nn,\@@_date_aux_short_en:w} % 英文日期。 % \begin{macrocode} \cs_new:Npn \@@_date_aux_en:nnn #1#2#3 { \clist_item:Nn \c_@@_name_month_en_clist {#2} ~ \@@_ordinal_en:n {#3} ,~ \int_to_arabic:n {#1} } \cs_new:Npn \@@_date_aux_en:w #1-#2-#3 \q_stop { \@@_date_aux_en:nnn {#1} {#2} {#3} } \cs_new:Npn \@@_date_aux_short_en:nn #1#2 { \clist_item:Nn \c_@@_name_month_en_clist {#2} ,~ \int_to_arabic:n {#1} } \cs_new:Npn \@@_date_aux_short_en:w #1-#2 \q_stop { \@@_date_aux_short_en:nn {#1} {#2} } %</en> % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_date_aux_de:nnn,\@@_date_aux_de:w, % \@@_date_aux_short_de:nn,\@@_date_aux_short_de:w} % 德文日期。 % \begin{macrocode} %<*de> \cs_new:Npn \@@_date_aux_de:nnn #1#2#3 { \clist_item:Nn \c_@@_name_month_de_clist {#2} ~ {#3} ,~ \int_to_arabic:n {#1} } \cs_new:Npn \@@_date_aux_de:w #1-#2-#3 \q_stop { \@@_date_aux_de:nnn {#1} {#2} {#3} } \cs_new:Npn \@@_date_aux_short_de:nn #1#2 { \clist_item:Nn \c_@@_name_month_de_clist {#2} ,~ \int_to_arabic:n {#1} } \cs_new:Npn \@@_date_aux_short_de:w #1-#2 \q_stop { \@@_date_aux_short_de:nn {#1} {#2} } %</de> % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_date_aux_ja:nnn,\@@_date_aux_ja:w, % \@@_date_aux_short_ja:nn,\@@_date_aux_short_ja:w} % 日文日期。 % \begin{macrocode} %<*ja> \cs_new:Npn \@@_date_aux_ja:nnn #1#2#3 { \int_to_arabic:n {#1} ~ { \exp_not:V \c_@@_name_year_ja_tl } ~ \int_to_arabic:n {#2} ~ { \exp_not:V \c_@@_name_month_ja_tl } ~ \int_to_arabic:n {#3} ~ { \exp_not:V \c_@@_name_day_ja_tl } } \cs_new:Npn \@@_date_aux_ja:w #1-#2-#3 \q_stop { \@@_date_aux_ja:nnn {#1} {#2} {#3} } \cs_new:Npn \@@_date_aux_short_ja:nn #1#2 { \int_to_arabic:n {#1} ~ { \exp_not:V \c_@@_name_year_ja_tl } ~ \int_to_arabic:n {#2} ~ { \exp_not:V \c_@@_name_month_ja_tl } } \cs_new:Npn \@@_date_aux_short_ja:w #1-#2 \q_stop { \@@_date_aux_short_ja:nn {#1} {#2} } %</ja> %</lang> % \end{macrocode} % \end{macro} % % \subsection{ä¿¡æ¯å½•å…¥} % % \changes{v2.0}{2022/12/17}{æ·»åŠ \opt{display-date} 键。} % \changes{v2.0}{2022/12/23}{使用 \opt{assoc-supervisor} 键表示副导师, % 使用 \opt{co-supervisor} 键表示è”åˆå¯¼å¸ˆã€‚} % \changes{v2.0}{2022/12/23}{æ·»åŠ \opt{subject} 键。} % \changes{v2.0}{2023/03/17}{使用è¯è¨€ä»£ç å‰ç¼€åŒºåˆ«ä¸åŒè¯ç§çš„ \opt{sjtu/info} 键。} % \begin{macro}[int]{\@@_info_keys_define:n} % 定义 \cls{sjtuthesis} ä¸åŒè¯ç§ |sjtu/info| 键值类的辅助函数。 % \begin{macrocode} %<*class> %<*thesis> \msg_new:nnn { sjtutex } { key-already-defined } { Key~'#1'~is~already~defined~and~redefination~is~being~ignored. } \msg_new:nnn { sjtutex } { key-invalid } { Key~'#1'~is~invalid~and~ignored. } \msg_new:nnn { sjtutex } { key-needs-two-arguments } { Key~'#1'~needs~two~arguments~otherwise~ignored. } \cs_new_protected:Npn \@@_info_keys_define:n #1 { \clist_map_inline:nn { title, display_title, subject, date, department, major, author, supervisor, assoc_supervisor, co_supervisor, degree } { \tl_new:c { l_@@_info_ ##1 _ #1 _tl } } \clist_map_inline:nn { keywords, fund } { \clist_new:c { l_@@_info_ ##1 _ #1 _clist } } \bool_if:NTF \g_@@_review_bool { \seq_set_from_clist:cn { l_@@_info_show_ #1 _seq } { author, id, supervisor, department, major, degree } } { \seq_new:c { l_@@_info_show_ #1 _seq } } \keys_define:nn { sjtu } { info / #1 .meta:nn = { sjtu / info / #1 } {##1} } \keys_define:nn { sjtu / info } { #1 .meta:nn = { sjtu / info / #1 } {##1} } \keys_define:nn { sjtu / info / #1 } { display-title .code:n = { \tl_set:co { l_@@_info_display_title_ #1 _tl } { \cs:w @@_title_case_aux_ #1 :n \cs_end: {##1} } } , title .code:n = { \tl_set:cn { l_@@_info_title_ #1 _tl } {##1} \tl_if_empty:cT { l_@@_info_display_title_ #1 _tl } { \keys_set:nn { sjtu / info / #1 } { display-title = {##1} } } } , subject .tl_set:c = { l_@@_info_subject_ #1 _tl } , keywords .clist_set:c = { l_@@_info_keywords_ #1 _clist } , fund .clist_set:c = { l_@@_info_fund_ #1 _clist } , fund .groups:n = { sensitive } , date .meta:nn = { sjtu / info } { date = {##1} } , display-date .tl_set:c = { l_@@_info_date_ #1 _tl } , @show+ .code:n = { \seq_if_in:cnF { l_@@_info_show_ #1 _seq } {##1} { \seq_put_right:cn { l_@@_info_show_ #1 _seq } {##1} } } , @show+ .groups:n = { sensitive } , custom .meta:nn = { sjtu / info / #1 / custom } {##1} , custom / unknown .code:n = { \regex_match:nVTF { \A [a-z] [a-z0-9\-]* \Z } \l_keys_key_str { \keys_if_exist:neTF { sjtu / info / #1 } \l_keys_key_str { \msg_warning:nne { sjtutex } { key-already-defined } \l_keys_path_str } { \int_compare:nNnTF { \tl_count:n {##1} } = { 2 } { \tl_set_eq:NN \l_@@_tmp_tl \l_keys_key_str \tl_replace_all:Nnn \l_@@_tmp_tl { - } { _ } \tl_set:co { l_@@_name_ \l_@@_tmp_tl _ #1 _tl } { \use_i:nn ##1 } \tl_set:co { l_@@_info_ \l_@@_tmp_tl _ #1 _tl } { \use_ii:nn ##1 } \exp_args:Ne \@@_setup:n { info / #1 / @show+ = \l_@@_tmp_tl } } { \msg_warning:nne { sjtutex } { key-needs-two-arguments } \l_keys_path_str } } } { \msg_warning:nne { sjtutex } { key-invalid } \l_keys_path_str } } } \clist_map_inline:nn { author, supervisor, assoc-supervisor, co-supervisor, department, major, degree } { \tl_set:Nn \l_@@_tmp_tl {##1} \tl_replace_all:Nnn \l_@@_tmp_tl { - } { _ } \keys_define:ne { sjtu / info / #1 } { ##1 .code:n = { \exp_not:N \tl_set:cn { l_@@_info_ \l_@@_tmp_tl _ #1 _tl } {####1} \exp_not:N \@@_setup:n { info / #1 / @show+ = \l_@@_tmp_tl } } } } \clist_map_inline:nn { author, supervisor, assoc-supervisor, co-supervisor } { \keys_define:nn { sjtu / info / #1 } { ##1 .groups:n = { sensitive } } } } % \end{macrocode} % \end{macro} % % \begin{macro}{info/id} % \begin{variable}{\l_@@_info_id_zh_tl} % å•独处ç†å¦å·ã€‚ % \begin{macrocode} \tl_new:N \l_@@_info_id_zh_tl \keys_define:nn { sjtu / info } { id .code:n = { \tl_set:Nn \l_@@_info_id_zh_tl {#1} \@@_setup:n { info / zh / @show+ = id } } , id .groups:n = { sensitive } } % \end{macrocode} % \end{variable} % \end{macro} % % 定义 \cls{sjtuthesis} ä¸ä¸åŒè¯ç§çš„ä¿¡æ¯é”®å€¼ç±»ã€‚ % \begin{macrocode} \clist_map_inline:Nn \g_@@_lang_clist { \@@_info_keys_define:n {#1} } %</thesis> % \end{macrocode} % % 定义 \cls{sjtureport} å’Œ \cls{sjtuarticle} ä¸çš„ä¿¡æ¯é”®å€¼ç±»ã€‚ % \begin{variable}{\l_@@_info_subject_tl,\l_@@_info_keywords_clist} % \begin{macrocode} %<*!thesis> \tl_new:N \l_@@_info_subject_tl \clist_new:N \l_@@_info_keywords_clist \keys_define:nn { sjtu / info } { title .tl_set:N = \@title , author .tl_set:N = \@author , display-date .tl_set:N = \@date , subject .tl_set:N = \l_@@_info_subject_tl , keywords .clist_set:N = \l_@@_info_keywords_clist , } %</!thesis> % \end{macrocode} % \end{variable} % % \begin{macro}{info/date} % 日期。 % \begin{macrocode} \keys_define:nn { sjtu / info } { date .code:n = { \regex_match:nnTF { \A \d+ \- \d+ \- \d+ \Z } {#1} { %<*thesis> \clist_map_inline:Nn \g_@@_lang_clist { \tl_set:ce { l_@@_info_date_ ##1 _tl } { \exp_last_unbraced:ce { @@_date_aux_ ##1 :w } #1 \q_stop } } %</thesis> %<*!thesis> \tl_set:Ne \@date { \exp_last_unbraced:ce { @@_date_aux_ \g_@@_lang_tl :w } #1 \q_stop } %</!thesis> } { \regex_match:nnT { \A \d+ \- \d+ \Z } {#1} { %<*thesis> \clist_map_inline:Nn \g_@@_lang_clist { \tl_set:ce { l_@@_info_date_ ##1 _tl } { \exp_last_unbraced:ce { @@_date_aux_short_ ##1 :w } #1 \q_stop } } %</thesis> %<*!thesis> \tl_set:Ne \@date { \exp_last_unbraced:ce { @@_date_aux_short_ \g_@@_lang_tl :w } #1 \q_stop } %</!thesis> } } } , date .initial:e = { \int_to_arabic:n { \c_sys_year_int } - \int_to_arabic:n { \c_sys_month_int } - \int_to_arabic:n { \c_sys_day_int } } } %<thesis>\tl_set_eq:Nc \today { l_@@_info_date_ \g_@@_lang_tl _tl } %<!thesis>\tl_set_eq:NN \today \@date % \end{macrocode} % \end{macro} % % \subsection{特殊页é¢} % % \subsubsection{页颿¨¡æ¿} % % 使用 \pkg{lttemplates} æž„å»ºé¡µé¢æ¨¡æ¿ï¼Œç”¨äºŽç»˜åˆ¶æ ‡é¢˜é¡µä¸Žç‰ˆæƒé¡µã€‚ % % 页é¢å…ƒç´ 模æ¿ã€‚ % \begin{macrocode} %<*thesis> \NewTemplateType { sjtu / element } { 0 } \DeclareTemplateInterface { sjtu / element } { plain } { 0 } { format : tokenlist = \c_empty_tl , content : tokenlist = \c_empty_tl , bottom-skip : skip = \c_zero_skip , align : choice { left, right, center, normal } = center } \DeclareTemplateCode { sjtu / element } { plain } { 0 } { format = \l_@@_element_format_tl , content = \l_@@_element_content_tl , bottom-skip = \l_@@_element_bottom_skip , align = { left = \cs_set_eq:NN \l_@@_element_align: \raggedright , right = \cs_set_eq:NN \l_@@_element_align: \raggedleft , center = \cs_set_eq:NN \l_@@_element_align: \centering , normal = \cs_set_eq:NN \l_@@_element_align: \prg_do_nothing: } } { \AssignTemplateKeys \group_begin: \l_@@_element_align: \l_@@_element_format_tl \l_@@_element_content_tl \par \group_end: \skip_vertical:N \l_@@_element_bottom_skip \skip_vertical:N \c_zero_skip } % \end{macrocode} % % 页颿¨¡æ¿ã€‚ % \begin{macrocode} \NewTemplateType { sjtu / page } { 1 } \DeclareTemplateInterface { sjtu / page } { title } { 1 } { bookmark : tokenlist , style : tokenlist = empty , format : tokenlist = \linespread { } \selectfont , precode : tokenlist , prefix : tokenlist , elements : commalist } \DeclareTemplateCode { sjtu / page } { title } { 1 } { bookmark = \l_@@_page_bookmark_tl , style = \l_@@_page_style_tl , format = \l_@@_page_format_tl , precode = \l_@@_page_precode_tl , prefix = \l_@@_page_prefix_tl , elements = \l_@@_page_elements_clist } { \tl_set_eq:NN \l_@@_page_bookmark_tl \c_novalue_tl \AssignTemplateKeys \legacy_if:nTF { @openright } { \cleardoublepage } { \clearpage } \l_@@_page_precode_tl \exp_args:No \thispagestyle { \l_@@_page_style_tl } \group_begin: \@@_select_language:n {#1} \clist_gset_eq:Nc \l_@@_info_fund_clist { l_@@_info_fund_ \l_@@_lang_tl _clist } \exp_args:No \tl_if_novalue:nF { \l_@@_page_bookmark_tl } { \@@_pdf_bookmark:nn { 0 } { \l_@@_page_bookmark_tl } } \l_@@_page_format_tl \clist_map_inline:Nn \l_@@_page_elements_clist { \UseInstance { sjtu / element } { \l_@@_page_prefix_tl / ##1 } } \clearpage \group_end: \restoregeometry } % \end{macrocode} % % 声明模æ¿å®žä¾‹çš„辅助函数。 % \begin{macrocode} \cs_new_protected:Npn \@@_declare_element_instance:nnn #1#2#3 { \DeclareInstance { sjtu / element } {#1/#2} { plain } {#3} } \cs_new_protected:Npn \@@_declare_page_instance:nnn #1#2 { \DeclareInstance { sjtu / page } {#1} { title } {#2} } % \end{macrocode} % % \subsubsection{æ ‡é¢˜é¡µ} % % \changes{v2.0}{2022/12/13}{å¯ç”¨æ–°ç‰ˆå°é¢ã€‚} % \changes{v2.0.2}{2023/04/01}{æ ‡é¢˜é¡µæ—¥æœŸåº•éƒ¨å¢žåŠ ç©ºç™½ã€‚} % \changes{v2.1}{2023/11/30}{æ ‡é¢˜é¡µä¿¡æ¯æ æ”¹ç”¨è¡¨æ ¼å®žçŽ°ã€‚} % \changes{v2.1.4}{2024/08/14}{æ ‡é¢˜é¡µä¿¡æ¯æ å…许手动æ¢è¡Œã€‚} % \changes{v2.1.5}{2024/11/06}{ä¿®å¤äº† \pkg{array} æ›´æ–°é€ æˆçš„æ ‡é¢˜é¡µç”Ÿæˆå¤±è´¥çš„问题。} % % \begin{variable}{\SJTU@CT@W@width} % \begin{macrocode} \tl_set:Nn \SJTU@CT@W@width { 5 em } % \end{macrocode} % \end{variable} % % \begin{macro}[int]{\SJTU@CT@W,\SJTU@CT@R,\SJTU@CT@L} % \begin{macrocode} \newcolumntype { \SJTU@CT@W } [ 1 ] { w {#1} { \SJTU@CT@W@width } @{ \tl_use:c { c_@@_name_info_sep_ \l_@@_lang_tl _tl } } } \newcolumntype { \SJTU@CT@R } { r @{ \tl_use:c { c_@@_name_info_sep_ \l_@@_lang_tl _tl } } } \newcolumntype { \SJTU@CT@L } { >{ \linespread { 0.75 } \normalfont } l } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\@@_info_table_row:nn,\@@_info_table_row:vv, % \@@_title_page_info_table:n} % ä¿¡æ¯è¾“出。 % \begin{macrocode} \cs_new:Npn \@@_info_table_row:nn #1#2 { \exp_not:n {#1} & \exp_not:N \hbox:n { \exp_not:N \tabular [ t ] { @{} l @{} } \exp_not:n {#2} \exp_not:N \endtabular } } \cs_generate_variant:Nn \@@_info_table_row:nn { vv } \cs_new_protected:Npn \@@_title_page_info_table:n #1 { \group_begin: \clist_clear:N \l_@@_tmp_clist \seq_map_inline:cn { l_@@_info_show_ \l_@@_lang_tl _seq } { \bool_lazy_all:nT { { \tl_if_exist_p:c { l_@@_name_ ##1 _ \l_@@_lang_tl _tl } } { \tl_if_exist_p:c { l_@@_info_ ##1 _ \l_@@_lang_tl _tl } } } { \clist_put_right:Ne \l_@@_tmp_clist { \@@_info_table_row:vv { l_@@_name_ ##1 _ \l_@@_lang_tl _tl } { l_@@_info_ ##1 _ \l_@@_lang_tl _tl } } } } \tl_set:Nn \arraystretch { 1 } \int_set_eq:NN \hbadness \c_max_int \tabular {#1} \clist_use:Nn \l_@@_tmp_clist { \\ } \endtabular \group_end: } % \end{macrocode} % \end{macro} % % æ ‡é¢˜é¡µé¡µé¢æ ·å¼ï¼Œé¡µè„šæ·»åŠ èµ„åŠ©åŸºé‡‘ä¿¡æ¯ã€‚ % \begin{macrocode} \cs_new:Npn \ps@SJTU@fund { \ps@empty \tl_set:Nn \@oddfoot { \hfil \minipage [ t ] { \textwidth } \centering \zihao { - 5 } \clist_use:Nn \l_@@_info_fund_clist { \par } \endminipage \hfil } \tl_set_eq:NN \@evenfoot \@oddfoot } % \end{macrocode} % % æž„å»ºæ ‡é¢˜é¡µã€‚ % % æ ·å¼ A æ ‡é¢˜é¡µå…ƒç´ å®žä¾‹ã€‚ % \begin{macrocode} \clist_map_inline:nn { { logo } { content = { \includegraphics [ width = 3 cm ] { sjtu-vi-badge-reg-red.pdf } } } , { subject } { format = \zihao { -2 } \setbaselineskip { 30 bp } , content = \tl_use:c { l_@@_info_subject_ \l_@@_lang_tl _tl } , bottom-skip = \c_zero_dim plus 1 fill } , { title } { format = \zihao { 2 } \setbaselineskip { 36 bp } \bfseries , content = \tl_use:c { l_@@_info_display_title_ \l_@@_lang_tl _tl } , bottom-skip = 30 bp plus 1 fill } , { info } { format = \zihao { 4 } \setbaselineskip { 30 bp } \heiti , content = \@@_title_page_info_table:n { \SJTU@CT@W { s } \SJTU@CT@L } , bottom-skip = 30 bp } , { date } { format = \zihao { 4 } \setbaselineskip { 30 bp } \bfseries , content = \tl_use:c { l_@@_info_date_ \l_@@_lang_tl _tl } , } } { \@@_declare_element_instance:nnn { title a } #1 } % \end{macrocode} % % æ ·å¼ A æ ‡é¢˜é¡µå®žä¾‹ã€‚ % \begin{macrocode} \@@_declare_page_instance:nnn { title a } { bookmark = \tl_use:c { c_@@_name_title_page_ \g_@@_lang_tl _tl } , style = SJTU@fund , prefix = title a , elements = { logo, subject, title, info, date } } % \end{macrocode} % % æ ·å¼ B æ ‡é¢˜é¡µå…ƒç´ å®žä¾‹ã€‚ % \begin{macrocode} \clist_map_inline:nn { { subject } { format = \zihao { 4 } \setbaselineskip { 24 bp } \bfseries , content = \tl_use:c { l_@@_info_subject_ \l_@@_lang_tl _tl } , bottom-skip = \c_zero_dim plus 1 fill } , { title } { format = \zihao { -2 } \setbaselineskip { 30 bp } \bfseries , content = \tl_use:c { l_@@_info_display_title_ \l_@@_lang_tl _tl } , bottom-skip = \c_zero_dim plus 1 fill } , { info } { format = \zihao { 3 } \setbaselineskip { 30 bp } \bfseries , content = \@@_title_page_info_table:n { \SJTU@CT@R \SJTU@CT@L } , bottom-skip = 30 bp plus 1 fill } , { date } { format = \zihao { 3 } \setbaselineskip { 30 bp } , content = { \tl_use:c { l_@@_info_department_ \l_@@_lang_tl _tl } \skip_vertical:N \c_zero_skip \tl_use:c { c_@@_name_univ_ \l_@@_lang_tl _tl } \skip_vertical:N \c_zero_skip \tl_use:c { c_@@_name_address_ \l_@@_lang_tl _tl } \skip_vertical:N \c_zero_skip \tl_use:c { l_@@_info_date_ \l_@@_lang_tl _tl } } } } { \@@_declare_element_instance:nnn { title b } #1 } % \end{macrocode} % % æ ·å¼ B æ ‡é¢˜é¡µå®žä¾‹ã€‚ % \begin{macrocode} \@@_declare_page_instance:nnn { title b } { prefix = title b , style = SJTU@fund , elements = { subject, title, info, date } } % \end{macrocode} % % 载入å¦ä½è®ºæ–‡è¯è¨€é…置文件。 % \begin{macrocode} \clist_map_inline:Nn \g_@@_lang_clist { \file_input:n { sjtu-thesis- #1 .def } } %</thesis> %</class> % \end{macrocode} % % 䏿–‡æ ‡é¢˜é¡µä½¿ç”¨æ ·å¼ A,其他è¯ç§ä½¿ç”¨æ ·å¼ B。 % \begin{macrocode} %<*thesis-i18n> \DeclareInstanceCopy { sjtu / page } %<zh> { title / zh } { title a } %<en> { title / en } { title b } %<de> { title / de } { title b } %<ja> { title / ja } { title b } %</thesis-i18n> % \end{macrocode} % % \begin{macro}{\maketitle} % ç”Ÿæˆæ ‡é¢˜é¡µã€‚ % \begin{macrocode} %<*class&thesis> \RenewDocumentCommand \maketitle { } { \clist_map_inline:Nn \g_@@_lang_clist { \UseInstance { sjtu / page } { title / ##1 } { ##1 } } } %</class&thesis> % \end{macrocode} % \end{macro} % % \subsubsection{原创性声明åŠä½¿ç”¨æŽˆæƒä¹¦} % % \changes{v2.2.1}{2025/03/22}{æ·»åŠ åŽŸåˆ›æ€§å£°æ˜Žå˜ä½“。} % % å£°æ˜ŽåŠæŽˆæƒä¹¦æ–‡æœ¬ã€‚ % \begin{macrocode} %<*thesis-i18n&zh> \tl_const:Nn \c_@@_orig_decl_text_a_zh_tl { 本人郑é‡å£°æ˜Žï¼šæ‰€å‘ˆäº¤çš„å¦ä½è®ºæ–‡ï¼Œæ˜¯æœ¬äººåœ¨å¯¼å¸ˆçš„æŒ‡å¯¼ä¸‹ï¼Œç‹¬ç«‹è¿›è¡Œç ”ç©¶å·¥ 作所å–å¾—çš„æˆæžœã€‚ 除文ä¸å·²ç»æ³¨æ˜Žå¼•用的内容外,本论文ä¸åŒ…å«ä»»ä½•其他个人或集体已ç»å‘表或 æ’°å†™è¿‡çš„ä½œå“æˆæžœã€‚ å¯¹æœ¬æ–‡çš„ç ”ç©¶åšå‡ºé‡è¦è´¡çŒ®çš„个人和集体,å‡å·²åœ¨æ–‡ä¸ä»¥æ˜Žç¡®æ–¹å¼æ ‡æ˜Žã€‚ æœ¬äººå®Œå…¨çŸ¥æ™“æœ¬å£°æ˜Žçš„æ³•å¾‹åŽæžœç”±æœ¬äººæ‰¿æ‹…。 } \tl_const:Nn \c_@@_orig_decl_text_b_zh_tl { 本人郑é‡å£°æ˜Žï¼šæ‰€å‘ˆäº¤çš„å¦ä½è®ºæ–‡ï¼Œæ˜¯æœ¬äººåœ¨å¯¼å¸ˆçš„æŒ‡å¯¼ä¸‹ï¼Œç‹¬ç«‹è¿›è¡Œç ”ç©¶å·¥ 作所å–å¾—çš„æˆæžœã€‚ 除文ä¸å·²ç»æ³¨æ˜Žå¼•用的内容外,本论文ä¸åŒ…å«ä»»ä½•其他个人或集体已ç»å‘表或 æ’°å†™è¿‡çš„ä½œå“æˆæžœã€‚ å¯¹æœ¬æ–‡çš„ç ”ç©¶åšå‡ºé‡è¦è´¡çŒ®çš„个人和集体,已在文ä¸ä»¥é€‚当方å¼äºˆä»¥è‡´è°¢ã€‚ 若在论文撰写过程ä¸ä½¿ç”¨äº†äººå·¥æ™ºèƒ½å·¥å…·ï¼Œæœ¬äººå·²éµå¾ªã€Šä¸Šæµ·äº¤é€šå¤§å¦å…³äºŽåœ¨ 教育教å¦ä¸ä½¿ç”¨~ AI~ 的规范》,确ä¿äººå·¥æ™ºèƒ½ç”Ÿæˆå†…容的应用场景ã€å¼•用范 å›´åŠæ ‡æ³¨æ–¹å¼å‡ç¬¦åˆè§„定,并æœç»å¦æœ¯ä¸ç«¯è¡Œä¸ºã€‚ æœ¬äººå®Œå…¨çŸ¥æ™“æœ¬å£°æ˜Žçš„æ³•å¾‹åŽæžœç”±æœ¬äººæ‰¿æ‹…。 } \tl_const:Nn \c_@@_auth_decl_text_zh_tl { æœ¬äººåŒæ„妿 ¡ä¿ç•™å¹¶å‘国家有关部门或机构é€äº¤è®ºæ–‡çš„å¤å°ä»¶å’Œç”µå版,å…许 论文被查阅和借阅。 \par \vskip 6 bp \noindent 本å¦ä½è®ºæ–‡å±žäºŽï¼š \par { \c_@@_symbol_white_square_tl } \, \textbf { 公开论文 } \par { \c_@@_symbol_white_square_tl } \, \textbf { 内部论文 }, ä¿å¯† \, { \c_@@_symbol_white_square_tl } \, 1 \, å¹´ \, / \, { \c_@@_symbol_white_square_tl } \, 2 \, å¹´ \, / \, { \c_@@_symbol_white_square_tl } \, 3 \, 年, 过ä¿å¯†æœŸåŽé€‚用本授æƒä¹¦ã€‚ \par { \c_@@_symbol_white_square_tl } \, \textbf { 秘密论文 }, ä¿å¯† \, \underline { \hspace { 2 em } } \, 年(ä¸è¶…过~ 10~ 年), 过ä¿å¯†æœŸåŽé€‚用本授æƒä¹¦ã€‚ \par { \c_@@_symbol_white_square_tl } \, \textbf { 机密论文 }, ä¿å¯† \, \underline { \hspace { 2 em } } \, 年(ä¸è¶…过~ 20~ 年), 过ä¿å¯†æœŸåŽé€‚用本授æƒä¹¦ã€‚ \par \hspace { 6 em }(请在以上方框内选择打“ \ensuremath { \checkmark } â€ï¼‰ } % \end{macrocode} % % ç¾å框。 % \begin{macrocode} \tl_const:Nn \c_@@_signature_text_zh_tl { ç¾å: \\ 日期: \hspace { \stretch { 3 } } å¹´ \hspace { \stretch { 2 } } 月 \hspace { \stretch { 2 } } æ—¥ } \cs_new_protected:Npn \@@_signature:N #1 { \parbox [ t ] { 12 em } { #1 \c_@@_signature_text_zh_tl } } %</thesis-i18n&zh> % \end{macrocode} % % å£°æ˜ŽåŠæŽˆæƒä¹¦å…ƒç´ 实例。 % \begin{macrocode} %<*class> %<*thesis> \clist_map_inline:nn { { orig / title } { format = \zihao { 3 } \setbaselineskip { 30 bp } \bfseries \heiti , content = { \c_@@_name_univ_zh_tl \skip_vertical:N \c_zero_skip \c_@@_name_thesis_zh_tl \c_@@_name_orig_decl_zh_tl } , bottom-skip = 12 bp }, { orig / text } { format = \zihao { -4 } \setbaselineskip { 24 bp } , bottom-skip = 24 bp , align = normal }, { orig / sign } { format = \zihao { 4 } \setbaselineskip { 30 bp } , content = { \@@_signature:N \c_@@_name_decl_author_zh_tl \skip_horizontal:n { 2 em } \hbox:n { } } , bottom-skip = 24 bp plus 1 fill , align = right }, { auth / title } { format = \zihao { 3 } \setbaselineskip { 30 bp } \bfseries \heiti , content = { \c_@@_name_univ_zh_tl \skip_vertical:N \c_zero_skip \c_@@_name_thesis_zh_tl \c_@@_name_auth_decl_zh_tl } , bottom-skip = 12 bp }, { auth / text } { format = \zihao { -4 } \setbaselineskip { 24 bp } , content = \c_@@_auth_decl_text_zh_tl , bottom-skip = 24 bp , align = normal }, { auth / sign } { format = \zihao { 4 } \setbaselineskip { 30 bp } , content = { \@@_signature:N \c_@@_name_decl_author_zh_tl \hfill \@@_signature:N \c_@@_name_decl_supervisor_zh_tl } , bottom-skip = \c_zero_dim plus 1 fill , align = normal } } { \@@_declare_element_instance:nnn { copyright } #1 } % \end{macrocode} % % å£°æ˜ŽåŠæŽˆæƒä¹¦æ¨¡æ¿å®žä¾‹ã€‚ % \begin{macrocode} \@@_declare_page_instance:nnn { copyright } { bookmark = \tl_use:c { c_@@_name_declaration_ \g_@@_lang_tl _tl } , precode = \newgeometry { margin = 3.0 cm , bindingoffset = 0.5 cm } , prefix = copyright , elements = { orig / title, orig / text, orig / sign, auth / title, auth / text, auth / sign } } % \end{macrocode} % % \begin{variable}{\l_@@_copyright_page_file_tl} % \begin{macrocode} \tl_new:N \l_@@_copyright_page_file_tl % \end{macrocode} % \end{variable} % % \begin{macrocode} \keys_define:nn { sjtu / private / copyright } { file .tl_set:N = \l_@@_copyright_page_file_tl , file .value_required:n = true , filename .meta:n = { file = #1 } , variant .choice: , variant .choices:nn = { a, b } { \EditInstance { sjtu / element } { copyright / orig / text } { content = \tl_use:c { c_@@_orig_decl_text_ #1 _zh_tl } } } , variant .initial:e = \int_compare:nNnTF { \g_@@_thesis_type_int } > { 1 } { a } { b } } % \end{macrocode} % % \changes{v2.0}{2022/12/20}{ä¸å†è‡ªåŠ¨è½½å…¥ \pkg{pdfpages} å®åŒ…。} % \begin{macrocode} \msg_new:nnn { sjtutex } { require-pdfpages } { Add~'\token_to_str:N \usepackage{pdfpages}'~in~your~preamble \\ before~inserting~pages~of~external~PDF. } % \end{macrocode} % % \begin{macro}{\copyrightpage} % 生æˆå£°æ˜ŽåŠæŽˆæƒä¹¦ã€‚ % \begin{macrocode} \NewDocumentCommand \copyrightpage { O{ } } { \bool_if:NF \g_@@_review_bool { \group_begin: \keys_set_known:nnN { sjtu / private / copyright } {#1} \l_@@_tmp_tl \tl_if_empty:NTF \l_@@_copyright_page_file_tl { \UseInstance { sjtu / page } { copyright } { zh } } { \cs_if_exist:NTF \includepdf { \legacy_if:nTF { @openright } { \cleardoublepage } { \clearpage } \exp_args:Nnv \@@_pdf_bookmark:nn { 0 } { c_@@_name_declaration_ \g_@@_lang_tl _tl } \tl_set_rescan:NnV \l_@@_tmp_tl { } \l_@@_tmp_tl \exp_args:NNo \includepdf [ \l_@@_tmp_tl ] { \l_@@_copyright_page_file_tl } } { \msg_warning:nn { sjtutex } { require-pdfpages } \UseInstance { sjtu / page } { copyright } { zh } } } \group_end: } } %</thesis> % \end{macrocode} % \end{macro} % % \subsection{文档组æˆ} % % \changes{v2.2}{2024/12/20}{å†…ç½®æ–‡æ¡£å‘½ä»¤ä¸ŽçŽ¯å¢ƒä¿®æ”¹ä¸ºä½¿ç”¨é”®å€¼å¯¹å‚æ•°ï¼ŒåºŸå¼ƒå¯¹åº”的带星å·ç‰ˆæœ¬ã€‚} % % \subsubsection{统一接å£} % % 定义文档组æˆéƒ¨åˆ†çš„统一键值对接å£ã€‚ % % \begin{variable}{\l_@@_heading_numbering_bool,\l_@@_heading_in_toc_bool, % \l_@@_heading_title_tl,\l_@@_heading_marking_tl} % \begin{macrocode} \bool_new:N \l_@@_heading_numbering_bool \bool_new:N \l_@@_heading_in_toc_bool \tl_new:N \l_@@_heading_title_tl \tl_new:N \l_@@_heading_marking_tl % \end{macrocode} % \end{variable} % % 默认 \tn{mainmatter} 之åŽçš„ç« èŠ‚æ ‡é¢˜åŠ å…¥ç›®å½•ã€‚ % \begin{macrocode} %<*thesis> \AddToHook { cmd / mainmatter / after } { \bool_set_true:N \l_@@_heading_in_toc_bool } %</thesis> % \end{macrocode} % % \begin{macro}{intoc,notintoc,title,marking} % \begin{macrocode} \keys_define:nn { sjtu / private } { intoc .value_forbidden:n = true, intoc .groups:n = { heading } , intoc .code:n = { \bool_set_true:N \l_@@_heading_in_toc_bool } , notintoc .value_forbidden:n = true, notintoc .groups:n = { heading } , notintoc .code:n = { \bool_set_false:N \l_@@_heading_in_toc_bool } , title .tl_set:N = \l_@@_heading_title_tl , title .groups:n = { heading } , marking .tl_set:N = \l_@@_heading_marking_tl , marking .groups:n = { heading } } % \end{macrocode} % \end{macro} % % \begin{macro}[int]{\SJTU@heading,\@@_heading:nn,\@@_heading:VV, % \@@_make_heading:n} % å®šä¹‰ä¸€ä¸ªçµæ´»çš„ç« èŠ‚æ ‡é¢˜å‘½ä»¤ä¸“é—¨å¤„ç†ä¸åŒçš„需求。 % \begin{macrocode} \NewDocumentCommand \SJTU@heading { O{#2} m } { \bool_if:nTF { \l_@@_heading_numbering_bool && \l_@@_heading_in_toc_bool } %<!article> { \chapter [#1] {#2} } %<article> { \section [#1] {#2} } { %<!article> \CTEX@chapter@break \bool_if:NTF \l_@@_heading_in_toc_bool { \@@_phantom_section: %<!article> \addcontentsline { toc } { chapter } {#1} %<article> \addcontentsline { toc } { section } {#1} } { \@@_pdf_bookmark:nn { 0 } {#1} } %<!article> \chapter* {#2} %<article> \section* {#2} \CTEX@gettitle {#1} \@mkboth { \MakeUppercase {#1} } { \MakeUppercase {#1} } } } \cs_new_protected:Npn \@@_heading:nn #1#2 { \SJTU@heading [#1] {#2} } \cs_generate_variant:Nn \@@_heading:nn { VV } \cs_new_protected:Npn \@@_make_heading:n #1 { \tl_set_eq:NN \l_@@_heading_marking_tl \c_novalue_tl \keys_set_groups:nnn { sjtu / private } { heading } {#1} \@@_heading:VV \l_@@_heading_marking_tl \l_@@_heading_title_tl } % \end{macrocode} % \end{macro} % % \subsubsection{摘è¦} % % \changes{v2.1}{2023/11/30}{新增 \opt{style/keywords-format} 选项。} % \begin{macro}{style/keywords-format} % å…³é”®è¯æŽ’ç‰ˆæ ·å¼ã€‚ % \begin{macrocode} \keys_define:nn { sjtu / style } { keywords-format .choice: , keywords-format / plain .code:n = { \cs_set:Nn \@@_keywords_format:n { \noindent { \bfseries ##1 } } } , keywords-format / hang .code:n = { \cs_set:Nn \@@_keywords_format:n { \@hangfrom { \bfseries ##1 } } } , keywords-format .initial:n = { plain } } % \end{macrocode} % \end{macro} % % \changes{v2.0}{2023/03/17}{\env{abstract} 环境新增指定è¯è¨€çš„å¯é€‰å‚数。} % \changes{v2.1}{2023/11/29}{\env{abstract} çŽ¯å¢ƒæ·»åŠ ç›®å½•æ¡ç›®ï¼Œ % \env{abstract*} çŽ¯å¢ƒå¯¹åº”ä¿®æ”¹ä¸ºä¸æ·»åŠ ç›®å½•æ¡ç›®ã€‚} % \begin{macro}{abstract} % å¦ä½è®ºæ–‡æ‘˜è¦çŽ¯å¢ƒã€‚ % \begin{macrocode} %<*thesis> \DeclareDocumentEnvironment { abstract } { O{ } } { \@@_select_language:n {#1} \tl_set_eq:Nc \l_@@_heading_title_tl { c_@@_name_abstract_ \l_@@_lang_tl _tl } \@@_make_heading:n {#1} } { \clist_if_empty:cF { l_@@_info_keywords_ \l_@@_lang_tl _clist } { \par \mode_leave_vertical: \par \@@_keywords_format:n { \tl_use:c { c_@@_name_keywords_ \l_@@_lang_tl _tl } \tl_use:c { c_@@_name_info_sep_ \l_@@_lang_tl _tl } } \clist_use:cv { l_@@_info_keywords_ \l_@@_lang_tl _clist } { c_@@_name_item_sep_ \l_@@_lang_tl _tl } \par } } %</thesis> % \end{macrocode} % % ä¿®å¤é€šç”¨æ¨¡æ¿æ‘˜è¦æ®µé¦–缩进。 % \begin{macrocode} %<*!thesis> \legacy_if:nT { @titlepage } { \AddToHook { cmd / abstract / after } { \par } } % \end{macrocode} % % é€šç”¨æ¨¡æ¿æ‘˜è¦åŽæ·»åР关键è¯ã€‚ % \begin{macrocode} \AddToHook { env / abstract / end } { \clist_if_empty:NF \l_@@_info_keywords_clist { \par \mode_leave_vertical: \par \@@_keywords_format:n { \tl_use:c { c_@@_name_keywords_ \g_@@_lang_tl _tl } \tl_use:c { c_@@_name_info_sep_ \g_@@_lang_tl _tl } } \clist_use:Nv \l_@@_info_keywords_clist { c_@@_name_item_sep_ \g_@@_lang_tl _tl } \par } } %</!thesis> % \end{macrocode} % \end{macro} % % \subsubsection{目录列表} % % \changes{v2.1}{2023/11/29}{\tn{tableofcontents} æ·»åŠ ç›®å½•æ¡ç›®ï¼Œ % \tn{tableofcontents*} å¯¹åº”ä¿®æ”¹ä¸ºä¸æ·»åŠ ç›®å½•æ¡ç›®ã€‚} % \begin{macro}{\tableofcontents} % 目录。 % \begin{macrocode} \DeclareDocumentCommand \tableofcontents { O{ } } { \group_begin: \@@_make_heading:n { title = \contentsname, #1 } \@starttoc { toc } \group_end: } % \end{macrocode} % \end{macro} % % \changes{v2.1.2}{2024/03/31}{改用 \pkg{titletoc} è®¾ç½®ç›®å½•æ ¼å¼ã€‚} % \changes{v2.1.3}{2024/06/28}{æ›´æ–°ç›®å½•æ ·å¼ã€‚} % \begin{macrocode} \tl_set:Nn \SJTU@leaders { \titlerule* [ 4bp ] { . } } \contentsmargin [ 2.55 em ] { 0 pt } %<article>\titlecontents { section } %<!article>\titlecontents { chapter } [ 0 pt ] { \addvspace { 6 bp } \bfseries } { \contentspush { \thecontentslabel \enskip } } { } { \SJTU@leaders \thecontentspage } %<article>\titlecontents { subsection } %<!article>\titlecontents { section } [ 2 em ] { } { \contentspush { \thecontentslabel \enskip } } { } { \SJTU@leaders \thecontentspage } %<article>\titlecontents { subsubsection } %<!article>\titlecontents { subsection } [ 4 em ] { } { \contentspush { \thecontentslabel \enskip } } { } { \SJTU@leaders \thecontentspage } % \end{macrocode} % % \changes{v2.0.1}{2023/03/31}{æ’图ã€è¡¨æ ¼å’Œç®—法ç‰ç´¢å¼•ä¸ç¼©è¿›ã€‚} % \changes{v2.0.1}{2023/03/31}{调整æ’图ã€è¡¨æ ¼å’Œç®—法ç‰ç´¢å¼•ç¼–å·å®½åº¦ã€‚} % \begin{macro}[int]{\SJTU@listof,\@@_new_list_of:Nnnn} % \begin{macro}{\listoffigures,\listoftables} % 图表索引。 % \begin{macrocode} \NewDocumentCommand \SJTU@listof { m m O{ } } { \group_begin: \@@_make_heading:n { title = #1, #3 } \exp_args:Nv \@starttoc { ext@ #2 } \group_end: } \cs_new_protected:Npn \@@_new_list_of:Nnnn #1#2#3#4 { \DeclareDocumentCommand #1 { } { \SJTU@listof {#4} {#2} } \titlecontents {#2} [ 0 pt ] { } { \contentspush { #3 \space \thecontentslabel \enskip } } { } { \SJTU@leaders \thecontentspage } \exp_args:Nnv \contentsuse {#2} { ext@ #2 } } \@@_new_list_of:Nnnn \listoffigures { figure } { \figurename } { \listfigurename } \@@_new_list_of:Nnnn \listoftables { table } { \tablename } { \listtablename } % \end{macrocode} % \end{macro} % \end{macro} % % \subsubsection{预定义环境} % % \begin{macro}{abbreviation} % 缩略è¯å¯¹ç…§è¡¨ã€‚ % \begin{macrocode} %<*thesis> \NewDocumentEnvironment { abbreviation } { O{ } } { \bool_set_true:N \l_@@_heading_numbering_bool \@@_make_heading:n { title = \SJTU@abbrname, #1 } \tl_clear:N \SJTU@style@float@font } { } % \end{macrocode} % \end{macro} % % \begin{macro}{nomenclature} % 符å·å¯¹ç…§è¡¨ã€‚ % \begin{macrocode} \NewDocumentEnvironment { nomenclature } { O{ } } { \bool_set_true:N \l_@@_heading_numbering_bool \@@_make_heading:n { title = \SJTU@nomname, #1 } \tl_clear:N \SJTU@style@float@font } { } % \end{macrocode} % \end{macro} % % \changes{v2.0}{2023/03/17}{移除 \env{summary} 环境。} % % \begin{macro}{acknowledgements} % 致谢,盲审模å¼ä¸‹éšè—致谢。 % \begin{macrocode} \NewDocumentEnvironment { acknowledgements } { O{ } +b } { \bool_if:NF \g_@@_review_bool { \@@_select_language:n {#1} \@@_make_heading:n { title = \SJTU@ackname, #1 } #2 } } { } % \end{macrocode} % \end{macro} % % \changes{v2.2}{2024/12/08}{移除 \env{bibliolist} 环境的使用é™åˆ¶ï¼Œ % 默认é‡ç½®è®¡æ•°ï¼Œæ–°å¢ž \opt{resume} 选项。} % \begin{macro}{achievements,bibliolist,bibliolist*} % å‘è¡¨è®ºæ–‡ä¸Žå¦æœ¯æˆæžœã€‚ % \begin{macrocode} \newcounter { SJTU@bib } \bool_new:N \l_@@_bibliolist_resume_bool \keys_define:nn { sjtu / private / bibliolist } { resume .value_forbidden:n = true, resume .code:n = { \bool_set_true:N \l_@@_bibliolist_resume_bool } } \msg_new:nnn { sjtutex } { empty-environment } { Empty~'#1'~environment. } \NewDocumentEnvironment { @bibliolist } { m m } { \keys_set:nn { sjtu / private / bibliolist } {#1} \cs_if_exist_use:N \bibfont \list { \tl_if_blank:nTF {#2} { \hfill } { \@biblabel { \arabic{ SJTU@bib } } } } { \tl_if_blank:nTF {#2} { \skip_if_exist:NTF \bibhang { \dim_set_eq:NN \leftmargin \bibhang } { \dim_set:Nn \leftmargin { 1 em } } \dim_set:Nn \itemindent { - \leftmargin } } { \@@_dim_set_to_wd:Nn \labelwidth { \@biblabel {#2} } \dim_set_eq:NN \leftmargin \labelwidth \dim_add:Nn \leftmargin { \labelsep } } \skip_if_exist:NTF \bibitemsep { \skip_set_eq:NN \itemsep \bibitemsep \skip_if_exist:NT \bibparsep { \skip_set_eq:NN \parsep \bibparsep } } { \skip_if_exist:NT \bibsep { \skip_set_eq:NN \itemsep \bibsep \skip_zero:N \parsep } } \@nmbrlisttrue \tl_set:Nn \@listctr { SJTU@bib } \tl_clear:N \p@SJTU@bib \bool_if:NF \l_@@_bibliolist_resume_bool { \setcounter { SJTU@bib } { 0 } } \tl_set:Nn \theSJTU@bib { \arabic { SJTU@bib } } } \sloppy \int_set:Nn \clubpenalty { 4000 } \int_set_eq:NN \@clubpenalty \clubpenalty \int_set:Nn \widowpenalty { 4000 } \char_set_sfcode:nn { `\. } { 1000 } } { \tl_set:Nn \@noitemerr { \msg_warning:nnn { sjtutex } { empty-environment } { bibliolist } } \endlist } \NewDocumentEnvironment { achievements } { O{ } } { \@@_select_language:n {#1} \@@_make_heading:n { title = \SJTU@achvname, #1 } } { } \NewDocumentEnvironment { bibliolist } { O{ } m +b } { \bool_if:NF \g_@@_review_bool { \begin { @bibliolist } {#1} {#2} #3 \end { @bibliolist } } } { } \NewDocumentEnvironment { bibliolist* } { O{ } m +b } { \bool_if:NT \g_@@_review_bool { \begin { @bibliolist } {#1} {#2} #3 \end { @bibliolist } } } { } % \end{macrocode} % \end{macro} % % \begin{macro}{resume} % 简历。 % \begin{macrocode} \NewDocumentEnvironment { resume } { O{ } +b } { \bool_if:NF \g_@@_review_bool { \@@_select_language:n {#1} \@@_make_heading:n { title = \SJTU@resumename, #1 } #2 } } { } % \end{macrocode} % \end{macro} % % \changes{v2.0}{2023/03/17}{\env{digest} 环境新增指定è¯è¨€çš„å¯é€‰å‚数。} % \begin{macro}{digest} % 大摘è¦ã€‚ % \begin{macrocode} \NewHook { sjtutex / digest } \NewDocumentEnvironment { digest } { O{ } +b } { \AtEndDocument { \group_begin: \@@_select_language:n { en, #1 } \legacy_if:nTF { @openright } { \cleardoublepage } { \clearpage } \pagenumbering { roman } \tl_gset:Nn \@@_the_page_tl { \arabic { page } } \UseHook { sjtutex / digest } \cs_gset_eq:NN \addcontentsline \use_none:nnn \clist_map_inline:Nn \l_@@_counter_without_chapter_clist { \counterwithout {##1} { chapter } \setcounter {##1} { 0 } } \tl_set_eq:Nc \l_@@_heading_title_tl { l_@@_info_display_title_ \l_@@_lang_tl _tl } \@@_make_heading:n { marking = \SJTU@digestname, #1, notintoc } #2 \group_end: } } { } %</thesis> % \end{macrocode} % \end{macro} % % \subsection{设置接å£} % % \begin{macro}{\sjtusetup} % 用户设置接å£ã€‚ % 盲审模å¼ä¸‹ä¸ä¼šè®¾ç½®æ•感信æ¯ã€‚ % \begin{macrocode} %<!thesis>\NewDocumentCommand \sjtusetup { } { \keys_set:nn { sjtu } } %<thesis>\NewDocumentCommand \sjtusetup { } { \@@_setup:n } % \end{macrocode} % \end{macro} % % \changes{v2.0}{2022/12/28}{釿–°åˆ¶å®š \opt{sjtu/style} 域ä¸çš„æŽ¥å£ã€‚} % 定义元(meta)键值对。 % \begin{macrocode} \keys_define:nn { sjtu } { style .meta:nn = { sjtu / style } {#1} , info .meta:nn = { sjtu / info } {#1} , name .meta:nn = { sjtu / name } {#1} } % \end{macrocode} % % 兼容 \cls{sjtuthesis} 旧接å£ã€‚ % \begin{macrocode} %<*thesis> \keys_define:nn { sjtu / info } { title .meta:n = { zh / title = {#1} } , title* .meta:n = { en / title = {#1} } , display-title .meta:n = { zh / display-title = {#1} } , display-title* .meta:n = { en / display-title = {#1} } , subject .meta:n = { zh / subject = {#1} } , subject* .meta:n = { en / subject = {#1} } , keywords .meta:n = { zh / keywords = {#1} } , keywords* .meta:n = { en / keywords = {#1} } , author .meta:n = { zh / author = {#1} } , author* .meta:n = { en / author = {#1} } , supervisor .meta:n = { zh / supervisor = {#1} } , supervisor* .meta:n = { en / supervisor = {#1} } , assoc-supervisor .meta:n = { zh / assoc-supervisor = {#1} } , assoc-supervisor* .meta:n = { en / assoc-supervisor = {#1} } , co-supervisor .meta:n = { zh / co-supervisor = {#1} } , co-supervisor* .meta:n = { en / co-supervisor = {#1} } , degree .meta:n = { zh / degree = {#1} } , degree* .meta:n = { en / degree = {#1} } , department .meta:n = { zh / department = {#1} } , department* .meta:n = { en / department = {#1} } , major .meta:n = { zh / major = {#1} } , major* .meta:n = { en / major = {#1} } , fund .meta:n = { zh / fund = {#1} } , fund* .meta:n = { en / fund = {#1} } , display-date .meta:n = { zh / date = {#1} } , display-date* .meta:n = { en / date = {#1} } } \keys_define:nn { sjtu / name } { abbreviation .meta:n = { abbr = {#1} } , nomenclature .meta:n = { nom = {#1} } , acknowledgements .meta:n = { ack = {#1} } , publications .meta:n = { achv = {#1} } , achievements .meta:n = { achv = {#1} } } %</thesis> % \end{macrocode} % % \begin{macro}{\subject,\keywords} % é€šç”¨æ¨¡æ¿æ–°æŽ¥å£ã€‚ % \begin{macrocode} %<*!thesis> \NewDocumentCommand \subject { m } { \keys_set:nn { sjtu / info } { subject = {#1} } } \NewDocumentCommand \keywords { m } { \keys_set:nn { sjtu / info } { keywords = {#1} } } %</!thesis> % \end{macrocode} % \end{macro} % % \subsection{å…¶ä»–å®åŒ…的设置} % % \changes{v2.0.3}{2023/09/23}{移除 \pkg{listings} å®åŒ…预设。} % 这些å®åŒ…å¹¶éžæ ¼å¼è¦æ±‚,但是为了方便åŒå¦ä»¬ä½¿ç”¨ï¼Œåœ¨è¿™é‡Œè¿›è¡Œç®€å•设置。 % % \subsubsection{\pkg{hyperref} å®åŒ…} % % \begin{macrocode} \ctex_at_end_package:nn { hyperref } { \hypersetup { linktoc = all, bookmarksdepth = 2, bookmarksnumbered = true, bookmarksopen = true, bookmarksopenlevel = 1, unicode = true, psdextra = true, breaklinks = true, pdfdisplaydoctitle = true } \int_new:N \g_@@_bookmark_int \cs_set_protected:Npn \@@_pdf_bookmark:nn #1#2 { \phantomsection \int_gincr:N \g_@@_bookmark_int \pdfbookmark [#1] {#2} { sjtubookmark. \int_use:N \g_@@_bookmark_int } } \cs_set_eq:NN \@@_phantom_section: \phantomsection \DeclareExpandableDocumentCommand { \@@_pdfstring_newline:w } { s o m } {#3} \pdfstringdefDisableCommands { \cs_set_eq:NN \\ \@@_pdfstring_newline:w \cs_set_eq:NN \hspace \use_none:n \cs_set_eq:NN \zihao \use_none:n \tl_set_eq:NN \quad \c_empty_tl \tl_set_eq:NN \qquad \c_empty_tl } \ctex_after_end_preamble:n { \hypersetup { %<*thesis> pdftitle = \l_@@_info_title_zh_tl , pdfauthor = \l_@@_info_author_zh_tl , pdfsubject = \l_@@_info_subject_zh_tl , pdfkeywords = \l_@@_info_keywords_zh_clist %</thesis> %<*!thesis> pdftitle = \@title , pdfauthor = \@author , pdfsubject = \l_@@_info_subject_tl , pdfkeywords = \l_@@_info_keywords_clist %</!thesis> } } } % \end{macrocode} % % \changes{v2.2}{2024/12/30}{使用 \pkg{pageslts} å®åŒ…èŽ·å–æ€»é¡µç 。} % \subsubsection{\pkg{pageslts} å®åŒ…} % % \begin{macrocode} \ctex_at_end_package:nn { pageslts } { %<thesis> \pagenumbering { Alph } %<!thesis> \pagenumbering { arabic } \tl_set:Nn \@@_the_last_page_tl { \lastpageref { pagesLTS.\pagesLTS@pnc } } %<*thesis> \AddToHook { sjtutex / digest } { \tl_gset:Nn \@@_the_last_page_tl { \lastpageref { pagesLTS.roman.local } } } %</thesis> } % \end{macrocode} % % \subsubsection{\pkg{threeparttable} å®åŒ…} % % \begin{macrocode} \ctex_at_end_package:nn { threeparttable } { \tl_put_right:Nn \TPTnoteSettings { \footnotesize } } % \end{macrocode} % % \subsubsection{\pkg{longtable} å®åŒ…} % % \begin{macrocode} \ctex_at_end_package:nn { longtable } { \AtBeginEnvironment { longtable } { \SJTU@style@float@font } } %</class> % \end{macrocode} % % \changes{v2.1.1}{2024/03/21}{预定义的数å¦çŽ¯å¢ƒå£°æ˜Žç§»è‡³å¯¼è¨€åŒºæœ«å°¾ï¼Œ % 且ä¸ä¼šè¦†ç›–é‡å的已定义环境。} % \subsubsection{\pkg{amsthm} å®åŒ…å’Œ \pkg{ntheorem} å®åŒ…} % % 预定义的数å¦çŽ¯å¢ƒï¼Œä¸åŒ…æ‹¬è¯æ˜ŽçŽ¯å¢ƒ \env{proof}。 % \begin{macrocode} %<*scheme> \clist_map_inline:nn { %<*zh> { assumption } { å‡è®¾ } , { axiom } { å…¬ç† } , { conjecture } { 猜想 } , { corollary } { 推论 } , { definition } { 定义 } , { example } { 例 } , { exercise } { ç»ƒä¹ } , { lemma } { å¼•ç† } , { problem } { 问题 } , { proposition } { 命题 } , { remark } { 注 } , { solution } { è§£ } , { theorem } { å®šç† } %</zh> %<*en> { assumption } { Assumption } , { axiom } { Axiom } , { conjecture } { Conjecture } , { corollary } { Corollary } , { definition } { Definition } , { example } { Example } , { exercise } { Exercise } , { lemma } { Lemma } , { problem } { Problem } , { proposition } { Proposition } , { remark } { Remark } , { solution } { Solution } , { theorem } { Theorem } %</en> %<*de> { assumption } { Annahme } , { axiom } { Axiom } , { conjecture } { Hypothese } , { corollary } { Korollar } , { definition } { Definition } , { example } { Beispiel } , { exercise } { Übung } , { lemma } { Lemma } , { problem } { Problem } , { proposition } { Proposition } , { remark } { Anmerkung } , { solution } { Lösung } , { theorem } { Theorem } %</de> %<*ja> { assumption } { 仮定 } , { axiom } { å…¬ç† } , { conjecture } { 予想 } , { corollary } { ç³» } , { definition } { 定義 } , { example } { 例 } , { exercise } { ç·´ç¿’ } , { lemma } { 補題 } , { problem } { å•題 } , { proposition } { 命題 } , { remark } { æ³¨æ„ } , { solution } { 解法 } , { theorem } { å®šç† } %</ja> } %<zh> { \@@_name_const:nnn { zh } #1 } %<en> { \@@_name_const:nnn { en } #1 } %<de> { \@@_name_const:nnn { de } #1 } %<ja> { \@@_name_const:nnn { ja } #1 } %</scheme> % \end{macrocode} % % 定义å‰ä¼šæ£€æµ‹çŽ¯å¢ƒæ˜¯å¦å·²ç»å˜åœ¨ï¼Œé¿å…覆盖用户的定义。 % \begin{macrocode} %<*class> \cs_new_protected:Nn \@@_new_theorems: { \clist_map_inline:nn { assumption, axiom, conjecture, corollary, definition, example, exercise, lemma, problem, proposition, theorem } { \cs_if_exist:cF {##1} { \exp_args:Nnv \newtheorem {##1} %<!article> { c_@@_name_ ##1 _ \g_@@_lang_tl _tl } [ chapter ] %<article> { c_@@_name_ ##1 _ \g_@@_lang_tl _tl } } } \clist_map_inline:nn { remark, solution } { \cs_if_exist:cF {##1} { \exp_args:NNnv \newtheorem* {##1} { c_@@_name_ ##1 _ \g_@@_lang_tl _tl } } } } % \end{macrocode} % % \pkg{amsthm} 会定义 \tn{openbox},为é¿å…与一些å®åŒ…冲çªï¼Œ % 我们先ä¿å˜ \tn{openbox},然åŽå–消定义。 % \begin{macrocode} \ctex_at_begin_package:nn { amsthm } { \cs_if_exist:NT \openbox { \cs_new_eq:NN \SJTU@orig@openbox \openbox \cs_undefine:N \openbox } } \ctex_at_end_package:nn { amsthm } { \@@_cs_provide_eq:NN \QED \openbox \cs_if_exist:NT \SJTU@orig@openbox { \cs_set_eq:NN \openbox \SJTU@orig@openbox } \tl_set:Nn \qedsymbol { \ensuremath { \QED } } \RenewDocumentEnvironment { proof } { O{ \proofname } } { \par \pushQED { \qed } \SJTU@style@thm@body@font \dim_zero:N \topsep \trivlist \item [ \skip_horizontal:N \labelsep \SJTU@style@thm@header@font #1 \@addpunct { \enskip } ] \ignorespaces } { \popQED \endtrivlist \@endpefalse } \newtheoremstyle { sjtu } { } { } { \SJTU@style@thm@body@font } { } { \SJTU@style@thm@header@font } { } { \ccwd } { } \@@_disable_package_load:n { ntheorem } \ctex_at_end_preamble:n { \theoremstyle { sjtu } \@@_new_theorems: } } % \end{macrocode} % % \pkg{ntheorem} å®åŒ…。 % \begin{macrocode} \ctex_at_end_package:nn { ntheorem } { \@@_disable_package_load:n { amsthm } \ctex_at_end_preamble:n { \@@_cs_provide_eq:NN \QED \c_empty_tl \theoremheaderfont { \SJTU@style@thm@header@font } \theorembodyfont { \SJTU@style@thm@body@font } \theoremseparator { \enskip } \theoremsymbol { \ensuremath { \QED } } \qedsymbol { \ensuremath { \QED } } \cs_if_exist:NF \proof { \newtheorem* { proof } { \proofname } } \theoremsymbol { } \@@_new_theorems: } } % \end{macrocode} % % \changes{v2.1.1}{2024/03/22}{æ·»åŠ \pkg{thmtools} å®åŒ…支æŒã€‚} % \subsubsection{\pkg{thmtools} å®åŒ…} % % 使用 \pkg{titletoc} 包设置 \tn{listoftheorems} çš„æ ·å¼ã€‚ % \begin{macrocode} \ctex_at_end_package:nn { thmtools } { \cs_set:Npn \thmtlo@newentry { \exp_args:NV \titlecontents \thmt@envname [ \thmt@listnumwidth ] { } { \contentslabel { \thmt@listnumwidth } } { \hspace* { - \thmt@listnumwidth } } { \SJTU@leaders \thecontentspage } \exp_args:NV \contentsuse \thmt@envname { loe } } \cs_set:Npn \thmtlo@chaptervspacehack { } \RenewDocumentCommand \listoftheorems { O{ } } { \group_begin: \tl_set_eq:NN \l_@@_heading_marking_tl \c_novalue_tl \keys_set_groups:nnnN { sjtu / private } { heading } { title = \listtheoremname, #1 } \l_@@_tmp_tl \tl_set_rescan:NnV \l_@@_tmp_tl { } \l_@@_tmp_tl \@@_heading:VV \l_@@_heading_marking_tl \l_@@_heading_title_tl \exp_args:No \setlisttheoremstyle { \l_@@_tmp_tl } \cs_set:Npn \contentsline ##1 { \use:c { thmt@contentsline@ ##1 } {##1} } \clist_map_inline:Nn \thmt@allenvs { \tl_set:Nn \thmt@envname {##1} \thmtlo@newentry } \@fileswfalse \AddToHook { enddocument / afterlastpage } { \if@filesw \@ifundefined { tf@loe } { \expandafter\newwrite\csname tf@loe\endcsname \immediate\openout \csname tf@loe\endcsname \jobname.loe\relax } { } \fi } \@starttoc { loe } \group_end: } } % \end{macrocode} % % \subsubsection{\pkg{algorithm} å®åŒ…å’Œ \pkg{algorithm2e} å®åŒ…} % % \pkg{algorithm} å®åŒ…。 % \begin{macrocode} \ctex_at_end_package:nn { algorithm } { \tl_set:Nn \fname@algorithm { \SJTU@algorithmname } \tl_set:Nn \listalgorithmname { \SJTU@listalgorithmname } %<!article> \SJTU@counterwithin { algorithm } { chapter } %<thesis> \clist_put_right:Nn \l_@@_counter_without_chapter_clist { algorithm } \@@_new_list_of:Nnnn \listofalgorithms { algorithm } { \fname@algorithm } { \listalgorithmname } } % \end{macrocode} % % \pkg{algorithm2e} å®åŒ…。 % \begin{macrocode} %<!article>\ctex_at_begin_package:nn { algorithm2e } %<!article> { \cs_set_eq:NN \SJTU@orig@at@chapter \@chapter } \ctex_at_end_package:nn { algorithm2e } { %<!article> \cs_set_eq:NN \@chapter \SJTU@orig@at@chapter \SetAlgorithmName { \SJTU@algorithmname } { \SJTU@algorithmname } { \SJTU@listalgorithmname } \SetAlgoCaptionSeparator { \enskip } %<!article> \SJTU@counterwithin { algocf } { chapter } %<thesis> \clist_put_right:Nn \l_@@_counter_without_chapter_clist { algocf } \@@_new_list_of:Nnnn \listofalgorithms { algocf } { \algorithmcfname } { \listalgorithmcfname } \ctex_patch_cmd:Nnn \algocf@latexcaption { \addcontentsline } { \caption@iflist { \addcontentsline } { \@gobblethree } } } % \end{macrocode} % % \subsubsection{\pkg{nomencl} å®åŒ…} % \begin{macrocode} \ctex_at_end_package:nn { nomencl } { \tl_set:Nn \nomname { \SJTU@nomname } } % \end{macrocode} % % \changes{v2.0.3}{2023/09/25}{æ·»åŠ \pkg{siunitx} 本地化支æŒã€‚} % \subsubsection{\pkg{translations} å®åŒ…} % \begin{macrocode} \ctex_at_end_package:nn { translations } { \DeclareLanguage { chinese } \DeclareLanguageAlias { Chinese } { chinese } } % \end{macrocode} % % \subsubsection{\pkg{siunitx} å®åŒ…} % \begin{macrocode} \ctex_at_end_package:nn { siunitx } { \RequirePackage { translations } \DeclareTranslation { Chinese } { and } { å’Œ } \DeclareTranslation { Japanese } { and } { 㨠} \DeclareTranslation { Chinese } { to~(numerical~range) } { \textasciitilde } \DeclareTranslation { Japanese } { to~(numerical~range) } { \textasciitilde } \IfPackageAtLeastTF { siunitx } { 2021/05/17 } { } { \DeclareTranslation { English } { to~(numerical~range) } { to } \DeclareTranslation { German } { to~(numerical~range) } { bis } \keys_set:nn { siunitx } { list-final-separator = { \ifmmode \ \else \space \fi \text { \GetTranslation { and } } \ifmmode \ \else \space \fi } , list-pair-separator = { \ifmmode \ \else \space \fi \text { \GetTranslation { and } } \ifmmode \ \else \space \fi } , range-phrase = { \ifmmode \ \else \space \fi \text { \GetTranslation { to~(numerical~range) } } \ifmmode \ \else \space \fi } } } } %</class> % \end{macrocode} % % \end{implementation} % % \Finale % \endinput