Skip to content

Commit

Permalink
add a report template and sysu log
Browse files Browse the repository at this point in the history
  • Loading branch information
DapengFeng committed Oct 9, 2021
1 parent e4640a1 commit cf9e9c3
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 17 deletions.
Binary file added scan/sysu-log.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 55 additions & 6 deletions sysuthesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
%% To produce the documentation run the original source files ending with `.dtx'
%% through LaTeX.
%%
\newcommand\sysuthesisversion{1.0.0}
\newcommand\sysuthesisversion{1.0.1}
\NeedsTeXFormat{LaTeX2e}[2017/04/15]
\ProvidesClass{sysuthesis}
[2021/06/16 {\sysuthesisversion} Sun Yat-sen University Thesis Template]
[2021/10/09 {\sysuthesisversion} Sun Yat-sen University Thesis Template]
\newcommand\sysu@error[1]{%
\ClassError{sysuthesis}{#1}{}%
}
Expand Down Expand Up @@ -130,6 +130,7 @@
choices = {
thesis,
proposal,
report,
},
default = thesis,
},
Expand Down Expand Up @@ -2167,6 +2168,10 @@
\else
\ifsysu@thesis@type@proposal
\sysu@titlepage@proposal
\else
\ifsysu@thesis@type@report
\sysu@titlepage@report
\fi
\fi
\fi
\else
Expand Down Expand Up @@ -2285,11 +2290,40 @@
\clearpage
\restoregeometry
}
\newcommand\sysu@titlepage@report{%
\newgeometry{
top = 5cm,
bottom = 3.25cm,
hmargin = 3.17cm,
}%
\thispagestyle{empty}%
\begingroup
% \vspace*{0.1cm}%
\centering
\includegraphics[scale=0.6]{scan/sysu-log.jpg}
% {\sysu@titlepage@title}%
\parbox[t][3cm]{\textwidth}{%
\vskip 0.1cm%
\centering
\sffamily\fontsize{26bp}{46.8bp}\selectfont
\sysu@title\par
}%
\vskip 0.85cm%
\sysu@titlepage@degree
\vfill
\parbox[t][8.5cm][t]{\textwidth}{%
\centering\CJKfamily+{}%
\centering\fangsong\sanhao[1.95]%
\sysu@titlepage@report@info
}\par
\parbox[t][2.5cm][t]{\textwidth}{\centering\sysu@titlepage@date}\par
\endgroup
\clearpage
\restoregeometry
}
\newcommand\sysu@set@student@id{%
\ifsysu@thesis@type@proposal
\ifx\sysu@student@id\@empty
\sysusetup{student-id=2000310000}%
\fi
\ifx\sysu@student@id\@empty
\sysusetup{student-id=2000310000}%
\fi
}
\sysu@set@student@id
Expand Down Expand Up @@ -2323,6 +2357,10 @@
\fi
\fi
学位论文选题报告)%
\else
\ifsysu@thesis@type@report
(中山大学研究生课程实验报告)%
\fi
\fi
\fi
\par
Expand Down Expand Up @@ -2434,6 +2472,17 @@
\sysu@info@item{联合导师}{\sysu@name@title}{\sysu@co@supervisor}%
}\par
}
\newcommand\sysu@titlepage@report@info{%
\sysu@titlepage@info@tabular{2.8cm}{2.8cm}{0.82cm}{%
\sysu@info@item{培养单位}{}{\sysu@department}%
\sysu@info@item{学科}{}{\sysu@discipline}%
\sysu@info@item{研究生}{\sysu@name@title}{\sysu@author}%
\sysu@info@item{学号}{}{\sysu@student@id}%
\sysu@info@item{指导教师}{\sysu@name@title}{\sysu@supervisor}%
\sysu@info@item{副指导教师}{\sysu@name@title}{\sysu@associate@supervisor}%
\sysu@info@item{联合导师}{\sysu@name@title}{\sysu@co@supervisor}%
}\par
}
\newcommand\sysu@titlepage@date{%
\begingroup
\sanhao
Expand Down
82 changes: 71 additions & 11 deletions sysuthesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
%
% \iffalse
%<*driver>
\newcommand\sysuthesisversion{1.0.0}
\ProvidesFile{sysuthesis.dtx}[2021/06/16 {\sysuthesisversion} Sun Yat-sen University Thesis Template]
\newcommand\sysuthesisversion{1.0.1}
\ProvidesFile{sysuthesis.dtx}[2021/10/09 {\sysuthesisversion} Sun Yat-sen University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}

Expand Down Expand Up @@ -63,7 +63,7 @@
%
% \begin{abstract}\noindent
% 此宏包旨在建立一个简单易用的中山大学学位论文模板,包括本科综合论文训练、硕士
% 论文、博士论文以及博士后出站报告
% 论文、博士论文、课程实验报告以及博士后出站报告
% \end{abstract}
%
% \vskip2cm
Expand Down Expand Up @@ -406,7 +406,7 @@
%
% \subsubsection{开题报告}
% \DescribeOption{thesis-type}
% 模板还支持博士生论文开题报告的格式,可以通过设置 \option{thesis-type=proposal} 得到。
% 模板还支持研究生论文开题报告的格式,可以通过设置 \option{thesis-type=proposal} 得到。
%
% 开题报告与学位论文有两点不同:
% \begin{enumerate}
Expand All @@ -420,6 +420,10 @@
% }
% \end{latex}
%
% \subsubsection{课程实验报告}
% 模板支持课程实验报告的格式,可以通过设置 \option{thesis-type=report} 得到。课程实验报告与开题报告类
% 似。
%
% \subsection{封面信息}
% \label{sec:titlepage}
% 封面信息可以通过统一设置命令 \cs{sysusetup} 设置 \emph{key=value} 形式完成;
Expand Down Expand Up @@ -503,7 +507,7 @@
% \end{latex}
%
% \subsubsection{学号}
% 学号,仅用于博士生论文开题报告
% 学号,用于研究生论文开题报告和课程实验报告
% \begin{latex}
% \sysusetup{
% student-id = {20000310000},
Expand Down Expand Up @@ -1238,10 +1242,10 @@
%
% \subsection{基本信息}
% \begin{macrocode}
%<cls>\newcommand\sysuthesisversion{1.0.0}
%<cls>\newcommand\sysuthesisversion{1.0.1}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{sysuthesis}
%<cls>[2021/06/16 {\sysuthesisversion} Sun Yat-sen University Thesis Template]
%<cls>[2021/10/09 {\sysuthesisversion} Sun Yat-sen University Thesis Template]
% \end{macrocode}
%
% 报错
Expand Down Expand Up @@ -1447,6 +1451,7 @@
choices = {
thesis,
proposal,
report,
},
default = thesis,
},
Expand Down Expand Up @@ -4249,6 +4254,10 @@
\else
\ifsysu@thesis@type@proposal
\sysu@titlepage@proposal
\else
\ifsysu@thesis@type@report
\sysu@titlepage@report
\fi
\fi
\fi
\else
Expand Down Expand Up @@ -4384,11 +4393,47 @@
\clearpage
\restoregeometry
}
% \end{macrocode}
%
% 课程实验报告封面
% \begin{macrocode}
\newcommand\sysu@titlepage@report{%
\newgeometry{
top = 5cm,
bottom = 3.25cm,
hmargin = 3.17cm,
}%
\thispagestyle{empty}%
\begingroup
% \vspace*{0.1cm}%
\centering
\includegraphics[scale=0.6]{scan/sysu-log.jpg}
% {\sysu@titlepage@title}%
\parbox[t][3cm]{\textwidth}{%
\vskip 0.1cm%
\centering
\sffamily\fontsize{26bp}{46.8bp}\selectfont
\sysu@title\par
}%
\vskip 0.85cm%
\sysu@titlepage@degree
\vfill
\parbox[t][8.5cm][t]{\textwidth}{%
\centering\CJKfamily+{}%
\centering\fangsong\sanhao[1.95]%
\sysu@titlepage@report@info
}\par
\parbox[t][2.5cm][t]{\textwidth}{\centering\sysu@titlepage@date}\par
\endgroup
\clearpage
\restoregeometry
}
% \end{macrocode}
% 学号
% \begin{macrocode}
\newcommand\sysu@set@student@id{%
\ifsysu@thesis@type@proposal
\ifx\sysu@student@id\@empty
\sysusetup{student-id=2000310000}%
\fi
\ifx\sysu@student@id\@empty
\sysusetup{student-id=2000310000}%
\fi
}
\sysu@set@student@id
Expand Down Expand Up @@ -4430,6 +4475,10 @@
\fi
\fi
学位论文选题报告)%
\else
\ifsysu@thesis@type@report
(中山大学研究生课程实验报告)%
\fi
\fi
\fi
\par
Expand Down Expand Up @@ -4549,6 +4598,17 @@
\sysu@info@item{联合导师}{\sysu@name@title}{\sysu@co@supervisor}%
}\par
}
\newcommand\sysu@titlepage@report@info{%
\sysu@titlepage@info@tabular{2.8cm}{2.8cm}{0.82cm}{%
\sysu@info@item{培养单位}{}{\sysu@department}%
\sysu@info@item{学科}{}{\sysu@discipline}%
\sysu@info@item{研究生}{\sysu@name@title}{\sysu@author}%
\sysu@info@item{学号}{}{\sysu@student@id}%
\sysu@info@item{指导教师}{\sysu@name@title}{\sysu@supervisor}%
\sysu@info@item{副指导教师}{\sysu@name@title}{\sysu@associate@supervisor}%
\sysu@info@item{联合导师}{\sysu@name@title}{\sysu@co@supervisor}%
}\par
}
% \end{macrocode}
%
% 论文成文打印的日期,用三号宋体汉字,字距延伸 0.5bp,
Expand Down
Binary file modified sysuthesis.pdf
Binary file not shown.

0 comments on commit cf9e9c3

Please sign in to comment.