diff --git a/.gitattributes b/.gitattributes index acad8a88..6954a1b2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,5 +13,3 @@ /.github export-ignore .gitattributes export-ignore .gitignore export-ignore -build_v*.sh export-ignore -dev-v2.tex export-ignore diff --git a/.latexmkrc b/.latexmkrc index d331e1ab..116d25ae 100644 --- a/.latexmkrc +++ b/.latexmkrc @@ -9,15 +9,13 @@ $ENV{'TZ'}='Asia/Shanghai'; # Ensure './texmf//' is in '$TEXINPUTS'. ensure_path( 'TEXINPUTS', './texmf//' ); -# Use lualatex with latexmk. -# $pdf_mode = 4; - -# Use xelatex with latexmk. +# PDF generate method +# - 1 pdfTeX +# - 3 LaTeX + DVIPDFMx +# - 4 LuaLaTeX +# - 5 XeLaTeX $pdf_mode = 5; -# Disable postscript and dvi output. -$postscript_mode = $dvi_mode = 0; - # Add common patterns for tex engines. set_tex_cmds( '-synctex=1 %O %S' ); diff --git a/build_v1.sh b/build_v1.sh deleted file mode 100755 index e104c4c7..00000000 --- a/build_v1.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -set -e - -SJTUTEX_DIR="SJTUTeX-v1" - -if [ ! -d "${SJTUTEX_DIR}" ]; then - git clone https://github.com/sjtug/SJTUTeX -b v1 ${SJTUTEX_DIR} -fi - -cd ${SJTUTEX_DIR}/source -xetex -interaction=nonstopmode sjtuthesis.ins -cd ../../ - -rm -rf texmf/tex/latex/sjtuthesis -mkdir texmf/tex/latex/sjtuthesis - -RELEASE_DIR="texmf/tex/latex/sjtuthesis" - -cp ${SJTUTEX_DIR}/source/sjtuthesis.cls ${RELEASE_DIR} -cp ${SJTUTEX_DIR}/source/sjtuthesis-graduate.ltx ${RELEASE_DIR} -cp ${SJTUTEX_DIR}/source/sjtuthesis-undergraduate.ltx ${RELEASE_DIR} -cp -a ${SJTUTEX_DIR}/vi ${RELEASE_DIR} -mkdir -p ${RELEASE_DIR}/fd -cp ${SJTUTEX_DIR}/source/*-font-*.def ${RELEASE_DIR}/fd - -make main.pdf diff --git a/build_v2.sh b/build_v2.sh deleted file mode 100755 index aad9f9e4..00000000 --- a/build_v2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -e - -SJTUTEX_DIR="SJTUTeX-v2" - -if [ ! -d "${SJTUTEX_DIR}" ]; then - git clone https://github.com/sjtug/SJTUTeX -b v2 ${SJTUTEX_DIR} -fi - -cd ${SJTUTEX_DIR} && make generate && cd .. -rm -rf texmf/tex/latex/sjtuthesis -ln -s $(pwd)/${SJTUTEX_DIR}/sjtuthesis/build/unpacked texmf/tex/latex/sjtuthesis - -latexmk dev-v2.tex -xelatex -time -file-line-error -halt-on-error -interaction=nonstopmode diff --git a/contents/floats.tex b/contents/floats.tex index 31b165ee..7ffe6a1a 100644 --- a/contents/floats.tex +++ b/contents/floats.tex @@ -30,13 +30,6 @@ \subsection{单个图形} \label{fig:cn_100t} \end{figure} -Lorem ipsum dolor sit amet, consectetur adipisici elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu -fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. - \subsection{多个图形} 简单插入多个图形的例子如图~\ref{fig:SRR} 所示。这两个水平并列放置的子图共用一个 @@ -69,13 +62,6 @@ \subsection{多个图形} \end{minipage} \end{figure} -Lorem ipsum dolor sit amet, consectetur adipisici elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu -fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. - 如果要为共用一个计数器的多个子图添加子图题,建议使用较新的 \pkg{subcaption}宏 包,不建议使用 \pkg{subfigure} 或 \pkg{subfig} 等宏包。 @@ -83,24 +69,6 @@ \subsection{多个图形} 下,子图号用 a)、b) 等表示。也可以使用 \pkg{subcaption} 宏包的 \cs{subcaption} (放在 minipage中,用法同 \cs{caption})。 -搭配 \pkg{bicaption} 宏包时,可以启用 \cs{subcaptionbox} 和 \cs{subcaption} 的双 -语变种 \cs{bisubcaptionbox} 和 \cs{bisubcaption},如图~\ref{fig:bisubcaptionbox} -所示。 - -\begin{figure}[!hbtp] - \centering - \bisubcaptionbox{$R_3 = 1.5\text{mm}$ 时轴承的压力分布云图}% - {Pressure contour of bearing when $R_3 = 1.5\text{mm}$}% - [6.4cm]{\includegraphics[height=2.5cm]{pressure15.jpg}} - \hspace{1cm} - \bisubcaptionbox{$R_3 = 2.5\text{mm}$ 时轴承的压力分布云图}% - {Pressure contour of bearing when $R_3 = 2.5\text{mm}$}% - [6.4cm]{\includegraphics[height=2.5cm]{/pressure25.jpg}} - \bicaption{包含子图题的范例(使用 subcaptionbox)} - {Example with subcaptionbox} - \label{fig:bisubcaptionbox} -\end{figure} - \pkg{subcaption} 宏包也提供了 \pkg{subfigure} 和 \pkg{subtable} 环境,如 图~\ref{fig:subfigure}。 @@ -121,12 +89,24 @@ \subsection{多个图形} \label{fig:subfigure} \end{figure} -Lorem ipsum dolor sit amet, consectetur adipisici elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu -fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. +搭配 \pkg{bicaption} 宏包时,可以启用 \cs{subcaptionbox} 和 \cs{subcaption} 的双 +语变种 \cs{bisubcaptionbox} 和 \cs{bisubcaption},如图~\ref{fig:bisubcaptionbox} +所示。 + +\begin{figure}[!hbtp] + \centering + \bisubcaptionbox{$R_3 = 1.5\text{mm}$ 时轴承的压力分布云图}% + {Pressure contour of bearing when $R_3 = 1.5\text{mm}$}% + [6.4cm]{\includegraphics[height=3cm]{example-image-a.pdf}} + \hspace{1cm} + \bisubcaptionbox{$R_3 = 2.5\text{mm}$ 时轴承的压力分布云图}% + {Pressure contour of bearing when $R_3 = 2.5\text{mm}$}% + [6.4cm]{\includegraphics[height=3cm]{example-image-b.pdf}} + \bicaption{包含子图题的范例(使用 subcaptionbox)} + {Example with subcaptionbox} + \label{fig:bisubcaptionbox} +\end{figure} + \section{表格} @@ -188,13 +168,6 @@ \subsection{复杂表格} \end{threeparttable} \end{table} -Lorem ipsum dolor sit amet, consectetur adipisici elit, sed do eiusmod tempor -incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis -nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. -Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu -fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in -culpa qui officia deserunt mollit anim id est laborum. - 如某个表需要转页接排,可以用 \pkg{longtable} 实现。接排时表题省略,表头应重复书 写,并在右上方写“续表 xx”,如表~\ref{tab:performance}。 diff --git a/contents/math_and_citations.tex b/contents/math_and_citations.tex index d6d9c50d..fc55b12b 100644 --- a/contents/math_and_citations.tex +++ b/contents/math_and_citations.tex @@ -120,7 +120,7 @@ \subsection{定理环境} \section{引用文献的标注} 按照教务处的要求,参考文献外观应符合国标 GB/T 7714 的要求。模版使用 \BibLaTeX\ -配合 \pkg{biblatex-gb7714-2015} 样式包 +配合 \pkg{biblatex-gb7714-2015} 样式包% \footnote{\url{https://www.ctan.org/pkg/biblatex-gb7714-2015}} 控制参考文献的输出样式,后端采用 \pkg{biber} 管理文献。 diff --git a/contents/nomenclature.tex b/contents/nomenclature.tex index 3ebe74f0..9c478187 100644 --- a/contents/nomenclature.tex +++ b/contents/nomenclature.tex @@ -3,6 +3,8 @@ \begin{nomenclature*} \label{chap:symb} +\sjtusetup{style={float-font=\normalsize}} + \begin{longtable}{rl} $\epsilon$ & 介电常数 \\ $\mu$ & 磁导率 \\ diff --git a/dev-v2.tex b/dev-v2.tex deleted file mode 100644 index 2a336329..00000000 --- a/dev-v2.tex +++ /dev/null @@ -1,203 +0,0 @@ -% !TeX encoding = UTF-8 - -% 这个模版是 SJTUTeX v2 的测试模版。如果您是 SJTUThesis 示例模版的用户,请无视这个文件。 - -% 载入 SJTUThesis 模版 -\documentclass[type=bachelor]{sjtuthesis} - -\title{上海交通大学学位论文 \LaTeX{} 模板示例文档} - -\sjtusetup{ - info = { - title = {上海交通大学学位论文 \LaTeX{} 模板示例文档}, - title* = {A Sample Document for \LaTeX-based SJTU Thesis Template}, - % display-title = {上海交通大学学位论文\\ \LaTeX{} 模板示例文档}, - % display-title* = {A Sample Document \\ for \LaTeX-based SJTU Thesis Template}, - % running-title = {示例文档}, - % running-title* = {Sample Document}, - keywords = {上海交大, 饮水思源, 爱国荣校}, - keywords* = {SJTU, master thesis, XeTeX/LaTeX template}, - author = {某\quad{}某}, - author* = {Mo Mo}, - supervisor = {某某教授}, - supervisor* = {Prof. Mou Mou}, - assoc-supervisor = {某某教授}, - assoc-supervisor* = {Prof. Uom Uom}, - id = {0010900990}, - degree = {工学硕士}, - degree* = {Master of Engineering}, - major = {某某专业}, - major* = {A Very Important Major}, - department = {某某系}, - department* = {Depart of XXX}, - }, - style = { - header-logo-color = blue, - title-logo-color = blue, - }, -} - -% 使用 BibLaTeX 处理参考文献 -% biblatex-gb7714-2015 常用选项 -% gbnamefmt=lowercase 姓名大小写由输入信息确定 -% gbpub=false 禁用出版信息缺失处理 -\usepackage[backend=biber,style=gb7714-2015]{biblatex} -% 文献表字体 -% \renewcommand{\bibfont}{\zihao{-5}} -% 文献表条目间的间距 -\setlength{\bibitemsep}{0pt} -% 导入参考文献数据库 -\addbibresource{bibdata/thesis.bib} - -% 定义图片文件目录与扩展名 -\graphicspath{{figures/}} -\DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.jpeg} - -% 确定浮动对象的位置,可以使用 [H],强制将浮动对象放到这里(可能效果很差) -% \usepackage{float} - -% 固定宽度的表格 -% \usepackage{tabularx} - -% 表格中支持跨行 -\usepackage{multirow} - -% 表格中数字按小数点对齐 -\usepackage{dcolumn} -\newcolumntype{d}[1]{D{.}{.}{#1}} - -% 使用长表格 -\usepackage{longtable} - -% 附带脚注的表格 -\usepackage{threeparttable} - -% 附带脚注的长表格 -\usepackage{threeparttablex} - -% 使用三线表:toprule,midrule,bottomrule。 -\usepackage{booktabs} - -% 算法环境宏包 -\usepackage[ruled,vlined,linesnumbered]{algorithm2e} -% \usepackage{algorithm, algorithmicx, algpseudocode} - -% 代码环境宏包 -\usepackage{listings} -\lstnewenvironment{codeblock}[1][]% - {\lstset{style=lstStyleCode,#1}}{} - -% 物理科学和技术中使用的数学符号,定义了 \qty 命令,与 siunitx 3.0 有冲突 -% \usepackage{physics} - -% 直立体数学符号 -\newcommand{\dd}{\mathop{}\!\mathrm{d}} -\newcommand{\ee}{\mathrm{e}} -\newcommand{\ii}{\mathrm{i}} -\newcommand{\jj}{\mathrm{j}} - -% 国际单位制宏包 -\usepackage{siunitx}[=v2] - -% 定理环境宏包 -\usepackage{ntheorem} -% \usepackage{amsthm} - -% 绘图宏包 -\usepackage{tikz} -\usetikzlibrary{shapes.geometric, arrows} - -% 一些文档中用到的 logo -\usepackage{hologo} -\newcommand{\XeTeX}{\hologo{XeTeX}} -\newcommand{\BibLaTeX}{\textsc{Bib}\LaTeX} - -% 借用 ltxdoc 里面的几个命令方便写文档 -\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}} -\providecommand\pkg[1]{{\sffamily#1}} - -% 自定义命令 - -% E-mail -\newcommand{\email}[1]{\href{mailto:#1}{\texttt{#1}}} - -% hyperref 宏包在最后调用 -\usepackage{hyperref} - -\begin{document} - -%TC:ignore - -% 标题页 -\maketitle - -% 原创性声明及使用授权书 -% \copyrightpage -% 插入外置原创性声明及使用授权书 -% \copyrightpage[scans/sample-copyright-old.pdf] - -% 前置部分 -\frontmatter - -% 摘要 -\input{contents/abstract} - -% 目录 -\tableofcontents -% 插图索引 -\listoffigures* -% 表格索引 -\listoftables* -% 算法索引 -\listofalgorithms* - -% 符号对照表 -\input{contents/nomenclature} - -%TC:endignore - -% 主体部分 -\mainmatter - -% 正文内容 -\input{contents/intro} -\input{contents/math_and_citations} -\input{contents/floats} -\input{contents/summary} - -%TC:ignore - -% 参考文献 -\printbibliography[heading=bibintoc] - -% 附录 -\appendix - -% 附录中图表不加入索引 -\captionsetup{list=no} - -% 附录内容 -\input{contents/app_maxwell_equations} -\input{contents/app_flow_chart} - -% 结尾部分 -\backmatter - -% 用于盲审的论文需隐去致谢、发表论文、科研成果、简历 - -% 致谢 -\input{contents/acknowledgements} - -% 发表论文、科研成果 -% 盲审论文中,发表论文及科研成果等仅以第几作者注明即可,不要出现作者或他人姓名 -\input{contents/achievements} - -% 简历 -\input{contents/resume} - -% 学士学位论文要求在最后有一个大摘要,单独编页码 -\input{contents/digest} - -%TC:endignore - -\end{document} diff --git a/figures/pressure15.jpg b/figures/pressure15.jpg deleted file mode 100644 index cf8f2375..00000000 Binary files a/figures/pressure15.jpg and /dev/null differ diff --git a/figures/pressure25.jpg b/figures/pressure25.jpg deleted file mode 100644 index 196631b6..00000000 Binary files a/figures/pressure25.jpg and /dev/null differ diff --git a/setup.tex b/setup.tex index 281a6a3f..64f4923d 100644 --- a/setup.tex +++ b/setup.tex @@ -45,8 +45,8 @@ % % 副指导教师 % - % assisupervisor = {某某教授}, - % assisupervisor* = {Prof. Uom Uom}, + % assoc-supervisor = {某某教授}, + % assoc-supervisor* = {Prof. Uom Uom}, % % 学号 % @@ -68,11 +68,6 @@ department = {某某系}, department* = {Depart of XXX}, % - % 课程名称 - % 仅课程论文适用 - % - course = {某某课程}, - % % 答辩日期 % 使用 ISO 格式 (yyyy-mm-dd);默认为当前时间 % @@ -120,6 +115,9 @@ % 导入参考文献数据库 \addbibresource{bibdata/thesis.bib} +% 脚注格式 +\usepackage[perpage,bottom,hang]{footmisc} + % 定义图片文件目录与扩展名 \graphicspath{{figures/}} \DeclareGraphicsExtensions{.pdf,.eps,.png,.jpg,.jpeg} diff --git a/texmf/tex/latex/sjtutex/config/sjtu-lang-article-en.cfg b/texmf/tex/latex/sjtutex/config/sjtu-lang-article-en.cfg new file mode 100644 index 00000000..1262078b --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-lang-article-en.cfg @@ -0,0 +1,63 @@ +%% +%% This is file `sjtu-lang-article-en.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `lang,article,en') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {SJTUArticle English config (SJTUTeX)} +\ProvidesExplFile{sjtu-lang-article-en.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\clist_map_inline:nn + { + { 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 } , + } + { \__sjtu_define_name_g:nn #1 } +\endinput +%% +%% End of file `sjtu-lang-article-en.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-lang-article-zh.cfg b/texmf/tex/latex/sjtutex/config/sjtu-lang-article-zh.cfg new file mode 100644 index 00000000..2e9a1781 --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-lang-article-zh.cfg @@ -0,0 +1,80 @@ +%% +%% This is file `sjtu-lang-article-zh.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `lang,article,zh') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {SJTUArticle Chinese config (SJTUTeX)} +\ProvidesExplFile{sjtu-lang-article-zh.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\keys_set_known:nn { sjtu / name } + { + contents = 目 \quad 录 , + listfigure = 插 \quad 图 , + listtable = 表 \quad 格 , + figure = 图 , + table = 表 , + abstract = 摘 \quad 要 , + index = 索 \quad 引 , + appendix = 附录 , + proof = 证明 , + bib = 参考文献 , + figure* = Figure , + table* = Table , + algorithm = 算法 , + listalgorithm = 算 \quad 法 , + } +\clist_map_inline:nn + { + { assumption } + { 假设 } , + { axiom } + { 公理 } , + { conjecture } + { 猜想 } , + { corollary } + { 推论 } , + { definition } + { 定义 } , + { example } + { 例 } , + { exercise } + { 练习 } , + { lemma } + { 引理 } , + { problem } + { 问题 } , + { proposition } + { 命题 } , + { remark } + { 注 } , + { solution } + { 解 } , + { theorem } + { 定理 } , + } + { \__sjtu_define_name_g:nn #1 } +\endinput +%% +%% End of file `sjtu-lang-article-zh.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-lang-report-en.cfg b/texmf/tex/latex/sjtutex/config/sjtu-lang-report-en.cfg new file mode 100644 index 00000000..b648adcc --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-lang-report-en.cfg @@ -0,0 +1,63 @@ +%% +%% This is file `sjtu-lang-report-en.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `lang,report,en') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {SJTUReport English config (SJTUTeX)} +\ProvidesExplFile{sjtu-lang-report-en.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\clist_map_inline:nn + { + { 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 } , + } + { \__sjtu_define_name_g:nn #1 } +\endinput +%% +%% End of file `sjtu-lang-report-en.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-lang-report-zh.cfg b/texmf/tex/latex/sjtutex/config/sjtu-lang-report-zh.cfg new file mode 100644 index 00000000..964de842 --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-lang-report-zh.cfg @@ -0,0 +1,85 @@ +%% +%% This is file `sjtu-lang-report-zh.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `lang,report,zh') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {SJTUReport Chinese config (SJTUTeX)} +\ProvidesExplFile{sjtu-lang-report-zh.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\keys_set_known:nn { sjtu / name } + { + contents = 目 \quad 录 , + listfigure = 插 \quad 图 , + listtable = 表 \quad 格 , + figure = 图 , + table = 表 , + abstract = 摘 \quad 要 , + index = 索 \quad 引 , + appendix = 附录 , + proof = 证明 , + bib = 参考文献 , + figure* = Figure , + table* = Table , + algorithm = 算法 , + listalgorithm = 算 \quad 法 , + } +\ctex_set:nn { chapter } + { + name = { 第 , 章 } , + number = \chinese { chapter } + } +\clist_map_inline:nn + { + { assumption } + { 假设 } , + { axiom } + { 公理 } , + { conjecture } + { 猜想 } , + { corollary } + { 推论 } , + { definition } + { 定义 } , + { example } + { 例 } , + { exercise } + { 练习 } , + { lemma } + { 引理 } , + { problem } + { 问题 } , + { proposition } + { 命题 } , + { remark } + { 注 } , + { solution } + { 解 } , + { theorem } + { 定理 } , + } + { \__sjtu_define_name_g:nn #1 } +\endinput +%% +%% End of file `sjtu-lang-report-zh.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-lang-thesis-en.cfg b/texmf/tex/latex/sjtutex/config/sjtu-lang-thesis-en.cfg new file mode 100644 index 00000000..fa60187e --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-lang-thesis-en.cfg @@ -0,0 +1,63 @@ +%% +%% This is file `sjtu-lang-thesis-en.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `lang,thesis,en') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {SJTUThesis English config (SJTUTeX)} +\ProvidesExplFile{sjtu-lang-thesis-en.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\clist_map_inline:nn + { + { 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 } , + } + { \__sjtu_define_name_g:nn #1 } +\endinput +%% +%% End of file `sjtu-lang-thesis-en.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-lang-thesis-zh.cfg b/texmf/tex/latex/sjtutex/config/sjtu-lang-thesis-zh.cfg new file mode 100644 index 00000000..c8be36b7 --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-lang-thesis-zh.cfg @@ -0,0 +1,91 @@ +%% +%% This is file `sjtu-lang-thesis-zh.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `lang,thesis,zh') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {SJTUThesis Chinese config (SJTUTeX)} +\ProvidesExplFile{sjtu-lang-thesis-zh.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\keys_set_known:nn { sjtu / name } + { + contents = 目 \quad 录 , + listfigure = 插 \quad 图 , + listtable = 表 \quad 格 , + figure = 图 , + table = 表 , + index = 索 \quad 引 , + appendix = 附录 , + proof = 证明 , + bib = 参考文献 , + figure* = Figure , + table* = Table , + algorithm = 算法 , + listalgorithm = 算 \quad 法 , + abbr = 缩略语对照表 , + nom = 符号对照表 , + summary = 全文总结 , + ack = 致 \quad 谢 , + resume = 个人简历 , + digest = 大摘要 , + achv = 学术论文和科研成果目录 + } +\ctex_set:nn { chapter } + { + name = { 第 , 章 } , + number = \chinese { chapter } + } +\clist_map_inline:nn + { + { assumption } + { 假设 } , + { axiom } + { 公理 } , + { conjecture } + { 猜想 } , + { corollary } + { 推论 } , + { definition } + { 定义 } , + { example } + { 例 } , + { exercise } + { 练习 } , + { lemma } + { 引理 } , + { problem } + { 问题 } , + { proposition } + { 命题 } , + { remark } + { 注 } , + { solution } + { 解 } , + { theorem } + { 定理 } , + } + { \__sjtu_define_name_g:nn #1 } +\endinput +%% +%% End of file `sjtu-lang-thesis-zh.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-name-generic.cfg b/texmf/tex/latex/sjtutex/config/sjtu-name-generic.cfg new file mode 100644 index 00000000..06105ec0 --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-name-generic.cfg @@ -0,0 +1,52 @@ +%% +%% This is file `sjtu-name-generic.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `name,generic') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Generic name config (SJTUTeX)} +\ProvidesExplFile{sjtu-name-generic.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\clist_map_inline:nn + { + { author } { 姓名 } , + { id } { 学号 } , + { supervisor } { 指导教师 } , + { assoc_supervisor } { 副指导教师 } , + { department } { 院系 } , + } + { \__sjtu_define_name:nn #1 } +\clist_map_inline:nn + { + { univ } { 上海交通大学 } { Shanghai~ Jiao~ Tong~ University } , + { address } { 中国 \quad 上海 } { Shanghai,~ P.R.~ China } , + { title_page } { 题名页 } { Title~ Page } , + { keywords } { 关键词: } { Key~words:~ } , + { info_sep } { : } { :~ } , + { item_sep } { , } { ,~ } + } + { \__sjtu_define_name_g:nnn #1 } +\endinput +%% +%% End of file `sjtu-name-generic.cfg'. diff --git a/texmf/tex/latex/sjtutex/config/sjtu-name-thesis.cfg b/texmf/tex/latex/sjtutex/config/sjtu-name-thesis.cfg new file mode 100644 index 00000000..a08735e3 --- /dev/null +++ b/texmf/tex/latex/sjtutex/config/sjtu-name-thesis.cfg @@ -0,0 +1,117 @@ +%% +%% This is file `sjtu-name-thesis.cfg', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `name,thesis') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Name config for thesis template (SJTUTeX)} +\ProvidesExplFile{sjtu-name-thesis.cfg} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_define_symbol:nn { white_square } { "25A1 } +\__sjtu_define_name_from_clist:nNnn { degree_level } + \g__sjtu_thesis_type_int + { 学士 , 硕士 , 博士 } + { Bachelor, Master, Doctor } +\clist_map_inline:nn + { + { id } { 学号 } , + { department } { 院系 } , + { major } { 学科 / 专业 } , + { degree } { 申请学位 } , + { thesis } { 学位论文 } , + { decl_author } { 学位论文作者 } , + { decl_supervisor } { 指导教师 } + } + { \__sjtu_define_name:nn #1 } +\clist_map_inline:nn + { + { author } { 姓名 } { Author } , + { supervisor } { 导师 } { Supervisor } , + { assoc_supervisor } { 副导师 } { Assoc.~ Supervisor } , + { co_supervisor } { 联合导师 } { Co-supervisor } + } + { \__sjtu_define_name:nnn #1 } +\clist_map_inline:nn + { + { univ } { 上海交通大学 } { Shanghai~ Jiao~ Tong~ University } , + { address } { 中国 \quad 上海 } { Shanghai,~ P.R.~ China } , + { title_page } { 题名页 } { Title~ Page } , + { orig_decl } { 原创性声明 } { Statement~ of~ Originality } , + { auth_decl } { 使用授权书 } { Copyright~ Permission } , + { decl } + { + \c__sjtu_name_orig_decl_zh_tl + 及 + \c__sjtu_name_auth_decl_zh_tl + } + { + { \c__sjtu_name_orig_decl_en_tl }~ + and~ + { \c__sjtu_name_auth_decl_en_tl } + } , + { abstract } { 摘 \quad 要 } { Abstract } , + { keywords } { 关键词: } { Key~words:~ } , + { info_sep } { : } { :~ } , + { item_sep } { , } { ,~ } + } + { \__sjtu_define_name_g:nnn #1 } +\tl_const:Nn \c__sjtu_orig_decl_text_zh_tl + { + 本人郑重声明:所呈交的学位论文,是本人在导师的指导下,独立进行研究工 + 作所取得的成果。除文中已经注明引用的内容外,本论文不包含任何其他个人 + 或集体已经发表或撰写过的作品成果。对本文的研究做出重要贡献的个人和集 + 体,均已在文中以明确方式标明。本人完全知晓本声明的法律后果由本人承 + 担。 + } +\tl_const:Nn \c__sjtu_auth_decl_text_zh_tl + { + 本人同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许 + 论文被查阅和借阅。 \par + \vskip 6 bp + \noindent + 本学位论文属于: \par + { \c__sjtu_symbol_white_square_tl } \textbf { 公开论文 } \par + { \c__sjtu_symbol_white_square_tl } \textbf { 内部论文 }, + 保密 { \c__sjtu_symbol_white_square_tl }~ 1~ 年 / + { \c__sjtu_symbol_white_square_tl }~ 2~ 年 / + { \c__sjtu_symbol_white_square_tl }~ 3~ 年, + 过保密期后适用本授权书。 \par + { \c__sjtu_symbol_white_square_tl } \textbf { 秘密论文 }, + 保密 \underline { \hspace { 2 em } } 年(不超过~ 10~ 年), + 过保密期后适用本授权书。 \par + { \c__sjtu_symbol_white_square_tl } \textbf { 机密论文 }, + 保密 \underline { \hspace { 2 em } } 年(不超过~ 20~ 年), + 过保密期后适用本授权书。 \par + \hspace { 6 em }(请在以上方框内选择打“ \ensuremath { \checkmark } ”) + } +\tl_const:Nn \c__sjtu_signature_text_zh_tl + { + 签名: \\ + 日期: \hspace { \stretch { 3 } } 年 + \hspace { \stretch { 2 } } 月 + \hspace { \stretch { 2 } } 日 + } +\endinput +%% +%% End of file `sjtu-name-thesis.cfg'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-adobe.def b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-adobe.def new file mode 100644 index 00000000..f13b35b1 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-adobe.def @@ -0,0 +1,57 @@ +%% +%% This is file `sjtu-cjk-font-adobe.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `cjkfont,adobe') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Adobe CJK fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-cjk-font-adobe.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nnn + { \__sjtu_fontset_error:nn { cjk } { adobe } } + { + \ctex_load_zhmap:nnnn { zhsong } { zhhei } { zhfs } { adobe } + \ctex_punct_set:n { adobe } + \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } + \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } + \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } + } + { + \setCJKmainfont { AdobeSongStd-Light } + [ AutoFakeBold = 3, ItalicFont = AdobeKaitiStd-Regular ] + \setCJKsansfont { AdobeHeitiStd-Regular } [ BoldFont = * ] + \setCJKmonofont { AdobeFangsongStd-Regular } + \setCJKfamilyfont { zhsong } { AdobeSongStd-Light } + [ AutoFakeBold = 3, ItalicFont = AdobeKaitiStd-Regular ] + \setCJKfamilyfont { zhhei } { AdobeHeitiStd-Regular } [ BoldFont = * ] + \setCJKfamilyfont { zhfs } { AdobeFangsongStd-Regular } + \setCJKfamilyfont { zhkai } { AdobeKaitiStd-Regular } + } +\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } +\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } +\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } +\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } +\endinput +%% +%% End of file `sjtu-cjk-font-adobe.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-fandol.def b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-fandol.def new file mode 100644 index 00000000..98fd36ff --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-fandol.def @@ -0,0 +1,88 @@ +%% +%% This is file `sjtu-cjk-font-fandol.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `cjkfont,fandol') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Fandol CJK fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-cjk-font-fandol.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nnn + { \__sjtu_fontset_error:nn { cjk } { fandol } } + { + \ctex_load_zhmap:nnnn { zhsong } { zhhei } { zhfs } { fandol } + \ctex_punct_set:n { fandol } + \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } + \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } + \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } + } + { + \setCJKmainfont { FandolSong } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = FandolKai-Regular + ] + \setCJKsansfont { FandolHei } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Regular, + ] + \setCJKmonofont { FandolFang } + [ + Extension = .otf, + UprightFont = *-Regular, + ] + \setCJKfamilyfont { zhsong } { FandolSong } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold + ] + \setCJKfamilyfont { zhhei } { FandolHei } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Regular + ] + \setCJKfamilyfont { zhfs } { FandolFang } + [ + Extension = .otf, + UprightFont = *-Regular + ] + \setCJKfamilyfont { zhkai } { FandolKai } + [ + Extension = .otf, + UprightFont = *-Regular + ] + } +\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } +\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } +\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } +\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } +\endinput +%% +%% End of file `sjtu-cjk-font-fandol.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-founder.def b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-founder.def new file mode 100644 index 00000000..69d92556 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-founder.def @@ -0,0 +1,56 @@ +%% +%% This is file `sjtu-cjk-font-founder.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `cjkfont,founder') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Founder CJK fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-cjk-font-founder.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { + \ctex_load_zhmap:nnnn { zhsong } { zhhei } { zhfs } { founder } + \ctex_punct_set:n { founder } + \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } + \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } + \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } + } + { + \setCJKmainfont { FZShuSong-Z01 } + [ AutoFakeBold = 3, ItalicFont = FZKai-Z03 ] + \setCJKsansfont { FZHei-B01 } [ BoldFont = * ] + \setCJKmonofont { FZFangSong-Z02 } + \setCJKfamilyfont { zhsong } { FZShuSong-Z01 } + [ AutoFakeBold = 3, ItalicFont = FZKai-Z03 ] + \setCJKfamilyfont { zhhei } { FZHei-B01 } [ BoldFont = * ] + \setCJKfamilyfont { zhkai } { FZKai-Z03 } + \setCJKfamilyfont { zhfs } { FZFangSong-Z02 } + } +\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } +\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } +\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } +\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } +\endinput +%% +%% End of file `sjtu-cjk-font-founder.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-mac.def b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-mac.def new file mode 100644 index 00000000..afd0dac2 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-mac.def @@ -0,0 +1,78 @@ +%% +%% This is file `sjtu-cjk-font-mac.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `cjkfont,mac') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {macOS CJK fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-cjk-font-mac.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nnn + { \__sjtu_fontset_error:nn { cjk } { mac } } + { + \ctex_load_zhmap:nnnn { zhsong } { zhhei } { zhfs } { mac } + \ctex_punct_set:n { mac } + \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } + \ctex_punct_map_family:nn { \CJKsfdefault } { zhpf } + \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhpf } + \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } + } + { + \setCJKmainfont { Songti~SC } + [ + UprightFont = *~Light, + BoldFont = *~Bold, + ItalicFont = Kaiti~SC~Regular, + BoldItalicFont = Kaiti~SC~Bold + ] + \setCJKsansfont { Heiti~SC } + [ + UprightFont = *~Medium, + BoldFont = *~Medium + ] + \setCJKmonofont { STFangsong } + \setCJKfamilyfont { zhsong } { Songti~SC } + [ + UprightFont = *~Light, + BoldFont = *~Bold + ] + \setCJKfamilyfont { zhhei } { Heiti~SC } + [ + UprightFont = *~Medium, + BoldFont = *~Medium + ] + \setCJKfamilyfont { zhfs } { STFangsong } + \setCJKfamilyfont { zhkai } { Kaiti~SC } + [ + UprightFont = *~Regular, + BoldFont = *~Bold + ] + } +\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } +\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } +\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } +\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } +\endinput +%% +%% End of file `sjtu-cjk-font-mac.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-ubuntu.def b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-ubuntu.def new file mode 100644 index 00000000..4ce68959 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-ubuntu.def @@ -0,0 +1,71 @@ +%% +%% This is file `sjtu-cjk-font-ubuntu.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `cjkfont,ubuntu') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Ubuntu CJK fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-cjk-font-ubuntu.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nnn + { \__sjtu_fontset_error:nn { cjk } { ubuntu } } + { + \ctex_load_zhmap:nnnn { zhsong } { zhhei } { zhsong } { ubuntu } + \ctex_punct_set:n { ubuntu } + \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } + \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } + \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } + } + { + \setCJKmainfont { Noto~Serif~CJK~SC } + [ + UprightFont = *~Light, + BoldFont = *~Bold, + ItalicFont = AR~PL~KaitiM~GB + ] + \setCJKsansfont { Noto~Sans~CJK~SC } + [ + UprightFont = *~Medium, + BoldFont = *~Medium + ] + \setCJKmonofont { Noto~Sans~Mono~CJK~SC } + \setCJKfamilyfont { zhsong } { Noto~Serif~CJK~SC } + [ + UprightFont = *~Light, + BoldFont = *~Bold, + ItalicFont = AR~PL~KaitiM~GB + ] + \setCJKfamilyfont { zhhei } { Noto~Sans~CJK~SC } + [ + UprightFont = *~Medium, + BoldFont = *~Medium + ] + \setCJKfamilyfont { zhkai } { AR~PL~KaitiM~GB } + } +\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } +\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } +\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } +\endinput +%% +%% End of file `sjtu-cjk-font-ubuntu.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-windows.def b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-windows.def new file mode 100644 index 00000000..13876e28 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-cjk-font-windows.def @@ -0,0 +1,56 @@ +%% +%% This is file `sjtu-cjk-font-windows.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `cjkfont,windows') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Windows CJK fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-cjk-font-windows.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { + \ctex_load_zhmap:nnnn { zhsong } { zhhei } { zhfs } { windows } + \ctex_punct_set:n { windows } + \ctex_punct_map_family:nn { \CJKrmdefault } { zhsong } + \ctex_punct_map_bfseries:nn { \CJKrmdefault } { zhhei } + \ctex_punct_map_itshape:nn { \CJKrmdefault } { zhkai } + } + { + \setCJKmainfont { SimSun } + [ AutoFakeBold = 3, ItalicFont = KaiTi ] + \setCJKsansfont { SimHei } [ BoldFont = * ] + \setCJKmonofont { FangSong } + \setCJKfamilyfont { zhsong } { SimSun } + [ AutoFakeBold = 3, ItalicFont = KaiTi ] + \setCJKfamilyfont { zhhei } { SimHei } [ BoldFont = * ] + \setCJKfamilyfont { zhkai } { KaiTi } + \setCJKfamilyfont { zhfs } { FangSong } + } +\NewDocumentCommand \songti { } { \CJKfamily { zhsong } } +\NewDocumentCommand \heiti { } { \CJKfamily { zhhei } } +\NewDocumentCommand \fangsong { } { \CJKfamily { zhfs } } +\NewDocumentCommand \kaishu { } { \CJKfamily { zhkai } } +\endinput +%% +%% End of file `sjtu-cjk-font-windows.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-cambria.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-cambria.def new file mode 100644 index 00000000..3491aabf --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-cambria.def @@ -0,0 +1,42 @@ +%% +%% This is file `sjtu-math-font-cambria.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,cambria') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Cambria math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-cambria.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \__sjtu_fontset_error:nn { math } { cambria } } + { + \RequirePackage { unicode-math } + \setmathfont { Cambria~Math } + \setmathrm { Cambria } + \setmathsf { Calibri } + \setmathtt { Consolas } [ Scale = MatchLowercase ] + } +\endinput +%% +%% End of file `sjtu-math-font-cambria.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-lm.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-lm.def new file mode 100644 index 00000000..2c8fa626 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-lm.def @@ -0,0 +1,55 @@ +%% +%% This is file `sjtu-math-font-lm.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,lm') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Latin Modern math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-lm.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\RequirePackage { amssymb, upgreek } +\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 } +\bool_if:NF \g__sjtu_slint_bool + { \RequirePackage { cmupint } } +\RequirePackage { bm } +\__sjtu_set_slanted_greek: +\__sjtu_set_unimath_symbol: +\endinput +%% +%% End of file `sjtu-math-font-lm.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newcm.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newcm.def new file mode 100644 index 00000000..224a2a9a --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newcm.def @@ -0,0 +1,103 @@ +%% +%% This is file `sjtu-math-font-newcm.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,newcm') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {New Computer Modern math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-newcm.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \__sjtu_fontset_error:nn { math } { newcm } } + { + \RequirePackage { unicode-math } + \bool_if:NTF \g__sjtu_slint_bool + { \setmathfont { NewCMMath-Book.otf } } + { + \setmathfont { NewCMMath-Book.otf } + [ StylisticSet = 2 ] + } + \setmathfont { NewCMMath-Book.otf } + [ + range = { scr, bfscr }, + StylisticSet = 1 + ] + \setmathrm + { 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, + BoldSlantedFont = *-Bold, + SlantedFeatures = { FakeSlant = 0.25 }, + BoldSlantedFeatures = { FakeSlant = 0.25 } + ] + \setmathsf + { NewCMSans10 } + [ + Extension = .otf, + SizeFeatures = + { + { + Size = -9, + Font = NewCMSans08-Book, + ItalicFont = NewCMSans08-BookOblique, + }, + { Size = 9- } + }, + UprightFont = *-Book, + BoldFont = *-Bold, + ItalicFont = *-BookOblique, + BoldItalicFont = *-BoldOblique + ] + \setmathtt + { NewCMMono10 } + [ + Extension = .otf, + UprightFont = *-Book, + BoldFont = *-Bold, + ItalicFont = *-BookItalic, + BoldItalicFont = *-BoldOblique, + SlantedFont = *-Book, + SlantedFeatures = { FakeSlant = 0.25 }, + BoldSlantedFont = *-Bold, + BoldSlantedFeatures = { FakeSlant = 0.25 } + ] + } +\endinput +%% +%% End of file `sjtu-math-font-newcm.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newpx.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newpx.def new file mode 100644 index 00000000..27d4648b --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newpx.def @@ -0,0 +1,48 @@ +%% +%% This is file `sjtu-math-font-newpx.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,newpx') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {New PX math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-newpx.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\tl_set_eq:NN \g__sjtu_save_encodingdefault_tl \encodingdefault +\tl_set_eq:NN \g__sjtu_save_rmdefault_tl \rmdefault +\tl_set_eq:NN \g__sjtu_save_sfdefault_tl \sfdefault +\tl_set_eq:NN \g__sjtu_save_ttdefault_tl \ttdefault +\tl_set:Nn \encodingdefault { OT1 } +\tl_set:Nn \rmdefault { zpltlf } +\tl_set:Nn \sfdefault { qhv } +\tl_set:Nn \ttdefault { ntxtt } +\RequirePackage { newpxmath } +\RequirePackage { bm } +\tl_set_eq:NN \encodingdefault \g__sjtu_save_encodingdefault_tl +\tl_set_eq:NN \rmdefault \g__sjtu_save_rmdefault_tl +\tl_set_eq:NN \sfdefault \g__sjtu_save_sfdefault_tl +\tl_set_eq:NN \ttdefault \g__sjtu_save_ttdefault_tl +\__sjtu_set_unimath_symbol: +\endinput +%% +%% End of file `sjtu-math-font-newpx.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newtx.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newtx.def new file mode 100644 index 00000000..62633049 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-newtx.def @@ -0,0 +1,48 @@ +%% +%% This is file `sjtu-math-font-newtx.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,newtx') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {New TX math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-newtx.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\tl_set_eq:NN \g__sjtu_save_encodingdefault_tl \encodingdefault +\tl_set_eq:NN \g__sjtu_save_rmdefault_tl \rmdefault +\tl_set_eq:NN \g__sjtu_save_sfdefault_tl \sfdefault +\tl_set_eq:NN \g__sjtu_save_ttdefault_tl \ttdefault +\tl_set:Nn \encodingdefault { OT1 } +\tl_set:Nn \rmdefault { ntxtlf } +\tl_set:Nn \sfdefault { qhv } +\tl_set:Nn \ttdefault { ntxtt } +\RequirePackage { newtxmath } +\RequirePackage { bm } +\tl_set_eq:NN \encodingdefault \g__sjtu_save_encodingdefault_tl +\tl_set_eq:NN \rmdefault \g__sjtu_save_rmdefault_tl +\tl_set_eq:NN \sfdefault \g__sjtu_save_sfdefault_tl +\tl_set_eq:NN \ttdefault \g__sjtu_save_ttdefault_tl +\__sjtu_set_unimath_symbol: +\endinput +%% +%% End of file `sjtu-math-font-newtx.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-stixtwo.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-stixtwo.def new file mode 100644 index 00000000..0c4a1380 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-stixtwo.def @@ -0,0 +1,82 @@ +%% +%% This is file `sjtu-math-font-stixtwo.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,stixtwo') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {STIX Two math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-stixtwo.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { + \PassOptionsToPackage { notext } { stix2 } + \RequirePackage { upgreek, stix2, bm } + \__sjtu_set_slanted_greek: + } + { + \RequirePackage { unicode-math } + \bool_if:NTF \g__sjtu_slint_bool + { \setmathfont { STIXTwoMath-Regular.otf } } + { + \setmathfont { STIXTwoMath-Regular.otf } + [ StylisticSet = 8 ] + } + \setmathfont { STIXTwoMath-Regular.otf } + [ + range = { scr, bfscr }, + StylisticSet = 1 + ] + \setmathrm + { STIXTwoText } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = *-Italic, + BoldItalicFont = *-BoldItalic + ] + \setmathsf + { texgyreheros } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic + ] + \setmathtt + { texgyrecursor } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff + ] + } +\endinput +%% +%% End of file `sjtu-math-font-stixtwo.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-times.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-times.def new file mode 100644 index 00000000..1ccb75ca --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-times.def @@ -0,0 +1,43 @@ +%% +%% This is file `sjtu-math-font-times.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,times') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Times math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-times.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\RequirePackage { amssymb, upgreek } +\tl_set_eq:NN \g__sjtu_save_rmdefault_tl \rmdefault + \RequirePackage { mathptmx } +\tl_set_eq:NN \rmdefault \g__sjtu_save_rmdefault_tl +\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 } +\RequirePackage { bm } +\__sjtu_set_unimath_symbol: +\endinput +%% +%% End of file `sjtu-math-font-times.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-math-font-xits.def b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-xits.def new file mode 100644 index 00000000..be36a031 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-math-font-xits.def @@ -0,0 +1,88 @@ +%% +%% This is file `sjtu-math-font-xits.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `mathfont,xits') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {XITS math fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-math-font-xits.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \__sjtu_fontset_error:nn { math } { xits } } + { + \RequirePackage { unicode-math } + \bool_if:NTF \g__sjtu_slint_bool + { + \setmathfont { XITSMath-Regular } + [ + Extension = .otf, + BoldFont = XITSMath-Bold, + ] + } + { + \setmathfont { XITSMath-Regular } + [ + Extension = .otf, + BoldFont = XITSMath-Bold, + StylisticSet = 8 + ] + } + \setmathfont { XITSMath-Regular.otf } + [ + range = { cal, bfcal }, + StylisticSet = 1 + ] + \setmathrm + { XITS } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = *-Italic, + BoldItalicFont = *-BoldItalic + ] + \setmathsf + { texgyreheros } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic + ] + \setmathtt + { texgyrecursor } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff + ] + } +\endinput +%% +%% End of file `sjtu-math-font-xits.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-cambria.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-cambria.def new file mode 100644 index 00000000..95bbdf9f --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-cambria.def @@ -0,0 +1,40 @@ +%% +%% This is file `sjtu-text-font-cambria.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,cambria') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Cambria text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-cambria.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \__sjtu_fontset_error:nn { text } { cambria } } + { + \setmainfont { Cambria } + \setsansfont { Calibri } + \setmonofont { Consolas } [ Scale = MatchLowercase ] + } +\endinput +%% +%% End of file `sjtu-text-font-cambria.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-lm.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-lm.def new file mode 100644 index 00000000..53a15f54 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-lm.def @@ -0,0 +1,36 @@ +%% +%% This is file `sjtu-text-font-lm.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,lm') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Latin Modern text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-lm.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\tl_set:Nn \rmdefault { lmr } +\tl_set:Nn \sfdefault { lmss } +\tl_set:Nn \ttdefault { lmtt } +\endinput +%% +%% End of file `sjtu-text-font-lm.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newcm.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newcm.def new file mode 100644 index 00000000..d75ae1a4 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newcm.def @@ -0,0 +1,91 @@ +%% +%% This is file `sjtu-text-font-newcm.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,newcm') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {New Computer Modern text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-newcm.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \__sjtu_fontset_error:nn { text } { newcm } } + { + \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, + BoldSlantedFont = *-Bold, + SlantedFeatures = { FakeSlant = 0.25 }, + BoldSlantedFeatures = { FakeSlant = 0.25 } + ] + \setsansfont + { NewCMSans10 } + [ + Extension = .otf, + SizeFeatures = + { + { + Size = -9, + Font = NewCMSans08-Book, + ItalicFont = NewCMSans08-BookOblique, + }, + { Size = 9- } + }, + UprightFont = *-Book, + BoldFont = *-Bold, + ItalicFont = *-BookOblique, + BoldItalicFont = *-BoldOblique + ] + \setmonofont + { NewCMMono10 } + [ + Extension = .otf, + UprightFont = *-Book, + BoldFont = *-Bold, + ItalicFont = *-BookItalic, + BoldItalicFont = *-BoldOblique, + SlantedFont = *-Book, + SlantedFeatures = { FakeSlant = 0.25 }, + BoldSlantedFont = *-Bold, + BoldSlantedFeatures = { FakeSlant = 0.25 } + ] + } +\endinput +%% +%% End of file `sjtu-text-font-newcm.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newpx.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newpx.def new file mode 100644 index 00000000..0fcf80c7 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newpx.def @@ -0,0 +1,66 @@ +%% +%% This is file `sjtu-text-font-newpx.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,newpx') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {New PX text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-newpx.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \RequirePackage { newpxtext } } + { + \setmainfont + { TeXGyrePagellaX } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = *-Italic, + BoldItalicFont = *-BoldItalic + ] + \setsansfont + { texgyreheros } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic + ] + \setmonofont + { texgyrecursor } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff + ] + } +\endinput +%% +%% End of file `sjtu-text-font-newpx.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newtx.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newtx.def new file mode 100644 index 00000000..d69505a3 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-newtx.def @@ -0,0 +1,66 @@ +%% +%% This is file `sjtu-text-font-newtx.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,newtx') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {New TX text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-newtx.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \RequirePackage { newtxtext } } + { + \setmainfont + { TeXGyreTermesX } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = *-Italic, + BoldItalicFont = *-BoldItalic + ] + \setsansfont + { texgyreheros } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic + ] + \setmonofont + { texgyrecursor } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff + ] + } +\endinput +%% +%% End of file `sjtu-text-font-newtx.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-stixtwo.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-stixtwo.def new file mode 100644 index 00000000..16667e15 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-stixtwo.def @@ -0,0 +1,70 @@ +%% +%% This is file `sjtu-text-font-stixtwo.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,stixtwo') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {STIX Two text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-stixtwo.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { + \tl_set:Nn \rmdefault { stix2 } + \tl_set:Nn \sfdefault { phv } + \tl_set:Nn \ttdefault { pcr } + } + { + \setmainfont + { STIXTwoText } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = *-Italic, + BoldItalicFont = *-BoldItalic + ] + \setsansfont + { texgyreheros } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic + ] + \setmonofont + { texgyrecursor } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff + ] + } +\endinput +%% +%% End of file `sjtu-text-font-stixtwo.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-times.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-times.def new file mode 100644 index 00000000..d374397a --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-times.def @@ -0,0 +1,44 @@ +%% +%% This is file `sjtu-text-font-times.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,times') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Times text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-times.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { + \tl_set:Nn \rmdefault { ptm } + \tl_set:Nn \sfdefault { phv } + \tl_set:Nn \ttdefault { pcr } + } + { + \setmainfont { Times~New~Roman } [ Ligatures = Rare ] + \setsansfont { Arial } + \setmonofont { Courier~New } [ Scale = MatchLowercase ] + } +\endinput +%% +%% End of file `sjtu-text-font-times.def'. diff --git a/texmf/tex/latex/sjtutex/fd/sjtu-text-font-xits.def b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-xits.def new file mode 100644 index 00000000..0f526b80 --- /dev/null +++ b/texmf/tex/latex/sjtutex/fd/sjtu-text-font-xits.def @@ -0,0 +1,66 @@ +%% +%% This is file `sjtu-text-font-xits.def', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `textfont,xits') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {XITS text fonts definition (SJTUTeX)} +\ProvidesExplFile{sjtu-text-font-xits.def} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\__sjtu_fontset_case:nn + { \__sjtu_fontset_error:nn { text } { xits } } + { + \setmainfont + { XITS } + [ + Extension = .otf, + UprightFont = *-Regular, + BoldFont = *-Bold, + ItalicFont = *-Italic, + BoldItalicFont = *-BoldItalic + ] + \setsansfont + { texgyreheros } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic + ] + \setmonofont + { texgyrecursor } + [ + Extension = .otf, + UprightFont = *-regular, + BoldFont = *-bold, + ItalicFont = *-italic, + BoldItalicFont = *-bolditalic, + Scale = MatchLowercase, + Ligatures = CommonOff + ] + } +\endinput +%% +%% End of file `sjtu-text-font-xits.def'. diff --git a/texmf/tex/latex/sjtutex/sjtuarticle.cls b/texmf/tex/latex/sjtutex/sjtuarticle.cls new file mode 100644 index 00000000..ccef1198 --- /dev/null +++ b/texmf/tex/latex/sjtutex/sjtuarticle.cls @@ -0,0 +1,1348 @@ +%% +%% This is file `sjtuarticle.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `class,article') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{expl3} +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Article template for Shanghai Jiao Tong University} +\ProvidesExplClass{sjtuarticle} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\RequirePackage { xparse, xtemplate } +\msg_new:nnn { sjtutex } { l3-too-old } + { + Package~ "#1"~ is~ too~ old. \\\\ + Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\ + "l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\ + manager~ or~ from~ CTAN. + } +\@ifpackagelater { expl3 } { 2020/04/06 } { } + { \msg_error:nnn { sjtutex } { l3-too-old } {#1} } +\NewDocumentCommand \sjtuthesis { } { SJTU \textsc{ Thesis } } +\bool_new:N \l__sjtu_tmpa_bool +\int_new:N \l__sjtu_tmpa_int +\tl_new:N \l__sjtu_tmpa_tl +\tl_new:N \l__sjtu_tmpb_tl +\clist_new:N \l__sjtu_tmpa_clist +\clist_new:N \l__sjtu_tmpb_clist +\dim_new:N \l__sjtu_tmpa_dim +\dim_new:N \l__sjtu_tmpb_dim +\skip_new:N \l__sjtu_tmpa_skip +\box_new:N \l__sjtu_tmpa_box +\tl_new:N \g__sjtu_lang_tl +\tl_new:N \g__sjtu_lang_aux_tl +\tl_set:Nn \g__sjtu_lang_aux_tl { zh } +\tl_new:N \g__sjtu_zihao_tl +\dim_new:N \g__sjtu_font_size_dim +\dim_new:N \g__sjtu_line_skip_dim +\dim_new:N \g__sjtu_default_line_skip_dim +\fp_new:N \g__sjtu_line_spread_fp +\tl_new:N \g__sjtu_text_font_tl +\tl_new:N \g__sjtu_math_font_tl +\tl_new:N \g__sjtu_cjk_font_tl +\tl_new:N \g__sjtu_save_encodingdefault_tl +\tl_new:N \g__sjtu_save_rmdefault_tl +\tl_new:N \g__sjtu_save_sfdefault_tl +\tl_new:N \g__sjtu_save_ttdefault_tl +\int_new:N \g__sjtu_math_style_int +\bool_new:N \g__sjtu_intlimits_bool +\bool_set_false:N \g__sjtu_intlimits_bool +\bool_new:N \g__sjtu_slint_bool +\bool_set_false:N \g__sjtu_slint_bool +\clist_new:N \g__sjtu_options_to_ctex_class_clist +\clist_set:Nn \g__sjtu_options_to_ctex_class_clist + { UTF8, scheme = plain, fontset = none } +\clist_new:N \g__sjtu_options_to_packages_clist +\bool_new:N \g__sjtu_twoside_bool +\bool_set_false:N \g__sjtu_twoside_bool +\bool_new:N \g__sjtu_titlepage_bool +\bool_set_false:N \g__sjtu_titlepage_bool +\bool_new:N \g__sjtu_draft_bool +\keys_define:nn { sjtu / option } + { + lang .choice: , + lang .value_required:n = true , + lang .choices:nn = + { zh, en } + { + \tl_gset_eq:NN \g__sjtu_lang_tl \l_keys_choice_tl + \int_compare:nNnT { \l_keys_choice_int } = { 1 } + { \tl_gset:Nn \g__sjtu_lang_aux_tl { en } } + } , + lang .initial:n = { zh } , + zihao .choice: , + zihao .value_required:n = true , + zihao / -4 .code:n = + { + \tl_gset:Nn \g__sjtu_zihao_tl { -4 } + \dim_gset:Nn \g__sjtu_font_size_dim { 12 bp } + \dim_gset:Nn \g__sjtu_default_line_skip_dim { 20 bp } + } , + zihao / 5 .code:n = + { + \tl_gset:Nn \g__sjtu_zihao_tl { 5 } + \dim_gset:Nn \g__sjtu_font_size_dim { 10.5 bp } + \dim_gset:Nn \g__sjtu_default_line_skip_dim { 15.6 bp } + } , + zihao .initial:n = { 5 } , + lineskip .dim_gset:N = \g__sjtu_line_skip_dim , + text-font .tl_gset:N = \g__sjtu_text_font_tl , + text-font .initial:n = { newtx } , + math-font .tl_gset:N = \g__sjtu_math_font_tl , + cjk-font .tl_gset:N = \g__sjtu_cjk_font_tl , + math-style .choice: , + math-style .value_required: n = true, + math-style .choices:nn = + { TeX, ISO, GB } + { \int_gset_eq:NN \g__sjtu_math_style_int \l_keys_choice_int } , + math-style .initial:n = { TeX } , + nointlimits .value_forbidden:n = true, + intlimits .value_forbidden:n = true, + nointlimits .code:n = + { \bool_set_false:N \g__sjtu_intlimits_bool }, + intlimits .code:n = + { \bool_set_true:N \g__sjtu_intlimits_bool }, + upint .value_forbidden:n = true, + slint .value_forbidden:n = true, + upint .code:n = + { \bool_set_false:N \g__sjtu_slint_bool }, + slint .code:n = + { \bool_set_true:N \g__sjtu_slint_bool }, + oneside .value_forbidden:n = true, + twoside .value_forbidden:n = true, + oneside .code:n = + { \bool_set_false:N \g__sjtu_twoside_bool } , + twoside .code:n = + { \bool_set_true:N \g__sjtu_twoside_bool } , + titlepage .value_forbidden:n = true, + notitlepage .value_forbidden:n = true, + titlepage .code:n = + { \bool_set_true:N \g__sjtu_titlepage_bool } , + notitlepage .code:n = + { \bool_set_false:N \g__sjtu_titlepage_bool } , + draft .value_forbidden:n = true, + final .value_forbidden:n = true, + draft .code:n = + { \bool_set_true:N \g__sjtu_draft_bool }, + final .code:n = + { \bool_set_false:N \g__sjtu_draft_bool }, + unknown .code:n = { \msg_error:nn { sjtutex } { unknown-option } } + } +\msg_new:nnn { sjtutex } { unknown-option } + { Class~ option~ "\l_keys_key_tl"~ is~ unknown. } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ sjtu / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { sjtu / option } + } +\dim_compare:nNnT \g__sjtu_line_skip_dim < \g__sjtu_font_size_dim + { \dim_set_eq:NN \g__sjtu_line_skip_dim \g__sjtu_default_line_skip_dim } +\fp_set:Nn \g__sjtu_line_spread_fp + { \dim_ratio:nn { \g__sjtu_line_skip_dim } { \g__sjtu_font_size_dim } / 1.2 } +\clist_put_right:Nx \g__sjtu_options_to_ctex_class_clist + { + zihao = \g__sjtu_zihao_tl , + linespread = \fp_use:N \g__sjtu_line_spread_fp , + \bool_if:NTF \g__sjtu_twoside_bool + { twoside } { oneside } , + \bool_if:NTF \g__sjtu_titlepage_bool + { titlepage } { notitlepage } , + \bool_if:NTF \g__sjtu_draft_bool + { draft } { final } + } +\exp_args:No \PassOptionsToClass + { \g__sjtu_options_to_ctex_class_clist } + { ctexart } +\clist_set:Nn \g__sjtu_options_to_packages_clist + { + { no-math } { fontspec }, + { titles } { tocloft }, + { perpage, bottom } { footmisc }, + { list = off } { bicaption }, + { warnings-off = + { + mathtools-overbracket, + mathtools-colon + } + } { unicode-math }, + { amsmath, thmmarks } { ntheorem }, + } +\int_compare:nNnT { \g__sjtu_math_style_int } > { 1 } + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { slantedGreek } { newtxmath }, + { slantedGreek } { newpxmath }, + { slantedGreek } { mathptmx } + } + } +\bool_if:NTF \g__sjtu_intlimits_bool + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { intlimits } { amsmath }, + { displaylimits } { cmupint } + } + } + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { nointlimits } { amsmath }, + { nolimits } { cmupint } + } + } +\bool_if:NF \g__sjtu_slint_bool + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { upint } { newtxmath }, + { upint } { newpxmath }, + { upint } { stix2 } + } + } +\clist_map_inline:Nn \g__sjtu_options_to_packages_clist + { \PassOptionsToPackage #1 } +\LoadClass { ctexart } +\RequirePackage + { + mathtools, + geometry, + fancyhdr, + tocloft, + caption, + bicaption, + subcaption, + xcolor, + graphicx, + enumitem + } +\cs_generate_variant:Nn \tl_const:Nn { co, Nv } +\cs_generate_variant:Nn \cs_gset:Npn { cpo } +\prg_generate_conditional_variant:Nnn \regex_match:nn { ne } { T } +\exp_args_generate:n { Nnv } +\cs_new:Npx \__sjtu_engine_case:nn #1#2 + { + \bool_lazy_or:nnTF + { \sys_if_engine_xetex_p: } + { \sys_if_engine_luatex_p: } + {#2} + { \sys_if_engine_pdftex:T {#1} } + } +\cs_new:Npx \__sjtu_engine_case:nnn #1#2#3 + { + \sys_if_engine_xetex:TF + {#2} + { + \sys_if_engine_luatex:TF + {#3} + { \sys_if_engine_pdftex:T {#1} } + } + } +\cs_new:Npx \__sjtu_unicode_engine_case:nn #1#2 + { + \sys_if_engine_xetex:TF + {#1} + { \sys_if_engine_luatex:T {#2} } + } +\__sjtu_engine_case:nn + { + \cs_new:Npn \__sjtu_unicode_char:n #1 + { + \Unicode + { \int_div_truncate:nn {#1} { 256 } } + { \int_mod:nn {#1} { 256 } } + } + } + { \cs_new:Npn \__sjtu_unicode_char:n #1 { \tex_Uchar:D #1 \scan_stop: } } +\cs_new_protected:Npn \__sjtu_preto_cmd:Nn #1#2 + { + \ctex_preto_cmd:NnnTF #1 { } {#2} + { } { \ctex_patch_failure:N #1 } + } +\cs_new_protected:Npn \__sjtu_appto_cmd:Nn #1#2 + { + \ctex_appto_cmd:NnnTF #1 { } {#2} + { } { \ctex_patch_failure:N #1 } + } +\cs_new:Npn \__sjtu_fixed_line_skip:n #1 + { + \exp_args:Nx \linespread + { \fp_to_decimal:n { \dim_ratio:nn { #1 } { \f@size pt } / 1.2 } } + \selectfont + } +\NewDocumentCommand \fixedlineskip { m } + { \exp_args:Nx \__sjtu_fixed_line_skip:n {#1} \tex_ignorespaces:D } +\cs_new:Npn \__sjtu_dim_set_to_wd:Nn #1#2 + { + \hbox_set:Nn \l__sjtu_tmpa_box {#2} + \dim_set:Nn #1 { \box_wd:N \l__sjtu_tmpa_box } + } +\cs_new:Npn \__sjtu_dim_add_to_wd:Nn #1#2 + { + \hbox_set:Nn \l__sjtu_tmpa_box {#2} + \dim_add:Nn #1 { \box_wd:N \l__sjtu_tmpa_box } + } +\cs_generate_variant:Nn \__sjtu_dim_set_to_wd:Nn { Nv } +\cs_generate_variant:Nn \__sjtu_dim_add_to_wd:Nn { cv } +\cs_new_protected:Npn \__sjtu_vspace:N #1 + { + \skip_vertical:N #1 + \skip_vertical:N \c_zero_skip + } +\cs_new_protected:Npn \__sjtu_vspace:n #1 + { + \skip_set:Nn \l__sjtu_tmpa_skip {#1} + \__sjtu_vspace:N \l__sjtu_tmpa_skip + } +\cs_new_protected:Npn \__sjtu_vspace_r:N #1 + { + \dim_set_eq:NN \l__sjtu_tmpa_dim \prevdepth + \hrule height \c_zero_dim + \nobreak + \skip_vertical:N #1 + \skip_vertical:N \c_zero_skip + \dim_set_eq:NN \prevdepth \l__sjtu_tmpa_dim + } +\cs_new_protected:Npn \__sjtu_vspace_r:n #1 + { + \skip_set:Nn \l__sjtu_tmpa_skip {#1} + \__sjtu_vspace_r:N \l__sjtu_tmpa_skip + } +\__sjtu_engine_case:nnn + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \bool_set_false:N \l__sjtu_tmpa_bool + \cs_set_eq:NN \SJTU@CJK@filltwosidesSymbol \CJKsymbol + \cs_set:Npn \CJKsymbol ##1 + { + \bool_if:NTF \l__sjtu_tmpa_bool + { \hfil \SJTU@CJK@filltwosidesSymbol { ##1 } } + { + \SJTU@CJK@filltwosidesSymbol { ##1 } + \bool_set_true:N \l__sjtu_tmpa_bool + } + } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \cs_set:Npn \CJKglue + { \skip_horizontal:n { \c_zero_dim plus 1 filll } } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \ltjsetparameter { kanjiskip = { \c_zero_dim plus 1 filll } } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } +\cs_new_protected:Npn \__sjtu_left_aligned_box:nn #1#2 + { + \mode_leave_vertical: + \hbox_to_wd:nn {#1} { #2 \hfil } + } +\cs_new_protected:Npn \__sjtu_define_name:nn #1#2 + { \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} } +\cs_new_protected:Npn \__sjtu_define_name:nnn #1#2#3 + { + \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} + \tl_const:cn { c__sjtu_name_ #1 _en_tl } {#3} + } +\cs_new_protected:Npn \__sjtu_define_name_g:nn #1#2 + { \tl_const:cn { c__sjtu_name_ #1 _tl } {#2} } +\cs_new_protected:Npn \__sjtu_define_name_g:nnn #1#2#3 + { + \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} + \tl_const:cn { c__sjtu_name_ #1 _en_tl } {#3} + \tl_gset_eq:cc + { c__sjtu_name_ #1 _tl } + { c__sjtu_name_ #1 _ \g__sjtu_lang_tl _tl } + } +\cs_new_protected:Npn \__sjtu_define_name_from_clist:nNnn #1#2#3#4 + { + \tl_const:cx { c__sjtu_name_ #1 _zh_tl } + { \clist_item:nn {#3} {#2} } + \tl_const:cx { c__sjtu_name_ #1 _en_tl } + { \clist_item:nn {#4} {#2} } + } +\cs_new_protected:Npn \__sjtu_define_symbol:nn #1#2 + { \tl_const:co { c__sjtu_symbol_ #1 _tl } { \__sjtu_unicode_char:n {#2} } } +\cs_new:Npn \__sjtu_date_aux_zh:nnn #1#2#3 + { \__zhnum_date_aux:Nnnnn \int_to_arabic:n { ~ } {#1} {#2} {#3} } +\cs_new:Npn \__sjtu_date_aux_zh:w #1-#2-#3 \q_stop + { \__sjtu_date_aux_zh:nnn {#1} {#2} {#3} } +\clist_const:Nn \c__sjtu_name_month_en_clist + { + January, February, March, April, May, June, + July, August, September, October, November, December + } +\cs_new:Npn \__sjtu_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 } + } + } + } +\cs_new:Npn \__sjtu_date_aux_en:nnn #1#2#3 + { \clist_item:Nn \c__sjtu_name_month_en_clist {#2}~ \__sjtu_ordinal_en:n {#3},~ #1 } +\cs_new:Npn \__sjtu_date_aux_en:w #1-#2-#3 \q_stop + { \__sjtu_date_aux_en:nnn {#1} {#2} {#3} } +\clist_map_inline:nn + { zh, en } + { + \tl_const:cx { c__sjtu_today_ #1 _tl } + { + \use:c { __sjtu_date_aux_ #1 :nnn } + { \int_value:w \tex_year:D } + { \tex_month:D } + { \tex_day:D } + } + } +\tl_const:Nv \c__sjtu_today_tl { c__sjtu_today_ \g__sjtu_lang_tl _tl } +\file_input:n { sjtu-name-generic.cfg } +\NewDocumentCommand \sjtusetup { } { \keys_set:nn { sjtu } } +\keys_define:nn { sjtu } + { + info .meta:nn = { sjtu / info } {#1} , + style .meta:nn = { sjtu / style } {#1} , + name .meta:nn = { sjtu / name } {#1} + } +\clist_map_inline:nn + { + title, display_title, running_title, subject, author, date, + supervisor, assoc_supervisor, department, + } + { + \tl_new:c { l__sjtu_info_ #1 _zh_tl } + } +\tl_new:N \l__sjtu_info_id_zh_tl +\clist_map_inline:nn + { keywords } + { + \clist_new:c { l__sjtu_info_ #1 _zh_clist } + } +\keys_define:nn { sjtu / info } + { + title .code:n = + { + \tl_set:Nn \l__sjtu_info_title_zh_tl {#1} + \clist_map_inline:nn + { + \l__sjtu_info_display_title_zh_tl , + \l__sjtu_info_running_title_zh_tl + } + { \tl_if_empty:NT ##1 { \tl_set:Nn ##1 {#1} } } + } , + display-title .tl_set:N = \l__sjtu_info_display_title_zh_tl , + running-title .tl_set:N = \l__sjtu_info_running_title_zh_tl , + subject .tl_set:N = \l__sjtu_info_subject_zh_tl , + keywords .clist_set:N = \l__sjtu_info_keywords_zh_clist , + author .tl_set:N = \l__sjtu_info_author_zh_tl , + id .tl_set:N = \l__sjtu_info_id_zh_tl , + supervisor .tl_set:N = \l__sjtu_info_supervisor_zh_tl , + assoc-supervisor .tl_set:N = \l__sjtu_info_assoc_supervisor_zh_tl , + department .tl_set:N = \l__sjtu_info_department_zh_tl , + date .code:n = + { + \regex_match:neT { \d{4}-\d{2}-\d{2} } {#1} + { + \tl_set:Nx \l__sjtu_info_date_zh_tl + { \exp_last_unbraced:Ne \__sjtu_date_aux_zh:w #1 \q_stop } + \tl_set:Nx \l__sjtu_info_date_en_tl + { \exp_last_unbraced:Ne \__sjtu_date_aux_en:w #1 \q_stop } + } + } , + display-date .tl_set:N = \l__sjtu_info_date_zh_tl , + display-date .initial:V = \c__sjtu_today_tl , + } +\RenewDocumentCommand \title { s +m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { title* = {#2} } } + { \keys_set_known:nn { sjtu / info } { title = {#2} } } + } +\tl_set:Nn \@title { \l__sjtu_info_title_zh_tl } +\RenewDocumentCommand \author { s m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { author* = {#2} } } + { \keys_set_known:nn { sjtu / info } { author = {#2} } } + } +\tl_set:Nn \@author { \l__sjtu_info_author_zh_tl } +\RenewDocumentCommand \date { s m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { display-date* = {#2} } } + { \keys_set_known:nn { sjtu / info } { display-date = {#2} } } + } +\tl_set:Nn \@date { \l__sjtu_info_date_zh_tl } +\tl_set:Nv \today { c__sjtu_today_ \g__sjtu_lang_tl _tl } +\keys_define:nn { sjtu / style } + { + float-font .tl_set:N = \SJTU@style@float@font , + float-font .initial:n = \zihao { 5 } \fixedlineskip { 15.6 bp } , + caption-font .code:n = + { \DeclareCaptionFont { SJTU@font } {#1} } , + caption-font .initial:n = \zihao { 5 } \bfseries , + subcaption-font .code:n = + { \DeclareCaptionFont { SJTU@sub@font } {#1} } , + subcaption-font .initial:n = \zihao { 5 } \normalfont , + fnmark-font .tl_set:N = \l__sjtu_style_fnmark_font_tl , + fnmark-font .initial:n = , + float-num-sep .tl_set:N = \l__sjtu_style_fl_num_sep_tl , + float-num-sep .initial:n = { -- } , + equation-num-sep .tl_set:N = \l__sjtu_style_eq_num_sep_tl , + equation-num-sep .initial:n = { -- } , + title-logo-color .choice: , + title-logo-color .choices:nn = + { red, blue, black } + { \tl_set_eq:NN \l__sjtu_style_title_logo_color_tl \l_keys_choice_tl } , + title-logo-color .initial:n = { red } , + header-logo-color .choice: , + header-logo-color .choices:nn = + { red, blue, black } + { \tl_set_eq:NN \l__sjtu_style_header_logo_color_tl \l_keys_choice_tl } , + header-logo-color .initial:n = { red } , + header-uppercase .choice: , + header-uppercase / true .code:n = + { \cs_gset_eq:NN \__sjtu_nouppercase:n \use:n } , + header-uppercase / false .code:n = + { \cs_gset:Nn \__sjtu_nouppercase:n { \nouppercase {##1} } } , + header-uppercase .default:n = { true } , + header-uppercase .initial:n = { true } , + header-font .tl_set:N = \l__sjtu_style_header_font_tl , + header-font .initial:n = \zihao { -5 } \sffamily , + footer-font .tl_set:N = \l__sjtu_style_footer_font_tl , + footer-font .initial:n = \zihao { -5 } , + page-number .cs_set:Np = \__sjtu_page:n #1 , + page-number .initial:n = { {#1} } + } +\keys_define:nn { sjtu / name } + { + contents .tl_set:N = \contentsname , + listfigure .tl_set:N = \listfigurename , + listtable .tl_set:N = \listtablename , + figure .tl_set:N = \figurename , + table .tl_set:N = \tablename , + abstract .tl_set:N = \abstractname , + index .tl_set:N = \indexname , + appendix .tl_set:N = \appendixname , + proof .tl_set:N = \proofname , + bib .tl_set:N = \refname , + figure* .tl_set:N = \l__sjtu_name_figure_aux_tl , + figure* .initial:n = { 图 } , + table* .tl_set:N = \l__sjtu_name_table_aux_tl , + table* .initial:n = { 表 } , + algorithm .tl_set:N = \l__sjtu_name_algorithm_tl , + algorithm .initial:n = { Algorithm } , + listalgorithm .tl_set:N = \l__sjtu_name_listalgorithm_tl , + listalgorithm .initial:n = { List~of~Algorithms } , + } +\file_input:n { sjtu-lang-article- \g__sjtu_lang_tl .cfg } +\cs_new_protected:Npn \__sjtu_fontset_error:nn #1#2 + { \msg_error:nnnn { sjtutex } { font-unavailable } {#1} {#2} } +\msg_new:nnn { sjtutex } { font-unavailable } + { `#1-font~ =~ #2'~ is~ unavailable~ in~ current~ mode. } +\cs_new_eq:NN \__sjtu_fontset_case:nn \__sjtu_engine_case:nn +\cs_new:Npx \__sjtu_fontset_case:nnn #1#2#3 + { + \__sjtu_engine_case:nn + { \sys_if_output_pdf:TF {#1} {#2} } + {#3} + } +\cs_new_protected:Nn \__sjtu_set_slanted_greek: + { + \clist_const:Nn \c__sjtu_uppercase_greek_clist + { Gamma, Delta, Theta, Lambda, Xi, Pi, Sigma, Upsilon, Phi, Psi, Omega } + \clist_map_inline:Nn \c__sjtu_uppercase_greek_clist + { + \cs_set_eq:cc { up ##1 } { ##1 } + \cs_set_eq:cc { it ##1 } { var ##1 } + } + \int_compare:nNnT { \g__sjtu_math_style_int } > { 1 } + { + \clist_map_inline:Nn \c__sjtu_uppercase_greek_clist + { \cs_set_eq:cc { ##1 } { it ##1 } } + } + } +\cs_new_protected:Nn \__sjtu_set_unimath_symbol: + { + \cs_set_eq:NN \increment \upDelta + \cs_set_eq:NN \QED \blacksquare + } +\tl_if_empty:NT \g__sjtu_math_font_tl + { \tl_gset_eq:NN \g__sjtu_math_font_tl \g__sjtu_text_font_tl } +\tl_if_empty:NT \g__sjtu_cjk_font_tl + { + \sys_if_platform_windows:TF + { \tl_gset:Nn \g__sjtu_cjk_font_tl { windows } } + { + \ctex_if_platform_macos:TF + { \tl_gset:Nn \g__sjtu_cjk_font_tl { mac } } + { \tl_gset:Nn \g__sjtu_cjk_font_tl { fandol } } + } + } +\cs_new_protected:Npn \__sjtu_load_font:nn #1#2 + { + \str_if_eq:eeF { \tl_use:c { g__sjtu_ #1 _font_tl } } { none } + { + \file_if_exist:nF + { sjtu- #1 -font- \tl_use:c { g__sjtu_ #1 _font_tl } .def } + { + \msg_warning:nnnn { sjtutex } { invalid-font } {#1} {#2} + \tl_gset:cn { g__sjtu_ #1 _font_tl } {#2} + } + \ctex_file_input:n + { sjtu- #1 -font- \tl_use:c { g__sjtu_ #1 _font_tl } .def } + } + } +\msg_new:nnn { sjtutex } { invalid-font } + { + Invalid~ value~ `#1-font~ =~ \tl_use:c { g__sjtu_ #1 _font_tl }~ '! \\\\ + Using~ `#2'~ instead. + } +\cs_new_protected:Nn \__sjtu_load_fontset: + { + \clist_map_inline:nn + { + { math } { newtx }, + { text } { newtx }, + { cjk } { fandol } + } + { \__sjtu_load_font:nn ##1 } + } +\@onlypreamble \__sjtu_load_font:nn +\@onlypreamble \__sjtu_load_fontset: +\__sjtu_load_fontset: +\ctex_at_end_package:nn { unicode-math } + { + \DeclareDocumentCommand \bm { m } + { { \symbf {#1} } } + \DeclareDocumentCommand \boldsymbol { m } + { { \symbf {#1} } } + \int_compare:nNnTF { \g__sjtu_math_style_int } > { 1 } + { \keys_set:nn { unicode-math } { math-style = ISO } } + { \keys_set:nn { unicode-math } { math-style = TeX } } + } +\__sjtu_unicode_engine_case:nn + { + \xeCJK_declare_char_class:nn { CJK } + { "24EA, "2460->"2473, "3251->"32BF, "25A1 } + } + { + \ltjdefcharrange { 99 } + { "24EA, "2460-"2473, "3251-"32BF, "25A1 } + \ltjsetparameter { jacharrange = { +99 } } + } +\geometry + { + paper = a4paper, + top = 3.5 cm, + bottom = 4.0 cm, + left = 2.5 cm, + right = 2.5 cm, + headheight = 1.5 cm, + headsep = 0.5 cm, + footskip = 1.0 cm + } +\pagestyle { fancy } +\cs_new:Nn \__sjtu_thepage: { \thepage } +\fancyhf { } +\tl_set:Nn \l__sjtu_header_logo_tl + { + \includegraphics [ height = 1.2 cm ] + { sjtu-vi-logo- \l__sjtu_style_header_logo_color_tl .pdf } + } +\bool_if:NTF \g__sjtu_twoside_bool + { + \fancyhead [ RE, LO ] + { \l__sjtu_header_logo_tl } + \fancyhead [ RO ] + { + \l__sjtu_style_header_font_tl + \__sjtu_nouppercase:n + { \MakeUppercase \l__sjtu_info_running_title_zh_tl } + } + \fancyhead [ LE ] + { + \__sjtu_nouppercase:n + { \MakeUppercase \l__sjtu_info_subject_zh_tl } + } + } + { + \fancyhead [ L ] + { \l__sjtu_header_logo_tl } + \fancyhead [ R ] + { + \l__sjtu_style_header_font_tl + \__sjtu_nouppercase:n + { \MakeUppercase \l__sjtu_info_running_title_zh_tl } + } + } +\fancyfoot [ C ] + { + \l__sjtu_style_footer_font_tl + \__sjtu_page:n { \__sjtu_thepage: } + } +\bool_if:NTF \g__sjtu_twoside_bool + { + \fancypagestyle { plain } + { + \fancyhead [ RE, LO ] { } + \tl_set:Nn \headrulewidth { 0 pt } + } + } + { + \fancypagestyle { plain } + { + \fancyhead [ R ] { } + \tl_set:Nn \headrulewidth { 0 pt } + } + } +\cs_new_eq:NN \ps@SJTU@null \prg_do_nothing: +\RenewDocumentCommand \cleardoublepage { } + { + \clearpage + \bool_if:NT \g__sjtu_twoside_bool + { + \int_if_odd:nF \c@page + { \hbox:n { } \thispagestyle { empty } \newpage } + } + } +\ctex_set:nn { section } + { + beforeskip = 24 bp , + afterskip = 6 bp , + format = \zihao { 4 } \bfseries \heiti , + afterindent = true + } +\ctex_set:nn { subsection } + { + beforeskip = 12 bp , + afterskip = 6 bp , + format = \zihao { -4 } \bfseries \heiti , + afterindent = true + } +\ctex_set:nn { subsubsection } + { + beforeskip = 6 bp , + afterskip = 6 bp , + format = \zihao { -4 } \normalfont , + afterindent = true + } +\ctex_set:nn { paragraph } + { afterindent = true } +\ctex_set:nn { subparagraph } + { afterindent = true } +\ctex_set:n { secnumdepth = 3 } +\NewDocumentCommand \SJTU@head { s O{#3} m O{#2} } + { + \IfBooleanTF {#1} + { \tl_if_empty:nF {#4} { \__sjtu_pdf_bookmark:nn { 0 } {#4} } } + { + \__sjtu_phantom_section: + \addcontentsline { toc } { section } {#4} + } + \cs_set_eq:NN \__sjtu_orig_ctex_gettitle:n \CTEX@gettitle + \cs_set:Npn \CTEX@gettitle ##1 { \__sjtu_orig_ctex_gettitle:n {#2} } + \section* {#3} + \cs_set_eq:NN \CTEX@gettitle \__sjtu_orig_ctex_gettitle:n + \@mkboth { \MakeUppercase {#2} } { \MakeUppercase {#2} } + } +\cs_new:Npn \__sjtu_head_aux:n #1 + { \SJTU@head {#1} } +\cs_new:Npn \__sjtu_head_aux_s:n #1 + { \SJTU@head* {#1} } +\cs_new:Npn \__sjtu_head_auxa_s:nn #1#2 + { \SJTU@head* {#1} [#2] } +\cs_new:Npn \__sjtu_head_auxb_s:nn #1#2 + { \SJTU@head* [#1] {#2} } +\cs_generate_variant:Nn \__sjtu_head_aux:n { V } +\cs_generate_variant:Nn \__sjtu_head_aux_s:n { V } +\cs_generate_variant:Nn \__sjtu_head_auxa_s:nn { Vn, VV } +\cs_generate_variant:Nn \__sjtu_head_auxb_s:nn { Vo } +\cs_new_eq:NN \__sjtu_pdf_bookmark:nn \use_none:nn +\cs_new_eq:NN \__sjtu_phantom_section: \prg_do_nothing: +\ctex_if_autoindent_touched:F + { \ctex_set:n { autoindent = true } } +\ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } +\ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } +\ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd } +\setlist { nosep } +\tl_set:Nn \textfraction { 0.15 } +\tl_set:Nn \topfraction { 0.85 } +\tl_set:Nn \bottomfraction { 0.65 } +\tl_set:Nn \floatpagefraction { 0.60 } +\ctex_patch_cmd:Nnn \@floatboxreset + { \normalsize } { \SJTU@style@float@font } +\DeclareCaptionLabelSeparator { enskip } { \enskip } +\captionsetup + { + labelsep = enskip , + justification = centering , + font = SJTU@font + } +\captionsetup [ sub ] + { + format = hang , + justification = justified , + font = SJTU@sub@font + } +\DeclareCaptionOption { aux-names } [ ] + { + \tl_set:Nn \figurename { \l__sjtu_name_figure_aux_tl } + \tl_set:Nn \tablename { \l__sjtu_name_table_aux_tl } + } +\captionsetup [ bi-second ] { aux-names } +\NewDocumentCommand \SJTUcounterwithin + { s O{ \l__sjtu_style_fl_num_sep_tl } O{ \arabic } m m } + { + \@ifbothcounters {#4} {#5} + { + \@addtoreset {#4} {#5} + \IfBooleanF {#1} + { + \cs_gset:cpo { the #4 } + { \cs:w the #5 \cs_end: #2 #3 {#4} } + } + } + } +\cs_new_protected:Nn \__sjtu_make_fnmark: + { \hbox:n { \@thefnmark } } +\ctex_at_end_preamble:n { + \cs_set_eq:NN \__sjtu_orig_make_fntext:n \@makefntext + \cs_set:Npn \@makefntext #1 + { + \group_begin: + \cs_set_eq:NN \@makefnmark \__sjtu_make_fnmark: + \__sjtu_orig_make_fntext:n {#1} + \group_end: + } +} +\cs_new:Npn \__sjtu_footnote_number:N #1 + { + \int_compare:nNnTF {#1} < { 21 } + { \__sjtu_unicode_char:n { \int_eval:n { "2460 - 1 + #1 } } } + { + \int_compare:nNnTF {#1} < { 36 } + { \__sjtu_unicode_char:n { \int_eval:n { "3251 - 21 + #1 } } } + { + \int_compare:nNnTF {#1} < { 51 } + { \__sjtu_unicode_char:n { \int_eval:n { "32B1 - 36 + #1 } } } + { \msg_warning:nn { sjtutex } { too-many-footnotes } } + } + } + } +\msg_new:nnn { sjtutex } { too-many-footnotes } + { Too~ many~ footnotes. } +\cs_set:Npn \thefootnote + { + \hbox:n { } + { \l__sjtu_style_fnmark_font_tl \__sjtu_footnote_number:N \c@footnote } + } +\cs_set:Npn \thempfootnote + { + \hbox:n { } + { \l__sjtu_style_fnmark_font_tl \__sjtu_footnote_number:N \c@mpfootnote } + } +\DeclareObjectType { sjtu } { 0 } +\DeclareTemplateInterface { sjtu } { component } { 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 } { component } { 0 } + { + format = \l__sjtu_component_format_tl , + content = \l__sjtu_component_content_tl , + bottom-skip = \l__sjtu_component_bottom_skip , + align = + { + left = + \cs_set_eq:NN \l__sjtu_component_align: \raggedright , + right = + \cs_set_eq:NN \l__sjtu_component_align: \raggedleft , + center = + \cs_set_eq:NN \l__sjtu_component_align: \centering , + normal = + \cs_set_eq:NN \l__sjtu_component_align: \prg_do_nothing: + } + } + { + \AssignTemplateKeys + \group_begin: + \l__sjtu_component_align: + \l__sjtu_component_format_tl + \l__sjtu_component_content_tl + \par + \group_end: + \__sjtu_vspace:N \l__sjtu_component_bottom_skip + } +\DeclareTemplateInterface { sjtu } { page } { 0 } + { + bookmark : boolean = false , + bookmark-text : tokenlist = \c_empty_tl , + style : tokenlist = empty , + format : tokenlist = \linespread { 1 } \selectfont , + prefix : tokenlist , + components : commalist , + top-skip : skip = \c_zero_skip , + bottom-skip : skip = \c_zero_skip + } +\DeclareTemplateCode { sjtu } { page } { 0 } + { + bookmark = \l__sjtu_page_bookmark_bool , + bookmark-text = \l__sjtu_page_bookmark_text_tl , + style = \l__sjtu_page_style_tl , + format = \l__sjtu_page_format_tl , + prefix = \l__sjtu_page_prefix_tl , + components = \l__sjtu_page_components_clist , + top-skip = \l__sjtu_page_top_skip , + bottom-skip = \l__sjtu_page_bottom_skip + } + { + \AssignTemplateKeys + \clearpage + \bool_if:NT \l__sjtu_page_bookmark_bool + { \__sjtu_pdf_bookmark:nn { 0 } { \l__sjtu_page_bookmark_text_tl } } + \exp_args:No \thispagestyle { \l__sjtu_page_style_tl } + \__sjtu_vspace_r:N \l__sjtu_page_top_skip + \__sjtu_vspace:n { - \tex_parskip:D } + \__sjtu_vspace:n { - \tex_baselineskip:D } + \group_begin: + \l__sjtu_page_format_tl + \clist_map_inline:Nn \l__sjtu_page_components_clist + { \UseInstance { sjtu } { \l__sjtu_page_prefix_tl / ##1 } } + \group_end: + \__sjtu_vspace:N \l__sjtu_page_bottom_skip + \clearpage + } +\cs_new:Npn \__sjtu_declare_component:nnn #1#2#3 + { \DeclareInstance { sjtu } {#1/#2} { component } {#3} } +\cs_new:Npn \__sjtu_declare_page:nn #1#2 + { \DeclareInstance { sjtu } {#1} { page } {#2} } +\cs_new:Npn \__sjtu_title_page_info:nnn #1#2#3 + { + \group_begin: + \cs_set:Npn \l__sjtu_info_output_format:NNN ##1##2##3 {#3} + \clist_clear:N \l__sjtu_tmpa_clist + \clist_clear:N \l__sjtu_tmpb_clist + \dim_set:Nn \l__sjtu_tmpb_dim { 5 em } + \clist_map_inline:nn {#2} + { + \clist_put_right:No \l__sjtu_tmpa_clist + { \cs:w c__sjtu_name_ ##1 _ #1 _tl \cs_end: } + \clist_put_right:No \l__sjtu_tmpb_clist + { \cs:w l__sjtu_info_ ##1 _ #1 _tl \cs_end: } + \__sjtu_dim_set_to_wd:Nv \l__sjtu_tmpa_dim { l__sjtu_info_ ##1 _ #1 _tl } + \dim_set:Nn \l__sjtu_tmpb_dim + { \dim_max:nn { \l__sjtu_tmpa_dim } { \l__sjtu_tmpb_dim } } + } + \bool_until_do:nn + { \clist_if_empty_p:N \l__sjtu_tmpa_clist } + { + \clist_pop:NN \l__sjtu_tmpa_clist \l__sjtu_tmpa_tl + \clist_pop:NN \l__sjtu_tmpb_clist \l__sjtu_tmpb_tl + \l__sjtu_info_output_format:NNN + \l__sjtu_tmpa_tl \l__sjtu_tmpb_dim \l__sjtu_tmpb_tl + \skip_vertical:N \c_zero_dim + } + \group_end: + } +\cs_generate_variant:Nn \__sjtu_title_page_info:nnn { nxn } +\clist_map_inline:nn + { + { logo } + { + content = + { + \includegraphics [ width = 3 cm ] + { sjtu-vi-badge- \l__sjtu_style_title_logo_color_tl .pdf } + \skip_vertical:n { 0.3 cm } + \includegraphics [ width = 6.81 cm ] + { sjtu-vi-name- \l__sjtu_style_title_logo_color_tl .pdf } + } + }, + { subject } + { + format = \zihao { -2 } \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_subject_zh_tl , + bottom-skip = \c_zero_dim plus 2 fill + }, + { title } + { + format = \zihao { 2 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_display_title_zh_tl , + bottom-skip = \c_zero_dim plus 3 fill + }, + { info } + { + format = \zihao { 4 } \fixedlineskip { 31.2 bp } , + content = + { + \__sjtu_title_page_info:nxn { zh } + { + author, + id, + supervisor, + \tl_if_empty:NF \l__sjtu_info_assoc_supervisor_zh_tl + { assoc_supervisor }, + department, + } + { + \__sjtu_cjk_spread_box:nn { 5 em } { \heiti #1 } + \c__sjtu_name_info_sep_zh_tl + \__sjtu_left_aligned_box:nn {#2} {#3} + } + } , + bottom-skip = 31.2 bp + }, + { date } + { + format = \zihao { 4 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_date_zh_tl + } + } + { + \__sjtu_declare_component:nnn { title / zh } #1 + } +\__sjtu_declare_page:nn { title / zh } + { + bookmark = true , + bookmark-text = \c__sjtu_name_title_page_tl , + prefix = title / zh , + components = { logo, subject, title, info, date } + } +\bool_if:NT \g__sjtu_titlepage_bool + { + \RenewDocumentCommand \maketitle { } + { \UseInstance { sjtu } { title / zh } } + } +\cs_new:Nn \__sjtu_output_keywords:Nnn + { + \clist_if_empty:NF #1 + { + \par \mode_leave_vertical: \par \noindent + { \bfseries #2 } \clist_use:Nn #1 {#3} + } + } +\bool_if:NTF \g__sjtu_titlepage_bool + { + \DeclareDocumentEnvironment { abstract } { } + { + \clearpage + \__sjtu_head_aux_s:n { \abstractname } + } + { + \__sjtu_output_keywords:Nnn \l__sjtu_info_keywords_zh_clist + { \c__sjtu_name_keywords_tl } { \c__sjtu_name_item_sep_tl } + \clearpage + } + } + { + \__sjtu_preto_cmd:Nn \endabstract + { + \__sjtu_output_keywords:Nnn \l__sjtu_info_keywords_zh_clist + { \c__sjtu_name_keywords_tl } { \c__sjtu_name_item_sep_tl } + } + } +\DeclareDocumentCommand \tableofcontents { } + { + \__sjtu_head_aux_s:n { \contentsname } + \@starttoc { toc } + } +\NewDocumentCommand \SJTU@listof { m m s } + { + \IfBooleanTF {#3} + { \__sjtu_head_aux_s:n {#1} } + { \__sjtu_head_aux:n {#1} } + \exp_args:Nv \@starttoc { ext@ #2 } + } +\DeclareDocumentCommand \listoffigures { } + { \SJTU@listof { \listfigurename } { figure } } +\DeclareDocumentCommand \listoftables { } + { \SJTU@listof { \listtablename } { table } } +\tl_set:Nn \cftdotsep { 1 } +\cs_new_protected:Nn \__sjtu_update_cft_presnum: + { + \tl_set:Nn \cftfigpresnum { \figurename \c_space_tl } + \__sjtu_dim_add_to_wd:Nn \cftfignumwidth { \cftfigpresnum } + \tl_set:Nn \cfttabpresnum { \tablename \c_space_tl } + \__sjtu_dim_add_to_wd:Nn \cfttabnumwidth { \cftfigpresnum } + } +\ctex_at_end_preamble:n + { \__sjtu_update_cft_presnum: } +\newcounter { SJTU@bib } +\NewDocumentEnvironment { @bibliolist } { m } + { + \cs_if_exist_use:N \bibfont + \list + { \@biblabel { \arabic{ SJTU@bib } } } + { + \__sjtu_dim_set_to_wd:Nn \labelwidth { \@biblabel {#1} } + \dim_set_eq:NN \leftmargin \labelwidth + \dim_add:Nn \leftmargin { \labelsep } + \dim_if_exist:NTF \bibitemsep + { + \dim_set_eq:NN \itemsep \bibitemsep + \dim_if_exist:NT \bibparsep + { \dim_set_eq:NN \parsep \bibparsep } + } + { + \dim_if_exist:NT \bibsep + { + \dim_set_eq:NN \itemsep \bibsep + \dim_zero:N \parsep + } + } + \@nmbrlisttrue + \tl_set:Nn \@listctr { SJTU@bib } + \cs_set:Npn \p@SJTU@bib { } + \cs_set:Npn \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 } + } + { + \cs_set:Npn \@noitemerr + { \msg_warning:nnn { sjtutex } { empty-environment } { bibliolist } } + \endlist + } +\msg_new:nnn { sjtutex } { empty-environment } + { Empty~ `#1'~ environment. } +\NewDocumentEnvironment { bibliolist } { m +b } + { + \cs_set:Npn \@noitemerr { } + \begin { @bibliolist } {#1} + #2 + \end { @bibliolist } + } { } +\NewDocumentEnvironment { bibliolist* } { m +b } + { + \cs_set:Npn \@noitemerr { } + \begin { @bibliolist } {#1} + #2 + \end { @bibliolist } + } { } +\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__sjtu_bookmark_int + \cs_gset_protected:Npn \__sjtu_pdf_bookmark:nn #1#2 + { + \phantomsection + \int_gincr:N \g__sjtu_bookmark_int + \pdfbookmark [#1] {#2} + { sjtubookmark. \int_use:N \g__sjtu_bookmark_int } + } + \cs_gset_eq:NN \__sjtu_phantom_section: \phantomsection + \pdfstringdefDisableCommands + { + \cs_set_eq:NN \\ \prg_do_nothing: + \cs_set_eq:NN \quad \c_empty_tl + \cs_set_eq:NN \qquad \c_empty_tl + \cs_set_eq:NN \hspace \use_none:n + } + \ctex_after_end_preamble:n + { + \hypersetup + { + pdftitle = \l__sjtu_info_title_zh_tl, + pdfsubject = \l__sjtu_info_subject_zh_tl, + pdfkeywords = \l__sjtu_info_keywords_zh_clist, + pdfauthor = \l__sjtu_info_author_zh_tl + } + } + } +\ctex_at_end_package:nn { threeparttable } + { \tl_put_right:Nn \TPTnoteSettings { \footnotesize } } +\ctex_at_end_package:nn { longtable } + { \AtBeginEnvironment { longtable } { \SJTU@style@float@font } } +\cs_new_protected:Nn \__sjtu_new_theorems: + { + \clist_map_inline:nn + { + assumption, axiom, conjecture, corollary, definition, example, + exercise, lemma, problem, proposition, theorem + } + { \exp_args:Nnv \newtheorem {##1} { c__sjtu_name_ ##1 _tl } } + \clist_map_inline:nn + { remark, solution } + { \exp_args:NNnv \newtheorem* {##1} { c__sjtu_name_ ##1 _tl } } + } +\ctex_at_begin_package:nn { amsthm } + { + \cs_if_exist:NT \openbox + { + \cs_new_eq:NN \__sjtu_save_openbox: \openbox + \cs_undefine:N \openbox + } + } +\ctex_at_end_package:nn { amsthm } + { + \cs_if_exist:NT \__sjtu_save_openbox: + { \cs_set_eq:NN \openbox \__sjtu_save_openbox: } + \tl_set:Nn \qedsymbol { \ensuremath { \QED } } + \RenewDocumentEnvironment { proof } { O{ \proofname } } + { + \par \pushQED { \qed } + \normalfont \dim_zero:N \topsep + \trivlist + \item + [ + \skip_horizontal:N \labelsep + \bfseries \heiti #1 \@addpunct { \enskip } + ] + \ignorespaces + } + { \popQED \endtrivlist \legacy_if_set_false:n { @endpe } } + \newtheoremstyle { sjtu } + { } { } { \normalfont } { } { \bfseries \heiti } { } { \ccwd } { } + \theoremstyle { sjtu } + \__sjtu_new_theorems: + } +\ctex_at_end_package:nn { ntheorem } + { + \theoremheaderfont { \bfseries \heiti } + \theorembodyfont { \normalfont } + \theoremseparator { \enskip } + \theoremsymbol { \ensuremath { \QED } } + \qedsymbol { \ensuremath { \QED } } + \newtheorem* { proof } { \proofname } + \theoremsymbol { } + \__sjtu_new_theorems: + } +\cs_new_protected:Npn \__sjtu_newlistof:nnnnn #1#2#3#4#5 + { + \exp_args:Nnv \newlistentry {#2} { ext@ #3 } { 0 } + \exp_args:Ne \newcounter { \tl_use:c { ext@ #3 } depth } + \exp_args:Ne \setcounter { \tl_use:c { ext@ #3 } depth } { 1 } + \dim_set:cn { cft #2 indent } { 1.5 em } + \dim_set:cn { cft #2 numwidth } { 2.3 em } + \cs_set_eq:cc { l@ #3 } { l@ #2 } + \__sjtu_appto_cmd:Nn \__sjtu_update_cft_presnum: + { + \tl_set:cn { cft #2 presnum } { #4 \c_space_tl } + \__sjtu_dim_add_to_wd:cv { cft #2 numwidth } { cft #2 presnum } + } + \exp_args:Nc \DeclareDocumentCommand { listof #1 s } { } + { \SJTU@listof {#5} {#3} } + } +\ctex_at_end_package:nn { algorithm } + { + \tl_set:Nn \fname@algorithm { \l__sjtu_name_algorithm_tl } + \tl_set:Nn \listalgorithmname { \l__sjtu_name_listalgorithm_tl } + \__sjtu_newlistof:nnnnn { algorithm } { alg } { algorithm } + { \fname@algorithm } { \listalgorithmname } + } +\ctex_at_end_package:nn { algorithm2e } + { + \SetAlgorithmName { \l__sjtu_name_algorithm_tl } + { \l__sjtu_name_algorithm_tl } + { \l__sjtu_name_listalgorithm_tl } + \SetAlgoCaptionSeparator { \enskip } + \__sjtu_newlistof:nnnnn { algorithm } { alg } { algocf } + { \algorithmcfname } { \listalgorithmcfname } + \ctex_patch_cmd:Nnn \algocf@latexcaption + { \addcontentsline } + { \caption@iflist { \addcontentsline } { \@gobblethree } } + } +\ctex_at_end_package:nn { listings } + { + \lstdefinestyle { lstStyleCode } + { + aboveskip = \medskipamount , + belowskip = \medskipamount , + basicstyle = \ttfamily \zihao { 6 } , + commentstyle = \slshape \color { black!60 } , + stringstyle = \color { green!40!black!100 } , + keywordstyle = \bfseries \color { blue!50!black } , + extendedchars = false , + upquote = true , + tabsize = 2 , + showstringspaces = false , + xleftmargin = 1 em , + xrightmargin = 1 em , + breaklines = false , + framexleftmargin = 1 em , + framexrightmargin = 1 em , + backgroundcolor = \color { gray!10 } , + columns = flexible , + keepspaces = true , + texcl = true , + mathescape = true + } + } +\ctex_at_end_package:nn { nomencl } + { \tl_set:Nn \nomname { \l__sjtu_name_nom_tl } } +\endinput +%% +%% End of file `sjtuarticle.cls'. diff --git a/texmf/tex/latex/sjtutex/sjtureport.cls b/texmf/tex/latex/sjtutex/sjtureport.cls new file mode 100644 index 00000000..0c93a16f --- /dev/null +++ b/texmf/tex/latex/sjtutex/sjtureport.cls @@ -0,0 +1,1384 @@ +%% +%% This is file `sjtureport.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `class,report') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{expl3} +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Report template for Shanghai Jiao Tong University} +\ProvidesExplClass{sjtureport} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\RequirePackage { xparse, xtemplate } +\msg_new:nnn { sjtutex } { l3-too-old } + { + Package~ "#1"~ is~ too~ old. \\\\ + Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\ + "l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\ + manager~ or~ from~ CTAN. + } +\@ifpackagelater { expl3 } { 2020/04/06 } { } + { \msg_error:nnn { sjtutex } { l3-too-old } {#1} } +\NewDocumentCommand \sjtuthesis { } { SJTU \textsc{ Thesis } } +\bool_new:N \l__sjtu_tmpa_bool +\int_new:N \l__sjtu_tmpa_int +\tl_new:N \l__sjtu_tmpa_tl +\tl_new:N \l__sjtu_tmpb_tl +\clist_new:N \l__sjtu_tmpa_clist +\clist_new:N \l__sjtu_tmpb_clist +\dim_new:N \l__sjtu_tmpa_dim +\dim_new:N \l__sjtu_tmpb_dim +\skip_new:N \l__sjtu_tmpa_skip +\box_new:N \l__sjtu_tmpa_box +\tl_new:N \g__sjtu_lang_tl +\tl_new:N \g__sjtu_lang_aux_tl +\tl_set:Nn \g__sjtu_lang_aux_tl { zh } +\tl_new:N \g__sjtu_zihao_tl +\dim_new:N \g__sjtu_font_size_dim +\dim_new:N \g__sjtu_line_skip_dim +\dim_new:N \g__sjtu_default_line_skip_dim +\fp_new:N \g__sjtu_line_spread_fp +\tl_new:N \g__sjtu_text_font_tl +\tl_new:N \g__sjtu_math_font_tl +\tl_new:N \g__sjtu_cjk_font_tl +\tl_new:N \g__sjtu_save_encodingdefault_tl +\tl_new:N \g__sjtu_save_rmdefault_tl +\tl_new:N \g__sjtu_save_sfdefault_tl +\tl_new:N \g__sjtu_save_ttdefault_tl +\int_new:N \g__sjtu_math_style_int +\bool_new:N \g__sjtu_intlimits_bool +\bool_set_false:N \g__sjtu_intlimits_bool +\bool_new:N \g__sjtu_slint_bool +\bool_set_false:N \g__sjtu_slint_bool +\clist_new:N \g__sjtu_options_to_ctex_class_clist +\clist_set:Nn \g__sjtu_options_to_ctex_class_clist + { UTF8, scheme = plain, fontset = none } +\clist_new:N \g__sjtu_options_to_packages_clist +\bool_new:N \g__sjtu_twoside_bool +\bool_set_false:N \g__sjtu_twoside_bool +\bool_new:N \g__sjtu_openright_bool +\bool_set_false:N \g__sjtu_openright_bool +\bool_new:N \g__sjtu_titlepage_bool +\bool_set_true:N \g__sjtu_titlepage_bool +\bool_new:N \g__sjtu_draft_bool +\keys_define:nn { sjtu / option } + { + lang .choice: , + lang .value_required:n = true , + lang .choices:nn = + { zh, en } + { + \tl_gset_eq:NN \g__sjtu_lang_tl \l_keys_choice_tl + \int_compare:nNnT { \l_keys_choice_int } = { 1 } + { \tl_gset:Nn \g__sjtu_lang_aux_tl { en } } + } , + lang .initial:n = { zh } , + zihao .choice: , + zihao .value_required:n = true , + zihao / -4 .code:n = + { + \tl_gset:Nn \g__sjtu_zihao_tl { -4 } + \dim_gset:Nn \g__sjtu_font_size_dim { 12 bp } + \dim_gset:Nn \g__sjtu_default_line_skip_dim { 20 bp } + } , + zihao / 5 .code:n = + { + \tl_gset:Nn \g__sjtu_zihao_tl { 5 } + \dim_gset:Nn \g__sjtu_font_size_dim { 10.5 bp } + \dim_gset:Nn \g__sjtu_default_line_skip_dim { 15.6 bp } + } , + zihao .initial:n = { -4 } , + lineskip .dim_gset:N = \g__sjtu_line_skip_dim , + text-font .tl_gset:N = \g__sjtu_text_font_tl , + text-font .initial:n = { newtx } , + math-font .tl_gset:N = \g__sjtu_math_font_tl , + cjk-font .tl_gset:N = \g__sjtu_cjk_font_tl , + math-style .choice: , + math-style .value_required: n = true, + math-style .choices:nn = + { TeX, ISO, GB } + { \int_gset_eq:NN \g__sjtu_math_style_int \l_keys_choice_int } , + math-style .initial:n = { TeX } , + nointlimits .value_forbidden:n = true, + intlimits .value_forbidden:n = true, + nointlimits .code:n = + { \bool_set_false:N \g__sjtu_intlimits_bool }, + intlimits .code:n = + { \bool_set_true:N \g__sjtu_intlimits_bool }, + upint .value_forbidden:n = true, + slint .value_forbidden:n = true, + upint .code:n = + { \bool_set_false:N \g__sjtu_slint_bool }, + slint .code:n = + { \bool_set_true:N \g__sjtu_slint_bool }, + oneside .value_forbidden:n = true, + twoside .value_forbidden:n = true, + oneside .code:n = + { \bool_set_false:N \g__sjtu_twoside_bool } , + twoside .code:n = + { \bool_set_true:N \g__sjtu_twoside_bool } , + openany .value_forbidden:n = true, + openright .value_forbidden:n = true, + openany .code:n = + { \bool_set_false:N \g__sjtu_openright_bool } , + openright .code:n = + { \bool_set_true:N \g__sjtu_openright_bool } , + titlepage .value_forbidden:n = true, + notitlepage .value_forbidden:n = true, + titlepage .code:n = + { \bool_set_true:N \g__sjtu_titlepage_bool } , + notitlepage .code:n = + { \bool_set_false:N \g__sjtu_titlepage_bool } , + draft .value_forbidden:n = true, + final .value_forbidden:n = true, + draft .code:n = + { \bool_set_true:N \g__sjtu_draft_bool }, + final .code:n = + { \bool_set_false:N \g__sjtu_draft_bool }, + unknown .code:n = { \msg_error:nn { sjtutex } { unknown-option } } + } +\msg_new:nnn { sjtutex } { unknown-option } + { Class~ option~ "\l_keys_key_tl"~ is~ unknown. } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ sjtu / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { sjtu / option } + } +\dim_compare:nNnT \g__sjtu_line_skip_dim < \g__sjtu_font_size_dim + { \dim_set_eq:NN \g__sjtu_line_skip_dim \g__sjtu_default_line_skip_dim } +\fp_set:Nn \g__sjtu_line_spread_fp + { \dim_ratio:nn { \g__sjtu_line_skip_dim } { \g__sjtu_font_size_dim } / 1.2 } +\clist_put_right:Nx \g__sjtu_options_to_ctex_class_clist + { + zihao = \g__sjtu_zihao_tl , + linespread = \fp_use:N \g__sjtu_line_spread_fp , + \bool_if:NTF \g__sjtu_twoside_bool + { twoside } { oneside } , + \bool_if:NTF \g__sjtu_openright_bool + { openright } { openany } , + \bool_if:NTF \g__sjtu_titlepage_bool + { titlepage } { notitlepage } , + \bool_if:NTF \g__sjtu_draft_bool + { draft } { final } + } +\exp_args:No \PassOptionsToClass + { \g__sjtu_options_to_ctex_class_clist } + { ctexrep } +\clist_set:Nn \g__sjtu_options_to_packages_clist + { + { no-math } { fontspec }, + { titles } { tocloft }, + { perpage, bottom } { footmisc }, + { list = off } { bicaption }, + { warnings-off = + { + mathtools-overbracket, + mathtools-colon + } + } { unicode-math }, + { amsmath, thmmarks } { ntheorem }, + { chapter } { algorithm }, + { algochapter } { algorithm2e } + } +\int_compare:nNnT { \g__sjtu_math_style_int } > { 1 } + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { slantedGreek } { newtxmath }, + { slantedGreek } { newpxmath }, + { slantedGreek } { mathptmx } + } + } +\bool_if:NTF \g__sjtu_intlimits_bool + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { intlimits } { amsmath }, + { displaylimits } { cmupint } + } + } + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { nointlimits } { amsmath }, + { nolimits } { cmupint } + } + } +\bool_if:NF \g__sjtu_slint_bool + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { upint } { newtxmath }, + { upint } { newpxmath }, + { upint } { stix2 } + } + } +\clist_map_inline:Nn \g__sjtu_options_to_packages_clist + { \PassOptionsToPackage #1 } +\LoadClass { ctexrep } +\RequirePackage + { + mathtools, + geometry, + fancyhdr, + tocloft, + caption, + bicaption, + subcaption, + xcolor, + graphicx, + enumitem + } +\cs_generate_variant:Nn \tl_const:Nn { co, Nv } +\cs_generate_variant:Nn \cs_gset:Npn { cpo } +\prg_generate_conditional_variant:Nnn \regex_match:nn { ne } { T } +\exp_args_generate:n { Nnv } +\cs_new:Npx \__sjtu_engine_case:nn #1#2 + { + \bool_lazy_or:nnTF + { \sys_if_engine_xetex_p: } + { \sys_if_engine_luatex_p: } + {#2} + { \sys_if_engine_pdftex:T {#1} } + } +\cs_new:Npx \__sjtu_engine_case:nnn #1#2#3 + { + \sys_if_engine_xetex:TF + {#2} + { + \sys_if_engine_luatex:TF + {#3} + { \sys_if_engine_pdftex:T {#1} } + } + } +\cs_new:Npx \__sjtu_unicode_engine_case:nn #1#2 + { + \sys_if_engine_xetex:TF + {#1} + { \sys_if_engine_luatex:T {#2} } + } +\__sjtu_engine_case:nn + { + \cs_new:Npn \__sjtu_unicode_char:n #1 + { + \Unicode + { \int_div_truncate:nn {#1} { 256 } } + { \int_mod:nn {#1} { 256 } } + } + } + { \cs_new:Npn \__sjtu_unicode_char:n #1 { \tex_Uchar:D #1 \scan_stop: } } +\cs_new_protected:Npn \__sjtu_preto_cmd:Nn #1#2 + { + \ctex_preto_cmd:NnnTF #1 { } {#2} + { } { \ctex_patch_failure:N #1 } + } +\cs_new_protected:Npn \__sjtu_appto_cmd:Nn #1#2 + { + \ctex_appto_cmd:NnnTF #1 { } {#2} + { } { \ctex_patch_failure:N #1 } + } +\cs_new:Npn \__sjtu_fixed_line_skip:n #1 + { + \exp_args:Nx \linespread + { \fp_to_decimal:n { \dim_ratio:nn { #1 } { \f@size pt } / 1.2 } } + \selectfont + } +\NewDocumentCommand \fixedlineskip { m } + { \exp_args:Nx \__sjtu_fixed_line_skip:n {#1} \tex_ignorespaces:D } +\cs_new:Npn \__sjtu_dim_set_to_wd:Nn #1#2 + { + \hbox_set:Nn \l__sjtu_tmpa_box {#2} + \dim_set:Nn #1 { \box_wd:N \l__sjtu_tmpa_box } + } +\cs_new:Npn \__sjtu_dim_add_to_wd:Nn #1#2 + { + \hbox_set:Nn \l__sjtu_tmpa_box {#2} + \dim_add:Nn #1 { \box_wd:N \l__sjtu_tmpa_box } + } +\cs_generate_variant:Nn \__sjtu_dim_set_to_wd:Nn { Nv } +\cs_generate_variant:Nn \__sjtu_dim_add_to_wd:Nn { cv } +\cs_new_protected:Npn \__sjtu_vspace:N #1 + { + \skip_vertical:N #1 + \skip_vertical:N \c_zero_skip + } +\cs_new_protected:Npn \__sjtu_vspace:n #1 + { + \skip_set:Nn \l__sjtu_tmpa_skip {#1} + \__sjtu_vspace:N \l__sjtu_tmpa_skip + } +\cs_new_protected:Npn \__sjtu_vspace_r:N #1 + { + \dim_set_eq:NN \l__sjtu_tmpa_dim \prevdepth + \hrule height \c_zero_dim + \nobreak + \skip_vertical:N #1 + \skip_vertical:N \c_zero_skip + \dim_set_eq:NN \prevdepth \l__sjtu_tmpa_dim + } +\cs_new_protected:Npn \__sjtu_vspace_r:n #1 + { + \skip_set:Nn \l__sjtu_tmpa_skip {#1} + \__sjtu_vspace_r:N \l__sjtu_tmpa_skip + } +\__sjtu_engine_case:nnn + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \bool_set_false:N \l__sjtu_tmpa_bool + \cs_set_eq:NN \SJTU@CJK@filltwosidesSymbol \CJKsymbol + \cs_set:Npn \CJKsymbol ##1 + { + \bool_if:NTF \l__sjtu_tmpa_bool + { \hfil \SJTU@CJK@filltwosidesSymbol { ##1 } } + { + \SJTU@CJK@filltwosidesSymbol { ##1 } + \bool_set_true:N \l__sjtu_tmpa_bool + } + } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \cs_set:Npn \CJKglue + { \skip_horizontal:n { \c_zero_dim plus 1 filll } } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \ltjsetparameter { kanjiskip = { \c_zero_dim plus 1 filll } } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } +\cs_new_protected:Npn \__sjtu_left_aligned_box:nn #1#2 + { + \mode_leave_vertical: + \hbox_to_wd:nn {#1} { #2 \hfil } + } +\cs_new_protected:Npn \__sjtu_define_name:nn #1#2 + { \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} } +\cs_new_protected:Npn \__sjtu_define_name:nnn #1#2#3 + { + \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} + \tl_const:cn { c__sjtu_name_ #1 _en_tl } {#3} + } +\cs_new_protected:Npn \__sjtu_define_name_g:nn #1#2 + { \tl_const:cn { c__sjtu_name_ #1 _tl } {#2} } +\cs_new_protected:Npn \__sjtu_define_name_g:nnn #1#2#3 + { + \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} + \tl_const:cn { c__sjtu_name_ #1 _en_tl } {#3} + \tl_gset_eq:cc + { c__sjtu_name_ #1 _tl } + { c__sjtu_name_ #1 _ \g__sjtu_lang_tl _tl } + } +\cs_new_protected:Npn \__sjtu_define_name_from_clist:nNnn #1#2#3#4 + { + \tl_const:cx { c__sjtu_name_ #1 _zh_tl } + { \clist_item:nn {#3} {#2} } + \tl_const:cx { c__sjtu_name_ #1 _en_tl } + { \clist_item:nn {#4} {#2} } + } +\cs_new_protected:Npn \__sjtu_define_symbol:nn #1#2 + { \tl_const:co { c__sjtu_symbol_ #1 _tl } { \__sjtu_unicode_char:n {#2} } } +\cs_new:Npn \__sjtu_date_aux_zh:nnn #1#2#3 + { \__zhnum_date_aux:Nnnnn \int_to_arabic:n { ~ } {#1} {#2} {#3} } +\cs_new:Npn \__sjtu_date_aux_zh:w #1-#2-#3 \q_stop + { \__sjtu_date_aux_zh:nnn {#1} {#2} {#3} } +\clist_const:Nn \c__sjtu_name_month_en_clist + { + January, February, March, April, May, June, + July, August, September, October, November, December + } +\cs_new:Npn \__sjtu_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 } + } + } + } +\cs_new:Npn \__sjtu_date_aux_en:nnn #1#2#3 + { \clist_item:Nn \c__sjtu_name_month_en_clist {#2}~ \__sjtu_ordinal_en:n {#3},~ #1 } +\cs_new:Npn \__sjtu_date_aux_en:w #1-#2-#3 \q_stop + { \__sjtu_date_aux_en:nnn {#1} {#2} {#3} } +\clist_map_inline:nn + { zh, en } + { + \tl_const:cx { c__sjtu_today_ #1 _tl } + { + \use:c { __sjtu_date_aux_ #1 :nnn } + { \int_value:w \tex_year:D } + { \tex_month:D } + { \tex_day:D } + } + } +\tl_const:Nv \c__sjtu_today_tl { c__sjtu_today_ \g__sjtu_lang_tl _tl } +\file_input:n { sjtu-name-generic.cfg } +\NewDocumentCommand \sjtusetup { } { \keys_set:nn { sjtu } } +\keys_define:nn { sjtu } + { + info .meta:nn = { sjtu / info } {#1} , + style .meta:nn = { sjtu / style } {#1} , + name .meta:nn = { sjtu / name } {#1} + } +\clist_map_inline:nn + { + title, display_title, running_title, subject, author, date, + supervisor, assoc_supervisor, department, + } + { + \tl_new:c { l__sjtu_info_ #1 _zh_tl } + } +\tl_new:N \l__sjtu_info_id_zh_tl +\clist_map_inline:nn + { keywords } + { + \clist_new:c { l__sjtu_info_ #1 _zh_clist } + } +\keys_define:nn { sjtu / info } + { + title .code:n = + { + \tl_set:Nn \l__sjtu_info_title_zh_tl {#1} + \clist_map_inline:nn + { + \l__sjtu_info_display_title_zh_tl , + \l__sjtu_info_running_title_zh_tl + } + { \tl_if_empty:NT ##1 { \tl_set:Nn ##1 {#1} } } + } , + display-title .tl_set:N = \l__sjtu_info_display_title_zh_tl , + running-title .tl_set:N = \l__sjtu_info_running_title_zh_tl , + subject .tl_set:N = \l__sjtu_info_subject_zh_tl , + keywords .clist_set:N = \l__sjtu_info_keywords_zh_clist , + author .tl_set:N = \l__sjtu_info_author_zh_tl , + id .tl_set:N = \l__sjtu_info_id_zh_tl , + supervisor .tl_set:N = \l__sjtu_info_supervisor_zh_tl , + assoc-supervisor .tl_set:N = \l__sjtu_info_assoc_supervisor_zh_tl , + department .tl_set:N = \l__sjtu_info_department_zh_tl , + date .code:n = + { + \regex_match:neT { \d{4}-\d{2}-\d{2} } {#1} + { + \tl_set:Nx \l__sjtu_info_date_zh_tl + { \exp_last_unbraced:Ne \__sjtu_date_aux_zh:w #1 \q_stop } + \tl_set:Nx \l__sjtu_info_date_en_tl + { \exp_last_unbraced:Ne \__sjtu_date_aux_en:w #1 \q_stop } + } + } , + display-date .tl_set:N = \l__sjtu_info_date_zh_tl , + display-date .initial:V = \c__sjtu_today_tl , + } +\RenewDocumentCommand \title { s +m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { title* = {#2} } } + { \keys_set_known:nn { sjtu / info } { title = {#2} } } + } +\tl_set:Nn \@title { \l__sjtu_info_title_zh_tl } +\RenewDocumentCommand \author { s m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { author* = {#2} } } + { \keys_set_known:nn { sjtu / info } { author = {#2} } } + } +\tl_set:Nn \@author { \l__sjtu_info_author_zh_tl } +\RenewDocumentCommand \date { s m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { display-date* = {#2} } } + { \keys_set_known:nn { sjtu / info } { display-date = {#2} } } + } +\tl_set:Nn \@date { \l__sjtu_info_date_zh_tl } +\tl_set:Nv \today { c__sjtu_today_ \g__sjtu_lang_tl _tl } +\keys_define:nn { sjtu / style } + { + float-font .tl_set:N = \SJTU@style@float@font , + float-font .initial:n = \zihao { 5 } \fixedlineskip { 15.6 bp } , + caption-font .code:n = + { \DeclareCaptionFont { SJTU@font } {#1} } , + caption-font .initial:n = \zihao { 5 } \bfseries , + subcaption-font .code:n = + { \DeclareCaptionFont { SJTU@sub@font } {#1} } , + subcaption-font .initial:n = \zihao { 5 } \normalfont , + fnmark-font .tl_set:N = \l__sjtu_style_fnmark_font_tl , + fnmark-font .initial:n = , + float-num-sep .tl_set:N = \l__sjtu_style_fl_num_sep_tl , + float-num-sep .initial:n = { -- } , + equation-num-sep .tl_set:N = \l__sjtu_style_eq_num_sep_tl , + equation-num-sep .initial:n = { -- } , + title-logo-color .choice: , + title-logo-color .choices:nn = + { red, blue, black } + { \tl_set_eq:NN \l__sjtu_style_title_logo_color_tl \l_keys_choice_tl } , + title-logo-color .initial:n = { red } , + header-logo-color .choice: , + header-logo-color .choices:nn = + { red, blue, black } + { \tl_set_eq:NN \l__sjtu_style_header_logo_color_tl \l_keys_choice_tl } , + header-logo-color .initial:n = { red } , + header-uppercase .choice: , + header-uppercase / true .code:n = + { \cs_gset_eq:NN \__sjtu_nouppercase:n \use:n } , + header-uppercase / false .code:n = + { \cs_gset:Nn \__sjtu_nouppercase:n { \nouppercase {##1} } } , + header-uppercase .default:n = { true } , + header-uppercase .initial:n = { false } , + header-font .tl_set:N = \l__sjtu_style_header_font_tl , + header-font .initial:n = \zihao { -5 } \sffamily , + footer-font .tl_set:N = \l__sjtu_style_footer_font_tl , + footer-font .initial:n = \zihao { -5 } , + page-number .cs_set:Np = \__sjtu_page:n #1 , + page-number .initial:n = { {#1} } + } +\keys_define:nn { sjtu / name } + { + contents .tl_set:N = \contentsname , + listfigure .tl_set:N = \listfigurename , + listtable .tl_set:N = \listtablename , + figure .tl_set:N = \figurename , + table .tl_set:N = \tablename , + abstract .tl_set:N = \abstractname , + index .tl_set:N = \indexname , + appendix .tl_set:N = \appendixname , + proof .tl_set:N = \proofname , + bib .tl_set:N = \bibname , + figure* .tl_set:N = \l__sjtu_name_figure_aux_tl , + figure* .initial:n = { 图 } , + table* .tl_set:N = \l__sjtu_name_table_aux_tl , + table* .initial:n = { 表 } , + algorithm .tl_set:N = \l__sjtu_name_algorithm_tl , + algorithm .initial:n = { Algorithm } , + listalgorithm .tl_set:N = \l__sjtu_name_listalgorithm_tl , + listalgorithm .initial:n = { List~of~Algorithms } , + } +\file_input:n { sjtu-lang-report- \g__sjtu_lang_tl .cfg } +\cs_new_protected:Npn \__sjtu_fontset_error:nn #1#2 + { \msg_error:nnnn { sjtutex } { font-unavailable } {#1} {#2} } +\msg_new:nnn { sjtutex } { font-unavailable } + { `#1-font~ =~ #2'~ is~ unavailable~ in~ current~ mode. } +\cs_new_eq:NN \__sjtu_fontset_case:nn \__sjtu_engine_case:nn +\cs_new:Npx \__sjtu_fontset_case:nnn #1#2#3 + { + \__sjtu_engine_case:nn + { \sys_if_output_pdf:TF {#1} {#2} } + {#3} + } +\cs_new_protected:Nn \__sjtu_set_slanted_greek: + { + \clist_const:Nn \c__sjtu_uppercase_greek_clist + { Gamma, Delta, Theta, Lambda, Xi, Pi, Sigma, Upsilon, Phi, Psi, Omega } + \clist_map_inline:Nn \c__sjtu_uppercase_greek_clist + { + \cs_set_eq:cc { up ##1 } { ##1 } + \cs_set_eq:cc { it ##1 } { var ##1 } + } + \int_compare:nNnT { \g__sjtu_math_style_int } > { 1 } + { + \clist_map_inline:Nn \c__sjtu_uppercase_greek_clist + { \cs_set_eq:cc { ##1 } { it ##1 } } + } + } +\cs_new_protected:Nn \__sjtu_set_unimath_symbol: + { + \cs_set_eq:NN \increment \upDelta + \cs_set_eq:NN \QED \blacksquare + } +\tl_if_empty:NT \g__sjtu_math_font_tl + { \tl_gset_eq:NN \g__sjtu_math_font_tl \g__sjtu_text_font_tl } +\tl_if_empty:NT \g__sjtu_cjk_font_tl + { + \sys_if_platform_windows:TF + { \tl_gset:Nn \g__sjtu_cjk_font_tl { windows } } + { + \ctex_if_platform_macos:TF + { \tl_gset:Nn \g__sjtu_cjk_font_tl { mac } } + { \tl_gset:Nn \g__sjtu_cjk_font_tl { fandol } } + } + } +\cs_new_protected:Npn \__sjtu_load_font:nn #1#2 + { + \str_if_eq:eeF { \tl_use:c { g__sjtu_ #1 _font_tl } } { none } + { + \file_if_exist:nF + { sjtu- #1 -font- \tl_use:c { g__sjtu_ #1 _font_tl } .def } + { + \msg_warning:nnnn { sjtutex } { invalid-font } {#1} {#2} + \tl_gset:cn { g__sjtu_ #1 _font_tl } {#2} + } + \ctex_file_input:n + { sjtu- #1 -font- \tl_use:c { g__sjtu_ #1 _font_tl } .def } + } + } +\msg_new:nnn { sjtutex } { invalid-font } + { + Invalid~ value~ `#1-font~ =~ \tl_use:c { g__sjtu_ #1 _font_tl }~ '! \\\\ + Using~ `#2'~ instead. + } +\cs_new_protected:Nn \__sjtu_load_fontset: + { + \clist_map_inline:nn + { + { math } { newtx }, + { text } { newtx }, + { cjk } { fandol } + } + { \__sjtu_load_font:nn ##1 } + } +\@onlypreamble \__sjtu_load_font:nn +\@onlypreamble \__sjtu_load_fontset: +\__sjtu_load_fontset: +\ctex_at_end_package:nn { unicode-math } + { + \DeclareDocumentCommand \bm { m } + { { \symbf {#1} } } + \DeclareDocumentCommand \boldsymbol { m } + { { \symbf {#1} } } + \int_compare:nNnTF { \g__sjtu_math_style_int } > { 1 } + { \keys_set:nn { unicode-math } { math-style = ISO } } + { \keys_set:nn { unicode-math } { math-style = TeX } } + } +\__sjtu_unicode_engine_case:nn + { + \xeCJK_declare_char_class:nn { CJK } + { "24EA, "2460->"2473, "3251->"32BF, "25A1 } + } + { + \ltjdefcharrange { 99 } + { "24EA, "2460-"2473, "3251-"32BF, "25A1 } + \ltjsetparameter { jacharrange = { +99 } } + } +\geometry + { + paper = a4paper, + top = 3.5 cm, + bottom = 4.0 cm, + left = 2.5 cm, + right = 2.5 cm, + headheight = 1.5 cm, + headsep = 0.5 cm, + footskip = 1.0 cm + } +\pagestyle { fancy } +\cs_new:Nn \__sjtu_thepage: { \thepage } +\fancyhf { } +\tl_set:Nn \l__sjtu_header_logo_tl + { + \includegraphics [ height = 1.2 cm ] + { sjtu-vi-logo- \l__sjtu_style_header_logo_color_tl .pdf } + } +\bool_if:NTF \g__sjtu_twoside_bool + { + \fancyhead [ RE, LO ] + { \l__sjtu_header_logo_tl } + \fancyhead [ RO ] + { + \l__sjtu_style_header_font_tl + \__sjtu_nouppercase:n { \rightmark } + } + \fancyhead [ LE ] + { + \__sjtu_nouppercase:n { \leftmark } + } + } + { + \fancyhead [ L ] + { \l__sjtu_header_logo_tl } + \fancyhead [ R ] + { + \l__sjtu_style_header_font_tl + \__sjtu_nouppercase:n { \leftmark } + } + } +\fancyfoot [ C ] + { + \l__sjtu_style_footer_font_tl + \__sjtu_page:n { \__sjtu_thepage: } + } +\bool_if:NTF \g__sjtu_twoside_bool + { + \fancypagestyle { plain } + { + \fancyhead [ RE, LO ] { } + \tl_set:Nn \headrulewidth { 0 pt } + } + } + { + \fancypagestyle { plain } + { + \fancyhead [ R ] { } + \tl_set:Nn \headrulewidth { 0 pt } + } + } +\cs_new_eq:NN \ps@SJTU@null \prg_do_nothing: +\RenewDocumentCommand \cleardoublepage { } + { + \clearpage + \bool_if:NT \g__sjtu_twoside_bool + { + \int_if_odd:nF \c@page + { \hbox:n { } \thispagestyle { empty } \newpage } + } + } +\ctex_set:nn { chapter } + { + pagestyle = SJTU@null , + fixskip = true , + beforeskip = 24 bp , + afterskip = 18 bp , + lofskip = \c_zero_skip , + lotskip = \c_zero_skip , + format = \zihao { 3 } \bfseries \heiti \centering , + nameformat = , + titleformat = , + aftername = \quad , + afterindent = true + } +\ctex_set:nn { section } + { + beforeskip = 24 bp , + afterskip = 6 bp , + format = \zihao { 4 } \bfseries \heiti , + afterindent = true + } +\ctex_set:nn { subsection } + { + beforeskip = 12 bp , + afterskip = 6 bp , + format = \zihao { -4 } \bfseries \heiti , + afterindent = true + } +\ctex_set:nn { subsubsection } + { + beforeskip = 6 bp , + afterskip = 6 bp , + format = \zihao { -4 } \normalfont , + afterindent = true + } +\ctex_set:nn { paragraph } + { afterindent = true } +\ctex_set:nn { subparagraph } + { afterindent = true } +\ctex_set:n { secnumdepth = 3 } +\NewDocumentCommand \SJTU@head { s O{#3} m O{#2} } + { + \CTEX@chapter@break + \IfBooleanTF {#1} + { \tl_if_empty:nF {#4} { \__sjtu_pdf_bookmark:nn { 0 } {#4} } } + { + \__sjtu_phantom_section: + \addcontentsline { toc } { chapter } {#4} + } + \cs_set_eq:NN \__sjtu_orig_ctex_gettitle:n \CTEX@gettitle + \cs_set:Npn \CTEX@gettitle ##1 { \__sjtu_orig_ctex_gettitle:n {#2} } + \chapter* {#3} + \cs_set_eq:NN \CTEX@gettitle \__sjtu_orig_ctex_gettitle:n + \@mkboth { \MakeUppercase {#2} } { \MakeUppercase {#2} } + } +\cs_new:Npn \__sjtu_head_aux:n #1 + { \SJTU@head {#1} } +\cs_new:Npn \__sjtu_head_aux_s:n #1 + { \SJTU@head* {#1} } +\cs_new:Npn \__sjtu_head_auxa_s:nn #1#2 + { \SJTU@head* {#1} [#2] } +\cs_new:Npn \__sjtu_head_auxb_s:nn #1#2 + { \SJTU@head* [#1] {#2} } +\cs_generate_variant:Nn \__sjtu_head_aux:n { V } +\cs_generate_variant:Nn \__sjtu_head_aux_s:n { V } +\cs_generate_variant:Nn \__sjtu_head_auxa_s:nn { Vn, VV } +\cs_generate_variant:Nn \__sjtu_head_auxb_s:nn { Vo } +\cs_new_eq:NN \__sjtu_pdf_bookmark:nn \use_none:nn +\cs_new_eq:NN \__sjtu_phantom_section: \prg_do_nothing: +\ctex_if_autoindent_touched:F + { \ctex_set:n { autoindent = true } } +\ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } +\ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } +\ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd } +\setlist { nosep } +\tl_set:Nn \textfraction { 0.15 } +\tl_set:Nn \topfraction { 0.85 } +\tl_set:Nn \bottomfraction { 0.65 } +\tl_set:Nn \floatpagefraction { 0.60 } +\ctex_patch_cmd:Nnn \@floatboxreset + { \normalsize } { \SJTU@style@float@font } +\DeclareCaptionLabelSeparator { enskip } { \enskip } +\captionsetup + { + labelsep = enskip , + justification = centering , + font = SJTU@font + } +\captionsetup [ sub ] + { + format = hang , + justification = justified , + font = SJTU@sub@font + } +\DeclareCaptionOption { aux-names } [ ] + { + \tl_set:Nn \figurename { \l__sjtu_name_figure_aux_tl } + \tl_set:Nn \tablename { \l__sjtu_name_table_aux_tl } + } +\captionsetup [ bi-second ] { aux-names } +\NewDocumentCommand \SJTUcounterwithin + { s O{ \l__sjtu_style_fl_num_sep_tl } O{ \arabic } m m } + { + \@ifbothcounters {#4} {#5} + { + \@addtoreset {#4} {#5} + \IfBooleanF {#1} + { + \cs_gset:cpo { the #4 } + { \cs:w the #5 \cs_end: #2 #3 {#4} } + } + } + } +\cs_set:Npn \thefigure + { \thechapter \l__sjtu_style_fl_num_sep_tl \arabic { figure } } +\cs_set:Npn \thetable + { \thechapter \l__sjtu_style_fl_num_sep_tl \arabic { table } } +\cs_set:Npn \theequation + { \thechapter \l__sjtu_style_eq_num_sep_tl \arabic { equation } } +\cs_new_protected:Nn \__sjtu_make_fnmark: + { \hbox:n { \@thefnmark } } +\ctex_at_end_preamble:n { + \cs_set_eq:NN \__sjtu_orig_make_fntext:n \@makefntext + \cs_set:Npn \@makefntext #1 + { + \group_begin: + \cs_set_eq:NN \@makefnmark \__sjtu_make_fnmark: + \__sjtu_orig_make_fntext:n {#1} + \group_end: + } +} +\cs_new:Npn \__sjtu_footnote_number:N #1 + { + \int_compare:nNnTF {#1} < { 21 } + { \__sjtu_unicode_char:n { \int_eval:n { "2460 - 1 + #1 } } } + { + \int_compare:nNnTF {#1} < { 36 } + { \__sjtu_unicode_char:n { \int_eval:n { "3251 - 21 + #1 } } } + { + \int_compare:nNnTF {#1} < { 51 } + { \__sjtu_unicode_char:n { \int_eval:n { "32B1 - 36 + #1 } } } + { \msg_warning:nn { sjtutex } { too-many-footnotes } } + } + } + } +\msg_new:nnn { sjtutex } { too-many-footnotes } + { Too~ many~ footnotes. } +\cs_set:Npn \thefootnote + { + \hbox:n { } + { \l__sjtu_style_fnmark_font_tl \__sjtu_footnote_number:N \c@footnote } + } +\cs_set:Npn \thempfootnote + { + \hbox:n { } + { \l__sjtu_style_fnmark_font_tl \__sjtu_footnote_number:N \c@mpfootnote } + } +\DeclareObjectType { sjtu } { 0 } +\DeclareTemplateInterface { sjtu } { component } { 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 } { component } { 0 } + { + format = \l__sjtu_component_format_tl , + content = \l__sjtu_component_content_tl , + bottom-skip = \l__sjtu_component_bottom_skip , + align = + { + left = + \cs_set_eq:NN \l__sjtu_component_align: \raggedright , + right = + \cs_set_eq:NN \l__sjtu_component_align: \raggedleft , + center = + \cs_set_eq:NN \l__sjtu_component_align: \centering , + normal = + \cs_set_eq:NN \l__sjtu_component_align: \prg_do_nothing: + } + } + { + \AssignTemplateKeys + \group_begin: + \l__sjtu_component_align: + \l__sjtu_component_format_tl + \l__sjtu_component_content_tl + \par + \group_end: + \__sjtu_vspace:N \l__sjtu_component_bottom_skip + } +\DeclareTemplateInterface { sjtu } { page } { 0 } + { + bookmark : boolean = false , + bookmark-text : tokenlist = \c_empty_tl , + style : tokenlist = empty , + format : tokenlist = \linespread { 1 } \selectfont , + prefix : tokenlist , + components : commalist , + top-skip : skip = \c_zero_skip , + bottom-skip : skip = \c_zero_skip + } +\DeclareTemplateCode { sjtu } { page } { 0 } + { + bookmark = \l__sjtu_page_bookmark_bool , + bookmark-text = \l__sjtu_page_bookmark_text_tl , + style = \l__sjtu_page_style_tl , + format = \l__sjtu_page_format_tl , + prefix = \l__sjtu_page_prefix_tl , + components = \l__sjtu_page_components_clist , + top-skip = \l__sjtu_page_top_skip , + bottom-skip = \l__sjtu_page_bottom_skip + } + { + \AssignTemplateKeys + \bool_if:NTF \g__sjtu_openright_bool + { \cleardoublepage } { \clearpage } + \bool_if:NT \l__sjtu_page_bookmark_bool + { \__sjtu_pdf_bookmark:nn { 0 } { \l__sjtu_page_bookmark_text_tl } } + \exp_args:No \thispagestyle { \l__sjtu_page_style_tl } + \__sjtu_vspace_r:N \l__sjtu_page_top_skip + \__sjtu_vspace:n { - \tex_parskip:D } + \__sjtu_vspace:n { - \tex_baselineskip:D } + \group_begin: + \l__sjtu_page_format_tl + \clist_map_inline:Nn \l__sjtu_page_components_clist + { \UseInstance { sjtu } { \l__sjtu_page_prefix_tl / ##1 } } + \group_end: + \__sjtu_vspace:N \l__sjtu_page_bottom_skip + \clearpage + } +\cs_new:Npn \__sjtu_declare_component:nnn #1#2#3 + { \DeclareInstance { sjtu } {#1/#2} { component } {#3} } +\cs_new:Npn \__sjtu_declare_page:nn #1#2 + { \DeclareInstance { sjtu } {#1} { page } {#2} } +\cs_new:Npn \__sjtu_title_page_info:nnn #1#2#3 + { + \group_begin: + \cs_set:Npn \l__sjtu_info_output_format:NNN ##1##2##3 {#3} + \clist_clear:N \l__sjtu_tmpa_clist + \clist_clear:N \l__sjtu_tmpb_clist + \dim_set:Nn \l__sjtu_tmpb_dim { 5 em } + \clist_map_inline:nn {#2} + { + \clist_put_right:No \l__sjtu_tmpa_clist + { \cs:w c__sjtu_name_ ##1 _ #1 _tl \cs_end: } + \clist_put_right:No \l__sjtu_tmpb_clist + { \cs:w l__sjtu_info_ ##1 _ #1 _tl \cs_end: } + \__sjtu_dim_set_to_wd:Nv \l__sjtu_tmpa_dim { l__sjtu_info_ ##1 _ #1 _tl } + \dim_set:Nn \l__sjtu_tmpb_dim + { \dim_max:nn { \l__sjtu_tmpa_dim } { \l__sjtu_tmpb_dim } } + } + \bool_until_do:nn + { \clist_if_empty_p:N \l__sjtu_tmpa_clist } + { + \clist_pop:NN \l__sjtu_tmpa_clist \l__sjtu_tmpa_tl + \clist_pop:NN \l__sjtu_tmpb_clist \l__sjtu_tmpb_tl + \l__sjtu_info_output_format:NNN + \l__sjtu_tmpa_tl \l__sjtu_tmpb_dim \l__sjtu_tmpb_tl + \skip_vertical:N \c_zero_dim + } + \group_end: + } +\cs_generate_variant:Nn \__sjtu_title_page_info:nnn { nxn } +\clist_map_inline:nn + { + { logo } + { + content = + { + \includegraphics [ width = 3 cm ] + { sjtu-vi-badge- \l__sjtu_style_title_logo_color_tl .pdf } + \skip_vertical:n { 0.3 cm } + \includegraphics [ width = 6.81 cm ] + { sjtu-vi-name- \l__sjtu_style_title_logo_color_tl .pdf } + } + }, + { subject } + { + format = \zihao { -2 } \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_subject_zh_tl , + bottom-skip = \c_zero_dim plus 2 fill + }, + { title } + { + format = \zihao { 2 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_display_title_zh_tl , + bottom-skip = \c_zero_dim plus 3 fill + }, + { info } + { + format = \zihao { 4 } \fixedlineskip { 31.2 bp } , + content = + { + \__sjtu_title_page_info:nxn { zh } + { + author, + id, + supervisor, + \tl_if_empty:NF \l__sjtu_info_assoc_supervisor_zh_tl + { assoc_supervisor }, + department, + } + { + \__sjtu_cjk_spread_box:nn { 5 em } { \heiti #1 } + \c__sjtu_name_info_sep_zh_tl + \__sjtu_left_aligned_box:nn {#2} {#3} + } + } , + bottom-skip = 31.2 bp + }, + { date } + { + format = \zihao { 4 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_date_zh_tl + } + } + { + \__sjtu_declare_component:nnn { title / zh } #1 + } +\__sjtu_declare_page:nn { title / zh } + { + bookmark = true , + bookmark-text = \c__sjtu_name_title_page_tl , + prefix = title / zh , + components = { logo, subject, title, info, date } + } +\bool_if:NT \g__sjtu_titlepage_bool + { + \RenewDocumentCommand \maketitle { } + { \UseInstance { sjtu } { title / zh } } + } +\cs_new:Nn \__sjtu_output_keywords:Nnn + { + \clist_if_empty:NF #1 + { + \par \mode_leave_vertical: \par \noindent + { \bfseries #2 } \clist_use:Nn #1 {#3} + } + } +\bool_if:NTF \g__sjtu_titlepage_bool + { + \DeclareDocumentEnvironment { abstract } { } + { + \__sjtu_head_aux_s:n { \abstractname } + } + { + \__sjtu_output_keywords:Nnn \l__sjtu_info_keywords_zh_clist + { \c__sjtu_name_keywords_tl } { \c__sjtu_name_item_sep_tl } + \clearpage + } + } + { + \__sjtu_preto_cmd:Nn \endabstract + { + \__sjtu_output_keywords:Nnn \l__sjtu_info_keywords_zh_clist + { \c__sjtu_name_keywords_tl } { \c__sjtu_name_item_sep_tl } + } + } +\DeclareDocumentCommand \tableofcontents { } + { + \__sjtu_head_aux_s:n { \contentsname } + \@starttoc { toc } + } +\NewDocumentCommand \SJTU@listof { m m s } + { + \IfBooleanTF {#3} + { \__sjtu_head_aux_s:n {#1} } + { \__sjtu_head_aux:n {#1} } + \exp_args:Nv \@starttoc { ext@ #2 } + } +\DeclareDocumentCommand \listoffigures { } + { \SJTU@listof { \listfigurename } { figure } } +\DeclareDocumentCommand \listoftables { } + { \SJTU@listof { \listtablename } { table } } +\tl_set:Nn \cftdotsep { 1 } +\tl_set:Nn \cftchapleader { \normalfont \cftdotfill { \cftdotsep } } +\cs_new_protected:Nn \__sjtu_update_cft_presnum: + { + \tl_set:Nn \cftfigpresnum { \figurename \c_space_tl } + \__sjtu_dim_add_to_wd:Nn \cftfignumwidth { \cftfigpresnum } + \tl_set:Nn \cfttabpresnum { \tablename \c_space_tl } + \__sjtu_dim_add_to_wd:Nn \cfttabnumwidth { \cftfigpresnum } + } +\ctex_at_end_preamble:n + { \__sjtu_update_cft_presnum: } +\newcounter { SJTU@bib } +\NewDocumentEnvironment { @bibliolist } { m } + { + \cs_if_exist_use:N \bibfont + \list + { \@biblabel { \arabic{ SJTU@bib } } } + { + \__sjtu_dim_set_to_wd:Nn \labelwidth { \@biblabel {#1} } + \dim_set_eq:NN \leftmargin \labelwidth + \dim_add:Nn \leftmargin { \labelsep } + \dim_if_exist:NTF \bibitemsep + { + \dim_set_eq:NN \itemsep \bibitemsep + \dim_if_exist:NT \bibparsep + { \dim_set_eq:NN \parsep \bibparsep } + } + { + \dim_if_exist:NT \bibsep + { + \dim_set_eq:NN \itemsep \bibsep + \dim_zero:N \parsep + } + } + \@nmbrlisttrue + \tl_set:Nn \@listctr { SJTU@bib } + \cs_set:Npn \p@SJTU@bib { } + \cs_set:Npn \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 } + } + { + \cs_set:Npn \@noitemerr + { \msg_warning:nnn { sjtutex } { empty-environment } { bibliolist } } + \endlist + } +\msg_new:nnn { sjtutex } { empty-environment } + { Empty~ `#1'~ environment. } +\NewDocumentEnvironment { bibliolist } { m +b } + { + \cs_set:Npn \@noitemerr { } + \begin { @bibliolist } {#1} + #2 + \end { @bibliolist } + } { } +\NewDocumentEnvironment { bibliolist* } { m +b } + { + \cs_set:Npn \@noitemerr { } + \begin { @bibliolist } {#1} + #2 + \end { @bibliolist } + } { } +\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__sjtu_bookmark_int + \cs_gset_protected:Npn \__sjtu_pdf_bookmark:nn #1#2 + { + \phantomsection + \int_gincr:N \g__sjtu_bookmark_int + \pdfbookmark [#1] {#2} + { sjtubookmark. \int_use:N \g__sjtu_bookmark_int } + } + \cs_gset_eq:NN \__sjtu_phantom_section: \phantomsection + \pdfstringdefDisableCommands + { + \cs_set_eq:NN \\ \prg_do_nothing: + \cs_set_eq:NN \quad \c_empty_tl + \cs_set_eq:NN \qquad \c_empty_tl + \cs_set_eq:NN \hspace \use_none:n + } + \ctex_after_end_preamble:n + { + \hypersetup + { + pdftitle = \l__sjtu_info_title_zh_tl, + pdfsubject = \l__sjtu_info_subject_zh_tl, + pdfkeywords = \l__sjtu_info_keywords_zh_clist, + pdfauthor = \l__sjtu_info_author_zh_tl + } + } + } +\ctex_at_end_package:nn { threeparttable } + { \tl_put_right:Nn \TPTnoteSettings { \footnotesize } } +\ctex_at_end_package:nn { longtable } + { \AtBeginEnvironment { longtable } { \SJTU@style@float@font } } +\cs_new_protected:Nn \__sjtu_new_theorems: + { + \clist_map_inline:nn + { + assumption, axiom, conjecture, corollary, definition, example, + exercise, lemma, problem, proposition, theorem + } + { \exp_args:Nnv \newtheorem {##1} { c__sjtu_name_ ##1 _tl } [ chapter ] } + \clist_map_inline:nn + { remark, solution } + { \exp_args:NNnv \newtheorem* {##1} { c__sjtu_name_ ##1 _tl } } + } +\ctex_at_begin_package:nn { amsthm } + { + \cs_if_exist:NT \openbox + { + \cs_new_eq:NN \__sjtu_save_openbox: \openbox + \cs_undefine:N \openbox + } + } +\ctex_at_end_package:nn { amsthm } + { + \cs_if_exist:NT \__sjtu_save_openbox: + { \cs_set_eq:NN \openbox \__sjtu_save_openbox: } + \tl_set:Nn \qedsymbol { \ensuremath { \QED } } + \RenewDocumentEnvironment { proof } { O{ \proofname } } + { + \par \pushQED { \qed } + \normalfont \dim_zero:N \topsep + \trivlist + \item + [ + \skip_horizontal:N \labelsep + \bfseries \heiti #1 \@addpunct { \enskip } + ] + \ignorespaces + } + { \popQED \endtrivlist \legacy_if_set_false:n { @endpe } } + \newtheoremstyle { sjtu } + { } { } { \normalfont } { } { \bfseries \heiti } { } { \ccwd } { } + \theoremstyle { sjtu } + \__sjtu_new_theorems: + } +\ctex_at_end_package:nn { ntheorem } + { + \theoremheaderfont { \bfseries \heiti } + \theorembodyfont { \normalfont } + \theoremseparator { \enskip } + \theoremsymbol { \ensuremath { \QED } } + \qedsymbol { \ensuremath { \QED } } + \newtheorem* { proof } { \proofname } + \theoremsymbol { } + \__sjtu_new_theorems: + } +\cs_new_protected:Npn \__sjtu_newlistof:nnnnn #1#2#3#4#5 + { + \exp_args:Nnv \newlistentry {#2} { ext@ #3 } { 0 } + \exp_args:Ne \newcounter { \tl_use:c { ext@ #3 } depth } + \exp_args:Ne \setcounter { \tl_use:c { ext@ #3 } depth } { 1 } + \dim_set:cn { cft #2 indent } { 1.5 em } + \dim_set:cn { cft #2 numwidth } { 2.3 em } + \cs_set_eq:cc { l@ #3 } { l@ #2 } + \__sjtu_appto_cmd:Nn \__sjtu_update_cft_presnum: + { + \tl_set:cn { cft #2 presnum } { #4 \c_space_tl } + \__sjtu_dim_add_to_wd:cv { cft #2 numwidth } { cft #2 presnum } + } + \exp_args:Nc \DeclareDocumentCommand { listof #1 s } { } + { \SJTU@listof {#5} {#3} } + \cs_set:cpn { the #3 } + { \thechapter \l__sjtu_style_fl_num_sep_tl \arabic {#3} } + } +\ctex_at_end_package:nn { algorithm } + { + \tl_set:Nn \fname@algorithm { \l__sjtu_name_algorithm_tl } + \tl_set:Nn \listalgorithmname { \l__sjtu_name_listalgorithm_tl } + \__sjtu_newlistof:nnnnn { algorithm } { alg } { algorithm } + { \fname@algorithm } { \listalgorithmname } + } +\ctex_at_begin_package:nn { algorithm2e } + { \cs_set_eq:NN \__sjtu_save_chapter:w \@chapter } +\ctex_at_end_package:nn { algorithm2e } + { + \cs_set_eq:NN \@chapter \__sjtu_save_chapter:w + \SetAlgorithmName { \l__sjtu_name_algorithm_tl } + { \l__sjtu_name_algorithm_tl } + { \l__sjtu_name_listalgorithm_tl } + \SetAlgoCaptionSeparator { \enskip } + \__sjtu_newlistof:nnnnn { algorithm } { alg } { algocf } + { \algorithmcfname } { \listalgorithmcfname } + \ctex_patch_cmd:Nnn \algocf@latexcaption + { \addcontentsline } + { \caption@iflist { \addcontentsline } { \@gobblethree } } + } +\ctex_at_end_package:nn { listings } + { + \lstdefinestyle { lstStyleCode } + { + aboveskip = \medskipamount , + belowskip = \medskipamount , + basicstyle = \ttfamily \zihao { 6 } , + commentstyle = \slshape \color { black!60 } , + stringstyle = \color { green!40!black!100 } , + keywordstyle = \bfseries \color { blue!50!black } , + extendedchars = false , + upquote = true , + tabsize = 2 , + showstringspaces = false , + xleftmargin = 1 em , + xrightmargin = 1 em , + breaklines = false , + framexleftmargin = 1 em , + framexrightmargin = 1 em , + backgroundcolor = \color { gray!10 } , + columns = flexible , + keepspaces = true , + texcl = true , + mathescape = true + } + } +\ctex_at_end_package:nn { nomencl } + { \tl_set:Nn \nomname { \l__sjtu_name_nom_tl } } +\endinput +%% +%% End of file `sjtureport.cls'. diff --git a/texmf/tex/latex/sjtutex/sjtuthesis.cls b/texmf/tex/latex/sjtutex/sjtuthesis.cls new file mode 100644 index 00000000..6c484d80 --- /dev/null +++ b/texmf/tex/latex/sjtutex/sjtuthesis.cls @@ -0,0 +1,1682 @@ +%% +%% This is file `sjtuthesis.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sjtutex.dtx (with options: `class,thesis') +%% +%% Copyright (C) SJTUG +%% 2018--2022 Alexara Wu +%% 2022 Log Creative +%% +%% 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. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% TThe Current Maintainers of this work are Alexara Wu and Log Creative. +%% +\NeedsTeXFormat{LaTeX2e} +\RequirePackage{expl3} +\GetIdInfo $Id: sjtutex.dtx 2.0-alpha 2022-12-27 18:30:00Z Alexara Wu $ + {Thesis template for Shanghai Jiao Tong University} +\ProvidesExplClass{sjtuthesis} + {\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription} +\RequirePackage { xparse, xtemplate } +\msg_new:nnn { sjtutex } { l3-too-old } + { + Package~ "#1"~ is~ too~ old. \\\\ + Please~ update~ an~ up-to-date~ version~ of~ the~ bundles \\ + "l3kernel"~ and~ "l3packages"~ using~ your~ TeX~ package \\ + manager~ or~ from~ CTAN. + } +\@ifpackagelater { expl3 } { 2020/04/06 } { } + { \msg_error:nnn { sjtutex } { l3-too-old } {#1} } +\NewDocumentCommand \sjtuthesis { } { SJTU \textsc{ Thesis } } +\bool_new:N \l__sjtu_tmpa_bool +\int_new:N \l__sjtu_tmpa_int +\tl_new:N \l__sjtu_tmpa_tl +\tl_new:N \l__sjtu_tmpb_tl +\clist_new:N \l__sjtu_tmpa_clist +\clist_new:N \l__sjtu_tmpb_clist +\dim_new:N \l__sjtu_tmpa_dim +\dim_new:N \l__sjtu_tmpb_dim +\skip_new:N \l__sjtu_tmpa_skip +\box_new:N \l__sjtu_tmpa_box +\int_new:N \g__sjtu_thesis_type_int +\tl_new:N \g__sjtu_lang_tl +\tl_new:N \g__sjtu_lang_aux_tl +\tl_set:Nn \g__sjtu_lang_aux_tl { zh } +\tl_new:N \g__sjtu_zihao_tl +\dim_new:N \g__sjtu_font_size_dim +\dim_new:N \g__sjtu_line_skip_dim +\dim_new:N \g__sjtu_default_line_skip_dim +\fp_new:N \g__sjtu_line_spread_fp +\tl_new:N \g__sjtu_text_font_tl +\tl_new:N \g__sjtu_math_font_tl +\tl_new:N \g__sjtu_cjk_font_tl +\tl_new:N \g__sjtu_save_encodingdefault_tl +\tl_new:N \g__sjtu_save_rmdefault_tl +\tl_new:N \g__sjtu_save_sfdefault_tl +\tl_new:N \g__sjtu_save_ttdefault_tl +\int_new:N \g__sjtu_math_style_int +\bool_new:N \g__sjtu_intlimits_bool +\bool_set_false:N \g__sjtu_intlimits_bool +\bool_new:N \g__sjtu_slint_bool +\bool_set_false:N \g__sjtu_slint_bool +\bool_new:N \g__sjtu_review_bool +\clist_new:N \g__sjtu_options_to_ctex_class_clist +\clist_set:Nn \g__sjtu_options_to_ctex_class_clist + { UTF8, scheme = plain, fontset = none } +\clist_new:N \g__sjtu_options_to_packages_clist +\bool_new:N \g__sjtu_twoside_bool +\bool_set_true:N \g__sjtu_twoside_bool +\bool_new:N \g__sjtu_openright_bool +\bool_set_true:N \g__sjtu_openright_bool +\bool_new:N \g__sjtu_draft_bool +\keys_define:nn { sjtu / option } + { + type .choice: , + type .value_required:n = true , + type .choices:nn = + { bachelor, master, doctor } + { \int_gset_eq:NN \g__sjtu_thesis_type_int \l_keys_choice_int } , + type .initial:n = { master } , + lang .choice: , + lang .value_required:n = true , + lang .choices:nn = + { zh, en } + { + \tl_gset_eq:NN \g__sjtu_lang_tl \l_keys_choice_tl + \int_compare:nNnT { \l_keys_choice_int } = { 1 } + { \tl_gset:Nn \g__sjtu_lang_aux_tl { en } } + } , + lang .initial:n = { zh } , + zihao .choice: , + zihao .value_required:n = true , + zihao / -4 .code:n = + { + \tl_gset:Nn \g__sjtu_zihao_tl { -4 } + \dim_gset:Nn \g__sjtu_font_size_dim { 12 bp } + \dim_gset:Nn \g__sjtu_default_line_skip_dim { 20 bp } + } , + zihao / 5 .code:n = + { + \tl_gset:Nn \g__sjtu_zihao_tl { 5 } + \dim_gset:Nn \g__sjtu_font_size_dim { 10.5 bp } + \dim_gset:Nn \g__sjtu_default_line_skip_dim { 15.6 bp } + } , + zihao .initial:n = { -4 } , + lineskip .dim_gset:N = \g__sjtu_line_skip_dim , + text-font .tl_gset:N = \g__sjtu_text_font_tl , + text-font .initial:n = { newtx } , + math-font .tl_gset:N = \g__sjtu_math_font_tl , + cjk-font .tl_gset:N = \g__sjtu_cjk_font_tl , + math-style .choice: , + math-style .value_required: n = true, + math-style .choices:nn = + { TeX, ISO, GB } + { \int_gset_eq:NN \g__sjtu_math_style_int \l_keys_choice_int } , + math-style .initial:n = { TeX } , + nointlimits .value_forbidden:n = true, + intlimits .value_forbidden:n = true, + nointlimits .code:n = + { \bool_set_false:N \g__sjtu_intlimits_bool }, + intlimits .code:n = + { \bool_set_true:N \g__sjtu_intlimits_bool }, + upint .value_forbidden:n = true, + slint .value_forbidden:n = true, + upint .code:n = + { \bool_set_false:N \g__sjtu_slint_bool }, + slint .code:n = + { \bool_set_true:N \g__sjtu_slint_bool }, + oneside .value_forbidden:n = true, + twoside .value_forbidden:n = true, + oneside .code:n = + { \bool_set_false:N \g__sjtu_twoside_bool } , + twoside .code:n = + { \bool_set_true:N \g__sjtu_twoside_bool } , + openany .value_forbidden:n = true, + openright .value_forbidden:n = true, + openany .code:n = + { \bool_set_false:N \g__sjtu_openright_bool } , + openright .code:n = + { \bool_set_true:N \g__sjtu_openright_bool } , + draft .value_forbidden:n = true, + final .value_forbidden:n = true, + draft .code:n = + { \bool_set_true:N \g__sjtu_draft_bool }, + final .code:n = + { \bool_set_false:N \g__sjtu_draft_bool }, + review .bool_gset:N = \g__sjtu_review_bool , + review .initial:n = false , + unknown .code:n = { \msg_error:nn { sjtutex } { unknown-option } } + } +\msg_new:nnn { sjtutex } { unknown-option } + { Class~ option~ "\l_keys_key_tl"~ is~ unknown. } +\cs_if_exist:NTF \ProcessKeyOptions + { \ProcessKeyOptions [ sjtu / option ] } + { + \RequirePackage { l3keys2e } + \ProcessKeysOptions { sjtu / option } + } +\dim_compare:nNnT \g__sjtu_line_skip_dim < \g__sjtu_font_size_dim + { \dim_set_eq:NN \g__sjtu_line_skip_dim \g__sjtu_default_line_skip_dim } +\fp_set:Nn \g__sjtu_line_spread_fp + { \dim_ratio:nn { \g__sjtu_line_skip_dim } { \g__sjtu_font_size_dim } / 1.2 } +\clist_put_right:Nx \g__sjtu_options_to_ctex_class_clist + { + zihao = \g__sjtu_zihao_tl , + linespread = \fp_use:N \g__sjtu_line_spread_fp , + \bool_if:NTF \g__sjtu_twoside_bool + { twoside } { oneside } , + \bool_if:NTF \g__sjtu_openright_bool + { openright } { openany } , + \bool_if:NTF \g__sjtu_draft_bool + { draft } { final } + } +\exp_args:No \PassOptionsToClass + { \g__sjtu_options_to_ctex_class_clist } + { ctexbook } +\clist_set:Nn \g__sjtu_options_to_packages_clist + { + { no-math } { fontspec }, + { titles } { tocloft }, + { perpage, bottom } { footmisc }, + { list = off } { bicaption }, + { warnings-off = + { + mathtools-overbracket, + mathtools-colon + } + } { unicode-math }, + { amsmath, thmmarks } { ntheorem }, + { chapter } { algorithm }, + { algochapter } { algorithm2e } + } +\int_compare:nNnT { \g__sjtu_math_style_int } > { 1 } + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { slantedGreek } { newtxmath }, + { slantedGreek } { newpxmath }, + { slantedGreek } { mathptmx } + } + } +\bool_if:NTF \g__sjtu_intlimits_bool + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { intlimits } { amsmath }, + { displaylimits } { cmupint } + } + } + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { nointlimits } { amsmath }, + { nolimits } { cmupint } + } + } +\bool_if:NF \g__sjtu_slint_bool + { + \clist_put_right:Nn \g__sjtu_options_to_packages_clist + { + { upint } { newtxmath }, + { upint } { newpxmath }, + { upint } { stix2 } + } + } +\clist_map_inline:Nn \g__sjtu_options_to_packages_clist + { \PassOptionsToPackage #1 } +\LoadClass { ctexbook } +\RequirePackage + { + mathtools, + geometry, + fancyhdr, + tocloft, + caption, + bicaption, + subcaption, + xcolor, + graphicx, + enumitem + } +\cs_generate_variant:Nn \tl_const:Nn { co, Nv } +\cs_generate_variant:Nn \cs_gset:Npn { cpo } +\prg_generate_conditional_variant:Nnn \regex_match:nn { ne } { T } +\exp_args_generate:n { Nnv } +\cs_new:Npx \__sjtu_engine_case:nn #1#2 + { + \bool_lazy_or:nnTF + { \sys_if_engine_xetex_p: } + { \sys_if_engine_luatex_p: } + {#2} + { \sys_if_engine_pdftex:T {#1} } + } +\cs_new:Npx \__sjtu_engine_case:nnn #1#2#3 + { + \sys_if_engine_xetex:TF + {#2} + { + \sys_if_engine_luatex:TF + {#3} + { \sys_if_engine_pdftex:T {#1} } + } + } +\cs_new:Npx \__sjtu_unicode_engine_case:nn #1#2 + { + \sys_if_engine_xetex:TF + {#1} + { \sys_if_engine_luatex:T {#2} } + } +\__sjtu_engine_case:nn + { + \cs_new:Npn \__sjtu_unicode_char:n #1 + { + \Unicode + { \int_div_truncate:nn {#1} { 256 } } + { \int_mod:nn {#1} { 256 } } + } + } + { \cs_new:Npn \__sjtu_unicode_char:n #1 { \tex_Uchar:D #1 \scan_stop: } } +\cs_new_protected:Npn \__sjtu_preto_cmd:Nn #1#2 + { + \ctex_preto_cmd:NnnTF #1 { } {#2} + { } { \ctex_patch_failure:N #1 } + } +\cs_new_protected:Npn \__sjtu_appto_cmd:Nn #1#2 + { + \ctex_appto_cmd:NnnTF #1 { } {#2} + { } { \ctex_patch_failure:N #1 } + } +\cs_new:Npn \__sjtu_fixed_line_skip:n #1 + { + \exp_args:Nx \linespread + { \fp_to_decimal:n { \dim_ratio:nn { #1 } { \f@size pt } / 1.2 } } + \selectfont + } +\NewDocumentCommand \fixedlineskip { m } + { \exp_args:Nx \__sjtu_fixed_line_skip:n {#1} \tex_ignorespaces:D } +\cs_new:Npn \__sjtu_dim_set_to_wd:Nn #1#2 + { + \hbox_set:Nn \l__sjtu_tmpa_box {#2} + \dim_set:Nn #1 { \box_wd:N \l__sjtu_tmpa_box } + } +\cs_new:Npn \__sjtu_dim_add_to_wd:Nn #1#2 + { + \hbox_set:Nn \l__sjtu_tmpa_box {#2} + \dim_add:Nn #1 { \box_wd:N \l__sjtu_tmpa_box } + } +\cs_generate_variant:Nn \__sjtu_dim_set_to_wd:Nn { Nv } +\cs_generate_variant:Nn \__sjtu_dim_add_to_wd:Nn { cv } +\cs_new_protected:Npn \__sjtu_vspace:N #1 + { + \skip_vertical:N #1 + \skip_vertical:N \c_zero_skip + } +\cs_new_protected:Npn \__sjtu_vspace:n #1 + { + \skip_set:Nn \l__sjtu_tmpa_skip {#1} + \__sjtu_vspace:N \l__sjtu_tmpa_skip + } +\cs_new_protected:Npn \__sjtu_vspace_r:N #1 + { + \dim_set_eq:NN \l__sjtu_tmpa_dim \prevdepth + \hrule height \c_zero_dim + \nobreak + \skip_vertical:N #1 + \skip_vertical:N \c_zero_skip + \dim_set_eq:NN \prevdepth \l__sjtu_tmpa_dim + } +\cs_new_protected:Npn \__sjtu_vspace_r:n #1 + { + \skip_set:Nn \l__sjtu_tmpa_skip {#1} + \__sjtu_vspace_r:N \l__sjtu_tmpa_skip + } +\__sjtu_engine_case:nnn + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \bool_set_false:N \l__sjtu_tmpa_bool + \cs_set_eq:NN \SJTU@CJK@filltwosidesSymbol \CJKsymbol + \cs_set:Npn \CJKsymbol ##1 + { + \bool_if:NTF \l__sjtu_tmpa_bool + { \hfil \SJTU@CJK@filltwosidesSymbol { ##1 } } + { + \SJTU@CJK@filltwosidesSymbol { ##1 } + \bool_set_true:N \l__sjtu_tmpa_bool + } + } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \cs_set:Npn \CJKglue + { \skip_horizontal:n { \c_zero_dim plus 1 filll } } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } + { + \cs_new_protected:Npn \__sjtu_cjk_spread_box:nn #1#2 + { + \mode_leave_vertical: + \group_begin: + \ltjsetparameter { kanjiskip = { \c_zero_dim plus 1 filll } } + \hbox_to_wd:nn {#1} {#2} + \group_end: + } + } +\cs_new_protected:Npn \__sjtu_left_aligned_box:nn #1#2 + { + \mode_leave_vertical: + \hbox_to_wd:nn {#1} { #2 \hfil } + } +\cs_new_protected:Npn \__sjtu_define_name:nn #1#2 + { \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} } +\cs_new_protected:Npn \__sjtu_define_name:nnn #1#2#3 + { + \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} + \tl_const:cn { c__sjtu_name_ #1 _en_tl } {#3} + } +\cs_new_protected:Npn \__sjtu_define_name_g:nn #1#2 + { \tl_const:cn { c__sjtu_name_ #1 _tl } {#2} } +\cs_new_protected:Npn \__sjtu_define_name_g:nnn #1#2#3 + { + \tl_const:cn { c__sjtu_name_ #1 _zh_tl } {#2} + \tl_const:cn { c__sjtu_name_ #1 _en_tl } {#3} + \tl_gset_eq:cc + { c__sjtu_name_ #1 _tl } + { c__sjtu_name_ #1 _ \g__sjtu_lang_tl _tl } + } +\cs_new_protected:Npn \__sjtu_define_name_from_clist:nNnn #1#2#3#4 + { + \tl_const:cx { c__sjtu_name_ #1 _zh_tl } + { \clist_item:nn {#3} {#2} } + \tl_const:cx { c__sjtu_name_ #1 _en_tl } + { \clist_item:nn {#4} {#2} } + } +\cs_new_protected:Npn \__sjtu_define_symbol:nn #1#2 + { \tl_const:co { c__sjtu_symbol_ #1 _tl } { \__sjtu_unicode_char:n {#2} } } +\cs_new:Npn \__sjtu_date_aux_zh:nnn #1#2#3 + { \__zhnum_date_aux:Nnnnn \int_to_arabic:n { ~ } {#1} {#2} {#3} } +\cs_new:Npn \__sjtu_date_aux_zh:w #1-#2-#3 \q_stop + { \__sjtu_date_aux_zh:nnn {#1} {#2} {#3} } +\clist_const:Nn \c__sjtu_name_month_en_clist + { + January, February, March, April, May, June, + July, August, September, October, November, December + } +\cs_new:Npn \__sjtu_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 } + } + } + } +\cs_new:Npn \__sjtu_date_aux_en:nnn #1#2#3 + { \clist_item:Nn \c__sjtu_name_month_en_clist {#2}~ \__sjtu_ordinal_en:n {#3},~ #1 } +\cs_new:Npn \__sjtu_date_aux_en:w #1-#2-#3 \q_stop + { \__sjtu_date_aux_en:nnn {#1} {#2} {#3} } +\clist_map_inline:nn + { zh, en } + { + \tl_const:cx { c__sjtu_today_ #1 _tl } + { + \use:c { __sjtu_date_aux_ #1 :nnn } + { \int_value:w \tex_year:D } + { \tex_month:D } + { \tex_day:D } + } + } +\tl_const:Nv \c__sjtu_today_tl { c__sjtu_today_ \g__sjtu_lang_tl _tl } +\file_input:n { sjtu-name-thesis.cfg } +\NewDocumentCommand \sjtusetup { } { \keys_set:nn { sjtu } } +\keys_define:nn { sjtu } + { + info .meta:nn = { sjtu / info } {#1} , + style .meta:nn = { sjtu / style } {#1} , + name .meta:nn = { sjtu / name } {#1} + } +\clist_map_inline:nn + { + title, display_title, running_title, subject, author, date, + supervisor, assoc_supervisor, department, + co_supervisor, major, degree + } + { + \tl_new:c { l__sjtu_info_ #1 _zh_tl } + \tl_new:c { l__sjtu_info_ #1 _en_tl } + } +\tl_set:co { l__sjtu_info_title_aux_tl } + { \cs:w l__sjtu_info_title_ \g__sjtu_lang_aux_tl _tl \cs_end: } +\tl_new:N \l__sjtu_info_id_zh_tl +\clist_map_inline:nn + { keywords, fund } + { + \clist_new:c { l__sjtu_info_ #1 _zh_clist } + \clist_new:c { l__sjtu_info_ #1 _en_clist } + } +\keys_define:nn { sjtu / info } + { + title .code:n = + { + \tl_set:Nn \l__sjtu_info_title_zh_tl {#1} + \clist_map_inline:nn + { + \l__sjtu_info_display_title_zh_tl , + \l__sjtu_info_running_title_zh_tl + } + { \tl_if_empty:NT ##1 { \tl_set:Nn ##1 {#1} } } + } , + title* .code:n = + { + \tl_set:Nn \l__sjtu_info_title_en_tl {#1} + \clist_map_inline:nn + { + \l__sjtu_info_display_title_en_tl , + \l__sjtu_info_running_title_en_tl + } + { \tl_if_empty:NT ##1 { \tl_set:Nn ##1 {#1} } } + } , + display-title .tl_set:N = \l__sjtu_info_display_title_zh_tl , + display-title* .tl_set:N = \l__sjtu_info_display_title_en_tl , + running-title .tl_set:N = \l__sjtu_info_running_title_zh_tl , + running-title* .tl_set:N = \l__sjtu_info_running_title_en_tl , + subject .tl_set:N = \l__sjtu_info_subject_zh_tl , + subject .initial:n = + { + \c__sjtu_name_univ_zh_tl + \c__sjtu_name_degree_level_zh_tl + \c__sjtu_name_thesis_zh_tl + } , + subject* .tl_set:N = \l__sjtu_info_subject_en_tl , + subject* .initial:n = + { + A~ Dissertation~ Submitted~ to \\ + { \c__sjtu_name_univ_en_tl }~ for~ + { \c__sjtu_name_degree_level_en_tl }~ Degree + } , + keywords .clist_set:N = \l__sjtu_info_keywords_zh_clist , + keywords* .clist_set:N = \l__sjtu_info_keywords_en_clist , + author .tl_set:N = \l__sjtu_info_author_zh_tl , + author* .tl_set:N = \l__sjtu_info_author_en_tl , + id .tl_set:N = \l__sjtu_info_id_zh_tl , + supervisor .tl_set:N = \l__sjtu_info_supervisor_zh_tl , + supervisor* .tl_set:N = \l__sjtu_info_supervisor_en_tl , + assoc-supervisor .tl_set:N = \l__sjtu_info_assoc_supervisor_zh_tl , + assoc-supervisor* .tl_set:N = \l__sjtu_info_assoc_supervisor_en_tl , + co-supervisor .tl_set:N = \l__sjtu_info_co_supervisor_zh_tl , + co-supervisor* .tl_set:N = \l__sjtu_info_co_supervisor_en_tl , + degree .tl_set:N = \l__sjtu_info_degree_zh_tl , + degree* .tl_set:N = \l__sjtu_info_degree_en_tl , + department .tl_set:N = \l__sjtu_info_department_zh_tl , + department* .tl_set:N = \l__sjtu_info_department_en_tl , + major .tl_set:N = \l__sjtu_info_major_zh_tl , + major* .tl_set:N = \l__sjtu_info_major_en_tl , + fund .clist_set:N = \l__sjtu_info_fund_zh_clist , + fund* .clist_set:N = \l__sjtu_info_fund_en_clist , + date .code:n = + { + \regex_match:neT { \d{4}-\d{2}-\d{2} } {#1} + { + \tl_set:Nx \l__sjtu_info_date_zh_tl + { \exp_last_unbraced:Ne \__sjtu_date_aux_zh:w #1 \q_stop } + \tl_set:Nx \l__sjtu_info_date_en_tl + { \exp_last_unbraced:Ne \__sjtu_date_aux_en:w #1 \q_stop } + } + } , + display-date .tl_set:N = \l__sjtu_info_date_zh_tl , + display-date .initial:V = \c__sjtu_today_zh_tl , + display-date* .tl_set:N = \l__sjtu_info_date_en_tl , + display-date* .initial:V = \c__sjtu_today_en_tl + } +\RenewDocumentCommand \title { s +m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { title* = {#2} } } + { \keys_set_known:nn { sjtu / info } { title = {#2} } } + } +\tl_set:Nn \@title { \l__sjtu_info_title_zh_tl } +\RenewDocumentCommand \author { s m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { author* = {#2} } } + { \keys_set_known:nn { sjtu / info } { author = {#2} } } + } +\tl_set:Nn \@author { \l__sjtu_info_author_zh_tl } +\RenewDocumentCommand \date { s m } + { + \IfBooleanTF {#1} + { \keys_set_known:nn { sjtu / info } { display-date* = {#2} } } + { \keys_set_known:nn { sjtu / info } { display-date = {#2} } } + } +\tl_set:Nn \@date { \l__sjtu_info_date_zh_tl } +\tl_set:Nv \today { c__sjtu_today_ \g__sjtu_lang_tl _tl } +\ctex_at_end_preamble:n + { + \bool_if:NT \g__sjtu_review_bool + { + \clist_map_inline:nn + { author, supervisor, assoc_supervisor, co_supervisor } + { + \tl_clear:c { l__sjtu_info_ #1 _zh_tl } + \tl_clear:c { l__sjtu_info_ #1 _en_tl } + } + \tl_clear:N \l__sjtu_info_id_zh_tl + \clist_clear:N \l__sjtu_info_fund_zh_clist + \clist_clear:N \l__sjtu_info_fund_en_clist + } + } +\keys_define:nn { sjtu / style } + { + float-font .tl_set:N = \SJTU@style@float@font , + float-font .initial:n = \zihao { 5 } \fixedlineskip { 15.6 bp } , + caption-font .code:n = + { \DeclareCaptionFont { SJTU@font } {#1} } , + caption-font .initial:n = \zihao { 5 } \bfseries , + subcaption-font .code:n = + { \DeclareCaptionFont { SJTU@sub@font } {#1} } , + subcaption-font .initial:n = \zihao { 5 } \normalfont , + fnmark-font .tl_set:N = \l__sjtu_style_fnmark_font_tl , + fnmark-font .initial:n = , + float-num-sep .tl_set:N = \l__sjtu_style_fl_num_sep_tl , + float-num-sep .initial:n = { -- } , + equation-num-sep .tl_set:N = \l__sjtu_style_eq_num_sep_tl , + equation-num-sep .initial:n = { -- } , + title-logo-color .choice: , + title-logo-color .choices:nn = + { red, blue, black } + { \tl_set_eq:NN \l__sjtu_style_title_logo_color_tl \l_keys_choice_tl } , + title-logo-color .initial:n = { red } , + header-logo-color .choice: , + header-logo-color .choices:nn = + { red, blue, black } + { \tl_set_eq:NN \l__sjtu_style_header_logo_color_tl \l_keys_choice_tl } , + header-logo-color .initial:n = { red } , + header-uppercase .choice: , + header-uppercase / true .code:n = + { \cs_gset_eq:NN \__sjtu_nouppercase:n \use:n } , + header-uppercase / false .code:n = + { \cs_gset:Nn \__sjtu_nouppercase:n { \nouppercase {##1} } } , + header-uppercase .default:n = { true } , + header-uppercase .initial:n = { false } , + header-font .tl_set:N = \l__sjtu_style_header_font_tl , + header-font .initial:n = \zihao { -5 } , + footer-font .tl_set:N = \l__sjtu_style_footer_font_tl , + footer-font .initial:n = \zihao { -5 } , + page-number .cs_set:Np = \__sjtu_page:n #1 , + page-number .initial:n = { {#1} } + } +\keys_define:nn { sjtu / name } + { + contents .tl_set:N = \contentsname , + listfigure .tl_set:N = \listfigurename , + listtable .tl_set:N = \listtablename , + figure .tl_set:N = \figurename , + table .tl_set:N = \tablename , + index .tl_set:N = \indexname , + appendix .tl_set:N = \appendixname , + proof .tl_set:N = \proofname , + bib .tl_set:N = \bibname , + figure* .tl_set:N = \l__sjtu_name_figure_aux_tl , + figure* .initial:n = { 图 } , + table* .tl_set:N = \l__sjtu_name_table_aux_tl , + table* .initial:n = { 表 } , + algorithm .tl_set:N = \l__sjtu_name_algorithm_tl , + algorithm .initial:n = { Algorithm } , + listalgorithm .tl_set:N = \l__sjtu_name_listalgorithm_tl , + listalgorithm .initial:n = { List~of~Algorithms } , + abbr .tl_set:N = \l__sjtu_name_abbr_tl , + abbr .initial:n = { Abbreviations } , + nom .tl_set:N = \l__sjtu_name_nom_tl , + nom .initial:n = { Nomenclature } , + summary .tl_set:N = \l__sjtu_name_summary_tl , + summary .initial:n = { Summary } , + ack .tl_set:N = \l__sjtu_name_ack_tl , + ack .initial:n = { Acknowledgements } , + resume .tl_set:N = \l__sjtu_name_resume_tl , + resume .initial:n = { Resume } , + digest .tl_set:N = \l__sjtu_name_digest_tl , + digest .initial:n = { Digest } , + achv .tl_set:N = \l__sjtu_name_achv_tl , + achv .initial:n = { List~of~Research~Achievements }, + } +\file_input:n { sjtu-lang-thesis- \g__sjtu_lang_tl .cfg } +\cs_new_protected:Npn \__sjtu_fontset_error:nn #1#2 + { \msg_error:nnnn { sjtutex } { font-unavailable } {#1} {#2} } +\msg_new:nnn { sjtutex } { font-unavailable } + { `#1-font~ =~ #2'~ is~ unavailable~ in~ current~ mode. } +\cs_new_eq:NN \__sjtu_fontset_case:nn \__sjtu_engine_case:nn +\cs_new:Npx \__sjtu_fontset_case:nnn #1#2#3 + { + \__sjtu_engine_case:nn + { \sys_if_output_pdf:TF {#1} {#2} } + {#3} + } +\cs_new_protected:Nn \__sjtu_set_slanted_greek: + { + \clist_const:Nn \c__sjtu_uppercase_greek_clist + { Gamma, Delta, Theta, Lambda, Xi, Pi, Sigma, Upsilon, Phi, Psi, Omega } + \clist_map_inline:Nn \c__sjtu_uppercase_greek_clist + { + \cs_set_eq:cc { up ##1 } { ##1 } + \cs_set_eq:cc { it ##1 } { var ##1 } + } + \int_compare:nNnT { \g__sjtu_math_style_int } > { 1 } + { + \clist_map_inline:Nn \c__sjtu_uppercase_greek_clist + { \cs_set_eq:cc { ##1 } { it ##1 } } + } + } +\cs_new_protected:Nn \__sjtu_set_unimath_symbol: + { + \cs_set_eq:NN \increment \upDelta + \cs_set_eq:NN \QED \blacksquare + } +\tl_if_empty:NT \g__sjtu_math_font_tl + { \tl_gset_eq:NN \g__sjtu_math_font_tl \g__sjtu_text_font_tl } +\tl_if_empty:NT \g__sjtu_cjk_font_tl + { + \sys_if_platform_windows:TF + { \tl_gset:Nn \g__sjtu_cjk_font_tl { windows } } + { + \ctex_if_platform_macos:TF + { \tl_gset:Nn \g__sjtu_cjk_font_tl { mac } } + { \tl_gset:Nn \g__sjtu_cjk_font_tl { fandol } } + } + } +\cs_new_protected:Npn \__sjtu_load_font:nn #1#2 + { + \str_if_eq:eeF { \tl_use:c { g__sjtu_ #1 _font_tl } } { none } + { + \file_if_exist:nF + { sjtu- #1 -font- \tl_use:c { g__sjtu_ #1 _font_tl } .def } + { + \msg_warning:nnnn { sjtutex } { invalid-font } {#1} {#2} + \tl_gset:cn { g__sjtu_ #1 _font_tl } {#2} + } + \ctex_file_input:n + { sjtu- #1 -font- \tl_use:c { g__sjtu_ #1 _font_tl } .def } + } + } +\msg_new:nnn { sjtutex } { invalid-font } + { + Invalid~ value~ `#1-font~ =~ \tl_use:c { g__sjtu_ #1 _font_tl }~ '! \\\\ + Using~ `#2'~ instead. + } +\cs_new_protected:Nn \__sjtu_load_fontset: + { + \clist_map_inline:nn + { + { math } { newtx }, + { text } { newtx }, + { cjk } { fandol } + } + { \__sjtu_load_font:nn ##1 } + } +\@onlypreamble \__sjtu_load_font:nn +\@onlypreamble \__sjtu_load_fontset: +\__sjtu_load_fontset: +\ctex_at_end_package:nn { unicode-math } + { + \DeclareDocumentCommand \bm { m } + { { \symbf {#1} } } + \DeclareDocumentCommand \boldsymbol { m } + { { \symbf {#1} } } + \int_compare:nNnTF { \g__sjtu_math_style_int } > { 1 } + { \keys_set:nn { unicode-math } { math-style = ISO } } + { \keys_set:nn { unicode-math } { math-style = TeX } } + } +\__sjtu_unicode_engine_case:nn + { + \xeCJK_declare_char_class:nn { CJK } + { "24EA, "2460->"2473, "3251->"32BF, "25A1 } + } + { + \ltjdefcharrange { 99 } + { "24EA, "2460-"2473, "3251-"32BF, "25A1 } + \ltjsetparameter { jacharrange = { +99 } } + } +\geometry + { + paper = a4paper, + top = 3.5 cm, + bottom = 4.0 cm, + left = 2.5 cm, + right = 2.5 cm, + bindingoffset = 0.5 cm, + headheight = 1.5 cm, + headsep = 0.5 cm, + footskip = 1.0 cm + } +\pagestyle { fancy } +\cs_new:Nn \__sjtu_thepage: { \thepage } +\fancyhf { } +\bool_if:NTF \g__sjtu_twoside_bool + { + \fancyhead [ RE, LO ] + { \l__sjtu_style_header_font_tl \l__sjtu_info_subject_zh_tl } + \fancyhead [ RO, LE ] + { \l__sjtu_style_header_font_tl \__sjtu_nouppercase:n { \leftmark } } + } + { + \fancyhead [ L ] + { \l__sjtu_style_header_font_tl \l__sjtu_info_subject_zh_tl } + \fancyhead [ R ] + { + \l__sjtu_style_header_font_tl + \__sjtu_nouppercase:n { \leftmark } + } + } +\fancyfoot [ C ] + { + \l__sjtu_style_footer_font_tl + \__sjtu_page:n { \__sjtu_thepage: } + } +\cs_set:Npn \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 } + } +\cs_new_eq:NN \ps@SJTU@null \prg_do_nothing: +\clist_map_inline:nn + { zh, en } + { + \cs_new:cpn { ps@SJTU@fund@ #1 } + { + \ps@empty + \cs_set:Npn \@oddfoot + { + \begin{minipage} { \textwidth } + \centering \zihao { - 5 } + \clist_use:cn { l__sjtu_info_fund_ #1 _clist } { \par } + \end{minipage} + } + \cs_set_eq:NN \@evenfoot \@oddfoot + } + } +\RenewDocumentCommand \cleardoublepage { } + { + \clearpage + \bool_if:NT \g__sjtu_twoside_bool + { + \int_if_odd:nF \c@page + { \hbox:n { } \thispagestyle { empty } \newpage } + } + } +\pagenumbering { Alph } +\RenewDocumentCommand \frontmatter { } + { + \cleardoublepage + \@mainmatterfalse + \pagenumbering { Roman } + } +\ctex_set:nn { chapter } + { + pagestyle = SJTU@null , + fixskip = true , + beforeskip = 24 bp , + afterskip = 18 bp , + lofskip = \c_zero_skip , + lotskip = \c_zero_skip , + format = \zihao { 3 } \bfseries \heiti \centering , + nameformat = , + titleformat = , + aftername = \quad , + afterindent = true + } +\ctex_set:nn { section } + { + beforeskip = 24 bp , + afterskip = 6 bp , + format = \zihao { 4 } \bfseries \heiti , + afterindent = true + } +\ctex_set:nn { subsection } + { + beforeskip = 12 bp , + afterskip = 6 bp , + format = \zihao { -4 } \bfseries \heiti , + afterindent = true + } +\ctex_set:nn { subsubsection } + { + beforeskip = 6 bp , + afterskip = 6 bp , + format = \zihao { -4 } \normalfont , + afterindent = true + } +\ctex_set:nn { paragraph } + { afterindent = true } +\ctex_set:nn { subparagraph } + { afterindent = true } +\ctex_set:n { secnumdepth = 3 } +\NewDocumentCommand \SJTU@head { s O{#3} m O{#2} } + { + \CTEX@chapter@break + \IfBooleanTF {#1} + { \tl_if_empty:nF {#4} { \__sjtu_pdf_bookmark:nn { 0 } {#4} } } + { + \__sjtu_phantom_section: + \addcontentsline { toc } { chapter } {#4} + } + \cs_set_eq:NN \__sjtu_orig_ctex_gettitle:n \CTEX@gettitle + \cs_set:Npn \CTEX@gettitle ##1 { \__sjtu_orig_ctex_gettitle:n {#2} } + \chapter* {#3} + \cs_set_eq:NN \CTEX@gettitle \__sjtu_orig_ctex_gettitle:n + \@mkboth { \MakeUppercase {#2} } { \MakeUppercase {#2} } + } +\cs_new:Npn \__sjtu_head_aux:n #1 + { \SJTU@head {#1} } +\cs_new:Npn \__sjtu_head_aux_s:n #1 + { \SJTU@head* {#1} } +\cs_new:Npn \__sjtu_head_auxa_s:nn #1#2 + { \SJTU@head* {#1} [#2] } +\cs_new:Npn \__sjtu_head_auxb_s:nn #1#2 + { \SJTU@head* [#1] {#2} } +\cs_generate_variant:Nn \__sjtu_head_aux:n { V } +\cs_generate_variant:Nn \__sjtu_head_aux_s:n { V } +\cs_generate_variant:Nn \__sjtu_head_auxa_s:nn { Vn, VV } +\cs_generate_variant:Nn \__sjtu_head_auxb_s:nn { Vo } +\cs_new_eq:NN \__sjtu_pdf_bookmark:nn \use_none:nn +\cs_new_eq:NN \__sjtu_phantom_section: \prg_do_nothing: +\ctex_if_autoindent_touched:F + { \ctex_set:n { autoindent = true } } +\ctex_patch_cmd:Nnn \verse { -1.5em } { -2 \ccwd } +\ctex_patch_cmd:Nnn \verse { 1.5em } { 2 \ccwd } +\ctex_patch_cmd:Nnn \quotation { 1.5em } { 2 \ccwd } +\setlist { nosep } +\tl_set:Nn \textfraction { 0.15 } +\tl_set:Nn \topfraction { 0.85 } +\tl_set:Nn \bottomfraction { 0.65 } +\tl_set:Nn \floatpagefraction { 0.60 } +\ctex_patch_cmd:Nnn \@floatboxreset + { \normalsize } { \SJTU@style@float@font } +\DeclareCaptionLabelSeparator { enskip } { \enskip } +\captionsetup + { + labelsep = enskip , + justification = centering , + font = SJTU@font + } +\captionsetup [ sub ] + { + format = hang , + justification = justified , + font = SJTU@sub@font + } +\DeclareCaptionOption { aux-names } [ ] + { + \tl_set:Nn \figurename { \l__sjtu_name_figure_aux_tl } + \tl_set:Nn \tablename { \l__sjtu_name_table_aux_tl } + } +\captionsetup [ bi-second ] { aux-names } +\NewDocumentCommand \SJTUcounterwithin + { s O{ \l__sjtu_style_fl_num_sep_tl } O{ \arabic } m m } + { + \@ifbothcounters {#4} {#5} + { + \@addtoreset {#4} {#5} + \IfBooleanF {#1} + { + \cs_gset:cpo { the #4 } + { \cs:w the #5 \cs_end: #2 #3 {#4} } + } + } + } +\cs_set:Npn \thefigure + { \thechapter \l__sjtu_style_fl_num_sep_tl \arabic { figure } } +\cs_set:Npn \thetable + { \thechapter \l__sjtu_style_fl_num_sep_tl \arabic { table } } +\cs_set:Npn \theequation + { \thechapter \l__sjtu_style_eq_num_sep_tl \arabic { equation } } +\cs_new_protected:Nn \__sjtu_counter_without_chapter: + { + \counterwithout { section } { chapter } + \setcounter { section } { 0 } + \counterwithout { figure } { chapter } + \setcounter { figure } { 0 } + \counterwithout { table } { chapter } + \setcounter { table } { 0 } + } +\cs_new_protected:Nn \__sjtu_make_fnmark: + { \hbox:n { \@thefnmark } } +\ctex_at_end_preamble:n { + \cs_set_eq:NN \__sjtu_orig_make_fntext:n \@makefntext + \cs_set:Npn \@makefntext #1 + { + \group_begin: + \cs_set_eq:NN \@makefnmark \__sjtu_make_fnmark: + \__sjtu_orig_make_fntext:n {#1} + \group_end: + } +} +\cs_new:Npn \__sjtu_footnote_number:N #1 + { + \int_compare:nNnTF {#1} < { 21 } + { \__sjtu_unicode_char:n { \int_eval:n { "2460 - 1 + #1 } } } + { + \int_compare:nNnTF {#1} < { 36 } + { \__sjtu_unicode_char:n { \int_eval:n { "3251 - 21 + #1 } } } + { + \int_compare:nNnTF {#1} < { 51 } + { \__sjtu_unicode_char:n { \int_eval:n { "32B1 - 36 + #1 } } } + { \msg_warning:nn { sjtutex } { too-many-footnotes } } + } + } + } +\msg_new:nnn { sjtutex } { too-many-footnotes } + { Too~ many~ footnotes. } +\cs_set:Npn \thefootnote + { + \hbox:n { } + { \l__sjtu_style_fnmark_font_tl \__sjtu_footnote_number:N \c@footnote } + } +\cs_set:Npn \thempfootnote + { + \hbox:n { } + { \l__sjtu_style_fnmark_font_tl \__sjtu_footnote_number:N \c@mpfootnote } + } +\DeclareObjectType { sjtu } { 0 } +\DeclareTemplateInterface { sjtu } { component } { 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 } { component } { 0 } + { + format = \l__sjtu_component_format_tl , + content = \l__sjtu_component_content_tl , + bottom-skip = \l__sjtu_component_bottom_skip , + align = + { + left = + \cs_set_eq:NN \l__sjtu_component_align: \raggedright , + right = + \cs_set_eq:NN \l__sjtu_component_align: \raggedleft , + center = + \cs_set_eq:NN \l__sjtu_component_align: \centering , + normal = + \cs_set_eq:NN \l__sjtu_component_align: \prg_do_nothing: + } + } + { + \AssignTemplateKeys + \group_begin: + \l__sjtu_component_align: + \l__sjtu_component_format_tl + \l__sjtu_component_content_tl + \par + \group_end: + \__sjtu_vspace:N \l__sjtu_component_bottom_skip + } +\DeclareTemplateInterface { sjtu } { page } { 0 } + { + bookmark : boolean = false , + bookmark-text : tokenlist = \c_empty_tl , + style : tokenlist = empty , + format : tokenlist = \linespread { 1 } \selectfont , + prefix : tokenlist , + components : commalist , + top-skip : skip = \c_zero_skip , + bottom-skip : skip = \c_zero_skip + } +\DeclareTemplateCode { sjtu } { page } { 0 } + { + bookmark = \l__sjtu_page_bookmark_bool , + bookmark-text = \l__sjtu_page_bookmark_text_tl , + style = \l__sjtu_page_style_tl , + format = \l__sjtu_page_format_tl , + prefix = \l__sjtu_page_prefix_tl , + components = \l__sjtu_page_components_clist , + top-skip = \l__sjtu_page_top_skip , + bottom-skip = \l__sjtu_page_bottom_skip + } + { + \AssignTemplateKeys + \bool_if:NTF \g__sjtu_openright_bool + { \cleardoublepage } { \clearpage } + \bool_if:NT \l__sjtu_page_bookmark_bool + { \__sjtu_pdf_bookmark:nn { 0 } { \l__sjtu_page_bookmark_text_tl } } + \exp_args:No \thispagestyle { \l__sjtu_page_style_tl } + \__sjtu_vspace_r:N \l__sjtu_page_top_skip + \__sjtu_vspace:n { - \tex_parskip:D } + \__sjtu_vspace:n { - \tex_baselineskip:D } + \group_begin: + \l__sjtu_page_format_tl + \clist_map_inline:Nn \l__sjtu_page_components_clist + { \UseInstance { sjtu } { \l__sjtu_page_prefix_tl / ##1 } } + \group_end: + \__sjtu_vspace:N \l__sjtu_page_bottom_skip + \clearpage + } +\cs_new:Npn \__sjtu_declare_component:nnn #1#2#3 + { \DeclareInstance { sjtu } {#1/#2} { component } {#3} } +\cs_new:Npn \__sjtu_declare_page:nn #1#2 + { \DeclareInstance { sjtu } {#1} { page } {#2} } +\cs_new:Npn \__sjtu_title_page_info:nnn #1#2#3 + { + \group_begin: + \cs_set:Npn \l__sjtu_info_output_format:NNN ##1##2##3 {#3} + \clist_clear:N \l__sjtu_tmpa_clist + \clist_clear:N \l__sjtu_tmpb_clist + \dim_set:Nn \l__sjtu_tmpb_dim { 5 em } + \clist_map_inline:nn {#2} + { + \clist_put_right:No \l__sjtu_tmpa_clist + { \cs:w c__sjtu_name_ ##1 _ #1 _tl \cs_end: } + \clist_put_right:No \l__sjtu_tmpb_clist + { \cs:w l__sjtu_info_ ##1 _ #1 _tl \cs_end: } + \__sjtu_dim_set_to_wd:Nv \l__sjtu_tmpa_dim { l__sjtu_info_ ##1 _ #1 _tl } + \dim_set:Nn \l__sjtu_tmpb_dim + { \dim_max:nn { \l__sjtu_tmpa_dim } { \l__sjtu_tmpb_dim } } + } + \bool_until_do:nn + { \clist_if_empty_p:N \l__sjtu_tmpa_clist } + { + \clist_pop:NN \l__sjtu_tmpa_clist \l__sjtu_tmpa_tl + \clist_pop:NN \l__sjtu_tmpb_clist \l__sjtu_tmpb_tl + \l__sjtu_info_output_format:NNN + \l__sjtu_tmpa_tl \l__sjtu_tmpb_dim \l__sjtu_tmpb_tl + \skip_vertical:N \c_zero_dim + } + \group_end: + } +\cs_generate_variant:Nn \__sjtu_title_page_info:nnn { nxn } +\clist_map_inline:nn + { + { logo } + { + content = + { + \includegraphics [ width = 3 cm ] + { sjtu-vi-badge- \l__sjtu_style_title_logo_color_tl .pdf } + } + }, + { subject } + { + format = \zihao { -2 } \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_subject_zh_tl , + bottom-skip = \c_zero_dim plus 2 fill + }, + { title } + { + format = \zihao { 2 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_display_title_zh_tl , + bottom-skip = \c_zero_dim plus 3 fill + }, + { info } + { + format = \zihao { 4 } \fixedlineskip { 31.2 bp } , + content = + { + \__sjtu_title_page_info:nxn { zh } + { + author, + id, + supervisor, + \tl_if_empty:NF \l__sjtu_info_assoc_supervisor_zh_tl + { assoc_supervisor }, + \tl_if_empty:NF \l__sjtu_info_co_supervisor_zh_tl + { co_supervisor }, + department, + major, + \int_compare:nNnF { \g__sjtu_thesis_type_int } = { 1 } + { degree } + } + { + \__sjtu_cjk_spread_box:nn { 5 em } { \heiti #1 } + \c__sjtu_name_info_sep_zh_tl + \__sjtu_left_aligned_box:nn {#2} {#3} + } + } , + bottom-skip = 31.2 bp + }, + { date } + { + format = \zihao { 4 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_date_zh_tl + } + } + { + \__sjtu_declare_component:nnn { title / zh } #1 + } +\__sjtu_declare_page:nn { title / zh } + { + bookmark = true , + bookmark-text = \c__sjtu_name_title_page_tl , + style = SJTU@fund@zh , + prefix = title / zh , + components = { logo, subject, title, info, date } + } +\clist_map_inline:nn + { + { subject } + { + format = \zihao { 4 } \bfseries \fixedlineskip { 31.2 bp } , + content = \l__sjtu_info_subject_en_tl , + bottom-skip = \c_zero_dim plus 2 fill + }, + { title } + { + format = \zihao { -2 } \bfseries \fixedlineskip { 31.2 bp } , + content = \MakeUppercase \l__sjtu_info_display_title_en_tl , + bottom-skip = \c_zero_dim plus 2 fill + }, + { info } + { + format = \zihao { 3 } \fixedlineskip { 31.2 bp } , + content = + { + \__sjtu_title_page_info:nxn { en } + { + author, supervisor, + \tl_if_empty:NF \l__sjtu_info_assoc_supervisor_en_tl + { assoc_supervisor }, + \tl_if_empty:NF \l__sjtu_info_co_supervisor_en_tl + { co_supervisor } + } + { { \bfseries #1 \c__sjtu_name_info_sep_en_tl } {#3} } + } , + bottom-skip = \c_zero_dim plus 3 fill + }, + { date } + { + format = \zihao { 3 } \fixedlineskip { 31.2 bp } , + content = + { + \l__sjtu_info_department_en_tl + \skip_vertical:N \c_zero_skip + \c__sjtu_name_univ_en_tl + \skip_vertical:N \c_zero_skip + \c__sjtu_name_address_en_tl + \skip_vertical:N \c_zero_skip + \l__sjtu_info_date_en_tl + } + }, + } + { + \__sjtu_declare_component:nnn { title / en } #1 + } +\__sjtu_declare_page:nn { title / en } + { + style = SJTU@fund@en , + prefix = title / en , + components = { subject, title, info, date } + } +\RenewDocumentCommand \maketitle { } + { + \UseInstance { sjtu } { title / zh } + \UseInstance { sjtu } { title / en } + } +\cs_new_protected:Npn \__sjtu_signature:N #1 + { + \parbox [ t ] { 12 em } + { #1 \c__sjtu_signature_text_zh_tl } + } +\clist_map_inline:nn + { + { orig / title } + { + format = \zihao { 3 } \heiti \fixedlineskip { 31.2 bp } , + content = + { + \c__sjtu_name_univ_zh_tl + \skip_vertical:N \c_zero_skip + \c__sjtu_name_thesis_zh_tl + \c__sjtu_name_orig_decl_zh_tl + } , + bottom-skip = 15.6 bp + }, + { orig / text } + { + format = \zihao { -4 } \fixedlineskip { 23.4 bp } , + content = \c__sjtu_orig_decl_text_zh_tl , + bottom-skip = 15.6 bp , + align = normal + }, + { orig / sign } + { + format = \zihao { 4 } \fixedlineskip { 31.2 bp } , + content = + { + \__sjtu_signature:N \c__sjtu_name_decl_author_zh_tl + \skip_horizontal:n { 4 em } \hbox:n { } + } , + bottom-skip = \c_zero_dim plus 2 fill , + align = right + }, + { auth / title } + { + format = \zihao { 3 } \heiti \fixedlineskip { 31.2 bp } , + content = + { + \c__sjtu_name_univ_zh_tl + \skip_vertical:N \c_zero_skip + \c__sjtu_name_thesis_zh_tl + \c__sjtu_name_auth_decl_zh_tl + } , + bottom-skip = 15.6 bp + }, + { auth / text } + { + format = \zihao { -4 } \fixedlineskip { 23.4 bp } , + content = \c__sjtu_auth_decl_text_zh_tl , + bottom-skip = 15.6 bp , + align = normal + }, + { auth / sign } + { + format = \zihao { 4 } \fixedlineskip { 31.2 bp } , + content = + { + \__sjtu_signature:N \c__sjtu_name_decl_author_zh_tl + \hfill + \__sjtu_signature:N \c__sjtu_name_decl_supervisor_zh_tl + } , + bottom-skip = \c_zero_dim plus 1 fill , + align = normal + } + } + { + \__sjtu_declare_component:nnn { copyright } #1 + } +\__sjtu_declare_page:nn { copyright } + { + bookmark = true , + bookmark-text = \c__sjtu_name_decl_tl , + prefix = copyright , + components = + { + orig / title, orig / text, orig / sign, + auth / title, auth / text, auth / sign + } + } +\msg_new:nnn { sjtutex } { require-pdfpages } + { + Add~"\token_to_str:N \usepackage{pdfpages}"~ in~ your~ preamble \\ + before~ inserting~ pages~ of~ external~ PDF. + } +\NewDocumentCommand \copyrightpage { O{ } } + { + \bool_if:NF \g__sjtu_review_bool + { + \tl_if_blank:nTF {#1} + { \UseInstance { sjtu } { copyright } } + { + \cs_if_exist:NTF \includepdf + { + \__sjtu_pdf_bookmark:nn { 0 } { \c__sjtu_name_decl_tl } + \includepdf {#1} + } + { + \msg_warning:nn { sjtutex } { require-pdfpages } + \UseInstance { sjtu } { copyright } + } + } + } + } +\cs_new:Nn \__sjtu_output_keywords:Nnn + { + \clist_if_empty:NF #1 + { + \par \mode_leave_vertical: \par \noindent + { \bfseries #2 } \clist_use:Nn #1 {#3} + } + } +\DeclareDocumentEnvironment { abstract } { } + { \__sjtu_head_auxa_s:VV \c__sjtu_name_abstract_zh_tl \c__sjtu_name_abstract_tl } + { + \__sjtu_output_keywords:Nnn \l__sjtu_info_keywords_zh_clist + { \c__sjtu_name_keywords_zh_tl } { \c__sjtu_name_item_sep_zh_tl } + } +\DeclareDocumentEnvironment { abstract* } { } + { \__sjtu_head_auxa_s:Vn \c__sjtu_name_abstract_en_tl { } } + { + \__sjtu_output_keywords:Nnn \l__sjtu_info_keywords_en_clist + { \c__sjtu_name_keywords_en_tl } { \c__sjtu_name_item_sep_en_tl } + } +\DeclareDocumentCommand \tableofcontents { } + { + \__sjtu_head_aux_s:n { \contentsname } + \@starttoc { toc } + } +\NewDocumentCommand \SJTU@listof { m m s } + { + \IfBooleanTF {#3} + { \__sjtu_head_aux_s:n {#1} } + { \__sjtu_head_aux:n {#1} } + \exp_args:Nv \@starttoc { ext@ #2 } + } +\DeclareDocumentCommand \listoffigures { } + { \SJTU@listof { \listfigurename } { figure } } +\DeclareDocumentCommand \listoftables { } + { \SJTU@listof { \listtablename } { table } } +\tl_set:Nn \cftdotsep { 1 } +\tl_set:Nn \cftchapleader { \normalfont \cftdotfill { \cftdotsep } } +\cs_new_protected:Nn \__sjtu_update_cft_presnum: + { + \tl_set:Nn \cftfigpresnum { \figurename \c_space_tl } + \__sjtu_dim_add_to_wd:Nn \cftfignumwidth { \cftfigpresnum } + \tl_set:Nn \cfttabpresnum { \tablename \c_space_tl } + \__sjtu_dim_add_to_wd:Nn \cfttabnumwidth { \cftfigpresnum } + } +\ctex_at_end_preamble:n + { \__sjtu_update_cft_presnum: } +\NewDocumentEnvironment { abbreviation } { } + { \__sjtu_head_aux:V \l__sjtu_name_abbr_tl } { } +\NewDocumentEnvironment { abbreviation* } { } + { \__sjtu_head_aux_s:V \l__sjtu_name_abbr_tl } { } +\NewDocumentEnvironment { nomenclature } { } + { \__sjtu_head_aux:V \l__sjtu_name_nom_tl } { } +\NewDocumentEnvironment { nomenclature* } { } + { \__sjtu_head_aux_s:V \l__sjtu_name_nom_tl } { } +\NewDocumentEnvironment { summary } { } + { \__sjtu_head_aux:V \l__sjtu_name_summary_tl } { } +\NewDocumentEnvironment { acknowledgements } { +b } + { + \bool_if:NF \g__sjtu_review_bool + { + \__sjtu_head_aux:V \l__sjtu_name_ack_tl + #1 + } + } { } +\newcounter { SJTU@bib } +\NewDocumentEnvironment { @bibliolist } { m } + { + \cs_if_exist_use:N \bibfont + \list + { \@biblabel { \arabic{ SJTU@bib } } } + { + \__sjtu_dim_set_to_wd:Nn \labelwidth { \@biblabel {#1} } + \dim_set_eq:NN \leftmargin \labelwidth + \dim_add:Nn \leftmargin { \labelsep } + \dim_if_exist:NTF \bibitemsep + { + \dim_set_eq:NN \itemsep \bibitemsep + \dim_if_exist:NT \bibparsep + { \dim_set_eq:NN \parsep \bibparsep } + } + { + \dim_if_exist:NT \bibsep + { + \dim_set_eq:NN \itemsep \bibsep + \dim_zero:N \parsep + } + } + \@nmbrlisttrue + \tl_set:Nn \@listctr { SJTU@bib } + \cs_set:Npn \p@SJTU@bib { } + \cs_set:Npn \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 } + } + { + \cs_set:Npn \@noitemerr + { \msg_warning:nnn { sjtutex } { empty-environment } { bibliolist } } + \endlist + } +\msg_new:nnn { sjtutex } { empty-environment } + { Empty~ `#1'~ environment. } +\NewDocumentEnvironment { achievements } { } + { \__sjtu_head_aux:V \l__sjtu_name_achv_tl } { } +\NewDocumentEnvironment { bibliolist } { m +b } + { + \bool_if:NF \g__sjtu_review_bool + { + \cs_set:Npn \@noitemerr { } + \begin { @bibliolist } {#1} + #2 + \end { @bibliolist } + } + } { } +\NewDocumentEnvironment { bibliolist* } { m +b } + { + \bool_if:NT \g__sjtu_review_bool + { + \cs_set:Npn \@noitemerr { } + \begin { @bibliolist } {#1} + #2 + \end { @bibliolist } + } + } { } +\NewDocumentEnvironment { resume } { +b } + { + \bool_if:NF \g__sjtu_review_bool + { + \__sjtu_head_aux:V \l__sjtu_name_resume_tl + #1 + } + } { } +\NewDocumentEnvironment { digest } { +b } + { + \AtEndDocument + { + \bool_if:NTF \g__sjtu_openright_bool + { \cleardoublepage } { \clearpage } + \pagenumbering { roman } + \cs_gset:Nn \__sjtu_thepage: { \arabic { page } } + \cs_gset_eq:NN \addcontentsline \use_none:nnn + \__sjtu_counter_without_chapter: + \__sjtu_head_auxb_s:Vo \l__sjtu_name_digest_tl + { \exp_args:NV \MakeUppercase \l__sjtu_info_title_aux_tl } + #1 + } + } { } +\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__sjtu_bookmark_int + \cs_gset_protected:Npn \__sjtu_pdf_bookmark:nn #1#2 + { + \phantomsection + \int_gincr:N \g__sjtu_bookmark_int + \pdfbookmark [#1] {#2} + { sjtubookmark. \int_use:N \g__sjtu_bookmark_int } + } + \cs_gset_eq:NN \__sjtu_phantom_section: \phantomsection + \pdfstringdefDisableCommands + { + \cs_set_eq:NN \\ \prg_do_nothing: + \cs_set_eq:NN \quad \c_empty_tl + \cs_set_eq:NN \qquad \c_empty_tl + \cs_set_eq:NN \hspace \use_none:n + } + \ctex_after_end_preamble:n + { + \hypersetup + { + pdftitle = \l__sjtu_info_title_zh_tl, + pdfsubject = \l__sjtu_info_subject_zh_tl, + pdfkeywords = \l__sjtu_info_keywords_zh_clist, + pdfauthor = \l__sjtu_info_author_zh_tl + } + } + } +\ctex_at_end_package:nn { threeparttable } + { \tl_put_right:Nn \TPTnoteSettings { \footnotesize } } +\ctex_at_end_package:nn { longtable } + { \AtBeginEnvironment { longtable } { \SJTU@style@float@font } } +\cs_new_protected:Nn \__sjtu_new_theorems: + { + \clist_map_inline:nn + { + assumption, axiom, conjecture, corollary, definition, example, + exercise, lemma, problem, proposition, theorem + } + { \exp_args:Nnv \newtheorem {##1} { c__sjtu_name_ ##1 _tl } [ chapter ] } + \clist_map_inline:nn + { remark, solution } + { \exp_args:NNnv \newtheorem* {##1} { c__sjtu_name_ ##1 _tl } } + } +\ctex_at_begin_package:nn { amsthm } + { + \cs_if_exist:NT \openbox + { + \cs_new_eq:NN \__sjtu_save_openbox: \openbox + \cs_undefine:N \openbox + } + } +\ctex_at_end_package:nn { amsthm } + { + \cs_if_exist:NT \__sjtu_save_openbox: + { \cs_set_eq:NN \openbox \__sjtu_save_openbox: } + \tl_set:Nn \qedsymbol { \ensuremath { \QED } } + \RenewDocumentEnvironment { proof } { O{ \proofname } } + { + \par \pushQED { \qed } + \normalfont \dim_zero:N \topsep + \trivlist + \item + [ + \skip_horizontal:N \labelsep + \bfseries \heiti #1 \@addpunct { \enskip } + ] + \ignorespaces + } + { \popQED \endtrivlist \legacy_if_set_false:n { @endpe } } + \newtheoremstyle { sjtu } + { } { } { \normalfont } { } { \bfseries \heiti } { } { \ccwd } { } + \theoremstyle { sjtu } + \__sjtu_new_theorems: + } +\ctex_at_end_package:nn { ntheorem } + { + \theoremheaderfont { \bfseries \heiti } + \theorembodyfont { \normalfont } + \theoremseparator { \enskip } + \theoremsymbol { \ensuremath { \QED } } + \qedsymbol { \ensuremath { \QED } } + \newtheorem* { proof } { \proofname } + \theoremsymbol { } + \__sjtu_new_theorems: + } +\cs_new_protected:Npn \__sjtu_newlistof:nnnnn #1#2#3#4#5 + { + \exp_args:Nnv \newlistentry {#2} { ext@ #3 } { 0 } + \exp_args:Ne \newcounter { \tl_use:c { ext@ #3 } depth } + \exp_args:Ne \setcounter { \tl_use:c { ext@ #3 } depth } { 1 } + \dim_set:cn { cft #2 indent } { 1.5 em } + \dim_set:cn { cft #2 numwidth } { 2.3 em } + \cs_set_eq:cc { l@ #3 } { l@ #2 } + \__sjtu_appto_cmd:Nn \__sjtu_update_cft_presnum: + { + \tl_set:cn { cft #2 presnum } { #4 \c_space_tl } + \__sjtu_dim_add_to_wd:cv { cft #2 numwidth } { cft #2 presnum } + } + \exp_args:Nc \DeclareDocumentCommand { listof #1 s } { } + { \SJTU@listof {#5} {#3} } + \cs_set:cpn { the #3 } + { \thechapter \l__sjtu_style_fl_num_sep_tl \arabic {#3} } + \__sjtu_appto_cmd:Nn \__sjtu_counter_without_chapter: + { + \counterwithout {#3} { chapter } + \setcounter {#3} { 0 } + } + } +\ctex_at_end_package:nn { algorithm } + { + \tl_set:Nn \fname@algorithm { \l__sjtu_name_algorithm_tl } + \tl_set:Nn \listalgorithmname { \l__sjtu_name_listalgorithm_tl } + \__sjtu_newlistof:nnnnn { algorithm } { alg } { algorithm } + { \fname@algorithm } { \listalgorithmname } + } +\ctex_at_begin_package:nn { algorithm2e } + { \cs_set_eq:NN \__sjtu_save_chapter:w \@chapter } +\ctex_at_end_package:nn { algorithm2e } + { + \cs_set_eq:NN \@chapter \__sjtu_save_chapter:w + \SetAlgorithmName { \l__sjtu_name_algorithm_tl } + { \l__sjtu_name_algorithm_tl } + { \l__sjtu_name_listalgorithm_tl } + \SetAlgoCaptionSeparator { \enskip } + \__sjtu_newlistof:nnnnn { algorithm } { alg } { algocf } + { \algorithmcfname } { \listalgorithmcfname } + \ctex_patch_cmd:Nnn \algocf@latexcaption + { \addcontentsline } + { \caption@iflist { \addcontentsline } { \@gobblethree } } + } +\ctex_at_end_package:nn { listings } + { + \lstdefinestyle { lstStyleCode } + { + aboveskip = \medskipamount , + belowskip = \medskipamount , + basicstyle = \ttfamily \zihao { 6 } , + commentstyle = \slshape \color { black!60 } , + stringstyle = \color { green!40!black!100 } , + keywordstyle = \bfseries \color { blue!50!black } , + extendedchars = false , + upquote = true , + tabsize = 2 , + showstringspaces = false , + xleftmargin = 1 em , + xrightmargin = 1 em , + breaklines = false , + framexleftmargin = 1 em , + framexrightmargin = 1 em , + backgroundcolor = \color { gray!10 } , + columns = flexible , + keepspaces = true , + texcl = true , + mathescape = true + } + } +\ctex_at_end_package:nn { nomencl } + { \tl_set:Nn \nomname { \l__sjtu_name_nom_tl } } +\endinput +%% +%% End of file `sjtuthesis.cls'. diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-badge-black.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-badge-black.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-badge-black.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-badge-black.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-badge-blue.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-badge-blue.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-badge-blue.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-badge-blue.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-badge-red.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-badge-red.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-badge-red.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-badge-red.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-logo-black.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-logo-black.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-logo-black.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-logo-black.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-logo-blue.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-logo-blue.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-logo-blue.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-logo-blue.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-logo-red.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-logo-red.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-logo-red.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-logo-red.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-name-black.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-name-black.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-name-black.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-name-black.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-name-blue.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-name-blue.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-name-blue.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-name-blue.pdf diff --git a/texmf/tex/latex/sjtuthesis/vi/sjtu-vi-name-red.pdf b/texmf/tex/latex/sjtutex/vi/sjtu-vi-name-red.pdf similarity index 100% rename from texmf/tex/latex/sjtuthesis/vi/sjtu-vi-name-red.pdf rename to texmf/tex/latex/sjtutex/vi/sjtu-vi-name-red.pdf diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def deleted file mode 100644 index 320530bc..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-adobe.def +++ /dev/null @@ -1,45 +0,0 @@ -%% -%% This is file `sjtu-cjk-font-adobe.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `cjkfont,adobe') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-cjk-font-adobe.def} - [2022/07/29 1.1.1 Adobe CJK fonts definition (SJTUThesis)] -\setCJKmainfont{AdobeSongStd-Light}[ - AutoFakeBold = 3, - ItalicFont = AdobeKaitiStd-Regular, -] -\setCJKsansfont{AdobeHeitiStd-Regular}[BoldFont=*] -\setCJKmonofont{AdobeFangsongStd-Regular} -\setCJKfamilyfont{zhsong}{AdobeSongStd-Light}[ - AutoFakeBold = 3, - ItalicFont = AdobeKaitiStd-Regular, -] -\setCJKfamilyfont{zhhei}{AdobeHeitiStd-Regular}[BoldFont=*] -\setCJKfamilyfont{zhfs}{AdobeFangsongStd-Regular} -\setCJKfamilyfont{zhkai}{AdobeKaitiStd-Regular} -\NewDocumentCommand\songti{}{\CJKfamily{zhsong}} -\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}} -\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}} -\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}} -\endinput -%% -%% End of file `sjtu-cjk-font-adobe.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def deleted file mode 100644 index ebf8975b..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-fandol.def +++ /dev/null @@ -1,65 +0,0 @@ -%% -%% This is file `sjtu-cjk-font-fandol.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `cjkfont,fandol') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-cjk-font-fandol.def} - [2022/07/29 1.1.1 Fandol CJK fonts definition (SJTUThesis)] -\setCJKmainfont{FandolSong}[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = FandolKai-Regular, -] -\setCJKsansfont{FandolHei}[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Regular, -] -\setCJKmonofont{FandolFang}[ - Extension = .otf, - UprightFont = *-Regular, -] -\setCJKfamilyfont{zhsong}{FandolSong}[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, -] -\setCJKfamilyfont{zhhei}{FandolHei}[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Regular, -] -\setCJKfamilyfont{zhfs}{FandolFang}[ - Extension = .otf, - UprightFont = *-Regular, -] -\setCJKfamilyfont{zhkai}{FandolKai}[ - Extension = .otf, - UprightFont = *-Regular, -] -\NewDocumentCommand\songti{}{\CJKfamily{zhsong}} -\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}} -\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}} -\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}} -\endinput -%% -%% End of file `sjtu-cjk-font-fandol.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def deleted file mode 100644 index 4017c49b..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-founder.def +++ /dev/null @@ -1,45 +0,0 @@ -%% -%% This is file `sjtu-cjk-font-founder.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `cjkfont,founder') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-cjk-font-founder.def} - [2022/07/29 1.1.1 Founder CJK fonts definition (SJTUThesis)] -\setCJKmainfont{FZShuSong-Z01}[ - AutoFakeBold = 3, - ItalicFont = FZKai-Z03, -] -\setCJKsansfont{FZHei-B01}[BoldFont=*] -\setCJKmonofont{FZFangSong-Z02} -\setCJKfamilyfont{zhsong}{FZShuSong-Z01}[ - AutoFakeBold = 3, - ItalicFont = FZKai-Z03, -] -\setCJKfamilyfont{zhhei}{FZHei-B01}[BoldFont=*] -\setCJKfamilyfont{zhkai}{FZKai-Z03} -\setCJKfamilyfont{zhfs}{FZFangSong-Z02} -\NewDocumentCommand\songti{}{\CJKfamily{zhsong}} -\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}} -\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}} -\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}} -\endinput -%% -%% End of file `sjtu-cjk-font-founder.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def deleted file mode 100644 index c2f803f8..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-mac.def +++ /dev/null @@ -1,56 +0,0 @@ -%% -%% This is file `sjtu-cjk-font-mac.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `cjkfont,mac') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-cjk-font-mac.def} - [2022/07/29 1.1.1 macOS CJK fonts definition (SJTUThesis)] -\setCJKmainfont{Songti SC}[ - UprightFont = * Light, - BoldFont = * Bold, - ItalicFont = Kaiti SC Regular, - BoldItalicFont = Kaiti SC Bold, -] -\setCJKsansfont{Heiti SC}[ - UprightFont = * Medium, - BoldFont = * Medium, -]% -\setCJKmonofont{STFangsong} -\setCJKfamilyfont{zhsong}{Songti SC}[ - UprightFont = * Light, - BoldFont = * Bold, -] -\setCJKfamilyfont{zhhei}{Heiti SC}[ - UprightFont = * Medium, - BoldFont = * Medium, -] -\setCJKfamilyfont{zhfs}{STFangsong} -\setCJKfamilyfont{zhkai}{Kaiti SC}[ - UprightFont = * Regular, - BoldFont = * Bold, -] -\NewDocumentCommand\songti{}{\CJKfamily{zhsong}} -\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}} -\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}} -\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}} -\endinput -%% -%% End of file `sjtu-cjk-font-mac.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def deleted file mode 100644 index d0e6a8e9..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-ubuntu.def +++ /dev/null @@ -1,51 +0,0 @@ -%% -%% This is file `sjtu-cjk-font-ubuntu.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `cjkfont,ubuntu') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-cjk-font-ubuntu.def} - [2022/07/29 1.1.1 Ubuntu CJK fonts definition (SJTUThesis)] -\setCJKmainfont{Noto Serif CJK SC}[ - UprightFont = * Light, - BoldFont = * Bold, - ItalicFont = AR PL UKai CN, -] -\setCJKsansfont{Noto Sans CJK SC}[ - UprightFont = * Medium, - BoldFont = * Medium, -] -\setCJKmonofont{Noto Sans Mono CJK SC} -\setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[ - UprightFont = * Light, - BoldFont = * Bold, - ItalicFont = AR PL UKai CN, -] -\setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[ - UprightFont = * Medium, - BoldFont = * Medium, -] -\setCJKfamilyfont{zhkai}{AR PL UKai CN} -\NewDocumentCommand\songti{}{\CJKfamily{zhsong}} -\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}} -\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}} -\endinput -%% -%% End of file `sjtu-cjk-font-ubuntu.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def deleted file mode 100644 index ff5bcf31..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-cjk-font-windows.def +++ /dev/null @@ -1,45 +0,0 @@ -%% -%% This is file `sjtu-cjk-font-windows.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `cjkfont,windows') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-cjk-font-windows.def} - [2022/07/29 1.1.1 Windows CJK fonts definition (SJTUThesis)] -\setCJKmainfont{SimSun}[ - AutoFakeBold = 3, - ItalicFont = KaiTi, -] -\setCJKsansfont{SimHei}[BoldFont=*] -\setCJKmonofont{FangSong} -\setCJKfamilyfont{zhsong}{SimSun}[ - AutoFakeBold = 3, - ItalicFont = KaiTi, -] -\setCJKfamilyfont{zhhei}{SimHei}[BoldFont=*] -\setCJKfamilyfont{zhkai}{KaiTi} -\setCJKfamilyfont{zhfs}{FangSong} -\NewDocumentCommand\songti{}{\CJKfamily{zhsong}} -\NewDocumentCommand\heiti{}{\CJKfamily{zhhei}} -\NewDocumentCommand\fangsong{}{\CJKfamily{zhfs}} -\NewDocumentCommand\kaishu{}{\CJKfamily{zhkai}} -\endinput -%% -%% End of file `sjtu-cjk-font-windows.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def deleted file mode 100644 index 4eabafd9..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-cambria.def +++ /dev/null @@ -1,33 +0,0 @@ -%% -%% This is file `sjtu-math-font-cambria.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,cambria') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-cambria.def} - [2022/07/29 1.1.1 Cambria math fonts definition (SJTUThesis)] -\RequirePackage{unicode-math} -\setmathfont{Cambria Math} -\setmathrm{Cambria} -\setmathsf{Calibri} -\setmathtt{Consolas}[Scale=MatchLowercase] -\endinput -%% -%% End of file `sjtu-math-font-cambria.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def deleted file mode 100644 index 1a96f624..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-lm.def +++ /dev/null @@ -1,41 +0,0 @@ -%% -%% This is file `sjtu-math-font-lm.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,lm') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-lm.def} - [2022/07/29 1.1.1 Latin Modern math fonts definition (SJTUThesis)] -\RequirePackage{amssymb} -\RequirePackage{upgreek} -\let\sjtu@save@encodingdefault\encodingdefault -\let\sjtu@save@rmdefault\rmdefault -\let\sjtu@save@sfdefault\sfdefault -\let\sjtu@save@ttdefault\ttdefault -\def\encodingdefault{T1} -\RequirePackage{lmodern} -\RequirePackage{bm} -\let\encodingdefault\sjtu@save@encodingdefault -\let\rmdefault\sjtu@save@rmdefault -\let\sfdefault\sjtu@save@sfdefault -\let\ttdefault\sjtu@save@ttdefault -\endinput -%% -%% End of file `sjtu-math-font-lm.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def deleted file mode 100644 index d53c50f5..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newcm.def +++ /dev/null @@ -1,84 +0,0 @@ -%% -%% This is file `sjtu-math-font-newcm.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,newcm') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-newcm.def} - [2022/07/29 1.1.1 New Computer Modern math fonts definition (SJTUThesis)] -\RequirePackage{unicode-math} -\setmathfont[ - StylisticSet = 2 -]{NewCMMath-Book.otf} -\setmathfont[ - range = {scr, bfscr}, - StylisticSet = 1 -]{NewCMMath-Book.otf} -\setmathrm[ - 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, - BoldSlantedFont = *-Bold, - SlantedFeatures = {FakeSlant=0.25}, - BoldSlantedFeatures = {FakeSlant=0.25} -]{NewCM10} -\setmathsf[ - Extension = .otf, - SizeFeatures = - { - { - Size = -9, - Font = NewCMSans08-Book, - ItalicFont = NewCMSans08-BookOblique, - }, - { Size = 9- } - }, - UprightFont = *-Book, - BoldFont = *-Bold, - ItalicFont = *-BookOblique, - BoldItalicFont = *-BoldOblique -]{NewCMSans10} -\setmathtt[ - Extension = .otf, - UprightFont = *-Book, - BoldFont = *-Bold, - ItalicFont = *-BookItalic, - BoldItalicFont = *-BoldOblique, - SlantedFont = *-Book, - SlantedFeatures = {FakeSlant = 0.25}, - BoldSlantedFont = *-Bold, - BoldSlantedFeatures = {FakeSlant = 0.25} -]{NewCMMono10} -\endinput -%% -%% End of file `sjtu-math-font-newcm.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newpx.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newpx.def deleted file mode 100644 index f5639a89..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newpx.def +++ /dev/null @@ -1,42 +0,0 @@ -%% -%% This is file `sjtu-math-font-newpx.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,newpx') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-newpx.def} - [2022/07/29 1.1.1 NewPX math fonts definition (SJTUThesis)] -\let\sjtu@save@encodingdefault\encodingdefault -\let\sjtu@save@rmdefault\rmdefault -\let\sjtu@save@sfdefault\sfdefault -\let\sjtu@save@ttdefault\ttdefault -\def\encodingdefault{T1} -\def\rmdefault{zpltlf} -\def\sfdefault{qhv} -\def\ttdefault{ntxtt} -\RequirePackage[upint]{newpxmath} -\RequirePackage{bm} -\let\encodingdefault\sjtu@save@encodingdefault -\let\rmdefault\sjtu@save@rmdefault -\let\sfdefault\sjtu@save@sfdefault -\let\ttdefault\sjtu@save@ttdefault -\endinput -%% -%% End of file `sjtu-math-font-newpx.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newtx.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newtx.def deleted file mode 100644 index 2a05e4a1..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-newtx.def +++ /dev/null @@ -1,42 +0,0 @@ -%% -%% This is file `sjtu-math-font-newtx.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,newtx') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-newtx.def} - [2022/07/29 1.1.1 NewTX math fonts definition (SJTUThesis)] -\let\sjtu@save@encodingdefault\encodingdefault -\let\sjtu@save@rmdefault\rmdefault -\let\sjtu@save@sfdefault\sfdefault -\let\sjtu@save@ttdefault\ttdefault -\def\encodingdefault{T1} -\def\rmdefault{ntxtlf} -\def\sfdefault{qhv} -\def\ttdefault{ntxtt} -\RequirePackage[upint]{newtxmath} -\RequirePackage{bm} -\let\encodingdefault\sjtu@save@encodingdefault -\let\rmdefault\sjtu@save@rmdefault -\let\sfdefault\sjtu@save@sfdefault -\let\ttdefault\sjtu@save@ttdefault -\endinput -%% -%% End of file `sjtu-math-font-newtx.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def deleted file mode 100644 index 6f6e17cb..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-stixtwo.def +++ /dev/null @@ -1,79 +0,0 @@ -%% -%% This is file `sjtu-math-font-stixtwo.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,stixtwo') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-stixtwo.def} - [2022/07/29 1.1.1 STIX Two math fonts definition (SJTUThesis)] -\RequirePackage{unicode-math} -\IfFontExistsTF{STIXTwoMath-Regular.otf}{ - \setmathfont[ - StylisticSet = 8 - ]{STIXTwoMath-Regular.otf} - \setmathfont[ - range = {scr, bfscr}, - StylisticSet = 1 - ]{STIXTwoMath-Regular.otf} -}{ - \setmathfont[ - StylisticSet = 8 - ]{STIX2Math.otf} - \setmathfont[ - range = {scr, bfscr}, - StylisticSet = 1 - ]{STIX2Math.otf} -} -\IfFontExistsTF{STIXTwoText-Regular.otf}{ - \setmathrm[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic, - ]{STIXTwoText} -}{ - \setmathrm[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic, - ]{STIX2Text} -} -\setmathsf[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, -]{texgyreheros} -\setmathtt[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, -]{texgyrecursor} -\endinput -%% -%% End of file `sjtu-math-font-stixtwo.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def deleted file mode 100644 index 0006a8f5..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-math-font-xits.def +++ /dev/null @@ -1,83 +0,0 @@ -%% -%% This is file `sjtu-math-font-xits.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `mathfont,xits') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-math-font-xits.def} - [2022/07/29 1.1.1 XITS math fonts definition (SJTUThesis)] -\RequirePackage{unicode-math} -\IfFontExistsTF{XITSMath-Regular.otf}{ - \setmathfont[ - Extension = .otf, - BoldFont = XITSMath-Bold, - StylisticSet = 8, - ]{XITSMath-Regular} - \setmathfont[ - range = {cal, bfcal}, - StylisticSet = 1 - ]{XITSMath-Regular.otf} -}{ - \setmathfont[ - Extension = .otf, - BoldFont = *bold, - StylisticSet = 8, - ]{xits-math} - \setmathfont[ - range = {cal, bfcal}, - StylisticSet = 1 - ]{xits-math.otf} -} -\IfFontExistsTF{XITS-Regular.otf}{ - \setmathrm[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic, - ]{XITS} -}{ - \setmathrm[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - ]{xits} -} -\setmathsf[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, -]{texgyreheros} -\setmathtt[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, -]{texgyrecursor} -\endinput -%% -%% End of file `sjtu-math-font-xits.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def deleted file mode 100644 index 6e1cb0da..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-cambria.def +++ /dev/null @@ -1,31 +0,0 @@ -%% -%% This is file `sjtu-text-font-cambria.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,cambria') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-cambria.def} - [2022/07/29 1.1.1 Cambria text fonts definition (SJTUThesis)] -\setmainfont{Cambria} -\setsansfont{Calibri} -\setmonofont{Consolas}[Scale=MatchLowercase] -\endinput -%% -%% End of file `sjtu-text-font-cambria.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def deleted file mode 100644 index 88ff7266..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-lm.def +++ /dev/null @@ -1,28 +0,0 @@ -%% -%% This is file `sjtu-text-font-lm.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,lm') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-lm.def} - [2022/07/29 1.1.1 Latin Modern text fonts definition (SJTUThesis)] -\endinput -%% -%% End of file `sjtu-text-font-lm.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def deleted file mode 100644 index 0736f8c0..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newcm.def +++ /dev/null @@ -1,76 +0,0 @@ -%% -%% This is file `sjtu-text-font-newcm.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,newcm') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-newcm.def} - [2022/07/29 1.1.1 New Computer Modern text fonts definition (SJTUThesis)] -\setmainfont[ - 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, - BoldSlantedFont = *-Bold, - SlantedFeatures = {FakeSlant=0.25}, - BoldSlantedFeatures = {FakeSlant=0.25} -]{NewCM10} -\setsansfont[ - Extension = .otf, - SizeFeatures = - { - { - Size = -9, - Font = NewCMSans08-Book, - ItalicFont = NewCMSans08-BookOblique, - }, - { Size = 9- } - }, - UprightFont = *-Book, - BoldFont = *-Bold, - ItalicFont = *-BookOblique, - BoldItalicFont = *-BoldOblique -]{NewCMSans10} -\setmonofont[ - Extension = .otf, - UprightFont = *-Book, - BoldFont = *-Bold, - ItalicFont = *-BookItalic, - BoldItalicFont = *-BoldOblique, - SlantedFont = *-Book, - SlantedFeatures = {FakeSlant = 0.25}, - BoldSlantedFont = *-Bold, - BoldSlantedFeatures = {FakeSlant = 0.25} -]{NewCMMono10} -\endinput -%% -%% End of file `sjtu-text-font-newcm.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newpx.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newpx.def deleted file mode 100644 index f685a77c..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newpx.def +++ /dev/null @@ -1,51 +0,0 @@ -%% -%% This is file `sjtu-text-font-newpx.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,newpx') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-newpx.def} - [2022/07/29 1.1.1 NewPX text fonts definition (SJTUThesis)] -\setmainfont[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic -]{TeXGyrePagellaX} -\setsansfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, -]{texgyreheros} -\setmonofont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, -]{texgyrecursor} -\endinput -%% -%% End of file `sjtu-text-font-newpx.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newtx.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newtx.def deleted file mode 100644 index fefb2a5b..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-newtx.def +++ /dev/null @@ -1,51 +0,0 @@ -%% -%% This is file `sjtu-text-font-newtx.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,newtx') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-newtx.def} - [2022/07/29 1.1.1 NewTX text fonts definition (SJTUThesis)] -\setmainfont[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic -]{TeXGyreTermesX} -\setsansfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, -]{texgyreheros} -\setmonofont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, -]{texgyrecursor} -\endinput -%% -%% End of file `sjtu-text-font-newtx.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def deleted file mode 100644 index b3bcf7a3..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-stixtwo.def +++ /dev/null @@ -1,61 +0,0 @@ -%% -%% This is file `sjtu-text-font-stixtwo.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,stixtwo') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-stixtwo.def} - [2022/07/29 1.1.1 STIX Two text fonts definition (SJTUThesis)] -\IfFontExistsTF{STIXTwoText-Regular.otf}{ - \setmainfont[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic, - ]{STIXTwoText} -}{ - \setmainfont[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic, - ]{STIX2Text} -} -\setsansfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, -]{texgyreheros} -\setmonofont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, -]{texgyrecursor} -\endinput -%% -%% End of file `sjtu-text-font-stixtwo.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def deleted file mode 100644 index f685ec7a..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-times.def +++ /dev/null @@ -1,31 +0,0 @@ -%% -%% This is file `sjtu-text-font-times.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,times') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-times.def} - [2022/07/29 1.1.1 Times text fonts definition (SJTUThesis)] -\setmainfont{Times New Roman}[Ligatures=Rare] -\setsansfont{Arial} -\setmonofont{Courier New}[Scale=MatchLowercase] -\endinput -%% -%% End of file `sjtu-text-font-times.def'. diff --git a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def b/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def deleted file mode 100644 index d9cadd9b..00000000 --- a/texmf/tex/latex/sjtuthesis/fd/sjtu-text-font-xits.def +++ /dev/null @@ -1,61 +0,0 @@ -%% -%% This is file `sjtu-text-font-xits.def', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `textfont,xits') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtu-text-font-xits.def} - [2022/07/29 1.1.1 XITS text fonts definition (SJTUThesis)] -\IfFontExistsTF{XITS-Regular.otf}{ - \setmainfont[ - Extension = .otf, - UprightFont = *-Regular, - BoldFont = *-Bold, - ItalicFont = *-Italic, - BoldItalicFont = *-BoldItalic, - ]{XITS} -}{ - \setmainfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - ]{xits} -} -\setsansfont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, -]{texgyreheros} -\setmonofont[ - Extension = .otf, - UprightFont = *-regular, - BoldFont = *-bold, - ItalicFont = *-italic, - BoldItalicFont = *-bolditalic, - Scale = MatchLowercase, - Ligatures = CommonOff, -]{texgyrecursor} -\endinput -%% -%% End of file `sjtu-text-font-xits.def'. diff --git a/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx b/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx deleted file mode 100644 index 2f4ccad7..00000000 --- a/texmf/tex/latex/sjtuthesis/sjtuthesis-graduate.ltx +++ /dev/null @@ -1,180 +0,0 @@ -%% -%% This is file `sjtuthesis-graduate.ltx', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `graduate') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtuthesis-graduate.ltx} - [2022/07/29 1.1.1 Shanghai Jiao Tong University Thesis Template] -\geometry{% - paper = a4paper, - top = 3.5cm, - bottom = 4.0cm, - left = 3.3cm, - right = 2.8cm, - headheight = 1.0cm, - headsep = 0.5cm, -} -\pagestyle{fancy} -\newcommand\sjtu@thepage@format[2]{---~{\bfseries{#1}}~---} -\def\sjtu@info@fund{} -\fancypagestyle{title}{% - \fancyhf{} - \fancyfoot[L]{\ifsjtu@review\relax\else\sjtu@info@fund\fi} - \renewcommand\headrulewidth{0pt} - \renewcommand\footrulewidth{0pt} -} -\fancypagestyle{plain}{% - \fancyhf{} - \if@twoside - \ifsjtu@style@header@single - \fancyhead[CO]{\zihao{-5}\sjtu@name@subject@zh} - \fancyhead[CE]{\zihao{-5}\leftmark} - \else - \fancyhead[RE,LO]{\zihao{-5}\sjtu@name@subject@zh} - \fancyhead[RO,LE]{\zihao{-5}\leftmark} - \fi - \else - \ifsjtu@style@header@single - \fancyhead[C]{\zihao{-5}\sjtu@name@subject@zh} - \else - \fancyhead[L]{\zihao{-5}\sjtu@name@subject@zh} - \fancyhead[R]{\zihao{-5}\leftmark} - \fi - \fi - \fancyfoot[C]{% - \ifsjtu@page@numbering - \zihao{-5}\sjtu@thepage@format{\sjtu@thepage}{\sjtu@lastpageref}% - \fi - } - \renewcommand\headrule{% - \hrule\@height2.25pt\@width\headwidth - \vskip 0.75pt - \hrule\@height0.75pt\@width\headwidth - \vskip-3.75pt - } -} -\renewcommand\cftchapfont{\bfseries\heiti} -\NewDocumentEnvironment{abstract}{}{% - \sjtu@chapter*[\sjtu@name@abstract@zh]{% - \sjtu@info@title@zh \vskip 2ex - \begingroup - \sjtu@name@abstract@zh - \endgroup - }[\sjtu@name@abstract]% -}{% - \vskip \baselineskip \noindent - \begingroup - \heiti\sjtu@name@keywords@zh - \endgroup - \begingroup - \sjtu@clist@use{\sjtu@info@keywords@zh}{,} - \endgroup -} -\NewDocumentEnvironment{abstract*}{}{% - \sjtu@chapter*[\sjtu@name@abstract@en]{% - \MakeUppercase\sjtu@info@title@en \vskip 2ex - \begingroup - \MakeUppercase\sjtu@name@abstract@en - \endgroup - }[] - \zihao{4} -}{% - \vskip 3ex \noindent - \begingroup - \bfseries\MakeUppercase - \sjtu@name@keywords@en - \endgroup - \begingroup - \sjtu@clist@use{\sjtu@info@keywords@en}{, } - \endgroup -} -\RenewDocumentCommand{\maketitle}{}{% - \sjtu@pdfbookmark{0}{\sjtu@name@titlepage} - \sjtu@make@titlepage@zh% - \sjtu@make@titlepage@en% -} -\newcommand\sjtu@make@titlepage@zh{% - \cleardoublepage - \def\sjtu@info@fund{\zihao{-5}\sjtu@clist@use{\sjtu@info@fund@zh}{\par}} - \thispagestyle{title} - \begin{center} - \vspace*{28pt} - {\zihao{-2}\sjtu@name@subject@zh\par} - \vskip \stretch{4} - {\zihao{2}\heiti\sjtu@info@display@title@zh\par} - \vskip \stretch{5} - \begingroup - \zihao{4} - \def\arraystretch{1.25} - \begin{tabular}{@{}>{\heiti}F{t}{6.5\ccwd}@{\sjtu@colon}l@{}} - \sjtu@name@author@zh & \sjtu@info@author@zh \\ - \sjtu@name@id@zh & \sjtu@info@id \\ - \sjtu@name@supervisor@zh & \sjtu@info@supervisor@zh \\ - \ifx\sjtu@info@assisupervisor@zh\@empty\else - \sjtu@name@assisupervisor@zh & \sjtu@info@assisupervisor@zh \\ - \fi - \sjtu@name@degree@zh & \sjtu@info@degree@zh \\ - \sjtu@name@major@zh & \sjtu@info@major@zh \\ - \sjtu@name@department@zh & \sjtu@info@department@zh \\ - \sjtu@name@defenddate@zh & - \sjtu@date{\sjtu@date@format@zh}{\sjtu@info@date} \\ - \sjtu@name@conferring@zh & \sjtu@name@school@zh \\ - \end{tabular} - \par - \endgroup - \vskip 26pt - \end{center} -} -\newcommand\sjtu@make@titlepage@en{% - \cleardoublepage - \def\sjtu@info@fund{\zihao{-5}\sjtu@clist@use{\sjtu@info@fund@en}{\par}} - \thispagestyle{title} - \begin{center} - \vspace*{28pt} - {\zihao{-2}\sjtu@name@subject@en\par} - \vskip \stretch{4} - {\zihao{2}\bfseries\MakeUppercase\sjtu@info@display@title@en\par} - \vskip \stretch{5} - \begingroup - \zihao{4} - \def\arraystretch{1.25} - \begin{tabular}{@{}>{\bfseries}l<{:~}@{}p{.45\textwidth}@{}} - \sjtu@name@author@en & \sjtu@info@author@en \\ - \sjtu@name@id@en & \sjtu@info@id \\ - \sjtu@name@supervisor@en & \sjtu@info@supervisor@en \\ - \ifx\sjtu@info@assisupervisor@en\@empty\else - \sjtu@name@assisupervisor@en & \sjtu@info@assisupervisor@en \\ - \fi - \sjtu@name@degree@en & \sjtu@info@degree@en \\ - \sjtu@name@major@en & \sjtu@info@major@en \\ - \sjtu@name@department@en & \sjtu@info@department@en \\ - \sjtu@name@defenddate@en & - \sjtu@date{\sjtu@date@format@en}{\sjtu@info@date} \\ - \sjtu@name@conferring@en & \sjtu@name@school@en \\ - \end{tabular} - \par - \endgroup - \vskip 26pt - \end{center} -} -\endinput -%% -%% End of file `sjtuthesis-graduate.ltx'. diff --git a/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx b/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx deleted file mode 100644 index db93b8d6..00000000 --- a/texmf/tex/latex/sjtuthesis/sjtuthesis-undergraduate.ltx +++ /dev/null @@ -1,162 +0,0 @@ -%% -%% This is file `sjtuthesis-undergraduate.ltx', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `undergraduate') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\ProvidesFile{sjtuthesis-undergraduate.ltx} - [2022/07/29 1.1.1 Shanghai Jiao Tong University Thesis Template] -\geometry{% - paper = a4paper, - top = 84bp, - bottom = 72bp, - left = 90bp, - right = 90bp, - headheight = 60bp, - headsep = 8bp, -} -\pagestyle{fancy} -\ifsjtu@lang@zh - \newcommand\sjtu@thepage@format[2]{第~{#1}~页\,共~{#2}~页} -\else - \newcommand\sjtu@thepage@format[2]{--~~Page~~{#1}~~of~~{#2}~~--} -\fi -\fancypagestyle{plain}{% - \fancyhf{} - \fancyhead[L]{% - \includegraphics[height=32pt]% - {sjtu-vi-logo-\sjtu@style@header@logo@color.pdf} - } - \fancyhead[R]{% - \parbox[b]{0.7\textwidth}{% - \raggedleft\zihao{-5}\heiti\MakeUppercase{\sjtu@info@running@title} - } - } - \fancyfoot[C]{% - \ifsjtu@page@numbering - \zihao{-5}\sjtu@thepage@format{\sjtu@thepage}{\sjtu@lastpageref}% - \fi - } - \renewcommand\headrulewidth{0.75pt} -} -\ctexset{% - subsection/format = \zihao{-4}\normalfont, -} -\renewcommand\cftchapfont{\normalfont} -\ifsjtu@type@bachelor - \sjtusetup{ - style = { - frontmatter-numbering = false, - indent-headings = fixed, - }, - } -\fi -\NewDocumentEnvironment{abstract}{}{% - \sjtu@chapter*[\sjtu@name@abstract@zh]{% - \sjtu@info@title@zh \vskip 2ex - \begingroup - \zihao{4} - \sjtu@name@abstract@zh - \endgroup - }[\sjtu@name@abstract]% -}{% - \vskip \baselineskip \noindent - \begingroup - \zihao{-4} - \heiti\sjtu@name@keywords@zh - \endgroup - \begingroup - \zihao{5} - \sjtu@clist@use{\sjtu@info@keywords@zh}{,} - \endgroup -} -\NewDocumentEnvironment{abstract*}{}{% - \sjtu@chapter*[\sjtu@name@abstract@en]{% - \MakeUppercase\sjtu@info@title@en \vskip 2ex - \begingroup - \zihao{4} - \MakeUppercase\sjtu@name@abstract@en - \endgroup - }[] -}{% - \vskip 3ex \noindent - \begingroup - \zihao{-4}\bfseries - \sjtu@name@keywords@en - \endgroup - \begingroup - \zihao{5} - \sjtu@clist@use{\sjtu@info@keywords@en}{, } - \endgroup -} -\RenewDocumentCommand{\maketitle}{}{% - \sjtu@pdfbookmark{0}{\sjtu@name@titlepage} - \sjtu@make@titlepage@zh% -} -\newcommand\sjtu@make@titlepage@zh{% - \cleardoublepage - \thispagestyle{empty} - \begin{center} - \kaishu - \vspace*{48pt} - \begingroup - \includegraphics[height=105pt]% - {sjtu-vi-name-\sjtu@style@title@logo@color.pdf} - \par - \endgroup - {\fontsize{32}{42}\selectfont\sjtu@name@subject@zh\par} - \vskip 6pt - {\zihao{-2}\MakeUppercase\sjtu@name@subject@en\par} - \vskip 16pt - \begingroup - \includegraphics[height=75pt]% - {sjtu-vi-badge-\sjtu@style@title@logo@color.pdf} - \par - \endgroup - \vskip \stretch{2} - \begingroup - \zihao{-2} - \begin{tabular}{@{}r@{\sjtu@colon}l@{}} - 论文题目 & \sjtu@title@box[300pt]{\sjtu@info@display@title@zh} - \end{tabular} - \par - \endgroup - \vskip \stretch{1} - \begingroup - \zihao{3} - \begin{tabular}{@{}F{t}{4.2\ccwd}@{\sjtu@colon}c@{}} - \sjtu@name@author@zh & \sjtu@info@author@zh \\\cline{2-2} - \sjtu@name@id@zh & \makebox[180pt]{\sjtu@info@id} \\\cline{2-2} - \ifsjtu@type@course - \sjtu@name@course@zh & \sjtu@info@course@zh \\\cline{2-2} - \else - \sjtu@name@major@zh & \sjtu@info@major@zh \\\cline{2-2} - \fi - \sjtu@name@supervisor@zh & \sjtu@info@supervisor@zh \\\cline{2-2} - \sjtu@name@department@zh & \sjtu@info@department@zh \\\cline{2-2} - \end{tabular} - \par - \endgroup - \vskip 64pt - \end{center} -} -\endinput -%% -%% End of file `sjtuthesis-undergraduate.ltx'. diff --git a/texmf/tex/latex/sjtuthesis/sjtuthesis.cls b/texmf/tex/latex/sjtuthesis/sjtuthesis.cls deleted file mode 100644 index 899a446e..00000000 --- a/texmf/tex/latex/sjtuthesis/sjtuthesis.cls +++ /dev/null @@ -1,1329 +0,0 @@ -%% -%% This is file `sjtuthesis.cls', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% sjtuthesis.dtx (with options: `class') -%% -%% Copyright (C) 2009-2017 by weijianwen -%% (C) 2018-2022 by SJTUG -%% -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% -%% This file has the LPPL maintenance status "maintained". -%% -%% The Current Maintainer of this work is Alexara Wu. -%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesClass{sjtuthesis} - [2022/07/29 1.1.1 Shanghai Jiao Tong University Thesis Template] -\hyphenation{SJTU-Thesis} -\def\sjtuthesis{SJTU\textsc{Thesis}} -\def\version{1.1.1} -\newcommand\sjtu@error[1]{% - \ClassError{sjtuthesis}{#1}{}% -} -\newcommand\sjtu@warning[1]{% - \ClassWarning{sjtuthesis}{#1}{}% -} -\RequirePackage{iftex} -\ifXeTeX\else - \ifLuaTeX\else - \sjtu@error{% - The SJTUThesis class requires either XeTeX or LuaTeX.\\\\ - You must change your typesetting engine to, e.g., - "xelatex" or "lualatex" instead of "latex" or "pdflatex". - } - \fi -\fi -\RequirePackage{kvdefinekeys} -\RequirePackage{kvsetkeys} -\RequirePackage{kvoptions} -\SetupKeyvalOptions{ - family=sjtu, - prefix=sjtu@, - setkeys=\kvsetkeys} -\newcommand\sjtusetup[1]{% - \kvsetkeys{sjtu}{#1}% -} -\newcommand\sjtu@define@key[2]{% - \kvsetkeys{#1@key}{#2}% -} -\newcommand\sjtu@set@family@handler[1]{% - \kv@set@family@handler{#1@key}{% - \def\sjtu@@initial{}% - \def\sjtu@@choices{}% - \@namedef{#1@##1@@default}{}% - \@namedef{#1@##1@@check}{}% - \@namedef{#1@##1@@code}{}% - \@namedef{#1@##1@@name}{##1}% - \kv@define@key{#1@value}{name}{% - \@namedef{#1@##1@@name}{####1}% - }% - \kv@define@key{#1@value}{choices}{% - \def\sjtu@@choices{####1}% - \@namedef{#1@##1@@reset}{}% - \@namedef{#1@##1@@check}{% - \@ifundefined{% - if#1@\@nameuse{#1@##1@@name}@\@nameuse{#1@\@nameuse{#1@##1@@name}}% - }{% - \sjtu@error{Invalid value `##1 = \@nameuse{#1@\@nameuse{#1@##1@@name}}'}% - }% - \@nameuse{#1@##1@@reset}% - \@nameuse{#1@\@nameuse{#1@##1@@name}@\@nameuse{#1@\@nameuse{#1@##1@@name}}true}% - }% - }% - \kv@define@key{#1@value}{initial}{% - \def\sjtu@@initial{####1}% - \expandafter\ifx\csname #1@##1@@default\endcsname\@empty - \@namedef{#1@##1@@default}{####1}% - \fi - }% - \kv@define@key{#1@value}{default}{% - \@namedef{#1@##1@@default}{####1}% - }% - \kvsetkeys{#1@value}{##2}% - \@namedef{#1@\@nameuse{#1@##1@@name}}{}% - \kv@set@family@handler{#1@choice}{% - \ifx\sjtu@@initial\@empty - \def\sjtu@@initial{####1}% - \fi - \expandafter\ifx\csname #1@##1@@default\endcsname\@empty - \@namedef{#1@##1@@default}{####1}% - \fi - \expandafter\newif\csname if#1@\@nameuse{#1@##1@@name}@####1\endcsname - \expandafter\g@addto@macro\csname #1@##1@@reset\endcsname{% - \@nameuse{#1@\@nameuse{#1@##1@@name}@####1false}% - }% - }% - \kvsetkeys@expandafter{#1@choice}{\sjtu@@choices}% - \expandafter\let\csname #1@\@nameuse{#1@##1@@name}\endcsname\sjtu@@initial - \expandafter\ifx\csname #1@\@nameuse{#1@##1@@name}\endcsname\@empty\else - \@nameuse{#1@##1@@check}% - \fi - \kv@define@key{#1}{##1}[\@nameuse{#1@##1@@default}]{% - \@namedef{#1@\@nameuse{#1@##1@@name}}{####1}% - \@nameuse{#1@##1@@check}% - \@nameuse{#1@##1@@code}% - }% - } -} -\newcommand\sjtu@option@hook[3]{% - \expandafter\g@addto@macro\csname #1@#2@@code\endcsname{#3}% -} -\sjtu@set@family@handler{sjtu} -\sjtu@define@key{sjtu}{ - type = { - choices = { - doctor, - master, - bachelor, - course, - }, - }, - lang = { - choices = { - zh, - en, - }, - }, - zihao = { - choices = { - -4, - 5, - auto, - false, - }, - initial = auto, - }, -} -\DeclareStringOption[newtx]{text-font} -\@namedef{sjtu@text@font}{\csname sjtu@text-font\endcsname} -\DeclareStringOption[auto]{math-font} -\@namedef{sjtu@math@font}{\csname sjtu@math-font\endcsname} -\DeclareStringOption[auto]{cjk-font} -\@namedef{sjtu@cjk@font}{\csname sjtu@cjk-font\endcsname} -\DeclareBoolOption[false]{nothm} -\DeclareBoolOption[false]{review} -\DeclareBoolOption[false]{openright} -\DeclareComplementaryOption{openany}{openright} -\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexbook}} -\ProcessKeyvalOptions* -\newif\ifsjtu@type@graduate -\sjtu@type@graduatefalse -\ifsjtu@type@doctor - \sjtu@type@graduatetrue -\fi -\ifsjtu@type@master - \sjtu@type@graduatetrue -\fi -\ifsjtu@zihao@auto - \ifsjtu@type@graduate - \def\sjtu@zihao{-4} - \else - \def\sjtu@zihao{5} - \fi -\fi -\edef\sjtu@opt@zihao{{zihao=\sjtu@zihao}} -\expandafter\PassOptionsToClass\sjtu@opt@zihao{ctexbook} -\ifsjtu@openright - \PassOptionsToClass{openright}{book} -\else - \PassOptionsToClass{openany}{book} -\fi -\ifsjtu@type@graduate\else - \PassOptionsToClass{oneside}{book} -\fi -\PassOptionsToPackage{no-math,quiet}{fontspec} -\LoadClass[a4paper,UTF8,scheme=plain,fontset=none,linespread=1.3]{ctexbook}[2018/04/01] -\AtEndOfClass{ - \ifsjtu@type@graduate - \input{sjtuthesis-graduate.ltx} - \else - \input{sjtuthesis-undergraduate.ltx} - \fi -} -\RequirePackage{xparse} -\RequirePackage{etoolbox} -\RequirePackage{filehook} -\RequirePackage{environ} -\RequirePackage{calc} -\RequirePackage{geometry} -\RequirePackage{fancyhdr} -\RequirePackage{pageslts} -\RequirePackage{amsmath} -\RequirePackage{xcolor} -\RequirePackage{graphicx} -\RequirePackage{array} -\RequirePackage{caption} -\RequirePackage[list=off]{bicaption} -\RequirePackage{subcaption} -\RequirePackage[titles]{tocloft} -\RequirePackage[inline]{enumitem} -\RequirePackage[perpage,bottom]{footmisc} -\RequirePackage{pdfpages} -\includepdfset{fitpaper=true} -\RequirePackage{url} -\RequirePackage{silence} -\WarningFilter{pageslts}{Package pdfpages detected} -\newcommand\sjtu@package@conflict[2]{ - \AtEndOfPackageFile*{#1}{% - \AtBeginOfPackageFile*{#2}{% - \sjtu@error{The "#2" package is incompatible with "#1"}% - } - } -} -\sjtu@package@conflict{unicode-math}{amscd} -\sjtu@package@conflict{unicode-math}{amsfonts} -\sjtu@package@conflict{unicode-math}{amssymb} -\sjtu@package@conflict{unicode-math}{bbm} -\sjtu@package@conflict{unicode-math}{bm} -\sjtu@package@conflict{unicode-math}{eucal} -\sjtu@package@conflict{unicode-math}{eufrak} -\sjtu@package@conflict{unicode-math}{mathrsfs} -\sjtu@package@conflict{unicode-math}{newtxmath} -\sjtu@package@conflict{unicode-math}{upgreek} -\sjtu@package@conflict{newtxmath}{amsfonts} -\sjtu@package@conflict{newtxmath}{amssymb} -\sjtu@package@conflict{newtxmath}{unicode-math} -\sjtu@package@conflict{newtxmath}{upgreek} -\newcommand\sjtu@patchcmd[3]{% - \patchcmd{#1}{#2}{#3}{}% - {\sjtu@warning{Oops! Command `\protect#1' is NOT patchable.}} -} -\kv@define@key{sjtu}{style}{ - \kvsetkeys{sjtu@style}{#1} -} -\sjtu@set@family@handler{sjtu@style} -\sjtu@define@key{sjtu@style}{ - header = { - choices = { - single, - double, - }, - }, - frontmatter-numbering = { - name = frontmatter@numbering, - choices = { - true, - false, - }, - }, - indent-headings = { - name = indent@headings, - choices = { - fixed, - auto, - false, - }, - initial = false, - default = fixed, - }, - footnote = { - choices = { - indent, - hang, - }, - }, - title-logo-color = { - name = title@logo@color, - choices = { - red, - blue, - black, - }, - initial = red, - }, - header-logo-color = { - name = header@logo@color, - choices = { - red, - blue, - black, - }, - initial = red, - }, - float-number-separator = { - name = fl@num@sep, - initial = {--}, - }, - equation-number-separator = { - name = eq@num@sep, - initial = {--}, - }, -} -\kv@define@key{sjtu}{info}{ - \kvsetkeys{sjtu@info}{#1} -} -\sjtu@set@family@handler{sjtu@info} -\sjtu@define@key{sjtu@info}{ - title = { name = title@zh }, - title* = { name = title@en }, - display-title = { name = display@title@zh }, - display-title* = { name = display@title@en }, - running-title = { name = running@title@zh }, - running-title* = { name = running@title@en }, - keywords = { name = keywords@zh }, - keywords* = { name = keywords@en }, - author = { name = author@zh }, - author* = { name = author@en }, - id, - supervisor = { name = supervisor@zh }, - supervisor* = { name = supervisor@en }, - assisupervisor = { name = assisupervisor@zh }, - assisupervisor* = { name = assisupervisor@en }, - degree = { name = degree@zh }, - degree* = { name = degree@en }, - department = { name = department@zh }, - department* = { name = department@en }, - major = { name = major@zh }, - major* = { name = major@en }, - course = { name = course@zh }, - course* = { name = course@en }, - fund = { name = fund@zh }, - fund* = { name = fund@en }, - date = {% - initial = {\the\year-\two@digits{\month}-\two@digits{\day}}, - }, -} -\sjtu@option@hook{sjtu@info}{title}{% - \ifx\sjtu@info@display@title@zh\@empty - \global\let\sjtu@info@display@title@zh\sjtu@info@title@zh - \fi - \ifx\sjtu@info@running@title@zh\@empty - \global\let\sjtu@info@running@title@zh\sjtu@info@title@zh - \fi -} -\sjtu@option@hook{sjtu@info}{title*}{% - \ifx\sjtu@info@display@title@en\@empty - \global\let\sjtu@info@display@title@en\sjtu@info@title@en - \fi - \ifx\sjtu@info@running@title@en\@empty - \global\let\sjtu@info@running@title@en\sjtu@info@title@en - \fi -} -\newcommand\sjtu@clist@use[2]{% - \let\sjtu@@tmp\@empty% - \def\sjtu@clist@processor##1{% - \ifx\sjtu@@tmp\@empty - \def\sjtu@@tmp{#2}% - \else - #2% - \fi - ##1% - }% - \expandafter\comma@parse\expandafter{#1}{\sjtu@clist@processor}% -} -\ifsjtu@lang@zh - \def\sjtu@info@title{\sjtu@info@title@zh} - \def\sjtu@info@title@sec{\sjtu@info@title@en} - \def\sjtu@info@display@title{\sjtu@info@display@title@zh} - \def\sjtu@info@running@title{\sjtu@info@running@title@zh} - \def\sjtu@info@keywords{\sjtu@info@keywords@zh} - \def\sjtu@info@author{\sjtu@info@author@zh} -\else - \def\sjtu@info@title{\sjtu@info@title@en} - \def\sjtu@info@title@sec{\sjtu@info@title@zh} - \def\sjtu@info@display@title{\sjtu@info@display@title@en} - \def\sjtu@info@running@title{\sjtu@info@running@title@en} - \def\sjtu@info@keywords{\sjtu@info@keywords@en} - \def\sjtu@info@author{\sjtu@info@author@en} -\fi -\newcommand\sjtu@date[2]{% - \ifsjtu@review\relax\else - \edef\sjtu@@date{#2}% - \def\sjtu@@process@date##1-##2-##3\@nil{% - #1{##1}{##2}{##3}% - }% - \expandafter\sjtu@@process@date\sjtu@@date\@nil - \fi -} -\newcommand\sjtu@date@format@zh[3]{#1 年 \number#2 月 \number#3 日} -\newcommand\sjtu@date@month@en[1]{% - \ifcase\number#1\or - January\or February\or March\or April\or May\or June\or - July\or August\or September\or October\or November\or December% - \fi -} -\newcommand\sjtu@date@format@en[3]{\sjtu@date@month@en{#2} \number#3, #1} -\kv@define@key{sjtu}{name}{ - \kvsetkeys{sjtu@name}{#1} -} -\sjtu@set@family@handler{sjtu@name} -\sjtu@define@key{sjtu@name}{ - appendix = { initial = Appendix }, - contents = { initial = Contents }, - listfigure = { initial = List of Figures }, - listtable = { initial = List of Tables }, - listalgorithm = { initial = List of Algorithms }, - figure = { initial = Figure }, - figure* = { name = figure@second, initial = 图 }, - table = { initial = Table }, - table* = { name = table@second, initial = 表 }, - algorithm = { initial = Algorithm }, - abbr = { initial = Abbreviation }, - nom = { initial = Nomenclature }, - summary = { initial = Summary }, - bib = { initial = Bibliography }, - index = { initial = Index }, - ack = { initial = Acknowledgements }, - achv = { initial = Research Achievements }, - resume = { initial = Resume }, - digest = { initial = Digest }, -} -\newcommand\sjtu@name@def[2]{% - \@namedef{sjtu@name@#1}{#2} -} -\sjtu@name@def{school@zh}{上海交通大学} -\sjtu@name@def{school@en}{Shanghai Jiao Tong University} -\ifsjtu@type@graduate - \ifsjtu@type@doctor - \sjtu@name@def{degree@type@zh}{博士} - \sjtu@name@def{degree@type@en}{Doctor} - \else - \sjtu@name@def{degree@type@zh}{硕士} - \sjtu@name@def{degree@type@en}{Master} - \fi - \sjtu@name@def{author@zh}{\sjtu@name@degree@type@zh 研究生} - \sjtu@name@def{author@en}{Candidate} - \sjtu@name@def{id@zh}{学号} - \sjtu@name@def{id@en}{Student ID} - \sjtu@name@def{supervisor@zh}{导师} - \sjtu@name@def{supervisor@en}{Supervisor} - \sjtu@name@def{assisupervisor@zh}{副导师} - \sjtu@name@def{assisupervisor@en}{Assistant Supervisor} - \sjtu@name@def{degree@zh}{申请学位} - \sjtu@name@def{degree@en}{Academic Degree Applied for} - \sjtu@name@def{major@zh}{学科} - \sjtu@name@def{major@en}{Speciality} - \sjtu@name@def{department@zh}{所在单位} - \sjtu@name@def{department@en}{Affiliation} - \sjtu@name@def{defenddate@zh}{答辩日期} - \sjtu@name@def{defenddate@en}{Date of Defence} - \sjtu@name@def{conferring@zh}{授予学位单位} - \sjtu@name@def{conferring@en}{Degree-Conferring-Institution} - \sjtu@name@def{thesis@type}{学位论文} - \sjtu@name@def{subject@zh}{% - \sjtu@name@school@zh\sjtu@name@degree@type@zh\sjtu@name@thesis@type - } - \sjtu@name@def{subject@en}{% - Dissertation Submitted to \sjtu@name@school@en \\ - for the Degree of \sjtu@name@degree@type@en - } -\else - \ifsjtu@type@course - \sjtu@name@def{degree@type@zh}{} - \sjtu@name@def{degree@type@en}{} - \sjtu@name@def{thesis@type}{课程论文} - \sjtu@name@def{subject@zh}{\sjtu@name@thesis@type} - \sjtu@name@def{subject@en}{Course Paper} - \else - \sjtu@name@def{degree@type@zh}{学士} - \sjtu@name@def{degree@type@en}{Bachelor} - \sjtu@name@def{thesis@type}{学位论文} - \sjtu@name@def{subject@zh}{\sjtu@name@degree@type@zh\sjtu@name@thesis@type} - \sjtu@name@def{subject@en}{\sjtu@name@degree@type@en's Thesis} - \fi - \sjtu@name@def{author@zh}{学生姓名} - \sjtu@name@def{id@zh}{学生学号} - \sjtu@name@def{supervisor@zh}{指导教师} - \sjtu@name@def{course@zh}{课程名称} - \sjtu@name@def{major@zh}{专业} - \sjtu@name@def{department@zh}{学院(系)} -\fi -\sjtu@name@def{orig@title@zh}{原创性声明} -\sjtu@name@def{orig@title@en}{Statement of Originality} -\sjtu@name@def{copr@title@zh}{使用授权书} -\sjtu@name@def{copr@title@en}{Copyright Permission} -\sjtu@name@def{orig@body}{% - 本人郑重声明:所呈交的\sjtu@name@thesis@type ,是本人在导师的指导下,独立进行 - 研究工作所取得的成果。除文中已经注明引用的内容外,本论文不包含任何其他个人或集 - 体已经发表或撰写过的作品成果。对本文的研究做出重要贡献的个人和集体,均已在文中 - 以明确方式标明。本人完全意识到本声明的法律结果由本人承担。} -\sjtu@name@def{copr@body}{% - 本\sjtu@name@thesis@type 作者完全了解学校有关保留、使用\sjtu@name@thesis@type - 的规定,同意学校保留并向国家有关部门或机构送交论文的复印件和电子版,允许论文被 - 查阅和借阅。} -\sjtu@name@def{abstract@zh}{摘\hspace{\ccwd}要} -\sjtu@name@def{abstract@en}{Abstract} -\sjtu@name@def{keywords@zh}{关键词:} -\sjtu@name@def{keywords@en}{Key words:~} -\ifsjtu@lang@zh - \sjtusetup{ - name = { - appendix = {附录}, - contents = {目\hspace{\ccwd}录}, - listfigure = {插图索引}, - listtable = {表格索引}, - listalgorithm = {算法索引}, - figure = {图}, - figure* = {Figure}, - table = {表}, - table* = {Table}, - algorithm = {算法}, - abbr = {缩略语对照表}, - nom = {符号对照表}, - summary = {全文总结}, - bib = {参考文献}, - index = {索\hspace{\ccwd}引}, - ack = {致\hspace{\ccwd}谢}, - achv = {学术论文和科研成果目录}, - resume = {个人简历}, - digest = {大摘要}, - } - } - \ctexset{ - chapter/name = {第,章}, - chapter/number = \chinese{chapter}, - } - \sjtu@name@def{titlepage}{扉页} - \sjtu@name@def{subject}{\sjtu@name@subject@zh} - \sjtu@name@def{copr@mk}{\sjtu@name@orig@title@zh 及\sjtu@name@copr@title@zh} - \sjtu@name@def{abstract}{\sjtu@name@abstract@zh} - \sjtu@name@def{assumption}{假设} - \sjtu@name@def{axiom}{公理} - \sjtu@name@def{conjecture}{猜想} - \sjtu@name@def{corollary}{推论} - \sjtu@name@def{definition}{定义} - \sjtu@name@def{example}{例} - \sjtu@name@def{exercise}{练习} - \sjtu@name@def{lemma}{引理} - \sjtu@name@def{problem}{问题} - \sjtu@name@def{proof}{证明} - \sjtu@name@def{proposition}{命题} - \sjtu@name@def{remark}{注} - \sjtu@name@def{solution}{解} - \sjtu@name@def{theorem}{定理} -\else - \sjtu@name@def{titlepage}{Title Page} - \sjtu@name@def{subject}{\sjtu@name@subject@en} - \sjtu@name@def{copr@mk}{\sjtu@name@orig@title@en and \sjtu@name@copr@title@en} - \sjtu@name@def{abstract}{\sjtu@name@abstract@en} - \sjtu@name@def{assumption}{Assumption} - \sjtu@name@def{axiom}{Axiom} - \sjtu@name@def{conjecture}{Conjecture} - \sjtu@name@def{corollary}{Corollary} - \sjtu@name@def{definition}{Definition} - \sjtu@name@def{example}{Example} - \sjtu@name@def{exercise}{Exercise} - \sjtu@name@def{lemma}{Lemma} - \sjtu@name@def{problem}{Problem} - \sjtu@name@def{proof}{Proof} - \sjtu@name@def{proposition}{Proposition} - \sjtu@name@def{remark}{Remark} - \sjtu@name@def{solution}{Solution} - \sjtu@name@def{theorem}{Theorem} -\fi -\ctexset{% - appendixname = \sjtu@name@appendix, - contentsname = \sjtu@name@contents, - listfigurename = \sjtu@name@listfigure, - listtablename = \sjtu@name@listtable, - figurename = \sjtu@name@figure, - tablename = \sjtu@name@table, - bibname = \sjtu@name@bib, - indexname = \sjtu@name@index, -} -\ifthenelse{\equal{\sjtu@math@font}{auto}}{ - \let\sjtu@math@font\sjtu@text@font -}{} -\ifthenelse{\equal{\sjtu@math@font}{none}}{}{% - \InputIfFileExists{sjtu-math-font-\sjtu@math@font.def}{}{% - \sjtu@warning{% - Invalid value `math-font = \sjtu@math@font'! \MessageBreak - Using `newtx' instead. - } - \def\sjtu@math@font{newtx} - \input{sjtu-math-font-\sjtu@math@font.def} - } -} -\ifthenelse{\equal{\sjtu@text@font}{none}}{}{% - \InputIfFileExists{sjtu-text-font-\sjtu@text@font.def}{}{% - \sjtu@warning{% - Invalid value `text-font = \sjtu@text@font'! \MessageBreak - Using `newtx' instead. - } - \def\sjtu@text@font{newtx} - \input{sjtu-text-font-\sjtu@text@font.def} - } -} -\ifthenelse{\equal{\sjtu@cjk@font}{auto}}{ - \IfFontExistsTF{SimSun}{ - \def\sjtu@cjk@font{windows} - }{ - \IfFileExists{/System/Library/Fonts/Menlo.ttc}{ - \def\sjtu@cjk@font{mac} - }{ - \IfFontExistsTF{Noto Serif CJK SC}{ - \def\sjtu@cjk@font{ubuntu} - }{ - \def\sjtu@cjk@font{fandol} - } - } - } -}{} -\ifthenelse{\equal{\sjtu@cjk@font}{none}}{}{% - \InputIfFileExists{sjtu-cjk-font-\sjtu@cjk@font.def}{}{% - \sjtu@warning{% - Invalid value `cjk-font = \sjtu@cjk@font'! \MessageBreak - Using `fandol' instead. - } - \def\sjtu@cjk@font{fandol} - \input{sjtu-cjk-font-\sjtu@cjk@font.def} - } -} -\ifXeTeX - \xeCJKDeclareCharClass{CJK}{"24EA,"2460->"2473,"3251->"32BF,"25A1} -\fi -\ifLuaTeX - \ltjdefcharrange{100}{"24EA,"2460-"2473,"3251-"32BF,"25A1} - \ltjsetparameter{jacharrange={+100}} -\fi -\newcommand\sjtu@square{\symbol{"25A1}} -\newcommand\sjtu@colon{\makebox[1\ccwd]{\symbol{"FF1A}}} -\def\sjtu@thepage{} -\def\sjtu@lastpageref{} -\newif\ifsjtu@page@numbering \sjtu@page@numberingtrue -\AtEndOfClass{% - \sloppy - \raggedbottom -} -\sjtu@patchcmd\cleardoublepage% - {\newpage}{\thispagestyle{empty}\newpage} -\def\ps@chapter{} -\ctexset{chapter/pagestyle = chapter} -\AtBeginDocument{% - \pagenumbering{Alph} - \pagestyle{empty} -} -\renewcommand\frontmatter{% - \cleardoublepage - \@mainmatterfalse - \ifsjtu@style@frontmatter@numbering@false - \sjtu@page@numberingfalse - \fi - \pagenumbering{Roman} - \def\sjtu@thepage{\thepage} - \def\sjtu@lastpageref{\lastpageref{pagesLTS.Roman}} - \pagestyle{plain} -} -\renewcommand\mainmatter{% - \cleardoublepage - \@mainmattertrue - \sjtu@page@numberingtrue - \sjtu@set@float@fontsizetrue - \pagenumbering{arabic} - \def\sjtu@lastpageref{\lastpageref{pagesLTS.arabic}} -} -\renewcommand\backmatter{% - \if@openright\cleardoublepage\else\clearpage\fi% - \@mainmatterfalse -} -\ctexset{% - chapter = {% - format = \zihao{3}\bfseries\heiti\centering, - nameformat = {}, - titleformat = {}, - aftername = \quad, - afterindent = true, - fixskip = true, - beforeskip = 24pt, - afterskip = 24pt, - lofskip = 0pt, - lotskip = 0pt, - }, - section = {% - format = \zihao{4}\bfseries\heiti, - afterindent = true, - afterskip = {1ex \@plus .2ex}, - }, - subsection = {% - format = \zihao{-4}\bfseries\heiti, - afterindent = true, - afterskip = {1ex \@plus .2ex}, - }, - subsubsection = {% - format = \zihao{-4}\normalfont, - afterindent = true, - afterskip = {1ex \@plus .2ex}, - }, - paragraph/afterindent = true, - subparagraph/afterindent = true, -} -\newlength{\sjtu@headings@indent@fixed} -\setlength{\sjtu@headings@indent@fixed}{2\ccwd} -\newcommand\sjtu@style@set@indent@headings{% - \ifsjtu@style@indent@headings@fixed - \sjtu@style@indent@headings@autotrue - \gdef\sjtu@headings@indent{\sjtu@headings@indent@fixed} - \else - \gdef\sjtu@headings@indent{2\ccwd} - \fi - \ifsjtu@style@indent@headings@auto - \ifsjtu@type@graduate\relax\else - \ctexset{% - subsubsection/name = {(,)}, - subsubsection/number = \arabic{subsubsection}, - } - \fi - \else - \gdef\sjtu@headings@indent{\z@} - \ctexset{% - subsubsection/name = {}, - subsubsection/number = \thesubsubsection, - } - \fi - \ctexset{% - section/indent = \sjtu@headings@indent, - subsection/indent = \sjtu@headings@indent, - subsubsection/indent = \sjtu@headings@indent, - } -} -\sjtu@style@set@indent@headings -\sjtu@option@hook{sjtu@style}{indent-headings}{% - \sjtu@style@set@indent@headings -} -\newcommand\sjtu@indent@box{% - \hspace*{\ifsjtu@style@indent@headings@auto 2\ccwd\else\z@\fi}% -} -\ctexset{% - punct = quanjiao, - space = auto, - autoindent = true, -} -\setlist{nosep} -\setlist*{leftmargin=*} -\setlist[1]{labelindent=\parindent} -\let\footnotemarkfont\@empty -\def\sjtu@num@circled#1{% - \ifnum#1 <21% - {\footnotemarkfont\symbol{\the\numexpr#1+"245F\relax}}% - \else\ifnum#1 <36% - {\footnotemarkfont\symbol{\the\numexpr#1+"323C\relax}}% - \else\ifnum#1 <51% - {\footnotemarkfont\symbol{\the\numexpr#1+"328D\relax}}% - \else - \sjtu@warning{Too many footnotes in this page.}% - \fi\fi\fi -} -\renewcommand{\thefootnote}{\sjtu@num@circled{\c@footnote}} -\renewcommand{\thempfootnote}{\sjtu@num@circled{\c@mpfootnote}} -\footnotemargin1.5em\relax -\long\def\@makefntext#1{% - \ifsjtu@style@footnote@hang - \bgroup - \def\@makefnmark{\hbox{\normalfont\@thefnmark}}% - \setbox\@tempboxa\hbox{% - \ifdim\footnotemargin>\z@ - \hb@xt@\footnotemargin{\@makefnmark\hss}% - \else - \@makefnmark - \fi - }% - \leftmargin\wd\@tempboxa - \rightmargin\z@ - \linewidth \columnwidth - \advance \linewidth -\leftmargin - \parshape \@ne \leftmargin \linewidth - \footnotesize - \@setpar{{\@@par}}% - \leavevmode - \llap{\box\@tempboxa}% - \parskip\hangfootparskip\relax - \parindent\hangfootparindent\relax - \else - \parindent 2\ccwd% - {\normalfont\@thefnmark} - \fi - \footnotelayout#1% - \ifsjtu@style@footnote@hang - \par\egroup - \fi -} -\urlstyle{same} -\g@addto@macro\UrlBreaks{% - \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9% - \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M - \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z - \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m - \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z -} -\Urlmuskip=0mu plus 0.1mu -\newcommand\sjtu@pdfbookmark[2]{} -\newcommand\sjtu@phantomsection{} -\NewDocumentCommand{\sjtu@chapter}{s O{#3} m O{#2}}{ - \if@openright\cleardoublepage\else\clearpage\fi% - \IfBooleanTF{#1}{% - \ifthenelse{\equal{#4}{}}{}{% - \sjtu@pdfbookmark{0}{#4}% - } - }{% - \sjtu@phantomsection - \addcontentsline{toc}{chapter}{#4}% - }%% - \chapter*{#3}% - \@mkboth{\MakeUppercase{#2}}{\MakeUppercase{#2}}% -} -\setcounter{secnumdepth}{3} -\setcounter{tocdepth}{2} -\renewcommand\tableofcontents{% - \sjtu@chapter*{\contentsname}% - \@starttoc{toc}% -} -\def\sjtu@listof#1{% #1: float type - \setcounter{tocdepth}{2} % restore tocdepth in case being modified - \@ifstar - {\sjtu@chapter*{\csname list#1name\endcsname} - \@starttoc{\csname ext@#1\endcsname}}% - {\sjtu@chapter{\csname list#1name\endcsname} - \@starttoc{\csname ext@#1\endcsname}}% -} -\renewcommand\listoffigures{\sjtu@listof{figure}} -\renewcommand\listoftables{\sjtu@listof{table}} -\ifsjtu@lang@zh - \renewcommand\cftdot{\textperiodcentered} -\fi -\renewcommand\cftdotsep{1} -\setlength{\cftbeforechapskip}{0pt} -\renewcommand\cftchappagefont{\normalfont} -\renewcommand\cftchapleader{\normalfont\cftdotfill{\cftdotsep}} -\renewcommand\cftfigpresnum{\sjtu@name@figure~} -\renewcommand\cfttabpresnum{\sjtu@name@table~} -\AtEndPreamble{% - \addtolength{\cftfignumwidth}{\widthof{\cftfigpresnum}} - \addtolength{\cfttabnumwidth}{\widthof{\cfttabpresnum}} -} -\renewcommand\textfraction{0.15} -\renewcommand\topfraction{0.85} -\renewcommand\bottomfraction{0.65} -\renewcommand\floatpagefraction{0.60} -\AtBeginDocument{% - \def\thefigure{\thechapter\sjtu@style@fl@num@sep\arabic{figure}} - \def\p@subfigure{\thefigure} - \def\thetable{\thechapter\sjtu@style@fl@num@sep\arabic{table}} - \def\theequation{\thechapter\sjtu@style@eq@num@sep\arabic{equation}} -} -\newcommand\sjtu@counter@without@chapter{ - \counterwithout{section}{chapter} - \setcounter{section}{0} - \counterwithout{figure}{chapter} - \setcounter{figure}{0} - \counterwithout{table}{chapter} - \setcounter{table}{0} -} -\newif\ifsjtu@set@float@fontsize \sjtu@set@float@fontsizefalse -\sjtu@patchcmd\@floatboxreset% - {\normalsize} - {\ifsjtu@set@float@fontsize\zihao{5}\else\normalsize\fi} -\NewDocumentCommand{\SJTUsetfloatfontsize}{}{\sjtu@set@float@fontsizetrue} -\NewDocumentCommand{\SJTUunsetfloatfontsize}{}{\sjtu@set@float@fontsizefalse} -\ifsjtu@type@graduate - \DeclareCaptionFont{sjtu@caption@font}{\zihao{5}\kaishu} -\else - \DeclareCaptionFont{sjtu@caption@font}{\zihao{5}\bfseries} -\fi -\DeclareCaptionFont{sjtu@subcaption@font}{\zihao{5}\normalfont} -\DeclareCaptionLabelSeparator{enskip}{\enskip} -\captionsetup{% - format = plain, - labelformat = simple, - labelsep = enskip, - justification = centering, - font = sjtu@caption@font -} -\captionsetup[sub]{% - format = hang, - labelformat = brace, - justification = justified, - font = sjtu@subcaption@font -} -\DeclareCaptionOption{bi-second}[]{% - \def\tablename{\sjtu@name@table@second} - \def\figurename{\sjtu@name@figure@second} -} -\captionsetup[bi-second]{bi-second} -\newcommand\sjtu@copr@addon{% - \noindent - 本\sjtu@name@thesis@type 属于\enskip - \begin{minipage}[t]{28\ccwd} - \sjtu@square{\bfseries 公开论文} \par - \sjtu@square{\bfseries 内部论文},% - \sjtu@square 1 年/\sjtu@square 2 年/\sjtu@square 3 年\quad% - 解密后适用本授权书。\par - \sjtu@square{\bfseries 秘密论文},\underline{\hspace{2\ccwd}}年% - (不超过10年)解密后适用本授权书。\par - \sjtu@square{\bfseries 机密论文},\underline{\hspace{2\ccwd}}年% - (不超过20年)解密后适用本授权书。\par - (请在以上方框内打“$\checkmark$”) - \end{minipage} -} -\newcommand\sjtu@signbox[1]{% - \begingroup - \zihao{4} - \parbox[t]{64mm}{% - {#1}签名:\\[6pt] - 日期:\hspace{\stretch{3}}年\hspace{\stretch{2}}月\hspace{\stretch{2}}日 - } - \endgroup -} -\NewDocumentCommand{\copyrightpage}{O{}}{% - \ifsjtu@review\relax\else - \cleardoublepage - \sjtu@pdfbookmark{0}{\sjtu@name@copr@mk}% - \ifblank{#1}{% - \newgeometry{ - vmargin = 3cm, - left = 3cm, - right = 2.5cm, - }% - \thispagestyle{empty} - \begingroup - \zihao{-4}\linespread{1.73}\selectfont - \begin{center} - \heiti\zihao{3} - \sjtu@name@school@zh\par - \sjtu@name@thesis@type\sjtu@name@orig@title@zh - \end{center}\par - \sjtu@name@orig@body\par - \vskip \baselineskip \hfill - \sjtu@signbox{\sjtu@name@thesis@type 作者} - \hspace*{20mm}\par - \vskip 2\baselineskip - \begin{center} - \heiti\zihao{3} - \sjtu@name@school@zh\par - \sjtu@name@thesis@type\sjtu@name@copr@title@zh - \end{center}\par - \sjtu@name@copr@body\par - \vskip \baselineskip - \sjtu@copr@addon\par - \vskip 1.5\baselineskip - \sjtu@signbox{\sjtu@name@thesis@type 作者}\hfill - \sjtu@signbox{指导教师}\par - \endgroup - \restoregeometry - }{\includepdf[pages=-]{#1}} - \fi -} -\newcommand\sjtu@save@env@body[1]{\long\gdef\sjtu@saved@env@body{#1}} -\NewDocumentEnvironment{abbreviation}{}{% - \sjtu@chapter{\sjtu@name@abbr} -}{} -\NewDocumentEnvironment{abbreviation*}{}{% - \sjtu@chapter*{\sjtu@name@abbr} -}{} -\NewDocumentEnvironment{nomenclature}{}{% - \sjtu@chapter{\sjtu@name@nom} -}{} -\NewDocumentEnvironment{nomenclature*}{}{% - \sjtu@chapter*{\sjtu@name@nom} -}{} -\NewDocumentEnvironment{summary}{}{% - \sjtu@chapter{\sjtu@name@summary} -}{} -\NewDocumentEnvironment{acknowledgements}{}{% - \Collect@Body\sjtu@save@env@body -}{% - \ifsjtu@review\relax\else - \sjtu@chapter{\sjtu@name@ack} - \sjtu@saved@env@body - \fi -} -\newcounter{sjtu@bib} -\NewDocumentEnvironment{@bibliolist}{m}{% - \list{\@biblabel{\@arabic\c@sjtu@bib}}% - {\settowidth\labelwidth{\@biblabel{#1}}% - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \@nmbrlisttrue - \def\@listctr{sjtu@bib} - \let\p@sjtu@bib\@empty - \renewcommand\thesjtu@bib{\@arabic\c@sjtu@bib}}% - \sloppy - \clubpenalty4000 - \@clubpenalty \clubpenalty - \widowpenalty4000% - \sfcode`\.\@m -}{% - \def\@noitemerr - {\@latex@warning{Empty `bibliolist' environment}}% - \endlist -} -\NewDocumentEnvironment{bibliolist}{m}{% - \Collect@Body\sjtu@save@env@body -}{% - \ifsjtu@review\relax\else - \begin{@bibliolist}{#1} - \sjtu@saved@env@body - \end{@bibliolist} - \fi -} -\NewDocumentEnvironment{bibliolist*}{m}{% - \Collect@Body\sjtu@save@env@body -}{% - \ifsjtu@review - \begin{@bibliolist}{#1} - \sjtu@saved@env@body - \end{@bibliolist} - \fi -} -\NewDocumentEnvironment{achievements}{}{% - \sjtu@chapter{\sjtu@name@achv} -}{} -\NewDocumentEnvironment{resume}{}{% - \Collect@Body\sjtu@save@env@body -}{% - \ifsjtu@review\relax\else - \sjtu@chapter{\sjtu@name@resume} - \sjtu@saved@env@body - \fi -} -\NewDocumentEnvironment{digest}{}{% - \Collect@Body\sjtu@save@env@body -}{% - \ifsjtu@type@bachelor - \AtEndDocument{% - \cleardoublepage - \pagenumbering{roman} - \def\sjtu@thepage{\theCurrentPageLocal} - \def\sjtu@lastpageref{\lastpageref{pagesLTS.roman.local}} - \sjtu@chapter*[\sjtu@name@digest]{\MakeUppercase\sjtu@info@title@sec} - \sjtu@counter@without@chapter - \let\addcontentsline\@gobblethree - \sjtu@saved@env@body - } - \fi -} -\AtEndPreamble{ - \ifsjtu@review% - \sjtusetup{% - info = { - author = {}, - author* = {}, - id = {}, - supervisor = {}, - supervisor* = {}, - assisupervisor = {}, - assisupervisor* = {}, - } - } - \fi -} -\NewDocumentCommand{\encrypt}{m O{***}}{% - \ifsjtu@review - {#2} - \else - {#1} - \fi -} -\newcommand\sjtu@title@box[2][]{% - \def\sjtu@@title@uline{\rule[-1ex]{#1}{.5pt}}% - \def\sjtu@@title@box##1{\parbox[t]{#1}{##1}}% - \newlength\sjtu@@title@temp@ht - \settototalheight\sjtu@@title@temp@ht{\sjtu@@title@box{#2}}% - \ifdim\sjtu@@title@temp@ht=0pt% - \sjtu@@title@uline% - \else - \leavevmode% - \ifdim\sjtu@@title@temp@ht>\normalbaselineskip - \rlap{\smash{\sjtu@@title@box{% - \@whiledim\sjtu@@title@temp@ht>0pt% - \leavevmode% - \do{% - \rlap{\sjtu@@title@uline}\\% - \addtolength\sjtu@@title@temp@ht{-\normalbaselineskip}% - }% - }}}% - \sjtu@@title@box{\centering #2}% - \else - \rlap{\sjtu@@title@uline}% - \sjtu@@title@box{\centering #2}% - \fi - \fi -} -\newcolumntype{F}[2]{% - >{\minipage[#1]{#2}% - \ifXeTeX\def\CJKglue{\hskip \z@ plus 1filll}\fi% - \ifLuaTeX\ltjsetparameter{kanjiskip=\z@ plus 1filll}\fi% - \begingroup}% - c% - <{\endgroup% - \endminipage% - \ignorespacesafterend}} -\AtEndOfPackageFile*{hyperref}{ - \hypersetup{ - linktoc = all, - bookmarksdepth = 2, - bookmarksnumbered = true, - bookmarksopen = true, - bookmarksopenlevel = 1, - unicode = true, - psdextra = true, - breaklinks = true, - plainpages = false, - pdfdisplaydoctitle = true, - hidelinks, - } - \newcounter{sjtu@bookmark} - \renewcommand\sjtu@pdfbookmark[2]{% - \phantomsection - \stepcounter{sjtu@bookmark}% - \pdfbookmark[#1]{#2}{sjtuchapter.\thesjtu@bookmark}% - } - \renewcommand\sjtu@phantomsection{% - \phantomsection - } - \pdfstringdefDisableCommands{% - \let\\\@empty - \let\quad\@empty - \let\hspace\@gobble - } - \@ifpackagelater{hyperref}{2019/04/27}{}{% - \g@addto@macro\psdmapshortnames{\let\mu\textmu} - }% - \AtBeginDocument{% - \hypersetup{ - pdftitle = \sjtu@info@title, - pdfsubject = \sjtu@name@subject, - pdfkeywords = \sjtu@info@keywords, - pdfauthor = \sjtu@info@author, - pdfcreator = {LaTeX with SJTUThesis \version} - } - }% -} -\AtEndOfPackageFile*{threeparttable}{ - \appto\TPTnoteSettings{\footnotesize} -} -\AtEndOfPackageFile*{longtable}{ - \BeforeBeginEnvironment{longtable} - {\begingroup\ifsjtu@set@float@fontsize\zihao{5}\fi} - \AfterEndEnvironment{longtable} - {\endgroup} -} -\AtEndOfPackageFile*{unicode-math}{ - \unimathsetup{ - math-style = ISO, - bold-style = ISO, - nabla = upright, - } - \newcommand{\bm}{\symbf} - \renewcommand{\boldsymbol}{\symbf} - \newcommand{\square}{\mdlgwhtsquare} -} -\AtEndOfPackageFile*{physics}{ - \@ifundefined{updelta}{}{ - \DeclareDocumentCommand\variation{o g d()}{ - \IfNoValueTF{#2}{ - \IfNoValueTF{#3} - {\updelta \IfNoValueTF{#1}{}{^{#1}}} - {\mathinner{\updelta \IfNoValueTF{#1}{}{^{#1}}\argopen(#3\argclose)}} - } - {\mathinner{\updelta \IfNoValueTF{#1}{}{^{#1}}#2} \IfNoValueTF{#3}{}{(#3)}} - } - } -} -\AtEndOfPackageFile*{siunitx}{ - \sisetup{ - group-minimum-digits = 4, - separate-uncertainty = true, - inter-unit-product = \ensuremath{{}\cdot{}}, - } - \ifsjtu@lang@zh - \sisetup{ - list-final-separator = { 和 }, - list-pair-separator = { 和 }, - range-phrase = {~}, - } - \fi -} -\newcommand\sjtu@def@theorem{% - \newtheorem{assumption} {\sjtu@name@assumption} [chapter] - \newtheorem{axiom} {\sjtu@name@axiom} [chapter] - \newtheorem{conjecture} {\sjtu@name@conjecture} [chapter] - \newtheorem{corollary} {\sjtu@name@corollary} [chapter] - \newtheorem{definition} {\sjtu@name@definition} [chapter] - \newtheorem{example} {\sjtu@name@example} [chapter] - \newtheorem{exercise} {\sjtu@name@exercise} [chapter] - \newtheorem{lemma} {\sjtu@name@lemma} [chapter] - \newtheorem{problem} {\sjtu@name@problem} [chapter] - \newtheorem{proposition}{\sjtu@name@proposition}[chapter] - \newtheorem{theorem} {\sjtu@name@theorem} [chapter] - \newtheorem*{remark} {\sjtu@name@remark} - \newtheorem*{solution} {\sjtu@name@solution} -} -\PassOptionsToPackage{amsmath,thmmarks,hyperref}{ntheorem} -\AtEndOfPackageFile*{ntheorem}{ - \theoremheaderfont{\sjtu@indent@box\bfseries\heiti} - \theorembodyfont{\normalfont} - \theoremseparator{\enskip} - \theoremsymbol{\ensuremath{\square}} - \newtheorem*{proof}{\sjtu@name@proof} - \theoremstyle{plain} - \theoremsymbol{} - \ifsjtu@nothm\else - \sjtu@def@theorem - \fi -} -\AtBeginOfPackageFile*{amsthm}{ - \newif\ifsjtu@openbox@defined - \@ifundefined{openbox}{ - \sjtu@openbox@definedfalse - }{ - \sjtu@openbox@definedtrue - \let\oldopenbox\openbox - \let\openbox\@undefined - } -} -\AtEndOfPackageFile*{amsthm}{ - \ifsjtu@openbox@defined - \let\openbox\oldopenbox - \fi - \let\sjtu@thmhead\thmhead@plain - \def\thmhead@plain{\sjtu@indent@box\sjtu@thmhead} - \newtheoremstyle{sjtuplain} - {}{} - {\normalfont}{} - {\bfseries\heiti}{} - {\ccwd}{} - \theoremstyle{sjtuplain} - \ifsjtu@nothm\else - \sjtu@def@theorem - \fi - \renewcommand\proofname\sjtu@name@proof - \renewenvironment{proof}[1][\proofname]{\par - \pushQED{\qed}% - \normalfont \topsep6\p@\@plus6\p@\relax - \trivlist - \item\relax - {\sjtu@indent@box\bfseries\heiti #1~} - \hspace\labelsep\ignorespaces - }{% - \popQED\endtrivlist\@endpefalse - } -} -\PassOptionsToPackage{algochapter}{algorithm2e} -\AtBeginOfPackageFile*{algorithm2e}{ - \let\old@chapter\@chapter -} -\AtEndOfPackageFile*{algorithm2e}{ - \let\@chapter\old@chapter - \SetAlgorithmName{\sjtu@name@algorithm}% - {\sjtu@name@algorithm}% - {\sjtu@name@listalgorithm} - \SetAlgoCaptionSeparator{~} - \def\listalgocfname{\listalgorithmcfname} - \newlistof{alg}{loa}{\listalgocfname} - \let\l@algocf\l@alg - \setlength{\cftalgindent}{1.5em} - \setlength{\cftalgnumwidth}{2.3em} - \renewcommand\cftalgpresnum{\sjtu@name@algorithm~} - \apptocmd{\sjtu@counter@without@chapter}{% - \counterwithout{algocf}{chapter} - \setcounter{algocf}{0} - }{}{} - \sjtu@patchcmd\algocf@latexcaption% - {\addcontentsline} - {\caption@iflist{\addcontentsline}{\@gobblethree}} - \AtEndPreamble{% - \addtolength{\cftalgnumwidth}{\widthof{\cftalgpresnum}} - } - \renewcommand\listofalgorithms{\sjtu@listof{algocf}} - \AtBeginDocument{% - \def\thealgocf{\thechapter\sjtu@style@fl@num@sep\arabic{algocf}} - } -} -\PassOptionsToPackage{chapter}{algorithm} -\AtEndOfPackageFile*{algorithm}{ - \floatname{algorithm}{\sjtu@name@algorithm} - \def\listalgorithmname{\sjtu@name@listalgorithm} - \newlistof{alg}{loa}{\listalgorithmname} - \let\l@algorithm\l@alg - \setlength{\cftalgindent}{1.5em} - \setlength{\cftalgnumwidth}{2.3em} - \renewcommand\cftalgpresnum{\sjtu@name@algorithm~} - \apptocmd{\sjtu@counter@without@chapter}{% - \counterwithout{algorithm}{chapter} - \setcounter{algorithm}{0} - }{}{} - \AtEndPreamble{% - \addtolength{\cftalgnumwidth}{\widthof{\cftalgpresnum}} - } - \renewcommand\listofalgorithms{\sjtu@listof{algorithm}} - \AtBeginDocument{% - \def\thealgorithm{\thechapter\sjtu@style@fl@num@sep\arabic{algorithm}} - } -} -\AtEndOfPackageFile*{listings}{ - \lstdefinestyle{lstStyleCode}{ - aboveskip=\medskipamount, - belowskip=\medskipamount, - basicstyle=\ttfamily\zihao{6}, - commentstyle=\slshape\color{black!60}, - stringstyle=\color{green!40!black!100}, - keywordstyle=\bfseries\color{blue!50!black}, - extendedchars=false, - upquote=true, - tabsize=2, - showstringspaces=false, - xleftmargin=1em, - xrightmargin=1em, - breaklines=false, - framexleftmargin=1em, - framexrightmargin=1em, - backgroundcolor=\color{gray!10}, - columns=flexible, - keepspaces=true, - texcl=true, - mathescape=true - } -} -\endinput -%% -%% End of file `sjtuthesis.cls'.