├── 正文.pdf ├── zjgsu.png ├── README.md ├── LICENSE ├── 正文.tex └── zjgsuthesis.cls /正文.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zewei-Zhang/zjgsuthesis/main/正文.pdf -------------------------------------------------------------------------------- /zjgsu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zewei-Zhang/zjgsuthesis/main/zjgsu.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 浙江工商大学本科毕业论文LaTeX模板 2 | 3 | ## 简介 4 | 5 | 一种用于浙江工商大学本科生毕业论文的LaTeX模板。该模板格式参照信电学院2022届毕业设计word模板。 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 zewei-Zhang 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /正文.tex: -------------------------------------------------------------------------------- 1 | \documentclass{zjgsuthesis} 2 | 3 | \begin{document} 4 | 5 | \newtitle{浙江工商大学本科毕业论文(设计)题目} 6 | 7 | \initdoc 8 | 9 | \zhaiyao{摘要内容。 10 | }{关键词1;关键词2} 11 | 12 | 13 | 14 | \newabstract{The Subject of Undergraduate Graduation Project (Thesis) of ZJGSU}{The text of the abstract.}{ 15 | Key word1, key word2 16 | } 17 | 18 | 19 | \directory 20 | \startdoc 21 | 22 | 23 | \clearpage 24 | ~ 25 | \vspace{-7mm} 26 | \section{引言} 27 | 该模板参照浙江工商大学信电学院2022本科生毕业论文word模板设计(\href{https://github.com/zewei-Zhang/zjgsuthesis}{https://github.com/zewei-Zhang/zjgsuthesis})。 28 | 29 | 30 | \subsection{第一节} 31 | \subsubsection{子节} 32 | 33 | 34 | \clearpage 35 | ~ 36 | \vspace{-7mm} 37 | \section{样例} 38 | 本章给出一些基本样例。 39 | 40 | 41 | \subsection{引用} 42 | 引用方式1:\cite{sample},引用方式2:\textsuperscript{\cite{sample}} 43 | 44 | 45 | \subsection{图片} 46 | \begin{figure}[htbp] 47 | \centering 48 | \includegraphics[width=0.8\textwidth]{zjgsu.png} 49 | \caption{浙江工商大学} 50 | \label{zjgsu} 51 | \end{figure} 52 | 53 | 54 | \subsection{行间式} 55 | \begin{equation} 56 | H(X)=-\sum_{x}p(x)\log_2p(x) 57 | \end{equation} 58 | 59 | \clearpage 60 | \begin{thebibliography}{30} 61 | \setref 62 | \bibitem{sample} 这不是一篇参考文献。 63 | \end{thebibliography} 64 | 65 | 66 | 67 | \initappandices 68 | \newappendix{附录A标题} 69 | 附录A内容。 70 | 71 | \newappendix{附录B标题} 72 | 附录B内容。 73 | 74 | \acknowledgment 75 | 感谢使用。:) 76 | 77 | \end{document} -------------------------------------------------------------------------------- /zjgsuthesis.cls: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2 | % Zhejiang Gongshang University Undergraduate Thesis/Design Template. 3 | % Author: Zewei Zhang 4 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 | \NeedsTeXFormat{LaTeX2e} 6 | \ProvidesClass{zjgsuthesis}[2022/04/26 For ZJGSU thesis.] 7 | 8 | \LoadClass[a4paper, UTF8]{article} 9 | 10 | \RequirePackage[left=25mm, right=25mm, top=35mm, bottom=25mm]{geometry} 11 | \RequirePackage{amsmath,amssymb} 12 | \RequirePackage{enumerate} 13 | \RequirePackage{tabularx} 14 | \RequirePackage{fontspec} 15 | \RequirePackage{titletoc} 16 | \RequirePackage{titlesec} 17 | \RequirePackage{indentfirst} 18 | \RequirePackage[CJKmath=true]{xeCJK} 19 | \RequirePackage{fancyhdr} 20 | \RequirePackage{fancybox} 21 | \RequirePackage{graphicx} 22 | \RequirePackage{caption} 23 | \RequirePackage{chngcntr} 24 | \RequirePackage{appendix} 25 | \RequirePackage{array} 26 | \RequirePackage{hyperref} 27 | 28 | 29 | \CJKfamily{宋体} 30 | 31 | %设置章节格式和目录中的显示 32 | %\titleformat{command}[shape]{format}{label}{sep}{before}[after] 33 | \titleformat{\section} 34 | {\centering\CJKfamily{黑体}\fontsize{15pt}{22.5pt}\bfseries} 35 | {第\arabic{section} 章} 36 | {1em} 37 | {} 38 | 39 | \titleformat{\subsection} 40 | {\CJKfamily{黑体}\fontsize{14pt}{21pt}\bfseries} 41 | {\arabic{section}.\arabic{subsection}} 42 | {1em} 43 | {} 44 | 45 | \titleformat{\subsubsection} 46 | {\CJKfamily{黑体}\fontsize{12pt}{18pt}\bfseries} 47 | {\arabic{section}.\arabic{subsection}.\arabic{subsubsection}} 48 | {1em} 49 | {} 50 | 51 | \titlecontents{section} 52 | [0em] %左间距 53 | {\fontsize{12pt}{15pt}} %有序号节字体格式 54 | {\thecontentslabel\hspace{1em}} %序号,内容格式和距离 55 | {\fontsize{12pt}{15pt}} %无序号字体格式 56 | {\titlerule*{.}\contentspage} %中间线 57 | [\vspace{0em}] %section上下间距 58 | 59 | \titlecontents{subsection} 60 | [2em] 61 | {\fontsize{12pt}{15pt}} 62 | {\thecontentslabel\hspace{1em}} 63 | {} 64 | {\titlerule*{.}\contentspage} 65 | [\vspace{0em}] 66 | 67 | \titlecontents{subsubsection} 68 | [4em] 69 | {\fontsize{12pt}{15pt}} 70 | {\thecontentslabel\hspace{1em}} 71 | {} 72 | {\titlerule*{.}\contentspage} 73 | [\vspace{0em}] 74 | 75 | 76 | %重定义部分命令 77 | \renewcommand\contentsname{\CJKfamily{黑体}\fontsize{15pt}{18.75pt}目\hspace{2em}录} 78 | \renewcommand\refname{\centering \CJKfamily{黑体}\fontsize{15pt}{22.5pt}\selectfont 参~考~文~献} 79 | \renewcommand\arraystretch{1.25} 80 | 81 | %设置图和表的标题 82 | % https://mirror-hk.koddos.net/CTAN/macros/latex/contrib/caption/caption.pdf 83 | \captionsetup[figure]{format=plain,name={图},labelsep=quad,font=small} 84 | \captionsetup[table]{format=plain,name={表},labelsep=quad,font=small} 85 | 86 | 87 | %图,表和行间式根据当前章进行编号 88 | \counterwithin{figure}{section} 89 | \counterwithin{table}{section} 90 | \numberwithin{equation}{section} 91 | 92 | 93 | %页眉与页脚设置 94 | \fancyhead[L]{\begin{minipage}[c]{0.06\textwidth} 95 | \includegraphics[height=13mm]{zjgsu.png} 96 | \end{minipage} 97 | } 98 | \fancyhead[R]{\begin{minipage}[c]{0.2\textwidth} 99 | \fontsize{9pt}{11.25pt}\selectfont 100 | 毕业论文:正文 %可修改此处“正文”为“开题报告”,“文献综述”和“外文翻译” 101 | \end{minipage} 102 | } 103 | \fancyfoot[C]{\fontsize{9pt}{9pt}\selectfont -\thepage- } 104 | \setlength{\voffset}{-10mm} 105 | \setlength{\footskip}{5mm} 106 | \setlength{\topmargin}{0mm} 107 | \setlength{\headsep}{12mm} 108 | \renewcommand{\headrulewidth}{0.2mm} 109 | \setlength{\parindent}{24pt} 110 | \pagestyle{fancy} 111 | 112 | 113 | \title{\vspace{6cm}{\fontsize{36pt}{45pt}\selectfont\textbf{毕业论文(设计)正文}}} 114 | \date{} 115 | 116 | 117 | %文档初始化 118 | \newcommand{\initdoc}{ 119 | \newpage 120 | \pagenumbering{Roman} 121 | \setcounter{page}{1} 122 | \fontsize{12pt}{21pt}\selectfont 123 | } 124 | 125 | 126 | %设置标题 127 | \newcommand{\newtitle}[1]{ 128 | \maketitle 129 | \begin{center} 130 | \vspace{-2em}\CJKfamily{黑体}\fontsize{16pt}{20pt}\selectfont #1 131 | \end{center} 132 | \thispagestyle{empty} 133 | } 134 | 135 | 136 | %中文摘要 137 | \newcommand{\zhaiyao}[2]{ 138 | \clearpage 139 | ~ 140 | \vspace{-7mm} 141 | \section*{摘\hspace{2em}要} 142 | \addcontentsline{toc}{section}{摘\hspace{2em}要} 143 | 144 | #1 145 | 146 | \vspace{16.5pt} 147 | \noindent\textbf{关键词:}#2 148 | } 149 | 150 | 151 | %abstract 152 | \newcommand{\newabstract}[3]{ 153 | \clearpage 154 | ~ 155 | \vspace{-7mm} 156 | { 157 | \fontspec{Times New Roman}\fontsize{12pt}{21pt}\selectfont 158 | \begin{center} 159 | \fontsize{15pt}{18.75pt}\selectfont 160 | \textbf{#1} 161 | \end{center} 162 | \section*{Abstract} 163 | \addcontentsline{toc}{section}{Abstract} 164 | 165 | \vspace{2mm} 166 | #2 167 | 168 | \vspace{16.5pt} 169 | \noindent\textbf{Key Words:}#3 170 | } 171 | } 172 | 173 | 174 | %生成目录 175 | \newcommand{\directory}{ 176 | \newpage 177 | ~ 178 | \vspace{-7mm} 179 | \begin{center} 180 | \tableofcontents 181 | \end{center} 182 | } 183 | 184 | 185 | %重置页码编号 186 | \newcommand{\startdoc}{ 187 | \newpage 188 | \pagenumbering{arabic} 189 | \setcounter{page}{1} 190 | } 191 | 192 | 193 | %设置参考文献格式 194 | \newcommand{\setref}{ 195 | \fontsize{10.5pt}{13.125pt}\selectfont 196 | \addtolength{\itemsep}{-0.5 em} 197 | \addcontentsline{toc}{section}{参~考~文~献} 198 | } 199 | 200 | 201 | %初始化附录环境 202 | \newcommand{\initappandices}{ 203 | \newcounter{counterA} 204 | \setcounter{counterA}{0} 205 | \renewcommand{\thetable}{\Alph{counterA}.\arabic{table}} 206 | \renewcommand{\thefigure}{\Alph{counterA}.\arabic{figure}} 207 | \renewcommand{\theequation}{\Alph{counterA}.\arabic{equation}} 208 | } 209 | 210 | 211 | %添加新的附录,参数为附录名 212 | \newcommand{\newappendix}[1]{ 213 | \clearpage 214 | ~ 215 | \vspace{-7mm} 216 | \stepcounter{counterA} 217 | \setcounter{table}{0} 218 | \setcounter{figure}{0} 219 | \setcounter{equation}{0} 220 | \section*{附录\Alph{counterA}~~#1} 221 | \addcontentsline{toc}{section}{附录\Alph{counterA}~~#1} 222 | } 223 | 224 | 225 | %添加致谢 226 | \newcommand{\acknowledgment}{ 227 | \clearpage 228 | ~ 229 | \vspace{-7mm} 230 | \section*{致\hspace{2em}谢} 231 | \addcontentsline{toc}{section}{致\hspace{2em}谢} 232 | } 233 | 234 | 235 | 236 | %自定义数学符号或运算符 237 | \DeclareMathOperator\Supp{Supp} 238 | \DeclareMathOperator\mean{mean} 239 | \DeclareMathOperator\std{std} 240 | \DeclareMathOperator\poly{poly} 241 | \DeclareMathOperator\polylog{polylog} 242 | 243 | 244 | --------------------------------------------------------------------------------