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

191 lines
6.0 KiB
OpenEdge ABL
Raw Normal View History

2026-04-27 14:59:21 +08:00
%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{austthesis}[2026/04/26 AUST Thesis Template]
% 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: 西
% 西
\usepackage{fontspec}
\setmainfont{Times New Roman}
%
\songti{}
%
\zihao{-4}
% endregion
% region:
\RequirePackage{fancyhdr}
% 使
\pagestyle{fancy}
\fancyhf{}
% 1.6cm`2.5cm + voffset`voffset-0.9cm-9mm
\setlength{\voffset}{-9mm}
%
\fancyhead[C]{\zihao{5} \songti \leftmark}
% 线
\renewcommand{\headrulewidth}{0.1mm}
% 1.5cm` - footskip`footskip1cm10mm
\setlength{\footskip}{10mm}
%
\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}{}
% 1-1
2026-05-05 12:21:32 +08:00
% https://www.latexstudio.net/archives/51638.html
2026-04-27 14:59:21 +08:00
\captionsetup[figure]{labelformat=simple, labelsep=space}
\renewcommand{\thefigure}{\arabic{section}-\arabic{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:
% TODO:
% gbt7714-numerical
% gbt7714-numeric
\usepackage{gbt7714}
\bibliographystyle{gbt7714-numerical}
% endregion
2026-05-05 12:21:32 +08:00
% region:
2026-05-05 13:26:04 +08:00
\usepackage{xparse}
\usepackage{ulem}
\ExplSyntaxOn
%
\keys_define:nn { aust/report }
{
semester .tl_set:N = \l_aust_semester_tl,
semester .initial:n = {2025-2026~},
level .tl_set:N = \l_aust_level_tl,
level .initial:n = {},
course .tl_set:N = \l_aust_course_tl,
course .initial:n = {},
title .tl_set:N = \l_aust_title_tl,
title .initial:n = {},
school .tl_set:N = \l_aust_school_tl,
school .initial:n = {},
major .tl_set:N = \l_aust_major_tl,
major .initial:n = {},
sid .tl_set:N = \l_aust_sid_tl,
sid .initial:n = {1945000000},
name .tl_set:N = \l_aust_name_tl,
name .initial:n = {},
lecturer .tl_set:N = \l_aust_lecturer_tl,
lecturer .initial:n = {},
date .tl_set:N = \l_aust_date_tl,
date .initial:n = {19450101},
2026-05-05 12:21:32 +08:00
}
2026-05-05 13:26:04 +08:00
% ()
\cs_new_protected:Npn \aust_report_cover_internal:
{
\begin{titlepage}
\austnopagenum
\centering
\renewcommand{\arraystretch}{1.6}
\begin{figure}[htbp]
\centering
\includegraphics{aust-report-banner.jpg}
\end{figure}
\vspace{0.4cm}
{\heiti \zihao{2} \textbf{\tl_use:N \l_aust_semester_tl} \par }
\vspace{0.4cm}
{\heiti \zihao{2} \textbf{\tl_use:N \l_aust_level_tl} \par }
\vspace{0.4cm}
{\songti \zihao{1} \textbf{\tl_use:N \l_aust_course_tl} \par }
\vfill
{
\kaishu{} \zihao{3}
\begin{tabular}{r@{\quad}p{11.5em}}
\hspace{2em} & \tl_use:N \l_aust_title_tl \\
\cline{2-2}
\hspace{2em} & \tl_use:N \l_aust_school_tl \\
\cline{2-2}
\hspace{2em} & \tl_use:N \l_aust_major_tl \\
\cline{2-2}
\hspace{2em} & \tl_use:N \l_aust_sid_tl \\
\cline{2-2}
\hspace{2em} & \tl_use:N \l_aust_name_tl \\
\cline{2-2}
& \tl_use:N \l_aust_lecturer_tl \\
\cline{2-2}
\end{tabular}
}
\vfill
{\kaishu \zihao{3} \tl_use:N \l_aust_date_tl \par }
\end{titlepage}
2026-05-05 12:21:32 +08:00
}
2026-05-05 13:26:04 +08:00
%
\NewDocumentCommand \austreportsetup { m }
{ \keys_set:nn { aust/report } { #1 } }
% (xparse )
% AUST
\NewDocumentCommand \austreportcover { O{} }
{
\group_begin:
\keys_set:nn { aust/report } { #1 }
\aust_report_cover_internal:
\group_end:
}
% AUST
\ExplSyntaxOff
2026-05-05 12:21:32 +08:00
% endregion