├── main.pdf ├── ControlSheet.pdf ├── figures ├── cat.pdf └── gongzhonghao.jpg ├── apmcmthesis-guide.pdf ├── README.md ├── ControlSheet.tex ├── apmcmthesis.cfg ├── main.tex └── apmcmthesis.cls /main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/APMCMThesis/HEAD/main.pdf -------------------------------------------------------------------------------- /ControlSheet.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/APMCMThesis/HEAD/ControlSheet.pdf -------------------------------------------------------------------------------- /figures/cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/APMCMThesis/HEAD/figures/cat.pdf -------------------------------------------------------------------------------- /apmcmthesis-guide.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/APMCMThesis/HEAD/apmcmthesis-guide.pdf -------------------------------------------------------------------------------- /figures/gongzhonghao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/APMCMThesis/HEAD/figures/gongzhonghao.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # APMCMThesis 2 | 亚太区数学建模 LaTeX 模板 2022 更新 3 | 4 | 5 | 旨在让大家专注于 6 | 论文的内容写作, 而不用花费过多精力在格式的定制和调整上. 本手册是相应的参考, 其 7 | 中提供了一些环境和命令可以让模板的使用更为方便. 同时需要注意, 使用者需要有一 8 | 定的 `LaTeX` 的使用经验, 至少要会使用 `ctex` 宏包的一些功能, 比如调节字距或修改字体 9 | 大小等等. 10 | 11 | 12 | 关注我们的微信公众号: 13 | 14 | 15 | -------------------------------------------------------------------------------- /ControlSheet.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | %% 本模板推荐以下方式编译: 3 | %% 1. PDFLaTeX[推荐] 4 | %% 2. xelatex [含中文推荐] 5 | %% 注意: 6 | %%  1. 文件默认的编码为 UTF-8 对于windows,请选用支持UTF-8编码的编辑器。 7 | %% 2. 若是模板有什么问题,请及时与我们取得联系,Email:latexstudio@qq.com。 8 | %% 3. 可以到 https://ask.latexstudio.net 提问 9 | %% 4. 请安装 最新版本的 TeXLive 地址: 10 | %% http://mirrors.ctan.org/systems/texlive/Images/texlive.iso 11 | 12 | \documentclass{apmcmthesis} 13 | 14 | %%%%%%%%%%%%填写相关信息%%%%%%%%%%%%%%%%%%%%%%%%%% 15 | \tihao{A} %选题 16 | \baominghao{22XXXXX} %报名号 17 | \schoolname{XXX University} 18 | \membera{First Member} %队员1 19 | \memberb{Second Member} %队员2 20 | \memberc{Third Member} %队员3 21 | \supervisor{Supervisor} %教练 22 | \filldate{November 28, 2022} 23 | \begin{document} 24 | 25 | \makecontrolsheet 26 | 27 | 28 | 29 | \end{document} -------------------------------------------------------------------------------- /apmcmthesis.cfg: -------------------------------------------------------------------------------- 1 | %% 2 | %% 2019年第九届APMCM亚太地区大学生数学建模竞赛论文LaTeX模版的配置文件 3 | %% 4 | %% apmcmthesis.cfg 5 | %% V1.0 6 | %% 2019/11/15 7 | %% by LaTeXStudio.net 8 | %% see http://www.latexstudio.net/ 9 | %% for current contact information. 10 | 11 | \ProvidesFile{apmcmthesis.cfg}[2019/11/05 v1.0 apmcmthesis configuration file] 12 | %% 13 | %% 14 | %% Initialization 15 | %%%数学定理相关的常量 16 | \newcommand*{\tzmcm@cap@definition}{Definition} 17 | \newcommand*{\tzmcm@cap@theorem}{Theorem} 18 | \newcommand*{\tzmcm@cap@lemma}{Lemma} 19 | \newcommand*{\tzmcm@cap@corollary}{Corollary} 20 | \newcommand*{\tzmcm@cap@assumption}{Assumption} 21 | \newcommand*{\tzmcm@cap@conjecture}{Conjecture} 22 | \newcommand*{\tzmcm@cap@axiom}{Axiom} 23 | \newcommand*{\tzmcm@cap@principle}{Principle} 24 | \newcommand*{\tzmcm@cap@problem}{Problem} 25 | \newcommand*{\tzmcm@cap@example}{Example} 26 | \newcommand*{\tzmcm@cap@proof}{Proof} 27 | \newcommand*{\tzmcm@cap@solution}{Solution} 28 | %%% 中文标题名称 29 | \newcommand*{\tzmcm@cap@refname}{References} 30 | \newcommand*{\tzmcm@cap@indexname}{Index} 31 | \newcommand*{\tzmcm@cap@figurename}{Figure} 32 | \newcommand*{\tzmcm@cap@appendixname}{Appendix} 33 | \newcommand*{\tzmcm@cap@tablename}{Table} 34 | \newcommand*{\tzmcm@cap@contentsname}{Contents} 35 | %%% 中文关键字 36 | \newcommand*{\tzmcm@cap@keywordsname}{Keywords} 37 | 38 | \newcommand\tzmcm@commit@string@contents{\quotation 39 | \textbf{Each team member must sign the statement below:} 40 | 41 | (Failure to obtain signatures from each team member will result in disqualification of the 42 | entire team.) 43 | 44 | 45 | Each of us hereby testifies that our team abided by all of the contest's rules and 46 | did not consult with anyone who was not on this team in developing the enclosed 47 | solution paper. Our submission and all rights to its publication become the property of 48 | APMCM. APMCM may use, edit, excerpt, and publish this submission for 49 | promotional use or any other purpose, including placing it online, distributing it 50 | electronically or otherwise, without compensation of any kind. APMCM reserves the 51 | right to use in materials relating to this contest, the names of the team members, their 52 | advisor(s), and their affiliations, without further notification, permission, or 53 | compensation. Team members assert that All images, figures, photographs, tables, and 54 | drawings in their submission were either created by the team or else, if reproduced 55 | from another source, the submission cites a specific reference for each at its location 56 | in the submission. All direct quotations in the submission are enclosed in quotation 57 | marks or otherwise identified as such, with a specific reference cited for each at its 58 | location in the submission. 59 | \endquotation 60 | } 61 | \newcommand*\tzmcm@commit@string@problemnum{Problem chosen is (A, B or C) : } 62 | \newcommand*\tzmcm@commit@string@signupnum{Team control number is (team number) : } 63 | \newcommand*\tzmcm@commit@string@schoolname{School (Please fill in the full name) : } 64 | \newcommand*\tzmcm@commit@string@membername{Member name (Handwriting signature) : } 65 | \newcommand*\tzmcm@commit@string@supervisorname{Team adviser name : } 66 | 67 | \newcommand*\tzmcm@numberpage@string@titlea{\the\year\ APMCM Control Sheet} 68 | 69 | \endinput 70 | %% 71 | %% End of file `tzmcmthesis.cfg'. 72 | -------------------------------------------------------------------------------- /main.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | %% 本模板推荐以下方式编译: 3 | %% 1. PDFLaTeX[推荐] 4 | %% 2. xelatex [含中文推荐] 5 | %% 注意: 6 | %%  1. 文件默认的编码为 UTF-8 对于windows,请选用支持UTF-8编码的编辑器。 7 | %% 2. 若是模板有什么问题,请及时与我们取得联系,Email:latexstudio@qq.com。 8 | %% 3. 可以到 https://ask.latexstudio.net 提问 9 | %% 4. 请安装 最新版本的 TeXLive 地址: 10 | %% http://mirrors.ctan.org/systems/texlive/Images/texlive.iso 11 | 12 | \documentclass{apmcmthesis} 13 | 14 | \usepackage{url} 15 | 16 | %%%%%%%%%%%%填写相关信息%%%%%%%%%%%%%%%%%%%%%%%%%% 17 | \tihao{A} %选题 18 | \baominghao{22XXXXX} %参赛编号 19 | \begin{document} 20 | 21 | \pagestyle{frontmatterstyle} 22 | 23 | \begin{abstract} 24 | \verb|apmcmthesis| \LaTeX{} template is designed by \url{https://www.latexstudio.net} for \url{http://www.apmcm.org}. The template is designed to let everyone focus on the content writing of the paper, without spending too much effort on the customization and adjustment of the format. 25 | 26 | Note that users need to have some experience with \LaTeX{}, at least some of the features of common macro packages, such as references, math formulas, image usage, list environment, etc. Templates have added commonly used macros. Package, no additional user added. 27 | 28 | This template is located on \url{https://github.com/latexstudio/APMCMThesis}. You can update files from the repository. 29 | 30 | 31 | \keywords{Keywords1\quad Keywords2\quad Keywords3} 32 | \end{abstract} 33 | 34 | 35 | 36 | \newpage 37 | %目录 38 | \tableofcontents 39 | 40 | 41 | \newpage 42 | \pagestyle{mainmatterstyle} 43 | \setcounter{page}{1} 44 | \section{Introduction} 45 | In order to indicate the origin of problems, the following background is worth mentioning. 46 | \subsection{} 47 | 48 | 49 | \subsection{} 50 | 51 | 52 | 53 | \subsection{} 54 | 55 | 56 | \section{The Description of the Problem} 57 | \subsection{How do we approximate the whole course of ?} 58 | 59 | \begin{itemize} 60 | \item 61 | \item 62 | \item 63 | \end{itemize} 64 | 65 | 66 | \subsection{How do we define the optimal configuration?} 67 | 1) From the perspective of :\par 68 | 2) From the perspective of the :\par 69 | 3) Compromise: 70 | 71 | \subsection{The local optimization and the overall optimization} 72 | 73 | 74 | \begin{itemize} 75 | \item 76 | \item 77 | \item Virtually: 78 | \end{itemize} 79 | 80 | 81 | \subsection{The differences in weights and sizes of} 82 | 83 | 84 | \subsection{What if there is no data available?} 85 | 86 | 87 | 88 | 89 | 90 | 91 | \section{Models} 92 | \subsection{Basic Model} 93 | 94 | 95 | \subsubsection{Terms, Definitions and Symbols} 96 | The signs and definitions are mostly generated from queuing theory. 97 | 98 | 99 | \subsubsection{Assumptions} 100 | 101 | 102 | \subsubsection{The Foundation of Model} 103 | 1) The utility function 104 | 105 | \begin{itemize} 106 | \item The cost of : 107 | \item The loss of : 108 | \item The weight of each aspect: 109 | \item Compromise: 110 | \end{itemize} 111 | 112 | 113 | 114 | \begin{figure}[!ht] 115 | \centering 116 | \includegraphics[width=3cm]{cat} \quad \includegraphics[width=5cm]{gongzhonghao} 117 | \caption{\CJK{UTF8}{gbsn}{关注我们公众号,学习更多知识}}\label{cat1} 118 | \end{figure} 119 | 120 | 121 | 122 | 3) The overall optimization and the local optimization 123 | 124 | \begin{itemize} 125 | \item The overall optimization: 126 | \item The local optimization: 127 | \item The optimal number of : 128 | \end{itemize} 129 | 130 | 131 | 132 | \subsubsection{Solution and Result} 133 | 1) The solution of the integer programming: 134 | 2) Results: 135 | \subsubsection{Analysis of the Result} 136 | \begin{itemize} 137 | \item Local optimization and overall optimization: 138 | \item Sensitivity: The result is quite sensitive to the change of the three parameters 139 | \item 140 | \item Trend: 141 | \item Comparison: 142 | \end{itemize} 143 | \subsubsection{Strength and Weakness} 144 | 145 | \begin{description} 146 | \item[Strength:] The Improved Model aims to make up for the neglect of . The result seems to declare that this model is more reasonable than the Basic Model and much more effective than the existing design. 147 | \item[Weakness:] Thus the model is still an approximate on a large scale. This has doomed to limit the applications of it. 148 | \end{description} 149 | 150 | \section{Conclusions} 151 | 152 | \subsection{Conclusions of the problem} 153 | \begin{itemize} 154 | \item 155 | \item 156 | \item 157 | \item 158 | \end{itemize} 159 | \subsection{Methods used in our models} 160 | \begin{itemize} 161 | \item 162 | \item 163 | \item 164 | \item 165 | \end{itemize} 166 | \subsection{Applications of our models} 167 | \begin{itemize} 168 | \item 169 | \item 170 | \item 171 | \item 172 | \end{itemize} 173 | \section{Future Work} 174 | \subsection{Another model} 175 | \subsubsection{The limitations of queuing theory} 176 | 177 | 178 | 179 | 180 | \subsubsection{} 181 | 182 | 183 | \subsubsection{} 184 | 185 | 186 | 187 | \subsubsection{} 188 | 189 | 190 | 191 | 192 | 193 | %参考文献 194 | \begin{thebibliography}{9}%宽度9 195 | \bibitem{1} Author, Title, Place of Publication: Press, Year of publication. 196 | \bibitem{2} author, paper name, magazine name, volume number: starting and ending 197 | page number, year of publication. 198 | \bibitem{3} author, resource title, web site, visit time (year, month, day). 199 | \bibitem{bib:one} \LaTeX{}\CJK{UTF8}{gbsn}{资源和技巧学习} \url{https://www.latexstudio.net} 200 | \bibitem{bib:two} \LaTeX{}\CJK{UTF8}{gbsn}{问题交流网站} \url{https://wenda.latexstudio.net} 201 | \bibitem{bib:two} \CJK{UTF8}{gbsn}{模板库维护} \url{https://github.com/latexstudio/APMCMThesis} 202 | \end{thebibliography} 203 | 204 | \newpage 205 | %附录 206 | 207 | \section{Appendix} 208 | \begin{lstlisting}[language=matlab,caption={The matlab Source code of Algorithm}] 209 | kk=2;[mdd,ndd]=size(dd); 210 | while ~isempty(V) 211 | [tmpd,j]=min(W(i,V));tmpj=V(j); 212 | for k=2:ndd 213 | [tmp1,jj]=min(dd(1,k)+W(dd(2,k),V)); 214 | tmp2=V(jj);tt(k-1,:)=[tmp1,tmp2,jj]; 215 | end 216 | tmp=[tmpd,tmpj,j;tt];[tmp3,tmp4]=min(tmp(:,1)); 217 | if tmp3==tmpd, ss(1:2,kk)=[i;tmp(tmp4,2)]; 218 | else,tmp5=find(ss(:,tmp4)~=0);tmp6=length(tmp5); 219 | if dd(2,tmp4)==ss(tmp6,tmp4) 220 | ss(1:tmp6+1,kk)=[ss(tmp5,tmp4);tmp(tmp4,2)]; 221 | else, ss(1:3,kk)=[i;dd(2,tmp4);tmp(tmp4,2)]; 222 | end;end 223 | dd=[dd,[tmp3;tmp(tmp4,2)]];V(tmp(tmp4,3))=[]; 224 | [mdd,ndd]=size(dd);kk=kk+1; 225 | end; S=ss; D=dd(1,:); 226 | \end{lstlisting} 227 | \begin{lstlisting}[language=c,caption={The lingo source code}] 228 | kk=2; 229 | [mdd,ndd]=size(dd); 230 | while ~isempty(V) 231 | [tmpd,j]=min(W(i,V));tmpj=V(j); 232 | for k=2:ndd 233 | [tmp1,jj]=min(dd(1,k)+W(dd(2,k),V)); 234 | tmp2=V(jj);tt(k-1,:)=[tmp1,tmp2,jj]; 235 | end 236 | tmp=[tmpd,tmpj,j;tt];[tmp3,tmp4]=min(tmp(:,1)); 237 | if tmp3==tmpd, ss(1:2,kk)=[i;tmp(tmp4,2)]; 238 | else,tmp5=find(ss(:,tmp4)~=0);tmp6=length(tmp5); 239 | if dd(2,tmp4)==ss(tmp6,tmp4) 240 | ss(1:tmp6+1,kk)=[ss(tmp5,tmp4);tmp(tmp4,2)]; 241 | else, ss(1:3,kk)=[i;dd(2,tmp4);tmp(tmp4,2)]; 242 | end; 243 | end 244 | dd=[dd,[tmp3;tmp(tmp4,2)]];V(tmp(tmp4,3))=[]; 245 | [mdd,ndd]=size(dd); 246 | kk=kk+1; 247 | end; 248 | S=ss; 249 | D=dd(1,:); 250 | \end{lstlisting} 251 | 252 | 253 | \end{document} -------------------------------------------------------------------------------- /apmcmthesis.cls: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | %% 3 | %% 2019年第九届APMCM亚太地区大学生数学建模竞赛论文LaTeX模版的类文件 4 | %% 5 | %% apmcmthesis.cls 6 | %% V1.0 7 | %% 2019/11/06 8 | %% by LaTeXStudio.net 9 | %% see http://www.latexstudio.net/ 10 | %% for current contact information. 11 | 12 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 13 | \ProvidesClass{apmcmthesis}[2019/11/11 v1.0 LaTeX Template for APMCM] 14 | %% Inital Code 15 | \newif\if@tzmcm@bwprint\@tzmcm@bwprintfalse 16 | \newif\if@tzmcm@preface\@tzmcm@prefacetrue 17 | % tokens definition 18 | %%%% 承诺书 19 | \newcommand\tzmcm@tokens@keywords{} 20 | \newcommand*\tzmcm@tokens@tihao{} 21 | \newcommand*\tzmcm@tokens@baominghao{} 22 | \newcommand*\tzmcm@tokens@schoolname{} 23 | \newcommand*\tzmcm@tokens@membera{} 24 | \newcommand*\tzmcm@tokens@memberb{} 25 | \newcommand*\tzmcm@tokens@memberc{} 26 | \newcommand*\tzmcm@tokens@supervisor{} 27 | \newcommand*\tzmcm@tokens@yearinput{} 28 | \newcommand*\tzmcm@tokens@monthinput{} 29 | \newcommand*\tzmcm@tokens@dayinput{} 30 | \newcommand*\tzmcm@tokens@date{} 31 | %%%% 编号专用页 32 | % 没有 33 | %% Declaration of Options 34 | \DeclareOption{colorprint}{\@tzmcm@bwprintfalse} 35 | \DeclareOption{withoutpreface}{\@tzmcm@prefacefalse} 36 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 37 | %% Executing of Options 38 | \ExecuteOptions{colorprint} 39 | \ProcessOptions\relax 40 | %% Loading Class 41 | \LoadClass[a4paper,12pt]{article} 42 | 43 | % 支持中文的 ctex 宏包 44 | 45 | %% Loading Package 46 | \RequirePackage{ifxetex} 47 | 48 | % 页面布局 49 | \RequirePackage{geometry} 50 | %% Document Layout 51 | % 页面布局 52 | \geometry{top=25.4mm,bottom=25.4mm,left=31.8mm,right=31.8mm} 53 | \renewcommand*{\baselinestretch}{1.38} 54 | % 数学宏包 55 | \RequirePackage{amsmath} 56 | \RequirePackage{amsfonts} 57 | \RequirePackage{amssymb} 58 | \RequirePackage{bm} 59 | \RequirePackage{titlesec} 60 | \RequirePackage{titletoc} 61 | % 设置颜色 62 | \RequirePackage[x11names,svgnames,dvipsnames]{xcolor} 63 | % 插入图片 64 | \RequirePackage{graphicx} 65 | % 表格 66 | \RequirePackage{array,lastpage} 67 | %% 长表格 68 | \RequirePackage{longtable,tabularx} 69 | %% booktabs 提供了\toprule 等命令. 70 | \RequirePackage{booktabs} 71 | %% multirow 支持在表格中跨行 72 | \RequirePackage{multirow} 73 | %% 调整间隔, 让表格更好看些 74 | \RequirePackage{bigstrut} 75 | 76 | % 保护脆落命令 77 | \RequirePackage{cprotect} 78 | % 设置代码环境 79 | \RequirePackage{listings} 80 | 81 | \ifxetex 82 | \RequirePackage{ctex} 83 | \setmainfont{Times New Roman} 84 | \else 85 | \RequirePackage{CJK} 86 | \usepackage{newtxtext} 87 | \usepackage{newtxmath} 88 | \fi 89 | 90 | \definecolor{dkgreen}{rgb}{0,0.6,0} 91 | \definecolor{gray}{rgb}{0.5,0.5,0.5} 92 | \definecolor{mauve}{rgb}{0.58,0,0.82} 93 | 94 | \lstset{ 95 | frame=tb, 96 | aboveskip=3mm, 97 | belowskip=3mm, 98 | showstringspaces=false, 99 | columns=flexible, 100 | framerule=1pt, 101 | rulecolor=\color{gray!35}, 102 | backgroundcolor=\color{gray!5}, 103 | basicstyle={\small\ttfamily}, 104 | numbers=none, 105 | numberstyle=\tiny\color{gray}, 106 | keywordstyle=\color{blue}, 107 | commentstyle=\color{dkgreen}, 108 | stringstyle=\color{mauve}, 109 | breaklines=true, 110 | breakatwhitespace=true, 111 | tabsize=3, 112 | } 113 | 114 | % 设置浮动体的标题 115 | \RequirePackage{caption} 116 | % 定制列表环境 117 | \RequirePackage{enumitem} 118 | % 下划线 119 | \RequirePackage{ulem} 120 | % 尺寸计算 121 | \RequirePackage{calc} 122 | 123 | \RequirePackage[titletoc,title]{appendix} 124 | 125 | 126 | % 修改tabular 环境, 设置表格中的行间距为正文行间距. 127 | \let\tzmcm@oldtabular\tabular 128 | \let\tzmcm@endoldtabular\endtabular 129 | \renewenvironment{tabular}% 130 | {\bgroup% 131 | \renewcommand{\arraystretch}{1.3}% 132 | \tzmcm@oldtabular}% 133 | {\tzmcm@endoldtabular\egroup} 134 | % 每行缩进两个汉字 135 | \setlength\parindent{2em} 136 | % 设置字体 137 | \newcommand{\team}{Team \#\ \tzmcm@tokens@baominghao} 138 | \RequirePackage{fancyhdr} 139 | \pagestyle{fancy} 140 | 141 | \fancypagestyle{frontmatterstyle}{% style for frontmatter 142 | \fancyhf{}% clear fields 143 | \fancyhf{} 144 | \lhead{\small \team} 145 | \rhead{} 146 | } 147 | \fancypagestyle{mainmatterstyle}{% style for mainmatter 148 | \fancyhf{} 149 | \lhead{\small \team} 150 | \rhead{\small Page \thepage\ of \pageref{LastPage}} 151 | } 152 | % 数学环境, 定理等设置 153 | \newtheorem{definition}{\tzmcm@cap@definition} 154 | \newtheorem{theorem}{\tzmcm@cap@theorem} 155 | \newtheorem{lemma}{\tzmcm@cap@lemma} 156 | \newtheorem{corollary}{\tzmcm@cap@corollary} 157 | \newtheorem{assumption}{\tzmcm@cap@assumption} 158 | \newtheorem{conjecture}{\tzmcm@cap@conjecture} 159 | \newtheorem{axiom}{\tzmcm@cap@axiom} 160 | \newtheorem{principle}{\tzmcm@cap@principle} 161 | \newtheorem{problem}{\tzmcm@cap@problem} 162 | %\newtheorem{example}{\tzmcm@cap@example} 163 | \newtheorem{proof}{\tzmcm@cap@proof} 164 | \newtheorem{solution}{\tzmcm@cap@solution} 165 | 166 | % 浮动环境设置 167 | % 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境, 168 | % 而这通常不是我们想要的, 我们将这个要求降低到 5%. 169 | \renewcommand*{\textfraction}{0.05} 170 | % 有时如果多个浮动环境连续放在一起, \LaTeX{} 171 | % 会将它们分在几个不同页,即使它们可在同一页放 172 | % 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮 173 | % 动环境的最大比例. 174 | \renewcommand*{\topfraction}{0.9} 175 | \renewcommand*{\bottomfraction}{0.8} 176 | % 有时\LaTeX{}会把一个浮动环境单独放在一页, 177 | % 我们要求这个环境至少要占据 85% 才能单独放在一页. 178 | % 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|. 179 | \renewcommand*{\floatpagefraction}{0.85} 180 | % 关于图片 graphicx 181 | % 如果图片没有指定后缀, 依次按下列顺序搜索 182 | \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} 183 | % 设置图表搜索路径, 可以给图表文件夹取如下名字 184 | \graphicspath{{figures/}{figure/}{pictures/}% 185 | {picture/}{pic/}{pics/}{image/}{images/}} 186 | % 图表标题 187 | \DeclareCaptionFont{minusfour}{\small} 188 | \captionsetup[figure]{% 189 | format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样. 190 | labelsep=space, % 分隔符是一个空格 191 | font={minusfour,bf}, % 图的字体, 宋体小四 192 | position=bottom % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置. 193 | } 194 | \captionsetup[table]{% 195 | format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样. 196 | labelsep=quad, % 分隔符是一个空格 197 | font={minusfour,bf}, % 表的字体, 宋体小四 198 | position=top % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置. 199 | } 200 | % 列表环境设置 201 | \setlist{% 202 | topsep=0.3em, % 列表顶端的垂直空白 203 | partopsep=0pt, % 列表环境前面紧接着一个空白行时其顶端的额外垂直空白 204 | itemsep=0ex plus 0.1ex, % 列表项之间的额外垂直空白 205 | parsep=0pt, % 列表项内的段落之间的垂直空白 206 | leftmargin=2em, % 环境的左边界和列表之间的水平距离 207 | rightmargin=0em, % 环境的右边界和列表之间的水平距离 208 | labelsep=0.5em, % 包含标签的盒子与列表项的第一行文本之间的间隔 209 | labelwidth=2em % 包含标签的盒子的正常宽度;若实际宽度更宽,则使用实际宽度。 210 | } 211 | 212 | 213 | \lstnewenvironment{tcode} 214 | { 215 | \lstset{basicstyle = \small\ttfamily, 216 | language=TeX, 217 | tabsize = 4, 218 | frame = single, 219 | escapechar = `, 220 | breaklines = true, 221 | breakatwhitespace = true, 222 | frameround = tttt, 223 | } 224 | } 225 | {} 226 | 227 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 228 | 229 | %% Document Markup 230 | 231 | % 生成封面, 使用\maketitle 232 | \newcommand{\makecontrolsheet}{\par 233 | \begingroup 234 | \newpage 235 | \global\@topnum\z@ % Prevents figures from going at top of page. 236 | \@maketitle 237 | \endgroup 238 | \global\let\thanks\relax 239 | \global\let\maketitle\relax 240 | \global\let\@maketitle\relax 241 | \global\let\@thanks\@empty 242 | \global\let\@author\@empty 243 | \global\let\@date\@empty 244 | \global\let\@title\@empty 245 | \global\let\title\relax 246 | \global\let\author\relax 247 | \global\let\date\relax 248 | \global\let\and\relax 249 | } 250 | \def\@maketitle{% 251 | \thispagestyle{empty}%\fontsize{12pt}{\baselineskip}\selectfont% 252 | \begin{center}% 253 | {\huge\bfseries \tzmcm@numberpage@string@titlea \par}% 254 | \end{center} 255 | {\linespread{1.5}\selectfont \tzmcm@commit@string@contents \par} 256 | 257 | \begin{tabularx}{13.8cm}{@{}l@{}X} 258 | \tzmcm@commit@string@problemnum &{\hspace{1em}\tzmcm@tokens@tihao\hfill}\\ 259 | \cline{2-2} 260 | \end{tabularx} 261 | 262 | \medskip% 263 | \begin{tabularx}{13.8cm}{@{}l@{}X} 264 | \tzmcm@commit@string@signupnum &{\hspace{1em}\tzmcm@tokens@baominghao\hfill}\\ 265 | \cline{2-2} 266 | \end{tabularx} 267 | 268 | \medskip% 269 | \begin{tabularx}{13.8cm}{@{}l@{}X} 270 | \tzmcm@commit@string@schoolname &{\hspace{1em}\tzmcm@tokens@schoolname\hfill}\\[-2pt] 271 | \cline{2-2} 272 | \end{tabularx} 273 | 274 | \medskip% 275 | % 不这样做右边难以对齐! 276 | \begin{tabularx}{13.8cm}{@{}l@{}l@{\ }X} 277 | \tzmcm@commit@string@membername &1. &{\hspace{.5em}\tzmcm@tokens@membera\hfill} \\[-2pt] 278 | \cline{3-3} 279 | &2.& {\hspace{.5em}\tzmcm@tokens@memberb\hfill} \\[-2pt] 280 | \cline{3-3} 281 | &3.& {\hspace{.5em}\tzmcm@tokens@memberc\hfill} \\[-2pt] 282 | \cline{3-3} 283 | \end{tabularx} 284 | 285 | \medskip% 286 | \begin{tabularx}{13.8cm}{@{}l@{}X} 287 | \tzmcm@commit@string@supervisorname &{\hspace{.5em}\tzmcm@tokens@supervisor\hfill}\\[-2pt] 288 | \cline{2-2} 289 | \end{tabularx} 290 | 291 | (Please check the above content carefully, \textbf{fill in English}, and will not be 292 | allowed to make any changes after submission. Such as fill in error, the thesis may be 293 | canceled qualification awards.) 294 | 295 | \null\hfill\begin{tabularx}{5.8cm}{@{}l@{}X} 296 | Date: &{\hspace{.5em}\tzmcm@tokens@date\hfill}\\[-2pt] 297 | \cline{2-2} 298 | \end{tabularx} 299 | } 300 | 301 | 302 | % 标题名称设置 303 | \renewcommand\contentsname{\tzmcm@cap@contentsname} 304 | \renewcommand\refname{\tzmcm@cap@refname} 305 | \renewcommand\indexname{\tzmcm@cap@indexname} 306 | \renewcommand\figurename{\tzmcm@cap@figurename} 307 | \renewcommand\tablename{\tzmcm@cap@tablename} 308 | \renewcommand\appendixname{\tzmcm@cap@appendixname} 309 | \renewcommand\abstractname{\tzmcm@cap@abstractname} 310 | 311 | 312 | % 目录深度 313 | \setcounter{secnumdepth}{3} 314 | \renewcommand\thesubsection{\arabic{section}\thinspace.\thinspace\arabic{subsection}} 315 | \renewcommand\thesubsubsection{\thesubsection\thinspace.\thinspace\arabic{subsubsection}} 316 | 317 | \titleformat{\section} 318 | {\centering\normalfont\Large\bfseries}{\Roman{section}.}{.5em}{} 319 | \titleformat{\subsection} 320 | {\normalfont\large\bfseries}{\thesubsection}{.5em}{} 321 | \titleformat{\subsubsection} 322 | {\normalfont\normalsize\bfseries\itshape}{\normalfont\bfseries\textrm{\thesubsubsection}}{.5em}{} 323 | \titleformat{\paragraph}[runin] 324 | {\normalfont\normalsize\bfseries}{\theparagraph}{.5em}{} 325 | \titlespacing*{\section} {0pt}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex} 326 | \titlespacing*{\subsection} {0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex} 327 | \titlespacing*{\subsubsection}{0pt}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex} 328 | 329 | %设置目录格式 330 | % 节的目录格式 331 | \titlecontents{section}[0pt]{\bfseries} 332 | {{\thecontentslabel}.\enspace }{}{\titlerule*[0.5pc]{.}\contentspage} 333 | % 小节的目录格式 334 | \titlecontents{subsection}[13pt]{\rmfamily} 335 | {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 336 | \titlecontents{subsubsection}[35pt]{\itshape} 337 | {{\normalfont\textrm{\thecontentslabel}}\hskip.5em}{}{\titlerule*[0.5pc]{.}\normalfont\textrm{\contentspage}} 338 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 339 | %% Define new environment and command 340 | %% 摘要两个字设置为 4 号. 341 | %% 定义摘要环境 342 | \def\abstract{% 343 | \if@twocolumn 344 | \begin{center} \the\year\ APMCM summary sheet \end{center}% 345 | \else 346 | \newpage 347 | \begin{center} 348 | \begin{tabularx}{8cm}{|l|X|} 349 | \hline% 350 | Team Number:&\tzmcm@tokens@baominghao\\ 351 | \hline% 352 | Problem Chosen:& \tzmcm@tokens@tihao\\ 353 | \hline% 354 | \end{tabularx} 355 | \end{center} 356 | \noindent\rule{\textwidth}{2pt} 357 | \begin{center} \the\year\ APMCM summary sheet \end{center}% 358 | \fi} 359 | \def\endabstract{\vspace{0.6em}\par\if@twocolumn\endquotation\else\fi 360 | \normalsize\rm} 361 | 362 | \newcommand\keywords[1]{% 363 | \renewcommand{\tzmcm@tokens@keywords}{#1} 364 | \par 365 | \vskip1ex 366 | {\noindent\bfseries\tzmcm@cap@keywordsname:}~{\tzmcm@tokens@keywords} 367 | } 368 | 369 | \renewenvironment{quotation} 370 | {\list{}{\listparindent 2em% 371 | \itemindent \listparindent 372 | \rightmargin\z@ 373 | \leftmargin\z@ 374 | \parsep \z@ \@plus\p@}% 375 | \item\relax} 376 | {\endlist} 377 | 378 | 379 | 380 | % 重定义参考文献环境 381 | \renewenvironment{thebibliography}[1] 382 | {\section{\refname}% 383 | \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% 384 | \list{\@biblabel{\@arabic\c@enumiv}}% 385 | {\settowidth\labelwidth{\@biblabel{#1}}% 386 | \leftmargin\labelwidth 387 | \advance\leftmargin\labelsep 388 | \@openbib@code 389 | \usecounter{enumiv}% 390 | \let\p@enumiv\@empty 391 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 392 | \sloppy 393 | \clubpenalty4000 394 | \@clubpenalty \clubpenalty 395 | \widowpenalty4000% 396 | \sfcode`\.\@m} 397 | {\def\@noitemerr 398 | {\@latex@warning{Empty `thebibliography' environment}}% 399 | \endlist} 400 | 401 | \newcommand*\tihao[1]{% 402 | \renewcommand{\tzmcm@tokens@tihao}{#1}} 403 | \newcommand*\baominghao[1]{% 404 | \renewcommand{\tzmcm@tokens@baominghao}{#1}} 405 | \newcommand*\schoolname[1]{% 406 | \renewcommand{\tzmcm@tokens@schoolname}{#1}} 407 | \newcommand*\membera[1]{% 408 | \renewcommand{\tzmcm@tokens@membera}{#1}} 409 | \newcommand*\memberb[1]{% 410 | \renewcommand{\tzmcm@tokens@memberb}{#1}} 411 | \newcommand*\memberc[1]{% 412 | \renewcommand{\tzmcm@tokens@memberc}{#1}} 413 | \newcommand*\supervisor[1]{% 414 | \renewcommand{\tzmcm@tokens@supervisor}{#1}} 415 | \newcommand*\filldate[1]{% 416 | \renewcommand{\tzmcm@tokens@date}{#1}} 417 | 418 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 419 | % 文档开始导入默认配置 420 | \AtBeginDocument{\makeatletter\input{apmcmthesis.cfg}\makeatother} 421 | 422 | 423 | \endinput 424 | --------------------------------------------------------------------------------