From 467b00040fe6d3809979d537faa6d55cfe53a719 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 14 Feb 2021 22:32:36 +0000 Subject: shtthesis (14feb21) git-svn-id: svn://tug.org/texlive/trunk@57740 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/shtthesis/shtthesis.cls | 59 +++++++++++++--------- 1 file changed, 36 insertions(+), 23 deletions(-) (limited to 'Master/texmf-dist/tex/latex/shtthesis') diff --git a/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls b/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls index 1d616c240c2..d1bcc8fcdc4 100644 --- a/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls +++ b/Master/texmf-dist/tex/latex/shtthesis/shtthesis.cls @@ -1,5 +1,5 @@ % shtthesis, an unofficial LaTeX thesis template for ShanghaiTech University. -% Copyright (C) 2020 Li Rundong +% Copyright (C) 2021 Li Rundong % % 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% -- cgit v1.2.3