cug-latex-template/SYSUReport.cls
2024-01-17 18:50:15 +08:00

162 lines
4.7 KiB
TeX
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SYSU 课程论文模板
% 作者NorthSecond
% License: Creative Commons CC BY 4.0
% GitHub: https://github.com/NorthSecond/SYSU_Latex_Template
% Overleaf:
% 在UCAS_Latex_Template基础上修改而来 原作者jweihe
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%UCAS课程论文模板
%%作者jweihe
%%LicenseCreative Commons CC BY 4.0
%%GitHubhttps://github.com/jweihe/UCAS_Latex_Template
%%Overleafhttps://www.overleaf.com/latex/templates/zhong-guo-ke-xue-yuan-da-xue-ke-cheng-lun-wen-mo-ban/nphpxhhqvnds
%%最后更改于2023/06/05
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%在"北京大学课程论文模板"基础上修改而来
%%原作者Shawn Wang
%%Overleaf地址https://www.overleaf.com/latex/templates/bei-jing-da-xue-ke-cheng-lun-wen-mo-ban/yntmqcktrzfh
\ProvidesClass{SYSUReport}
\LoadClass[12pt,hyperref,a4paper,UTF8]{ctexart}
%%页边距
\RequirePackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.50cm]{geometry}
%%一些必要的宏包
\RequirePackage[unicode=true,colorlinks,urlcolor=blue,linkcolor=blue,bookmarksnumbered=blue]{hyperref}
\RequirePackage{latexsym,amssymb,amsmath,amsbsy,amsopn,amstext,amsthm,amsxtra,color,bm,calc,ifpdf}
\RequirePackage{graphicx}
\RequirePackage{enumerate}
\RequirePackage{fancyhdr}
\RequirePackage{listings}
\RequirePackage{multirow}
\RequirePackage{makeidx}
\RequirePackage{xcolor}
\RequirePackage{fontspec}
\RequirePackage{subfigure}
\PassOptionsToPackage{hyphens}{url}
\RequirePackage{hyperref}
\RequirePackage{booktabs}
\RequirePackage{tcolorbox}
\definecolor{myteal}{cmyk}{1,0,1,0.60} % 主题色改为中大绿
%% 更改摘要二字的样式
\renewcommand{\abstractname}{\textbf{\large {\quad}}}
%可固定下划线长度
\makeatletter
\newcommand\dlmu[2][4cm]{\hskip1pt\underline{\hb@xt@ #1{\hss#2\hss}}\hskip3pt}
\makeatother
% %更改主题
\hypersetup{
colorlinks=true,
linkcolor=black,
filecolor=blue,
urlcolor=magenta,
citecolor=orange,
linktoc=all,
}
%%对一些autoref的中文引用名作修改
\def\equationautorefname{}
\def\footnoteautorefname{脚注}
\def\itemautorefname{}
\def\figureautorefname{}
\def\tableautorefname{}
\def\partautorefname{}
\def\appendixautorefname{附录}
\def\chapterautorefname{}
\def\sectionautorefname{}
\def\subsectionautorefname{小小节}
\def\subsubsectionautorefname{subsubsection}
\def\paragraphautorefname{段落}
\def\subparagraphautorefname{子段落}
\def\FancyVerbLineautorefname{}
\def\theoremautorefname{定理}
\newtheorem{Theorem}{定理}[section]
\newtheorem{Lemma}[Theorem]{引理}
\newtheorem{Corollary}[Theorem]{推论}
\newtheorem{Proposition}[Theorem]{命题}
\newtheorem{Definition}[Theorem]{定义}
\newtheorem{Example}[Theorem]{}
%%文本框设置
\newcommand{\tbox}[1]{
\begin{center}
\begin{tcolorbox}[colback=gray!10,%gray background
colframe=black,% black frame colour
width=8cm,% Use 8cm total width,
arc=1mm, auto outer arc,
boxrule=0.5pt,
]
{#1}
\end{tcolorbox}
\end{center}
}
\newcommand\headl[1]{\def\headl{#1}}
\newcommand\headc[1]{\def\headc{#1}}
\newcommand\headr[1]{\def\headr{#1}}
\newcommand\lessonTitle[1]{\def\lessonTitle{#1}}
\newcommand\reportTitle[1]{\def\reportTitle{#1}}
\newcommand\stuname[1]{\def\stuname{#1}}
\newcommand\stuid[1]{\def\stuid{#1}}
\newcommand\inst[1]{\def\inst{#1}}
\newcommand\major[1]{\def\major{#1}}
\renewcommand\date[1]{\def\date{#1}}
%%页眉设置
\pagestyle{fancy}
\fancyhead[L]{\fangsong {\headl}}
\fancyhead[C]{\fangsong {\headc}}
\fancyhead[R]{\fangsong {\headr}}
%% 去掉页眉横线
\renewcommand{\headrulewidth}{0pt}
%% 常用图片文件夹路径
\graphicspath{{figures/}{figure/}{pictures/}{picture/}{pic/}{pics/}{image/}{images/}}
%%在这里可更改封面logo
\newcommand{\cover}{
%%封面校名logo图片都在figures文件夹里
\begin{center}
\begin{figure}
\centering
\vspace{2cm}
\includegraphics[width=0.6\textwidth]{cug.png}
\end{figure}
\vspace*{\fill}
\heiti \Huge \textbf{{\lessonTitle}} \par
\vspace{1cm}
\heiti \Large {\underline{\reportTitle}} \par
\vspace{3cm}
\vspace{0.5cm}
\kaishu\Large\ \ \dlmu[9cm]{\stuname} \qquad \\ %姓名
\vspace{0.5cm}
\kaishu\Large\ \ \dlmu[9cm]{\stuid} \qquad \\ %学号
\vspace{0.5cm}
\kaishu\Large\ \ \dlmu[9cm]{\inst} \qquad \\ %院所
\vspace{0.5cm}
\kaishu\Large\ \ \dlmu[9cm]{\major} %专业
\vspace*{\fill}
\large \date
\end{center}
}