├── LICENSE ├── README.md ├── figures ├── HFUT_Horizontal_font&logo.pdf ├── HFUT_Vertical_font&logo.pdf ├── HFUT_font_zh-ch&en.pdf ├── HFUT_font_zh-ch.pdf ├── HFUT_logo.pdf ├── cat.pdf ├── f1.png └── title.png ├── hfutreport.cls ├── report.pdf ├── report.synctex.gz ├── report.tex └── 合肥工业大学课程设计报告.docx /LICENSE: -------------------------------------------------------------------------------- 1 | The LaTeX Project Public License 2 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 3 | 4 | LPPL Version 1.3c 2008-05-04 5 | 6 | Copyright 1999 2002-2008 LaTeX3 Project 7 | Everyone is allowed to distribute verbatim copies of this 8 | license document, but modification of it is not allowed. 9 | 10 | 11 | PREAMBLE 12 | ======== 13 | 14 | The LaTeX Project Public License (LPPL) is the primary license under 15 | which the LaTeX kernel and the base LaTeX packages are distributed. 16 | 17 | You may use this license for any work of which you hold the copyright 18 | and which you wish to distribute. This license may be particularly 19 | suitable if your work is TeX-related (such as a LaTeX package), but 20 | it is written in such a way that you can use it even if your work is 21 | unrelated to TeX. 22 | 23 | The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', 24 | below, gives instructions, examples, and recommendations for authors 25 | who are considering distributing their works under this license. 26 | 27 | This license gives conditions under which a work may be distributed 28 | and modified, as well as conditions under which modified versions of 29 | that work may be distributed. 30 | 31 | We, the LaTeX3 Project, believe that the conditions below give you 32 | the freedom to make and distribute modified versions of your work 33 | that conform with whatever technical specifications you wish while 34 | maintaining the availability, integrity, and reliability of 35 | that work. If you do not see how to achieve your goal while 36 | meeting these conditions, then read the document `cfgguide.tex' 37 | and `modguide.tex' in the base LaTeX distribution for suggestions. 38 | 39 | 40 | DEFINITIONS 41 | =========== 42 | 43 | In this license document the following terms are used: 44 | 45 | `Work' 46 | Any work being distributed under this License. 47 | 48 | `Derived Work' 49 | Any work that under any applicable law is derived from the Work. 50 | 51 | `Modification' 52 | Any procedure that produces a Derived Work under any applicable 53 | law -- for example, the production of a file containing an 54 | original file associated with the Work or a significant portion of 55 | such a file, either verbatim or with modifications and/or 56 | translated into another language. 57 | 58 | `Modify' 59 | To apply any procedure that produces a Derived Work under any 60 | applicable law. 61 | 62 | `Distribution' 63 | Making copies of the Work available from one person to another, in 64 | whole or in part. Distribution includes (but is not limited to) 65 | making any electronic components of the Work accessible by 66 | file transfer protocols such as FTP or HTTP or by shared file 67 | systems such as Sun's Network File System (NFS). 68 | 69 | `Compiled Work' 70 | A version of the Work that has been processed into a form where it 71 | is directly usable on a computer system. This processing may 72 | include using installation facilities provided by the Work, 73 | transformations of the Work, copying of components of the Work, or 74 | other activities. Note that modification of any installation 75 | facilities provided by the Work constitutes modification of the Work. 76 | 77 | `Current Maintainer' 78 | A person or persons nominated as such within the Work. If there is 79 | no such explicit nomination then it is the `Copyright Holder' under 80 | any applicable law. 81 | 82 | `Base Interpreter' 83 | A program or process that is normally needed for running or 84 | interpreting a part or the whole of the Work. 85 | 86 | A Base Interpreter may depend on external components but these 87 | are not considered part of the Base Interpreter provided that each 88 | external component clearly identifies itself whenever it is used 89 | interactively. Unless explicitly specified when applying the 90 | license to the Work, the only applicable Base Interpreter is a 91 | `LaTeX-Format' or in the case of files belonging to the 92 | `LaTeX-format' a program implementing the `TeX language'. 93 | 94 | 95 | 96 | CONDITIONS ON DISTRIBUTION AND MODIFICATION 97 | =========================================== 98 | 99 | 1. Activities other than distribution and/or modification of the Work 100 | are not covered by this license; they are outside its scope. In 101 | particular, the act of running the Work is not restricted and no 102 | requirements are made concerning any offers of support for the Work. 103 | 104 | 2. You may distribute a complete, unmodified copy of the Work as you 105 | received it. Distribution of only part of the Work is considered 106 | modification of the Work, and no right to distribute such a Derived 107 | Work may be assumed under the terms of this clause. 108 | 109 | 3. You may distribute a Compiled Work that has been generated from a 110 | complete, unmodified copy of the Work as distributed under Clause 2 111 | above, as long as that Compiled Work is distributed in such a way that 112 | the recipients may install the Compiled Work on their system exactly 113 | as it would have been installed if they generated a Compiled Work 114 | directly from the Work. 115 | 116 | 4. If you are the Current Maintainer of the Work, you may, without 117 | restriction, modify the Work, thus creating a Derived Work. You may 118 | also distribute the Derived Work without restriction, including 119 | Compiled Works generated from the Derived Work. Derived Works 120 | distributed in this manner by the Current Maintainer are considered to 121 | be updated versions of the Work. 122 | 123 | 5. If you are not the Current Maintainer of the Work, you may modify 124 | your copy of the Work, thus creating a Derived Work based on the Work, 125 | and compile this Derived Work, thus creating a Compiled Work based on 126 | the Derived Work. 127 | 128 | 6. If you are not the Current Maintainer of the Work, you may 129 | distribute a Derived Work provided the following conditions are met 130 | for every component of the Work unless that component clearly states 131 | in the copyright notice that it is exempt from that condition. Only 132 | the Current Maintainer is allowed to add such statements of exemption 133 | to a component of the Work. 134 | 135 | a. If a component of this Derived Work can be a direct replacement 136 | for a component of the Work when that component is used with the 137 | Base Interpreter, then, wherever this component of the Work 138 | identifies itself to the user when used interactively with that 139 | Base Interpreter, the replacement component of this Derived Work 140 | clearly and unambiguously identifies itself as a modified version 141 | of this component to the user when used interactively with that 142 | Base Interpreter. 143 | 144 | b. Every component of the Derived Work contains prominent notices 145 | detailing the nature of the changes to that component, or a 146 | prominent reference to another file that is distributed as part 147 | of the Derived Work and that contains a complete and accurate log 148 | of the changes. 149 | 150 | c. No information in the Derived Work implies that any persons, 151 | including (but not limited to) the authors of the original version 152 | of the Work, provide any support, including (but not limited to) 153 | the reporting and handling of errors, to recipients of the 154 | Derived Work unless those persons have stated explicitly that 155 | they do provide such support for the Derived Work. 156 | 157 | d. You distribute at least one of the following with the Derived Work: 158 | 159 | 1. A complete, unmodified copy of the Work; 160 | if your distribution of a modified component is made by 161 | offering access to copy the modified component from a 162 | designated place, then offering equivalent access to copy 163 | the Work from the same or some similar place meets this 164 | condition, even though third parties are not compelled to 165 | copy the Work along with the modified component; 166 | 167 | 2. Information that is sufficient to obtain a complete, 168 | unmodified copy of the Work. 169 | 170 | 7. If you are not the Current Maintainer of the Work, you may 171 | distribute a Compiled Work generated from a Derived Work, as long as 172 | the Derived Work is distributed to all recipients of the Compiled 173 | Work, and as long as the conditions of Clause 6, above, are met with 174 | regard to the Derived Work. 175 | 176 | 8. The conditions above are not intended to prohibit, and hence do not 177 | apply to, the modification, by any method, of any component so that it 178 | becomes identical to an updated version of that component of the Work as 179 | it is distributed by the Current Maintainer under Clause 4, above. 180 | 181 | 9. Distribution of the Work or any Derived Work in an alternative 182 | format, where the Work or that Derived Work (in whole or in part) is 183 | then produced by applying some process to that format, does not relax or 184 | nullify any sections of this license as they pertain to the results of 185 | applying that process. 186 | 187 | 10. a. A Derived Work may be distributed under a different license 188 | provided that license itself honors the conditions listed in 189 | Clause 6 above, in regard to the Work, though it does not have 190 | to honor the rest of the conditions in this license. 191 | 192 | b. If a Derived Work is distributed under a different license, that 193 | Derived Work must provide sufficient documentation as part of 194 | itself to allow each recipient of that Derived Work to honor the 195 | restrictions in Clause 6 above, concerning changes from the Work. 196 | 197 | 11. This license places no restrictions on works that are unrelated to 198 | the Work, nor does this license place any restrictions on aggregating 199 | such works with the Work by any means. 200 | 201 | 12. Nothing in this license is intended to, or may be used to, prevent 202 | complete compliance by all parties with all applicable laws. 203 | 204 | 205 | NO WARRANTY 206 | =========== 207 | 208 | There is no warranty for the Work. Except when otherwise stated in 209 | writing, the Copyright Holder provides the Work `as is', without 210 | warranty of any kind, either expressed or implied, including, but not 211 | limited to, the implied warranties of merchantability and fitness for a 212 | particular purpose. The entire risk as to the quality and performance 213 | of the Work is with you. Should the Work prove defective, you assume 214 | the cost of all necessary servicing, repair, or correction. 215 | 216 | In no event unless required by applicable law or agreed to in writing 217 | will The Copyright Holder, or any author named in the components of the 218 | Work, or any other party who may distribute and/or modify the Work as 219 | permitted above, be liable to you for damages, including any general, 220 | special, incidental or consequential damages arising out of any use of 221 | the Work or out of inability to use the Work (including, but not limited 222 | to, loss of data, data being rendered inaccurate, or losses sustained by 223 | anyone as a result of any failure of the Work to operate with any other 224 | programs), even if the Copyright Holder or said author or said other 225 | party has been advised of the possibility of such damages. 226 | 227 | 228 | MAINTENANCE OF THE WORK 229 | ======================= 230 | 231 | The Work has the status `author-maintained' if the Copyright Holder 232 | explicitly and prominently states near the primary copyright notice in 233 | the Work that the Work can only be maintained by the Copyright Holder 234 | or simply that it is `author-maintained'. 235 | 236 | The Work has the status `maintained' if there is a Current Maintainer 237 | who has indicated in the Work that they are willing to receive error 238 | reports for the Work (for example, by supplying a valid e-mail 239 | address). It is not required for the Current Maintainer to acknowledge 240 | or act upon these error reports. 241 | 242 | The Work changes from status `maintained' to `unmaintained' if there 243 | is no Current Maintainer, or the person stated to be Current 244 | Maintainer of the work cannot be reached through the indicated means 245 | of communication for a period of six months, and there are no other 246 | significant signs of active maintenance. 247 | 248 | You can become the Current Maintainer of the Work by agreement with 249 | any existing Current Maintainer to take over this role. 250 | 251 | If the Work is unmaintained, you can become the Current Maintainer of 252 | the Work through the following steps: 253 | 254 | 1. Make a reasonable attempt to trace the Current Maintainer (and 255 | the Copyright Holder, if the two differ) through the means of 256 | an Internet or similar search. 257 | 258 | 2. If this search is successful, then enquire whether the Work 259 | is still maintained. 260 | 261 | a. If it is being maintained, then ask the Current Maintainer 262 | to update their communication data within one month. 263 | 264 | b. If the search is unsuccessful or no action to resume active 265 | maintenance is taken by the Current Maintainer, then announce 266 | within the pertinent community your intention to take over 267 | maintenance. (If the Work is a LaTeX work, this could be 268 | done, for example, by posting to comp.text.tex.) 269 | 270 | 3a. If the Current Maintainer is reachable and agrees to pass 271 | maintenance of the Work to you, then this takes effect 272 | immediately upon announcement. 273 | 274 | b. If the Current Maintainer is not reachable and the Copyright 275 | Holder agrees that maintenance of the Work be passed to you, 276 | then this takes effect immediately upon announcement. 277 | 278 | 4. If you make an `intention announcement' as described in 2b. above 279 | and after three months your intention is challenged neither by 280 | the Current Maintainer nor by the Copyright Holder nor by other 281 | people, then you may arrange for the Work to be changed so as 282 | to name you as the (new) Current Maintainer. 283 | 284 | 5. If the previously unreachable Current Maintainer becomes 285 | reachable once more within three months of a change completed 286 | under the terms of 3b) or 4), then that Current Maintainer must 287 | become or remain the Current Maintainer upon request provided 288 | they then update their communication data within one month. 289 | 290 | A change in the Current Maintainer does not, of itself, alter the fact 291 | that the Work is distributed under the LPPL license. 292 | 293 | If you become the Current Maintainer of the Work, you should 294 | immediately provide, within the Work, a prominent and unambiguous 295 | statement of your status as Current Maintainer. You should also 296 | announce your new status to the same pertinent community as 297 | in 2b) above. 298 | 299 | 300 | WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE 301 | ====================================================== 302 | 303 | This section contains important instructions, examples, and 304 | recommendations for authors who are considering distributing their 305 | works under this license. These authors are addressed as `you' in 306 | this section. 307 | 308 | Choosing This License or Another License 309 | ---------------------------------------- 310 | 311 | If for any part of your work you want or need to use *distribution* 312 | conditions that differ significantly from those in this license, then 313 | do not refer to this license anywhere in your work but, instead, 314 | distribute your work under a different license. You may use the text 315 | of this license as a model for your own license, but your license 316 | should not refer to the LPPL or otherwise give the impression that 317 | your work is distributed under the LPPL. 318 | 319 | The document `modguide.tex' in the base LaTeX distribution explains 320 | the motivation behind the conditions of this license. It explains, 321 | for example, why distributing LaTeX under the GNU General Public 322 | License (GPL) was considered inappropriate. Even if your work is 323 | unrelated to LaTeX, the discussion in `modguide.tex' may still be 324 | relevant, and authors intending to distribute their works under any 325 | license are encouraged to read it. 326 | 327 | A Recommendation on Modification Without Distribution 328 | ----------------------------------------------------- 329 | 330 | It is wise never to modify a component of the Work, even for your own 331 | personal use, without also meeting the above conditions for 332 | distributing the modified component. While you might intend that such 333 | modifications will never be distributed, often this will happen by 334 | accident -- you may forget that you have modified that component; or 335 | it may not occur to you when allowing others to access the modified 336 | version that you are thus distributing it and violating the conditions 337 | of this license in ways that could have legal implications and, worse, 338 | cause problems for the community. It is therefore usually in your 339 | best interest to keep your copy of the Work identical with the public 340 | one. Many works provide ways to control the behavior of that work 341 | without altering any of its licensed components. 342 | 343 | How to Use This License 344 | ----------------------- 345 | 346 | To use this license, place in each of the components of your work both 347 | an explicit copyright notice including your name and the year the work 348 | was authored and/or last substantially modified. Include also a 349 | statement that the distribution and/or modification of that 350 | component is constrained by the conditions in this license. 351 | 352 | Here is an example of such a notice and statement: 353 | 354 | %% pig.dtx 355 | %% Copyright 2005 M. Y. Name 356 | % 357 | % This work may be distributed and/or modified under the 358 | % conditions of the LaTeX Project Public License, either version 1.3 359 | % of this license or (at your option) any later version. 360 | % The latest version of this license is in 361 | % http://www.latex-project.org/lppl.txt 362 | % and version 1.3 or later is part of all distributions of LaTeX 363 | % version 2005/12/01 or later. 364 | % 365 | % This work has the LPPL maintenance status `maintained'. 366 | % 367 | % The Current Maintainer of this work is M. Y. Name. 368 | % 369 | % This work consists of the files pig.dtx and pig.ins 370 | % and the derived file pig.sty. 371 | 372 | Given such a notice and statement in a file, the conditions 373 | given in this license document would apply, with the `Work' referring 374 | to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being 375 | generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' 376 | referring to any `LaTeX-Format', and both `Copyright Holder' and 377 | `Current Maintainer' referring to the person `M. Y. Name'. 378 | 379 | If you do not want the Maintenance section of LPPL to apply to your 380 | Work, change `maintained' above into `author-maintained'. 381 | However, we recommend that you use `maintained', as the Maintenance 382 | section was added in order to ensure that your Work remains useful to 383 | the community even when you can no longer maintain and support it 384 | yourself. 385 | 386 | Derived Works That Are Not Replacements 387 | --------------------------------------- 388 | 389 | Several clauses of the LPPL specify means to provide reliability and 390 | stability for the user community. They therefore concern themselves 391 | with the case that a Derived Work is intended to be used as a 392 | (compatible or incompatible) replacement of the original Work. If 393 | this is not the case (e.g., if a few lines of code are reused for a 394 | completely different task), then clauses 6b and 6d shall not apply. 395 | 396 | 397 | Important Recommendations 398 | ------------------------- 399 | 400 | Defining What Constitutes the Work 401 | 402 | The LPPL requires that distributions of the Work contain all the 403 | files of the Work. It is therefore important that you provide a 404 | way for the licensee to determine which files constitute the Work. 405 | This could, for example, be achieved by explicitly listing all the 406 | files of the Work near the copyright notice of each file or by 407 | using a line such as: 408 | 409 | % This work consists of all files listed in manifest.txt. 410 | 411 | in that place. In the absence of an unequivocal list it might be 412 | impossible for the licensee to determine what is considered by you 413 | to comprise the Work and, in such a case, the licensee would be 414 | entitled to make reasonable conjectures as to which files comprise 415 | the Work. 416 | 417 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 合肥工业大学课程设计 LaTeX 模板 2 | ![visitors](https://visitor-badge.glitch.me/badge?page_id=HFUTTUG.HFUT_Course_Report_Template) 3 | 4 | 本项目是合肥工业大学课程设计 LaTeX 模板 HFUT_Course_Report_Template,按照我校课程设计封面以及常规报告的要求编写,兼容最新版的 TeX Live、MacTeX 、MiKTeX 发行版,支持跨平台使用。 5 | 6 | 注意: 7 | 8 | - report.pdf **使用模板前应仔细阅读**。 9 | 10 | ## 编译文档 11 | 12 | - 编译论文 `report.pdf`: 13 | ``` 14 | latexmk -xelatex report.tex 15 | ``` 16 | - 如需清理论文编译过程中的临时文件,可以: 17 | ``` 18 | latexmk -c 19 | ``` 20 | ## 下载地址 21 | 22 | - [GitHub Releases](https://github.com/HFUTTUG/HFUT_Course_Report_Template/releases) 23 | 24 | ## 反馈问题 25 | 26 | 如果发现模板有问题,请按照以下步骤操作: 27 | 28 | 1. 阅读学校的标准,判断是否符合学校的要求; 29 | 2. 阅读 [常见问题 FAQ](https://github.com/HFUTTUG/HFUT_Course_Report_Template/wiki/常见问题); 30 | 3. 将 TeX 发行版和宏包升级到最新,并且将模板升级到 Github 上最新版本, 31 | 查看问题是否已经修复; 32 | 4. 在 [GitHub Issues](https://github.com/HFUTTUG/HFUT_Course_Report_Template/issues) 33 | 中搜索该问题的关键词; 34 | 5. 在 [GitHub Issues](https://github.com/HFUTTUG/HFUT_Course_Report_Template/issues) 35 | 中提出新 issue,并回答以下问题: 36 | - 使用了什么版本的 TeX Live / MacTeX / MiKTeX ? 37 | - 具体的问题是什么? 38 | - 正确的结果应该是什么样的? 39 | - 是否应该附上相关源码或者截图? 40 | 41 | ## 更多资料 42 | 43 | - [一份简短的关于 LaTeX 安装的介绍](https://github.com/OsbertWang/install-latex) 44 | - [一份不太简短的 LaTeXe 介绍](http://mirrors.ctan.org/info/lshort/chinese/lshort-zh-cn.pdf) 45 | - [常见问题 FAQ](https://github.com/HFUTTUG/HFUT_Course_Report_Template/wiki/常见问题) 46 | - [参与开发](https://github.com/HFUTTUG/HFUT_Course_Report_Template/wiki/参与开发) 47 | 48 | ## 写在后面 49 | 50 | - 作者能力有限,此模板还有诸多改进之处,希望有能力的同学能够进行修改并参与开发; 51 | - 有意加入[@HFUTTUG](https://github.com/HFUTTUG)的同学可发送[📧Email](mailto:poet@poetyin.com); 52 | - LaTeX 有诸多优势,希望对它感兴趣的同学能够尽快建立一个组织或者团体开发我校 LaTeX 相关模板,使之规范化,个人的力量总是有限的,Happy LaTeXing! -------------------------------------------------------------------------------- /figures/HFUT_Horizontal_font&logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/HFUT_Horizontal_font&logo.pdf -------------------------------------------------------------------------------- /figures/HFUT_Vertical_font&logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/HFUT_Vertical_font&logo.pdf -------------------------------------------------------------------------------- /figures/HFUT_font_zh-ch&en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/HFUT_font_zh-ch&en.pdf -------------------------------------------------------------------------------- /figures/HFUT_font_zh-ch.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/HFUT_font_zh-ch.pdf -------------------------------------------------------------------------------- /figures/HFUT_logo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/HFUT_logo.pdf -------------------------------------------------------------------------------- /figures/cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/cat.pdf -------------------------------------------------------------------------------- /figures/f1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/f1.png -------------------------------------------------------------------------------- /figures/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/figures/title.png -------------------------------------------------------------------------------- /hfutreport.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 2 | \ProvidesClass{hfutreport} 3 | [2021/04/23 v1.0 Standard LaTeX Template for HFUT_Course_Report_Template] 4 | %% Inital Code 5 | \newif\if@hfutrp@bwprint\@hfutrp@bwprintfalse 6 | % tokens definition 7 | %%%% COVER 8 | \newcommand\hfutrp@tokens@title{} 9 | \newcommand*\hfutrp@tokens@stunum{} 10 | \newcommand*\hfutrp@tokens@stuname{} 11 | \newcommand*\hfutrp@tokens@stuclass{} 12 | \newcommand*\hfutrp@tokens@supervisor{} 13 | \newcommand*\hfutrp@tokens@dateinput{} 14 | \newcommand*\hfutrp@tokens@maincontent{} 15 | 16 | % 没有 17 | %% Declaration of Options 18 | \DeclareOption{colorprint}{\@hfutrp@bwprintfalse} 19 | \DeclareOption{bwprint}{\@hfutrp@bwprinttrue} 20 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 21 | %% Executing of Options 22 | \ExecuteOptions{colorprint} 23 | \ProcessOptions\relax 24 | %% Loading Class 25 | \LoadClass[a4paper,12pt,fancyhdr]{article} 26 | %% Loading Package 27 | \RequirePackage{ifxetex} 28 | \RequireXeTeX 29 | \ifxetex\else 30 | \ClassError{hfutreport}{You must use the `xelatex' driver\MessageBreak Please choose `xelatex'}{% 31 | Just choose `xelatex', no `pdflatex' or `latex' and so on.} 32 | \fi 33 | % 支持中文的 ctex 宏包 34 | \RequirePackage{ctex} 35 | % 页面布局 36 | \RequirePackage{geometry} 37 | % 数学宏包 38 | \RequirePackage{amsmath} 39 | \RequirePackage{amsfonts} 40 | \RequirePackage{amssymb} 41 | \RequirePackage{bm} 42 | %\RequirePackage{titletoc} 43 | % 设置颜色 44 | \RequirePackage{xcolor} 45 | % 插入图片 46 | \RequirePackage{graphicx} 47 | \RequirePackage{float} 48 | % 表格 49 | \RequirePackage{array} 50 | %% 长表格 51 | \RequirePackage{longtable} 52 | %% booktabs 提供了\toprule 等命令. 53 | \RequirePackage{booktabs,tabularx} 54 | %% multirow 支持在表格中跨行 55 | \RequirePackage{multirow} 56 | %% 调整间隔, 让表格更好看些 57 | \RequirePackage{bigstrut} 58 | %% 在跨行表格中输入定界符 59 | \RequirePackage{bigdelim} 60 | % 封面固定列宽 61 | \RequirePackage{makecell} 62 | % 保护脆落命令 63 | \RequirePackage{cprotect} 64 | % 设置代码环境 65 | \RequirePackage{listings} 66 | \RequirePackage{xcolor} 67 | % 插入链接 68 | \RequirePackage{url} 69 | % 绘图的包 70 | %\RequirePackage{tikz} 71 | %\usetikzlibrary{snakes} 72 | 73 | % 字图与子标题 74 | \RequirePackage{subcaption} 75 | \RequirePackage[titles]{tocloft} 76 | %\renewcommand{\cftdot}{$\cdot$} 77 | %\renewcommand{\cftsecdotsep}{1.5} 78 | \renewcommand{\cftsecdotsep}{4.5} 79 | \setlength{\cftbeforesecskip}{7pt} 80 | \setlength{\cftbeforesubsecskip}{3pt} 81 | %\setlength{\cftbeforesubsecskip}{5pt} 82 | \renewcommand{\cftsecfont}{\bfseries\zihao{-4}\heiti} 83 | \renewcommand{\cftsecleader}{\cftdotfill{\cftsecdotsep}} 84 | \renewcommand{\cftsecaftersnumb}{\hskip.4em} 85 | 86 | 87 | 88 | \definecolor{dkgreen}{rgb}{0,0.6,0} 89 | \definecolor{gray}{rgb}{0.5,0.5,0.5} 90 | \definecolor{mauve}{rgb}{0.58,0,0.82} 91 | 92 | \lstset{ 93 | frame=tb, 94 | aboveskip=3mm, 95 | belowskip=3mm, 96 | showstringspaces=false, 97 | columns=flexible, 98 | framerule=1pt, 99 | rulecolor=\color{gray!35}, 100 | backgroundcolor=\color{gray!5}, 101 | basicstyle={\small\ttfamily}, 102 | numbers=none, 103 | numberstyle=\tiny\color{gray}, 104 | keywordstyle=\color{blue}, 105 | commentstyle=\color{dkgreen}, 106 | stringstyle=\color{mauve}, 107 | breaklines=true, 108 | breakatwhitespace=true, 109 | tabsize=3, 110 | } 111 | % 首行缩进 112 | \RequirePackage{indentfirst} 113 | % 设置浮动体的标题 114 | \RequirePackage{caption} 115 | % 定制列表环境 116 | \RequirePackage{enumitem} 117 | % 下划线 118 | \RequirePackage{ulem} 119 | % 尺寸计算 120 | \RequirePackage{calc} 121 | 122 | \RequirePackage[titletoc,title]{appendix} 123 | 124 | %\RequirePackage[title,toc,titletoc]{appendix} 125 | 126 | \RequirePackage{etoolbox} 127 | \AtBeginEnvironment{thebibliography}{% 128 | \phantomsection 129 | \addcontentsline{toc}{section}{\refname} 130 | } 131 | % 超链接 hyperref 的设置 132 | \RequirePackage{hyperref} 133 | % 智能自动化交叉引用 134 | \RequirePackage{cleveref} 135 | %% Document Layout 136 | % 页面布局 137 | \geometry{top=25mm,bottom=25mm,left=25mm,right=25mm} 138 | \renewcommand*{\baselinestretch}{1.38} 139 | % 修改tabular 环境, 设置表格中的行间距为正文行间距. 140 | \let\hfutrp@oldtabular\tabular 141 | \let\hfutrp@endoldtabular\endtabular 142 | \renewenvironment{tabular}% 143 | {\bgroup% 144 | \renewcommand{\arraystretch}{1.38}% 145 | \hfutrp@oldtabular}% 146 | {\hfutrp@endoldtabular\egroup} 147 | % 每行缩进两个汉字 148 | \setlength\parindent{2em} 149 | % 设置字体 150 | \setmainfont{Times New Roman} 151 | %\setmonofont{Courier New} 152 | \setsansfont{Arial} 153 | \setCJKfamilyfont{kai}[AutoFakeBold]{simkai.ttf} 154 | \newcommand*{\kai}{\CJKfamily{kai}} 155 | \setCJKfamilyfont{song}[AutoFakeBold]{SimSun} 156 | \newcommand*{\song}{\CJKfamily{song}} 157 | 158 | \renewcommand\normalsize{% 159 | \@setfontsize\normalsize{12.05}{14.45}% 160 | \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@ 161 | \abovedisplayshortskip \z@ \@plus3\p@ 162 | \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@} 163 | % 数学环境, 定理等设置 164 | \newtheorem{definition}{\hfutrp@cap@definition} 165 | \newtheorem{theorem}{\hfutrp@cap@theorem} 166 | \newtheorem{lemma}{\hfutrp@cap@lemma} 167 | \newtheorem{corollary}{\hfutrp@cap@corollary} 168 | \newtheorem{assumption}{\hfutrp@cap@assumption} 169 | \newtheorem{conjecture}{\hfutrp@cap@conjecture} 170 | \newtheorem{axiom}{\hfutrp@cap@axiom} 171 | \newtheorem{principle}{\hfutrp@cap@principle} 172 | \newtheorem{problem}{\hfutrp@cap@problem} 173 | \newtheorem{example}{\hfutrp@cap@example} 174 | \newtheorem{proof}{\hfutrp@cap@proof} 175 | \newtheorem{solution}{\hfutrp@cap@solution} 176 | 177 | % 浮动环境设置 178 | % 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境, 179 | % 而这通常不是我们想要的, 我们将这个要求降低到 5%. 180 | \renewcommand*{\textfraction}{0.05} 181 | % 有时如果多个浮动环境连续放在一起, \LaTeX{} 182 | % 会将它们分在几个不同页,即使它们可在同一页放 183 | % 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮 184 | % 动环境的最大比例. 185 | \renewcommand*{\topfraction}{0.9} 186 | \renewcommand*{\bottomfraction}{0.8} 187 | % 有时\LaTeX{}会把一个浮动环境单独放在一页, 188 | % 我们要求这个环境至少要占据 85% 才能单独放在一页. 189 | % 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|. 190 | \renewcommand*{\floatpagefraction}{0.85} 191 | % 关于图片 graphicx 192 | % 如果图片没有指定后缀, 依次按下列顺序搜索 193 | \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png} 194 | % 设置图表搜索路径, 可以给图表文件夹取如下名字 195 | \graphicspath{{figures/}{figure/}{pictures/}% 196 | {picture/}{pic/}{pics/}{image/}{images/}} 197 | % 图表标题 198 | \DeclareCaptionFont{song}{\songti} 199 | \DeclareCaptionFont{minusfour}{\zihao{-4}} 200 | \captionsetup[figure]{% 201 | format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样. 202 | labelsep=quad, % 分隔符是一个空格 203 | font={song,minusfour,bf}, % 图的字体, 宋体小四 204 | position=bottom % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置. 205 | } 206 | \captionsetup[table]{% 207 | format=hang, % 标题从第二行开始都有缩进, 应该和 justification=raggedright 的效果一样. 208 | labelsep=quad, % 分隔符是一个空格 209 | font={song,minusfour,bf}, % 表的字体, 宋体小四 210 | position=top % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置. 211 | } 212 | % 列表环境设置 213 | \setlist{% 214 | topsep=0.3em, % 列表顶端的垂直空白 215 | partopsep=0pt, % 列表环境前面紧接着一个空白行时其顶端的额外垂直空白 216 | itemsep=0ex plus 0.1ex, % 列表项之间的额外垂直空白 217 | parsep=0pt, % 列表项内的段落之间的垂直空白 218 | leftmargin=1.5em, % 环境的左边界和列表之间的水平距离 219 | rightmargin=0em, % 环境的右边界和列表之间的水平距离 220 | labelsep=0.5em, % 包含标签的盒子与列表项的第一行文本之间的间隔 221 | labelwidth=2em % 包含标签的盒子的正常宽度;若实际宽度更宽,则使用实际宽度。 222 | } 223 | 224 | % 超链接 225 | \hypersetup{% 226 | % xetex, 227 | % unicode=false, % hyperref 和 xetex 同时使用时不能开启 Unicode 选项. 228 | pdfstartview=FitH, 229 | CJKbookmarks=true, 230 | bookmarksnumbered=true, 231 | bookmarksopen=true, 232 | colorlinks, %注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉) 233 | pdfborder=001, %注释掉此项则交叉引用为彩色边框 234 | allcolors=black, 235 | pdftitle=\@title, 236 | pdfauthor=\hfutrp@tokens@stuname, 237 | breaklinks=true}% 238 | % \if@hfutrp@bwprint 239 | % \AtBeginDocument{\hypersetup{hidelinks}} 240 | % \else\relax\fi 241 | \pdfstringdefDisableCommands{% 242 | \def\cftdotfill{ }% 243 | } 244 | \lstnewenvironment{tcode} 245 | { 246 | \lstset{basicstyle = \small\ttfamily, 247 | language=TeX, 248 | tabsize = 4, 249 | frame = single, 250 | escapechar = `, 251 | breaklines = true, 252 | breakatwhitespace = true, 253 | frameround = tttt, 254 | } 255 | } 256 | {} 257 | %%% crefformat settings 258 | \crefformat{figure}{#2图~#1#3} 259 | \crefrangeformat{figure}{图~(#3#1#4)\;\~{}\;(#5#2#6)} 260 | \crefmultiformat{figure}{图~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)} 261 | 262 | \crefformat{table}{#2表#1#3} 263 | \crefrangeformat{table}{表(#3#1#4)\;\~{}\;(#5#2#6)} 264 | \crefmultiformat{table}{表~(#2#1#3)}{和~(#2#1#3)}{,(#2#1#3)}{和~(#2#1#3)} 265 | 266 | \crefformat{equation}{#2~(#1#3)} 267 | \crefrangeformat{equation}{~(#3#1#4)\;\~{}\;(#5#2#6)} 268 | \crefmultiformat{equation}{~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 269 | 270 | \crefformat{definition}{#2\hfutrp@cap@definition~#1#3} 271 | \crefrangeformat{definition}{\hfutrp@cap@definition~(#3#1#4)\;\~{}\;(#5#2#6)} 272 | \crefmultiformat{definition}{\hfutrp@cap@definition~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 273 | 274 | \crefformat{theorem}{#2\hfutrp@cap@theorem~#1#3} 275 | \crefrangeformat{theorem}{\hfutrp@cap@theorem~(#3#1#4)\;\~{}\;(#5#2#6)} 276 | \crefmultiformat{theorem}{\hfutrp@cap@theorem~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 277 | 278 | \crefformat{lemma}{#2\hfutrp@cap@lemma~#1#3} 279 | \crefrangeformat{lemma}{\hfutrp@cap@lemma~(#3#1#4)\;\~{}\;(#5#2#6)} 280 | \crefmultiformat{lemma}{\hfutrp@cap@lemma~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 281 | 282 | \crefformat{corollary}{#2\hfutrp@cap@corollary~#1#3} 283 | \crefrangeformat{corollary}{\hfutrp@cap@corollary~(#3#1#4)\;\~{}\;(#5#2#6)} 284 | \crefmultiformat{corollary}{\hfutrp@cap@corollary~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 285 | 286 | \crefformat{assumption}{#2\hfutrp@cap@assumption~#1#3} 287 | \crefrangeformat{assumption}{\hfutrp@cap@assumption~(#3#1#4)\;\~{}\;(#5#2#6)} 288 | \crefmultiformat{assumption}{\hfutrp@cap@assumption~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 289 | 290 | \crefformat{conjecture}{#2\hfutrp@cap@conjecture~#1#3} 291 | \crefrangeformat{conjecture}{\hfutrp@cap@conjecture~(#3#1#4)\;\~{}\;(#5#2#6)} 292 | \crefmultiformat{conjecture}{\hfutrp@cap@conjecture~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 293 | 294 | \crefformat{axiom}{#2\hfutrp@cap@axiom~#1#3} 295 | \crefrangeformat{axiom}{\hfutrp@cap@axiom~(#3#1#4)\;\~{}\;(#5#2#6)} 296 | \crefmultiformat{axiom}{\hfutrp@cap@axiom~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 297 | 298 | \crefformat{principle}{#2\hfutrp@cap@principle~#1#3} 299 | \crefrangeformat{principle}{\hfutrp@cap@principle~(#3#1#4)\;\~{}\;(#5#2#6)} 300 | \crefmultiformat{principle}{\hfutrp@cap@principle~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 301 | 302 | \crefformat{problem}{#2\hfutrp@cap@problem~#1#3} 303 | \crefrangeformat{problem}{\hfutrp@cap@problem~(#3#1#4)\;\~{}\;(#5#2#6)} 304 | \crefmultiformat{problem}{\hfutrp@cap@problem~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 305 | 306 | \crefformat{example}{#2\hfutrp@cap@example~#1#3} 307 | \crefrangeformat{example}{\hfutrp@cap@example~(#3#1#4)\;\~{}\;(#5#2#6)} 308 | \crefmultiformat{example}{\hfutrp@cap@example~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 309 | 310 | \crefformat{proof}{#2\hfutrp@cap@proof~#1#3} 311 | \crefrangeformat{proof}{\hfutrp@cap@proof~(#3#1#4)\;\~{}\;(#5#2#6)} 312 | \crefmultiformat{proof}{\hfutrp@cap@proof~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 313 | 314 | \crefformat{solution}{#2\hfutrp@cap@solution~#1#3} 315 | \crefrangeformat{solution}{\hfutrp@cap@solution~(#3#1#4)\;\~{}\;(#5#2#6)} 316 | \crefmultiformat{solution}{\hfutrp@cap@solution~(#2#1#3)}{ 和~(#2#1#3)}{,(#2#1#3)}{ 和~(#2#1#3)} 317 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 318 | 319 | %% Document Markup 320 | 321 | % 生成封面, 使用\maketitle 322 | \renewcommand{\maketitle}{\par 323 | \begingroup 324 | \newpage 325 | \global\@topnum\z@ % Prevents figures from going at top of page. 326 | \@maketitle 327 | \endgroup 328 | \global\let\thanks\relax 329 | \global\let\maketitle\relax 330 | \global\let\@maketitle\relax 331 | \global\let\@thanks\@empty 332 | \global\let\@author\@empty 333 | \global\let\@date\@empty 334 | \global\let\@title\@empty 335 | \global\let\title\relax 336 | \global\let\author\relax 337 | \global\let\date\relax 338 | \global\let\and\relax 339 | } 340 | \def\@maketitle{% 341 | \newpage 342 | \thispagestyle{empty} 343 | % COVER 344 | \begin{center} 345 | % Upper part of the page 346 | \includegraphics[width=0.68\textwidth]{figures/HFUT_font_zh-ch}\\[1cm] 347 | 348 | {\fontsize{70pt}\baselineskip 课\qquad\ 程\qquad\ 设\qquad\ 计}\\[7cm] 349 | 350 | % Author and supervisor 351 | \begin{center} 352 | \begin{large} 353 | \begin{tabular}{rc} 354 | \zihao{3}{设计题目}& \zihao{-3}{\@title}\\ 355 | \cline{2-2}\\ 356 | \zihao{3}{学生姓名}& \zihao{-3}{\hfutrp@tokens@stuname}\\ 357 | \cline{2-2}\\ 358 | \zihao{3} {学\qquad 号} & \hspace{1.7cm} \zihao{-3} {\hfutrp@tokens@stunum\hspace{1.7cm}} \\ 359 | \cline{2-2}\\ 360 | \zihao{3}{专业班级}& \zihao{-3}{\hfutrp@tokens@stuclass}\\ 361 | \cline{2-2}\\ 362 | \zihao{3}{指导教师}& \zihao{-3}{\hfutrp@tokens@supervisor}\\ 363 | \cline{2-2} 364 | \end{tabular} 365 | \end{large} 366 | \end{center} 367 | 368 | \vfill 369 | 370 | % Bottom of the page 371 | {\zihao{3} \textbf{\hfutrp@tokens@dateinput}} 372 | 373 | \end{center} 374 | \null 375 | \makeothertitle 376 | } 377 | 378 | %% 定义 任务书页 379 | \def\makeothertitle{% 380 | \newpage 381 | \thispagestyle{empty} 382 | \begin{center} 383 | \zihao{-2}\textbf{合肥工业大学课程设计任务书} 384 | \end{center} 385 | 386 | \begin{table}[!htbp] 387 | \centering 388 | \begin{tabular}{|c|p{26em}|c|p{3em}|} 389 | \hline 390 | \zihao{4}\textbf {\makecell[{{p{2em}}}]{设计题目}} & \centering {\zihao{-4}\textbf{\@title}} & \zihao{4}\textbf{成绩} & \\ 391 | \hline 392 | \zihao{4}\textbf {\makecell[{{p{1em}}}]{\quad \\ \quad \\ \quad 课程设计主要内容 \quad \\ \quad \\ \quad}} & \multicolumn{3} {p{33em}|} 393 | {\zihao{-4} \qquad 394 | \hfutrp@tokens@maincontent 395 | } \\ 396 | \hline 397 | \zihao{4}\textbf {\makecell[{{p{1em}}}]{ 指导教师评语 }} & \multicolumn{3}{l|} 398 | { 399 | \begin{tabular}{@{}p{34em}@{}} 400 | \textbf{ 401 | \zihao{-5} 建议:从学生的工作态度、工作量、设计(论文)的创造性、学术性、实用性及书面表达能力等方面给出评价。}\\ \\ \\ \\ \\ 402 | \raggedleft \zihao{4} \textbf{ 签名:\quad\qquad\qquad\qquad\qquad 年\quad \quad 月\quad \quad 日 \qquad\qquad } \\ 403 | \end{tabular} 404 | } \\ 405 | \hline 406 | \end{tabular}% 407 | \end{table}% 408 | \null 409 | \newpage 410 | } 411 | 412 | 413 | % 中文标题名称设置 414 | \renewcommand\contentsname{\hfutrp@cap@contentsname} 415 | \renewcommand\listfigurename{\hfutrp@cap@listfigurename} 416 | \renewcommand\listtablename{\hfutrp@cap@listtablename} 417 | \renewcommand\refname{\hfutrp@cap@refname} 418 | \renewcommand\indexname{\hfutrp@cap@indexname} 419 | \renewcommand\figurename{\hfutrp@cap@figurename} 420 | \renewcommand\tablename{\hfutrp@cap@tablename} 421 | \renewcommand\appendixname{\hfutrp@cap@appendixname} 422 | \renewcommand\abstractname{\hfutrp@cap@abstractname} 423 | 424 | % 中文标题格式设置 425 | % 目录深度 426 | \setcounter{secnumdepth}{3} 427 | % 节标题格式, 居中, 使用\chinese命令修改计数器 428 | \def\@seccntformat#1{\csname the#1\endcsname\ } 429 | \renewcommand\thesection{\chinese{section}、} 430 | \renewcommand\thesubsection{\arabic{section}\thinspace.\thinspace\arabic{subsection}} 431 | \renewcommand\thesubsubsection{\thesubsection\thinspace.\thinspace\arabic{subsubsection}} 432 | \renewcommand\section{\@startsection{section}{1}{\z@}% 433 | {-3.5ex \@plus -1ex \@minus -.2ex}% 434 | {2.3ex \@plus.2ex}% 435 | {\centering\normalfont\Large\bfseries}} 436 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% 437 | {-3.25ex\@plus -1ex \@minus -.2ex}% 438 | {1.5ex \@plus .2ex}% 439 | {\normalfont\large\bfseries}} 440 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% 441 | {-3.25ex\@plus -1ex \@minus -.2ex}% 442 | {1.5ex \@plus .2ex}% 443 | {\normalfont\normalsize\bfseries}} 444 | \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% 445 | {3.25ex \@plus1ex \@minus.2ex}% 446 | {-1em}% 447 | {\normalfont\normalsize\bfseries}} 448 | \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% 449 | {3.25ex \@plus1ex \@minus .2ex}% 450 | {-1em}% 451 | {\normalfont\normalsize\bfseries}} 452 | 453 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 454 | %% Define new environment and command 455 | %% 摘要两个字设置为 4 号. 456 | %% 定义摘要环境 457 | \renewenvironment{abstract}{% 458 | \if@twocolumn 459 | \section*{\abstractname}% 460 | \else 461 | \begin{center}% 462 | {\zihao{4}\bfseries \abstractname\vspace{-.5em}\vspace{\z@}}% 463 | \end{center}% 464 | \quotation 465 | \fi} 466 | {\if@twocolumn\else\endquotation\newpage\null\fi} 467 | \renewenvironment{quotation} 468 | {\list{}{\listparindent 2em% 469 | \itemindent \listparindent 470 | \rightmargin\z@ 471 | \leftmargin\z@ 472 | \parsep \z@ \@plus\p@}% 473 | \item\relax} 474 | {\endlist} 475 | 476 | % 定义附录 477 | 478 | % \renewcommand{\setthesection}{\appendixname\Alph{section}} 479 | % \renewcommand\appendix{\par 480 | % \setcounter{section}{0}% 481 | % \setcounter{subsection}{0}% 482 | % \gdef\thesection{\appendixname\@Alph\c@section}} 483 | % 重定义参考文献环境 484 | \renewenvironment{thebibliography}[1] 485 | {\section*{\refname}% 486 | \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% 487 | \list{\@biblabel{\@arabic\c@enumiv}}% 488 | {\settowidth\labelwidth{\@biblabel{#1}}% 489 | \leftmargin\labelwidth 490 | \advance\leftmargin\labelsep 491 | \@openbib@code 492 | \usecounter{enumiv}% 493 | \let\p@enumiv\@empty 494 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 495 | \sloppy 496 | \clubpenalty4000 497 | \@clubpenalty \clubpenalty 498 | \widowpenalty4000% 499 | \sfcode`\.\@m} 500 | {\def\@noitemerr 501 | {\@latex@warning{Empty `thebibliography' environment}}% 502 | \endlist} 503 | 504 | \newcommand*\stunum[1]{% 505 | \renewcommand{\hfutrp@tokens@stunum}{#1}} 506 | \newcommand*\stuname[1]{% 507 | \renewcommand{\hfutrp@tokens@stuname}{#1}} 508 | \newcommand*\stuclass[1]{% 509 | \renewcommand{\hfutrp@tokens@stuclass}{#1}} 510 | \newcommand*\supervisor[1]{% 511 | \renewcommand{\hfutrp@tokens@supervisor}{#1}} 512 | \newcommand*\dateinput[1]{% 513 | \renewcommand{\hfutrp@tokens@dateinput}{#1}} 514 | \newcommand*\maincontent[1]{% 515 | \renewcommand{\hfutrp@tokens@maincontent}{#1}} 516 | 517 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 518 | 519 | %% Initialization 520 | %%%数学定理相关的常量 521 | \newcommand*{\hfutrp@cap@definition}{定义} 522 | \newcommand*{\hfutrp@cap@theorem}{定理} 523 | \newcommand*{\hfutrp@cap@lemma}{引理} 524 | \newcommand*{\hfutrp@cap@corollary}{推论} 525 | \newcommand*{\hfutrp@cap@assumption}{假设} 526 | \newcommand*{\hfutrp@cap@conjecture}{猜想} 527 | \newcommand*{\hfutrp@cap@axiom}{公理} 528 | \newcommand*{\hfutrp@cap@principle}{定律} 529 | \newcommand*{\hfutrp@cap@problem}{问题} 530 | \newcommand*{\hfutrp@cap@example}{例} 531 | \newcommand*{\hfutrp@cap@proof}{证明} 532 | \newcommand*{\hfutrp@cap@solution}{解} 533 | %%% 中文标题名称 534 | \newcommand*{\hfutrp@cap@contentsname}{目录} 535 | \newcommand*{\hfutrp@cap@listfigurename}{插图清单} 536 | \newcommand*{\hfutrp@cap@listtablename}{附表清单} 537 | \newcommand*{\hfutrp@cap@refname}{参考文献} 538 | \newcommand*{\hfutrp@cap@indexname}{索引} 539 | \newcommand*{\hfutrp@cap@figurename}{图} 540 | \newcommand*{\hfutrp@cap@tablename}{表} 541 | \newcommand*{\hfutrp@cap@appendixname}{附录} 542 | \newcommand*{\hfutrp@cap@abstractname}{摘要} 543 | %%% 中文关键字 544 | \newcommand*{\hfutrp@cap@keywordsname}{关键字} 545 | 546 | %设置目录格式 547 | % 节的目录格式 548 | % \titlecontents{section}[0pt]{\vspace{2mm}\bfseries} 549 | % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 550 | % % 小节的目录格式 551 | % \titlecontents{subsection}[30pt]{\songti} 552 | % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 553 | % \titlecontents{subsubsection}[55pt]{\songti} 554 | % {\thecontentslabel\hskip.5em}{}{\titlerule*[0.5pc]{.}\contentspage} 555 | 556 | 557 | 558 | % 上标文献 559 | \newcommand{\upcite}[1]{$^{\mbox{\scriptsize \cite{#1}}}$} 560 | \newcommand{\supercite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}} 561 | \endinput -------------------------------------------------------------------------------- /report.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/report.pdf -------------------------------------------------------------------------------- /report.synctex.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/report.synctex.gz -------------------------------------------------------------------------------- /report.tex: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | % !TEX program = xelatex 3 | 4 | \documentclass{hfutreport} 5 | %\documentclass[bwprint]{hfutreport} %打印的时候有超链接的地方不需要彩色,可以加上bwprint 选项 6 | 7 | \title{合肥工业大学课程设计 \LaTeX{} 模板} 8 | \stunum{2017214\^{}o\^{}} 9 | \stuname{\href{https://github.com/LaureatePoet}{LauretePoet}} 10 | \stuclass{数学与应用数学17-\^{}班} 11 | \supervisor{你} 12 | \dateinput{\today} 13 | \maincontent{合肥工业大学课程设计任务书主要内容。因上个版本是基于其他版本的Thesis修改的版本,对于课程报告而言相较臃肿,所以有了重写的想法。这是我第一次写文档类\emph{.cls},是基于\href{https://github.com/latexstudio/CUMCMThesis}{\emph{cumcmthesis.cls}}编写了 \emph{hfutreport.cls},并将封面的logo切换成矢量图,总而言之已基本满足需求。\quad 本项目GitHub地址:\url{https://github.com/HFUTTUG/HFUT_Course_Report_Template}} 14 | 15 | \begin{document} 16 | 17 | \maketitle 18 | 19 | % 目录使用Romen页脚 20 | \pagestyle{plain} 21 | \pagenumbering{Roman} 22 | \tableofcontents 23 | \newpage 24 | \pagestyle{plain} 25 | 26 | %正文页脚 27 | \setcounter{page}{1} 28 | \pagenumbering{arabic} 29 | 30 | \section{模板的基本使用} 31 | 32 | 要使用 \LaTeX{} 来完成论文,首先要确保正确安装一个 \LaTeX{} 的发行版本。 33 | 34 | \begin{itemize} 35 | \item Mac 下可以使用 Mac\TeX{} 36 | \item Linux 下可以使用 \TeX{}Live ; 37 | \item windows 下可以使用 \TeX{}Live 或者 Mik\TeX{} ; 38 | \end{itemize} 39 | 40 | 具体安装可以参考 \href{https://github.com/OsbertWang/install_latex/releases/download/v4.6/Install-LaTeX.pdf}{Install-LaTeX.pdf} 或者其它靠谱的文章。另外可以安装一个易用的编辑器,例如 \href{https://github.com/texstudio-org/texstudio/releases/download/2.12.16/texstudio-2.12.16-win-qt5.exe}{\TeX{}studio} 。 41 | 42 | 使用该模板前,请阅读模板的使用说明文档。 43 | 44 | 其实\textbf{更建议阅读} 45 | 46 | \begin{enumerate} 47 | 48 | \item \href{https://github.com/OsbertWang/install-latex}{一份简短的关于 \LaTeX{} 安装的介绍} 49 | 50 | \item \href{http://mirrors.ctan.org/info/lshort/chinese/lshort-zh-cn.pdf}{一份不太简短的 \LaTeXe 介绍} 51 | \end{enumerate} 52 | 53 | 下面给出模板使用的大概样式。 54 | 55 | 56 | \section{图片} 57 | 58 | 文档中不可避免要插入图片。图片可以分为矢量图与位图。位图推荐使用 \verb|jpg,png| 这两种格式,避免使用 \verb|bmp| 这类图片,容易出现图片插入失败这样情况的发生。矢量图一般有 \verb|pdf,eps| ,推荐使用 \verb|pdf| 格式的图片,尽量不要使用 \verb|eps| 图片,理由相同。 59 | 60 | 注意图片的命名,避免使用中文来命名图片,可以用英文与数字的组合来命名图片。避免使用\verb|1,2,3| 这样顺序的图片命名方式。图片多了,自己都不清楚那张图是什么了,命名尽量让它有意义。下面是一个插图的示例代码。 61 | \begin{figure}[!h] 62 | \centering 63 | \includegraphics[width=.6\textwidth]{HFUT_Horizontal_font&logo} 64 | \caption{合肥工业大学校徽} 65 | \label{fig:circuit-diagram} 66 | \end{figure} 67 | 68 | 注意 \verb|figure| 环境是一个浮动体环境,图片的最终位置可能会跑动。\verb|[!h]| 中的 \verb|h| 是 here 的意思, \verb|!| 表示忽略一些浮动体的严格规则。另外里面还可以加上 \verb|btp| 选项,它们分别是 bottom, top, page 的意思。只要这几个参数在花括号里面,作用是不分先后顺序的。page 在这里表示浮动页。 69 | 70 | \verb|\label{fig:circuit-diagram}| 是一个标签,供交叉引用使用的。例如引用图片 \verb|\cref{fig:circuit-diagram}| 的实际效果是\cref{fig:circuit-diagram}。图片是自动编号的,比起手动编号,它更加高效。\verb|\cref{label}| 由 \verb|cleveref| 宏包提供,比普通的 \verb|\ref{label}| 更加自动化。 \verb|label| 要确保唯一,命名方式推荐用图片的命名方式。 71 | 72 | 图片并排的需求解决方式多种多样,下面用 \verb|minipage| 环境来展示一个简单的例子。注意,以下例子用到了 \verb|subcaption| 命令,需要加载 subcaption 宏包。 73 | 74 | \begin{figure} 75 | \centering 76 | \begin{minipage}[c]{0.3\textwidth} 77 | \centering 78 | \includegraphics[width=0.95\textwidth]{f1} 79 | \subcaption{流程图} 80 | \label{fig:sample-figure-a} 81 | \end{minipage} 82 | \begin{minipage}[c]{0.3\textwidth} 83 | \centering 84 | \includegraphics[width=0.95\textwidth]{f1} 85 | \subcaption{流程图} 86 | \label{fig:sample-figure-b} 87 | \end{minipage} 88 | \begin{minipage}[c]{0.3\textwidth} 89 | \centering 90 | \includegraphics[width=0.95\textwidth]{f1} 91 | \subcaption{流程图} 92 | \label{fig:sample-figure-c} 93 | \end{minipage} 94 | \caption{多图并排示例} 95 | \label{fig:sample-figure} 96 | \end{figure} 97 | 这相当于整体是一张大图片,大图片引用是\cref{fig:sample-figure},子图引用别分是\cref{fig:sample-figure-a}、\cref{fig:sample-figure-b}、\cref{fig:sample-figure-c}。 98 | 99 | 如果原本两张图片的高度不同,但是希望它们缩放后等高的排在同一行,参考这个例子: 100 | \begin{figure} 101 | \centering 102 | \begin{minipage}[c]{0.48\textwidth} 103 | \centering 104 | \includegraphics[height=0.2\textheight]{HFUT_logo} 105 | \subcaption{合肥工业大学校徽} 106 | \end{minipage} 107 | \begin{minipage}[c]{0.48\textwidth} 108 | \centering 109 | \includegraphics[height=0.2\textheight]{cat} 110 | \subcaption{一只猫} 111 | \end{minipage} 112 | \caption{多图并排示例} 113 | \end{figure} 114 | 115 | \section{绘制普通三线表格} 116 | 表格应具有三线表格式,因此常用 booktabs宏包,其标准格式如\cref{tab:001}~所示。 117 | \begin{table}[!htbp] 118 | \caption{标准三线表格}\label{tab:001} \centering 119 | \begin{tabular}{ccccc} 120 | \toprule[1.5pt] 121 | $D$(in) & $P_u$(lbs) & $u_u$(in) & $\beta$ & $G_f$(psi.in)\\ 122 | \midrule[1pt] 123 | 5 & 269.8 & 0.000674 & 1.79 & 0.04089\\ 124 | 10 & 421.0 & 0.001035 & 3.59 & 0.04089\\ 125 | 20 & 640.2 & 0.001565 & 7.18 & 0.04089\\ 126 | \bottomrule[1.5pt] 127 | \end{tabular} 128 | \end{table} 129 | 130 | 其绘制表格的代码及其说明如下。 131 | \begin{tcode} 132 | \begin{table}[!htbp] 133 | \caption[标签名]{中文标题} 134 | \begin{tabular}{cc...c} 135 | \toprule[1.5pt] 136 | 表头第1个格 & 表头第2个格 & ... & 表头第n个格 \\ 137 | \midrule[1pt] 138 | 表中数据(1,1) & 表中数据(1,2) & ... & 表中数据(1,n)\\ 139 | 表中数据(2,1) & 表中数据(2,2) & ... & 表中数据(2,n)\\ 140 | ...................................................\\ 141 | 表中数据(m,1) & 表中数据(m,2) & ... & 表中数据(m,n)\\ 142 | \bottomrule[1.5pt] 143 | \end{tabular} 144 | \end{table} 145 | \end{tcode} 146 | 147 | \bigskip 148 | 149 | table环境是一个将表格嵌入文本的浮动环境。tabular环境的必选参数由每列对应一个格式字符所组成:c表示居中,l表示左对齐,r表示右对齐,其总个数应与表的列数相同。此外,\verb|@{文本}|可以出现在任意两个上述的列格式之间,其中的文本将被插入每一行的同一位置。表格的各行以\verb|\\|分隔,同一行的各列则以\&分隔。 \verb|\toprule| 、\verb|\midrule| 和 \verb|\bottomrule| 三个命令是由booktabs宏包提供的,其中 \verb|\toprule| 和 \verb|\bottomrule| 分别用来绘制表格的第一条(表格最顶部)和第三条(表格最底部)水平线, \verb|\midrule| 用来绘制第二条(表头之下)水平线,且第一条和第三条水平线的线宽为 1.5pt ,第二条水平线的线宽为 1pt 。引用方法与图片的相同。 150 | 151 | \section{公式} 152 | 153 | 论文必然涉及不少数学公式的使用。下面简单介绍一个可能用得上的数学环境。 154 | 155 | 首先是行内公式,例如 $ \theta $ 是角度。行内公式使用 \verb|$ $| 包裹。 156 | 157 | 行间公式不需要编号的可以使用 \verb|\[ \]| 包裹,例如 158 | \[ 159 | E=mc^2 160 | \] 161 | 其中 $ E $ 是能量,$ m $ 是质量,$ c $ 是光速。 162 | 163 | 如果希望某个公式带编号,并且在后文中引用可以参考下面的写法: 164 | \begin{equation} 165 | E=mc^2 166 | \label{eq:energy} 167 | \end{equation} 168 | 式\cref{eq:energy}是质能方程。 169 | 170 | 多行公式有时候希望能够在特定的位置对齐,以下是其中一种处理方法。 171 | \begin{align} 172 | P & = UI \\ 173 | & = I^2R 174 | \end{align} 175 | \verb|&| 是对齐的位置, \verb|&| 可以有多个,但是每行的个数要相同。 176 | 177 | 矩阵的输入也不难。 178 | \[ 179 | \mathbf{X} = \left( 180 | \begin{array}{cccc} 181 | x_{11} & x_{12} & \ldots & x_{1n}\\ 182 | x_{21} & x_{22} & \ldots & x_{2n}\\ 183 | \vdots & \vdots & \ddots & \vdots\\ 184 | x_{n1} & x_{n2} & \ldots & x_{nn}\\ 185 | \end{array} \right) 186 | \] 187 | 188 | 分段函数这些可以用 \verb|case| 环境,但是它要放在数学环境里面。 189 | \[ 190 | f(x) = 191 | \begin{cases} 192 | 0 & x \text{为无理数} ,\\ 193 | 1 & x \text{为有理数} . 194 | \end{cases} 195 | \] 196 | 在数学环境里面,字体用的是数学字体,一般与正文字体不同。假如要公式里面有个别文字,则需要把这部分放在 \verb|text| 环境里面,即 \verb|\text{文本环境}| 。 197 | 198 | 公式中个别需要加粗的字母可以用 \verb|$\bm{math symbol}$| 。如 $ \alpha a\bm{\alpha a} $ 。 199 | 200 | 以上仅简单介绍了基础的使用,对于更复杂的需求,可以阅读相关的宏包手册,如 \href{http://texdoc.net/texmf-dist/doc/latex/amsmath/amsldoc.pdf}{amsmath}。 201 | 202 | 希腊字母这些如果不熟悉,可以去查找符号文件 \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} 。 203 | 204 | 下面简单介绍一下定理、证明等环境的使用。 205 | \begin{definition} 206 | 定义环境 207 | \label{def:nosense} 208 | \end{definition} 209 | \cref{def:nosense}除了告诉你怎么使用这个环境以外,没有什么其它的意义。 210 | 211 | 除了 definition 环境,还可以使用 theorem 、lemma、corollary、assumption、conjecture、axiom、principle、problem、example、proof、solution 这些环境,根据论文的实际需求合理使用。 212 | 213 | \begin{theorem} 214 | 这是一个定理。 215 | \label{thm:example} 216 | \end{theorem} 217 | 由\cref{thm:example}我们知道了定理环境的使用。 218 | 219 | \begin{lemma} 220 | 这是一个引理。 221 | \label{lem:example} 222 | \end{lemma} 223 | 由\cref{lem:example}我们知道了引理环境的使用。 224 | 225 | \begin{corollary} 226 | 这是一个推论。 227 | \label{cor:example} 228 | \end{corollary} 229 | 由\cref{cor:example}我们知道了推论环境的使用。 230 | 231 | \begin{assumption} 232 | 这是一个假设。 233 | \label{asu:example} 234 | \end{assumption} 235 | 由\cref{asu:example}我们知道了假设环境的使用。 236 | 237 | \begin{conjecture} 238 | 这是一个猜想。 239 | \label{con:example} 240 | \end{conjecture} 241 | 由\cref{con:example}我们知道了猜想环境的使用。 242 | 243 | \begin{axiom} 244 | 这是一个公理。 245 | \label{axi:example} 246 | \end{axiom} 247 | 由\cref{axi:example}我们知道了公理环境的使用。 248 | 249 | \begin{principle} 250 | 这是一个定律。 251 | \label{pri:example} 252 | \end{principle} 253 | 由\cref{pri:example}我们知道了定律环境的使用。 254 | 255 | \begin{problem} 256 | 这是一个问题。 257 | \label{pro:example} 258 | \end{problem} 259 | 由\cref{pro:example}我们知道了问题环境的使用。 260 | 261 | \begin{example} 262 | 这是一个例子。 263 | \label{exa:example} 264 | \end{example} 265 | 由\cref{exa:example}我们知道了例子环境的使用。 266 | 267 | \begin{proof} 268 | 这是一个证明。 269 | \label{prf:example} 270 | \end{proof} 271 | 由\cref{prf:example}我们知道了证明环境的使用。 272 | 273 | \begin{solution} 274 | 这是一个解。 275 | \label{sol:example} 276 | \end{solution} 277 | 由\cref{sol:example}我们知道了解环境的使用。 278 | 279 | 280 | 281 | \section{其它小功能} 282 | \subsection{脚注} 283 | 284 | 利用 \verb|\footnote{具体内容}| 可以生成脚注\footnote{脚注可以补充说明一些东西}。 285 | 286 | \subsection{无序列表与有序列表} 287 | 288 | 无序列表是这样的: 289 | \begin{itemize} 290 | \item one 291 | \item two 292 | \item ... 293 | \end{itemize} 294 | 295 | 有序列表是这样子的: 296 | \begin{enumerate} 297 | \item one 298 | \item two 299 | \item ... 300 | \end{enumerate} 301 | 302 | \subsection{字体加粗与斜体} 303 | 304 | 如果想强调部分内容,可以使用加粗的手段来实现。加粗字体可以用 \verb|\textbf{加粗}| 来实现。例如: \textbf{这是加粗的字体。 This is bold fonts} 。 305 | 306 | 中文字体没有斜体设计,但是英文字体有。\textit{斜体 Italics}。 307 | 308 | \section{参考文献与引用} 309 | 310 | 参考文献对于一篇正式的论文来说是必不可少的,在论文中重要的参考文献当然应该列出。\LaTeX{}在这方面的功能也是十分强大的,下面进介绍一个比较简单的参考文献制作方法。有兴趣的可以学习 \verb|bibtex| 或 \verb|biblatex| 的使用。 311 | 312 | \LaTeX{}的入门书籍可以看《\LaTeX{}入门》\cite{liuhaiyang2013latex}。这是一个简单的引用,用 \verb|\cite{bibkey}| 来完成;上标引用也比较简单\upcite{SCM2019},用\verb|\upcite{bibkey}| 来完成。要引用成功,当然要维护好 bibitem 了。 313 | 314 | \section{写在后面} 315 | 316 | \begin{itemize} 317 | \item 作者能力有限,此模板还有诸多改进之处,希望有能力的同学能够进行修改并参与开发; 318 | \item 对LaTeX开发有兴趣,或者有意加入\href{https://github.com/HFUTTUG}{@HFUTTUG}的同学可发送\href{mailto:poet@poetyin.com}{Email}; 319 | \item \LaTeX{} 有诸多优势,希望对它感兴趣的同学能够尽快建立一个组织或者团体开发我校 \LaTeX{} 相关模板,使之规范化,个人的力量总是有限的,Happy LaTeXing! 320 | \end{itemize} 321 | 322 | 323 | %参考文献 324 | %如果参考文献不需要从新的一页开始,请将\newpage 注释 325 | \newpage 326 | \begin{thebibliography}{9}%宽度9 327 | \bibitem[1]{liuhaiyang2013latex} 328 | 刘海洋. 329 | \newblock \LaTeX {}入门\allowbreak[J]. 330 | \newblock 电子工业出版社, 北京, 2013. 331 | \bibitem[2]{SCM2019} 332 | 张文钧, 殷振豪, 张丁洋. 运动类 App 使用现状及发展前景研究——以合肥市高校为例[J]. 2019 年 (第六届) 全国大学生统计建模大赛优秀论文集, 2019. 333 | \bibitem[3]{shannon} 334 | Shannon C E. A mathematical theory of communication[J]. The Bell system technical journal, 1948, 27(3): 379-423. 335 | \bibitem[4]{bayesial} 336 | Frazier P I. A tutorial on Bayesian optimization[J]. arXiv preprint arXiv:1807.02811, 2018. 337 | \end{thebibliography} 338 | 339 | \newpage 340 | %附录 341 | \begin{appendices} 342 | 343 | \section{模板所用的宏包} 344 | \begin{table}[htbp] 345 | \centering 346 | \caption{宏包罗列} 347 | \begin{tabular}{ccccc} 348 | \toprule 349 | \multicolumn{5}{c}{模板中已经加载的宏包} \\ 350 | \midrule 351 | amsbsy & amsfonts & {amsgen} & {amsmath} & {amsopn} \\ 352 | amssymb & amstext & {appendix} & {array} & {atbegshi} \\ 353 | atveryend & auxhook & {bigdelim} & {bigintcalc} & {bigstrut} \\ 354 | bitset & bm & {booktabs} & {calc} & {caption} \\ 355 | caption3 & CJKfntef & {cprotect} & {ctex} & {ctexhook} \\ 356 | ctexpatch & enumitem & {etexcmds} & {etoolbox} & {everysel} \\ 357 | expl3 & fix-cm & {fontenc} & {fontspec} & {fontspec-xetex} \\ 358 | geometry & gettitlestring & {graphics} & {graphicx} & {hobsub} \\ 359 | hobsub-generic & hobsub-hyperref & {hopatch} & {hxetex} & {hycolor} \\ 360 | hyperref & ifluatex & {ifpdf} & {ifthen} & {ifvtex} \\ 361 | ifxetex & indentfirst & {infwarerr} & {intcalc} & {keyval} \\ 362 | kvdefinekeys & kvoptions & {kvsetkeys} & {l3keys2e} & {letltxmacro} \\ 363 | listings & longtable & {lstmisc} & {ltcaption} & {ltxcmds} \\ 364 | multirow & nameref & {pdfescape} & {pdftexcmds} & {refcount} \\ 365 | rerunfilecheck & stringenc & {suffix} & {titletoc} & {tocloft} \\ 366 | trig & ulem & {uniquecounter} & {url} & {xcolor} \\ 367 | xcolor-patch & xeCJK & {xeCJKfntef} & {xeCJK-listings} & {xparse} \\ 368 | xtemplate & zhnumber & {fancyhdr} & {makecell} & \\ 369 | \bottomrule 370 | \end{tabular}% 371 | \label{tab:addlabel}% 372 | \end{table}% 373 | 374 | 以上宏包都已经加载过了,不要重复加载它们。 375 | 376 | \section{排队算法--matlab 源程序} 377 | 378 | \begin{lstlisting}[language=matlab] 379 | kk=2;[mdd,ndd]=size(dd); 380 | while ~isempty(V) 381 | [tmpd,j]=min(W(i,V));tmpj=V(j); 382 | for k=2:ndd 383 | [tmp1,jj]=min(dd(1,k)+W(dd(2,k),V)); 384 | tmp2=V(jj);tt(k-1,:)=[tmp1,tmp2,jj]; 385 | end 386 | tmp=[tmpd,tmpj,j;tt];[tmp3,tmp4]=min(tmp(:,1)); 387 | if tmp3==tmpd, ss(1:2,kk)=[i;tmp(tmp4,2)]; 388 | else,tmp5=find(ss(:,tmp4)~=0);tmp6=length(tmp5); 389 | if dd(2,tmp4)==ss(tmp6,tmp4) 390 | ss(1:tmp6+1,kk)=[ss(tmp5,tmp4);tmp(tmp4,2)]; 391 | else, ss(1:3,kk)=[i;dd(2,tmp4);tmp(tmp4,2)]; 392 | end;end 393 | dd=[dd,[tmp3;tmp(tmp4,2)]];V(tmp(tmp4,3))=[]; 394 | [mdd,ndd]=size(dd);kk=kk+1; 395 | end; S=ss; D=dd(1,:); 396 | \end{lstlisting} 397 | 398 | \section{规划解决程序--lingo源代码} 399 | 400 | \begin{lstlisting}[language=c] 401 | kk=2; 402 | [mdd,ndd]=size(dd); 403 | while ~isempty(V) 404 | [tmpd,j]=min(W(i,V));tmpj=V(j); 405 | for k=2:ndd 406 | [tmp1,jj]=min(dd(1,k)+W(dd(2,k),V)); 407 | tmp2=V(jj);tt(k-1,:)=[tmp1,tmp2,jj]; 408 | end 409 | tmp=[tmpd,tmpj,j;tt];[tmp3,tmp4]=min(tmp(:,1)); 410 | if tmp3==tmpd, ss(1:2,kk)=[i;tmp(tmp4,2)]; 411 | else,tmp5=find(ss(:,tmp4)~=0);tmp6=length(tmp5); 412 | if dd(2,tmp4)==ss(tmp6,tmp4) 413 | ss(1:tmp6+1,kk)=[ss(tmp5,tmp4);tmp(tmp4,2)]; 414 | else, ss(1:3,kk)=[i;dd(2,tmp4);tmp(tmp4,2)]; 415 | end; 416 | end 417 | dd=[dd,[tmp3;tmp(tmp4,2)]];V(tmp(tmp4,3))=[]; 418 | [mdd,ndd]=size(dd); 419 | kk=kk+1; 420 | end; 421 | S=ss; 422 | D=dd(1,:); 423 | \end{lstlisting} 424 | \end{appendices} 425 | 426 | \end{document} -------------------------------------------------------------------------------- /合肥工业大学课程设计报告.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HFUTTUG/HFUT_Course_Report/76b18ddb7e0268d8f97116b4d46d5132e6f70b2e/合肥工业大学课程设计报告.docx --------------------------------------------------------------------------------