├── .gitignore ├── README.md ├── cumcmthesis.cls ├── example-1.png ├── example-3.png ├── example-4.png ├── example.pdf ├── example.tex └── figures ├── cat.pdf ├── f1.png ├── gongzhonghao.jpg ├── gongzhonghao2.png └── smokeblk.pdf /.gitignore: -------------------------------------------------------------------------------- 1 | tmp-pdfcrop-13964.tex 2 | *.ini 3 | *.aux 4 | *.lof 5 | *.log 6 | *.lot 7 | *.fls 8 | *.out 9 | *.toc 10 | *.eoc 11 | *.fmt 12 | *.fot 13 | *.cb 14 | *.cb2 15 | *.tce 16 | .*.lb 17 | *.dvi 18 | *.xdv 19 | *-converted-to.* 20 | *.bbl 21 | *.bcf 22 | *.blg 23 | *-blx.aux 24 | *-blx.bib 25 | *.run.xml 26 | *.fdb_latexmk 27 | *.synctex 28 | *.synctex(busy) 29 | *.synctex.gz 30 | *.synctex.gz(busy) 31 | *.pdfsync 32 | Temp/* 33 | simkai.ttf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## 全国大学生数学建模竞赛 LaTeX 论文模板 3 | 4 | cumcmthesis 是为全国大学生数学建模竞赛编写的 `LaTeX` 模板, 旨在让大家专注于 5 | 论文的内容写作, 而不用花费过多精力在格式的定制和调整上. 本手册是相应的参考, 其 6 | 中提供了一些环境和命令可以让模板的使用更为方便. 同时需要注意, 使用者需要有一 7 | 定的 `LaTeX` 的使用经验, 至少要会使用 `ctex` 宏包的一些功能, 比如调节字距或修改字体 8 | 大小等等. 例子文件参看 [example.pdf](https://github.com/latexstudio/CUMCMThesis/blob/master/example.pdf). 9 | 10 | 另外, 本模板制作了视频使用教程, 参看[这里](https://item.taobao.com/item.htm?spm=a1z10.1-c.w4004-3473795048.2.ZlPoPL&id=43823508044). 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2019年建模模板的免费视频教程: 18 | 19 | 第一部分: 20 | [https://www.bilibili.com/video/av64191560](https://www.bilibili.com/video/av64191560) 21 | 22 | 第二部分: 23 | [https://www.bilibili.com/video/av64221508](https://www.bilibili.com/video/av64221508) 24 | 25 | 26 | ![](https://github.com/latexstudio/CUMCMThesis/blob/master/example-1.png) 27 | 28 | ![](https://github.com/latexstudio/CUMCMThesis/blob/master/example-3.png) 29 | 30 | ![](https://github.com/latexstudio/CUMCMThesis/blob/master/example-4.png) 31 | 32 | ## 更新记录 33 | 34 | 2023 年 9 月: 35 | 1, 更新了前面承诺书版式。 36 | 37 | 2021 年 7 月: 38 | 1, 更新 uline 与 hspace 的兼容问题。 39 | 40 | 2020 年 8 月: 41 | 42 | 1,适配官网新格式的封面和编号页。格式在[这里](http://www.mcm.edu.cn/html_cn/node/2ecdb523ea364d8fff6928ada7ebd923.html) 43 | 44 | 2,调整了部分的内容和说明。 45 | 46 | 2019年9月更新: 47 | 48 | 1,适配官网格式:[http://mcm.edu.cn/html_cn/node/8e7b0262daa56b8953d1b6ccaada9ed4.html](http://mcm.edu.cn/html_cn/node/8e7b0262daa56b8953d1b6ccaada9ed4.html)。 49 | 50 | 2,增加了更新说明,格式的说明,视频依然可以使用! 51 | 52 | 2019年8月更新: 53 | 54 | 1,更新说明文件和样例。 55 | 56 | 2,增加了免费视频教程和基础知识介绍。 57 | 58 | 2018年9月14日更新: 59 | 60 | 1,修改前面的承诺书内容。 61 | 62 | 2,修改附录链接问题,目录格式。 63 | 64 | 2017年8月14日更新说明: 65 | 66 | 1. 请大家使用较新的 `LaTeX` 发行版本进行编译,下载地址:http://www.latexstudio.net/page/texsoftware 首页焦点图。不要使用 `CTeX` 套装。 67 | 68 | 2. 遇到问题可以到91940767群进行交流或478023327群交流 69 | 70 | 2017年7月28日更新: 71 | 72 | 1. 适配2016年的格式要求,调整了承诺和编号页的内容。 73 | 74 | 2. 修改了附录的代码输入样式。 75 | 76 | 77 | 如果需要去掉封面并把论文标题保留在摘要上面,在加载类的使用如下语句: 78 | ``` 79 | \documentclass[withoutpreface,bwprint]{cumcmthesis} 80 | ``` 81 | 如果需要封面页,则是与原来一致: 82 | ``` 83 | \documentclass[bwprint]{cumcmthesis} 84 | ``` 85 | -------------------------------------------------------------------------------- /cumcmthesis.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 2 | \ProvidesClass{cumcmthesis} 3 | [2017/09/16 v2.6 Standard LaTeX Template for CUMCM] 4 | %% Inital Code 5 | \newif\if@mcm@bwprint\@mcm@bwprintfalse 6 | \newif\if@mcm@preface\@mcm@prefacetrue 7 | % tokens definition 8 | %%%% 承诺书 9 | \newcommand\mcm@tokens@keywords{} 10 | \newcommand*\mcm@tokens@tihao{} 11 | \newcommand*\mcm@tokens@baominghao{} 12 | \newcommand*\mcm@tokens@schoolname{} 13 | \newcommand*\mcm@tokens@membera{} 14 | \newcommand*\mcm@tokens@memberb{} 15 | \newcommand*\mcm@tokens@memberc{} 16 | \newcommand*\mcm@tokens@supervisor{} 17 | \newcommand*\mcm@tokens@yearinput{} 18 | \newcommand*\mcm@tokens@monthinput{} 19 | \newcommand*\mcm@tokens@dayinput{} 20 | %%%% 编号专用页 21 | % 没有 22 | %% Declaration of Options 23 | \DeclareOption{colorprint}{\@mcm@bwprintfalse} 24 | \DeclareOption{bwprint}{\@mcm@bwprinttrue} 25 | \DeclareOption{withoutpreface}{\@mcm@prefacefalse} 26 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 27 | %% Executing of Options 28 | \ExecuteOptions{colorprint} 29 | \ProcessOptions\relax 30 | %% Loading Class 31 | \LoadClass[a4paper,12pt]{article} 32 | %% Loading Package 33 | \RequirePackage{ifxetex} 34 | \RequireXeTeX 35 | \ifxetex\else 36 | \ClassError{mcmthesis}{You must use the `xelatex' driver\MessageBreak Please choose `xelatex'}{% 37 | Just choose `xelatex', no `pdflatex' or `latex' and so on.} 38 | \fi 39 | % 支持中文的 ctex 宏包 40 | \RequirePackage{ctex} 41 | % 页面布局 42 | \RequirePackage{geometry} 43 | % 数学宏包 44 | \RequirePackage{amsmath} 45 | \RequirePackage{amsfonts} 46 | \RequirePackage{amssymb} 47 | \RequirePackage{bm} 48 | %\RequirePackage{titletoc} 49 | % 设置颜色 50 | \RequirePackage{xcolor} 51 | % 插入图片 52 | \RequirePackage{graphicx} 53 | \RequirePackage{float} 54 | % 表格 55 | \RequirePackage{array} 56 | %% 长表格 57 | \RequirePackage{longtable} 58 | %% booktabs 提供了\toprule 等命令. 59 | \RequirePackage{booktabs,tabularx} 60 | %% multirow 支持在表格中跨行 61 | \RequirePackage{multirow} 62 | %% 调整间隔, 让表格更好看些 63 | \RequirePackage{bigstrut} 64 | %% 在跨行表格中输入定界符 65 | \RequirePackage{bigdelim} 66 | % 保护脆落命令 67 | \RequirePackage{cprotect} 68 | % 设置代码环境 69 | \RequirePackage{listings} 70 | \RequirePackage{xcolor} 71 | % 插入链接 72 | \RequirePackage{url} 73 | % 绘图的包 74 | %\RequirePackage{tikz} 75 | %\usetikzlibrary{snakes} 76 | 77 | % 字图与子标题 78 | \RequirePackage{subcaption} 79 | \RequirePackage[titles]{tocloft} 80 | %\renewcommand{\cftdot}{$\cdot$} 81 | %\renewcommand{\cftsecdotsep}{1.5} 82 | \renewcommand{\cftsecdotsep}{4.5} 83 | \setlength{\cftbeforesecskip}{7pt} 84 | \setlength{\cftbeforesubsecskip}{3pt} 85 | %\setlength{\cftbeforesubsecskip}{5pt} 86 | \renewcommand{\cftsecfont}{\bfseries\zihao{-4}\heiti} 87 | \renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}} 88 | \renewcommand{\cftsecaftersnumb}{\hskip.4em} 89 | 90 | 91 | 92 | \definecolor{dkgreen}{rgb}{0,0.6,0} 93 | \definecolor{gray}{rgb}{0.5,0.5,0.5} 94 | \definecolor{mauve}{rgb}{0.58,0,0.82} 95 | 96 | \lstset{ 97 | frame=tb, 98 | aboveskip=3mm, 99 | belowskip=3mm, 100 | showstringspaces=false, 101 | columns=flexible, 102 | framerule=1pt, 103 | rulecolor=\color{gray!35}, 104 | backgroundcolor=\color{gray!5}, 105 | basicstyle={\small\ttfamily}, 106 | numbers=none, 107 | numberstyle=\tiny\color{gray}, 108 | keywordstyle=\color{blue}, 109 | commentstyle=\color{dkgreen}, 110 | stringstyle=\color{mauve}, 111 | breaklines=true, 112 | breakatwhitespace=true, 113 | tabsize=3, 114 | } 115 | % 首行缩进 116 | \RequirePackage{setspace} 117 | % 设置浮动体的标题 118 | \RequirePackage{caption} 119 | % 定制列表环境 120 | \RequirePackage{enumitem} 121 | % 下划线 122 | \RequirePackage{ulem} 123 | % 尺寸计算 124 | \RequirePackage{calc} 125 | 126 | 127 | \RequirePackage[titletoc,title]{appendix} 128 | 129 | %\RequirePackage[title,toc,titletoc]{appendix} 130 | 131 | \RequirePackage{etoolbox} 132 | \AtBeginEnvironment{thebibliography}{% 133 | \phantomsection 134 | \addcontentsline{toc}{section}{\refname} 135 | } 136 | % 超链接 hyperref 的设置 137 | \RequirePackage{hyperref} 138 | % 智能自动化交叉引用 139 | \RequirePackage{cleveref} 140 | %% Document Layout 141 | % 页面布局 142 | \geometry{top=25mm,bottom=25mm,left=25mm,right=25mm} 143 | \renewcommand*{\baselinestretch}{1.38} 144 | % 修改tabular 环境, 设置表格中的行间距为正文行间距. 145 | \let\mcm@oldtabular\tabular 146 | \let\mcm@endoldtabular\endtabular 147 | \renewenvironment{tabular}% 148 | {\bgroup% 149 | \renewcommand{\arraystretch}{1.38}% 150 | \mcm@oldtabular}% 151 | {\mcm@endoldtabular\egroup} 152 | % 每行缩进两个汉字 153 | \setlength\parindent{2em} 154 | % 设置字体 155 | \setmainfont{Times New Roman} 156 | %\setmonofont{Courier New} 157 | \setsansfont{Arial} 158 | \setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf} 159 | \newcommand*{\kai}{\CJKfamily{kai}} 160 | \setCJKfamilyfont{song}[AutoFakeBold]{SimSun} 161 | \newcommand*{\song}{\CJKfamily{song}} 162 | 163 | \renewcommand\normalsize{% 164 | \@setfontsize\normalsize{12.05}{14.45}% 165 | \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ 166 | \abovedisplayshortskip \z@ \@plus3\p@ 167 | \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@} 168 | % 数学环境, 定理等设置 169 | \newtheorem{definition}{\mcm@cap@definition} 170 | \newtheorem{theorem}{\mcm@cap@theorem} 171 | \newtheorem{lemma}{\mcm@cap@lemma} 172 | \newtheorem{corollary}{\mcm@cap@corollary} 173 | \newtheorem{assumption}{\mcm@cap@assumption} 174 | \newtheorem{conjecture}{\mcm@cap@conjecture} 175 | \newtheorem{axiom}{\mcm@cap@axiom} 176 | \newtheorem{principle}{\mcm@cap@principle} 177 | \newtheorem{problem}{\mcm@cap@problem} 178 | \newtheorem{example}{\mcm@cap@example} 179 | \newtheorem{proof}{\mcm@cap@proof} 180 | \newtheorem{solution}{\mcm@cap@solution} 181 | 182 | % 浮动环境设置 183 | % 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境, 184 | % 而这通常不是我们想要的, 我们将这个要求降低到 5%. 185 | \renewcommand*{\textfraction}{0.05} 186 | % 有时如果多个浮动环境连续放在一起, \LaTeX{} 187 | % 会将它们分在几个不同页,即使它们可在同一页放 188 | % 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮 189 | % 动环境的最大比例. 190 | \renewcommand*{\topfraction}{0.9} 191 | \renewcommand*{\bottomfraction}{0.8} 192 | % 有时\LaTeX{}会把一个浮动环境单独放在一页, 193 | % 我们要求这个环境至少要占据 85% 才能单独放在一页. 194 | % 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|. 195 | \renewcommand*{\floatpagefraction}{0.85} 196 | % 关于图片 graphicx 197 | % 如果图片没有指定后缀, 依次按下列顺序搜索 198 | \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} 199 | % 设置图表搜索路径, 可以给图表文件夹取如下名字 200 | \graphicspath{{figures/}{figure/}{pictures/}% 201 | {picture/}{pic/}{pics/}{image/}{images/}} 202 | % 图表标题 203 | \DeclareCaptionFont{song}{\songti} 204 | \DeclareCaptionFont{minusfour}{\zihao{-4}} 205 | \captionsetup[figure]{% 206 | format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样. 207 | labelsep=quad, % 分隔符是一个空格 208 | font={song,minusfour,bf}, % 图的字体, 宋体小四 209 | position=bottom % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置. 210 | } 211 | \captionsetup[table]{% 212 | format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样. 213 | labelsep=quad, % 分隔符是一个空格 214 | font={song,minusfour,bf}, % 表的字体, 宋体小四 215 | position=top % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置. 216 | } 217 | % 列表环境设置 218 | \setlist{% 219 | topsep=0.3em, % 列表顶端的垂直空白 220 | partopsep=0pt, % 列表环境前面紧接着一个空白行时其顶端的额外垂直空白 221 | itemsep=0ex plus 0.1ex, % 列表项之间的额外垂直空白 222 | parsep=0pt, % 列表项内的段落之间的垂直空白 223 | leftmargin=1.5em, % 环境的左边界和列表之间的水平距离 224 | rightmargin=0em, % 环境的右边界和列表之间的水平距离 225 | labelsep=0.5em, % 包含标签的盒子与列表项的第一行文本之间的间隔 226 | labelwidth=2em % 包含标签的盒子的正常宽度;若实际宽度更宽,则使用实际宽度。 227 | } 228 | 229 | % 超链接 230 | \hypersetup{% 231 | % xetex, 232 | % unicode=false, % hyperref 和 xetex 同时使用时不能开启 Unicode 选项. 233 | pdfstartview=FitH, 234 | CJKbookmarks=true, 235 | bookmarksnumbered=true, 236 | bookmarksopen=true, 237 | colorlinks, %注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉) 238 | pdfborder=001, %注释掉此项则交叉引用为彩色边框 239 | allcolors=black, 240 | breaklinks=true}% 241 | % \if@mcm@bwprint 242 | % \AtBeginDocument{\hypersetup{hidelinks}} 243 | % \else\relax\fi 244 | \pdfstringdefDisableCommands{% 245 | \def\cftdotfill{ }% 246 | } 247 | \lstnewenvironment{tcode} 248 | { 249 | \lstset{basicstyle = \small\ttfamily, 250 | language=TeX, 251 | tabsize = 4, 252 | frame = single, 253 | escapechar = `, 254 | breaklines = true, 255 | breakatwhitespace = true, 256 | frameround = tttt, 257 | } 258 | } 259 | {} 260 | %%% crefformat settings 261 | \crefformat{figure}{#2图~#1#3} 262 | \crefrangeformat{figure}{图~(#3#1#4)\;\~{}\;(#5#2#6)} 263 | \crefmultiformat{figure}{图~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)} 264 | 265 | \crefformat{table}{#2表#1#3} 266 | \crefrangeformat{table}{表(#3#1#4)\;\~{}\;(#5#2#6)} 267 | \crefmultiformat{table}{表~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)} 268 | 269 | \crefformat{equation}{#2~(#1#3)} 270 | \crefrangeformat{equation}{~(#3#1#4)\;\~{}\;(#5#2#6)} 271 | \crefmultiformat{equation}{~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 272 | 273 | \crefformat{definition}{#2\mcm@cap@definition~#1#3} 274 | \crefrangeformat{definition}{\mcm@cap@definition~(#3#1#4)\;\~{}\;(#5#2#6)} 275 | \crefmultiformat{definition}{\mcm@cap@definition~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 276 | 277 | \crefformat{theorem}{#2\mcm@cap@theorem~#1#3} 278 | \crefrangeformat{theorem}{\mcm@cap@theorem~(#3#1#4)\;\~{}\;(#5#2#6)} 279 | \crefmultiformat{theorem}{\mcm@cap@theorem~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 280 | 281 | \crefformat{lemma}{#2\mcm@cap@lemma~#1#3} 282 | \crefrangeformat{lemma}{\mcm@cap@lemma~(#3#1#4)\;\~{}\;(#5#2#6)} 283 | \crefmultiformat{lemma}{\mcm@cap@lemma~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 284 | 285 | \crefformat{corollary}{#2\mcm@cap@corollary~#1#3} 286 | \crefrangeformat{corollary}{\mcm@cap@corollary~(#3#1#4)\;\~{}\;(#5#2#6)} 287 | \crefmultiformat{corollary}{\mcm@cap@corollary~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 288 | 289 | \crefformat{assumption}{#2\mcm@cap@assumption~#1#3} 290 | \crefrangeformat{assumption}{\mcm@cap@assumption~(#3#1#4)\;\~{}\;(#5#2#6)} 291 | \crefmultiformat{assumption}{\mcm@cap@assumption~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 292 | 293 | \crefformat{conjecture}{#2\mcm@cap@conjecture~#1#3} 294 | \crefrangeformat{conjecture}{\mcm@cap@conjecture~(#3#1#4)\;\~{}\;(#5#2#6)} 295 | \crefmultiformat{conjecture}{\mcm@cap@conjecture~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 296 | 297 | \crefformat{axiom}{#2\mcm@cap@axiom~#1#3} 298 | \crefrangeformat{axiom}{\mcm@cap@axiom~(#3#1#4)\;\~{}\;(#5#2#6)} 299 | \crefmultiformat{axiom}{\mcm@cap@axiom~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 300 | 301 | \crefformat{principle}{#2\mcm@cap@principle~#1#3} 302 | \crefrangeformat{principle}{\mcm@cap@principle~(#3#1#4)\;\~{}\;(#5#2#6)} 303 | \crefmultiformat{principle}{\mcm@cap@principle~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 304 | 305 | \crefformat{problem}{#2\mcm@cap@problem~#1#3} 306 | \crefrangeformat{problem}{\mcm@cap@problem~(#3#1#4)\;\~{}\;(#5#2#6)} 307 | \crefmultiformat{problem}{\mcm@cap@problem~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 308 | 309 | \crefformat{example}{#2\mcm@cap@example~#1#3} 310 | \crefrangeformat{example}{\mcm@cap@example~(#3#1#4)\;\~{}\;(#5#2#6)} 311 | \crefmultiformat{example}{\mcm@cap@example~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 312 | 313 | \crefformat{proof}{#2\mcm@cap@proof~#1#3} 314 | \crefrangeformat{proof}{\mcm@cap@proof~(#3#1#4)\;\~{}\;(#5#2#6)} 315 | \crefmultiformat{proof}{\mcm@cap@proof~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 316 | 317 | \crefformat{solution}{#2\mcm@cap@solution~#1#3} 318 | \crefrangeformat{solution}{\mcm@cap@solution~(#3#1#4)\;\~{}\;(#5#2#6)} 319 | \crefmultiformat{solution}{\mcm@cap@solution~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 320 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 321 | 322 | %% Document Markup 323 | 324 | % 生成封面, 使用\maketitle 325 | \renewcommand{\maketitle}{\par 326 | \begingroup 327 | \newpage 328 | \global\@topnum\z@ % Prevents figures from going at top of page. 329 | \@maketitle 330 | \endgroup 331 | \global\let\thanks\relax 332 | \global\let\maketitle\relax 333 | \global\let\@maketitle\relax 334 | \global\let\@thanks\@empty 335 | \global\let\@author\@empty 336 | \global\let\@date\@empty 337 | \global\let\@title\@empty 338 | \global\let\title\relax 339 | \global\let\author\relax 340 | \global\let\date\relax 341 | \global\let\and\relax 342 | } 343 | \def\@maketitle{% 344 | \newpage 345 | \if@mcm@preface 346 | \null 347 | % 承诺书 348 | \vskip2ex 349 | \thispagestyle{empty} 350 | {\zihao{4}\noindent\mcm@commit@string@headname\\[-8pt] 351 | \noindent\rule[5pt]{\textwidth-1.34em}{.5pt}\par} 352 | \begin{center}% 353 | {\zihao{-3}\bfseries\heiti \mcm@commit@string@titlea \par}% 354 | {\vskip1ex\zihao{3}\bfseries\songti \mcm@commit@string@titleb \par} 355 | \end{center} 356 | {\zihao{-4} \mcm@commit@string@contents \par} 357 | {\vskip1ex\zihao{-4} 358 | \renewcommand{\ULthickness}{0.4pt}\setlength{\ULdepth}{2pt} 359 | \begin{spacing}{1.6} 360 | \mcm@commit@string@problemnum\uline{\mbox{\kern1em}\mcm@tokens@tihao\hfill}\makebox[0.66em]{}\par 361 | \mcm@commit@string@signupnum\uline{\mbox{\kern1em}\mcm@tokens@baominghao\hfill}\makebox[0.66em]{}\par 362 | \mcm@commit@string@schoolname\uline{\hfill\mcm@tokens@schoolname\hfill}\makebox[0.66em]{}\par 363 | \end{spacing} 364 | \newlength{\mcm@lenB} 365 | \settowidth{\mcm@lenB}{\mcm@commit@string@membername\mbox{\hspace{1em}}1.} 366 | \setlength{\mcm@lenB}{\textwidth-\mcm@lenB} 367 | % 不这样做右边难以对齐! 368 | \vskip2em% 369 | \hspace*{2em}\mcm@commit@string@membername 370 | \begin{minipage}[t]{\mcm@lenB} 371 | 1.\uline{\mbox{\kern1em}\mcm@tokens@membera\hfill} \makebox[0.46em]{}\par\vspace*{.37cm} 372 | 2.\uline{\mbox{\kern1em}\mcm@tokens@memberb\hfill} \makebox[0.46em]{}\par\vspace*{.37cm} 373 | 3.\uline{\mbox{\kern1em}\mcm@tokens@memberc\hfill} \makebox[0.46em]{}\par 374 | \end{minipage}\par\vskip2em 375 | \mcm@commit@string@supervisorname\uline{\mbox{\hspace{1em}}\mcm@tokens@supervisor\hfill}\makebox[0.66em]{}\par 376 | \hspace{0.1cm} ({\kaishu 指导教师签名意味着对参赛队的行为和论文的真实性负责}) 377 | %{\kaishu\mcm@commit@string@inform\par} 378 | \vskip2ex 379 | \newlength{\mcm@lenA} 380 | \settowidth{\mcm@lenA}{请仔细核对,提交后将不再允许做任何修改。如}% 虽然"日期"刚好在"错误"下面, 但注意"日期"还会缩进, 所以要省去"填写""两字 381 | \hspace*{\mcm@lenA}\mcm@commit@string@date\hspace{0.5em}\uline{\hfill\mbox{\kern1em}\mcm@tokens@yearinput\mbox{\kern1em}\hfill}% 382 | \mcm@commit@string@year\uline{\hfill\mcm@tokens@monthinput\hfill}\mcm@commit@string@month% 383 | \uline{\hfill\mcm@tokens@dayinput\hfill}\mcm@commit@string@day\makebox[1em]{}\par} 384 | \vskip1ex 385 | {\kaishu\bfseries\mcm@commit@string@inform\par} 386 | \vfill 387 | \null 388 | % 编号专用页 389 | \else 390 | \fi 391 | \makeothertitle 392 | } 393 | 394 | %% 定义 编号专用页 395 | \def\makeothertitle{% 396 | \if@mcm@preface 397 | \par 398 | \newpage 399 | \null 400 | \thispagestyle{empty} 401 | {\zihao{4}\noindent\begin{tabularx}{\textwidth}{cXcX@{}} 402 | \mcm@numberpage@string@headname & & \mcm@numberpage@string@allcountrynum&\\[-5pt] 403 | \mcm@numberpage@string@headnameb & &\mcm@numberpage@string@allcountrynumb&\\ 404 | \cline{2-2}\cline{4-4} 405 | \end{tabularx} 406 | 407 | \vspace*{1.2em} 408 | 409 | \noindent\rule{\textwidth}{1pt}\par} 410 | \begin{center} 411 | {\zihao{4}\bfseries\heiti \mcm@numberpage@string@titlea\par} 412 | {\vskip1ex\zihao{3}\songti \bfseries\mcm@numberpage@string@titleb\par} 413 | \end{center}\par 414 | {% 415 | \zihao{4} 416 | \vskip3em 417 | \hspace*{2em}\mcm@numberpage@string@appraiselog 418 | \par 419 | \newlength{\mcm@lenC} 420 | \setlength{\mcm@lenC}{\textwidth-8.72em} 421 | \setlength{\mcm@lenC}{\mcm@lenC/6} 422 | \newlength{\mcm@lenD} 423 | \settoheight{\mcm@lenD}{\mcm@numberpage@string@reviewer} 424 | \setlength{\mcm@lenD}{\mcm@lenD+2em} 425 | \newlength{\mcm@lenF} 426 | \settoheight{\mcm@lenF}{\mcm@numberpage@string@remarks} 427 | \setlength{\mcm@lenF}{\mcm@lenF+2em} 428 | \newcolumntype{P}{@{}p{\mcm@lenC}@{}} 429 | \hspace*{1.5em}\begin{tabular}{|!{\hspace{4pt}}c!{\hspace{4pt}}|*{6}{P|}} 430 | \hline 431 | \rule{0pt}{\mcm@lenD}\raisebox{0.6em}[0pt][0pt]{\mcm@numberpage@string@reviewer} & & & & & & \\\cline{1-7} 432 | \rule{0pt}{\mcm@lenF}\raisebox{0.6em}[0pt][0pt]{\mcm@numberpage@string@remarks} & & & & & & \\ 433 | \hline 434 | \end{tabular}\par 435 | \vskip5em 436 | \hspace*{2em}\mcm@numberpage@string@countrynum} 437 | 438 | \vfill 439 | {\zihao{-4}\kaishu\bfseries\mcm@numberpage@string@inform\par} 440 | 441 | \null 442 | \newpage 443 | \null 444 | \setcounter{page}{1} 445 | {\centering \zihao{3}\bfseries \@title\par} 446 | \vskip1ex 447 | \else 448 | \setcounter{page}{1} 449 | {\centering \zihao{3}\bfseries \@title\par} 450 | \vskip1ex 451 | \fi 452 | } 453 | 454 | % 中文标题名称设置 455 | \renewcommand\contentsname{\mcm@cap@contentsname} 456 | \renewcommand\listfigurename{\mcm@cap@listfigurename} 457 | \renewcommand\listtablename{\mcm@cap@listtablename} 458 | \renewcommand\refname{\mcm@cap@refname} 459 | \renewcommand\indexname{\mcm@cap@indexname} 460 | \renewcommand\figurename{\mcm@cap@figurename} 461 | \renewcommand\tablename{\mcm@cap@tablename} 462 | \renewcommand\appendixname{\mcm@cap@appendixname} 463 | \renewcommand\abstractname{\mcm@cap@abstractname} 464 | 465 | % 中文标题格式设置 466 | % 目录深度 467 | \setcounter{secnumdepth}{3} 468 | % 节标题格式, 居中, 使用\chinese命令修改计数器 469 | \def\@seccntformat#1{\csname the#1\endcsname\ } 470 | \renewcommand\thesection{\chinese{section}、} 471 | \renewcommand\thesubsection{\arabic{section}\thinspace.\thinspace\arabic{subsection}} 472 | \renewcommand\thesubsubsection{\thesubsection\thinspace.\thinspace\arabic{subsubsection}} 473 | \renewcommand\section{\@startsection{section}{1}{\z@}% 474 | {-3.5ex \@plus -1ex \@minus -.2ex}% 475 | {2.3ex \@plus.2ex}% 476 | {\centering\normalfont\Large\bfseries}} 477 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% 478 | {-3.25ex\@plus -1ex \@minus -.2ex}% 479 | {1.5ex \@plus .2ex}% 480 | {\normalfont\large\bfseries}} 481 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% 482 | {-3.25ex\@plus -1ex \@minus -.2ex}% 483 | {1.5ex \@plus .2ex}% 484 | {\normalfont\normalsize\bfseries}} 485 | \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% 486 | {3.25ex \@plus1ex \@minus.2ex}% 487 | {-1em}% 488 | {\normalfont\normalsize\bfseries}} 489 | \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% 490 | {3.25ex \@plus1ex \@minus .2ex}% 491 | {-1em}% 492 | {\normalfont\normalsize\bfseries}} 493 | 494 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 495 | %% Define new environment and command 496 | %% 摘要两个字设置为 4 号. 497 | %% 定义摘要环境 498 | \renewenvironment{abstract}{% 499 | \if@twocolumn 500 | \section*{\abstractname}% 501 | \else 502 | \begin{center}% 503 | {\zihao{4}\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 504 | \end{center}% 505 | \quotation 506 | \fi} 507 | {\if@twocolumn\else\endquotation\newpage\null\fi} 508 | \renewenvironment{quotation} 509 | {\list{}{\listparindent 2em% 510 | \itemindent \listparindent 511 | \rightmargin\z@ 512 | \leftmargin\z@ 513 | \parsep \z@ \@plus\p@}% 514 | \item\relax} 515 | {\endlist} 516 | 517 | \newcommand\keywords[1]{% 518 | \renewcommand{\mcm@tokens@keywords}{#1} 519 | \par 520 | \vskip1ex 521 | {\noindent\zihao{-4}\heiti\mcm@cap@keywordsname:}~{\mcm@tokens@keywords} 522 | } 523 | % 定义附录 524 | 525 | % \renewcommand{\setthesection}{\appendixname\Alph{section}} 526 | % \renewcommand\appendix{\par 527 | % \setcounter{section}{0}% 528 | % \setcounter{subsection}{0}% 529 | % \gdef\thesection{\appendixname\@Alph\c@section}} 530 | % 重定义参考文献环境 531 | \renewenvironment{thebibliography}[1] 532 | {\section*{\refname}% 533 | \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% 534 | \list{\@biblabel{\@arabic\c@enumiv}}% 535 | {\settowidth\labelwidth{\@biblabel{#1}}% 536 | \leftmargin\labelwidth 537 | \advance\leftmargin\labelsep 538 | \@openbib@code 539 | \usecounter{enumiv}% 540 | \let\p@enumiv\@empty 541 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 542 | \sloppy 543 | \clubpenalty4000 544 | \@clubpenalty \clubpenalty 545 | \widowpenalty4000% 546 | \sfcode`\.\@m} 547 | {\def\@noitemerr 548 | {\@latex@warning{Empty `thebibliography' environment}}% 549 | \endlist} 550 | 551 | \newcommand*\tihao[1]{% 552 | \renewcommand{\mcm@tokens@tihao}{#1}} 553 | \newcommand*\baominghao[1]{% 554 | \renewcommand{\mcm@tokens@baominghao}{#1}} 555 | \newcommand*\schoolname[1]{% 556 | \renewcommand{\mcm@tokens@schoolname}{#1}} 557 | \newcommand*\membera[1]{% 558 | \renewcommand{\mcm@tokens@membera}{#1}} 559 | \newcommand*\memberb[1]{% 560 | \renewcommand{\mcm@tokens@memberb}{#1}} 561 | \newcommand*\memberc[1]{% 562 | \renewcommand{\mcm@tokens@memberc}{#1}} 563 | \newcommand*\supervisor[1]{% 564 | \renewcommand{\mcm@tokens@supervisor}{#1}} 565 | \newcommand*\yearinput[1]{% 566 | \renewcommand{\mcm@tokens@yearinput}{#1}} 567 | \newcommand*\monthinput[1]{% 568 | \renewcommand{\mcm@tokens@monthinput}{#1}} 569 | \newcommand*\dayinput[1]{% 570 | \renewcommand{\mcm@tokens@dayinput}{#1}} 571 | 572 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 573 | 574 | %% Initialization 575 | %%%数学定理相关的常量 576 | \newcommand*{\mcm@cap@definition}{定义} 577 | \newcommand*{\mcm@cap@theorem}{定理} 578 | \newcommand*{\mcm@cap@lemma}{引理} 579 | \newcommand*{\mcm@cap@corollary}{推论} 580 | \newcommand*{\mcm@cap@assumption}{假设} 581 | \newcommand*{\mcm@cap@conjecture}{猜想} 582 | \newcommand*{\mcm@cap@axiom}{公理} 583 | \newcommand*{\mcm@cap@principle}{定律} 584 | \newcommand*{\mcm@cap@problem}{问题} 585 | \newcommand*{\mcm@cap@example}{例} 586 | \newcommand*{\mcm@cap@proof}{证明} 587 | \newcommand*{\mcm@cap@solution}{解} 588 | %%% 中文标题名称 589 | \newcommand*{\mcm@cap@contentsname}{目录} 590 | \newcommand*{\mcm@cap@listfigurename}{插图清单} 591 | \newcommand*{\mcm@cap@listtablename}{附表清单} 592 | \newcommand*{\mcm@cap@refname}{参考文献} 593 | \newcommand*{\mcm@cap@indexname}{索引} 594 | \newcommand*{\mcm@cap@figurename}{图} 595 | \newcommand*{\mcm@cap@tablename}{表} 596 | \newcommand*{\mcm@cap@appendixname}{附录} 597 | \newcommand*{\mcm@cap@abstractname}{摘要} 598 | %%% 中文关键字 599 | \newcommand*{\mcm@cap@keywordsname}{关键字} 600 | 601 | %%% 承诺书中的常量 602 | \newcommand*\mcm@commit@string@headname{赛区评阅编号(由赛区组委会填写):} 603 | \newcommand*\mcm@commit@string@titlea{\the\year 高教社杯全国大学生数学建模竞赛} 604 | \newcommand*\mcm@commit@string@titleb{承\hspace{1em}诺\hspace{1em}书} 605 | \newcommand\mcm@commit@string@contents{\quotation 606 | 我们仔细阅读了《全国大学生数学建模竞赛章程》和《全国大学生数学建模竞赛参赛规则》(以下简称 “竞赛章程和参赛规则”,可从http://www.mcm.edu.cn下载)。 607 | 608 | 我们完全清楚,在竞赛开始后参赛队员不能以任何方式,包括电话、电子邮件、“贴吧”、QQ群、微信群等,与队外的任何人(包括指导教师)交流、讨论与赛题有关的问题;无论主动参与讨论还是被动接收讨论信息都是严重违反竞赛纪律的行为。 609 | 610 | %我们完全清楚,在竞赛中必须合法合规地使用文献资料和软件工具,不能有任何侵犯知识产权的行为。否则我们将失去评奖资格,并可能受到严肃处理。 611 | 612 | {\bfseries\song 我们以中国大学生名誉和诚信郑重承诺,严格遵守竞赛章程和参赛规则,以保证竞赛的公正、公平性。如有违反竞赛章程和参赛规则的行为,我们将受到严肃处理。} 613 | 614 | 我们授权全国大学生数学建模竞赛组委会,可将我们的论文以任何形式进行公开展示(包括进行网上公示,在书籍、期刊和其他媒体进行正式或非正式发表等)。 615 | \endquotation 616 | } 617 | \newcommand*\mcm@commit@string@problemnum{我们参赛选择的题号(从A/B/C/D/E中选择一项填写):} 618 | \newcommand*\mcm@commit@string@signupnum{我们的报名参赛队号(12位数字全国统一编号):} 619 | \newcommand*\mcm@commit@string@schoolname{参赛学校(完整的学校全称,不含院系名):} 620 | \newcommand*\mcm@commit@string@membername{参赛队员 (打印并签名) :} 621 | \newcommand*\mcm@commit@string@supervisorname{指导教师或指导教师组负责人 (打印并签名):} 622 | \newcommand\mcm@commit@string@inform{\quotation 623 | \noindent{(\bfseries\kai 请勿改动此页内容和格式。此承诺书打印签名后作为纸质论文的封面,注意电子版论文中不得出现此页。% 624 | 以上内容请仔细核对,如填写错误,论文可能被取消评奖资格。)} 625 | \endquotation 626 | } 627 | \newcommand*\mcm@commit@string@date{日期:} 628 | \newcommand*\mcm@commit@string@year{年} 629 | \newcommand*\mcm@commit@string@month{月} 630 | \newcommand*\mcm@commit@string@day{日} 631 | \newcommand*\mcm@commit@string@appraisenum{赛区评阅编号(由赛区组委会评阅前进行编号):} 632 | 633 | %%% 编号专用页中的常量 634 | \newcommand*\mcm@numberpage@string@headname{赛区评阅编号:} 635 | \newcommand*\mcm@numberpage@string@headnameb{(由赛区填写)} 636 | \newcommand*\mcm@numberpage@string@allcountrynum{全国评阅编号:} 637 | \newcommand*\mcm@numberpage@string@allcountrynumb{(全国组委会填写)} 638 | \newcommand*\mcm@numberpage@string@titlea{\the\year 高教社杯全国大学生数学建模竞赛} 639 | \newcommand*\mcm@numberpage@string@titleb{编\hspace{.5em}号\hspace{.5em}专\hspace{.5em}用\hspace{.5em}页} 640 | \newcommand*\mcm@numberpage@string@appraiselog{赛区评阅记录(可供赛区评阅时使用):} 641 | \newcommand\mcm@numberpage@string@reviewer{\shortstack{评\\ 阅\\ 人}} 642 | \newcommand\mcm@numberpage@string@remarks{\shortstack{备\\ 注}} 643 | 644 | 645 | \newcommand*\mcm@numberpage@string@countrynum{送全国评阅统一编号:\par \hspace*{2em}(赛区组委会填写)} 646 | \newcommand\mcm@numberpage@string@inform{\quotation 647 | \noindent({\bfseries\kai 请勿改动此页内容和格式。此编号专用页仅供赛区和全国评阅使用,参赛队打印后装订到纸质论文的第二页上。 648 | 注意电子版论文中不得出现此页。}) 649 | \endquotation 650 | } 651 | %设置目录格式 652 | % 节的目录格式 653 | % \titlecontents{section}[0pt]{\vspace{2mm}\bfseries} 654 | % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 655 | % % 小节的目录格式 656 | % \titlecontents{subsection}[30pt]{\songti} 657 | % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 658 | % \titlecontents{subsubsection}[55pt]{\songti} 659 | % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 660 | 661 | % 上标文献 662 | \newcommand{\upcite}[1]{$^{\mbox{\scriptsize \cite{#1}}}$} 663 | \newcommand{\supercite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}} 664 | \endinput 665 | -------------------------------------------------------------------------------- /example-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/example-1.png -------------------------------------------------------------------------------- /example-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/example-3.png -------------------------------------------------------------------------------- /example-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/example-4.png -------------------------------------------------------------------------------- /example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/example.pdf -------------------------------------------------------------------------------- /example.tex: -------------------------------------------------------------------------------- 1 | \documentclass{cumcmthesis} 2 | % \documentclass[withoutpreface,bwprint]{cumcmthesis} %去掉封面与编号页,电子版提交的时候使用。 3 | 4 | 5 | \usepackage[framemethod=TikZ]{mdframed} 6 | \usepackage{url} % 网页链接 7 | \usepackage{subcaption} % 子标题 8 | \title{全国大学生数学建模竞赛编写的 \LaTeX{} 模板} 9 | \tihao{A} 10 | \baominghao{4321} 11 | \schoolname{XX大学} 12 | \membera{ } 13 | \memberb{ } 14 | \memberc{ } 15 | \supervisor{ }%辅导老师 16 | \yearinput{2023} 17 | \monthinput{9} 18 | \dayinput{8} 19 | 20 | \begin{document} 21 | 22 | \maketitle 23 | \begin{abstract} 24 | cumcmthesis 是为全国大学生数学建模竞赛编写的\LaTeX{}模板, 旨在让大家专注于 论文的内容写作, 而不用花费过多精力在格式的定制和调整上. 本手册是相应的参考, 其 中提供了一些环境和命令可以让模板的使用更为方便. 同时需要注意, 使用者需要有一 定的 \LaTeX{} 的使用经验, 至少要会使用常用宏包的一些功能, 比如参考文献,数学公式,图片使用,列表环境等等. 例子文件参看 \texttt{example.tex}. 25 | 26 | \begin{mdframed} [% 27 | roundcorner=5pt, 28 | linecolor=gray!50, 29 | outerlinewidth=0.5pt, 30 | middlelinewidth=0.3pt, backgroundcolor=gray!2, 31 | innertopmargin=\topskip, frametitle={2023 年建模比赛格式变化说明}, 32 | frametitlefont= \bfseries,frametitlerule=true,frametitlealignment =\raggedright\noindent, 33 | frametitlerulewidth=.5pt, frametitlebackgroundcolor=gray!2,] 34 | 今年的格式变化主要就是一个地方,如下: 35 | \begin{enumerate} 36 | \item 论文第一页为承诺书,\textbf{\color{red}内容进行了调整}。 37 | 38 | 39 | 40 | \end{enumerate} 41 | 42 | \end{mdframed} 43 | 44 | 45 | \url{https://www.latexstudio.net} 陆续推出了更优质的资源,欢迎学习 。 46 | 47 | 欢迎大家到QQ群里沟通交流:91940767/478023327/640633524。我们也开通了问答区交流 \LaTeX{}技术:\url{https://ask.latexstudio.net},欢迎大家前来交流,有问题就来这里,与大神零距离。 48 | 49 | \uwave{关注我们的微信公众号}: 50 | 51 | \centerline{\includegraphics[width=6cm]{gongzhonghao2}} 52 | 53 | \keywords{\TeX{}\quad 图片\quad 表格\quad 公式} 54 | \end{abstract} 55 | 56 | %目录 2019 明确不要目录,我觉得这个规定太好了 57 | %\tableofcontents 58 | 59 | %\newpage 60 | 61 | \section{模板的基本使用} 62 | 63 | 要使用 \LaTeX{} 来完成建模论文,首先要确保正确安装一个 \LaTeX{} 的发行版本。 64 | 65 | \begin{itemize} 66 | \item Mac 下可以使用 Mac\TeX{} 67 | \item Linux 下可以使用 \TeX{}Live ; 68 | \item windows 下可以使用 \TeX{}Live 或者 Mik\TeX{} ; 69 | \end{itemize} 70 | 71 | 具体安装可以参考 \href{https://github.com/OsbertWang/install-latex-guide-zh-cn/releases/}{Install-LaTeX-Guide-zh-cn} 或者其它靠谱的文章。另外可以安装一个易用的编辑器,例如 \href{https://mirrors.tuna.tsinghua.edu.cn/github-release/texstudio-org/texstudio/LatestRelease/}{\TeX{}studio} 。 72 | 73 | 使用该模板前,请阅读模板的使用说明文档。下面给出模板使用的大概样式。 74 | 75 | \begin{tcode} 76 | \documentclass{cumcmthesis} 77 | %\documentclass[withoutpreface,bwprint]{cumcmthesis} %去掉封面与编号页 78 | 79 | \title{论文题目} 80 | \tihao{A} % 题号 81 | \baominghao{4321} % 报名号 82 | \schoolname{你的大学} 83 | \membera{成员A} 84 | \memberb{成员B} 85 | \memberc{成员C} 86 | \supervisor{指导老师} 87 | \yearinput{2017} % 年 88 | \monthinput{08} % 月 89 | \dayinput{22} % 日 90 | 91 | \begin{document} 92 | \maketitle 93 | \begin{abstract} 94 | 摘要的具体内容。 95 | \keywords{关键词1\quad 关键词2\quad 关键词3} 96 | \end{abstract} 97 | \tableofcontents 98 | \section{问题重述} 99 | \subsection{问题的提出} 100 | \section{模型的假设} 101 | \section{符号说明} 102 | \begin{center} 103 | \begin{tabular}{cc} 104 | \hline 105 | \makebox[0.3\textwidth][c]{符号} & \makebox[0.4\textwidth][c]{意义} \\ \hline 106 | D & 木条宽度(cm) \\ \hline 107 | \end{tabular} 108 | \end{center} 109 | \section{问题分析} 110 | \section{总结} 111 | \begin{thebibliography}{9}%宽度9 112 | \bibitem{bib:one} .... 113 | \end{thebibliography} 114 | \begin{appendices} 115 | 附录的内容。 116 | \end{appendices} 117 | \end{document} 118 | \end{tcode} 119 | 120 | 根据要求,电子版论文提交时需去掉封面和编号页。可以加上 \verb|withoutpreface| 选项来实现,即: 121 | \begin{tcode} 122 | \documentclass[withoutpreface]{cumcmthesis} 123 | \end{tcode} 124 | 这样就能实现了。打印的时候有超链接的地方不需要彩色,可以加上 \verb|bwprint| 选项。 125 | 126 | 另外目录也是不需要的,将 \verb|\tableofcontents| 注释或删除,目录就不会出现了。 127 | 128 | 团队的信息填入指定的位置,并且确保信息的正确性,以免因此白忙一场。 129 | 130 | 编译记得使用 \verb|xelatex|,而不是用 \verb|pdflatex|。在命令行编译的可以按如下方式编译: 131 | \begin{tcode} 132 | xelatex example 133 | \end{tcode} 134 | 或者使用 \verb|latexmk| 来编译,更推荐这种方式。 135 | \begin{tcode} 136 | latexmk -xelatex example 137 | \end{tcode} 138 | 139 | 下面给出写作与排版上的一些建议。 140 | 141 | \section{图片} 142 | 143 | 建模中不可避免要插入图片。图片可以分为矢量图与位图。位图推荐使用 \verb|jpg,png| 这两种格式,避免使用 \verb|bmp| 这类图片,容易出现图片插入失败这样情况的发生。矢量图一般有 \verb|pdf,eps| ,推荐使用 \verb|pdf| 格式的图片,尽量不要使用 \verb|eps| 图片,理由相同。 144 | 145 | 注意图片的命名,避免使用中文来命名图片,可以用英文与数字的组合来命名图片。避免使用\verb|1,2,3| 这样顺序的图片命名方式。图片多了,自己都不清楚那张图是什么了,命名尽量让它有意义。下面是一个插图的示例代码。 146 | \begin{figure}[!h] 147 | \centering 148 | \includegraphics[width=.6\textwidth]{smokeblk} 149 | \caption{电路图} 150 | \label{fig:circuit-diagram} 151 | \end{figure} 152 | 153 | 注意 \verb|figure| 环境是一个浮动体环境,图片的最终位置可能会跑动。\verb|[!h]| 中的 \verb|h| 是 here 的意思, \verb|!| 表示忽略一些浮动体的严格规则。另外里面还可以加上 \verb|btp| 选项,它们分别是 bottom, top, page 的意思。只要这几个参数在花括号里面,作用是不分先后顺序的。page 在这里表示浮动页。 154 | 155 | \verb|\label{fig:circuit-diagram}| 是一个标签,供交叉引用使用的。例如引用图片 \verb|\cref{fig:circuit-diagram}| 的实际效果是\cref{fig:circuit-diagram}。图片是自动编号的,比起手动编号,它更加高效。\verb|\cref{label}| 由 \verb|cleveref| 宏包提供,比普通的 \verb|\ref{label}| 更加自动化。 \verb|label| 要确保唯一,命名方式推荐用图片的命名方式。 156 | 157 | 图片并排的需求解决方式多种多样,下面用 \verb|minipage| 环境来展示一个简单的例子。注意,以下例子用到了 \verb|subcaption| 命令,需要加载 subcaption 宏包。 158 | 159 | \begin{figure} 160 | \centering 161 | \begin{minipage}[c]{0.3\textwidth} 162 | \centering 163 | \includegraphics[width=0.95\textwidth]{f1} 164 | \subcaption{流程图} 165 | \label{fig:sample-figure-a} 166 | \end{minipage} 167 | \begin{minipage}[c]{0.3\textwidth} 168 | \centering 169 | \includegraphics[width=0.95\textwidth]{f1} 170 | \subcaption{流程图} 171 | \label{fig:sample-figure-b} 172 | \end{minipage} 173 | \begin{minipage}[c]{0.3\textwidth} 174 | \centering 175 | \includegraphics[width=0.95\textwidth]{f1} 176 | \subcaption{流程图} 177 | \label{fig:sample-figure-c} 178 | \end{minipage} 179 | \caption{多图并排示例} 180 | \label{fig:sample-figure} 181 | \end{figure} 182 | 这相当于整体是一张大图片,大图片引用是\cref{fig:sample-figure},子图引用别分是\cref{fig:sample-figure-a}、\cref{fig:sample-figure-b}、\cref{fig:sample-figure-c}。 183 | 184 | 如果原本两张图片的高度不同,但是希望它们缩放后等高的排在同一行,参考这个例子: 185 | \begin{figure} 186 | \centering 187 | \begin{minipage}[c]{0.48\textwidth} 188 | \centering 189 | \includegraphics[height=0.2\textheight]{cat} 190 | \subcaption{一只猫} 191 | \end{minipage} 192 | \begin{minipage}[c]{0.48\textwidth} 193 | \centering 194 | \includegraphics[height=0.2\textheight]{smokeblk} 195 | \subcaption{电路图} 196 | \end{minipage} 197 | \caption{多图并排示例} 198 | \end{figure} 199 | 200 | \section{绘制普通三线表格} 201 | 表格应具有三线表格式,因此常用 booktabs宏包,其标准格式如\cref{tab:001}~所示。 202 | \begin{table}[!htbp] 203 | \caption{标准三线表格}\label{tab:001} \centering 204 | \begin{tabular}{ccccc} 205 | \toprule[1.5pt] 206 | $D$(in) & $P_u$(lbs) & $u_u$(in) & $\beta$ & $G_f$(psi.in)\\ 207 | \midrule[1pt] 208 | 5 & 269.8 & 0.000674 & 1.79 & 0.04089\\ 209 | 10 & 421.0 & 0.001035 & 3.59 & 0.04089\\ 210 | 20 & 640.2 & 0.001565 & 7.18 & 0.04089\\ 211 | \bottomrule[1.5pt] 212 | \end{tabular} 213 | \end{table} 214 | 215 | 其绘制表格的代码及其说明如下。 216 | \begin{tcode} 217 | \begin{table}[!htbp] 218 | \caption[标签名]{中文标题} 219 | \begin{tabular}{cc...c} 220 | \toprule[1.5pt] 221 | 表头第1个格 & 表头第2个格 & ... & 表头第n个格 \\ 222 | \midrule[1pt] 223 | 表中数据(1,1) & 表中数据(1,2) & ... & 表中数据(1,n)\\ 224 | 表中数据(2,1) & 表中数据(2,2) & ... & 表中数据(2,n)\\ 225 | ...................................................\\ 226 | 表中数据(m,1) & 表中数据(m,2) & ... & 表中数据(m,n)\\ 227 | \bottomrule[1.5pt] 228 | \end{tabular} 229 | \end{table} 230 | \end{tcode} 231 | 232 | \bigskip 233 | 234 | table环境是一个将表格嵌入文本的浮动环境。tabular环境的必选参数由每列对应一个格式字符所组成:c表示居中,l表示左对齐,r表示右对齐,其总个数应与表的列数相同。此外,\verb|@{文本}|可以出现在任意两个上述的列格式之间,其中的文本将被插入每一行的同一位置。表格的各行以\verb|\\|分隔,同一行的各列则以\&分隔。 \verb|\toprule| 、\verb|\midrule| 和 \verb|\bottomrule| 三个命令是由booktabs宏包提供的,其中 \verb|\toprule| 和 \verb|\bottomrule| 分别用来绘制表格的第一条(表格最顶部)和第三条(表格最底部)水平线, \verb|\midrule| 用来绘制第二条(表头之下)水平线,且第一条和第三条水平线的线宽为 1.5pt ,第二条水平线的线宽为 1pt 。引用方法与图片的相同。 235 | 236 | \section{公式} 237 | 238 | 数学建模必然涉及不少数学公式的使用。下面简单介绍一个可能用得上的数学环境。 239 | 240 | 首先是行内公式,例如 $ \theta $ 是角度。行内公式使用 \verb|$ $| 包裹。 241 | 242 | 行间公式不需要编号的可以使用 \verb|\[ \]| 包裹,例如 243 | \[ 244 | E=mc^2 245 | \] 246 | 其中 $ E $ 是能量,$ m $ 是质量,$ c $ 是光速。 247 | 248 | 如果希望某个公式带编号,并且在后文中引用可以参考下面的写法: 249 | \begin{equation} 250 | E=mc^2 251 | \label{eq:energy} 252 | \end{equation} 253 | 式\cref{eq:energy}是质能方程。 254 | 255 | 多行公式有时候希望能够在特定的位置对齐,以下是其中一种处理方法。 256 | \begin{align} 257 | P & = UI \\ 258 | & = I^2R 259 | \end{align} 260 | \verb|&| 是对齐的位置, \verb|&| 可以有多个,但是每行的个数要相同。 261 | 262 | 矩阵的输入也不难。 263 | \[ 264 | \mathbf{X} = \left( 265 | \begin{array}{cccc} 266 | x_{11} & x_{12} & \ldots & x_{1n}\\ 267 | x_{21} & x_{22} & \ldots & x_{2n}\\ 268 | \vdots & \vdots & \ddots & \vdots\\ 269 | x_{n1} & x_{n2} & \ldots & x_{nn}\\ 270 | \end{array} \right) 271 | \] 272 | 273 | 分段函数这些可以用 \verb|case| 环境,但是它要放在数学环境里面。 274 | \[ 275 | f(x) = 276 | \begin{cases} 277 | 0 & x \text{为无理数} ,\\ 278 | 1 & x \text{为有理数} . 279 | \end{cases} 280 | \] 281 | 在数学环境里面,字体用的是数学字体,一般与正文字体不同。假如要公式里面有个别文字,则需要把这部分放在 \verb|text| 环境里面,即 \verb|\text{文本环境}| 。 282 | 283 | 公式中个别需要加粗的字母可以用 \verb|$\bm{math symbol}$| 。如 $ \alpha a\bm{\alpha a} $ 。 284 | 285 | 以上仅简单介绍了基础的使用,对于更复杂的需求,可以阅读相关的宏包手册,如 \href{http://texdoc.net/texmf-dist/doc/latex/amsmath/amsldoc.pdf}{amsmath}。 286 | 287 | 希腊字母这些如果不熟悉,可以去查找符号文件 \href{http://mirrors.ctan.org/info/symbols/comprehensive/symbols-a4.pdf}{symbols-a4.pdf} ,也可以去 \href{http://detexify.kirelabs.org/classify.html}{detexify} 网站手写识别。另外还有数学公式识别软件 \href{https://mathpix.com/}{mathpix} 。 288 | 289 | 下面简单介绍一下定理、证明等环境的使用。 290 | \begin{definition} 291 | 定义环境 292 | \label{def:nosense} 293 | \end{definition} 294 | \cref{def:nosense}除了告诉你怎么使用这个环境以外,没有什么其它的意义。 295 | 296 | 除了 definition 环境,还可以使用 theorem 、lemma、corollary、assumption、conjecture、axiom、principle、problem、example、proof、solution 这些环境,根据论文的实际需求合理使用。 297 | 298 | \begin{theorem} 299 | 这是一个定理。 300 | \label{thm:example} 301 | \end{theorem} 302 | 由\cref{thm:example}我们知道了定理环境的使用。 303 | 304 | \begin{lemma} 305 | 这是一个引理。 306 | \label{lem:example} 307 | \end{lemma} 308 | 由\cref{lem:example}我们知道了引理环境的使用。 309 | 310 | \begin{corollary} 311 | 这是一个推论。 312 | \label{cor:example} 313 | \end{corollary} 314 | 由\cref{cor:example}我们知道了推论环境的使用。 315 | 316 | \begin{assumption} 317 | 这是一个假设。 318 | \label{asu:example} 319 | \end{assumption} 320 | 由\cref{asu:example}我们知道了假设环境的使用。 321 | 322 | \begin{conjecture} 323 | 这是一个猜想。 324 | \label{con:example} 325 | \end{conjecture} 326 | 由\cref{con:example}我们知道了猜想环境的使用。 327 | 328 | \begin{axiom} 329 | 这是一个公理。 330 | \label{axi:example} 331 | \end{axiom} 332 | 由\cref{axi:example}我们知道了公理环境的使用。 333 | 334 | \begin{principle} 335 | 这是一个定律。 336 | \label{pri:example} 337 | \end{principle} 338 | 由\cref{pri:example}我们知道了定律环境的使用。 339 | 340 | \begin{problem} 341 | 这是一个问题。 342 | \label{pro:example} 343 | \end{problem} 344 | 由\cref{pro:example}我们知道了问题环境的使用。 345 | 346 | \begin{example} 347 | 这是一个例子。 348 | \label{exa:example} 349 | \end{example} 350 | 由\cref{exa:example}我们知道了例子环境的使用。 351 | 352 | \begin{proof} 353 | 这是一个证明。 354 | \label{prf:example} 355 | \end{proof} 356 | 由\cref{prf:example}我们知道了证明环境的使用。 357 | 358 | \begin{solution} 359 | 这是一个解。 360 | \label{sol:example} 361 | \end{solution} 362 | 由\cref{sol:example}我们知道了解环境的使用。 363 | 364 | 365 | 366 | \section{其它小功能} 367 | \subsection{脚注} 368 | 369 | 利用 \verb|\footnote{具体内容}| 可以生成脚注\footnote{脚注可以补充说明一些东西}。 370 | 371 | \subsection{无序列表与有序列表} 372 | 373 | 无序列表是这样的: 374 | \begin{itemize} 375 | \item one 376 | \item two 377 | \item ... 378 | \end{itemize} 379 | 380 | 有序列表是这样子的: 381 | \begin{enumerate} 382 | \item one 383 | \item two 384 | \item ... 385 | \end{enumerate} 386 | 387 | \subsection{字体加粗与斜体} 388 | 389 | 如果想强调部分内容,可以使用加粗的手段来实现。加粗字体可以用 \verb|\textbf{加粗}| 来实现。例如: \textbf{这是加粗的字体。 This is bold fonts} 。 390 | 391 | 中文字体没有斜体设计,但是英文字体有。\textit{斜体 Italics}。 392 | 393 | \section{参考文献与引用} 394 | 395 | 参考文献对于一篇正式的论文来说是必不可少的,在建模中重要的参考文献当然应该列出。\LaTeX{}在这方面的功能也是十分强大的,下面进介绍一个比较简单的参考文献制作方法。有兴趣的可以学习 \verb|bibtex| 或 \verb|biblatex| 的使用。 396 | 397 | \LaTeX{}的入门书籍可以看《\LaTeX{}入门》\cite{liuhaiyang2013latex}。这是一个简单的引用,用 \verb|\cite{bibkey}| 来完成。要引用成功,当然要维护好 bibitem 了。下面是个简单的例子。 398 | 399 | 400 | 401 | %参考文献 402 | \begin{thebibliography}{9}%宽度9 403 | \bibitem[1]{liuhaiyang2013latex} 404 | 刘海洋. 405 | \newblock \LaTeX {}入门\allowbreak[J]. 406 | \newblock 电子工业出版社, 北京, 2013. 407 | \bibitem[2]{mathematical-modeling} 408 | 全国大学生数学建模竞赛论文格式规范 (2023 年 修改). 409 | \bibitem{3} \url{https://www.latexstudio.net} 410 | \end{thebibliography} 411 | 412 | \newpage 413 | %附录 414 | \begin{appendices} 415 | 416 | \section{模板所用的宏包} 417 | \begin{table}[htbp] 418 | \centering 419 | \caption{宏包罗列} 420 | \begin{tabular}{ccccc} 421 | \toprule 422 | \multicolumn{5}{c}{模板中已经加载的宏包} \\ 423 | \midrule 424 | amsbsy & amsfonts & {amsgen} & {amsmath} & {amsopn} \\ 425 | amssymb & amstext & {appendix} & {array} & {atbegshi} \\ 426 | atveryend & auxhook & {bigdelim} & {bigintcalc} & {bigstrut} \\ 427 | bitset & bm & {booktabs} & {calc} & {caption} \\ 428 | caption3 & CJKfntef & {cprotect} & {ctex} & {ctexhook} \\ 429 | ctexpatch & enumitem & {etexcmds} & {etoolbox} & {everysel} \\ 430 | expl3 & fix-cm & {fontenc} & {fontspec} & {fontspec-xetex} \\ 431 | geometry & gettitlestring & {graphics} & {graphicx} & {hobsub} \\ 432 | hobsub-generic & hobsub-hyperref & {hopatch} & {hxetex} & {hycolor} \\ 433 | hyperref & ifluatex & {ifpdf} & {ifthen} & {ifvtex} \\ 434 | ifxetex & indentfirst & {infwarerr} & {intcalc} & {keyval} \\ 435 | kvdefinekeys & kvoptions & {kvsetkeys} & {l3keys2e} & {letltxmacro} \\ 436 | listings & longtable & {lstmisc} & {ltcaption} & {ltxcmds} \\ 437 | multirow & nameref & {pdfescape} & {pdftexcmds} & {refcount} \\ 438 | rerunfilecheck & stringenc & {suffix} & {titletoc} & {tocloft} \\ 439 | trig & ulem & {uniquecounter} & {url} & {xcolor} \\ 440 | xcolor-patch & xeCJK & {xeCJKfntef} & {xeCJK-listings} & {xparse} \\ 441 | xtemplate & zhnumber & & & \\ 442 | \bottomrule 443 | \end{tabular}% 444 | \label{tab:addlabel}% 445 | \end{table}% 446 | 447 | 以上宏包都已经加载过了,不要重复加载它们。 448 | 449 | \section{排队算法--matlab 源程序} 450 | 451 | \begin{lstlisting}[language=matlab] 452 | kk=2;[mdd,ndd]=size(dd); 453 | while ~isempty(V) 454 | [tmpd,j]=min(W(i,V));tmpj=V(j); 455 | for k=2:ndd 456 | [tmp1,jj]=min(dd(1,k)+W(dd(2,k),V)); 457 | tmp2=V(jj);tt(k-1,:)=[tmp1,tmp2,jj]; 458 | end 459 | tmp=[tmpd,tmpj,j;tt];[tmp3,tmp4]=min(tmp(:,1)); 460 | if tmp3==tmpd, ss(1:2,kk)=[i;tmp(tmp4,2)]; 461 | else,tmp5=find(ss(:,tmp4)~=0);tmp6=length(tmp5); 462 | if dd(2,tmp4)==ss(tmp6,tmp4) 463 | ss(1:tmp6+1,kk)=[ss(tmp5,tmp4);tmp(tmp4,2)]; 464 | else, ss(1:3,kk)=[i;dd(2,tmp4);tmp(tmp4,2)]; 465 | end;end 466 | dd=[dd,[tmp3;tmp(tmp4,2)]];V(tmp(tmp4,3))=[]; 467 | [mdd,ndd]=size(dd);kk=kk+1; 468 | end; S=ss; D=dd(1,:); 469 | \end{lstlisting} 470 | 471 | \section{规划解决程序--lingo源代码} 472 | 473 | \begin{lstlisting}[language=c] 474 | kk=2; 475 | [mdd,ndd]=size(dd); 476 | while ~isempty(V) 477 | [tmpd,j]=min(W(i,V));tmpj=V(j); 478 | for k=2:ndd 479 | [tmp1,jj]=min(dd(1,k)+W(dd(2,k),V)); 480 | tmp2=V(jj);tt(k-1,:)=[tmp1,tmp2,jj]; 481 | end 482 | tmp=[tmpd,tmpj,j;tt];[tmp3,tmp4]=min(tmp(:,1)); 483 | if tmp3==tmpd, ss(1:2,kk)=[i;tmp(tmp4,2)]; 484 | else,tmp5=find(ss(:,tmp4)~=0);tmp6=length(tmp5); 485 | if dd(2,tmp4)==ss(tmp6,tmp4) 486 | ss(1:tmp6+1,kk)=[ss(tmp5,tmp4);tmp(tmp4,2)]; 487 | else, ss(1:3,kk)=[i;dd(2,tmp4);tmp(tmp4,2)]; 488 | end; 489 | end 490 | dd=[dd,[tmp3;tmp(tmp4,2)]];V(tmp(tmp4,3))=[]; 491 | [mdd,ndd]=size(dd); 492 | kk=kk+1; 493 | end; 494 | S=ss; 495 | D=dd(1,:); 496 | \end{lstlisting} 497 | \end{appendices} 498 | 499 | \end{document} -------------------------------------------------------------------------------- /figures/cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/figures/cat.pdf -------------------------------------------------------------------------------- /figures/f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/figures/f1.png -------------------------------------------------------------------------------- /figures/gongzhonghao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/figures/gongzhonghao.jpg -------------------------------------------------------------------------------- /figures/gongzhonghao2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/figures/gongzhonghao2.png -------------------------------------------------------------------------------- /figures/smokeblk.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/latexstudio/CUMCMThesis/90d3e854534ae7dc605dfe9296785f8c17e56e22/figures/smokeblk.pdf --------------------------------------------------------------------------------