1
0
Files
aust-thesis-template/aust-thesis.cls

530 lines
18 KiB
OpenEdge ABL
Raw Normal View History

2026-04-27 14:59:21 +08:00
%
\NeedsTeXFormat{LaTeX2e}
2026-06-13 20:29:44 +08:00
\ProvidesClass{aust-thesis}[2026/04/26 AUST Thesis Template]
2026-04-27 14:59:21 +08:00
% ctexart
2026-05-05 12:21:32 +08:00
\LoadClass[a4paper]{ctexart} % ctexartA4
2026-04-27 14:59:21 +08:00
2026-05-05 12:21:32 +08:00
%
2026-04-27 14:59:21 +08:00
\RequirePackage{amsmath, amssymb, amsthm} %
\RequirePackage{graphicx} %
\RequirePackage{caption} %
\RequirePackage{hyperref} %
2026-05-05 12:21:32 +08:00
% region:
% Word1cm线1cm
2026-04-27 14:59:21 +08:00
\RequirePackage{geometry}
2026-05-05 12:21:32 +08:00
\geometry{left=3.5cm,right=2.5cm,top=3cm,bottom=2.5cm}
% endregion
% region: 西
% 西
\RequirePackage{fontspec}
2026-05-05 12:21:32 +08:00
\setmainfont{Times New Roman}
%
\songti{}
%
\zihao{-4}
% endregion
% region:
\RequirePackage{fancyhdr}
% 使
\pagestyle{fancy}
\fancyhf{}
2026-05-06 10:26:50 +08:00
%
\setlength{\voffset}{2.6mm}
2026-05-05 12:21:32 +08:00
%
\fancyhead[C]{\zihao{5} \songti \leftmark}
% 线
\renewcommand{\headrulewidth}{0.1mm}
2026-05-06 10:26:50 +08:00
%
\setlength{\footskip}{2.5mm}
2026-05-05 12:21:32 +08:00
%
\fancyfoot[C]{\zihao{5}\songti -\hspace{0.5em}\thepage\hspace{0.5em}-}
% 线0线
\renewcommand{\footrulewidth}{0mm}
% endregion
% region:
% 1
\newcommand{\austnopagenum}{
\thispagestyle{empty} %
\setcounter{page}{1} % 1
}
% ()
\newcommand{\austromanpagenum}{
\pagenumbering{Roman} % 1
}
% ()
\newcommand{\austarabicpagenum}{
\pagenumbering{arabic} % 1
}
% endregion
2026-04-27 14:59:21 +08:00
%
\RequirePackage{titlesec}
\titleformat{\section}{\centering\zihao{3}\heiti}{\thesection}{1em}{}
\titleformat{\subsection}{\zihao{4}\heiti}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\zihao{-4}\heiti}{\thesubsubsection}{1em}{}
2026-05-09 12:45:16 +08:00
% 1
2026-05-05 12:21:32 +08:00
% https://www.latexstudio.net/archives/51638.html
2026-05-09 12:45:16 +08:00
\DeclareCaptionFormat{austcaption}{\heiti{}\zihao{5}#1#2#3\par}
\captionsetup[figure]{format=austcaption, labelsep=space}
\captionsetup[table]{format=austcaption, labelsep=space}
\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable}{\arabic{table}}
2026-04-27 14:59:21 +08:00
2026-06-13 20:29:44 +08:00
\RequirePackage{cleveref}
\crefname{table}{}{}
\Crefname{table}{}{}
\crefname{equation}{}{}
\Crefname{equation}{}{}
\crefname{figure}{}{}
\Crefname{figure}{}{}
2026-05-06 00:05:24 +08:00
% region:
\newenvironment{austabstract}[1]
{
\clearpage
\section*{\centering \heiti \zihao{3} #1}}
{
\clearpage
}
\newcommand{\austkeywords}[2]{
\textbf{#1} #2
}
% endregion
% region:
% gbt7714 v2.2.0 (2026-05-03) gbt7714-numericalgbt7714-numeric
%
\RequirePackage{gbt7714}
\@ifpackagelater{gbt7714}{2026/05/03}
{\bibliographystyle{gbt7714-numeric}}
{\bibliographystyle{gbt7714-numerical}}
2026-05-06 00:05:24 +08:00
% endregion
2026-05-05 12:21:32 +08:00
% region:
\RequirePackage{xparse}
\RequirePackage{ulem}
2026-05-05 13:26:04 +08:00
\ExplSyntaxOn
%
2026-06-13 21:54:06 +08:00
\keys_define:nn { aust/class_report }
2026-05-05 13:26:04 +08:00
{
2026-06-13 21:54:06 +08:00
semester .tl_set:N = \l_aust_cr_semester_tl,
semester .initial:n = {2025-2026},
2026-06-13 21:54:06 +08:00
level .tl_set:N = \l_aust_cr_level_tl,
2026-05-05 13:26:04 +08:00
level .initial:n = {},
2026-06-13 21:54:06 +08:00
course .tl_set:N = \l_aust_cr_course_tl,
2026-05-05 13:26:04 +08:00
course .initial:n = {},
2026-06-13 21:54:06 +08:00
title .tl_set:N = \l_aust_cr_title_tl,
2026-05-05 13:26:04 +08:00
title .initial:n = {},
2026-06-13 21:54:06 +08:00
school .tl_set:N = \l_aust_cr_school_tl,
2026-05-05 13:26:04 +08:00
school .initial:n = {},
2026-06-13 21:54:06 +08:00
major .tl_set:N = \l_aust_cr_major_tl,
2026-05-05 13:26:04 +08:00
major .initial:n = {},
2026-06-13 21:54:06 +08:00
sid .tl_set:N = \l_aust_cr_sid_tl,
sid .initial:n = {1945000000},
2026-06-13 21:54:06 +08:00
name .tl_set:N = \l_aust_cr_name_tl,
2026-05-05 13:26:04 +08:00
name .initial:n = {},
2026-06-13 21:54:06 +08:00
lecturer .tl_set:N = \l_aust_cr_lecturer_tl,
2026-05-05 13:26:04 +08:00
lecturer .initial:n = {},
2026-06-13 21:54:06 +08:00
date .tl_set:N = \l_aust_cr_date_tl,
date .initial:n = {19450101},
2026-05-05 12:21:32 +08:00
}
2026-05-05 13:26:04 +08:00
% ()
2026-06-13 21:54:06 +08:00
\cs_new_protected:Npn \aust_class_report_cover_internal:
2026-05-05 13:26:04 +08:00
{
\begin{titlepage}
\austnopagenum
\centering
\renewcommand{\arraystretch}{1.6}
\begin{figure}[!h]
2026-05-05 13:26:04 +08:00
\centering
\includegraphics{aust-logo-banner.jpg}
2026-05-05 13:26:04 +08:00
\end{figure}
\vspace{0.4cm}
2026-06-13 21:54:06 +08:00
{\heiti \zihao{2} \textbf{\tl_use:N \l_aust_cr_semester_tl} \par }
2026-05-05 13:26:04 +08:00
\vspace{0.4cm}
2026-06-13 21:54:06 +08:00
{\heiti \zihao{2} \textbf{\tl_use:N \l_aust_cr_level_tl} \par }
2026-05-05 13:26:04 +08:00
\vspace{0.4cm}
2026-06-13 21:54:06 +08:00
{\songti \zihao{1} \textbf{\tl_use:N \l_aust_cr_course_tl} \par }
2026-05-05 13:26:04 +08:00
\vfill
{
\kaishu{} \zihao{3}
\begin{tabular}{r@{\quad}p{11.5em}}
2026-06-13 21:54:06 +08:00
\hspace{2em} & \tl_use:N \l_aust_cr_title_tl \\
2026-05-05 13:26:04 +08:00
\cline{2-2}
2026-06-13 21:54:06 +08:00
\hspace{2em} & \tl_use:N \l_aust_cr_school_tl \\
2026-05-05 13:26:04 +08:00
\cline{2-2}
2026-06-13 21:54:06 +08:00
\hspace{2em} & \tl_use:N \l_aust_cr_major_tl \\
2026-05-05 13:26:04 +08:00
\cline{2-2}
2026-06-13 21:54:06 +08:00
\hspace{2em} & \tl_use:N \l_aust_cr_sid_tl \\
2026-05-05 13:26:04 +08:00
\cline{2-2}
2026-06-13 21:54:06 +08:00
\hspace{2em} & \tl_use:N \l_aust_cr_name_tl \\
2026-05-05 13:26:04 +08:00
\cline{2-2}
2026-06-13 21:54:06 +08:00
& \tl_use:N \l_aust_cr_lecturer_tl \\
2026-05-05 13:26:04 +08:00
\cline{2-2}
\end{tabular}
}
\vfill
2026-06-13 21:54:06 +08:00
{\kaishu \zihao{3} \tl_use:N \l_aust_cr_date_tl \par }
2026-05-05 13:26:04 +08:00
\end{titlepage}
2026-05-05 12:21:32 +08:00
}
2026-05-05 13:26:04 +08:00
%
2026-06-13 21:54:06 +08:00
\NewDocumentCommand \austclassreportsetup { m }
{ \keys_set:nn { aust/class_report } { #1 } }
2026-05-05 13:26:04 +08:00
% (xparse )
% AUST
2026-06-13 21:54:06 +08:00
\NewDocumentCommand \austclassreportcover { O{} }
2026-05-05 13:26:04 +08:00
{
\group_begin:
2026-06-13 21:54:06 +08:00
\keys_set:nn { aust/class_report } { #1 }
\aust_class_report_cover_internal:
2026-05-05 13:26:04 +08:00
\group_end:
}
% AUST
2026-06-13 21:54:06 +08:00
% region:
%
\keys_define:nn { aust/book_report }
{
level .tl_set:N = \l_aust_br_level_tl,
level .initial:n = {},
name .tl_set:N = \l_aust_br_name_tl,
name .initial:n = {},
sid .tl_set:N = \l_aust_br_sid_tl,
sid .initial:n = {1945000000},
institution .tl_set:N = \l_aust_br_institution_tl,
institution .initial:n = {},
major .tl_set:N = \l_aust_br_major_tl,
major .initial:n = {},
mentor .tl_set:N = \l_aust_br_mentor_tl,
mentor .initial:n = {},
direction .tl_set:N = \l_aust_br_direction_tl,
direction .initial:n = {},
title .tl_set:N = \l_aust_br_title_tl,
title .initial:n = {},
refcnt .tl_set:N = \l_aust_br_refcnt_tl,
refcnt .initial:n = {},
school .tl_set:N = \l_aust_br_school_tl,
school .initial:n = {},
date .tl_set:N = \l_aust_br_date_tl,
date .initial:n = {19450101},
}
%
\cs_new_protected:Npn \aust_book_report_cover_internal:
{
\begin{titlepage}
\austnopagenum
\centering
\renewcommand{\arraystretch}{1.6}
\begin{figure}[!h]
\centering
2026-06-13 21:58:34 +08:00
\includegraphics[scale=1.4]{aust-nologo-banner.png}
2026-06-13 21:54:06 +08:00
\end{figure}
\vspace{0.4cm}
{\songti \zihao{2} \textbf{\tl_use:N \l_aust_br_level_tl} \par }
\vspace{4em}
{
\heiti{} \zihao{4}
\begin{tabular}{rp{8em}rp{8em}}
\hspace{2em} & {\fangsong \zihao{-4} \tl_use:N \l_aust_br_name_tl} &
\hspace{2em} & {\fangsong \zihao{-4} \tl_use:N \l_aust_br_sid_tl} \\
\cline{2-2} \cline{4-4}
& {\fangsong \zihao{-4} \tl_use:N \l_aust_br_institution_tl} &
& {\fangsong \zihao{-4} \tl_use:N \l_aust_br_major_tl} \\
\cline{2-2} \cline{4-4}
\hspace{2em} & {\fangsong \zihao{-4} \tl_use:N \l_aust_br_mentor_tl} &
& {\fangsong \zihao{-4} \tl_use:N \l_aust_br_direction_tl} \\
\cline{2-2} \cline{4-4}
\end{tabular}
}
\par
\vspace{4em}
{
\heiti{} \zihao{-4}
\begin{tabular}{|r|p{24em}|}
\hline
& {\fangsong \zihao{5} \tl_use:N \l_aust_br_title_tl} \\
\hline
& {\fangsong \zihao{5} \tl_use:N \l_aust_br_refcnt_tl} \\
\hline
\end{tabular}
}
\vfill
{\fangsong \zihao{3} \tl_use:N \l_aust_br_school_tl \par }
{\fangsong \zihao{3} \tl_use:N \l_aust_br_date_tl \par }
\end{titlepage}
}
%
\NewDocumentCommand \austbookreportsetup { m }
{ \keys_set:nn { aust/book_report } { #1 } }
% ()
\NewDocumentCommand \austbookreportcover { O{} }
{
\group_begin:
\keys_set:nn { aust/book_report } { #1 }
\aust_book_report_cover_internal:
\group_end:
}
% endregion
2026-06-24 23:10:46 +08:00
% region:
%
\keys_define:nn { aust/thesis }
{
clcindex .tl_set:N = \l_aust_th_clcindex_tl,
clcindex .initial:n = {},
catindex .tl_set:N = \l_aust_th_catindex_tl,
catindex .initial:n = {},
index .tl_set:N = \l_aust_th_index_tl,
index .initial:n = {},
secret .tl_set:N = \l_aust_th_secret_tl,
secret .initial:n = {},
level .tl_set:N = \l_aust_th_level_tl,
level .initial:n = {},
title .tl_set:N = \l_aust_th_title_tl,
title .initial:n = {},
subtitle .tl_set:N = \l_aust_th_subtitle_tl,
subtitle .initial:n = {},
name .tl_set:N = \l_aust_th_name_tl,
name .initial:n = {},
major .tl_set:N = \l_aust_th_major_tl,
major .initial:n = {},
direction .tl_set:N = \l_aust_th_direction_tl,
direction .initial:n = {},
mentor .tl_set:N = \l_aust_th_mentor_tl,
mentor .initial:n = {},
mentor_institution .tl_set:N = \l_aust_th_mentor_institution_tl,
mentor_institution .initial:n = {},
committee_chairman .tl_set:N = \l_aust_th_committee_chairman_tl,
committee_chairman .initial:n = {},
defence_date .tl_set:N = \l_aust_th_defence_date_tl,
defence_date .initial:n = {19450101},
date .tl_set:N = \l_aust_th_date_tl,
date .initial:n = {19450101},
major_en .tl_set:N = \l_aust_th_major_en_tl,
major_en .initial:n = {Example Majority},
title_en .tl_set:N = \l_aust_th_title_en_tl,
title_en .initial:n = {Example Title},
subtitle_en .tl_set:N = \l_aust_th_subtitle_en_tl,
subtitle_en .initial:n = {Example Subtitle},
name_en .tl_set:N = \l_aust_th_name_en_tl,
name_en .initial:n = {Joe},
mentor_en .tl_set:N = \l_aust_th_mentor_en_tl,
mentor_en .initial:n = {Joe},
school_en .tl_set:N = \l_aust_th_school_en_tl,
school_en .initial:n = {Example School},
university .tl_set:N = \l_aust_th_university_tl,
university .initial:n = {},
}
%
\cs_new_protected:Npn \aust_thesis_zh_cover_internal:
{
\begin{titlepage}
\austnopagenum
\centering
\renewcommand{\arraystretch}{1.2}
{
\zihao{5}
\begin{tabular}{l@{\quad}p{12em}l@{\quad}p{12em}}
& \tl_use:N \l_aust_th_clcindex_tl &
& \tl_use:N \l_aust_th_index_tl \\
\cline{2-2} \cline{4-4}
& \tl_use:N \l_aust_th_catindex_tl &
\hspace{2em} & \tl_use:N \l_aust_th_secret_tl \\
\cline{2-2} \cline{4-4}
\end{tabular}
}
\par
\begin{figure}[!h]
\centering
\includegraphics{aust-logo-banner.jpg}
\end{figure}
\vspace{0.5em}
{\kaishu \zihao{1} \textbf{\tl_use:N \l_aust_th_level_tl} \par }
\vfill
{
\songti \zihao{-2}
\tl_use:N \l_aust_th_title_tl \par
\textemdash \textemdash \hspace{0.5em} \tl_use:N \l_aust_th_subtitle_tl \par
}
\vfill
{
\songti{} \zihao{4}
\begin{tabular}{l@{\quad}p{11.5em}}
\heiti{} & \tl_use:N \l_aust_th_name_tl \\
\cline{2-2}
\heiti{} & \tl_use:N \l_aust_th_major_tl \\
\cline{2-2}
\heiti{} & \tl_use:N \l_aust_th_direction_tl \\
\cline{2-2}
\heiti{} & \tl_use:N \l_aust_th_mentor_tl \\
\cline{2-2}
\heiti{} & \tl_use:N \l_aust_th_mentor_institution_tl \\
\cline{2-2}
\heiti{} & \tl_use:N \l_aust_th_committee_chairman_tl \\
\cline{2-2}
\heiti{} & \tl_use:N \l_aust_th_defence_date_tl \\
% \cline{2-2}
\end{tabular}
}
\vfill
{
\heiti \zihao{4}
\par
\tl_use:N \l_aust_th_date_tl \par
}
\end{titlepage}
}
\cs_new_protected:Npn \aust_thesis_en_cover_internal:
{
\begin{titlepage}
\austnopagenum
\centering
\renewcommand{\arraystretch}{1.2}
{
2026-06-24 23:13:58 +08:00
\songti \zihao{4} A~Dissertation~in~ \uline{\tl_use:N \l_aust_th_major_en_tl} \par
2026-06-24 23:10:46 +08:00
}
\vspace{2cm}
{
\songti \zihao{-2}
\tl_use:N \l_aust_th_title_en_tl \par
\textemdash \textemdash \hspace{0.5em} \tl_use:N \l_aust_th_subtitle_en_tl \par
}
\vfill
{
\songti \zihao{-3}
Candidate:~ \tl_use:N \l_aust_th_name_en_tl \par
Supervisor:~ \tl_use:N \l_aust_th_mentor_en_tl \par
\tl_use:N \l_aust_th_school_en_tl \par
Anhui~University~of~Science~and~Technology \par
No.~168,~Taifeng~Street,~Huainan,~232001,~Anhui,~P.~R.~China \par
}
\vfill
\end{titlepage}
}
\cs_new_protected:Npn \aust_thesis_declaration_internal:
{
\begin{titlepage}
\austnopagenum
\renewcommand{\arraystretch}{1.2}
{
\centering
\heiti \zihao{-2}
\hspace{1em}\hspace{1em}\hspace{1em}\hspace{1em} \par
}
\vspace{1cm}
{
\fangsong \zihao{4}
2026-06-24 23:13:58 +08:00
\uline{\tl_use:N \l_aust_th_university_tl}使
2026-06-24 23:10:46 +08:00
\par
}
\vspace{1cm}
{
\flushright
\fangsong \zihao{4}
2026-06-24 23:13:58 +08:00
\uline{\hspace{6em}}
2026-06-24 23:10:46 +08:00
\hspace{0.5em}
2026-06-24 23:13:58 +08:00
\uline{\hspace{2em}}\uline{\hspace{1em}}\uline{\hspace{1em}} \par
2026-06-24 23:10:46 +08:00
}
\vfill
{
\centering
\heiti \zihao{-2}
使 \par
}
\vspace{1cm}
{
\fangsong \zihao{4}
2026-06-24 23:13:58 +08:00
\uline{\tl_use:N \l_aust_th_university_tl}使\uline{\tl_use:N \l_aust_th_university_tl}
2026-06-24 23:10:46 +08:00
2026-06-24 23:13:58 +08:00
\uline{\tl_use:N \l_aust_th_university_tl}
2026-06-24 23:10:46 +08:00
\par
}
\vspace{1cm}
{
\flushright
\fangsong \zihao{4}
2026-06-24 23:13:58 +08:00
\uline{\hspace{6em}}
2026-06-24 23:10:46 +08:00
\hspace{0.5em}
2026-06-24 23:13:58 +08:00
\uline{\hspace{2em}}\uline{\hspace{1em}}\uline{\hspace{1em}} \par
2026-06-24 23:10:46 +08:00
2026-06-24 23:13:58 +08:00
\hspace{4em}\uline{\hspace{6em}}
2026-06-24 23:10:46 +08:00
\hspace{0.5em}
2026-06-24 23:13:58 +08:00
\uline{\hspace{2em}}\uline{\hspace{1em}}\uline{\hspace{1em}} \par
2026-06-24 23:10:46 +08:00
}
\end{titlepage}
}
%
\NewDocumentCommand \austthesissetup { m }
{ \keys_set:nn { aust/thesis } { #1 } }
% ()
\NewDocumentCommand \austthesiscover { O{} }
{
\group_begin:
\keys_set:nn { aust/thesis } { #1 }
\aust_thesis_zh_cover_internal:
\aust_thesis_en_cover_internal:
\group_end:
}
\NewDocumentCommand \austthesisdeclaration { O{} }
{
\group_begin:
\keys_set:nn { aust/thesis } { #1 }
\aust_thesis_declaration_internal:
\group_end:
}
% endregion
2026-05-05 13:26:04 +08:00
\ExplSyntaxOff
2026-05-05 12:21:32 +08:00
% endregion