Skip to content

Commit

Permalink
Merge pull request #62 from SUSTech-CRA/report
Browse files Browse the repository at this point in the history
加入今年年度考核报告格式
  • Loading branch information
liziwl authored Jun 3, 2022
2 parents 0f45f79 + 4b53c54 commit bd450b8
Show file tree
Hide file tree
Showing 8 changed files with 303 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ thuthesis-ctan/
dtx-style.sty
*thesis.cls
*thesis.pdf
*thesis-example.pdf
*example.pdf
spine.pdf
*.hd

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ Changelog 维护应保持最新版本在文件上面的原则,日期格式按
- 正式发布版本使用形如 "`[1.0.1] - 2020-07-25`" 作为二级标题。

## [Unreleased](https://github.com/SUSTech-CRA/sustech-master-thesis/compare/v1.3.14...HEAD)
### Added
- 加入开题报告,年度考核报告的样式。


## [1.3.14](https://github.com/SUSTech-CRA/sustech-master-thesis/compare/v1.3.13...v1.3.14) - 2022-05-16

Expand Down
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

PACKAGE = sustechthesis
THESIS = sustechthesis-example
REPORT = sustechthesis-report-example

SOURCES = $(PACKAGE).ins $(PACKAGE).dtx
CLSFILE = dtx-style.sty $(PACKAGE).cls
Expand All @@ -17,9 +18,10 @@ else
RM = rm -f
endif

.PHONY: all all-dev clean cleanall thesis viewthesis dist dist-github doc viewdoc cls test wordcount FORCE_MAKE
.PHONY: all all-dev clean cleanall thesis viewthesis report viewreport dist dist-github doc viewdoc cls test wordcount FORCE_MAKE

thesis: $(THESIS).pdf
report: $(REPORT).pdf

all: thesis

Expand All @@ -45,25 +47,31 @@ $(PACKAGE).pdf: cls FORCE_MAKE
$(THESIS).pdf: cls FORCE_MAKE
$(LATEXMK) $(THESIS)

$(REPORT).pdf: cls FORCE_MAKE
$(LATEXMK) $(REPORT)

viewdoc: doc
$(LATEXMK) -pv $(PACKAGE).dtx

viewthesis: thesis
$(LATEXMK) -pv $(THESIS)

viewreport: report
$(LATEXMK) -pv $(REPORT)

test: cls FORCE_MAKE
bash test/test.sh

clean:
$(LATEXMK) -c $(PACKAGE).dtx $(THESIS)
$(LATEXMK) -c $(PACKAGE).dtx $(THESIS) $(REPORT)
-@$(RM) -rf *.aux *.bbl *.blg
-@$(RM) -rf _minted-*
-@$(RM) -rf *~ *_markdown_* *.markdown.*

cleanall: clean
-@$(RM) $(CLSFILE)
-@$(RM) -rf public-test dist
-@$(RM) $(PACKAGE).pdf $(THESIS).pdf
-@$(RM) $(PACKAGE).pdf $(THESIS).pdf $(REPORT).pdf

wordcount : $(THESIS).tex
@echo '************ Word count ************' | tee -a $(WORDCOUNTLOG)
Expand Down
6 changes: 6 additions & 0 deletions sustech-setup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
%
output = electronic,
%
% 文档类型
% 选择开题报告(proposal)、年度考核报告(progress)或学位论文(thesis)【默认值】。
%
type = thesis,
%
% 标题
% 可使用“\\”命令手动控制换行
% 如果需要使用副标题,取消 subtitle 和 subtitle* 的注释即可。
Expand Down Expand Up @@ -49,6 +54,7 @@
% 姓名
% 英文用全拼,姓在前,名在后,姓和名的首字母大写,其余小写
%
author-id = {11900000},
author = {李子强},
author* = {Li Ziqiang},
%
Expand Down
62 changes: 62 additions & 0 deletions sustechthesis-report-example.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
% !TeX encoding = UTF-8
% !TeX program = xelatex
% !TeX spellcheck = en_US

\documentclass[degree=master,language=chinese,cjk-font=external]{sustechthesis}
% 学位 degree:
% master (默认) | doctor
% 语言 language:
% chinese (默认)| english
% 中文字体 cjk-font
% auto (默认,自动选择系统自带字体)| external (包内字体)| windows | mac | 等
% 在 **非Windows** 的系统上推荐使用包内字体,而非系统字体。
% 以达到和 Windows 系统上显示的字体效果。
% Windows 系统上可以删除该参数,使用系统内置字体。


% 论文基本配置,加载宏包等全局配置
% 在此文件中可以选择
% 1. 生成的PDF为无空白页的用于电子版提交的版本 或 插入空白页的以便双面打印的版本
% 2. 学位学科门类(理学、工学、医学)
% 3. 培养单位
% 4. 作者姓名、指导教师等
% 5. 修改gongshuo的值, 默认为false代表生成学术型研究生毕业设计模板, 改为true则将生成专业型研究生毕业设计模板
\input{sustech-setup}


\begin{document}

% 封面
\maketitle

\frontmatter

% 目录
\tableofcontents

% 插图和附表清单
% \listoffiguresandtables % 插图和附表清单
% \listoffigures % 插图清单
% \listoftables % 附表清单

% 符号对照表(非强制性要求,如果论文中所用符号不多,可以略去)
% \input{data/denotation}


% 正文部分
\mainmatter
\input{data/chap01}
\input{data/chap02}
\input{data/chap03}
\input{data/chap04}
\input{data/chap05}

% 参考文献
\bibliography{ref/refs} % 参考文献使用 BibTeX 编译
% \printbibliography % 参考文献使用 BibLaTeX 编译(兼容性不佳,不太推荐)

% 附录
\appendix
% \input{data/appendix}

\end{document}
199 changes: 191 additions & 8 deletions sustechthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -3230,6 +3230,10 @@
%
% 作者、导师、副导师、联合指导老师。
% \begin{macrocode}
author-id = {
default = {学号},
name = author@id,
},
author = {
default = {姓名},
},
Expand Down Expand Up @@ -3300,6 +3304,19 @@
},
% \end{macrocode}
%
% 文档类型
% \begin{macrocode}
type = {
default = thesis,
choices = {
proposal,
progress,
thesis,
},
name = doc@type,
},
% \end{macrocode}
%
% 论文成文日期。
% \begin{macrocode}
date = {
Expand Down Expand Up @@ -3376,6 +3393,7 @@
July\or August\or September\or October\or November\or December%
\fi
}
\newcommand\thu@date@en[3]{\thu@date@month{#2} #3, #1}
\newcommand\thu@date@en@short[3]{\thu@date@month{#2}, #1}
% \end{macrocode}
%
Expand Down Expand Up @@ -3453,18 +3471,21 @@
% 生成封面(题名页)总命令。
% \begin{macrocode}
\renewcommand\maketitle{%
\thu@coverpage
\cleardoublepage
\pagenumbering{Alph}%
\thu@pdfbookmark{-1}{\thu@title}%
\thu@titlepage
% \ifthu@include@spine@true
% \thu@spine
% \fi
\ifthu@degree@graduate
\ifthu@doc@type@thesis
% 封面
\thu@coverpage
\cleardoublepage
% 内封
\thu@titlepage
\cleardoublepage
\thu@titlepage@en
\fi
\cleardoublepage
\else
\thu@coverpage@report
\cleardoublepage
\fi
\clearpage
}
\newcommand\thu@option@supervisor@cover@item{
Expand Down Expand Up @@ -3752,6 +3773,168 @@ Thesis for the degree of \degree@level@en@noun \ of \thu@degree@domain@en%
}
% \end{macrocode}
%
% 报告封面
% \begin{macrocode}
\newcommand\thu@set@report@meta{
\ifthu@doc@type@proposal
\ifthu@degree@master
\def\report@name@en{Master's Thesis Proposal}
\def\report@name{硕士学位论文开题报告}
\else
\def\report@name@en{Doctor's Thesis Proposal}
\def\report@name{博士学位论文开题报告}
\fi
\def\date@name@en{Date of Proposal Report}
\def\date@name{开题报告日期}
\fi
\ifthu@doc@type@progress
\ifthu@degree@master
\def\report@name@en{Study Progress Report of Master's Students}
\def\report@name{硕士研究生年度考核报告}
\else
\def\report@name@en{Study Progress Report of Doctor's Students}
\def\report@name{博士研究生年度考核报告}
\fi
\def\date@name@en{Submission Date}
\def\date@name{年度考核日期}
\fi
}
\RequirePackage{listofitems}
\newcommand{\ulbox}[2][2em]{%
\CJKunderline[thickness=1pt]{\makebox[#1]{#2}}%
}
\NewDocumentCommand\sustech@info@item{s o m o m}{%
{
\renewcommand\arraystretch{1.75}
\bfseries
\IfValueTF{#2}
{\begin{tabular}[t]{@{}l@{}}\makebox[#2][s]{#3}\end{tabular}}
{\begin{tabular}[t]{@{}l@{}}#3\end{tabular}}
} & %
{
\renewcommand\arraystretch{1.75}
\bfseries
\IfBooleanTF{#1}
{%有星号
\IfValueTF{#4}
{\sustech@info@multiline[#4]{#5}}
{\sustech@info@multiline[15em]{#5}}
}
{%没星号
\IfValueTF{#4}
{\sustech@info@singleline[#4]{#5}}
{\sustech@info@singleline[15em]{#5}}
}
}
}
\newcommand{\sustech@info@singleline}[2][2em]{
\begin{tabular}[t]{@{}l@{}}\ulbox[#1]{#2}\end{tabular}
}
\newcommand{\sustech@info@multiline}[2][2em]{
\setsepchar{\\}%
\readlist\tmp@list#2%
\def\e@tmp@list{}%
\foreachitem\y\in\tmp@list[]{%
\listeadd{\e@tmp@list}{\y}%
}%
\renewcommand*{\do}[1]{\ulbox[#1]{##1}\\}%
\begin{tabular}[t]{@{}l@{}}%
\dolistloop{\e@tmp@list}
\end{tabular}
}
\newcommand\thu@coverpage@report{%
\thu@set@report@meta
\ifthu@language@chinese
% Chinese
\begingroup
\thispagestyle{empty}
\centering
\vspace*{10mm}
{
\zihao{-2} \kaishu \bfseries %
\renewcommand{\CJKglue}{\hskip 6pt plus 0.08\baselineskip}%
南方科技大学 \par
}

\vspace{10mm}
{
\zihao{-1} \songti \bfseries%
\renewcommand{\CJKglue}{\hskip 5pt plus 0.08\baselineskip}%
\report@name \par
}

\vspace{30pt}
\parbox[t]{30em}{
\centering
\zihao{-2} \songti \bfseries%
题~目:\thu@title}
\par

\vspace*{30pt}
{\zihao{3} \songti
\begin{tabular}{l@{}l}
\sustech@info@item*[6em]{院(系)}[10em]{\thu@department}\\
\sustech@info@item*[6em]{学科}[10em]{\thu@discipline}\\
\sustech@info@item*[6em]{导师}[10em]{\thu@supervisor}\\
\sustech@info@item[6em]{研究生}[10em]{\thu@author}\\
\sustech@info@item[6em]{学号}[10em]{\thu@author@id}\\
\sustech@info@item[6em]{\date@name}[10em]{\thu@format@date{\thu@date@zh@digit}{\thu@date}}
\end{tabular}
}\par
\vfill

{
\zihao{3} \songti \bfseries 研究生院制 \par
}
\endgroup
\else%
% English
\begingroup
\thispagestyle{empty}
\centering
\vspace*{10mm}
{
\zihao{-2} \bfseries %
\renewcommand{\CJKglue}{\hskip 2pt plus 0.08\baselineskip}%
Southern University of Science and Technology \par
}

\vspace{10mm}
{
\zihao{2} \bfseries%
\renewcommand{\CJKglue}{\hskip 2pt plus 0.08\baselineskip}%
\report@name@en \par
}

\vspace{30pt}
\parbox[t]{30em}{
\centering
\zihao{-2} \bfseries%
Title: \thu@title@en}
\par

\vspace*{30pt}
{\zihao{3}
\begin{tabular}{l@{}l}
\sustech@info@item*{Department}[16em]{\thu@department@en}\\
\sustech@info@item*{Discipline}[16em]{\thu@discipline@en}\\
\sustech@info@item*{Supervisor}[16em]{\thu@supervisor@en}\\
\sustech@info@item{Student Name}[16em]{\thu@author@en}\\
\sustech@info@item{Student Number}[16em]{\thu@author@id}\\
\sustech@info@item{\date@name@en}[16em]{\thu@format@date{\thu@date@en}{\thu@date}}
\end{tabular}
}\par
\vfill

{
\zihao{3} \bfseries Graduate School \par
}
\endgroup
\fi
\clearpage
}
% \end{macrocode}
%
% 专业型学位论文中文封面
% \begin{macrocode}
\newcommand\thu@titlepage@graduate@professional{%
Expand Down
Loading

0 comments on commit bd450b8

Please sign in to comment.