summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/shtthesis/shtthesis.cls
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-15 03:01:20 +0000
committerNorbert Preining <norbert@preining.info>2021-02-15 03:01:20 +0000
commit8fb1cfd3d240ef62d78c2320bd90f8f07b7916fa (patch)
tree402ab28aa933f0b5a42c2a1d9646717340fae50e /macros/latex/contrib/shtthesis/shtthesis.cls
parent8c6ca435b3bc584eb3efe8e52417fb989e677789 (diff)
CTAN sync 202102150301
Diffstat (limited to 'macros/latex/contrib/shtthesis/shtthesis.cls')
-rw-r--r--macros/latex/contrib/shtthesis/shtthesis.cls59
1 files changed, 36 insertions, 23 deletions
diff --git a/macros/latex/contrib/shtthesis/shtthesis.cls b/macros/latex/contrib/shtthesis/shtthesis.cls
index 1d616c240c..d1bcc8fcdc 100644
--- a/macros/latex/contrib/shtthesis/shtthesis.cls
+++ b/macros/latex/contrib/shtthesis/shtthesis.cls
@@ -1,5 +1,5 @@
% shtthesis, an unofficial LaTeX thesis template for ShanghaiTech University.
-% Copyright (C) 2020 Li Rundong <rundong.001@gmail.com>
+% Copyright (C) 2021 Li Rundong <rundong.001@gmail.com>
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
% Identification
% ==============================================================================
\NeedsTeXFormat{LaTeX2e}
-\newcommand\version{0.3.1}
-\newcommand\versiondate{2020/06/30}
+\newcommand\version{0.3.2}
+\newcommand\versiondate{2021/01/23}
\ProvidesClass{shtthesis}[%
\versiondate\space%
v\version\space%
@@ -313,7 +313,7 @@
\RequirePackage{indentfirst}
\RequirePackage[normalem]{ulem}
\RequirePackage{fancyhdr}
-\RequirePackage{pageslts}
+\RequirePackage{lastpage}
\RequirePackage{tocvsec2}
\RequirePackage{letltxmacro}
\RequirePackage{fontspec}
@@ -373,7 +373,7 @@
\definecolor{ShtRed}{RGB}{146,46,23}
\def\school@logo@missing{%
校徽文件缺失,请至\href{https://github.com/lirundong/shtthesis/raw/master/%
- shanghaitech-logo.pdf}{项目主页}下载!%
+ shanghaitech-emblem.pdf}{项目主页}下载!%
}
% ------------------------------------------------------------------------------
% Geometry and layouts
@@ -418,11 +418,14 @@
% ------------------------------------------------------------------------------
% Headers and footers
% ------------------------------------------------------------------------------
-\def\sht@flat@title{\renewcommand\\{\space} \@title}
-\def\sht@flat@title@en{\renewcommand\\{\space} \sht@title@en}
+\def\sht@flat@title{\renewcommand\\{\space} \sht@title}
+\def\sht@flat@title@upper@en{%
+ \renewcommand\\{\space}%
+ \MakeUppercase{\sht@title@en}%
+}
\newcommand\sht@head@logo{%
- \IfFileExists{shanghaitech-logo.pdf}{%
- \includegraphics[height=\sht@head@logo@height]{shanghaitech-logo.pdf}%
+ \IfFileExists{shanghaitech-emblem.pdf}{%
+ \includegraphics[height=\sht@head@logo@height]{shanghaitech-emblem.pdf}%
}{%
\fbox{%
\begin{minipage}[b][\sht@head@logo@height][c]{0.4\columnwidth}%
@@ -475,7 +478,7 @@
\fancyhead[R]{\zihao{-5}\sffamily\sht@flat@title}
\fancyfoot[C]{%
\footnotesize%
- 第~\thepage~页\hspace*{1\ccwd}共~\lastpageref*{VeryLastPage}~页%
+ 第~\thepage~页\hspace*{1\ccwd}共~\pageref*{LastPage}~页%
}
\renewcommand{\headrulewidth}{0.8pt}
\renewcommand{\footrulewidth}{0pt}
@@ -494,16 +497,14 @@
\LetLtxMacro{\TmpMainmatter}{\mainmatter}
\renewcommand{\mainmatter}{%
\TmpMainmatter%
+ \renewcommand{\chaptermark}[1]{%
+ \markboth{第~\thechapter~章\hspace{1\ccwd}##1}{}%
+ }%
\ifsht@undergraduate%
\pagestyle{MNNumberedWithLogo}%
\else%
\pagestyle{LRNumbered}%
\fi%
- \pagenumbering{arabic}%
- \setcounter{page}{1}%
-}
-\AtBeginDocument{%
- \pagenumbering{arabic}%
}
% ------------------------------------------------------------------------------
% Font utilities
@@ -1095,8 +1096,8 @@
}
\ExplSyntaxOff
\newcommand\sht@schoollogo{%
- \IfFileExists{shanghaitech-logo.pdf}{%
- \includegraphics[width=10.48cm]{shanghaitech-logo.pdf}%
+ \IfFileExists{shanghaitech-emblem.pdf}{%
+ \includegraphics[width=10.48cm]{shanghaitech-emblem.pdf}%
}{%
\begin{center}%
\fbox{%
@@ -1109,8 +1110,8 @@
}
\newcommand\sht@schoollogo@undergraduate{%
\noindent%
- \IfFileExists{shanghaitech-logo.pdf}{%
- \includegraphics[width=5.39cm]{shanghaitech-logo.pdf}%
+ \IfFileExists{shanghaitech-emblem.pdf}{%
+ \includegraphics[width=5.39cm]{shanghaitech-emblem.pdf}%
}{%
\fbox{%
\begin{minipage}[t][1.45cm][c]{0.75\columnwidth}%
@@ -1517,7 +1518,7 @@
毕业论文(设计)。
\hspace*{6\ccwd}\textbf{保\hspace*{1\ccwd}密}$\square$,%
- 在\uline{\hspace*{2\ccwd}}年解密后适用本授权书。
+ 在\uline{\mbox{\hspace*{2\ccwd}}}年解密后适用本授权书。
本论文属于
@@ -1565,8 +1566,15 @@
\end{center}%
\vspace*{\baselineskip}%
\ctexset{chapter/format += \zihao{4}, chapter/beforeskip = 0pt}%
+ \ifsht@comfort%
+ \def\sht@abstract@name{摘\hspace{1\ccwd}要}
+ \else%
+ \def\sht@abstract@name{摘要}
+ \fi
+ \else%
+ \def\sht@abstract@name{摘\hspace{1\ccwd}要}
\fi
- \intobmk\chapter*{摘\hspace{1\ccwd}要}%
+ \intobmk\chapter*{\sht@abstract@name}%
}{%
\vspace{\baselineskip}%
\ifsht@undergraduate%
@@ -1582,7 +1590,7 @@
\newenvironment{abstract*}[1][\sht@null@arg]{%
\cleardoublepage%
\ifthenelse{\equal{#1}{flattitle}}{%
- \def\sht@abs@title@en{\sht@flat@title@en}%
+ \def\sht@abs@title@en{\sht@flat@title@upper@en}%
}{%
\def\sht@abs@title@en{\sht@title@en}%
}%
@@ -1594,8 +1602,10 @@
\end{center}%
\vspace*{\baselineskip}%
\ctexset{chapter/format += \zihao{4}\rmfamily, chapter/beforeskip = 0pt}%
+ \intobmk\chapter*{ABSTRACT}%
+ \else
+ \intobmk\chapter*{Abstract}%
\fi
- \intobmk\chapter*{Abstract}%
}{%
\vspace{\baselineskip}%
\ifsht@undergraduate%
@@ -1676,6 +1686,9 @@
\renewcommand{\backmatter}{%
\origin@backmatter%
\settocdepth{chapter}%
+ \renewcommand{\chaptermark}[1]{%
+ \markboth{##1}{}%
+ }%
\ifsht@undergraduate%
\pagestyle{MNNumberedWithLogo}%
\else%