Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.1.3 #1052

Merged
merged 3 commits into from
Jul 16, 2024
Merged

v2.1.3 #1052

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .latexmkrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
#

# Set timezone.
$ENV{'TZ'}='Asia/Shanghai';
$ENV{'TZ'} = 'Asia/Shanghai';

# Ensure './texmf//' is in '$TEXINPUTS'.
# Prepended local directories to the search paths.
ensure_path( 'TEXINPUTS', './texmf//' );
# ensure_path( 'OSFONTDIR', './texmf/fonts//' );

# PDF generate method
# PDF generate method:
# - 1 pdfLaTeX
# - 3 LaTeX + DVIPDFMx
# - 4 LuaLaTeX
Expand All @@ -19,8 +20,14 @@ $pdf_mode = 5;
# Add common patterns for tex engines.
set_tex_cmds( '-synctex=1 %O %S' );

# Always try to embed fonts, ignoring licensing flags, etc.
$xdvipdfmx = 'xdvipdfmx -E -o %D %O %S';
# Run bibtex or biber whenever it appears necessary,
# always delete .bbl files in a cleanup.
$bibtex_use = 2;

# Files to clean.
$clean_ext = 'bbl glo gls hd loa run.xml thm xdv';
# Use dvipdfmx to convert .dvi to .pdf, and xdvipdfmx for .xdv,
# always try to embed fonts, ignoring licensing flags, etc.
$dvipdf = 'dvipdfmx -E %O -o %D %S';
$xdvipdfmx = 'xdvipdfmx -E %O -o %D %S';

# Extra files to clean.
$clean_ext .= ' loa';
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## 欢迎使用上海交通大学论文模板

本示例模板是应用上海交通大学学位论文(非官方)LaTeX 文档类 SJTUThesis 的一个完整实现。演示了排版中常用的例子,包括公式、表格、算法、参考文献等。
本示例模板是应用上海交通大学学位论文 LaTeX 文档类 SJTUThesis 的一个完整实现。演示了排版中常用的例子,包括公式、表格、算法、参考文献等。
用户可以参考或者直接基于此示例文档撰写论文。

SJTUThesis 支持 XeTeX 与 LuaTeX 引擎,字符编码仅支持 UTF-8。
Expand Down
2 changes: 1 addition & 1 deletion README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Welcome to LaTeX thesis template for Shanghai Jiao Tong University

This sample template is a full implementation of SJTUThesis document class which is an *unofficial* LaTeX class for preparing degree theses or course papers at Shanghai Jiao Tong University.
This sample template is a full implementation of SJTUThesis document class which is an LaTeX class for preparing degree theses or course papers at Shanghai Jiao Tong University.

Please note that `sjtuthesis` supports both XeTeX and LuaTeX engine, `sjtuthesis` only allows UTF-8 character encoding.

Expand Down
10 changes: 5 additions & 5 deletions contents/abstract.tex
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
% !TEX root = ../main.tex

\begin{abstract}[zh]
\begin{abstract*}[zh]
中文摘要应该将学位论文的内容要点简短明了地表达出来,应该包含论文中的基本信息,
体现科研工作的核心思想。摘要内容应涉及本项科研工作的目的和意义、研究方法、研究
成果、结论及意义。注意突出学位论文中具有创新性的成果和新见解的部分。摘要中不宜
使用公式、化学结构式、图表和非公知公用的符号和术语,不标注引用文献编号。硕士学
位论文中文摘要字数为 500 字左右,博士学位论文中文摘要字数为 800 字左右。英文摘
要内容应与中文摘要内容一致。

摘要页的下方注明本文的关键词(4 \textasciitilde{} 6个)。
\end{abstract}
摘要页的下方注明本文的关键词(4 \textasciitilde{} 6 个)。
\end{abstract*}

\begin{abstract}[en]
\begin{abstract*}[en]
Shanghai Jiao Tong University (SJTU) is a key university in China. SJTU was
founded in 1896. It is one of the oldest universities in China. The University
has nurtured large numbers of outstanding figures include JIANG Zemin, DING
Expand All @@ -21,4 +21,4 @@
has been actively involved in international academic exchange programs. It is
the center of CERNet in east China region, through computer networks, SJTU has
faster and closer connection with the world.
\end{abstract}
\end{abstract*}
14 changes: 7 additions & 7 deletions contents/floats.tex
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ \subsection{多个图形}

\begin{figure}[!htp]
\centering
\includegraphics[height=2cm]{sjtu-vi-badge-blue.pdf}
\includegraphics[height=2cm]{sjtu-vi-badge-red.pdf}
\hspace{1cm}
\includegraphics[height=2cm]{sjtu-vi-badge-blue.pdf}
\includegraphics[height=2cm]{sjtu-vi-badge-red.pdf}
\bicaption{中文题图}{English caption}
\label{fig:SRR}
\end{figure}
Expand All @@ -71,19 +71,19 @@ \subsection{多个图形}
\centering
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[height=1.5cm]{sjtu-vi-name-blue.pdf}
\includegraphics[height=1.7cm]{sjtu-vi-name-red.pdf}
\caption{并排第一个图}
\label{fig:parallel1}
\end{minipage}\hfill
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[height=1.5cm]{sjtu-vi-name-blue.pdf}
\includegraphics[height=1.7cm]{sjtu-vi-name-red.pdf}
\caption{并排第二个图}
\label{fig:parallel2}
\end{minipage}
\end{figure}

如果要为共用一个计数器的多个子图添加子图题,建议使用较新的 \pkg{subcaption}宏
如果要为共用一个计数器的多个子图添加子图题,建议使用较新的 \pkg{subcaption}
包,不建议使用 \pkg{subfigure} 或 \pkg{subfig} 等宏包。

推荐使用 \pkg{subcaption} 宏包的 \cs{subcaptionbox} 并排子图,子图题置于子图之
Expand All @@ -97,13 +97,13 @@ \subsection{多个图形}
\centering
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[height=2cm]{sjtu-vi-badge-blue.pdf}
\includegraphics[height=2cm]{sjtu-vi-badge-red.pdf}
\caption{校徽}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}{0.4\textwidth}
\centering
\includegraphics[height=1.5cm]{sjtu-vi-name-blue.pdf}
\includegraphics[height=1.7cm]{sjtu-vi-name-red.pdf}
\caption{校名。注意这个图略矮些,subfigure 中同一行的子图在顶端对齐。}
\end{subfigure}
\caption{包含子图题的范例(使用 subfigure)}
Expand Down
30 changes: 15 additions & 15 deletions contents/intro.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ \section{字体}

新中国成立初期,为配合国家经济建设的需要,学校调整出相当一部分优势专业、师资设
备,支持国内兄弟院校的发展。五十年代中期,学校又响应国家建设大西北的号召,根据
国务院决定,部分迁往西安,分为交通大学上海部分和西安部分。1959 年 3月两部分同
国务院决定,部分迁往西安,分为交通大学上海部分和西安部分。1959 年 3 月两部分同
时被列为全国重点大学,7 月经国务院批准分别独立建制,交通大学上海部分启用“上海
交通大学”校名。历经西迁、两地办学、独立办学等变迁,为构建新中国的高等教育体
系,促进社会主义建设做出了重要贡献。六七十年代,学校先后归属国防科工委和六机部
Expand All @@ -67,7 +67,7 @@ \section{字体}
学奠定了坚实的基础。}

{\ifcsname fangsong\endcsname\fangsong\else[无 \cs{fangsong} 字体。]\fi 交通大学
始终把人才培养作为办学的根本任务。一百多年来,学校为国家和社会培养了 20余万各
始终把人才培养作为办学的根本任务。一百多年来,学校为国家和社会培养了 20 余万各
类优秀人才,包括一批杰出的政治家、科学家、社会活动家、实业家、工程技术专家和医
学专家,如江泽民、陆定一、丁关根、汪道涵、钱学森、吴文俊、徐光宪、张光斗、黄炎
培、邵力子、李叔同、蔡锷、邹韬奋、陈敏章、王振义、陈竺等。在中国科学院、中国工
Expand All @@ -79,19 +79,19 @@ \section{字体}
原位肝手术、第一例成功抢救大面积烧伤病人手术等,都凝聚着交大师生和校友的心血智
慧。改革开放以来,一批年轻的校友已在世界各地、各行各业崭露头角。}

{\ifcsname kaishu\endcsname\kaishu\else[无 \cs{kaishu} 字体。]\fi 截至 2011 年 12
月 31 日,学校共有 24 个学院 / 直属系(另有继续教育学院、技术学院和国际教育学
),19 个直属单位,12 家附属医院,全日制本科生 16802 人、研究生24495 人(其
中博士研究生 5059 人);有专任教师 2979 名,其中教授 835 名;中国科学院院士 15
名,中国工程院院士 20 名,中组部“千人计划”49 名,“长江学者”95 名,国家杰出
青年基金获得者 80 名,国家重点基础研究发展计划(973 计划)首席科学家 24名,国
家重大科学研究计划首席科学家 9名,国家基金委创新研究群体 6 个,教育部创新团队
17 个。
{\ifcsname kaishu\endcsname\kaishu\else[无 \cs{kaishu} 字体。]\fi 截至 2011 年
12 月 31 日,学校共有 24 个学院 / 直属系(另有继续教育学院、技术学院和国际教育
学院),19 个直属单位,12 家附属医院,全日制本科生 16802 人、研究生 24495 人
(其中博士研究生 5059 人);有专任教师 2979 名,其中教授 835 名;中国科学院院
士 15 名,中国工程院院士 20 名,中组部“千人计划”49 名,“长江学者”95 名,国家杰
出青年基金获得者 80 名,国家重点基础研究发展计划(973 计划)首席科学家 24 名,
国家重大科学研究计划首席科学家 9 名,国家基金委创新研究群体 6 个,教育部创新团
17 个。

学校现有本科专业 68 个,涵盖经济学、法学、文学、理学、工学、农学、医学、管理学
和艺术等九个学科门类;拥有国家级教学及人才培养基地 7 个,国家级校外实践教育基
5个,国家级实验教学示范中心 5 个,上海市实验教学示范中心 4 个;有国家级教学
团队 8个,上海市教学团队 15 个;有国家级教学名师 7 人,上海市教学名师 35 人;
有国家级精品课程 46 门,上海市精品课程 117 门;有国家级双语示范课程 7
门;2001、2005 和2009 年,作为第一完成单位,共获得国家级教学成果 37 项、上海市
教学成果 157项。}
5 个,国家级实验教学示范中心 5 个,上海市实验教学示范中心 4 个;有国家级教
学团队 8 个,上海市教学团队 15 个;有国家级教学名师 7 人,上海市教学名师 35
人;有国家级精品课程 46 门,上海市精品课程 117 门;有国家级双语示范课程 7 门;
2001、2005 和 2009 年,作为第一完成单位,共获得国家级教学成果 37 项、上海市教
学成果 157 项。}
16 changes: 6 additions & 10 deletions contents/math_and_citations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@ \subsection{数学符号和公式}
\end{itemize}

公式应另起一行居中排版。公式后应注明编号,按章顺序编排,编号右端对齐。
\begin{equation}
\ee^{\ii\uppi} + 1 = 0,
\end{equation}
\begin{equation}
\begin{gather}
\ee^{\ii\uppi} + 1 = 0, \\
\frac{\dd^2 u}{\dd t^2} = \int f(x) \dd x.
\end{equation}
\end{gather}

公式末尾是需要添加标点符号的,至于用逗号还是句号,取决于公式下面一句是接着公式说的,还是另起一句。
\begin{equation}
\frac{2h}{\pi}\int_{0}^{\infty}\frac{\sin\left( \omega\delta \right)}{\omega}
\frac{2h}{\uppi}\int_{0}^{\infty}\frac{\sin\left( \omega\delta \right)}{\omega}
\cos\left( \omega x \right) \dd\omega =
\begin{cases}
h, & \left| x \right| < \delta, \\
Expand Down Expand Up @@ -71,8 +69,8 @@ \subsection{数学符号和公式}

\subsection{定理环境}

示例文件中使用 \pkg{ntheorem} 宏包配置了定理、引理和证明等环境。用户也可以使用
\pkg{amsthm} 宏包。
示例文件中使用 \pkg{amsthm} 宏包配置了定理、引理和证明等环境。用户也可以使用
\pkg{ntheorem} 宏包。

这里举一个“定理”和“证明”的例子。
\begin{theorem}[留数定理]
Expand All @@ -81,14 +79,12 @@ \subsection{定理环境}
$f$ 是定义在 $U \backslash \{a_1, \ldots, a_n\}$ 上的全纯函数,如果 $\gamma$
是一条把 $a_1, \ldots, a_n$ 包围起来的可求长曲线,但不经过任何一个 $a_k$,并且
其起点与终点重合,那么:

\begin{equation}
\label{eq:res}
\oint\limits_\gamma f(z)\, \dd z = 2\uppi \ii \sum_{k=1}^n \operatorname{I}(\gamma, a_k) \operatorname{Res}(f, a_k).
\end{equation}

如果 $\gamma$ 是若尔当曲线,那么 $\operatorname{I}(\gamma, a_k) = 1$,因此:

\begin{equation}
\label{eq:resthm}
\oint\limits_\gamma f(z)\, \dd z = 2\uppi \ii \sum_{k=1}^n \operatorname{Res}(f, a_k).
Expand Down
2 changes: 1 addition & 1 deletion main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
\input{contents/abstract}

% 目录
\tableofcontents
\tableofcontents*
% 插图索引
\listoffigures*
% 表格索引
Expand Down
28 changes: 14 additions & 14 deletions setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
% 指导教师
%
zh / supervisor = {某某教授},
en / supervisor = {Prof. Mou Mou},
en / supervisor = {Prof.\ Mou Mou},
%
% 副指导教师
%
% assoc-supervisor = {某某教授},
% assoc-supervisor* = {Prof. Uom Uom},
% zh / assoc-supervisor = {某某教授},
% en / assoc-supervisor = {Prof.\ Uom Uom},
%
% 学号
%
Expand Down Expand Up @@ -76,22 +76,22 @@
% 资助基金
%
% zh / fund = {
% {国家 973 项目 (No. 2025CB000000)},
% {国家自然科学基金 (No. 81120250000)},
% {国家 973 项目 (No.\ 2025CB000000)},
% {国家自然科学基金 (No.\ 81120250000)},
% },
% en / fund = {
% {National Basic Research Program of China (Grant No. 2025CB000000)},
% {National Natural Science Foundation of China (Grant No. 81120250000)},
% {National Basic Research Program of China (Grant No.\ 2025CB000000)},
% {National Natural Science Foundation of China (Grant No.\ 81120250000)},
% },
},
%
% 风格设置
%
style = {%
%
% 论文标题页 logo 颜色 (red/blue/black)
% 关键词首行悬挂
%
% title-logo-color = black,
% keywords-format = hang,
},
%
% 名称设置
Expand All @@ -109,9 +109,9 @@
% gbpub=false 禁用出版信息缺失处理
\usepackage[backend=biber,style=gb7714-2015]{biblatex}
% 文献表字体
% \renewcommand{\bibfont}{\zihao{5}\fixedlineskip{15.6bp}}
\renewcommand{\bibfont}{\zihao{5}\setbaselineskip{16bp}}
% 文献表条目间的间距
\setlength{\bibitemsep}{0pt}
\setlength{\bibitemsep}{3bp plus 1pt}
% 导入参考文献数据库
\addbibresource{refs.bib}

Expand Down Expand Up @@ -156,7 +156,7 @@
\lstdefinestyle{lstStyleCode}{%
aboveskip = \medskipamount,
belowskip = \medskipamount,
basicstyle = \ttfamily\zihao{6},
basicstyle = \ttfamily\zihao{-5}\setbaselineskip{12bp},
commentstyle = \slshape\color{black!60},
stringstyle = \color{green!40!black!100},
keywordstyle = \bfseries\color{blue!50!black},
Expand Down Expand Up @@ -188,8 +188,8 @@
\usepackage{siunitx}

% 定理环境宏包
\usepackage{ntheorem}
% \usepackage{amsthm}
\usepackage{amsthm}
% \usepackage{ntheorem}

% 绘图宏包
\usepackage{tikz}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
%% sjtutex.dtx (with options: `font,cjk,adobe,ja')
%%
%% Copyright (C) SJTUG
%% 2018--2023 Alexara Wu <[email protected]>
%% 2022--2023 Log Creative <[email protected]>
%% 2018--2024 Weijian Wu <[email protected]>
%% 2022--2024 Zilong Li <[email protected]>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
Expand All @@ -20,37 +20,33 @@
%% 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'.
%%
%% The Current Maintainers of this work are Alexara Wu and Log Creative.
%%
\GetIdInfo $Id: sjtutex.dtx 2.0.3 2023-09-25 19:50:00Z Alexara Wu <[email protected]> $
\GetIdInfo$Id: sjtutex.dtx 78f11bc 2024-06-29 23:01:32 +0800 Alexara Wu <[email protected]> $
{Adobe CJK fonts definition for Japanese (SJTUTeX)}
\ProvidesExplFile{sjtu-cjk-font-adobe-ja.def}
{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
{\ExplFileDate}{2.1.3}{\ExplFileDescription}
\__sjtu_fontset_case:nn
{ \__sjtu_fontset_error:nn { cjk } { adobe } }
{
\setCJKmainfont { Kozuka~Mincho~Pr6N }
\setCJKmainfont { KozMinPr6N }
[
UprightFont = *~L ,
BoldFont = *~B
UprightFont = *-Light ,
BoldFont = *-Bold
]
\setCJKsansfont { Kozuka~Gothic~Pr6N }
\setCJKsansfont { KozGoPr6N }
[
UprightFont = *~M ,
BoldFont = *~B
UprightFont = *-Medium ,
BoldFont = *-Bold
]
\setCJKmonofont { Kozuka~Gothic~Pr6N }
\setCJKfamilyfont { jamin } { Kozuka~Mincho~Pr6N }
\setCJKmonofont { KozMinPr6N-Light }
\setCJKfamilyfont { jamin } { KozMinPr6N }
[
UprightFont = *~L ,
BoldFont = *~B
UprightFont = *-Light ,
BoldFont = *-Bold
]
\setCJKfamilyfont { jagoth } { Kozuka~Gothic~Pr6N }
\setCJKfamilyfont { jagoth } { KozGoPr6N }
[
UprightFont = *~M ,
BoldFont = *~B
UprightFont = *-Medium ,
BoldFont = *-Bold
]
\setCJKfamilyfont { zhsong } { AdobeSongStd-Light }
[ AutoFakeBold = 3 , ItalicFont = AdobeKaitiStd-Regular ]
Expand Down
Loading
Loading