├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE ├── README.md ├── figures └── 浙江大学.pdf ├── zjureport.cls └── zjureport.tex /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: [push] 3 | jobs: 4 | build_latex: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - name: Set up Git repository 8 | uses: actions/checkout@v2 9 | - name: Download the fonts 10 | run: for i in simhei.ttf simkai.ttf simsun.ttc simsunb.ttf simfang.ttf; do wget -P fonts/ https://static.xugr.me/fonts/$i; done 11 | - name: Copy the fonts 12 | run: mkdir -p ~/.local/share/fonts && cp -r fonts/* ~/.local/share/fonts/ 13 | - name: Build font information caches 14 | run: fc-cache -rv 15 | - uses: actions/cache@v2 16 | name: Tectonic Cache 17 | with: 18 | path: ~/.cache/Tectonic 19 | key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }} 20 | restore-keys: | 21 | ${{ runner.os }}-tectonic- 22 | - uses: wtfjoke/setup-tectonic@v2 23 | with: 24 | github-token: ${{ secrets.GITHUB_TOKEN }} 25 | - name: Run Tectonic 26 | run: tectonic zjureport.tex 27 | - name: Upload pdf 28 | uses: actions/upload-artifact@v2 29 | with: 30 | name: Example 31 | path: zjureport.pdf 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /*.pdf 2 | ## Core latex/pdflatex auxiliary files: 3 | *.aux 4 | *.lof 5 | *.log 6 | *.lot 7 | *.fls 8 | *.out 9 | *.toc 10 | *.fmt 11 | *.fot 12 | *.cb 13 | *.cb2 14 | 15 | ## Intermediate documents: 16 | *.dvi 17 | *-converted-to.* 18 | # these rules might exclude image files for figures etc. 19 | # *.ps 20 | # *.eps 21 | # *.pdf 22 | 23 | ## Generated if empty string is given at "Please type another file name for output:" 24 | .pdf 25 | 26 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 27 | *.bbl 28 | *.bcf 29 | *.blg 30 | *-blx.aux 31 | *-blx.bib 32 | *.run.xml 33 | 34 | ## Build tool auxiliary files: 35 | *.fdb_latexmk 36 | *.synctex 37 | *.synctex(busy) 38 | *.synctex.gz 39 | *.synctex.gz(busy) 40 | *.pdfsync 41 | 42 | ## Auxiliary and intermediate files from other packages: 43 | # algorithms 44 | *.alg 45 | *.loa 46 | 47 | # achemso 48 | acs-*.bib 49 | 50 | # amsthm 51 | *.thm 52 | 53 | # beamer 54 | *.nav 55 | *.pre 56 | *.snm 57 | *.vrb 58 | 59 | # changes 60 | *.soc 61 | 62 | # cprotect 63 | *.cpt 64 | 65 | # elsarticle (documentclass of Elsevier journals) 66 | *.spl 67 | 68 | # endnotes 69 | *.ent 70 | 71 | # fixme 72 | *.lox 73 | 74 | # feynmf/feynmp 75 | *.mf 76 | *.mp 77 | *.t[1-9] 78 | *.t[1-9][0-9] 79 | *.tfm 80 | 81 | #(r)(e)ledmac/(r)(e)ledpar 82 | *.end 83 | *.?end 84 | *.[1-9] 85 | *.[1-9][0-9] 86 | *.[1-9][0-9][0-9] 87 | *.[1-9]R 88 | *.[1-9][0-9]R 89 | *.[1-9][0-9][0-9]R 90 | *.eledsec[1-9] 91 | *.eledsec[1-9]R 92 | *.eledsec[1-9][0-9] 93 | *.eledsec[1-9][0-9]R 94 | *.eledsec[1-9][0-9][0-9] 95 | *.eledsec[1-9][0-9][0-9]R 96 | 97 | # glossaries 98 | *.acn 99 | *.acr 100 | *.glg 101 | *.glo 102 | *.gls 103 | *.glsdefs 104 | 105 | # gnuplottex 106 | *-gnuplottex-* 107 | 108 | # gregoriotex 109 | *.gaux 110 | *.gtex 111 | 112 | # hyperref 113 | *.brf 114 | 115 | # knitr 116 | *-concordance.tex 117 | # TODO Comment the next line if you want to keep your tikz graphics files 118 | *.tikz 119 | *-tikzDictionary 120 | 121 | # listings 122 | *.lol 123 | 124 | # makeidx 125 | *.idx 126 | *.ilg 127 | *.ind 128 | *.ist 129 | 130 | # minitoc 131 | *.maf 132 | *.mlf 133 | *.mlt 134 | *.mtc[0-9]* 135 | *.slf[0-9]* 136 | *.slt[0-9]* 137 | *.stc[0-9]* 138 | 139 | # minted 140 | _minted* 141 | *.pyg 142 | 143 | # morewrites 144 | *.mw 145 | 146 | # nomencl 147 | *.nlo 148 | 149 | # pax 150 | *.pax 151 | 152 | # pdfpcnotes 153 | *.pdfpc 154 | 155 | # sagetex 156 | *.sagetex.sage 157 | *.sagetex.py 158 | *.sagetex.scmd 159 | 160 | # scrwfile 161 | *.wrt 162 | 163 | # sympy 164 | *.sout 165 | *.sympy 166 | sympy-plots-for-*.tex/ 167 | 168 | # pdfcomment 169 | *.upa 170 | *.upb 171 | 172 | # pythontex 173 | *.pytxcode 174 | pythontex-files-*/ 175 | 176 | # thmtools 177 | *.loe 178 | 179 | # TikZ & PGF 180 | *.dpth 181 | *.md5 182 | *.auxlock 183 | 184 | # todonotes 185 | *.tdo 186 | 187 | # easy-todo 188 | *.lod 189 | 190 | # xindy 191 | *.xdy 192 | 193 | # xypic precompiled matrices 194 | *.xyc 195 | 196 | # endfloat 197 | *.ttt 198 | *.fff 199 | 200 | # Latexian 201 | TSWLatexianTemp* 202 | 203 | ## Editors: 204 | # WinEdt 205 | *.bak 206 | *.sav 207 | 208 | # Texpad 209 | .texpadtmp 210 | 211 | # Kile 212 | *.backup 213 | 214 | # KBibTeX 215 | *~[0-9]* 216 | 217 | # auto folder when using emacs and auctex 218 | /auto/* 219 | 220 | # expex forward references with \gathertags 221 | *-tags.tex 222 | 223 | # compiled files 224 | *.xdv -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 浙江大学实验报告模板 2 | 3 | ![status](https://github.com/megrxu/zju-report-latex-template/workflows/Build/badge.svg) 4 | 5 | 本模板是笔者编写的适用于浙江大学的实验报告 LaTeX 模板。出于个人喜好,目前推荐的引擎是 [Textonic](https://github.com/tectonic-typesetting/tectonic/)。 6 | 7 | 由于浙江大学近来更改了其[整体视效设计](https://www.zju.edu.cn/572/list.htm),包括“浙江大学”四字,本模板采用了最新的版本,因此可能和课程中老师提供的 Microsoft Word 模板中的图案有细微区别。 8 | 9 | 案例及使用说明请看仓库目录下的 `zjureport.tex`。 10 | 11 | ## 使用方法 12 | 13 | 使用 Tectonic 引擎: 14 | ```bash 15 | tectonic zjureport.tex 16 | ``` 17 | 18 | 使用 xelatex: 19 | 20 | ```bash 21 | xelatex zjureport.tex 22 | ``` -------------------------------------------------------------------------------- /figures/浙江大学.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/megrxu/zjureport/f67d723cd0c937a2b39f2f44420ada7f424e411f/figures/浙江大学.pdf -------------------------------------------------------------------------------- /zjureport.cls: -------------------------------------------------------------------------------- 1 | \ProvidesClass{zjureport} 2 | \LoadClass{ctexart} 3 | \RequirePackage{graphicx, xcolor, tikz} 4 | \RequirePackage{geometry, titlesec, fancyhdr} 5 | \RequirePackage{listings, cncolours} 6 | \RequirePackage{indentfirst, enumitem, zhnumber} 7 | 8 | % 设置版式 9 | \linespread{1.2} 10 | \geometry{top=1in,bottom=1in,left=1in,right=1in} 11 | 12 | % 设置标题和字体格式 13 | \setCJKmainfont[ItalicFont={KaiTi},BoldFont={SimHei}]{SimSun} 14 | \setmonofont{DejaVu Sans Mono} 15 | \setCJKfamilyfont{KaiTi}[AutoFakeBold=2.5]{KaiTi} 16 | 17 | \setcounter{secnumdepth}{3} 18 | \renewcommand\thesection{\zhnumber{\arabic{section}}、} 19 | \renewcommand\thesubsection{\arabic{subsection}.} 20 | \renewcommand\thesubsubsection{(\arabic{subsubsection})} 21 | \setlist[enumerate,1]{label=(\arabic*)} 22 | \setlist[enumerate,2]{label=\alph*.} 23 | \titleformat*{\section}{\large\bfseries} 24 | \titleformat*{\subsection}{\normalsize\bfseries} 25 | \titleformat*{\subsubsection}{\normalsize} 26 | 27 | % 代码格式和颜色定义 28 | \colorlet{keyword}{松花绿} 29 | \colorlet{comment}{漆黑!50} 30 | \colorlet{emph1}{靛蓝} 31 | \colorlet{emph2}{琥珀} 32 | \lstset{ 33 | frame=tb, 34 | framerule=0.5pt, 35 | numbers=none, 36 | breaklines=true, 37 | breakatwhitespace=true, 38 | keywordstyle = \bfseries\color{keyword}, 39 | commentstyle = \itshape\color{comment}, 40 | emphstyle = [1]\itshape\color{emph1}, 41 | emphstyle = [2]\color{emph2}, 42 | basicstyle = {\small\ttfamily}, 43 | } 44 | 45 | % 信息 46 | \newcommand\major[1]{\def\@major{#1}} 47 | \newcommand\name[1]{\def\@name{#1}} 48 | \newcommand\stuid[1]{\def\@stuid{#1}} 49 | \newcommand\college[1]{\def\@college{#1}} 50 | \renewcommand\date[1]{\def\@date{#1}} 51 | \newcommand\lab[1]{\def\@lab{#1}} 52 | \newcommand\course[1]{\def\@course{#1}} 53 | \newcommand\instructor[1]{\def\@instructor{#1}} 54 | \newcommand\grades[1]{\def\@grades{#1}} 55 | \newcommand\expname[1]{\def\@expname{#1}} 56 | \newcommand\exptype[1]{\def\@exptype{#1}} 57 | \newcommand\partner[1]{\def\@partner{#1}} 58 | \graphicspath{{figures/}} 59 | 60 | % 页眉 61 | \pagestyle{fancy} 62 | \lhead{实验名称:\@expname} 63 | \chead{姓名:\@name} 64 | \rhead{学号:\@stuid} 65 | 66 | % 下划线定义 67 | \def\zjuu[#1]#2{ 68 | \underline{\hbox to #1{\hfil#2\hfil}}} 69 | 70 | % 首页头部 71 | \newcommand{\makeheader}{ 72 | \begin{figure}[h] 73 | \begin{minipage}{0.4\linewidth} 74 | \centerline{\includegraphics[width=\linewidth]{浙江大学}} 75 | \end{minipage}% 76 | \begin{minipage}{0.3\linewidth} 77 | \centerline{\fontsize{36}{50}\CJKfamily{KaiTi}{\textbf{\xeCJKsetup{CJKglue=\hskip 0.8pt}实验报告}}} 78 | \end{minipage}% 79 | \begin{minipage}{.3\linewidth} 80 | \raggedleft 81 | \begin{tabular*}{.8\linewidth}{ll} 82 | 专业: & \zjuu[70pt]\@major \\ 83 | 姓名: & \zjuu[70pt]\@name \\ 84 | 学号: & \zjuu[70pt]\@stuid \\ 85 | 日期: & \zjuu[70pt]\@date \\ 86 | 地点: & \zjuu[70pt]\@lab 87 | \end{tabular*} 88 | \end{minipage} 89 | \end{figure} 90 | 91 | \begin{table}[!htbp] 92 | \centering 93 | \begin{tabular*}{\linewidth}{llllll} 94 | 课程名称: & \zjuu[150pt]\@course & 指导老师: & \zjuu[50pt]\@instructor & 成绩: & \zjuu[50pt]\@grades \\ 95 | 实验名称: & \zjuu[150pt]\@expname & 实验类型: & \zjuu[50pt]\@exptype & 同组学生姓名: & \zjuu[50pt]\@partner 96 | \end{tabular*} 97 | \end{table} 98 | \thispagestyle{empty} 99 | 100 | } 101 | 102 | % 封面 103 | \newcommand{\makecover}{ 104 | \begin{center} 105 | \begin{center} 106 | \includegraphics[width=0.7\linewidth]{浙江大学} 107 | \end{center} 108 | \vspace{1cm} 109 | \bfseries\huge{本科实验报告}\\ 110 | \vspace{0.5cm} 111 | \bfseries\Large{\@expname} 112 | \vspace{3cm} 113 | \begin{center} 114 | \Large 115 | \linespread{2} 116 | \centering 117 | \renewcommand\arraystretch{1.6} 118 | \begin{tabular}{p{3cm}p{6cm}} 119 | \bfseries{课程名称:} & \@course \\ \cline{2-2} 120 | \bfseries{姓名:} & \@name \\ \cline{2-2} 121 | \bfseries{学院:} & \@college \\ \cline{2-2} 122 | \bfseries{专业:} & \@major \\ \cline{2-2} 123 | \bfseries{学号:} & \@stuid \\ \cline{2-2} 124 | \bfseries{指导老师:} & \@instructor \\ \cline{2-2} 125 | \end{tabular} 126 | \end{center} 127 | \vspace{2cm} 128 | \Large{\@date} 129 | \end{center} 130 | \thispagestyle{empty} 131 | \newpage 132 | } 133 | \endinput -------------------------------------------------------------------------------- /zjureport.tex: -------------------------------------------------------------------------------- 1 | \documentclass{zjureport} 2 | 3 | \usepackage{hyperref} 4 | \hypersetup{ 5 | colorlinks=true, 6 | } 7 | 8 | \major{信息工程} 9 | \name{张扬} 10 | \title{本科实验报告} 11 | \stuid{3171002333} 12 | \college{信息与电子工程学院} 13 | \date{\zhtoday} 14 | \lab{东四-A-308} 15 | \course{\LaTeX 模板使用} 16 | \instructor{赵林平} 17 | \grades{93} 18 | \expname{使用实验报告模板} 19 | \exptype{操作实验} 20 | \partner{无} 21 | 22 | \begin{document} 23 | 24 | \makecover % 如果不想要封面,可以注释掉这一行 25 | \makeheader 26 | 27 | \section{实验目的和要求} 28 | 本文档使用了笔者编写的适用于 \LaTeX 的浙江大学实验报告模板,用于展示最终达到的效果。出于个人喜好,目前推荐的引擎是 \href{https://github.com/tectonic-typesetting/tectonic/}{Textonic}。 29 | 30 | 由于浙江大学近来更改了其\href{https://www.zju.edu.cn/572/list.htm}{整体视效设计},包括``浙江大学''四字,本模板采用了最新的 Logo ,因此可能和课程中老师提供的 Microsoft Word 模板中的 Logo 有细微区别。 31 | 32 | \section{实验内容和步骤} 33 | 34 | \subsection{实验内容} 35 | 36 | \subsection{实验步骤} 37 | 38 | \section{主要仪器设备} 39 | 计算机及配套软件。 40 | 41 | \section{操作方法和实验步骤} 42 | 43 | \section{实验数据记录和处理} 44 | 45 | \begin{lstlisting}[language=C] 46 | #include 47 | int main() { 48 | int number; 49 | 50 | printf("Enter an integer: "); 51 | 52 | // reads and stores input 53 | scanf("%d", &number); 54 | 55 | // displays output 56 | printf("You entered: %d", number); 57 | 58 | return 0; 59 | } 60 | \end{lstlisting} 61 | 62 | \section{实验结果与分析} 63 | 64 | \end{document} 65 | --------------------------------------------------------------------------------