├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── README.zh-cn.md ├── hustreport ├── Makefile ├── adjust_checksum.pl ├── fig-example.pdf ├── hust-title.eps ├── hust-title.pdf ├── hustreport-en-example.pdf ├── hustreport-zh-example.pdf ├── hustreport.dtx ├── hustreport.ins └── hustreport.pdf ├── install ├── unix.sh └── win32.bat └── makewin32.bat /.gitignore: -------------------------------------------------------------------------------- 1 | *.acn 2 | *.acr 3 | *.alg 4 | *.aux 5 | *.bbl 6 | *.blg 7 | *.dvi 8 | *.fdb_latexmk 9 | *.glg 10 | *.glo 11 | *.gls 12 | *.hd 13 | *.idx 14 | *.ilg 15 | *.ind 16 | *.ist 17 | *.lof 18 | *.log 19 | *.lot 20 | *.maf 21 | *.mtc 22 | *.mtc0 23 | *.nav 24 | *.nlo 25 | *.out 26 | *.pdfsync 27 | *.ps 28 | *.snm 29 | *.synctex.gz 30 | *.toc 31 | *.vrb 32 | *.xdy 33 | *.tdo 34 | *.thm 35 | 36 | # For Sublime Text 37 | *.sublime-project 38 | *.sublime-workspace 39 | 40 | hustreport/*.cls 41 | hustreport/*.bst 42 | hustreport/*.tex 43 | hustreport/*.bib 44 | hustreport/*.md 45 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # OS detected 2 | ifeq ($(OS),Windows_NT) 3 | ifneq ($(findstring .exe,$(SHELL)),) 4 | OS_TYPE := Windows 5 | else 6 | OS_TYPE := Cygwin 7 | endif 8 | else 9 | OS_TYPE := $(shell uname -s) 10 | endif 11 | 12 | all:unpack example doc 13 | example:example-zh example-en 14 | 15 | unpack:FORCE 16 | make -C ./hustreport unpack 17 | 18 | example-zh ./hustreport/hustreport-zh-example.pdf: 19 | make -C ./hustreport example-zh 20 | 21 | example-en ./hustreport/hustreport-en-example.pdf: 22 | make -C ./hustreport example-en 23 | 24 | doc ./hustreport/hustreport.pdf: 25 | make -C ./hustreport doc 26 | 27 | clean: 28 | make -C ./hustreport clean 29 | 30 | reallyclean: 31 | make -C ./hustreport reallyclean 32 | 33 | install:unpack ./hustreport/hustreport-zh-example.pdf ./hustreport/hustreport-en-example.pdf ./hustreport/hustreport.pdf 34 | ifeq ($(OS_TYPE),Windows) 35 | ./install/win32.bat install 36 | else 37 | ./install/unix.sh install 38 | endif 39 | 40 | uninstall: 41 | ifeq ($(OS_TYPE),Windows) 42 | ./install/win32.bat uninstall 43 | else 44 | ./install/unix.sh uninstall 45 | endif 46 | 47 | checksum:FORCE 48 | make -C ./hustreport checksum 49 | 50 | FORCE: 51 | .PHONY:all unpack example example-zh example-en doc install uninstall clean reallyclean checksum FORCE 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | hustreport 2 | ========== 3 | 4 | 5 | > 中文版[点击这里](https://github.com/hust-latex/hustreport/blob/master/README.zh-cn.md)。 6 | 7 | An Unofficial Graduate Report Template in LaTeX for [Huazhong University of Science and Technology](http://www.hust.edu.cn). See other templates in . 8 | 9 | ## Requirement 10 | 11 | * Install the latest version of [TeXLive](http://www.tug.org/texlive/)(Recommend) or [MiKTeX](http://miktex.org/). Please ensure that all the packages are up-to-date. 12 | * Install following Chinese fonts: 13 | * `AdobeSongStd-Light` 14 | * `AdobeKaitiStd-Regular` 15 | * `AdobeHeitiStd-Regular` 16 | * `AdobeFangsongStd-Regular` 17 | 18 | ## Installation 19 | 20 | ### Install into local 21 | 22 | Use the command below to install this template into local. 23 | ``` 24 | make install 25 | ``` 26 | If you need uninstall it, use the command below. 27 | ``` 28 | make uninstall 29 | ``` 30 | 31 | For Windows User who don't install `Make`, use the command below to install. 32 | ``` 33 | makewin32.bat install 34 | ``` 35 | If you need uninstall it, use the command below. 36 | ``` 37 | makewin32.bat uninstall 38 | ``` 39 | Although `makewin32.bat` behaves much like `Makefile`, I still recommend you install `Make` into your Windows. You can download it from [here](http://gnuwin32.sourceforge.net/packages/make.htm). 40 | 41 | ### Use without installation 42 | 43 | If you want to use this template temporary rather than installing it into local for long term use. Run below command to unpack the package. 44 | ``` 45 | make unpack 46 | ``` 47 | For Windows User who don't install `Make`, use the command below to unpack the package. 48 | ``` 49 | makewin32.bat unpack 50 | ``` 51 | Then copy following files from directory `hustreport` into your TeX project root directory: 52 | * `hustreport.cls` 53 | * `hust-title.eps` 54 | * `hust-title.pdf` 55 | 56 | ## Usage 57 | 58 | **Important : This template can only be compiled by XeLaTeX or LuaLaTeX[Recommend].** 59 | 60 | * Manual: See [hustreport.pdf](https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport.pdf). 61 | * Example: See [hustreport-zh-example.pdf](https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport-zh-example.pdf) and [hustreport-en-example.pdf](https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport-en-example.pdf). 62 | 63 | ## Disclaimer 64 | 65 | This template is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 66 | 67 | ## License 68 | 69 | Original works are done by [Xu Cheng](https://github.com/xu-cheng). LPPL v1.3 is chosen to be the license of the project. Use as you desire. 70 | ``` 71 | Copyright (C) 2013-2014 by Xu Cheng 72 | 2014-2016 by hust-latex 73 | 74 | This work may be distributed and/or modified under the 75 | conditions of the LaTeX Project Public License, either version 1.3 76 | of this license or (at your option) any later version. 77 | The latest version of this license is in 78 | http://www.latex-project.org/lppl.txt 79 | and version 1.3 or later is part of all distributions of LaTeX 80 | version 2005/12/01 or later. 81 | 82 | This work has the LPPL maintenance status `maintained'. 83 | 84 | The Current Maintainer of this work is hust-latex Organization. 85 | 86 | This work consists of the files hustreport.dtx, 87 | hustreport.ins and the derived file hustreport.cls 88 | along with its document and example files. 89 | ``` 90 | 91 | -------------------------------------------------------------------------------- /README.zh-cn.md: -------------------------------------------------------------------------------- 1 | hustreport 2 | ========== 3 | 4 | > To see English version, [click me](https://github.com/hust-latex/hustreport/blob/master/README.md). 5 | 6 | [华中科技大学](http://www.hust.edu.cn)研究生报告非官方LaTeX模板。在浏览其他模板。 7 | 8 | ## 必备条件: 9 | 10 | * 安装最新版本的 [TeXLive](http://www.tug.org/texlive/)(推荐)或 [MiKTeX](http://miktex.org/)。请确保所有宏包都更新至最新。 11 | * 安装如下中文字体: 12 | * `AdobeSongStd-Light` 13 | * `AdobeKaitiStd-Regular` 14 | * `AdobeHeitiStd-Regular` 15 | * `AdobeFangsongStd-Regular` 16 | 17 | ## 安装 18 | 19 | ### 安装到本地 20 | 21 | 使用如下命令即可安装本模板到本地: 22 | ``` 23 | make install 24 | ``` 25 | 如需卸载,则使用如下命令: 26 | ``` 27 | make uninstall 28 | ``` 29 | 30 | 对于没有安装`Make`的Windows系统用户,可以使用如下命令安装: 31 | ``` 32 | makewin32.bat install 33 | ``` 34 | 如需卸载,则使用如下命令: 35 | ``` 36 | makewin32.bat uninstall 37 | ``` 38 | 虽然`makewin32.bat`表现与`Makefile`极其相似,但是还是强烈建议你安装`Make`,对于Windows用户可以在[这里](http://gnuwin32.sourceforge.net/packages/make.htm)下载。 39 | 40 | ### 免安装使用 41 | 42 | 如果你希望临时使用本模板,而非安装到本地供长期使用。使用如下命令解压模板文件: 43 | ``` 44 | make unpack 45 | ``` 46 | 对于没有安装`Make`的Windows系统用户,可以使用如下命令解压: 47 | ``` 48 | makewin32.bat unpack 49 | ``` 50 | 再将`hustreport`目录下的如下文件拷贝到你TeX工程根目录下即可: 51 | * `hustreport.cls` 52 | * `hust-title.eps` 53 | * `hust-title.pdf` 54 | 55 | ## 使用 56 | 57 | **重要 : 该模板只能使用 XeLaTeX 或 LuaLaTeX [推荐]编译。** 58 | 59 | * 说明文档: 见 [hustreport.pdf](https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport.pdf). 60 | * 示例文档: 见 [hustreport-zh-example.pdf](https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport-zh-example.pdf) 和 [hustreport-en-example.pdf](https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport-en-example.pdf). 61 | 62 | ## 免责声明 63 | 64 | 此模板为个人开发,如果因为使用这份模板蒙受了任何经济、学术上的损失,作者将不承担任何责任。 65 | 66 | ## 开源协议 67 | 68 | 模板原作者为[许铖](https://github.com/xu-cheng)。本项目使用LPPL v1.3协议,请任意使用。 69 | ``` 70 | Copyright (C) 2013-2014 by Xu Cheng 71 | 2014-2016 by hust-latex 72 | 73 | This work may be distributed and/or modified under the 74 | conditions of the LaTeX Project Public License, either version 1.3 75 | of this license or (at your option) any later version. 76 | The latest version of this license is in 77 | http://www.latex-project.org/lppl.txt 78 | and version 1.3 or later is part of all distributions of LaTeX 79 | version 2005/12/01 or later. 80 | 81 | This work has the LPPL maintenance status `maintained'. 82 | 83 | The Current Maintainer of this work is hust-latex Organization. 84 | 85 | This work consists of the files hustreport.dtx, 86 | hustreport.ins and the derived file hustreport.cls 87 | along with its document and example files. 88 | ``` 89 | -------------------------------------------------------------------------------- /hustreport/Makefile: -------------------------------------------------------------------------------- 1 | 2 | # OS detected 3 | ifeq ($(OS),Windows_NT) 4 | ifneq ($(findstring .exe,$(SHELL)),) 5 | OS_TYPE := Windows 6 | else 7 | OS_TYPE := Cygwin 8 | endif 9 | else 10 | OS_TYPE := $(shell uname -s) 11 | endif 12 | 13 | # Program Defintions 14 | TEX = lualatex -shell-escape -8bit 15 | BIBTEX = bibtex 16 | INDEX = makeindex -q 17 | RM = $(if $(filter $(OS_TYPE),Windows),del /f /q ,rm -f ) 18 | 19 | all:class doc example 20 | 21 | unpack:hustreport.dtx hustreport.ins 22 | @$(TEX) hustreport.ins 23 | 24 | %.cls %.tex %.md %.bib:hustreport.dtx hustreport.ins 25 | @$(TEX) hustreport.ins 26 | 27 | class:hustreport.cls 28 | 29 | doc:hustreport.pdf 30 | 31 | hustreport.pdf:hustreport.dtx 32 | @$(TEX) $(^F) 33 | @$(INDEX) -s gind.ist -o $(basename $(^F)).ind $(basename $(^F)).idx 34 | @$(TEX) $(^F) 35 | @$(TEX) $(^F) 36 | 37 | example:example-zh example-en 38 | example-zh:hustreport-zh-example.pdf 39 | example-en:hustreport-en-example.pdf 40 | 41 | hustreport-zh-example.pdf hustreport-en-example.pdf:%-example.pdf:%-example.tex hustreport.cls ref-example.bib 42 | @$(TEX) $( 9 | # 10 | # This work may be distributed and/or modified under the 11 | # conditions of the LaTeX Project Public License, either 12 | # version 1.3 of this license or (at your option) any later 13 | # version. The latest version of this license is in 14 | # http://www.latex-project.org/lppl.txt 15 | # and version 1.3 or later is part of all distributions of 16 | # LaTeX version 2005/12/01 or later. 17 | # 18 | # This work has the LPPL maintenance status "maintained". 19 | # 20 | # This Current Maintainer of this work is Heiko Oberdiek. 21 | # 22 | # This work consists of this file. 23 | # 24 | # This file "adjust_checksum.pl" may be renamed to "adjust_checksum" 25 | # for installation purposes. 26 | # 27 | my $file = "adjust_checksum.pl"; 28 | my $program = uc($&) if $file =~ /^\w+/; 29 | my $version = "1.6"; 30 | my $date = "2013/01/24"; 31 | my $author = "Heiko Oberdiek"; 32 | my $copyright = "Copyright (c) 2002, 2006-2013 by $author."; 33 | # 34 | # Reqirements: Perl5, Linux 35 | # History: 36 | # 2002/03/15 v1.0: First release. 37 | # 2006/02/12 v1.1: Fix for \Checksum{0}. 38 | # 2007/06/15 v1.2: -draftmode added. 39 | # 2007/09/25 v1.3: ltxdoc.cfg added to speed up. 40 | # 2008/07/16 v1.4: Use of package `syntonly' for speed. 41 | # 2011/04/15 v1.5: Email address updated. 42 | # 2013/01/26 v1.6: License updated. 43 | # 44 | 45 | my $prg_latex = 'lualatex -shell-escape -draftmode'; 46 | 47 | my $tempdir = "tmp_\L$program\E_$$"; 48 | 49 | ### program identification 50 | my $title = "$program $version, $date - $copyright\n"; 51 | 52 | my $usage = <<"END_OF_USAGE"; 53 | ${title}Syntax: \L$program\E 54 | Function: Correction of "\\Checksum{...}" entry in . 55 | END_OF_USAGE 56 | 57 | ### error strings 58 | my $Error = "!!! Error:"; # error prefix 59 | 60 | ### parse command line arguments 61 | @ARGV == 1 or die $usage; 62 | my $dtxfile = $ARGV[0]; 63 | 64 | print $title; 65 | 66 | ### check dtx file 67 | -f $dtxfile or die "$Error File not found: '$dtxfile'!\n"; 68 | 69 | ### signals 70 | $SIG{__DIE__} = \&clean; 71 | $SIG{'HUP'} = \&clean; 72 | $SIG{'INT'} = \&clean; 73 | $SIG{'QUIT'} = \&clean; 74 | $SIG{'TERM'} = \&clean; 75 | 76 | ### make temp dir 77 | mkdir $tempdir; 78 | -d $tempdir or die "$Error Cannot create directory '$tempdir'!\n"; 79 | 80 | ### copy dtx file 81 | my $tempdtxfile = $dtxfile; 82 | $tempdtxfile =~ s/.*\///; 83 | my $latexfile = $tempdtxfile; 84 | $tempdtxfile = $tempdir . "/" . $tempdtxfile; 85 | 86 | system("cp $dtxfile $tempdtxfile"); 87 | -f $tempdtxfile or die "$Error Cannot copy dtx file!\n"; 88 | 89 | ### create ltxdoc.cfg 90 | my $ltxdocfile = $tempdir . "/" . 'ltxdoc.cfg'; 91 | open(OUT, '>', $ltxdocfile) 92 | or die "!!! Error: Cannot open file `$ltxdocfile'!\n"; 93 | print OUT <<'__END__LTXDOC_CFG__'; 94 | \typeout{* version for adjust_checksum} 95 | \AtEndOfClass{% 96 | \DontCheckModules 97 | \DisableCrossrefs 98 | \def\DisableCrossrefs{\@bsphack\@esphack}% 99 | \let\EnableCrossrefs\DisableCrossrefs 100 | \let\CodelineIndex\relax 101 | \let\PageIndex\relax 102 | \let\CodelineNumbered\relax 103 | \let\PrintChanges\relax 104 | \let\PrintIndex\relax 105 | \let\tableofcontents\relax 106 | \PassOptionsToPackage{hyperref}{bookmarks=false}% 107 | \PassOptionsToPackage{hypdoc}{numbered}% 108 | \expandafter\xdef\csname ver@hypdoc.sty\endcsname{}% 109 | \expandafter\xdef\csname ver@bmhydoc.sty\endcsname{}% 110 | \nofiles 111 | \hfuzz\maxdimen 112 | \pretolerance10000 % 113 | \tolerance10000 % 114 | } 115 | \endinput 116 | __END__LTXDOC_CFG__ 117 | close(OUT); 118 | 119 | ### run latex 120 | print "*** Running LaTeX ...\n"; 121 | my $argcode = "'\\AtBeginDocument{\\usepackage{syntonly}\\syntaxonly}" 122 | . "\\input{$latexfile}'"; 123 | system("(cd $tempdir; $prg_latex --interaction=batchmode $argcode)"); 124 | 125 | my $logfile = $tempdtxfile; 126 | $logfile =~ s/\.[^\.]+$//; 127 | $logfile .= ".log"; 128 | -f $logfile or die "$Error Cannot find log file '$logfile'!\n"; 129 | 130 | ### parse log file for CheckSum 131 | print "*** Looking for checksum statement ...\n"; 132 | my $found = 0; 133 | my $changed = 0; 134 | my $old = 0; 135 | my $new = 0; 136 | open(LOG, $logfile) or die "$Error Cannot open log file '$logfile'!\n"; 137 | while () { 138 | if (/\* Checksum passed \*/) { 139 | $found = 1; 140 | $changed = 0; 141 | print "==> Checksum passed.\n"; 142 | last; 143 | } 144 | if (/Checksum not passed \((\d+)<>(\d+)\)/) { 145 | $found = 1; 146 | $changed = 1; 147 | $old = $1; 148 | $new = $2; 149 | last; 150 | } 151 | if (/The checksum should be (\d+)!/) { 152 | $found = 1; 153 | $changed = 1; 154 | $old = 0; 155 | $new = $1; 156 | last; 157 | } 158 | } 159 | close(LOG); 160 | 161 | $found or die "$Error Checksum statement not found in log file!\n"; 162 | 163 | if ($changed) { 164 | print "==> Checksum not passed ($old<>$new).\n"; 165 | 166 | ### write changed dtx file 167 | print "*** Fixing Checksum ...\n"; 168 | my $fixed = 0; 169 | open(IN, $tempdtxfile) or die "$Error Cannot open '$tempdtxfile'!\n"; 170 | open(OUT, ">$dtxfile") or die "$Error Cannot write '$dtxfile'!\n"; 171 | while () { 172 | if (s/\\CheckSum\{\d+\}/\\CheckSum{$new}/) { 173 | $fixed++; 174 | print "==> Checksum fixed:\n$_"; 175 | } 176 | print OUT; 177 | } 178 | close(IN); 179 | close(OUT); 180 | 181 | $fixed > 0 or 182 | die "$Error: \"\\CheckSum{...}\" not found!\n"; 183 | $fixed == 1 or 184 | die "$Error: More than one \"\\CheckSum\" command found!\n"; 185 | } 186 | 187 | ### cleaning 188 | sub clean { 189 | if (-d $tempdir) { 190 | unlink glob("$tempdir/*"); 191 | rmdir $tempdir; 192 | } 193 | } 194 | 195 | clean(); 196 | 197 | print "*** Ready.\n"; 198 | 199 | __END__ 200 | -------------------------------------------------------------------------------- /hustreport/fig-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-latex/hustreport/e89b003fa2e6b2532f240418cdd082e7dd88eb73/hustreport/fig-example.pdf -------------------------------------------------------------------------------- /hustreport/hust-title.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-latex/hustreport/e89b003fa2e6b2532f240418cdd082e7dd88eb73/hustreport/hust-title.pdf -------------------------------------------------------------------------------- /hustreport/hustreport-en-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-latex/hustreport/e89b003fa2e6b2532f240418cdd082e7dd88eb73/hustreport/hustreport-en-example.pdf -------------------------------------------------------------------------------- /hustreport/hustreport-zh-example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-latex/hustreport/e89b003fa2e6b2532f240418cdd082e7dd88eb73/hustreport/hustreport-zh-example.pdf -------------------------------------------------------------------------------- /hustreport/hustreport.dtx: -------------------------------------------------------------------------------- 1 | % \iffalse meta-comment 2 | % !TEX program = LuaLaTeX 3 | % 4 | % hustreport.dtx 5 | % 6 | % Copyright (C) 2013-2014 by Xu Cheng 7 | % 2014-2016 by hust-latex 8 | % 9 | % This work may be distributed and/or modified under the 10 | % conditions of the LaTeX Project Public License, either version 1.3 11 | % of this license or (at your option) any later version. 12 | % The latest version of this license is in 13 | % http://www.latex-project.org/lppl.txt 14 | % and version 1.3 or later is part of all distributions of LaTeX 15 | % version 2005/12/01 or later. 16 | % 17 | % This work has the LPPL maintenance status `maintained'. 18 | % 19 | % The Current Maintainer of this work is hust-latex Organization. 20 | % 21 | % This work consists of the files hustreport.dtx, 22 | % hustreport.ins and the derived file hustreport.cls 23 | % along with its document and example files. 24 | % 25 | % \fi 26 | % 27 | % \iffalse 28 | %<*driver> 29 | \ProvidesFile{hustreport.dtx} 30 | % 31 | %\NeedsTeXFormat{LaTeX2e}[1999/12/01] 32 | %\ProvidesClass{hustreport} 33 | %<*class> 34 | [2016/06/01 v1.1 A Report Template for Huazhong University of Science and Technology] 35 | % 36 | % 37 | %<*driver> 38 | \documentclass[12pt,a4paper,numbered,full]{l3doc} 39 | 40 | \usepackage{fontspec} 41 | \setmainfont[Ligatures={Common,TeX}]{Tex Gyre Pagella} 42 | \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 43 | \setmonofont{CMU Typewriter Text} 44 | \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} 45 | 46 | \usepackage{luatexja-fontspec} 47 | \setmainjfont[BoldFont={AdobeHeitiStd-Regular},ItalicFont={AdobeKaitiStd-Regular}]{AdobeSongStd-Light} 48 | \setsansjfont{AdobeKaitiStd-Regular} 49 | \defaultjfontfeatures{JFM=kaiming} 50 | \newjfontfamily\KAI{AdobeKaitiStd-Regular} 51 | \newjfontfamily\FANGSONG{AdobeFangsongStd-Regular} 52 | 53 | \linespread{1.2}\selectfont 54 | 55 | \usepackage[top=1.2in,bottom=1.2in,left=1.5in,right=1in]{geometry} 56 | \pagewidth=\paperwidth 57 | \pageheight=\paperheight 58 | 59 | \usepackage{color} 60 | \usepackage[table]{xcolor} 61 | 62 | \definecolor{hyperreflinkred}{RGB}{128,23,31} 63 | \hypersetup{ 64 | unicode, 65 | bookmarksnumbered=true, 66 | bookmarksopen=true, 67 | bookmarksopenlevel=0, 68 | breaklinks=true, 69 | colorlinks=true, 70 | allcolors=hyperreflinkred, 71 | linktoc=page, 72 | plainpages=false, 73 | pdfpagelabels=true, 74 | pdfstartview={XYZ null null 1} 75 | } 76 | \usepackage{indentfirst} 77 | \setlength{\parindent}{2em} 78 | 79 | \usepackage{titlesec,titletoc} 80 | \usepackage[titles]{tocloft} 81 | \setcounter{tocdepth}{2} 82 | \setcounter{secnumdepth}{3} 83 | 84 | \usepackage{enumitem} 85 | \setlist{noitemsep,partopsep=0pt,topsep=.8ex} 86 | \setlist[1]{labelindent=\parindent} 87 | \setlist[enumerate,1]{label=\arabic*.,ref=\arabic*} 88 | \setlist[enumerate,2]{label*=\arabic*,ref=\theenumi.\arabic*} 89 | \setlist[enumerate,3]{label=\emph{\alph*}),ref=\theenumii\emph{\alph*}} 90 | 91 | \usepackage{listings} 92 | \definecolor{lstgreen}{rgb}{0,0.6,0} 93 | \definecolor{lstgray}{rgb}{0.5,0.5,0.5} 94 | \definecolor{lstmauve}{rgb}{0.58,0,0.82} 95 | \lstset{ 96 | basicstyle=\footnotesize\ttfamily\FANGSONG, 97 | keywordstyle=\color{blue}\bfseries, 98 | commentstyle=\color{lstgreen}\itshape\KAI, 99 | stringstyle=\color{lstmauve}, 100 | showspaces=false, 101 | showstringspaces=false, 102 | showtabs=false, 103 | numbers=left, 104 | numberstyle=\tiny\color{lstgray}, 105 | frame=lines, 106 | rulecolor=\color{black}, 107 | breaklines=true 108 | } 109 | 110 | \AtBeginEnvironment{verbatim}{\small} 111 | \let\AltMacroFont\MacroFont 112 | 113 | \usepackage{metalogo} 114 | \usepackage{notes} 115 | \usepackage{tabularx} 116 | 117 | \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} 118 | 119 | \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} 120 | \setlength{\cftsecindent}{2em} 121 | \setlength{\cftsubsecindent}{4em} 122 | \makeatletter 123 | \newskip\HUST@oldcftbeforepartskip 124 | \HUST@oldcftbeforepartskip=\cftbeforepartskip 125 | \newskip\HUST@oldcftbeforesecskip 126 | \HUST@oldcftbeforesecskip=\cftbeforesecskip 127 | \let\HUST@oldl@part\l@part 128 | \let\HUST@oldl@section\l@section 129 | \let\HUST@oldl@subsection\l@subsection 130 | \def\l@part#1#2{\HUST@oldl@part{#1}{#2}\cftbeforepartskip=3pt} 131 | \def\l@section#1#2{\HUST@oldl@section{#1}{#2}\cftbeforepartskip=\HUST@oldcftbeforepartskip\cftbeforesecskip=3pt} 132 | \def\l@subsection#1#2{\HUST@oldl@subsection{#1}{#2}\cftbeforesecskip=\HUST@oldcftbeforesecskip} 133 | \makeatother 134 | 135 | \titleformat{\part} 136 | { 137 | \bfseries 138 | \centering 139 | \fontsize{18pt}{23.4pt}\selectfont 140 | } 141 | {\thepart} 142 | {1em} 143 | {} 144 | \let\oldpart\part 145 | \def\part#1{\newpage\oldpart{#1}} 146 | 147 | \def\orvar{\textnormal{|}} 148 | 149 | \IndexPrologue 150 | { 151 | \part{Index} 152 | The~italic~numbers~denote~the~pages~where~the~ 153 | corresponding~entry~is~described,~ 154 | numbers~underlined~point~to~the~definition,~ 155 | all~others~indicate~the~places~where~it~is~used. 156 | } 157 | 158 | \EnableCrossrefs 159 | \CodelineIndex 160 | \RecordChanges 161 | 162 | \def\email#1{ 163 | \href{mailto:#1}{\texttt{#1}} 164 | } 165 | 166 | \usepackage{xparse} 167 | \ExplSyntaxOn 168 | \DeclareDocumentCommand\pkgurl{o m} 169 | { 170 | \IfNoValueTF{#1} 171 | { 172 | \href 173 | { 174 | http://mirrors.ctan.org/help/Catalogue/entries/ 175 | \str_fold_case:n {#2} .html 176 | } 177 | { \textsf{#2} } 178 | } 179 | { 180 | \href 181 | { 182 | http://mirrors.ctan.org/help/Catalogue/entries/ 183 | \str_fold_case:n {#1} .html 184 | } 185 | { \textsf{#2} } 186 | } 187 | } 188 | \ExplSyntaxOff 189 | 190 | \begin{document} 191 | \DocInput{hustreport.dtx} 192 | \end{document} 193 | % 194 | % \fi 195 | % 196 | % \CheckSum{1482} 197 | % 198 | % \iffalse 199 | %<*!(example-bib)> 200 | % \fi 201 | %% \CharacterTable 202 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 203 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z 204 | %% Digits \0\1\2\3\4\5\6\7\8\9 205 | %% Exclamation \! Double quote \" Hash (number) \# 206 | %% Dollar \$ Percent \% Ampersand \& 207 | %% Acute accent \' Left paren \( Right paren \) 208 | %% Asterisk \* Plus \+ Comma \, 209 | %% Minus \- Point \. Solidus \/ 210 | %% Colon \: Semicolon \; Less than \< 211 | %% Equals \= Greater than \> Question mark \? 212 | %% Commercial at \@ Left bracket \[ Backslash \\ 213 | %% Right bracket \] Circumflex \^ Underscore \_ 214 | %% Grave accent \` Left brace \{ Vertical bar \| 215 | %% Right brace \} Tilde \~} 216 | % \iffalse 217 | % 218 | % \fi 219 | % 220 | % \changes{v1.0}{2013/07/01}{Initial version} 221 | % \changes{v1.1}{2016/06/01}{Fix for TeXLive 2016. Remove \texttt{interfaces} and other problematic package} 222 | % \changes{v1.2}{2016/07/05}{Fix for \XeLaTeX} 223 | % 224 | % \GetFileInfo{hustreport.dtx} 225 | % 226 | % \DoNotIndex{\#,\$,\%,\&,\@,\\,\{,\},\^,\_,\~,\ ,\,} 227 | % \DoNotIndex{\def,\if,\else,\fi,\gdef,\long,\let} 228 | % \DoNotIndex{\@ne,\@nil} 229 | % \DoNotIndex{\begingroup,\endgroup,\advance} 230 | % \DoNotIndex{\newcommand,\renewcommand} 231 | % \DoNotIndex{\newenvironment,\renewenvironment} 232 | % \DoNotIndex{\RequirePackage} 233 | % 234 | % \title{A Report Template for Huazhong University of Science and Technology: the \textsf{hustreport} class 235 | % \thanks{This document corresponds to \textsf{hustreport.cls}~\fileversion, dated \filedate.}} 236 | % \author{Xu Cheng \\ \email{xucheng@me.com}} 237 | % \date{\today} 238 | % 239 | % \begingroup 240 | % \hypersetup{allcolors=black} 241 | % \maketitle 242 | % \endgroup 243 | % \tableofcontents 244 | % 245 | % \part{Introduction} 246 | % 247 | % This is a report template for \href{http://www.hust.edu.cn/}{Huazhong University of Science \& Technology}. This template is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 248 | % 249 | % The whole project is published under LPPL v1.3 License at \href{https://github.com/hust-latex/hustreport}{GitHub}. 250 | % 251 | % 中文使用说明见\autoref{part:中文使用说明}。 252 | % 253 | % English version instruction is in \autoref{part:English Version Instruction}. 254 | % 255 | % \part{中文使用说明}\label{part:中文使用说明} 256 | % 257 | % \section{使用必要条件} 258 | % 259 | % \begin{enumerate} 260 | % \item 安装最新版本的\href{http://www.tug.org/texlive/}{\texttt{TeXLive}}(推荐)或\href{http://miktex.org/}{\texttt{MiKTeX}}。因为未及时更新的宏包可能存在未修复的bug,请确保所有宏包都更新至最新。 261 | % \item 安装如下中文字体\footnote{本模板所用到的英文字体\textsf{Tex Gyre Termes},\textsf{Droid Sans}和\textsf{CMU Typewriter Text}均默认安装于\textsf{TeXLive}和\textsf{MiKTeX}中。}: 262 | % \begin{enumerate}[label=\emph{\alph*})] 263 | % \item \textsf{AdobeSongStd-Light} 264 | % \item \textsf{AdobeKaitiStd-Regular} 265 | % \item \textsf{AdobeHeitiStd-Regular} 266 | % \item \textsf{AdobeFangsongStd-Regular} 267 | % \end{enumerate} 268 | % \begin{informationnote} 269 | % 如果使用\textnormal{\LuaTeX},安装字体之后需运行命令\verb+mkluatexfontdb+生成字体索引。 270 | % \end{informationnote} 271 | % \end{enumerate} 272 | % 273 | % \section{安装} 274 | % 275 | % \subsection{安装到本地} 276 | % 277 | % 使用如下命令即可安装本模板到本地: 278 | % \begin{verbatim} 279 | % make install 280 | % \end{verbatim} 281 | % 如需卸载,则使用如下命令: 282 | % \begin{verbatim} 283 | % make uninstall 284 | % \end{verbatim} 285 | % 286 | % 对于没有安装\verb+Make+的Windows系统用户,可以使用如下命令安装: 287 | % \begin{verbatim} 288 | % makewin32.bat install 289 | % \end{verbatim} 290 | % 如需卸载,则使用如下命令: 291 | % \begin{verbatim} 292 | % makewin32.bat uninstall 293 | % \end{verbatim} 294 | % 虽然\verb+makewin32.bat+表现与\verb+Makefile+极其相似,但是还是强烈建议你安装\verb+Make+,对于Windows用户可以在\href{http://gnuwin32.sourceforge.net/packages/make.htm}{这里}下载。 295 | % 296 | % \subsection{免安装使用} 297 | % 298 | % 如果你希望临时使用本模板,而非安装到本地供长期使用。使用如下命令解压模板文件: 299 | % \begin{verbatim} 300 | % make unpack 301 | % \end{verbatim} 302 | % 对于没有安装\verb+Make+的Windows系统用户,则使用如下命令解压: 303 | % \begin{verbatim} 304 | % makewin32.bat unpack 305 | % \end{verbatim} 306 | % 307 | % 再将\verb+hustreport+目录下的如下文件拷贝到你\TeX{}工程根目录下即可: 308 | % \begin{itemize} 309 | % \item \verb+hustreport.cls+ 310 | % \item \verb+hust-title.eps+ 311 | % \item \verb+hust-title.pdf+ 312 | % \end{itemize} 313 | % 314 | % \section{基本用法} 315 | % 316 | % \begin{importantnote} 317 | % 本文档只能使用\textnormal{\XeLaTeX}或\textnormal{\LuaLaTeX}(推荐)编译。 318 | % \end{importantnote} 319 | % 320 | % 在源文件开头处选择加载本文档类型,即可使用本模板,如下所示: 321 | % \begin{verbatim} 322 | % \documentclass[language=chinese]{hustreport} 323 | % \end{verbatim} 324 | % 325 | % \subsection{文档类型选项} 326 | % 327 | % 加载本文档类型时,有如下三个选项提供选择。 328 | % 329 | % \begin{function}{format} 330 | % \begin{syntax} 331 | % format = \meta{draft\orvar{}\textbf{final}} 332 | % \end{syntax} 333 | % 提交草稿选择\verb+draft+选项,提交最终版选\verb+final+选项。其中草稿正文页包括页眉(“华中科技大学研究生院”)、页眉修饰线(单线)、页脚(页码)和页脚修饰线(单线)。而最终版正文页不包括页眉、页眉修饰线和页脚修饰线,仅包含页脚(页码)。如果不指定,默认设置为\verb+final+。 334 | % \end{function} 335 | % 336 | % \begin{function}{category} 337 | % \begin{syntax} 338 | % category = \meta{\textbf{none}\orvar{}literature-survey\orvar{}thesis-proposal\orvar{}academic-report\orvar{}midterm-progress\orvar{}practice} 339 | % \end{syntax} 340 | % 指定报告种类,它将通过设置字段\verb+\HUST@categoryname+来影响封面处的标题。各个不同的选项产生的效果见表\ref{tab:optcategory-zh}。你也可以通过命令\hyperref[cmd:category-zh]{\texttt{\textbackslash{}categoryname}}设置该字段。如果不指定,默认设置为\verb+none+。 341 | % \end{function} 342 | % 343 | % \begin{function}{language} 344 | % \begin{syntax} 345 | % language = \meta{\textbf{chinese}\orvar{}english} 346 | % \end{syntax} 347 | % 指定论文语言。如果不指定,默认设置为\verb+chinese+。 348 | % \end{function} 349 | % 350 | % \begin{table}[ht] 351 | % \centering 352 | % \caption{\texttt{category}选项的作用}\label{tab:optcategory-zh} 353 | % \begin{tabularx}{\textwidth}{|c|X|X|} 354 | % \hline 355 | % \textbf{选项} & \tabincell{c}{\textbf{中文环境下字段}\\ \verb+\HUST+\verb+@categoryname+} & \tabincell{c}{\textbf{英文环境下字段}\\\verb+\HUST+\verb+@categoryname+} \\ 356 | % \hline 357 | % \verb+none+ & & \\ \hline 358 | % \verb+literature-survey+ & 文献综述 & Literature Survey \\ \hline 359 | % \verb+thesis-proposal+ & 选题 & Thesis Proposal \\ \hline 360 | % \verb+academic-report+ & 学术报告 & Academic Report \\ \hline 361 | % \verb+midterm-progress+ & 论文中期进展 & Midterm Progress Report \\ \hline 362 | % \verb+practice+ & 实践环节 & Practice Report\\ \hline 363 | % \end{tabularx} 364 | % \end{table} 365 | % 366 | % \subsection{基本字段设置} 367 | % 368 | % 模板中定义一些命令用于设置文档中的字段。 369 | % 370 | % \begin{function}{\title} 371 | % \begin{syntax} 372 | % \cs{title}\Arg{title} 373 | % \end{syntax} 374 | % 用于设定标题。 375 | % \end{function} 376 | % 377 | % \begin{function}{\author} 378 | % \begin{syntax} 379 | % \cs{author}\Arg{author} 380 | % \end{syntax} 381 | % 用于设定作者名。 382 | % \end{function} 383 | % 384 | % \begin{function}{\major} 385 | % \begin{syntax} 386 | % \cs{major}\Arg{major} 387 | % \end{syntax} 388 | % 用于设定专业。 389 | % \end{function} 390 | % 391 | % \begin{function}{\advisor} 392 | % \begin{syntax} 393 | % \cs{advisor}\Arg{advisor} 394 | % \end{syntax} 395 | % 用于设定导师。 396 | % \end{function} 397 | % 398 | % \begin{function}{\department} 399 | % \begin{syntax} 400 | % \cs{department}\Arg{department} 401 | % \end{syntax} 402 | % 用于设定院系。 403 | % \end{function} 404 | % 405 | % \begin{function}{\stuno} 406 | % \begin{syntax} 407 | % \cs{stuno}\Arg{stduent id} 408 | % \end{syntax} 409 | % 用于设定学号。 410 | % \end{function} 411 | % 412 | % \begin{function}{\categoryname}\label{cmd:category-zh} 413 | % \begin{syntax} 414 | % \cs{categoryname}\Arg{category name} 415 | % \end{syntax} 416 | % 用于设定封面处的文档种类。 417 | % \end{function} 418 | % 419 | % \begin{function}{\abstract} 420 | % \begin{syntax} 421 | % \cs{abstract}\Arg{abstract} 422 | % \end{syntax} 423 | % 用于设定摘要。 424 | % \end{function} 425 | % 426 | % \begin{function}{\keywords} 427 | % \begin{syntax} 428 | % \cs{keywords}\Arg{keywords} 429 | % \end{syntax} 430 | % 用于设定关键字。 431 | % \end{function} 432 | % 433 | % \subsection{其它基本命令} 434 | % 435 | % 下面来介绍其它基本命令。 436 | % 437 | % \begin{function}{\frontmatter,\mainmatter,\backmatter} 438 | % 这一组命令用于设定文档的状态、改变样式,其具体使用见\nameref{sec:简单示例}。\verb+\frontmatter+用在文档最开始,表明文档的前言部分(如封面,摘要,目录等)的开始。\verb+\mainmatter+表示文档正文的开始。\verb+\backmatter+表示文档正文的结束。 439 | % \end{function} 440 | % 441 | % \begin{function}{\maketitle,\makecover} 442 | % \verb+\maketitle+和\verb+\makecover+作用相同,用于生成封面和版权页面。 443 | % \end{function} 444 | % 445 | % \begin{function}{\makeabstract} 446 | % 用于生成摘要页面。 447 | % \end{function} 448 | % 449 | % \begin{function}{\tableofcontents} 450 | % 用于生成目录。 451 | % \end{function} 452 | % 453 | % \vskip 1ex\DescribeEnv{ack} 454 | % \verb+ack+环境用于致谢页面。使用方法如下: 455 | % \begin{verbatim} 456 | % \begin{ack} 457 | % 458 | % \end{ack} 459 | % \end{verbatim} 460 | % 461 | % \begin{function}{\bibliography} 462 | % \begin{syntax} 463 | % \cs{bibliography}\Arg{.bib file} 464 | % \end{syntax} 465 | % 用于生成参考文献。 466 | % \end{function} 467 | % 468 | % \vskip 1ex\DescribeEnv{appendix} 469 | % \verb+appendix+环境用于附录环境。你可以将附录置于\verb+appendix+环境中,如: 470 | % \begin{verbatim} 471 | % \begin{appendix} 472 | % 473 | % \end{appendix} 474 | % \end{verbatim} 475 | % \begin{function}{\appendix} 476 | % 或者使用\verb+\appendix+代表后文均为附录,如: 477 | % \begin{verbatim} 478 | % \appendix 479 | % 480 | % \end{verbatim} 481 | % \end{function} 482 | % 483 | % \begin{function}{\listoffigures,\listoftables} 484 | % 这两个命令分别用于生成图片和表格索引,可以根据要求在论文前言中使用或附录中使用。 485 | % \end{function} 486 | % 487 | % \vskip 1ex\DescribeEnv{publications} 488 | % \verb+publications+环境用于已发表论文页面。一般用于附录中。使用上同\verb+enumerate+环境。如下: 489 | % \begin{verbatim} 490 | % \begin{publications} 491 | % \item 492 | % <...> 493 | % \end{publications} 494 | % \end{verbatim} 495 | % 496 | % \begin{function}{\TurnOffTabFontSetting,\TurnOnTabFontSetting} 497 | % 因为模板中设定了表格的行距和字号,使得使用中无法临时自定义表格的行距和字号。故提供两个命令用于关闭和开启默认表格的行距和字号设置。比如你如果需要输出一个自己定义字号的表格,可以使用如下示例: 498 | % \begin{verbatim} 499 | % \begingroup 500 | % \TurnOffTabFontSetting 501 | % \footnotesize % 设置字号 502 | % \begin{tabular}{...} 503 | % 504 | % \end{tabular} 505 | % \TurnOnTabFontSetting 506 | % \endgroup 507 | % \end{verbatim} 508 | % \end{function} 509 | % 510 | % \begin{function}{\email} 511 | % \begin{syntax} 512 | % \cs{email}\Arg{Email Address} 513 | % \end{syntax} 514 | % 用于生成邮箱地址。如\verb+\email{name@example.com}+会生成如下效果的地址:\email{name@example.com}。 515 | % \end{function} 516 | % 517 | % \section{简单示例}\label{sec:简单示例} 518 | % 如下为一个使用本模板的简单示例。更完整的例子请见\texttt{hustreport-zh-example.tex}文件,其效果见\href{https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport-zh-example.pdf}{\texttt{hustreport-zh-example.pdf}}。 519 | % 520 | % \iffalse 521 | %<*driver> 522 | % \fi 523 | \begin{lstlisting}[language={[LaTeX]TeX}] 524 | \documentclass[category=practice,language=chinese]{hustreport} 525 | 526 | \stuno{你的学号} 527 | \title{标题} 528 | \author{作者名} 529 | \major{专业} 530 | \advisor{导师} 531 | \department{院系} 532 | 533 | \abstract{摘要} 534 | \keywords{关键字} 535 | 536 | \begin{document} 537 | 538 | \frontmatter 539 | \maketitle 540 | \makeabstract 541 | \tableofcontents 542 | \listoffigures 543 | \listoftables 544 | \mainmatter 545 | 546 | %% 正文 547 | 548 | \backmatter 549 | 550 | \begin{ack} 551 | %% 致谢 552 | \end{ack} 553 | \bibliography{参考文献.bib文件} 554 | 555 | \appendix 556 | 557 | \begin{publications} 558 | %% 发表过的论文列表 559 | \end{publications} 560 | 561 | %% 附录剩余部分 562 | 563 | \end{document} 564 | \end{lstlisting} 565 | % \iffalse 566 | % 567 | % \fi 568 | % 569 | % \section{预设宏包介绍} 570 | % 571 | % 本模板中预设了一些宏包,下面对其进行简单介绍。 572 | % 573 | % \begin{itemize} 574 | % \item \pkgurl{algorithm2e} 算法环境。 575 | % \item \pkgurl{enumitem} 自定义列表环境的式样。 576 | % \item \pkgurl{fancynum} 用于将大数每三位断开。 577 | % \item \pkgurl{listings} 代码环境。如需更好的代码高亮可以使用\pkgurl{minted}宏包。 578 | % \item \pkgurl{longtable} 跨页的超长表格环境。 579 | % \item \pkgurl{ltxtable} \textsf{longtable}环境和\textsf{tabularx}环境的合并。 580 | % \item \pkgurl{multirow} 用于表格中合并行。 581 | % \item \pkgurl{overpic} 用于在图片上层叠其他内容。 582 | % \item \pkgurl{tabularx} 扩展到表格环境。 583 | % \item \pkgurl{zhnumber} 用于生成中文数字。 584 | % \end{itemize} 585 | % 586 | % \section{高级设置} 587 | % 588 | % \subsection{切换字体} 589 | % 590 | % 模板正文字体为宋体(\textsf{AdobeSongStd-Light}),同时我们提供如下命令切换中文字体: 591 | % 592 | % \begin{function}{\HEI,\hei} 593 | % \begin{syntax} 594 | % \{\cs{HEI} \meta{content}\} 595 | % \cs{hei}\Arg{content} 596 | % \end{syntax} 597 | % 切换字体为黑体(\textsf{AdobeHeitiStd-Regular})。 598 | % \end{function} 599 | % 600 | % \begin{function}{\KAI,\kai} 601 | % \begin{syntax} 602 | % \{\cs{KAI} \meta{content}\} 603 | % \cs{kai}\Arg{content} 604 | % \end{syntax} 605 | % 切换字体为楷体(\textsf{AdobeKaitiStd-Regular})。 606 | % \end{function} 607 | % 608 | % \begin{function}{\FANGSONG,\fangsong} 609 | % \begin{syntax} 610 | % \{\cs{FANGSONG} \meta{content}\} 611 | % \cs{fangsong}\Arg{content} 612 | % \end{syntax} 613 | % 切换字体为仿宋(\textsf{AdobeFangsongStd-Regular})。 614 | % \end{function} 615 | % 616 | % 如果需要加载其他字体,请参阅宏包\pkgurl{fontspec},宏包\pkgurl{xeCJK}(对于\XeLaTeX{})和宏包\pkgurl[luatexja]{luatex-ja}(对于\LuaLaTeX{})的文档。 617 | % 618 | % \part{English Version Instruction}\label{part:English Version Instruction} 619 | % 620 | % \section{Requirement} 621 | % Install the latest version of \href{http://www.tug.org/texlive/}{\texttt{TeXLive}}(Recommend) or \href{http://miktex.org/}{\texttt{MiKTeX}}. Please ensure that all the packages are up-to-date. 622 | % 623 | % \section{Installation} 624 | % 625 | % \subsection{Install into local} 626 | % 627 | % Use the command below to install this template into local. 628 | % \begin{verbatim} 629 | % make install 630 | % \end{verbatim} 631 | % If you need uninstall it, use the command below. 632 | % \begin{verbatim} 633 | % make uninstall 634 | % \end{verbatim} 635 | % 636 | % For Windows User who don't install \texttt{Make}, use the command below to install. 637 | % \begin{verbatim} 638 | % makewin32.bat install 639 | % \end{verbatim} 640 | % If you need uninstall it, use the command below. 641 | % \begin{verbatim} 642 | % makewin32.bat uninstall 643 | % \end{verbatim} 644 | % Although \texttt{makewin32.bat} behaves much like \texttt{Makefile}, I still 645 | % recommend you install \texttt{Make} into your Windows. You can download 646 | % it from \href{http://gnuwin32.sourceforge.net/packages/make.htm}{here}. 647 | % 648 | % \subsection{Use without installation} 649 | % 650 | % If you want to use this template temporary rather than installing it into local for long term use. Run below command to unpack the package. 651 | % \begin{verbatim} 652 | % make unpack 653 | % \end{verbatim} 654 | % For Windows User who don't install \texttt{Make}, use the command below to unpack the package. 655 | % \begin{verbatim} 656 | % makewin32.bat unpack 657 | % \end{verbatim} 658 | % Then copy the following files from directory \texttt{hustreport} into your \TeX{} project root directory. 659 | % \begin{itemize} 660 | % \item \verb+hustreport.cls+ 661 | % \item \verb+hust-title.eps+ 662 | % \item \verb+hust-title.pdf+ 663 | % \end{itemize} 664 | % 665 | % \section{Usage} 666 | % \begin{importantnote} 667 | % This template can only be compiled by \\ 668 | % \hskip 10pt \textnormal{\XeLaTeX} or\textnormal{\LuaLaTeX}(Recommend). 669 | % \end{importantnote} 670 | % 671 | % Insert below code in the top of source code to use this template: 672 | % \begin{verbatim} 673 | % \documentclass[language=english]{hustreport} 674 | % \end{verbatim} 675 | % 676 | % \subsection{Option} 677 | % 678 | % There're three options available when use this template. 679 | % 680 | % % \begin{function}{format} 681 | % \begin{syntax} 682 | % format = \meta{draft\orvar{}\textbf{final}} 683 | % \end{syntax} 684 | % If \verb+format+ is set to \verb+final+, the header will be removed. This option is only valid if \verb+language+ is set to \verb+chinese+. The default value is \verb+final+. 685 | % \end{function} 686 | % 687 | % \begin{function}{language} 688 | % \begin{syntax} 689 | % language = \meta{\textbf{chinese}\orvar{}english} 690 | % \end{syntax} 691 | % Set what language is used in the document. The default value is \verb+chinese+. 692 | % \end{function} 693 | % 694 | % \begin{function}{category} 695 | % \begin{syntax} 696 | % category = \meta{\textbf{none}\orvar{}literature-survey\orvar{}thesis-proposal\orvar{}academic-report\orvar{}midterm-progress\orvar{}practice} 697 | % \end{syntax} 698 | % Set the category of the report. It will influence the title of document, see Table~\ref{tab:optcategory-en}. You also can set it manually by the command \hyperref[cmd:category-en]{\texttt{\textbackslash{}categoryname}}. The default value is \verb+none+. 699 | % \end{function} 700 | % 701 | % \begin{table}[ht] 702 | % \centering 703 | % \caption{Title under different \texttt{category} option}\label{tab:optcategory-en} 704 | % \begin{tabularx}{\textwidth}{|c|X|X|} 705 | % \hline 706 | % \textbf{Option} & \tabincell{c}{\textbf{In Chinese mode}\\ \verb+\HUST+\verb+@categoryname+} & \tabincell{c}{\textbf{In English mode}\\\verb+\HUST+\verb+@categoryname+} \\ 707 | % \hline 708 | % \verb+none+ & & \\ \hline 709 | % \verb+literature-survey+ & 文献综述 & Literature Survey \\ \hline 710 | % \verb+thesis-proposal+ & 选题 & Thesis Proposal \\ \hline 711 | % \verb+academic-report+ & 学术报告 & Academic Report \\ \hline 712 | % \verb+midterm-progress+ & 论文中期进展 & Midterm Progress Report\\ \hline 713 | % \verb+practice+ & 实践环节 & Practice Report\\ \hline 714 | % \end{tabularx} 715 | % \end{table} 716 | % 717 | % \subsection{Variables setting} 718 | % 719 | % There're some commands which are used to set the variables for the thesis. 720 | % 721 | % \begin{function}{\title} 722 | % \begin{syntax} 723 | % \cs{title}\Arg{title} 724 | % \end{syntax} 725 | % Set title. 726 | % \end{function} 727 | % 728 | % \begin{function}{\author} 729 | % \begin{syntax} 730 | % \cs{author}\Arg{author} 731 | % \end{syntax} 732 | % Set author. 733 | % \end{function} 734 | % 735 | % \begin{function}{\major} 736 | % \begin{syntax} 737 | % \cs{major}\Arg{major} 738 | % \end{syntax} 739 | % Set your major. 740 | % \end{function} 741 | % 742 | % \begin{function}{\advisor} 743 | % \begin{syntax} 744 | % \cs{advisor}\Arg{advisor} 745 | % \end{syntax} 746 | % Set your advisor. 747 | % \end{function} 748 | % 749 | % \begin{function}{\department} 750 | % \begin{syntax} 751 | % \cs{department}\Arg{department} 752 | % \end{syntax} 753 | % Set your department. 754 | % \end{function} 755 | % 756 | % \begin{function}{\stuno} 757 | % \begin{syntax} 758 | % \cs{stuno}\Arg{stduent id} 759 | % \end{syntax} 760 | % Set your student ID. 761 | % \end{function} 762 | % 763 | % \begin{function}{\categoryname}\label{cmd:category-en} 764 | % \begin{syntax} 765 | % \cs{categoryname}\Arg{category name} 766 | % \end{syntax} 767 | % Set the category name in the titlepage. 768 | % \end{function} 769 | % 770 | % \begin{function}{\abstract} 771 | % \begin{syntax} 772 | % \cs{abstract}\Arg{abstract} 773 | % \end{syntax} 774 | % Put your abstract. 775 | % \end{function} 776 | % 777 | % \begin{function}{\keywords} 778 | % \begin{syntax} 779 | % \cs{keywords}\Arg{keywords} 780 | % \end{syntax} 781 | % Put your keywords. 782 | % \end{function} 783 | % 784 | % \subsection{Other commands} 785 | % 786 | % \begin{function}{\frontmatter,\mainmatter,\backmatter} 787 | % Used to determine the different part of document. You can see the example at \autoref{sec:simple-example}. 788 | % \end{function} 789 | % 790 | % \begin{function}{\maketitle,\makecover} 791 | % \verb+\maketitle+ and \verb+\makecover+ are the same. Used to create the title page. 792 | % \end{function} 793 | % 794 | % \begin{function}{\makeabstract} 795 | % Used to create abstract page. 796 | % \end{function} 797 | % 798 | % \begin{function}{\tableofcontents} 799 | % Used to create table of contents. 800 | % \end{function} 801 | % 802 | % \vskip 1ex\DescribeEnv{ack} 803 | % The \verb+ack+ environment is used to create acknowledge page. 804 | % \begin{verbatim} 805 | % \begin{ack} 806 | % 807 | % \end{ack} 808 | % \end{verbatim} 809 | % 810 | % \begin{function}{\bibliography} 811 | % \begin{syntax} 812 | % \cs{bibliography}\Arg{.bib file} 813 | % \end{syntax} 814 | % Used to create bibliography page. 815 | % \end{function} 816 | % 817 | % \vskip 1ex\DescribeEnv{appendix} 818 | % The \verb+appendix+ environment is for appendix of course. Used like this: 819 | % \begin{verbatim} 820 | % \begin{appendix} 821 | % 822 | % \end{appendix} 823 | % \end{verbatim} 824 | % \begin{function}{\appendix} 825 | % Or simple use \verb+\appendix+ to indicate that the rest of document are all in appendix, like this: 826 | % \begin{verbatim} 827 | % \appendix 828 | % 829 | % \end{verbatim} 830 | % \end{function} 831 | % 832 | % \begin{function}{\listoffigures,\listoftables} 833 | % Create the index for all the figures and tables separately. 834 | % \end{function} 835 | % 836 | % \vskip 1ex\DescribeEnv{publications} 837 | % The \verb+publications+ environment is where you list all of your published thesises. It's usually putted in appendix. 838 | % \begin{verbatim} 839 | % \begin{publications} 840 | % \item 841 | % <...> 842 | % \end{publications} 843 | % \end{verbatim} 844 | % 845 | % \begin{function}{\TurnOffTabFontSetting,\TurnOnTabFontSetting} 846 | % This template has set the font size and line spread for all the tables which makes it's impossible to change font format temporary in one table. So it provides these to command to temporary disable or enable default font setting in table. For example, if you want to change table font size, you can use the code like this: 847 | % \begin{verbatim} 848 | % \begingroup 849 | % \TurnOffTabFontSetting 850 | % \footnotesize % Set your font format as you like. 851 | % \begin{tabular}{...} 852 | % 853 | % \end{tabular} 854 | % \TurnOnTabFontSetting 855 | % \endgroup 856 | % \end{verbatim} 857 | % \end{function} 858 | % 859 | % \begin{function}{\email} 860 | % \begin{syntax} 861 | % \cs{email}\Arg{Email Address} 862 | % \end{syntax} 863 | % A command to display email address. For example, \verb+\email{name@example.com}+ would look like this: \email{name@example.com}. 864 | % \end{function} 865 | % 866 | % \section{Simple example}\label{sec:simple-example} 867 | % Below is a simple example of using this template. For a complete example see \texttt{hustreport-en-example.tex} which will generate \href{https://github.com/hust-latex/hustreport/raw/master/hustreport/hustreport-en-example.pdf}{\texttt{hustreport-en-example.pdf}}. 868 | % 869 | % \iffalse 870 | %<*driver> 871 | % \fi 872 | \begin{lstlisting}[language={[LaTeX]TeX}] 873 | \documentclass[category=practice,language=english]{hustreport} 874 | 875 | \title{your title} 876 | \author{your name} 877 | \stuno{your student number} 878 | \advisor{your advisor} 879 | \major{your major} 880 | \department{your department} 881 | 882 | \abstract{the abstract} 883 | \keywords{the keywords} 884 | 885 | \begin{document} 886 | 887 | \frontmatter 888 | \maketitle 889 | \makeabstract 890 | \tableofcontents 891 | \listoffigures 892 | \listoftables 893 | \mainmatter 894 | 895 | %% main body 896 | 897 | \backmatter 898 | 899 | \begin{ack} 900 | %% acknowledge 901 | \end{ack} 902 | \bibliography{.bib file} 903 | 904 | \appendix 905 | 906 | \begin{publications} 907 | %% your publications 908 | \end{publications} 909 | 910 | %% rest of appendix 911 | 912 | \end{document} 913 | \end{lstlisting} 914 | % \iffalse 915 | % 916 | % \fi 917 | % 918 | % 919 | % \section{Introduction to some packages used in the template} 920 | % 921 | % Here's a list of some packages used in the template. 922 | % 923 | % \begin{itemize} 924 | % \item \pkgurl{algorithm2e} For display algorithm. 925 | % \item \pkgurl{enumitem} For set the style of enumerate, itemize and description environment. 926 | % \item \pkgurl{fancynum} Display the really big number. 927 | % \item \pkgurl{listings} For display the highlighted code. If you need better quality, use the package \pkgurl{minted}. 928 | % \item \pkgurl{longtable} Create a very long table. 929 | % \item \pkgurl{ltxtable} Combine the features of \textsf{longtable} anb \textsf{tabularx}. 930 | % \item \pkgurl{multirow} Combine multi-rows in table. 931 | % \item \pkgurl{overpic} Put something over a picture, 932 | % \item \pkgurl{tabularx} A better table environment. 933 | % \end{itemize} 934 | % 935 | % \StopEventually{ 936 | % \PrintIndex 937 | % } 938 | % 939 | % \part{Implementation}\label{part:Implementation} 940 | % 941 | % \begin{macrocode} 942 | %<*class> 943 | \RequirePackage{ifthen} 944 | % \end{macrocode} 945 | % 946 | % \section{Process Options} 947 | % Use \pkgurl{xkeyval} to process options. 948 | % \begin{macrocode} 949 | \RequirePackage{xkeyval} 950 | % \end{macrocode} 951 | % 952 | % Option |format|. 953 | % \begin{macrocode} 954 | \newif\ifHUST@finalformat 955 | \HUST@finalformattrue 956 | \DeclareOptionX{format}[final]{ 957 | \ifthenelse{\equal{#1}{final}}{ 958 | \HUST@finalformattrue 959 | }{ 960 | \ifthenelse{\equal{#1}{draft}}{ 961 | \HUST@finalformatfalse 962 | }{ 963 | \ClassError{hustreport} 964 | {Option format can only be 'final' or 'draft'} 965 | {Try to remove option format^^J} 966 | } 967 | } 968 | } 969 | % \end{macrocode} 970 | % 971 | % Option |language|. 972 | % \begin{macrocode} 973 | \gdef\HUST@language{chinese} 974 | \DeclareOptionX{language}[chinese]{ 975 | \ifthenelse{\equal{#1}{chinese} \OR \equal{#1}{english}}{ 976 | \gdef\HUST@language{#1} 977 | }{ 978 | \ClassError{hustreport} 979 | {Option language can only be 'chinese' or 'english'} 980 | {Try to remove option language^^J} 981 | } 982 | } 983 | % \end{macrocode} 984 | % 985 | % Option |degree|. 986 | % \begin{macrocode} 987 | \gdef\HUST@degree{ms} 988 | \DeclareOptionX{degree}[ms]{ 989 | \ifthenelse{\equal{#1}{ms} \OR \equal{#1}{me} \OR \equal{#1}{phd}}{ 990 | \gdef\HUST@degree{#1} 991 | }{ 992 | \ClassError{hustreport} 993 | {Option degree can only be 'ms', 'me' or 'phd'} 994 | {Try to remove option degree^^J} 995 | } 996 | } 997 | % \end{macrocode} 998 | % 999 | % Option |category|. 1000 | % \begin{macrocode} 1001 | \gdef\HUST@category{none} 1002 | \DeclareOptionX{category}[none]{ 1003 | \ifthenelse{\equal{#1}{none} \OR \equal{#1}{literature-survey} \OR \equal{#1}{thesis-proposal} \OR \equal{#1}{academic-report} \OR \equal{#1}{midterm-progress} \OR \equal{#1}{practice}}{ 1004 | \gdef\HUST@category{#1} 1005 | }{ 1006 | \ClassError{hustreport} 1007 | {Option category can only be 'none', 'literature-survey', 'thesis-proposal', 'academic-report', 'midterm-progress' or 'practice'} 1008 | {Try to remove option category^^J} 1009 | } 1010 | } 1011 | % \end{macrocode} 1012 | % 1013 | % Process options and load class |book|. 1014 | % \begin{macrocode} 1015 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}} 1016 | \ProcessOptionsX 1017 | \LoadClass[12pt, a4paper, openany]{book} 1018 | % \end{macrocode} 1019 | % 1020 | % \section{Check Engine} 1021 | % Check engine, only \XeLaTeX{} and \LuaLaTeX{} are supported. 1022 | % \begin{macrocode} 1023 | \RequirePackage{iftex} 1024 | \ifXeTeX\else 1025 | \ifLuaTeX\else 1026 | \begingroup 1027 | \errorcontextlines=-1\relax 1028 | \newlinechar=10\relax 1029 | \errmessage{^^J 1030 | *******************************************************^^J 1031 | * XeTeX or LuaTeX is required to compile this document.^^J 1032 | * Sorry!^^J 1033 | *******************************************************^^J 1034 | }% 1035 | \endgroup 1036 | \fi 1037 | \fi 1038 | % \end{macrocode} 1039 | % 1040 | % \section{Font Setting} 1041 | % Set font used in document. Firstly, it's font setting for English font under |english| mode. We use \pkgurl{fontspec} package to handle font. We choose \textsf{Tex Gyre Termes}, \textsf{Droid Sans} and \textsf{CMU Typewriter Text} as document main font, sans font and mono font. 1042 | % \begin{macrocode} 1043 | \ifthenelse{\equal{\HUST@language}{english}}{ 1044 | \RequirePackage{fontspec} 1045 | \setmainfont[ 1046 | Ligatures={Common,TeX}, 1047 | Extension=.otf, 1048 | UprightFont=*-regular, 1049 | BoldFont=*-bold, 1050 | ItalicFont=*-italic, 1051 | BoldItalicFont=*-bolditalic]{texgyretermes} 1052 | \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 1053 | \setmonofont{CMU Typewriter Text} 1054 | \defaultfontfeatures{Mapping=tex-text} 1055 | % \end{macrocode} 1056 | % 1057 | % Now let's set the Chinese font commands into empty, when document is under |english| mode. 1058 | % \begin{macrocode} 1059 | \let\HEI\relax 1060 | \let\KAI\relax 1061 | \let\FANGSONG\relax 1062 | \newcommand{\hei}[1]{#1} 1063 | \newcommand{\kai}[1]{#1} 1064 | \newcommand{\fangsong}[1]{#1} 1065 | }{} 1066 | % \end{macrocode} 1067 | % 1068 | % Below is the font setting under |chinese| mode. We chooses the same English font as under |english| mode. We use \pkgurl{xecjk} package (for \XeLaTeX) or \pkgurl[luatexja]{luatex-ja} package (for \LuaLaTeX, recommend) to handle Chinese font. We will use font: \textsf{AdobeSongStd-Light}, \textsf{AdobeKaitiStd-Regular}, \textsf{AdobeHeitiStd-Regular} and \textsf{AdobeFangsongStd-Regular}. 1069 | % \begin{macrocode} 1070 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1071 | \ifXeTeX % XeTeX下使用fontspec + xeCJK处理字体 1072 | % 英文字体 1073 | \RequirePackage{fontspec} 1074 | \RequirePackage{xunicode} 1075 | \setmainfont[ 1076 | Ligatures={Common,TeX}, 1077 | Extension=.otf, 1078 | UprightFont=*-regular, 1079 | BoldFont=*-bold, 1080 | ItalicFont=*-italic, 1081 | BoldItalicFont=*-bolditalic]{texgyretermes} 1082 | \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 1083 | \setmonofont{CMU Typewriter Text} 1084 | \defaultfontfeatures{Mapping=tex-text} 1085 | % 中文字体 1086 | \RequirePackage[CJKmath]{xeCJK} 1087 | \setCJKmainfont[ 1088 | BoldFont={Adobe Heiti Std}, 1089 | ItalicFont={Adobe Kaiti Std}]{Adobe Song Std} 1090 | \setCJKsansfont{Adobe Kaiti Std} 1091 | \setCJKmonofont{Adobe Fangsong Std} 1092 | \xeCJKsetup{PunctStyle=kaiming} 1093 | 1094 | \newcommand\ziju[2]{{\renewcommand{\CJKglue}{\hskip #1} #2}} 1095 | % \end{macrocode} 1096 | % 1097 | % \begin{macro}{\HEI} 1098 | % \begin{macrocode} 1099 | \newCJKfontfamily\HEI{Adobe Heiti Std} 1100 | % \end{macrocode} 1101 | % \end{macro} 1102 | % 1103 | % \begin{macro}{\KAI} 1104 | % \begin{macrocode} 1105 | \newCJKfontfamily\KAI{Adobe Kaiti Std} 1106 | % \end{macrocode} 1107 | % \end{macro} 1108 | % 1109 | % \begin{macro}{\FANGSONG} 1110 | % \begin{macrocode} 1111 | \newCJKfontfamily\FANGSONG{Adobe Fangsong Std} 1112 | % \end{macrocode} 1113 | % \end{macro} 1114 | % 1115 | % \begin{macro}{\hei} 1116 | % \begin{macrocode} 1117 | \newcommand{\hei}[1]{{\HEI #1}} 1118 | % \end{macrocode} 1119 | % \end{macro} 1120 | % 1121 | % \begin{macro}{\kai} 1122 | % \begin{macrocode} 1123 | \newcommand{\kai}[1]{{\KAI #1}} 1124 | % \end{macrocode} 1125 | % \end{macro} 1126 | % 1127 | % \begin{macro}{\fangsong} 1128 | % \begin{macrocode} 1129 | \newcommand{\fangsong}[1]{{\FANGSONG #1}} 1130 | % \end{macrocode} 1131 | % \end{macro} 1132 | % 1133 | % \begin{macrocode} 1134 | \else\fi 1135 | \ifLuaTeX % LuaTeX下使用luatex-ja处理字体 [推荐] 1136 | \RequirePackage{luatexja-fontspec} 1137 | % 英文字体 1138 | \setmainfont[Ligatures={Common,TeX}]{Tex Gyre Termes} 1139 | \setsansfont[Ligatures={Common,TeX}]{Droid Sans} 1140 | \setmonofont{CMU Typewriter Text} 1141 | \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase} 1142 | % 中文字体 1143 | \setmainjfont[ 1144 | BoldFont={AdobeHeitiStd-Regular}, 1145 | ItalicFont={AdobeKaitiStd-Regular}]{AdobeSongStd-Light} 1146 | \setsansjfont{AdobeKaitiStd-Regular} 1147 | \defaultjfontfeatures{JFM=kaiming} 1148 | 1149 | \newcommand\ziju[2]{\vbox{\ltjsetparameter{kanjiskip=#1} #2}} 1150 | % \end{macrocode} 1151 | % 1152 | % \begin{macro}{\HEI} 1153 | % \begin{macrocode} 1154 | \newjfontfamily\HEI{AdobeHeitiStd-Regular} 1155 | % \end{macrocode} 1156 | % \end{macro} 1157 | % 1158 | % \begin{macro}{\KAI} 1159 | % \begin{macrocode} 1160 | \newjfontfamily\KAI{AdobeKaitiStd-Regular} 1161 | % \end{macrocode} 1162 | % \end{macro} 1163 | % 1164 | % \begin{macro}{\FANGSONG} 1165 | % \begin{macrocode} 1166 | \newjfontfamily\FANGSONG{AdobeFangsongStd-Regular} 1167 | % \end{macrocode} 1168 | % \end{macro} 1169 | % 1170 | % \begin{macro}{\hei} 1171 | % \begin{macrocode} 1172 | \newcommand{\hei}[1]{{\jfontspec{AdobeHeitiStd-Regular} #1}} 1173 | % \end{macrocode} 1174 | % \end{macro} 1175 | % 1176 | % \begin{macro}{\kai} 1177 | % \begin{macrocode} 1178 | \newcommand{\kai}[1]{{\jfontspec{AdobeKaitiStd-Regular} #1}} 1179 | % \end{macrocode} 1180 | % \end{macro} 1181 | % 1182 | % \begin{macro}{\fangsong} 1183 | % \begin{macrocode} 1184 | \newcommand{\fangsong}[1]{{\jfontspec{AdobeFangsongStd-Regular} #1}} 1185 | % \end{macrocode} 1186 | % \end{macro} 1187 | % 1188 | % \begin{macrocode} 1189 | \else\fi 1190 | % \end{macrocode} 1191 | % 1192 | % Generate Chinese number using \pkgurl{zhnumber}. 1193 | % \begin{macrocode} 1194 | \RequirePackage{zhnumber} 1195 | \def\CJKnumber#1{\zhnumber{#1}} % 兼容CJKnumb 1196 | }{} 1197 | % \end{macrocode} 1198 | % 1199 | % \section{Basic Format} 1200 | % We set global line spread to 1.3. 1201 | % \begin{macrocode} 1202 | \linespread{1.3}\selectfont 1203 | % \end{macrocode} 1204 | % 1205 | % Use \pkgurl{geometry} package to handle paper page. 1206 | % \begin{macrocode} 1207 | \RequirePackage{geometry} 1208 | \geometry{ 1209 | top=1.2in, 1210 | bottom=1.2in, 1211 | left=1in, 1212 | right=1in, 1213 | includefoot 1214 | } 1215 | \ifthenelse{\isundefined{\pagewidth}}{ 1216 | \pdfpagewidth=\paperwidth 1217 | \pdfpageheight=\paperheight 1218 | }{ 1219 | \pagewidth=\paperwidth 1220 | \pageheight=\paperheight 1221 | } 1222 | % \end{macrocode} 1223 | % 1224 | % Indent of paragraph and skip between paragraphs. 1225 | % \begin{macrocode} 1226 | \RequirePackage{indentfirst} 1227 | \setlength{\parindent}{2em} 1228 | \setlength{\parskip}{0pt plus 2pt minus 1pt} 1229 | % \end{macrocode} 1230 | % 1231 | % Packages to handle color. 1232 | % \begin{macrocode} 1233 | \RequirePackage{color} 1234 | \RequirePackage[table]{xcolor} 1235 | % \end{macrocode} 1236 | % 1237 | % Use \pkgurl{hyperref} package to generate cross-reference link. 1238 | % \begin{macrocode} 1239 | \RequirePackage[unicode]{hyperref} 1240 | \hypersetup{ 1241 | bookmarksnumbered=true, 1242 | bookmarksopen=true, 1243 | bookmarksopenlevel=1, 1244 | breaklinks=true, 1245 | colorlinks=true, 1246 | allcolors=black, 1247 | linktoc=all, 1248 | plainpages=false, 1249 | pdfpagelabels=true, 1250 | pdfstartview={XYZ null null 1}, 1251 | pdfinfo={Template.Info={hustreport.cls v1.0 2013/07/01, Copyright (C) 2013-2014 by Xu Cheng 2014 by hust-latex, https://github.com/hust-latex/hustreport}} 1252 | } 1253 | % \end{macrocode} 1254 | % 1255 | % \section{Load Packages} 1256 | % Load packages for math. 1257 | % \begin{macrocode} 1258 | \RequirePackage{amsmath,amssymb,amsfonts} 1259 | \RequirePackage[amsmath,amsthm,thmmarks,hyperref,thref]{ntheorem} 1260 | \RequirePackage{fancynum} 1261 | \setfnumgsym{\,} 1262 | \RequirePackage[lined,boxed,linesnumbered,ruled,vlined,algochapter]{algorithm2e} 1263 | % \end{macrocode} 1264 | % 1265 | % Load packages for picture. 1266 | % \begin{macrocode} 1267 | \RequirePackage{overpic} 1268 | \RequirePackage{graphicx,caption,subcaption} 1269 | % \end{macrocode} 1270 | % 1271 | % Load packages for table. 1272 | % \begin{macrocode} 1273 | \RequirePackage{array} 1274 | \RequirePackage{multirow,tabularx,ltxtable} 1275 | % \end{macrocode} 1276 | % 1277 | % Load package for code highlight. Here we use \pkgurl{listings} to highlight the code. But if you need more features, use \pkgurl{minted}. 1278 | % \begin{macrocode} 1279 | \RequirePackage{listings} 1280 | % \end{macrocode} 1281 | % 1282 | % Load package for bibliography cite style. 1283 | % \begin{macrocode} 1284 | \RequirePackage[numbers,square,comma,super,sort&compress]{natbib} 1285 | % \end{macrocode} 1286 | % 1287 | % Other packages for style setting. 1288 | % \begin{macrocode} 1289 | \RequirePackage{titlesec} 1290 | \RequirePackage{titletoc} 1291 | \RequirePackage{tocvsec2} 1292 | \RequirePackage[inline]{enumitem} 1293 | \RequirePackage{fancyhdr} 1294 | \RequirePackage{afterpage} 1295 | \RequirePackage{datenumber} 1296 | \RequirePackage{etoolbox} 1297 | \RequirePackage{appendix} 1298 | \RequirePackage[titles]{tocloft} 1299 | \RequirePackage{xstring} 1300 | \RequirePackage{perpage} 1301 | % \end{macrocode} 1302 | % 1303 | % \section{Variables Setting} 1304 | % \begin{macro}{\title} 1305 | % A command to set the title. 1306 | % \begin{macrocode} 1307 | \def\title#1{\gdef\HUST@title{#1}\hypersetup{pdftitle={#1}}} 1308 | \title{} 1309 | % \end{macrocode} 1310 | % \end{macro} 1311 | % 1312 | % \begin{macro}{\author} 1313 | % A command to set the author. 1314 | % \begin{macrocode} 1315 | \def\author#1{\gdef\HUST@author{#1}\hypersetup{pdfauthor={#1}}} 1316 | \author{} 1317 | % \end{macrocode} 1318 | % \end{macro} 1319 | % 1320 | % \begin{macro}{\major} 1321 | % A command to set the major. 1322 | % \begin{macrocode} 1323 | \def\major#1{\gdef\HUST@major{#1}} 1324 | \major{} 1325 | % \end{macrocode} 1326 | % \end{macro} 1327 | % 1328 | % \begin{macro}{\advisor} 1329 | % A command to set the advisor. 1330 | % \begin{macrocode} 1331 | \def\advisor#1{\gdef\HUST@advisor{#1}} 1332 | \advisor{} 1333 | % \end{macrocode} 1334 | % \end{macro} 1335 | % 1336 | % \begin{macro}{\department} 1337 | % A command to set the department. 1338 | % \begin{macrocode} 1339 | \def\department#1{\gdef\HUST@department{#1}} 1340 | \department{} 1341 | % \end{macrocode} 1342 | % \end{macro} 1343 | % 1344 | % \begin{macro}{\stuno} 1345 | % A command to set student number. 1346 | % \begin{macrocode} 1347 | \def\stuno#1{\gdef\HUST@stuno{#1}} 1348 | \stuno{} 1349 | % \end{macrocode} 1350 | % \end{macro} 1351 | % 1352 | % \begin{macro}{\categoryname} 1353 | % A command to set the categoryname. 1354 | % \begin{macrocode} 1355 | \def\categoryname#1{\gdef\HUST@categoryname{#1}} 1356 | \categoryname{} 1357 | % \end{macrocode} 1358 | % \end{macro} 1359 | % 1360 | % \begin{macro}{\abstract} 1361 | % A command to set the abstract. 1362 | % \begin{macrocode} 1363 | \long\def\abstract#1{\long\gdef\HUST@abstract{#1}} 1364 | \abstract{} 1365 | % \end{macrocode} 1366 | % \end{macro} 1367 | % 1368 | % \begin{macro}{\keywords} 1369 | % Commands to set the keywords. 1370 | % \begin{macrocode} 1371 | \def\keywords#1{\gdef\HUST@keywords{#1}\hypersetup{pdfkeywords={#1}}} 1372 | \keywords{} 1373 | % \end{macrocode} 1374 | % \end{macro} 1375 | % 1376 | % \section{Localization} 1377 | % Chinese localization. 1378 | % \footnote{The |autorefname| Reference:\url{http://tex.stackexchange.com/questions/52410/how-to-use-the-command-autoref-to-implement-the-same-effect-when-use-the-comman}} 1379 | % \begin{macrocode} 1380 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1381 | \def\indexname{索引} 1382 | \def\figurename{图} 1383 | \def\tablename{表} 1384 | \AtBeginDocument{\def\listingscaption{代码}} 1385 | \def\bibname{参考文献} 1386 | \def\contentsname{目\hspace{1em}录} 1387 | \def\contentsnamenospace{目录} 1388 | \def\appendixname{附录} 1389 | \def\HUST@listfigurename{插图索引} 1390 | \def\HUST@listtablename{表格索引} 1391 | \def\equationautorefname{公式} 1392 | \def\footnoteautorefname{脚注} 1393 | \def\itemautorefname~#1\null{第~#1~项\null} 1394 | \def\figureautorefname{图} 1395 | \def\tableautorefname{表} 1396 | \def\appendixautorefname{附录} 1397 | \expandafter\def\csname\appendixname autorefname\endcsname{\appendixname} 1398 | \def\chapterautorefname~#1\null{第\zhnumber{#1}章\null} 1399 | \def\sectionautorefname~#1\null{#1~小节\null} 1400 | \def\subsectionautorefname~#1\null{#1~小节\null} 1401 | \def\subsubsectionautorefname~#1\null{#1~小节\null} 1402 | \def\FancyVerbLineautorefname~#1\null{第~#1~行\null} 1403 | \def\pageautorefname~#1\null{第~#1~页\null} 1404 | \def\lstlistingautorefname{代码} 1405 | \def\definitionautorefname{定义} 1406 | \def\propositionautorefname{命题} 1407 | \def\lemmaautorefname{引理} 1408 | \def\theoremautorefname{定理} 1409 | \def\axiomautorefname{公理} 1410 | \def\corollaryautorefname{推论} 1411 | \def\exerciseautorefname{练习} 1412 | \def\exampleautorefname{例} 1413 | \def\proofautorefname{证明} 1414 | \SetAlgorithmName{算法}{算法}{算法索引} 1415 | \SetAlgoProcName{过程}{过程} 1416 | \SetAlgoFuncName{函数}{函数} 1417 | \def\AlgoLineautorefname~#1\null{第~#1~行\null} 1418 | }{} 1419 | % \end{macrocode} 1420 | % 1421 | % English localization. 1422 | % \begin{macrocode} 1423 | \ifthenelse{\equal{\HUST@language}{chinese}}{}{ 1424 | \def\HUST@listfigurename{List of Figures} 1425 | \def\HUST@listtablename{List of Tables} 1426 | \def\equationautorefname{Equation} 1427 | \def\footnoteautorefname{Footnote} 1428 | \def\itemautorefname{Item} 1429 | \def\figureautorefname{Figure} 1430 | \def\tableautorefname{Table} 1431 | \def\appendixautorefname{Appendix} 1432 | \expandafter\def\csname\appendixname autorefname\endcsname{\appendixname} 1433 | \def\chapterautorefname{Chapter} 1434 | \def\sectionautorefname{Section} 1435 | \def\subsectionautorefname{Subsection} 1436 | \def\subsubsectionautorefname{Sub-subsection} 1437 | \def\FancyVerbLineautorefname{Line} 1438 | \def\pageautorefname{Page} 1439 | \def\lstlistingautorefname{Code Fragment} 1440 | \def\definitionautorefname{Definition} 1441 | \def\propositionautorefname{Proposition} 1442 | \def\lemmaautorefname{Lemma} 1443 | \def\theoremautorefname{Theorem} 1444 | \def\axiomautorefname{Axiom} 1445 | \def\corollaryautorefname{Corollary} 1446 | \def\exerciseautorefname{Exercise} 1447 | \def\exampleautorefname{Example} 1448 | \def\proofautorefname{Proof} 1449 | \SetAlgorithmName{Algorithm}{Algorithm}{List of Algorithms} 1450 | \SetAlgoProcName{Procedure}{Procedure} 1451 | \SetAlgoFuncName{Function}{Function} 1452 | \def\AlgoLineautorefname{Line} 1453 | } 1454 | % \end{macrocode} 1455 | % 1456 | % Internal variables. 1457 | % \begin{macrocode} 1458 | \def\HUST@headcontent{华中科技大学研究生院} 1459 | 1460 | \def\HUST@zhabstractname{摘\hspace{1em}要} 1461 | \def\HUST@zhabstractnamenospace{摘要} 1462 | \def\HUST@zhkeywordstitle{关键词:} 1463 | \def\HUST@enabstractname{Abstract} 1464 | \def\HUST@enkeywordstitle{Key words:} 1465 | 1466 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1467 | \def\HUST@ackname{致\hspace{1em}谢} 1468 | \def\HUST@acknamenospace{致谢} 1469 | \def\HUST@publicationtitle{攻读学位期间发表的学术论文} 1470 | }{ 1471 | \def\HUST@ackname{Acknowledge} 1472 | \def\HUST@acknamenospace{Acknowledge} 1473 | \def\HUST@publicationtitle{Publication} 1474 | } 1475 | 1476 | \ifthenelse{\equal{\HUST@category}{none}}{ 1477 | \categoryname{} 1478 | }{} 1479 | \ifthenelse{\equal{\HUST@category}{literature-survey}}{ 1480 | \ifthenelse{\equal{\HUST@language}{chinese}} 1481 | {\categoryname{文献综述}} 1482 | {\categoryname{Literature Survey}} 1483 | }{} 1484 | \ifthenelse{\equal{\HUST@category}{thesis-proposal}}{ 1485 | \ifthenelse{\equal{\HUST@language}{chinese}} 1486 | {\categoryname{选题}} 1487 | {\categoryname{Thesis Proposal}} 1488 | }{} 1489 | \ifthenelse{\equal{\HUST@category}{academic-report}}{ 1490 | \ifthenelse{\equal{\HUST@language}{chinese}} 1491 | {\categoryname{学术报告}} 1492 | {\categoryname{Academic Report}} 1493 | }{} 1494 | \ifthenelse{\equal{\HUST@category}{midterm-progress}}{ 1495 | \ifthenelse{\equal{\HUST@language}{chinese}} 1496 | {\categoryname{论文中期进展}} 1497 | {\categoryname{Midterm Progress Report}} 1498 | }{} 1499 | \ifthenelse{\equal{\HUST@category}{practice}}{ 1500 | \ifthenelse{\equal{\HUST@language}{chinese}} 1501 | {\categoryname{实践环节}} 1502 | {\categoryname{Practice Report}} 1503 | }{} 1504 | 1505 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1506 | \hypersetup{pdfsubject={研究生{\HUST@categoryname}报告}} 1507 | }{ 1508 | \ifthenelse{\equal{\HUST@categoryname}{}}{ 1509 | \hypersetup{pdfsubject={Postgraduate~Report}} 1510 | }{ 1511 | \hypersetup{pdfsubject={Postgraduate~\HUST@categoryname}} 1512 | } 1513 | } 1514 | % \end{macrocode} 1515 | % 1516 | % Set |\listfigurename| and |\listtablename|. 1517 | % \begin{macrocode} 1518 | \def\listfigurename{\HUST@listfigurename} 1519 | \def\listtablename{\HUST@listtablename} 1520 | % \end{macrocode} 1521 | % 1522 | % \section{Style Setting} 1523 | % \subsection{Equation Style} 1524 | % Allow long equation breaking between lines or pages. 1525 | % \begin{macrocode} 1526 | \allowdisplaybreaks[4] 1527 | % \end{macrocode} 1528 | % 1529 | % Set skip between equation and context. 1530 | % \begin{macrocode} 1531 | \abovedisplayskip=10bp plus 2bp minus 2bp 1532 | \abovedisplayshortskip=10bp plus 2bp minus 2bp 1533 | \belowdisplayskip=\abovedisplayskip 1534 | \belowdisplayshortskip=\abovedisplayshortskip 1535 | % \end{macrocode} 1536 | % 1537 | % Set equation numbering style. 1538 | % \begin{macrocode} 1539 | \numberwithin{equation}{chapter} 1540 | % \end{macrocode} 1541 | % 1542 | % \subsection{Theorem Style} 1543 | % We use \pkgurl{amsthm} to handle the proof environment and use \pkgurl{ntheorem} to handle other theorem environments. 1544 | % \begin{macrocode} 1545 | \theoremnumbering{arabic} 1546 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1547 | \theoremseparator{:} 1548 | }{ 1549 | \theoremseparator{:} 1550 | } 1551 | \theorempreskip{1.2ex plus 0ex minus 1ex} 1552 | \theorempostskip{1.2ex plus 0ex minus 1ex} 1553 | \theoremheaderfont{\normalfont\bfseries\HEI} 1554 | \theoremsymbol{} 1555 | 1556 | \theoremstyle{definition} 1557 | \theorembodyfont{\normalfont} 1558 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1559 | \newtheorem{definition}{定义}[chapter] 1560 | }{ 1561 | \newtheorem{definition}{Definition}[chapter] 1562 | } 1563 | 1564 | \theoremstyle{plain} 1565 | \theorembodyfont{\itshape} 1566 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 1567 | \newtheorem{proposition}{命题}[chapter] 1568 | \newtheorem{lemma}{引理}[chapter] 1569 | \newtheorem{theorem}{定理}[chapter] 1570 | \newtheorem{axiom}{公理}[chapter] 1571 | \newtheorem{corollary}{推论}[chapter] 1572 | \newtheorem{exercise}{练习}[chapter] 1573 | \newtheorem{example}{例}[chapter] 1574 | \def\proofname{\hei{证明}} 1575 | }{ 1576 | \newtheorem{proposition}{Proposition}[chapter] 1577 | \newtheorem{lemma}{Lemma}[chapter] 1578 | \newtheorem{theorem}{Theorem}[chapter] 1579 | \newtheorem{axiom}{Axiom}[chapter] 1580 | \newtheorem{corollary}{Corollary}[chapter] 1581 | \newtheorem{exercise}{Exercise}[chapter] 1582 | \newtheorem{example}{Example}[chapter] 1583 | \def\proofname{\textbf{Proof}} 1584 | } 1585 | % \end{macrocode} 1586 | % 1587 | % \subsection{Floating Objects Style} 1588 | % Set the skip to the context for floating object with argument `h'. 1589 | % \begin{macrocode} 1590 | \setlength{\intextsep}{0.7\baselineskip plus 0.1\baselineskip minus 0.1\baselineskip} 1591 | % \end{macrocode} 1592 | % 1593 | % Set the skip to the context for top or bottom floating object. 1594 | % \begin{macrocode} 1595 | \setlength{\textfloatsep}{0.8\baselineskip plus 0.1\baselineskip minus 0.2\baselineskip} 1596 | % \end{macrocode} 1597 | % 1598 | % Set the fraction of floating object. Make the fraction less crowded than default value to prevent floating object occupying too much space. 1599 | % \begin{macrocode} 1600 | \renewcommand{\textfraction}{0.15} 1601 | \renewcommand{\topfraction}{0.85} 1602 | \renewcommand{\bottomfraction}{0.65} 1603 | \renewcommand{\floatpagefraction}{0.60} 1604 | % \end{macrocode} 1605 | % 1606 | % \subsection{Table Style} 1607 | % 1608 | % \begin{macro}{\tabincell} 1609 | % A command make it easier to insert a new table into an existing cell. 1610 | % \begin{macrocode} 1611 | \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} 1612 | % \end{macrocode} 1613 | % \end{macro} 1614 | % 1615 | % To prevent |\cline| breaking page in \pkgurl{longtable} environment, use in this way: 1616 | % \meta{table content} |\\* \nopagebreak \cline{i-j}| 1617 | % \footnote{Reference:\url{http://tex.stackexchange.com/questions/52100/longtable-multirow-problem-with-cline-and-nopagebreak}} 1618 | % \begin{macrocode} 1619 | \def\@cline#1-#2\@nil{% 1620 | \omit 1621 | \@multicnt#1% 1622 | \advance\@multispan\m@ne 1623 | \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi 1624 | \@multicnt#2% 1625 | \advance\@multicnt-#1% 1626 | \advance\@multispan\@ne 1627 | \leaders\hrule\@height\arrayrulewidth\hfill 1628 | \cr 1629 | \noalign{\nobreak\vskip-\arrayrulewidth}} 1630 | % \end{macrocode} 1631 | % 1632 | % Here we set the global font setting (font size: 11pt and line spread: 1.4) for tables. But first we will declare a variable to determine whether table global font setting is activated. 1633 | % \begin{macrocode} 1634 | \newif\ifHUST@useoldtabular 1635 | \HUST@useoldtabularfalse 1636 | % \end{macrocode} 1637 | % 1638 | % \begin{macro}{\TurnOffTabFontSetting} 1639 | % Use |\TurnOffTabFontSetting| to deactivate global font setting. 1640 | % \begin{macrocode} 1641 | \def\TurnOffTabFontSetting{\HUST@useoldtabulartrue} 1642 | % \end{macrocode} 1643 | % \end{macro} 1644 | % 1645 | % \begin{macro}{\TurnOnTabFontSetting} 1646 | % Use |\TurnOnTabFontSetting| to activate global font setting. 1647 | % \begin{macrocode} 1648 | \def\TurnOnTabFontSetting{\HUST@useoldtabularfalse} 1649 | % \end{macrocode} 1650 | % \end{macro} 1651 | % 1652 | % Hook the \pkgurl{tabular}, \pkgurl{tabularx} and \pkgurl{longtable} environment to imply the global font setting. 1653 | % \begin{macrocode} 1654 | \AtBeginEnvironment{tabular}{ 1655 | \ifHUST@useoldtabular\else 1656 | \fontsize{11pt}{15.4pt}\selectfont 1657 | \fi 1658 | } 1659 | \AtBeginEnvironment{tabularx}{ 1660 | \ifHUST@useoldtabular\else 1661 | \fontsize{11pt}{15.4pt}\selectfont 1662 | \fi 1663 | } 1664 | \AtBeginEnvironment{longtable}{ 1665 | \ifHUST@useoldtabular\else 1666 | \fontsize{11pt}{15.4pt}\selectfont 1667 | \fi 1668 | } 1669 | % \end{macrocode} 1670 | % 1671 | % \subsection{Caption Style} 1672 | % Set caption font size as 11pt, use hang format, remove `:' after number and set the skip between context as 12pt. 1673 | % \begin{macrocode} 1674 | \DeclareCaptionFont{HUST@captionfont}{\fontsize{11pt}{14.3pt}\selectfont} 1675 | \DeclareCaptionLabelFormat{HUST@caplabel}{#1~#2} 1676 | \captionsetup{ 1677 | font=HUST@captionfont, 1678 | labelformat=HUST@caplabel, 1679 | format=hang, 1680 | labelsep=quad, 1681 | skip=12pt 1682 | } 1683 | % \end{macrocode} 1684 | % 1685 | % Set figure and table numbering style. 1686 | % \begin{macrocode} 1687 | \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}} 1688 | \renewcommand{\thefigure}{\arabic{chapter}-\arabic{figure}} 1689 | % \end{macrocode} 1690 | % 1691 | % \subsection{Code Highlight Style} 1692 | % \begin{macrocode} 1693 | \definecolor{HUST@lstgreen}{rgb}{0,0.6,0} 1694 | \definecolor{HUST@lstmauve}{rgb}{0.58,0,0.82} 1695 | 1696 | \lstset{ 1697 | basicstyle=\footnotesize\ttfamily\linespread{1}\selectfont\FANGSONG, 1698 | keywordstyle=\color{blue}\bfseries, 1699 | commentstyle=\color{HUST@lstgreen}\itshape\KAI, 1700 | stringstyle=\color{HUST@lstmauve}, 1701 | showspaces=false, 1702 | showstringspaces=false, 1703 | showtabs=false, 1704 | numbers=left, 1705 | numberstyle=\tiny\color{black}, 1706 | frame=lines, 1707 | rulecolor=\color{black}, 1708 | breaklines=true 1709 | } 1710 | % \end{macrocode} 1711 | % 1712 | % \subsection{Section Title Style} 1713 | % Set the numbering depth for section. 1714 | % \begin{macrocode} 1715 | \setcounter{secnumdepth}{3} 1716 | % \end{macrocode} 1717 | % 1718 | % Chapter tilte format and spacing setting. 1719 | % \begin{macrocode} 1720 | \titleformat{\chapter} 1721 | { 1722 | \bfseries 1723 | \HEI 1724 | \centering 1725 | \fontsize{18pt}{23.4pt}\selectfont 1726 | } 1727 | { 1728 | \ifthenelse{\equal{\HUST@language}{chinese}} 1729 | {\zhnumber{\thechapter}} 1730 | {Chapter~\thechapter} 1731 | } 1732 | {1em} 1733 | {} 1734 | \titlespacing*{\chapter}{0pt}{0pt}{20pt} 1735 | % \end{macrocode} 1736 | % 1737 | % Section tilte format and spacing setting. 1738 | % \begin{macrocode} 1739 | \titleformat*{\section}{\bfseries\HEI\fontsize{16pt}{20.8pt}\selectfont} 1740 | \titlespacing*{\section}{0pt}{18pt}{6pt} 1741 | % \end{macrocode} 1742 | % 1743 | % Subsection tilte format and spacing setting. 1744 | % \begin{macrocode} 1745 | \titleformat*{\subsection}{\bfseries\HEI\fontsize{14pt}{18.2pt}\selectfont} 1746 | \titlespacing*{\subsection}{0pt}{12pt}{6pt} 1747 | % \end{macrocode} 1748 | % 1749 | % Subsubsection tilte format and spacing setting. 1750 | % \begin{macrocode} 1751 | \titleformat*{\subsubsection}{\bfseries\HEI\fontsize{13pt}{16.9pt}\selectfont} 1752 | \titlespacing*{\subsubsection}{0pt}{12pt}{6pt} 1753 | % \end{macrocode} 1754 | % 1755 | % \subsection{TOC Style} 1756 | % TOC depth. 1757 | % \begin{macrocode} 1758 | \setcounter{tocdepth}{1} 1759 | % \end{macrocode} 1760 | % 1761 | % TOC right margin. 1762 | % \begin{macrocode} 1763 | \contentsmargin{2.0em} 1764 | % \end{macrocode} 1765 | % 1766 | % Remove vertical space between two continues chapter entries. 1767 | % \footnote{Reference:\url{http://tex.stackexchange.com/questions/89103/remove-vertical-space-between-two-chapters-in-table-of-contents-in-latex}} 1768 | % \begin{macrocode} 1769 | \newskip\HUST@oldcftbeforechapskip 1770 | \HUST@oldcftbeforechapskip=\cftbeforechapskip 1771 | \newskip\HUST@oldcftbeforesecskip 1772 | \HUST@oldcftbeforesecskip=\cftbeforesecskip 1773 | \let\HUST@oldl@chapter\l@chapter 1774 | \let\HUST@oldl@section\l@section 1775 | \let\HUST@oldl@subsection\l@subsection 1776 | \def\l@chapter#1#2{\HUST@oldl@chapter{#1}{#2}\cftbeforechapskip=3pt} 1777 | \def\l@section#1#2{\HUST@oldl@section{#1}{#2}\cftbeforechapskip=\HUST@oldcftbeforechapskip\cftbeforesecskip=3pt} 1778 | \def\l@subsection#1#2{\HUST@oldl@subsection{#1}{#2}\cftbeforesecskip=\HUST@oldcftbeforesecskip} 1779 | % \end{macrocode} 1780 | % 1781 | % Set LOF LOT style. 1782 | % \footnote{Reference:\url{http://www.latex-community.org/viewtopic.php?f=5&t=1838}} 1783 | % \begin{macrocode} 1784 | \renewcommand*\cftfigpresnum{\figurename~} 1785 | \newlength{\HUST@cftfignumwidth@tmp} 1786 | \settowidth{\HUST@cftfignumwidth@tmp}{\cftfigpresnum} 1787 | \addtolength{\cftfignumwidth}{\HUST@cftfignumwidth@tmp} 1788 | \renewcommand{\cftfigaftersnumb}{\quad~} 1789 | \renewcommand*\cfttabpresnum{\tablename~} 1790 | \newlength{\HUST@cfttabnumwidth@tmp} 1791 | \settowidth{\HUST@cfttabnumwidth@tmp}{\cfttabpresnum} 1792 | \addtolength{\cfttabnumwidth}{\HUST@cfttabnumwidth@tmp} 1793 | \renewcommand{\cfttabaftersnumb}{\quad~} 1794 | % \end{macrocode} 1795 | % 1796 | % \subsection{Head \& Foot Style} 1797 | % \begin{macrocode} 1798 | \let\ps@plain\ps@fancy 1799 | \pagestyle{fancy} 1800 | \fancyhf{} 1801 | \renewcommand{\headrulewidth}{0pt} 1802 | \renewcommand{\footrulewidth}{0pt} 1803 | \ifthenelse{\equal{\HUST@language}{english}}{ 1804 | \fancyfoot[C]{\thepage} 1805 | }{ 1806 | \ifHUST@finalformat 1807 | \fancyfoot[C]{\thepage} 1808 | \else 1809 | \fancyhead[C]{ 1810 | \hei{\fontsize{14pt}{18.2pt}\selectfont\HUST@headcontent} 1811 | \vskip 0.3\normalbaselineskip 1812 | \hrule width \textwidth height 0.4pt 1813 | } 1814 | \fancyfoot[C]{ 1815 | \hrule width \textwidth height 0.4pt 1816 | \vskip 0.3\normalbaselineskip 1817 | \thepage 1818 | } 1819 | \fi 1820 | } 1821 | % \end{macrocode} 1822 | % 1823 | % \subsection{List Environment Style} 1824 | % \begin{macrocode} 1825 | \setlist{noitemsep,partopsep=0pt,topsep=.8ex} 1826 | \setlist[1]{labelindent=\parindent} 1827 | \setlist[enumerate,1]{label=\arabic*.,ref=\arabic*} 1828 | \setlist[enumerate,2]{label*=\arabic*,ref=\theenumi.\arabic*} 1829 | \setlist[enumerate,3]{label=\emph{\alph*}),ref=\theenumii\emph{\alph*}} 1830 | \setlist[description]{font=\bfseries\HEI} 1831 | % \end{macrocode} 1832 | % 1833 | % \subsection{Footnote Style} 1834 | % \begin{macrocode} 1835 | \MakePerPage{footnote} 1836 | % \end{macrocode} 1837 | % 1838 | % \section{Specical Page} 1839 | % \begin{macro}{\frontmatter,\mainmatter,\backmatter} 1840 | % \begin{macrocode} 1841 | \def\frontmatter{ 1842 | \clearpage 1843 | \@mainmatterfalse 1844 | \pagenumbering{Roman} 1845 | } 1846 | \def\mainmatter{ 1847 | \clearpage 1848 | \@mainmattertrue 1849 | \pagenumbering{arabic} 1850 | } 1851 | \def\backmatter{ 1852 | \clearpage 1853 | \@mainmatterfalse 1854 | \settocdepth{chapter} 1855 | \hypersetup{bookmarksopenlevel=0} 1856 | } 1857 | % \end{macrocode} 1858 | % \end{macro} 1859 | % 1860 | % Chinese title page. 1861 | % \begin{macrocode} 1862 | \def\HUST@zhtitlepage{ 1863 | \begin{center} 1864 | \null\vskip 1cm 1865 | \includegraphics[width=.5\textwidth]{hust-title.pdf} \\[0.8cm] 1866 | \parbox[t][][t]{\textwidth}{ 1867 | \centering 1868 | \fontsize{22pt}{33.0pt}\selectfont 1869 | \HEI 1870 | \ifthenelse{\equal{\HUST@categoryname}{}}{ 1871 | \ziju{8pt}{研究生( ~\hspace{6em}~)报告} 1872 | }{ 1873 | \ziju{8pt}{研究生( \HUST@categoryname)报告} 1874 | } 1875 | } 1876 | \vskip 0.8cm 1877 | \parbox[t][][t]{\textwidth}{ 1878 | \centering 1879 | \fontsize{18pt}{27.0pt}\selectfont 1880 | \ifthenelse{\equal{\HUST@title}{}}{ 1881 | \hei{题目:~\hspace{13em}} 1882 | }{ 1883 | \hei{题目:~\HUST@title} 1884 | } 1885 | } 1886 | \vfill 1887 | \parbox[t][][t]{\textwidth}{ 1888 | \centering 1889 | \TurnOffTabFontSetting 1890 | \fontsize{16pt}{24.0pt}\selectfont 1891 | \begin{tabular}{p{6em}@{\hspace{1em}}l} 1892 | {{学}\hfill{号}} & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}\hspace{-10em}\hfill\HUST@stuno\hfill} \\[2ex] 1893 | {{姓}\hfill{名}} & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}\hspace{-10em}\hfill\HUST@author\hfill} \\[2ex] 1894 | {{专}\hfill{业}} & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}\hspace{-10em}\hfill\HUST@major\hfill} \\[2ex] 1895 | {{指}\hfill{导}\hfill{教}\hfill{师}} & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}\hspace{-10em}\hfill\HUST@advisor\hfill} \\[2ex] 1896 | {院(系、所)} & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}\hspace{-10em}\hfill\HUST@department\hfill} 1897 | \end{tabular} 1898 | \TurnOnTabFontSetting 1899 | } 1900 | \vskip 2cm 1901 | \parbox[t][][t]{\textwidth}{ 1902 | \centering 1903 | \fontsize{16pt}{24.0pt}\selectfont 1904 | {华中科技大学研究生院制} 1905 | } 1906 | \end{center} 1907 | } 1908 | % \end{macrocode} 1909 | % 1910 | % English title page. 1911 | % \begin{macrocode} 1912 | \def\HUST@entitlepage{ 1913 | \begin{center} 1914 | \null\vskip 1cm 1915 | \parbox[t][][t]{\textwidth}{ 1916 | \centering 1917 | \fontsize{20pt}{30.0pt}\selectfont 1918 | \scshape 1919 | Huazhong University of Science and Technology 1920 | } 1921 | \vskip 0.8cm 1922 | \parbox[t][][t]{\textwidth}{ 1923 | \centering 1924 | \fontsize{20pt}{30.0pt}\selectfont 1925 | \scshape 1926 | \ifthenelse{\equal{\HUST@categoryname}{}}{ 1927 | Postgraduate~\hspace{6em}~Report 1928 | }{ 1929 | Postgraduate~\HUST@categoryname 1930 | } 1931 | } 1932 | \vskip 0.8cm 1933 | \parbox[t][][t]{\textwidth}{ 1934 | \centering 1935 | \fontsize{18pt}{27.0pt}\selectfont 1936 | \bfseries 1937 | \ifthenelse{\equal{\HUST@title}{}}{ 1938 | Title:~\hspace{13em} 1939 | }{ 1940 | Title:~\HUST@title 1941 | } 1942 | } 1943 | \vfill 1944 | \parbox[t][][t]{\textwidth}{ 1945 | \centering 1946 | \TurnOffTabFontSetting 1947 | \fontsize{16pt}{24.0pt}\selectfont 1948 | \begin{tabular}{p{5em}@{~}l} 1949 | {Student ID} & \makebox[16em][l]{\rule[-2.0pt]{16em}{1pt}\hspace{-16em}\hfill\HUST@stuno\hfill} \\[2ex] 1950 | {Name} & \makebox[16em][l]{\rule[-2.0pt]{16em}{1pt}\hspace{-16em}\hfill\HUST@author\hfill} \\[2ex] 1951 | {Major} & \makebox[16em][l]{\rule[-2.0pt]{16em}{1pt}\hspace{-16em}\hfill\HUST@major\hfill} \\[2ex] 1952 | {Advisor} & \makebox[16em][l]{\rule[-2.0pt]{16em}{1pt}\hspace{-16em}\hfill\HUST@advisor\hfill} \\[2ex] 1953 | {Department} & \makebox[16em][l]{\rule[-2.0pt]{16em}{1pt}\hspace{-16em}\hfill\HUST@department\hfill} 1954 | \end{tabular} 1955 | \TurnOnTabFontSetting 1956 | } 1957 | \vskip 2cm 1958 | \parbox[t][][t]{\textwidth}{ 1959 | \centering 1960 | \fontsize{16pt}{24.0pt}\selectfont 1961 | Graduate School\\ 1962 | Huazhong University of Science~\char38~Technology 1963 | } 1964 | \end{center} 1965 | } 1966 | % \end{macrocode} 1967 | % 1968 | % Chinese note page. 1969 | % \begin{macrocode} 1970 | \def\HUST@zhnotepage{ 1971 | \null\vskip 1cm 1972 | \begin{center} 1973 | \ziju{1em}{\hei{\fontsize{18pt}{27.0pt}\selectfont 填表注意事项}} 1974 | \end{center} 1975 | \vskip 1.2ex 1976 | \begingroup 1977 | \fontsize{14pt}{21.0pt}\selectfont 1978 | \ifthenelse{\equal{\HUST@category}{practice}}{ 1979 | \begin{enumerate} 1980 | \renewcommand{\labelenumi}{\zhnumber{\theenumi}、} 1981 | \item 本表适用于攻读专业硕士学位研究生实践环节报告,文献阅读与选题报告等。 1982 | \item 以上各报告内容及要求由相关院(系、所)做具体要求。 1983 | \item 以上各报告均须存入研究生个人学籍档案。 1984 | \item 本表填写要求文句通顺、内容明确、字迹工整。 1985 | \end{enumerate} 1986 | }{ 1987 | \begin{enumerate} 1988 | \renewcommand{\labelenumi}{\zhnumber{\theenumi}、} 1989 | \item 本表适用于攻读硕士学位研究生选题报告、学术报告,攻读博士学位研究生文献综述、选题报告、论文中期进展报告、学术报告等。 1990 | \item 以上各报告内容及要求由相关院(系、所)做具体要求。 1991 | \item 以上各报告均须存入研究生个人学籍档案。 1992 | \item 本表填写要求文句通顺、内容明确、字迹工整。 1993 | \end{enumerate} 1994 | } 1995 | \endgroup 1996 | } 1997 | % \end{macrocode} 1998 | % 1999 | % English note page. 2000 | % \begin{macrocode} 2001 | \def\HUST@ennotepage{ 2002 | \null\vskip 1cm 2003 | \begin{center} 2004 | \textbf{\fontsize{18pt}{27.0pt}\selectfont Note} 2005 | \end{center} 2006 | \vskip 1.2ex 2007 | \begingroup 2008 | \fontsize{14pt}{21.0pt}\selectfont 2009 | \ifthenelse{\equal{\HUST@category}{practice}}{ 2010 | \begin{enumerate} 2011 | \item This form is applicable for master student's practice report, literature survey and thesis proposal. 2012 | \item The contents and the requirements of the above reports are specified in details by each department, respectively. 2013 | \item All these reports will be filed into the graduate's academic archive. 2014 | \item This form should be filled with correct grammar, clear text and neat handwriting. 2015 | \end{enumerate} 2016 | }{ 2017 | \begin{enumerate} 2018 | \item This form is applicable for master student's thesis proposal, academic report, and also applicable for Ph.D. student's literature survey, thesis proposal, midterm progress report and academic report. 2019 | \item The contents and the requirements of the above reports are specified in details by each department, respectively. 2020 | \item All these reports will be filed into the graduate's academic archive. 2021 | \item This form should be filled with correct grammar, clear text and neat handwriting. 2022 | \end{enumerate} 2023 | } 2024 | \endgroup 2025 | } 2026 | % \end{macrocode} 2027 | % 2028 | % \begin{macro}{\maketitle,\makecover} 2029 | % Commands to generate title page. 2030 | % \begin{macrocode} 2031 | \def\maketitle{ 2032 | \let\HUST@oldthepage\thepage 2033 | \ifthenelse{\equal{\HUST@language}{chinese}} 2034 | {\def\thepage{封面}} 2035 | {\def\thepage{Titlepage}} 2036 | \begin{titlepage} 2037 | \thispagestyle{empty} 2038 | \ifthenelse{\equal{\HUST@language}{chinese}} 2039 | {\HUST@zhtitlepage} 2040 | {\HUST@entitlepage} 2041 | \end{titlepage} 2042 | \ifthenelse{\equal{\HUST@language}{chinese}} 2043 | { 2044 | \def\thepage{注意事项} 2045 | \thispagestyle{empty} 2046 | \HUST@zhnotepage 2047 | }{ 2048 | \def\thepage{Note} 2049 | \thispagestyle{empty} 2050 | \HUST@ennotepage 2051 | } 2052 | \clearpage 2053 | \let\thepage\HUST@oldthepage 2054 | \setcounter{page}{1} 2055 | } 2056 | \let\makecover\maketitle 2057 | % \end{macrocode} 2058 | % \end{macro} 2059 | % 2060 | % Chinese abstract page. 2061 | % \begin{macrocode} 2062 | \def\HUST@zhabstractpage{ 2063 | \chapter*{\HUST@zhabstractname} 2064 | \begingroup 2065 | \fontsize{10.5pt}{13.7pt}\selectfont 2066 | \HUST@zhabstract \par 2067 | \vskip 1.2ex 2068 | \noindent\hei{\HUST@zhkeywordstitle}\hspace{.8em} \HUST@zhkeywords 2069 | \endgroup 2070 | } 2071 | % \end{macrocode} 2072 | % 2073 | % English abstract page. 2074 | % \begin{macrocode} 2075 | \def\HUST@enabstractpage{ 2076 | \chapter*{\textsf{\HUST@enabstractname}} 2077 | \begingroup 2078 | \fontsize{10.5pt}{13.7pt}\selectfont 2079 | \HUST@enabstract \par 2080 | \vskip 1.2ex 2081 | \noindent\textbf{\HUST@enkeywordstitle}\hspace{.8em} \HUST@enkeywords 2082 | \endgroup 2083 | } 2084 | % \end{macrocode} 2085 | % 2086 | % \begin{macro}{\makeabstract} 2087 | % A command to generate abstract page. 2088 | % \begin{macrocode} 2089 | \def\makeabstract{ 2090 | \phantomsection 2091 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 2092 | \let\HUST@zhabstract\HUST@abstract 2093 | \let\HUST@zhkeywords\HUST@keywords 2094 | \addcontentsline{toc}{chapter}{\HUST@zhabstractnamenospace} 2095 | \HUST@zhabstractpage 2096 | \clearpage 2097 | }{ 2098 | \let\HUST@enabstract\HUST@abstract 2099 | \let\HUST@enkeywords\HUST@keywords 2100 | \addcontentsline{toc}{chapter}{\HUST@enabstractname} 2101 | \HUST@enabstractpage 2102 | \clearpage 2103 | } 2104 | } 2105 | % \end{macrocode} 2106 | % \end{macro} 2107 | % 2108 | % \begin{macro}{\tableofcontents} 2109 | % A command to generate table of contents. 2110 | % \begin{macrocode} 2111 | \let\HUST@tableofcontents\tableofcontents 2112 | \def\tableofcontents{ 2113 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 2114 | \pdfbookmark{\contentsnamenospace}{\contentsnamenospace} 2115 | }{ 2116 | \pdfbookmark{\contentsname}{\contentsname} 2117 | } 2118 | \HUST@tableofcontents 2119 | \clearpage 2120 | } 2121 | % \end{macrocode} 2122 | % \end{macro} 2123 | % 2124 | % \begin{environment}{ack} 2125 | % A command to generate acknowledge page. 2126 | % \begin{macrocode} 2127 | \newenvironment{ack}{ 2128 | \clearpage 2129 | \phantomsection 2130 | \addcontentsline{toc}{chapter}{\HUST@acknamenospace} 2131 | \chapter*{\HUST@ackname} 2132 | \begingroup 2133 | \fontsize{10.5pt}{13.7pt}\selectfont 2134 | }{ 2135 | \endgroup 2136 | } 2137 | % \end{macrocode} 2138 | % \end{environment} 2139 | % 2140 | % \begin{environment}{publications} 2141 | % A command to generate publications page. 2142 | % \begin{macrocode} 2143 | \newenvironment{publications}{ 2144 | \clearpage 2145 | \ifHUST@inappendix 2146 | \chapter{\HUST@publicationtitle} 2147 | \else 2148 | \phantomsection 2149 | \addcontentsline{toc}{chapter}{\HUST@publicationtitle} 2150 | \chapter*{\HUST@publicationtitle} 2151 | \fi 2152 | \begin{enumerate}[labelindent=0pt,label={[\arabic*]},itemsep=0.5ex] 2153 | \fontsize{10.5pt}{10.5pt}\selectfont 2154 | }{ 2155 | \end{enumerate} 2156 | } 2157 | % \end{macrocode} 2158 | % \end{environment} 2159 | % 2160 | % \begin{macro}{\bibliography} 2161 | % A command to generate bibliography page. We use \textsf{thuthesis-numeric.bst} in \pkgurl{thuthesis} to typeset bibliography in Chinese language mode. And use \pkgurl{IEEEtran} in English language mode. 2162 | % \begin{macrocode} 2163 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 2164 | \def\thudot{\unskip.} 2165 | \def\thumasterbib{[Master Thesis]} 2166 | \def\thuphdbib{[Doctor Thesis]} 2167 | \bibliographystyle{thuthesis-numeric} 2168 | }{ 2169 | \bibliographystyle{IEEEtran} 2170 | } 2171 | \let\HUST@bibliography\bibliography 2172 | \def\bibliography#1{ 2173 | \clearpage 2174 | \phantomsection 2175 | \addcontentsline{toc}{chapter}{\bibname} 2176 | \begingroup 2177 | \fontsize{10.5pt}{10.5pt}\selectfont 2178 | \setlength\bibsep{0.5ex} 2179 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 2180 | \HUST@bibliography{#1} 2181 | }{ 2182 | \HUST@bibliography{IEEEabrv,#1} 2183 | } 2184 | \endgroup 2185 | } 2186 | % \end{macrocode} 2187 | % \end{macro} 2188 | % 2189 | % \begin{environment}{appendix} 2190 | % The appendix environment. 2191 | % \begin{macrocode} 2192 | \newif\ifHUST@inappendix 2193 | \HUST@inappendixfalse 2194 | \newif\ifHUST@appendix@resetmainmatter 2195 | \HUST@appendix@resetmainmatterfalse 2196 | \renewenvironment{appendix}{ 2197 | \if@mainmatter 2198 | \HUST@appendix@resetmainmatterfalse 2199 | \else 2200 | \HUST@appendix@resetmainmattertrue 2201 | \@mainmattertrue 2202 | \fi 2203 | \appendixtitletocon 2204 | \appendices 2205 | \titleformat{\chapter} 2206 | { 2207 | \bfseries\HEI 2208 | \centering 2209 | \fontsize{18pt}{23.4pt}\selectfont 2210 | } 2211 | {\appendixname\,\thechapter} 2212 | {1em} 2213 | {} 2214 | \HUST@inappendixtrue 2215 | }{ 2216 | \endappendices 2217 | \HUST@inappendixfalse 2218 | \ifHUST@appendix@resetmainmatter 2219 | \HUST@appendix@resetmainmatterfalse 2220 | \@mainmatterfalse 2221 | \else\fi 2222 | } 2223 | % \end{macrocode} 2224 | % \end{environment} 2225 | % 2226 | % \begin{macro}{\listoffigures} 2227 | % A command to generate list of figures. 2228 | % \begin{macrocode} 2229 | \let\HUST@listoffigures\listoffigures 2230 | \def\listoffigures{ 2231 | \clearpage 2232 | \ifHUST@inappendix 2233 | \addtocounter{chapter}{1} 2234 | \def\listfigurename{\appendixname\,\thechapter\hspace{1em}\HUST@listfigurename} 2235 | \else 2236 | \def\listfigurename{\HUST@listfigurename} 2237 | \fi 2238 | \phantomsection 2239 | \ifHUST@inappendix 2240 | \addcontentsline{toc}{chapter}{\thechapter\hspace{1em}\HUST@listfigurename} 2241 | \else 2242 | \addcontentsline{toc}{chapter}{\listfigurename} 2243 | \fi 2244 | \HUST@listoffigures 2245 | \def\listfigurename{\HUST@listfigurename} 2246 | } 2247 | % \end{macrocode} 2248 | % \end{macro} 2249 | % 2250 | % \begin{macro}{\listoftables} 2251 | % A command to generate list of tables. 2252 | % \begin{macrocode} 2253 | \let\HUST@listoftables\listoftables 2254 | \def\listoftables{ 2255 | \clearpage 2256 | \ifHUST@inappendix 2257 | \addtocounter{chapter}{1} 2258 | \def\listtablename{\appendixname\,\thechapter\hspace{1em}\HUST@listtablename} 2259 | \else 2260 | \def\listtablename{\HUST@listtablename} 2261 | \fi 2262 | \phantomsection 2263 | \ifHUST@inappendix 2264 | \addcontentsline{toc}{chapter}{\thechapter\hspace{1em}\HUST@listtablename} 2265 | \else 2266 | \addcontentsline{toc}{chapter}{\listtablename} 2267 | \fi 2268 | \HUST@listoftables 2269 | \def\listtablename{\HUST@listtablename} 2270 | } 2271 | % \end{macrocode} 2272 | % \end{macro} 2273 | % 2274 | % Back cover. 2275 | % \begin{macrocode} 2276 | \def\HUST@backcoverpage{ 2277 | \ifthenelse{\equal{\HUST@category}{practice}}{ 2278 | \ifthenelse{\equal{\HUST@language}{chinese}}{ 2279 | \begin{center} 2280 | \ziju{1em}{\hei{\fontsize{18pt}{27.0pt}\selectfont 导师评语}} 2281 | \end{center} 2282 | \vskip 1.5cm 2283 | 实践是专业硕士学位的重要环节,是一门必修课,8个学分,对于专业学位实践报告,要求字数5000以上,内容包括但不限于:参加实践的具体内容、完成的工作、收获和体会等,格式自定,但封面和封底需用“研究生实践环节报告”。 2284 | \vfill 2285 | \begin{flushleft} 2286 | \fontsize{16pt}{24.0pt}\selectfont\HEI 导师评分: 2287 | \end{flushleft} 2288 | \vskip 2cm 2289 | }{ 2290 | \begin{center} 2291 | \textbf{\fontsize{18pt}{27.0pt}\selectfont Advisor Reviews} 2292 | \end{center} 2293 | \vskip 6ex 2294 | Practice is an important part of a master's degree. It's a required course with eight credits. The practice report requires more than 5000 words. The content can be including but not limited to: the specific content during the participation in practice, the work which has been done, the harvesting or the experience. The format is not set, but the font and back cover are required from ``graduate practice report''. 2295 | \vfill 2296 | \begin{flushleft} 2297 | \textbf{\fontsize{16pt}{24.0pt}\selectfont Score:} 2298 | \end{flushleft} 2299 | \vskip 2cm 2300 | } 2301 | }{\null\vfill} 2302 | \begin{flushleft} 2303 | \TurnOffTabFontSetting 2304 | \fontsize{16pt}{24.0pt}\selectfont 2305 | \bfseries 2306 | \begin{tabular}{p{8em}@{\hspace{1em}}l} 2307 | \ifthenelse{\equal{\HUST@language}{chinese}}{研究生签字}{Student Signature} 2308 | & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}} \\[2ex] 2309 | \ifthenelse{\equal{\HUST@language}{chinese}}{指导教师签字}{Advisor Signature} 2310 | & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}} \\[2ex] 2311 | \ifthenelse{\equal{\HUST@language}{chinese}}{院(系、所)领导签字}{Dean Signature} 2312 | & \makebox[10em][l]{\rule[-2.0pt]{10em}{1pt}} 2313 | \end{tabular} 2314 | \TurnOnTabFontSetting 2315 | \end{flushleft} 2316 | \vskip 2cm 2317 | \begin{flushright} 2318 | \fontsize{16pt}{24.0pt}\selectfont 2319 | \bfseries 2320 | \ifthenelse{\equal{\HUST@language}{chinese}}{\hspace{2em}年\hspace{2em}月\hspace{2em}日}{Date:\hspace{8em}} 2321 | \end{flushright} 2322 | \vskip 6ex 2323 | } 2324 | \AtEndDocument{ 2325 | \clearpage 2326 | \let\HUST@oldthepage\thepage 2327 | \ifthenelse{\equal{\HUST@language}{chinese}} 2328 | {\def\thepage{封底}} 2329 | {\def\thepage{Back cover}} 2330 | \thispagestyle{empty} 2331 | \HUST@backcoverpage 2332 | \let\thepage\HUST@oldthepage 2333 | } 2334 | % \end{macrocode} 2335 | % 2336 | % 2337 | % \section{Other Command} 2338 | % \begin{macro}{\email} 2339 | % \begin{macrocode} 2340 | \def\email#1{ 2341 | \href{mailto:#1}{\texttt{#1}} 2342 | } 2343 | % \end{macrocode} 2344 | % \end{macro} 2345 | % 2346 | % \begin{macrocode} 2347 | % 2348 | % \end{macrocode} 2349 | % 2350 | % \Finale 2351 | % 2352 | % ^^A Other files 2353 | % \iffalse 2354 | % 2355 | %<*example-zh|example-en> 2356 | %\documentclass[format=draft,language=chinese,category=academic-report]{hustreport} 2357 | %\documentclass[language=english,category=academic-report]{hustreport} 2358 | 2359 | \stuno{U2009xxxxx} 2360 | %\title{\LaTeX 模板使用示例} 2361 | %\title{An Example of Using hustreport \LaTeX{} Template} 2362 | %\author{许铖} 2363 | %\author{Xu Cheng} 2364 | %\major{电子信息工程} 2365 | %\major{Electronic and Information Engineering} 2366 | %\department{电子信息工程} 2367 | %\department{Electronic and Information Engineering} 2368 | %\advisor{黑晓军\hspace{1em}副教授} 2369 | %\advisor{Ass. Prof. Xiaojun Hei} 2370 | 2371 | %<*example-zh> 2372 | \abstract{ 2373 | 这这是一个\LaTeX{}模板使用实例文件,该模板用于华中科技大学研究生报告写作。 2374 | 2375 | 该模板基于LPPL v1.3发行。 2376 | 2377 | } 2378 | \keywords{\LaTeX{},华中科技大学,报告,模板} 2379 | % 2380 | 2381 | %<*example-en> 2382 | \abstract{ 2383 | This is a \LaTeX{} template example file. This template is used in written thesis for Huazhong Univ. of Sci. \& Tech. 2384 | 2385 | This template is published under LPPL v1.3 License. 2386 | 2387 | } 2388 | \keywords{\LaTeX{}, Huazhong Univ. of Sci. \& Tech., Report, Template} 2389 | % 2390 | 2391 | \begin{document} 2392 | 2393 | \frontmatter 2394 | \maketitle 2395 | \makeabstract 2396 | \tableofcontents 2397 | \listoffigures 2398 | \listoftables 2399 | \mainmatter 2400 | 2401 | %<*example-zh> 2402 | \chapter{基本格式测试}\label{chapter:1} 2403 | 2404 | \section{第一层}\label{sec:1} 2405 | \subsection{第二层}\label{sec:2} 2406 | \subsubsection{第三层}\label{sec:3} 2407 | 测试测试测试测试测试测试测试测试测试测试测试测试。 2408 | \footnote{\label{footnote:1}脚注} 2409 | 2410 | \section{字体} 2411 | 2412 | 普通\textbf{粗体}\emph{斜体} 2413 | 2414 | \hei{黑体}\kai{楷体}\fangsong{仿宋} 2415 | 2416 | \section{公式} 2417 | 2418 | 单个公式,公式引用:\autoref{eq:1}。 2419 | \begin{equation} 2420 | c^2 = a^2 + b^2 \label{eq:1} 2421 | \end{equation} 2422 | 2423 | 多个公式,公式引用:\autoref{eq:2},\autoref{eq:3}。 2424 | 2425 | \begin{subequations} 2426 | \begin{equation} 2427 | F = ma \label{eq:2} 2428 | \end{equation} 2429 | \begin{equation} 2430 | E = mc^2 \label{eq:3} 2431 | \end{equation} 2432 | \end{subequations} 2433 | 2434 | \section{罗列环境} 2435 | 2436 | \begin{enumerate} 2437 | \item 第一层\label{item:1} 2438 | \item 第一层 2439 | \begin{enumerate} 2440 | \item 第二层\label{item:2} 2441 | \item 第二层 2442 | \begin{enumerate} 2443 | \item 第三层\label{item:3} 2444 | \item 第三层 2445 | \end{enumerate} 2446 | \end{enumerate} 2447 | \end{enumerate} 2448 | 2449 | \begin{description} 2450 | \item[解释环境] 解释内容 2451 | \end{description} 2452 | 2453 | \chapter{其他格式测试} 2454 | 2455 | \section{代码环境} 2456 | 2457 | \begin{lstlisting}[language=python] 2458 | import os 2459 | 2460 | def main(): 2461 | ''' 2462 | doc here 2463 | ''' 2464 | print 'hello, world' # Abc 2465 | print 'hello, 中文' # 中文 2466 | \end{lstlisting} 2467 | 2468 | \section{定律证明环境} 2469 | 2470 | \begin{definition}\label{def:1} 2471 | 这是一个定义。 2472 | \end{definition} 2473 | \begin{proposition}\label{proposition:1} 2474 | 这是一个命题。 2475 | \end{proposition} 2476 | \begin{axiom}\label{axiom:1} 2477 | 这是一个公理。 2478 | \end{axiom} 2479 | \begin{lemma}\label{lemma:1} 2480 | 这是一个引理。 2481 | \end{lemma} 2482 | \begin{theorem}\label{theorem:1} 2483 | 这是一个定理。 2484 | \end{theorem} 2485 | \begin{proof}\label{proof:1} 2486 | 这是一个证明。 2487 | \end{proof} 2488 | 2489 | \section{算法环境} 2490 | 2491 | \begin{algorithm}[H] 2492 | \SetAlgoLined 2493 | \KwData{this text} 2494 | \KwResult{how to write algorithm with \LaTeX2e } 2495 | initialization\;\label{alg_line:1} 2496 | \While{not at end of this document}{ 2497 | read current\; 2498 | \eIf{understand}{ 2499 | go to next section\; 2500 | current section becomes this one\; 2501 | }{ 2502 | go back to the beginning of current section\; 2503 | } 2504 | } 2505 | \caption{How to write algorithms}\label{alg:1} 2506 | \end{algorithm} 2507 | 2508 | \section{表格} 2509 | 表格见\autoref{tab:1}。 2510 | 2511 | \begin{table}[!h] 2512 | \centering 2513 | \caption{一个表格}\label{tab:1} 2514 | \begin{tabular}{|c|c|} 2515 | \hline 2516 | a & b \\ 2517 | \hline 2518 | c & d \\ 2519 | \hline 2520 | \end{tabular} 2521 | \end{table} 2522 | \section{图片} 2523 | 图片见\autoref{fig:1}。图片格式支持eps,png,pdf等。多个图片见\autoref{fig:2},分开引用:\autoref{fig:2-1},\autoref{fig:2-2}。 2524 | 2525 | \begin{figure}[!h] 2526 | \centering 2527 | \includegraphics[width=.4\textwidth]{fig-example.pdf} 2528 | \caption{一个图片}\label{fig:1} 2529 | \end{figure} 2530 | 2531 | \begin{figure}[!h] 2532 | \centering 2533 | \begin{subfigure}[b]{0.3\textwidth} 2534 | \includegraphics[width=\textwidth]{fig-example.pdf} 2535 | \caption{图片1}\label{fig:2-1} 2536 | \end{subfigure} 2537 | ~ 2538 | \begin{subfigure}[b]{0.3\textwidth} 2539 | \includegraphics[width=\textwidth]{fig-example.pdf} 2540 | \caption{图片2}\label{fig:2-2} 2541 | \end{subfigure} 2542 | \caption{多个图片}\label{fig:2} 2543 | \end{figure} 2544 | 2545 | \section{参考文献示例} 2546 | 这是一篇中文参考文献\cite{TEXGURU99};这是一篇英文参考文献\cite{knuth};同时引用\cite{TEXGURU99,knuth}。 2547 | 2548 | \section[\textbackslash{}autoref 测试]{\texttt{\textbackslash{}autoref} 测试} 2549 | 2550 | \begin{description} 2551 | \item[公式] \autoref{eq:1} 2552 | \item[脚注] \autoref{footnote:1} 2553 | \item[项] \autoref{item:1},\autoref{item:2},\autoref{item:3} 2554 | \item[图] \autoref{fig:1} 2555 | \item[表] \autoref{tab:1} 2556 | \item[附录] \autoref{appendix:1} 2557 | \item[章] \autoref{chapter:1} 2558 | \item[小节] \autoref{sec:1},\autoref{sec:2},\autoref{sec:3} 2559 | \item[算法] \autoref{alg:1},\autoref{alg_line:1} 2560 | \item[证明环境] \autoref{def:1},\autoref{proposition:1},\autoref{axiom:1},\autoref{lemma:1},\autoref{theorem:1},\autoref{proof:1} 2561 | \end{description} 2562 | 2563 | 2564 | \backmatter 2565 | 2566 | \begin{ack} 2567 | 致谢正文。 2568 | \end{ack} 2569 | 2570 | \bibliography{ref-example} 2571 | 2572 | \appendix 2573 | 2574 | \begin{publications} 2575 | \item 论文1 2576 | \item 论文2 2577 | \end{publications} 2578 | 2579 | \chapter{这是一个附录}\label{appendix:1} 2580 | 附录正文。 2581 | 2582 | % 2583 | %<*example-en> 2584 | \chapter{Simple Test}\label{chapter:1} 2585 | 2586 | \section{Level 1}\label{sec:1} 2587 | \subsection{Level 2}\label{sec:2} 2588 | \subsubsection{Level 3}\label{sec:3} 2589 | Content 2590 | \footnote{\label{footnote:1}A footnote.} 2591 | 2592 | \section{Font} 2593 | 2594 | Normal \textbf{Bold} \emph{Italic} \textsf{Sans} 2595 | 2596 | The quick brown fox jumps over the lazy dog. 2597 | 2598 | \section{Equation} 2599 | 2600 | Single equation, see \autoref{eq:1}. 2601 | \begin{equation} 2602 | c^2 = a^2 + b^2 \label{eq:1} 2603 | \end{equation} 2604 | 2605 | Multi-equations, see \autoref{eq:2} and \autoref{eq:3}. 2606 | 2607 | \begin{subequations} 2608 | \begin{equation} 2609 | F = ma \label{eq:2} 2610 | \end{equation} 2611 | \begin{equation} 2612 | E = mc^2 \label{eq:3} 2613 | \end{equation} 2614 | \end{subequations} 2615 | 2616 | \section{List Environment} 2617 | 2618 | \begin{enumerate} 2619 | \item Level 1\label{item:1} 2620 | \item Level 1 2621 | \begin{enumerate} 2622 | \item Level 2\label{item:2} 2623 | \item Level 2 2624 | \begin{enumerate} 2625 | \item Level 3\label{item:3} 2626 | \item Level 3 2627 | \end{enumerate} 2628 | \end{enumerate} 2629 | \end{enumerate} 2630 | 2631 | \begin{description} 2632 | \item[Discription] Content 2633 | \end{description} 2634 | 2635 | \chapter{Other Test} 2636 | 2637 | \section{Code Highlight} 2638 | 2639 | \begin{lstlisting}[language=python] 2640 | import os 2641 | 2642 | def main(): 2643 | ''' 2644 | doc here 2645 | ''' 2646 | print 'hello, world' # Abc 2647 | \end{lstlisting} 2648 | 2649 | \section{Theorem} 2650 | 2651 | \begin{definition}\label{def:1} 2652 | This is a definition. 2653 | \end{definition} 2654 | \begin{proposition}\label{proposition:1} 2655 | This is a proposition. 2656 | \end{proposition} 2657 | \begin{axiom}\label{axiom:1} 2658 | This is an axiom. 2659 | \end{axiom} 2660 | \begin{lemma}\label{lemma:1} 2661 | This is a lemma. 2662 | \end{lemma} 2663 | \begin{theorem}\label{theorem:1} 2664 | This is a theorem. 2665 | \end{theorem} 2666 | \begin{proof}\label{proof:1} 2667 | This is a proof. 2668 | \end{proof} 2669 | 2670 | \section{Algorithm} 2671 | 2672 | \begin{algorithm}[H] 2673 | \SetAlgoLined 2674 | \KwData{this text} 2675 | \KwResult{how to write algorithm with \LaTeX2e } 2676 | initialization\;\label{alg_line:1} 2677 | \While{not at end of this document}{ 2678 | read current\; 2679 | \eIf{understand}{ 2680 | go to next section\; 2681 | current section becomes this one\; 2682 | }{ 2683 | go back to the beginning of current section\; 2684 | } 2685 | } 2686 | \caption{How to write algorithms}\label{alg:1} 2687 | \end{algorithm} 2688 | 2689 | \section{Table} 2690 | See \autoref{tab:1}. 2691 | 2692 | \begin{table}[!h] 2693 | \centering 2694 | \caption{A table}\label{tab:1} 2695 | \begin{tabular}{|c|c|} 2696 | \hline 2697 | a & b \\ 2698 | \hline 2699 | c & d \\ 2700 | \hline 2701 | \end{tabular} 2702 | \end{table} 2703 | 2704 | \section{Figure} 2705 | See \autoref{fig:1}.Figure supports format in eps, png, pdf and so on. Multi-figures, see \autoref{fig:2}. Reference separately: \autoref{fig:2-1}, \autoref{fig:2-2}. 2706 | 2707 | \begin{figure}[!h] 2708 | \centering 2709 | \includegraphics[width=.4\textwidth]{fig-example.pdf} 2710 | \caption{A figure}\label{fig:1} 2711 | \end{figure} 2712 | 2713 | \begin{figure}[!h] 2714 | \centering 2715 | \begin{subfigure}[b]{0.3\textwidth} 2716 | \includegraphics[width=\textwidth]{fig-example.pdf} 2717 | \caption{Figure A}\label{fig:2-1} 2718 | \end{subfigure} 2719 | ~ 2720 | \begin{subfigure}[b]{0.3\textwidth} 2721 | \includegraphics[width=\textwidth]{fig-example.pdf} 2722 | \caption{Figure B}\label{fig:2-2} 2723 | \end{subfigure} 2724 | \caption{Multi-figures}\label{fig:2} 2725 | \end{figure} 2726 | 2727 | \section{Bibliography} 2728 | Cite one bib\cite{knuth}, cite two\cite{TEXGURU99,knuth}. 2729 | 2730 | \section[\textbackslash{}autoref Test]{\texttt{\textbackslash{}autoref} Test} 2731 | 2732 | \begin{description} 2733 | \item[Equation] \autoref{eq:1} 2734 | \item[Footnote] \autoref{footnote:1} 2735 | \item[Item] \autoref{item:1},\autoref{item:2},\autoref{item:3} 2736 | \item[Figure] \autoref{fig:1} 2737 | \item[Table] \autoref{tab:1} 2738 | \item[Appendix] \autoref{appendix:1} 2739 | \item[Chapter] \autoref{chapter:1} 2740 | \item[Section] \autoref{sec:1},\autoref{sec:2},\autoref{sec:3} 2741 | \item[Algorithm] \autoref{alg:1},\autoref{alg_line:1} 2742 | \item[Theorem] \autoref{def:1},\autoref{proposition:1},\autoref{axiom:1},\autoref{lemma:1},\autoref{theorem:1},\autoref{proof:1} 2743 | \end{description} 2744 | 2745 | \backmatter 2746 | 2747 | \begin{ack} 2748 | Acknowledge 2749 | \end{ack} 2750 | 2751 | \bibliography{ref-example} 2752 | 2753 | \appendix 2754 | 2755 | \begin{publications} 2756 | \item Thesis 1 2757 | \item Thesis 2 2758 | \end{publications} 2759 | 2760 | \chapter{This is an appendix}\label{appendix:1} 2761 | Content. 2762 | 2763 | % 2764 | 2765 | \end{document} 2766 | % 2767 | % 2768 | %<*example-bib> 2769 | @BOOK{TEXGURU99, 2770 | AUTHOR = "{\TeX}Guru", 2771 | TITLE = "{\LaTeXe} Manual", 2772 | YEAR = "1999" 2773 | } 2774 | 2775 | @BOOK{knuth, 2776 | AUTHOR = "{Donald E. Knuth}", 2777 | TITLE = "The \TeX{}book", 2778 | publisher = "Addison–Wesley Pub. Co.", 2779 | address = "MA", 2780 | YEAR = "1984" 2781 | } 2782 | % 2783 | % 2784 | % \fi 2785 | % 2786 | \endinput 2787 | -------------------------------------------------------------------------------- /hustreport/hustreport.ins: -------------------------------------------------------------------------------- 1 | % !TEX program = LuaLaTeX 2 | %% hustreport.ins 3 | %% 4 | %% Copyright (C) 2013-2014 by Xu Cheng 5 | %% 2014-2016 by hust-latex 6 | %% 7 | %% This work may be distributed and/or modified under the 8 | %% conditions of the LaTeX Project Public License, either version 1.3 9 | %% of this license or (at your option) any later version. 10 | %% The latest version of this license is in 11 | %% http://www.latex-project.org/lppl.txt 12 | %% and version 1.3 or later is part of all distributions of LaTeX 13 | %% version 2005/12/01 or later. 14 | %% 15 | %% This work has the LPPL maintenance status `maintained'. 16 | %% 17 | %% The Current Maintainer of this work is hust-latex Organization. 18 | %% 19 | %% This work consists of the files hustreport.dtx, 20 | %% hustreport.ins and the derived file hustreport.cls 21 | %% along with its document and example files. 22 | %% 23 | \input l3docstrip.tex 24 | \keepsilent 25 | \askforoverwritefalse 26 | 27 | \preamble 28 | 29 | This is a generated file. 30 | 31 | Copyright (C) 2013-2014 by Xu Cheng 32 | 2014-2016 by hust-latex 33 | 34 | This work may be distributed and/or modified under the 35 | conditions of the LaTeX Project Public License, either version 1.3 36 | of this license or (at your option) any later version. 37 | The latest version of this license is in 38 | http://www.latex-project.org/lppl.txt 39 | and version 1.3 or later is part of all distributions of LaTeX 40 | version 2005/12/01 or later. 41 | 42 | This work has the LPPL maintenance status `maintained'. 43 | 44 | The Current Maintainer of this work is hust-latex Organization. 45 | 46 | This work consists of the files hustreport.dtx, 47 | hustreport.ins and the derived file hustreport.cls 48 | along with its document and example files. 49 | 50 | \endpreamble 51 | 52 | 53 | \generate{ 54 | \usedir{tex/latex/\jobname} 55 | \file{\jobname.cls}{\from{\jobname.dtx}{class}} 56 | \usedir{doc/latex/\jobname/example} 57 | \file{\jobname-zh-example.tex}{\from{\jobname.dtx}{example-zh}} 58 | \file{\jobname-en-example.tex}{\from{\jobname.dtx}{example-en}} 59 | \nopreamble\nopostamble 60 | \usedir{doc/latex/\jobname/example} 61 | \file{ref-example.bib}{\from{\jobname.dtx}{example-bib}} 62 | } 63 | 64 | \Msg{*********************************************************} 65 | \Msg{*} 66 | \Msg{* To finish the installation you have to move the} 67 | \Msg{* following file into a directory searched by TeX:} 68 | \Msg{*} 69 | \Msg{* \space\space \jobname.cls} 70 | \Msg{* \space\space hust-title.eps} 71 | \Msg{* \space\space hust-title.pdf} 72 | \Msg{*} 73 | \Msg{* To produce the documentation run the file \jobname.dtx} 74 | \Msg{* through LuaLaTeX.} 75 | \Msg{*} 76 | \Msg{* Happy TeXing!} 77 | \Msg{*} 78 | \Msg{*********************************************************} 79 | 80 | \endbatchfile 81 | -------------------------------------------------------------------------------- /hustreport/hustreport.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hust-latex/hustreport/e89b003fa2e6b2532f240418cdd082e7dd88eb73/hustreport/hustreport.pdf -------------------------------------------------------------------------------- /install/unix.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # LaTeX package install script 3 | # Author: Xu Cheng 4 | 5 | command_exists () { 6 | type "$1" &> /dev/null ; 7 | } 8 | 9 | if ! command_exists realpath ; then 10 | if command_exists grealpath ; then 11 | realpath() { 12 | grealpath "$1" 13 | } 14 | else 15 | realpath() { 16 | [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" 17 | } 18 | fi 19 | fi 20 | 21 | SCRIPT_PATH=$(realpath $(cd $(dirname $0);pwd)) 22 | cd $SCRIPT_PATH/.. 23 | 24 | TEXMFLOCAL=`kpsewhich --var-value=TEXMFLOCAL | awk -v RS="" -v FS="[\r\n]" '{print $1}' ` 25 | 26 | install(){ 27 | echo "Install hustreport.cls template into local." 28 | mkdir -p "${TEXMFLOCAL}/tex/latex/hustreport/" 29 | cp -f ./hustreport/hustreport.cls "${TEXMFLOCAL}/tex/latex/hustreport/" 30 | cp -f ./hustreport/hust-title.eps "${TEXMFLOCAL}/tex/latex/hustreport/" 31 | cp -f ./hustreport/hust-title.pdf "${TEXMFLOCAL}/tex/latex/hustreport/" 32 | mkdir -p "${TEXMFLOCAL}/doc/latex/hustreport/" 33 | cp -f ./hustreport/hustreport.pdf "${TEXMFLOCAL}/doc/latex/hustreport/" 34 | mkdir -p "${TEXMFLOCAL}/doc/latex/hustreport/example/" 35 | cp -f ./hustreport/hustreport-zh-example.pdf "${TEXMFLOCAL}/doc/latex/hustreport/example/" 36 | cp -f ./hustreport/hustreport-zh-example.tex "${TEXMFLOCAL}/doc/latex/hustreport/example/" 37 | cp -f ./hustreport/hustreport-en-example.pdf "${TEXMFLOCAL}/doc/latex/hustreport/example/" 38 | cp -f ./hustreport/hustreport-en-example.tex "${TEXMFLOCAL}/doc/latex/hustreport/example/" 39 | cp -f ./hustreport/fig-example.pdf "${TEXMFLOCAL}/doc/latex/hustreport/example/" 40 | cp -f ./hustreport/ref-example.bib "${TEXMFLOCAL}/doc/latex/hustreport/example/" 41 | hash 42 | } 43 | 44 | uninstall(){ 45 | echo "Uninstall hustreport.cls template." 46 | rm -rf "${TEXMFLOCAL}/tex/latex/hustreport/" 47 | rm -rf "${TEXMFLOCAL}/doc/latex/hustreport/" 48 | hash 49 | } 50 | 51 | hash(){ 52 | echo "Refresh TeX hash database." 53 | texhash 54 | } 55 | 56 | help(){ 57 | echo "Usage:" 58 | echo " $(basename $0) install - install hustreport.cls template into local." 59 | echo " $(basename $0) uninstall - uninstall hustreport.cls template." 60 | echo "" 61 | } 62 | 63 | if [[ $1 = "install" ]]; then 64 | install 65 | elif [[ $1 = "uninstall" ]]; then 66 | uninstall 67 | else 68 | help 69 | fi 70 | -------------------------------------------------------------------------------- /install/win32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem LaTeX package install script 3 | rem Author: Xu Cheng 4 | 5 | cd /d "%~dp0" 6 | cd .. 7 | 8 | if not defined TEXMFLOCAL ( 9 | for /f "delims=" %%I in ('kpsewhich --var-value=TEXMFLOCAL') do @set TEXMFLOCAL=%%I 10 | ) 11 | 12 | if /i "%1" == "install" goto :install 13 | if /i "%1" == "uninstall" goto :uninstall 14 | goto :help 15 | 16 | :install 17 | echo. Install hustreport.cls template into local. 18 | mkdir "%TEXMFLOCAL%\tex\latex\hustreport\" 19 | xcopy /q /y .\hustreport\hustreport.cls "%TEXMFLOCAL%\tex\latex\hustreport\" > nul 20 | xcopy /q /y .\hustreport\hust-title.eps "%TEXMFLOCAL%\tex\latex\hustreport\" > nul 21 | xcopy /q /y .\hustreport\hust-title.pdf "%TEXMFLOCAL%\tex\latex\hustreport\" > nul 22 | mkdir "%TEXMFLOCAL%\doc\latex\hustreport\" 23 | xcopy /q /y .\hustreport\hustreport.pdf "%TEXMFLOCAL%\doc\latex\hustreport\" > nul 24 | mkdir "%TEXMFLOCAL%\doc\latex\hustreport\example\" 25 | xcopy /q /y .\hustreport\hustreport-zh-example.pdf "%TEXMFLOCAL%\doc\latex\hustreport\example\" > nul 26 | xcopy /q /y .\hustreport\hustreport-zh-example.tex "%TEXMFLOCAL%\doc\latex\hustreport\example\" > nul 27 | xcopy /q /y .\hustreport\hustreport-en-example.pdf "%TEXMFLOCAL%\doc\latex\hustreport\example\" > nul 28 | xcopy /q /y .\hustreport\hustreport-en-example.tex "%TEXMFLOCAL%\doc\latex\hustreport\example\" > nul 29 | xcopy /q /y .\hustreport\fig-example.pdf "%TEXMFLOCAL%\doc\latex\hustreport\example\" > nul 30 | xcopy /q /y .\hustreport\ref-example.bib "%TEXMFLOCAL%\doc\latex\hustreport\example\" > nul 31 | goto :hash 32 | 33 | :uninstall 34 | echo. Uninstall hustreport.cls template. 35 | rd /q /s "%TEXMFLOCAL%\tex\latex\hustreport\" 36 | rd /q /s "%TEXMFLOCAL%\doc\latex\hustreport\" 37 | goto :hash 38 | 39 | :hash 40 | echo. Refresh TeX hash database. 41 | texhash 42 | goto :exit 43 | 44 | :help 45 | echo Usage: 46 | echo. %~nx0 install - install hustreport.cls template into local. 47 | echo. %~nx0 uninstall - uninstall hustreport.cls template. 48 | echo. 49 | goto :exit 50 | 51 | :exit -------------------------------------------------------------------------------- /makewin32.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem simulate Makefile for Windows 3 | rem Author: Xu Cheng 4 | 5 | cd /d "%~dp0" 6 | 7 | if /i "%1" == "unpack" goto :unpack 8 | if /i "%1" == "example" goto :example 9 | if /i "%1" == "example-zh" goto :example-zh 10 | if /i "%1" == "example-en" goto :example-en 11 | if /i "%1" == "doc" goto :doc 12 | if /i "%1" == "clean" goto :clean 13 | if /i "%1" == "all" goto :all 14 | if /i "%1" == "install" goto :install 15 | if /i "%1" == "uninstall" goto :uninstall 16 | goto :help 17 | 18 | :help 19 | echo Usage: 20 | echo. makewin32 unpack - unpack package 21 | echo. makewin32 example - build Chinese and English example 22 | echo. makewin32 example-zh - build Chinese example 23 | echo. makewin32 example-en - build English example 24 | echo. makewin32 doc - build document 25 | echo. makewin32 all - build example and document 26 | echo. makewin32 clean - delete temporary file 27 | echo. makewin32 install - install into local 28 | echo. makewin32 uninstall - uninstall 29 | echo. 30 | echo Even this file behaves much like Makefile, 31 | echo I still recommend you install Make into your Windows. 32 | echo You can download it from http://gnuwin32.sourceforge.net/packages/make.htm 33 | echo. 34 | goto :exit 35 | 36 | :all 37 | call :unpack 38 | call :example 39 | call :doc 40 | goto :exit 41 | 42 | :unpack 43 | pushd hustreport 44 | lualatex hustreport.ins 45 | popd 46 | goto :exit 47 | 48 | :example 49 | call :example-zh 50 | call :example-en 51 | goto :exit 52 | 53 | :example-zh 54 | call :unpack 55 | pushd hustreport 56 | lualatex -shell-escape -8bit hustreport-zh-example 57 | bibtex hustreport-zh-example 58 | lualatex -shell-escape -8bit hustreport-zh-example 59 | lualatex -shell-escape -8bit hustreport-zh-example 60 | popd 61 | goto :exit 62 | 63 | :example-en 64 | call :unpack 65 | pushd hustreport 66 | lualatex -shell-escape -8bit hustreport-en-example 67 | bibtex hustreport-en-example 68 | lualatex -shell-escape -8bit hustreport-en-example 69 | lualatex -shell-escape -8bit hustreport-en-example 70 | popd 71 | goto :exit 72 | 73 | :doc 74 | pushd hustreport 75 | lualatex -shell-escape -8bit hustreport.dtx 76 | makeindex -s gind.ist -o hustreport.ind hustreport.idx 77 | lualatex -shell-escape -8bit hustreport.dtx 78 | lualatex -shell-escape -8bit hustreport.dtx 79 | popd 80 | goto :exit 81 | 82 | :install 83 | call :unpack 84 | if not exist .\hustreport\hustreport-zh-example.pdf call :example-zh 85 | if not exist .\hustreport\hustreport-en-example.pdf call :example-en 86 | if not exist .\hustreport\hustreport.pdf call :doc 87 | call .\install\win32.bat install 88 | goto :exit 89 | 90 | :uninstall 91 | call .\install\win32.bat uninstall 92 | goto :exit 93 | 94 | :clean 95 | pushd hustreport 96 | del /f /q *.acn *.acr *.alg *.aux *.bbl *.blg *.dvi *.fdb_latexmk *.glg *.glo *.gls *.idx *.ilg *.ind *.ist *.lof *.log *.lot *.maf *.mtc *.mtc0 *.nav *.nlo *.out *.pdfsync *.pyg *.snm *.synctex.gz *.thm *.toc *.vrb *.xdy *.tdo *.hd 97 | popd 98 | goto :exit 99 | 100 | :exit --------------------------------------------------------------------------------