├── .gitignore ├── LICENSE ├── README.md ├── hit-extra.sty ├── hit-style.sty ├── hithesis.bst ├── latexmkrc ├── pic ├── dtmf.pdf ├── hit2020.png ├── hitcolor.jpg └── hitlogo.pdf ├── ref.bib └── slide.tex /.gitignore: -------------------------------------------------------------------------------- 1 | ## VS Code Settings 2 | .vscode 3 | 4 | ## Core latex/pdflatex auxiliary files: 5 | *.aux 6 | *.lof 7 | *.log 8 | *.lot 9 | *.fls 10 | *.out 11 | *.toc 12 | *.fmt 13 | *.fot 14 | *.cb 15 | *.cb2 16 | .*.lb 17 | slide.pdf 18 | 19 | ## Intermediate documents: 20 | *.dvi 21 | *.xdv 22 | *-converted-to.* 23 | # these rules might exclude image files for figures etc. 24 | # *.ps 25 | # *.eps 26 | # *.pdf 27 | 28 | ## Generated if empty string is given at "Please type another file name for output:" 29 | .pdf 30 | 31 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 32 | *.bbl 33 | *.bcf 34 | *.blg 35 | *-blx.aux 36 | *-blx.bib 37 | *.run.xml 38 | 39 | ## Build tool auxiliary files: 40 | *.fdb_latexmk 41 | *.synctex 42 | *.synctex(busy) 43 | *.synctex.gz 44 | *.synctex.gz(busy) 45 | *.pdfsync 46 | 47 | ## Build tool directories for auxiliary files 48 | # latexrun 49 | latex.out/ 50 | 51 | ## Auxiliary and intermediate files from other packages: 52 | # algorithms 53 | *.alg 54 | *.loa 55 | 56 | # achemso 57 | acs-*.bib 58 | 59 | # amsthm 60 | *.thm 61 | 62 | # beamer 63 | *.nav 64 | *.pre 65 | *.snm 66 | *.vrb 67 | 68 | # changes 69 | *.soc 70 | 71 | # comment 72 | *.cut 73 | 74 | # cprotect 75 | *.cpt 76 | 77 | # elsarticle (documentclass of Elsevier journals) 78 | *.spl 79 | 80 | # endnotes 81 | *.ent 82 | 83 | # fixme 84 | *.lox 85 | 86 | # feynmf/feynmp 87 | *.mf 88 | *.mp 89 | *.t[1-9] 90 | *.t[1-9][0-9] 91 | *.tfm 92 | 93 | #(r)(e)ledmac/(r)(e)ledpar 94 | *.end 95 | *.?end 96 | *.[1-9] 97 | *.[1-9][0-9] 98 | *.[1-9][0-9][0-9] 99 | *.[1-9]R 100 | *.[1-9][0-9]R 101 | *.[1-9][0-9][0-9]R 102 | *.eledsec[1-9] 103 | *.eledsec[1-9]R 104 | *.eledsec[1-9][0-9] 105 | *.eledsec[1-9][0-9]R 106 | *.eledsec[1-9][0-9][0-9] 107 | *.eledsec[1-9][0-9][0-9]R 108 | 109 | # glossaries 110 | *.acn 111 | *.acr 112 | *.glg 113 | *.glo 114 | *.gls 115 | *.glsdefs 116 | *.lzo 117 | *.lzs 118 | 119 | # uncomment this for glossaries-extra (will ignore makeindex's style files!) 120 | # *.ist 121 | 122 | # gnuplottex 123 | *-gnuplottex-* 124 | 125 | # gregoriotex 126 | *.gaux 127 | *.gtex 128 | 129 | # htlatex 130 | *.4ct 131 | *.4tc 132 | *.idv 133 | *.lg 134 | *.trc 135 | *.xref 136 | 137 | # hyperref 138 | *.brf 139 | 140 | # knitr 141 | *-concordance.tex 142 | # TODO Comment the next line if you want to keep your tikz graphics files 143 | *.tikz 144 | *-tikzDictionary 145 | 146 | # listings 147 | *.lol 148 | 149 | # luatexja-ruby 150 | *.ltjruby 151 | 152 | # makeidx 153 | *.idx 154 | *.ilg 155 | *.ind 156 | 157 | # minitoc 158 | *.maf 159 | *.mlf 160 | *.mlt 161 | *.mtc[0-9]* 162 | *.slf[0-9]* 163 | *.slt[0-9]* 164 | *.stc[0-9]* 165 | 166 | # minted 167 | _minted* 168 | *.pyg 169 | 170 | # morewrites 171 | *.mw 172 | 173 | # nomencl 174 | *.nlg 175 | *.nlo 176 | *.nls 177 | 178 | # pax 179 | *.pax 180 | 181 | # pdfpcnotes 182 | *.pdfpc 183 | 184 | # sagetex 185 | *.sagetex.sage 186 | *.sagetex.py 187 | *.sagetex.scmd 188 | 189 | # scrwfile 190 | *.wrt 191 | 192 | # sympy 193 | *.sout 194 | *.sympy 195 | sympy-plots-for-*.tex/ 196 | 197 | # pdfcomment 198 | *.upa 199 | *.upb 200 | 201 | # pythontex 202 | *.pytxcode 203 | pythontex-files-*/ 204 | 205 | # tcolorbox 206 | *.listing 207 | 208 | # thmtools 209 | *.loe 210 | 211 | # TikZ & PGF 212 | *.dpth 213 | *.md5 214 | *.auxlock 215 | 216 | # todonotes 217 | *.tdo 218 | 219 | # vhistory 220 | *.hst 221 | *.ver 222 | 223 | # easy-todo 224 | *.lod 225 | 226 | # xcolor 227 | *.xcp 228 | 229 | # xmpincl 230 | *.xmpi 231 | 232 | # xindy 233 | *.xdy 234 | 235 | # xypic precompiled matrices and outlines 236 | *.xyc 237 | *.xyd 238 | 239 | # endfloat 240 | *.ttt 241 | *.fff 242 | 243 | # Latexian 244 | TSWLatexianTemp* 245 | 246 | ## Editors: 247 | # WinEdt 248 | *.bak 249 | *.sav 250 | 251 | # Texpad 252 | .texpadtmp 253 | 254 | # LyX 255 | *.lyx~ 256 | 257 | # Kile 258 | *.backup 259 | 260 | # gummi 261 | .*.swp 262 | 263 | # KBibTeX 264 | *~[0-9]* 265 | 266 | # auto folder when using emacs and auctex 267 | ./auto/* 268 | *.el 269 | 270 | # expex forward references with \gathertags 271 | *-tags.tex 272 | 273 | # standalone packages 274 | *.sta 275 | 276 | # Makeindex log files 277 | *.lpz 278 | 279 | # local history 280 | .history 281 | 282 | 283 | Appendix_B.tex -------------------------------------------------------------------------------- /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 | # HITBeamer 2 | 3 | 基于 [THU-Beamer-Theme](https://github.com/Trinkle23897/THU-Beamer-Theme) 删删改改而成的 :bug: 4 | 5 | ## 编译环境 6 | 7 | 已知可行的编译环境为 8 | 9 | * `Win11 21H1` + `TeX Live 2022` 10 | * `Arch Linux` + TeX Live 2022` 11 | 12 | ## 字体 13 | 14 | 字体部分使用了外部字体 [`Source Han Sans SC`](https://github.com/adobe-fonts/source-han-sans/tree/release/OTF/SimplifiedChinese), [`FiraCode`](https://github.com/tonsky/FiraCode/releases) 以及 [`FiraGO`](https://bboxtype.com/downloads/FiraGO/Download_Folder_FiraGO_1001.zip), 点击字体名即可获取下载链接, 其中 `FiraCode` 只需要解压 `zip` 文件中的 `ttf` 文件夹, `FiraGO` 需要解压 `Download_Folder_FiraGO_1001.zip\Download_Folder_FiraGO_1001\Fonts\FiraGO_OTF_1001`. 下载字体后右键选择 `为所有用户安装`, 并在安装后在命令行中运行 15 | 16 | ```bash 17 | fc-cache -fv 18 | ``` 19 | 20 | 来刷新字体缓存, 即可使用这两种字体. 21 | 22 | 如果不想使用这两种字体, 可以取消 `hit-extra` 的选项 `siyuan` 和 `fira`,即 23 | 24 | ```latex 25 | \usepackage[minted, fira, siyuan]{hit-extra} 26 | ↓ 27 | \usepackage[minted]{hit-extra} 28 | ``` 29 | 30 | ## `minted` 宏包 31 | 32 | 本模板使用了 [`minted`](https://www.ctan.org/pkg/minted) 宏包来排版代码, 该宏包需要 `python` 与 python 模块 `pygments`. 安装方法: 33 | 34 | 1. 从 [python 官网](https://www.python.org/) 下载最新版的 `python`, 35 | 2. 在命令行运行 `pip install pygments` 安装 `pygments`, 36 | 3. 命令行运行 `pygmentize -L lexers` 来查看 `pygments` 可以渲染的语言, 37 | 4. 编译的时候记得添加编译选项 `-shell-escape` 38 | 39 | 如果是 [`Anaconda`](https://www.anaconda.com/) 用户, 可以将第 2 步中的 `pip` 改为 `conda` 来使用 `conda` 安装. 40 | 41 | 如果不想使用 `minted` 宏包, 可以取消 `hit-extra` 的 `minted` 选项以及删除 `slide.tex` 中的带 `mint` 的语句即可. 原模板同样提供了 `listings` 宏包来排版代码, 在 `slide.tex` 中同样给了[示例](https://github.com/syvshc/HITBeamer/blob/master/slide.tex#L220) 42 | 43 | ## 编译方法 44 | 45 | 命令行进入 `slide.tex` 所在的文件夹, 运行 46 | 47 | ```bash 48 | xelatex -shell-escape slide 49 | bibtex slide 50 | xelatex -shell-escape slide 51 | xelatex -shell-escape slide 52 | ``` 53 | 54 | 或者使用一步到位的 `latexmk` 命令: 运行 55 | 56 | ```bash 57 | latexmk 58 | ``` 59 | 60 | 该方法会在保存时检测文件改动并自动编译, 如果不想让它自动编译, 那么可以将命令改为 61 | 62 | ```bash 63 | latexmk -pvc- 64 | ``` 65 | 66 | 来临时抑制此功能, 或将 [latexmkrc](https://github.com/syvshc/HITBeamer/blob/master/latexmkrc) 中的 67 | 68 | ```bash 69 | $preview_continuous_mode = 1; 70 | ``` 71 | 72 | 删除来永久删除此功能. 73 | 74 | ## 开源协议 75 | 76 | 本文档遵循 LPPL (The LaTeX Project Public License) Version 1.3c 及以后的开源协议. 77 | -------------------------------------------------------------------------------- /hit-extra.sty: -------------------------------------------------------------------------------- 1 | \ProvidesPackage{hit-extra}[2022/05/27 v0.2 a beamer template for HIT] 2 | 3 | \newif\ifhit@minted 4 | \newif\ifhit@fira 5 | \newif\ifhit@siyuan 6 | 7 | \DeclareOption{minted}{% 8 | \hit@mintedtrue 9 | } 10 | 11 | \DeclareOption{fira}{% 12 | \hit@firatrue 13 | } 14 | 15 | \DeclareOption{siyuan}{% 16 | \hit@siyuantrue 17 | } 18 | % \ExecuteOptions{minted,fira,siyuan} 19 | \ProcessOptions\relax 20 | 21 | \RequirePackage{ctex} 22 | \hypersetup{colorlinks,linkcolor=,urlcolor=magenta} 23 | % \RequirePackage[T1]{fontenc} 24 | \RequirePackage{xeCJKfntef} 25 | % other packages 26 | \RequirePackage{latexsym,amsmath,xcolor,multicol,booktabs,calligra} 27 | \RequirePackage{graphicx,pstricks,listings,stackengine} 28 | \RequirePackage{physics, tikz} 29 | \usefonttheme[stillsansserifmath]{serif} 30 | \RequirePackage[bold-style=ISO]{unicode-math} 31 | 32 | \newcommand{\hit@fontnotfound}[1] 33 | { 34 | \PackageWarning{hit-extra}{Font ``#1'' not found, \MessageBreak use default font instead.} 35 | } 36 | 37 | \ifhit@fira 38 | % \setmathfont{Fira Math} 39 | \IfFontExistsTF{Fira Math} 40 | {\setmathfont{FiraMath-Regular.otf}} 41 | {\hit@fontnotfound{Fira Math}} 42 | \IfFontExistsTF{Fira Code} 43 | { 44 | \setmonofont{Fira Code} 45 | } 46 | {\hit@fontnotfound{Fira Code}} 47 | \IfFontExistsTF{FiraGO} 48 | { 49 | \setmainfont{FiraGO} 50 | } 51 | {\hit@fontnotfound{FiraGO}} 52 | \fi 53 | 54 | \ifhit@siyuan 55 | \IfFontExistsTF{Source Han Sans SC} 56 | { 57 | \setCJKmainfont{Source Han Sans SC} 58 | \setCJKsansfont{Source Han Sans SC} 59 | } 60 | { 61 | \IfFontExistsTF{Noto Sans CJK SC} 62 | { 63 | \setCJKmainfont{Noto Sans CJK SC} 64 | \setCJKsansfont{Noto Sans CJK SC} 65 | }{\hit@fontnotfound{Source Han Sans SC}} 66 | } 67 | \fi 68 | 69 | \renewcommand{\footnotesize}{\fontsize{6}{7.2}\selectfont} 70 | \ifhit@minted 71 | \RequirePackage{minted} 72 | \usemintedstyle{autumn} 73 | \setminted{ 74 | fontsize = \fontsize{8}{9.6}\selectfont, 75 | frame = single, 76 | linenos = true, 77 | breaklines = true, 78 | breakanywhere = true, 79 | autogobble = true 80 | } 81 | \fi 82 | 83 | % \RequirePackage[shortlabels]{enumitem} 84 | % defs 85 | \newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}} 86 | 87 | \def\cmd#1{\texttt{\color{red}\fontsize{8}{9.6}\selectfont $\backslash$#1}} 88 | \def\env#1{\texttt{\color{blue}\fontsize{8}{9.6}\selectfont #1}} 89 | \definecolor{deepblue}{rgb}{0,0,0.5} 90 | \definecolor{deepred}{rgb}{0.6,0,0} 91 | \definecolor{deepgreen}{rgb}{0,0.5,0} 92 | \definecolor{halfgray}{gray}{0.55} 93 | 94 | \lstset{ 95 | basicstyle=\ttfamily\fontsize{8}{9.6}\selectfont, 96 | keywordstyle=\bfseries\color{deepblue}, 97 | emphstyle=\ttfamily\color{deepred}, % Custom highlighting style 98 | stringstyle=\color{deepgreen}, 99 | numbers=left, 100 | numberstyle=\fontsize{7}{8.4}\selectfont\color{halfgray}, 101 | rulesepcolor=\color{red!20!green!20!blue!20}, 102 | frame=shadowbox, 103 | } 104 | -------------------------------------------------------------------------------- /hit-style.sty: -------------------------------------------------------------------------------- 1 | \mode 2 | 3 | \newif\ifbeamer@secheader 4 | \beamer@secheaderfalse 5 | 6 | %\DeclareOptionBeamer{secheader}{\beamer@secheadertrue} 7 | \ProcessOptionsBeamer 8 | 9 | \useoutertheme[footline=authorinstitutetitle]{smoothbars} 10 | \makeatletter % [add curpage/total page at the bottom](http://tex.stackexchange.com/questions/100838/beamer-dresden-theme-miniframes-appeareance-and-frame-number-insertion) 11 | \newcommand{\frameofframes}{/} 12 | \newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}} 13 | \setbeamertemplate{footline} 14 | {% 15 | \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot} 16 | \end{beamercolorbox} 17 | \begin{beamercolorbox}[ht=2.25ex,dp=.8ex,% 18 | leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}% 19 | \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}% 20 | \hfill% 21 | {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}% 22 | \end{beamercolorbox}% 23 | \begin{beamercolorbox}[ht=2.25ex,dp=.8ex,% 24 | leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}% 25 | {\usebeamerfont{title in head/foot}\insertshorttitle}% 26 | \hfill% 27 | {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber} 28 | \end{beamercolorbox}% 29 | \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot} 30 | \end{beamercolorbox} 31 | } 32 | \makeatother 33 | 34 | \useinnertheme{circles} 35 | 36 | %\useoutertheme{default} 37 | %\useinnertheme[shadow=true]{rounded} 38 | 39 | \xdefinecolor{HIT}{rgb}{0.00,0.40,0.56} %0, 102, 142 40 | \setbeamercolor{footline}{bg=HIT} 41 | \setbeamercolor{frametitle}{bg=HIT,fg=white} 42 | \setbeamercolor{title}{bg=HIT} 43 | \setbeamerfont{frametitle}{size=\large} 44 | \setbeamertemplate{navigation symbols}{} 45 | \setbeamertemplate{bibliography item}[text] 46 | \setbeamertemplate{caption}[numbered] 47 | 48 | \setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg} 49 | \setbeamercolor{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black} 50 | \setbeamercolor{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black} 51 | \setbeamercolor{palette quaternary}{fg=white,bg=structure.fg!50!black} 52 | %\setbeamercolor*{sidebar}{use=structure,bg=structure.fg} 53 | \setbeamercolor{titlelike}{parent=palette primary} 54 | 55 | %% try 56 | \setbeamercolor{block title}{bg=HIT,fg=white} 57 | \setbeamercolor*{block title example}{use={normal text,example text},bg=white,fg=HIT} 58 | \setbeamercolor{fine separation line}{} 59 | \setbeamercolor{item projected}{fg=white} 60 | \setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg} 61 | \setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg} 62 | \setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg} 63 | \setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg} 64 | %\setbeamercolor{palette sidebar quaternary}{fg=white} 65 | \setbeamercolor{section in sidebar}{fg=brown} 66 | \setbeamercolor{section in sidebar shaded}{fg=grey} 67 | \setbeamercolor{separation line}{} 68 | \setbeamercolor{sidebar}{bg=HIT} 69 | \setbeamercolor{sidebar}{parent=palette primary} 70 | \setbeamercolor{structure}{fg=HIT} 71 | \setbeamercolor{subsection in sidebar}{fg=brown} 72 | \setbeamercolor{subsection in sidebar shaded}{fg=grey} 73 | \AtBeginSection[]{ 74 | \begin{frame} 75 | \tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] 76 | \end{frame} 77 | } 78 | \AtBeginSubsection[]{ 79 | \begin{frame} 80 | \tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] 81 | \end{frame} 82 | } 83 | 84 | \mode 85 | 86 | -------------------------------------------------------------------------------- /hithesis.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `examples/hitart/reports/hithesis.bst', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% hithesis.dtx (with options: `bst') 8 | %% 9 | %% This is a generated file. 10 | %% 11 | %% Copyright (C) 2017-2021 by Chu Yanshuo 12 | %% 13 | %% This file may be distributed and/or modified under the 14 | %% conditions of the LaTeX Project Public License, either version 1.3a 15 | %% of this license or (at your option) any later version. 16 | %% The latest version of this license is in: 17 | %% 18 | %% http://www.latex-project.org/lppl.txt 19 | %% 20 | %% and version 1.3a or later is part of all distributions of LaTeX 21 | %% version 2004/10/01 or later. 22 | %% 23 | %% To produce the documentation run the original source files ending with `.dtx' 24 | %% through LaTeX. 25 | %% 26 | ENTRY % class Entry { 27 | { % public: 28 | author % String author; 29 | editor % String editor; 30 | translator % String translator; 31 | title % String title; 32 | edition % String edition; 33 | address % String address; 34 | publisher % String publisher; 35 | pages % String pages; 36 | year % String year; 37 | date % String date; 38 | modifydate % String modifydate; 39 | citedate % String citedate; 40 | url % String url; 41 | doi % String doi; 42 | language % String language; 43 | booktitle % String booktitle; 44 | journal % String journal; 45 | chapter % String chapter; 46 | series % String series; 47 | volume % String volume; 48 | number % String number; 49 | version % String version; 50 | month % String month; 51 | school % String school; 52 | institution % String institution; 53 | organization % String organization; 54 | type % String type; 55 | howpublished % String howpublished; 56 | eid % String eid; 57 | key % String key; 58 | country % String country; 59 | patentid % String patentid; 60 | media % String media; 61 | } { % // declare integer variables 62 | required % int required; // withther the bibfield is required 63 | } { % // declare String variables 64 | label % String label; // label for the entry 65 | mark % String mark; // mark for the entry 66 | % // there is ahidden entry variable sort.key$ 67 | % String sort_key; 68 | } % } 69 | % 70 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 71 | % 72 | INTEGERS { % // declare global int variables 73 | entry.count % static int entry_count; // number of entries 74 | longest.label.width % static int longest_label_width; // width of the longest label 75 | i % static int i; 76 | j % static int j; 77 | k % static int k; 78 | } % 79 | % 80 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 81 | % 82 | STRINGS { % // declare global String variables 83 | longest.label % static String longest_label; // the longest label 84 | s % static String s; 85 | t % static String t; 86 | } % 87 | % 88 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 89 | 90 | FUNCTION {true} {#1} 91 | FUNCTION {false} {#0} 92 | FUNCTION {debug.enabled} {true} 93 | FUNCTION {cap.volume.en} {"Vol~"} 94 | FUNCTION {cap.volume.zh} {"卷"} 95 | FUNCTION {cap.edition.en} {"~ed"} 96 | FUNCTION {cap.edition.zh} {"版"} 97 | FUNCTION {cap.anonymous.en} {"Anon"} 98 | FUNCTION {cap.anonymous.zh} {"佚名"} 99 | FUNCTION {cap.no.address.en} {"[S.l.]"} 100 | FUNCTION {cap.no.address.zh} {"[出版地不详]"} 101 | FUNCTION {cap.no.publisher.en} {"[s.n.]"} 102 | FUNCTION {cap.no.publisher.zh} {"[出版者不详]"} 103 | FUNCTION {cap.et.al.en} {", et~al"} 104 | FUNCTION {cap.et.al.zh} {", 等"} 105 | FUNCTION {cap.translate.en} {"~trans"} 106 | FUNCTION {cap.translate.zh} {"译"} 107 | FUNCTION {cap.doi.url} {"http://dx.doi.org/"} 108 | FUNCTION {cap.st.en} {"st"} 109 | FUNCTION {cap.nd.en} {"nd"} 110 | FUNCTION {cap.rd.en} {"rd"} 111 | FUNCTION {cap.th.en} {"th"} 112 | 113 | FUNCTION {cap.space} {" "} 114 | FUNCTION {cap.period} {"\@. "} 115 | FUNCTION {cap.comma} {"\@, "} 116 | FUNCTION {cap.colon} {"\thinspace{}\textnormal{: }"} 117 | FUNCTION {cap.double.slash} {" //\thinspace{}"} 118 | FUNCTION {cap.dash} {"\textnormal{-}"} 119 | 120 | FUNCTION {env.bibbegin} { "\begin{thebibliography}" } 121 | FUNCTION {env.bibend} { "\end{thebibliography}" } 122 | FUNCTION {cmd.bibauthor} { "\providecommand{\bibauthor}[1]{#1}" } 123 | FUNCTION {cmd.bibeditor} { "\providecommand{\bibeditor}[1]{#1}" } 124 | FUNCTION {cmd.bibtranslator} { "\providecommand{\bibtranslator}[1]{#1}" } 125 | FUNCTION {cmd.bibtitle} { "\providecommand{\bibtitle}[1]{#1}" } 126 | FUNCTION {cmd.bibbooktitle} { "\providecommand{\bibbooktitle}[1]{#1}" } 127 | FUNCTION {cmd.bibjournal} { "\providecommand{\bibjournal}[1]{#1}" } 128 | FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{\mbox{#1}}" } 129 | FUNCTION {cmd.bibcountry} { "\providecommand{\bibcountry}[1]{#1}" } 130 | FUNCTION {cmd.bibpatentid} { "\providecommand{\bibpatentid}[1]{#1}" } 131 | FUNCTION {cmd.bibedition} { "\providecommand{\bibedition}[1]{#1}" } 132 | FUNCTION {cmd.biborganization} { "\providecommand{\biborganization}[1]{#1}" } 133 | FUNCTION {cmd.bibaddress} { "\providecommand{\bibaddress}[1]{#1}" } 134 | FUNCTION {cmd.bibpublisher} { "\providecommand{\bibpublisher}[1]{#1}" } 135 | FUNCTION {cmd.bibinstitution} { "\providecommand{\bibinstitution}[1]{#1}" } 136 | FUNCTION {cmd.bibschool} { "\providecommand{\bibschool}[1]{#1}" } 137 | FUNCTION {cmd.bibvolume} { "\providecommand{\bibvolume}[1]{#1}" } 138 | FUNCTION {cmd.bibnumber} { "\providecommand{\bibnumber}[1]{#1}" } 139 | FUNCTION {cmd.bibversion} { "\providecommand{\bibversion}[1]{#1}" } 140 | FUNCTION {cmd.bibpages} { "\providecommand{\bibpages}[1]{#1}" } 141 | FUNCTION {cmd.bibmodifydate} { "\providecommand{\bibmodifydate}[1]{#1}" } 142 | FUNCTION {cmd.bibcitedate} { "\providecommand{\bibcitedate}[1]{#1}" } 143 | FUNCTION {cmd.bibyear} { "\providecommand{\bibyear}[1]{#1}" } 144 | FUNCTION {cmd.bibdate} { "\providecommand{\bibdate}[1]{#1}" } 145 | FUNCTION {cmd.biburl} { "\providecommand{\biburl}[1]{\newline\url{#1}}" } 146 | 147 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 148 | % 149 | FUNCTION {log.str} { % void Entry::log_str(String value, String message) 150 | debug.enabled { % if (debug_enabled == 1) { 151 | "DEBUG: " swap$ * " - '" * % message = "DEBUG: " + message + " - '"; 152 | swap$ * % message = message + value; 153 | "'" * % message = message + "'"; 154 | top$ % log(message); 155 | } { % } else { 156 | pop$ pop$ % return; 157 | } if$ % } 158 | } % } 159 | % 160 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 161 | % 162 | FUNCTION {log.int} { % int Entry::log_int(int value, String message) 163 | debug.enabled { % if (debug_enabled == 1) { 164 | "DEBUG: " swap$ * " - " * % message = "DEBUG: " + message + " - "; 165 | swap$ int.to.str$ * % message = message + int_to_str(value); 166 | top$ % log(message); 167 | } { % } else { 168 | pop$ pop$ % return; 169 | } if$ % } 170 | } % } 171 | % 172 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 173 | % 174 | FUNCTION {not} { % int Entry::not(int x) { 175 | { % if (x == 1) { 176 | false % return false; 177 | } { % } else { 178 | true % return true; 179 | } if$ % } 180 | } % } 181 | % 182 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 183 | % 184 | FUNCTION {and} { % int Entry::and(int x, int y) { 185 | { % if (y == 1) { 186 | skip$ % return x; 187 | } { % } else { 188 | pop$ false % return false; 189 | } if$ % } 190 | } % } 191 | % 192 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 193 | % 194 | FUNCTION {or} { % int Entry::or(int x, int y) { 195 | { % if (y == 1) { 196 | pop$ true % return true; 197 | } { % } else { 198 | skip$ % return x; 199 | } if$ % } 200 | } % } 201 | % 202 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 203 | % // calculate the length in characters of a string 204 | % // We need this function since text.length$ is NOT 205 | % // the length in characters. 206 | INTEGERS {length.i} % static int length_i; 207 | FUNCTION {length} { % int Entry::length(String str) { 208 | duplicate$ empty$ { % if (empty(str)) { 209 | pop$ #0 % return 0; 210 | } { % } else { 211 | #1 'length.i := % length_i = 1; 212 | false % int stop = false; 213 | {not} { % while (! stop) { 214 | duplicate$ length.i #1 substring$ % String tmp = substring(str, length_i, 1); 215 | "" = { % if (tmp == "") { 216 | true % stop = true; 217 | } { % } else { 218 | length.i #1 + 'length.i := % length_i = length_i + 1; 219 | false % stop = false; 220 | } if$ % } 221 | } while$ % } 222 | pop$ length.i #1 - % return length_i - 1; 223 | } if$ % } 224 | } % } 225 | % 226 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 227 | % 228 | FUNCTION {is.digit} { % int Entry::is_digit(String ch) { 229 | chr.to.int$ % int ascii = chr_to_int(ch); 230 | duplicate$ "0" chr.to.int$ < { % if (ascii < chr_to_int("0")) { 231 | pop$ false % return false; 232 | } { % } else { 233 | "9" chr.to.int$ > { % if (ascii > chr_to_int("9")) { 234 | false % return false; 235 | } { % } else { 236 | true % return true; 237 | } if$ % } 238 | } if$ % } 239 | } % } 240 | % 241 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 242 | % // test if str is a number 243 | FUNCTION {is.number} { % int Entry::is_number(String str) { 244 | duplicate$ empty$ not swap$ % int result = (! empty(str)); 245 | { duplicate$ empty$ not} { % while (! empty(str)) { 246 | duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(str, 1, 1))) { 247 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 248 | } { % } else { 249 | pop$ pop$ false % result = false; 250 | "" % str = ""; 251 | } if$ % } 252 | } while$ % } 253 | pop$ % return result; 254 | } % } 255 | % 256 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 257 | % // extract the number prefix of str 258 | FUNCTION {extract.number} { % String Entry::extract_number(String str) { 259 | duplicate$ % String suffix = str; 260 | duplicate$ length swap$ % int n = length(str); 261 | duplicate$ empty$ % int stop = empty(suffix); 262 | { not } { % while (! stop) { 263 | duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(suffix, 1, 1))) { 264 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 265 | duplicate$ empty$ % stop = empty(suffix); 266 | } { % } else { 267 | true % stop = true; 268 | } if$ % } 269 | } while$ % } 270 | length - % int n = n - length(suffix); 271 | #1 swap$ substring$ % return substring(str, 1, n); 272 | } % } 273 | % 274 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 275 | % 276 | FUNCTION {get.last.chr} { % String Entry::get_last_chr(String str) { 277 | duplicate$ length % int n = length(str); 278 | duplicate$ #0 = { % if (n == 0) { 279 | pop$ % return str; 280 | } { % } else { 281 | #1 substring$ % return substring(str, n, 1); 282 | } if$ % } 283 | } % } 284 | % 285 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 286 | % 287 | FUNCTION {get.ordinal.suffix.en} { % String Entry::get_ordinal_suffix_en(String ch) { 288 | duplicate$ "1" = { % if (num == "1") { 289 | pop$ cap.st.en % return cap_st_en; 290 | } { % } else { 291 | duplicate$ "2" = { % if (num == "2") { 292 | pop$ cap.nd.en % return cap_nd_en; 293 | } { % } else { 294 | duplicate$ "3" = { % if (num == "3") { 295 | pop$ cap.rd.en % return cap_rd_en; 296 | } { % } else { 297 | pop$ cap.th.en % return cap_th_en; 298 | } if$ % } 299 | } if$ % } 300 | } if$ % } 301 | } % } 302 | % 303 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 304 | % 305 | FUNCTION {num.to.ordinal.en} { % String Entry::num_to_ordinal_en(String num) { 306 | duplicate$ empty$ { % if (empty(num)) { 307 | skip$ % return num; 308 | } { % } else { 309 | duplicate$ get.last.chr % String ch = get_last_chr(num); 310 | get.ordinal.suffix.en % String str = get_ordinal_suffix_en(ch); 311 | * % reutrn num + str; 312 | } if$ % } 313 | } % } 314 | % 315 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 316 | % 317 | STRINGS {remove.dots.result} % static String remove_dots_result; 318 | % 319 | FUNCTION {remove.dots} { % String Entry::remove_dots(String str) { 320 | "" 'remove.dots.result := % remove_dots_result = ""; 321 | { duplicate$ empty$ not } { % while (! empty(str)) { 322 | duplicate$ #1 #2 substring$ % String tmp = substring(str, 1, 2); 323 | "\." = { % if (tmp == "\.") { 324 | #3 global.max$ substring$ % str = substring(str, 3, global_max); 325 | } { % } else { 326 | duplicate$ #1 #1 substring$ % tmp = substring(str, 1, 1); 327 | duplicate$ "." = { % if (tmp == ".") { 328 | pop$ #2 global.max$ substring$ % str = substring(str, 2, global_max); 329 | } { % } else { 330 | remove.dots.result swap$ * % tmp = remove_dots_result + tmp; 331 | 'remove.dots.result := % remove_dots_result = tmp; 332 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 333 | } if$ % } 334 | } if$ % } 335 | } while$ % } 336 | pop$ remove.dots.result % return remove_dots_result; 337 | } % } 338 | % 339 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 340 | % 341 | FUNCTION {add.brace} { % String Entry::add_brace(String str) { 342 | "{" swap$ * "}" * % return "{" + str + "}"; 343 | } % } 344 | % 345 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 346 | % 347 | FUNCTION {add.bracket} { % String Entry::bracket(String str) { 348 | "(" swap$ * ")" * % return "(" + str + ")"; 349 | } % } 350 | % 351 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 352 | % 353 | FUNCTION {add.squarebracket} { % String Entry::add_squarebracket(String str) { 354 | "[" swap$ * "]" * % return "[" + str + "]"; 355 | } % } 356 | % 357 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 358 | % 359 | FUNCTION {add.textit} { % String Entry::add_textit(String str) { 360 | "\textit{" swap$ * "}" * % return "\textit{" + str + "}"; 361 | } % } 362 | % 363 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 364 | % 365 | FUNCTION {add.textbf} { % String Entry::add_textbf(String str) { 366 | "\textbf{" swap$ * "}" * % return "\textbf{" + str + "}"; 367 | } % } 368 | % 369 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 370 | % // test if str contains a dash '-' 371 | FUNCTION {contain.dash} { % int Entry::contain_dash(String str) { 372 | false swap$ % int result = false; 373 | { duplicate$ empty$ not} { % while (! empty(str)) { 374 | duplicate$ #1 #1 substring$ "-" = { % if (substring(str, 1, 1) == "-") { 375 | pop$ pop$ true % result = true; 376 | "" % str = ""; 377 | } { % } else { 378 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 379 | } if$ % } 380 | } while$ % } 381 | pop$ % return result; 382 | } % } 383 | % 384 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 385 | % // extract the substring before the first '-' 386 | % // returns the string itself if no '-' 387 | FUNCTION {extract.before.first.dash} { % String Entry::extract_before_first_dash(String str) { 388 | duplicate$ % String suffix = str; 389 | duplicate$ length swap$ % int n = length(str); 390 | duplicate$ empty$ % int stop = empty(suffix); 391 | { not } { % while (! stop) { 392 | duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { 393 | true % stop = true; 394 | } { % } else {4r 395 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 396 | duplicate$ empty$ % stop = empty(suffix); 397 | } if$ % } 398 | } while$ % } 399 | length - % int n = n - length(suffix); 400 | #1 swap$ substring$ % return substring(str, 1, n); 401 | } % } 402 | % 403 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 404 | % // extract the substring after the first '-' 405 | % // returns the string itself if no '-' 406 | FUNCTION {extract.after.first.dash} { % String Entry::extract_after_first_dash(String str) { 407 | duplicate$ % String suffix = str; 408 | duplicate$ empty$ % int stop = empty(suffix); 409 | { not } { % while (! stop) { 410 | duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { 411 | true % stop = true; 412 | } { % } else {4r 413 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 414 | duplicate$ empty$ % stop = empty(suffix); 415 | } if$ % } 416 | } while$ % } 417 | duplicate$ empty$ { % if (empty(suffix)) { 418 | pop$ % return str; 419 | } { % } else { 420 | swap$ pop$ #2 global.max$ substring$ % return substring(suffix, 2, global_max); 421 | } if$ % } 422 | } % } 423 | % 424 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 425 | % // extract the substring after the last '-' 426 | % // returns the empty string if no '-' 427 | FUNCTION {extract.after.last.dash} { % String Entry::extract_after_last_dash(String str) { 428 | duplicate$ contain.dash not { % if (! contain_dash(str)) { 429 | pop$ "" % return ""; 430 | } { % } else { 431 | {duplicate$ contain.dash} { % while (contain_dash(str)) { 432 | extract.after.first.dash % str = extract_after_first_dash(str); 433 | } while$ % } 434 | % return str; 435 | } if$ % } 436 | } % } 437 | % 438 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 439 | % 440 | FUNCTION {trim.start} { % String Entry::trim_start(String str) { 441 | {duplicate$ #1 #1 substring$ " " =} { % while (substring(str, 1, 1) == " ") { 442 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 443 | } while$ % } 444 | % return str; 445 | } % } 446 | % 447 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 448 | % 449 | FUNCTION {trim.end} { % String Entry::trim_end(String str) { 450 | {duplicate$ get.last.chr " " =} { % while (get_last_chr(str) == " ") { 451 | duplicate$ length #1 - % int n = length(str) - 1; 452 | #1 swap$ substring$ % str = substring(str, 1, n); 453 | } while$ % } 454 | % return str; 455 | } % } 456 | % 457 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 458 | % 459 | FUNCTION {trim} { % String Entry::trim(String str) { 460 | trim.start % str = trim_start(str); 461 | trim.end % return trim_end(str); 462 | } % } 463 | % 464 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 465 | % 466 | FUNCTION {start.bibitem} { % void Entry::start_bibitem() { 467 | newline$ % writeln(); 468 | "\bibitem{" cite$ * "}" * write$ % write("\bibitem{" + this.cite + "}"); 469 | newline$ % writeln(); 470 | } % } 471 | % 472 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 473 | % 474 | FUNCTION {end.bibitem} { % void Entry::end_bibitem() { 475 | cap.period write$ % write(cap_period); 476 | newline$ % writeln(); 477 | } % } 478 | % 479 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 480 | % 481 | FUNCTION {is.in.chinese} { % int Entry::is_in_chinese() { 482 | language empty$ { % if (empty(this.language)) { 483 | false % return false; 484 | } { % } else { 485 | language "zh" = { % if (this.language == "zh") { 486 | true % return true; 487 | } { % } else { 488 | false % return false; 489 | } if$ % } 490 | } if$ % } 491 | } % } 492 | % 493 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 494 | % 495 | FUNCTION {is.online} { % int Entry::is_online() { 496 | url empty$ not { % if (! empty(this.url)) { 497 | true % return true; 498 | } { % } else { 499 | doi empty$ not { % if (! empty(this.doi)) { 500 | true % return true; 501 | } { % } else { 502 | false % return false; 503 | } if$ % } 504 | } if$ % } 505 | } % } 506 | % 507 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 508 | % 509 | FUNCTION {set.mark} { % void Entry::set_mark(String mark) { 510 | 'mark := % this.mark = mark; 511 | is.online { % if (is_online()) { 512 | mark "/OL" * 'mark := % this.mark = this.mark + "/OL"; 513 | } { % } else { 514 | media empty$ not { % if (! empty(this.media)) { 515 | mark "/" * media * 'mark := % this.mark = this.mark + "/" + this.media; 516 | } 'skip$ if$ % } 517 | } if$ % } 518 | } % } 519 | % 520 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 521 | % 522 | FUNCTION {cap.volume} { % String Entry::cap_volume() { 523 | is.in.chinese { % if (is_in_chinese()) { 524 | cap.volume.zh % return cap_volume_zh; 525 | } { % } else { 526 | cap.volume.en % return cap_volume_en; 527 | } if$ % } 528 | } % } 529 | % 530 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 531 | % 532 | FUNCTION {cap.edition} { % String Entry::cap_edition() { 533 | is.in.chinese { % if (is_in_chinese()) { 534 | cap.edition.zh % return cap_edition_zh; 535 | } { % } else { 536 | cap.edition.en % return cap_edition_en; 537 | } if$ % } 538 | } % } 539 | % 540 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 541 | % 542 | FUNCTION {cap.anonymous} { % String Entry::cap_anonymous() { 543 | is.in.chinese { % if (is_in_chinese()) { 544 | cap.anonymous.zh % return cap_anonymous_zh; 545 | } { % } else { 546 | cap.anonymous.en % return cap_anonymous_en; 547 | } if$ % } 548 | } % } 549 | % 550 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 551 | % 552 | FUNCTION {cap.no.address} { % String Entry::cap_no_address() { 553 | is.in.chinese { % if (is_in_chinese()) { 554 | cap.no.address.zh % return cap_no_address_zh; 555 | } { % } else { 556 | cap.no.address.en % return cap_no_address_en; 557 | } if$ % } 558 | } % } 559 | % 560 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 561 | % 562 | FUNCTION {cap.no.publisher} { % String Entry::cap_no_publisher() { 563 | is.in.chinese { % if (is_in_chinese()) { 564 | cap.no.publisher.zh % return cap_no_publisher_zh; 565 | } { % } else { 566 | cap.no.publisher.en % return cap_no_publisher_en; 567 | } if$ % } 568 | } % } 569 | % 570 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 571 | % 572 | FUNCTION {cap.et.al} { % String Entry::cap_et_al() { 573 | is.in.chinese { % if (is_in_chinese()) { 574 | cap.et.al.zh % return cap_et_al_zh; 575 | } { % } else { 576 | cap.et.al.en % return cap_et_al_en; 577 | } if$ % } 578 | } % } 579 | % 580 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 581 | % 582 | FUNCTION {cap.translate} { % String Entry::cap_translate() { 583 | is.in.chinese { % if (is_in_chinese()) { 584 | cap.translate.zh % return cap_translate_zh; 585 | } { % } else { 586 | cap.translate.en % return cap_translate_en; 587 | } if$ % } 588 | } % } 589 | % 590 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 591 | % 592 | FUNCTION {format.bibinfo} { % String Entry::format_bibinfo(String info, String type) { 593 | swap$ add.brace swap$ % info = add_brace(info); 594 | "\bib" swap$ * swap$ * % return "\bib" + type + info; 595 | } % } 596 | % 597 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 598 | INTEGERS { nameindex namecount } % static int nameindex, namecount; 599 | STRINGS { namelist nameformat } % static String namelist, nameformat; 600 | STRINGS { firstname lastname jrname vonname} % static String firstname, lastname, jrname, vonname; 601 | % 602 | FUNCTION {format.names} { % String Entry::format_names(String names) { 603 | 'namelist := % namelist = names; 604 | namelist num.names$ 'namecount := % namecount = num_names(namelist); 605 | "" % String result = ""; 606 | #0 'nameindex := % nameindex = 0; 607 | {nameindex namecount < nameindex #3 < and} { % while ((nameindex < namecount) && (nameindex < 3)) { 608 | nameindex #1 + 'nameindex := % nameindex = nameindex + 1; 609 | nameindex #1 > { % if (nameindex > 1) { 610 | cap.comma * % result = result + cap_comma; 611 | } 'skip$ if$ % } 612 | namelist nameindex "{vv}" format.name$ % String tmp = format_name(namelist, nameindex, "{vv}"); 613 | 'vonname := % vonname = tmp; 614 | namelist nameindex "{jj}" format.name$ % tmp = format_name(namelist, nameindex, "{jj}"); 615 | remove.dots 'jrname := % jrname = remove_dots(tmp); 616 | namelist nameindex "{f}" format.name$ % tmp = format_name(namelist, nameindex, "{f}"); 617 | remove.dots % tmp = remove_dots(tmp); 618 | 'firstname := % firstname = change_case(tmp, "u"); 619 | namelist nameindex "{ll}" format.name$ % tmp = format_name(namelist, nameindex, "{ll}"); 620 | 'lastname := % lastname = change_case(tmp, "u"); 621 | jrname empty$ not { % if (! empty(jrname)) { 622 | jrname * " " * % result = result + jrname + " " 623 | } 'skip$ if$ % } 624 | vonname empty$ not { % if (! empty(vonname)) { 625 | vonname * " " * % result = result + vonname + " " 626 | } 'skip$ if$ % } 627 | lastname empty$ not { % if (! empty(lastname)) { 628 | lastname * " " * % result = result + lastname + " " 629 | } 'skip$ if$ % } 630 | firstname empty$ not { % if (! empty(firstname)) { 631 | firstname * " " * % result = result + firstname + " " 632 | } 'skip$ if$ % } 633 | trim.end % result = trim_end(result); 634 | } while$ % } 635 | nameindex namecount < { % if (nameindex < namecount) { 636 | cap.et.al * % result = result + cap_et_al(); 637 | } 'skip$ if$ % } 638 | } % } 639 | % 640 | % 641 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 642 | % // format English names 643 | FUNCTION {format.names.en} { % String Entry::format_names_en(String names) { 644 | format.names % format_names(names); 645 | } % } 646 | % 647 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 648 | % // format Chinese names 649 | FUNCTION {format.names.zh} { % String Entry::format_names_zh(String names) { 650 | format.names % format_names(names); 651 | } % } 652 | % 653 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 654 | % 655 | FUNCTION {format.author} { % String Emtry::format_author(String authors) { 656 | is.in.chinese { % if (is_in_chinese) { 657 | format.names.zh % authors = format_names_zh(authors); 658 | } { % } else { 659 | format.names.en % authors = format_names_en(authors); 660 | } if$ % } 661 | "author" format.bibinfo % return format_bibinfo(authors, "author"); 662 | } % } 663 | % 664 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 665 | % 666 | FUNCTION {format.editor} { % String Emtry::format_author(String editors) { 667 | is.in.chinese { % if (is_in_chinese) { 668 | format.names.zh % editors = format_names_zh(editors); 669 | } { % } else { 670 | format.names.en % editors = format_names_en(editors); 671 | } if$ % } 672 | "editor" format.bibinfo % return format_bibinfo(editors, "editor"); 673 | } % } 674 | % 675 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 676 | % 677 | FUNCTION {format.translator} { % String Emtry::format_translator(String translators) { 678 | is.in.chinese { % if (is_in_chinese) { 679 | duplicate$ % String names = translators; 680 | format.names.zh % translators = format_names_zh(translators); 681 | swap$ num.names$ #3 > { % if (num_names(names) > 3) { 682 | cap.translate.zh * % translators = translators + cap_translate_zh; 683 | } { % } else { 684 | cap.comma * cap.translate.zh * % translators = translators + cap_comma + cap_translate_zh; 685 | } if$ % } 686 | } { % } else { 687 | duplicate$ % String names = translators; 688 | format.names.en % translators = format_names_en(translators); 689 | swap$ num.names$ #3 > { % if (num_names(names) > 3) { 690 | cap.translate.en * % translators = translators + cap_translate_en; 691 | } { % } else { 692 | cap.comma * cap.translate.en * % translators = translators + cap_comma + cap_translate_en; 693 | } if$ % } 694 | } if$ % } 695 | "translator" format.bibinfo % return format_bibinfo(translator, "translator"); 696 | } % } 697 | % 698 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 699 | % 700 | FUNCTION {format.title} { % String Emtry::format_title(String title) { 701 | "title" format.bibinfo % return format_bibinfo(title, "title"); 702 | } % } 703 | % 704 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 705 | % 706 | FUNCTION {format.booktitle} { % String Emtry::format_booktitle(String booktitle) { 707 | "booktitle" format.bibinfo % return format_bibinfo(booktitle, "booktitle"); 708 | } % } 709 | % 710 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 711 | % 712 | FUNCTION {format.mark} { % String Emtry::format_mark(String mark) { 713 | "[" swap$ * "]" * % mark = "[" + mark + "]"; 714 | "mark" format.bibinfo % return format_bibinfo(mark, "mark"); 715 | } % } 716 | % 717 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 718 | % 719 | FUNCTION {format.country} { % String Emtry::format_country(String country) { 720 | "country" format.bibinfo % return format_bibinfo(country, "country"); 721 | } % } 722 | % 723 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 724 | % 725 | FUNCTION {format.patentid} { % String Emtry::format_patentid(String patentid) { 726 | "patentid" format.bibinfo % return format_bibinfo(patentid, "patentid"); 727 | } % } 728 | % 729 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 730 | % 731 | FUNCTION {format.edition} { % String Emtry::format_edition(String edition) { 732 | duplicate$ is.number { % if (is_number(edition)) { 733 | is.in.chinese { % if (is_in_chinese()) { 734 | cap.edition.zh * % edition = edition + cap_edition_zh; 735 | } { % } else { 736 | num.to.ordinal.en cap.edition.en * % edition = num_to_ordinal_en(edition) + cap_edition_en; 737 | } if$ % } 738 | } 'skip$ if$ % } 739 | % // use a \mbox{} to prevent line break within edition 740 | "\mbox{" swap$ * "}" * % edition = "\mbox{" + edition + "}"; 741 | "edition" format.bibinfo % return format_bibinfo(edition, "edition"); 742 | } % } 743 | % 744 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 745 | % 746 | FUNCTION {format.organization} { % String Emtry::format_organization(String organization) { 747 | "organization" format.bibinfo % return format_bibinfo(organization, "organization"); 748 | } % } 749 | % 750 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 751 | % 752 | FUNCTION {format.address} { % String Emtry::format_address(String address) { 753 | "address" format.bibinfo % return format_bibinfo(address, "address"); 754 | } % } 755 | % 756 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 757 | % 758 | FUNCTION {format.publisher} { % String Emtry::format_publisher(String publisher) { 759 | "publisher" format.bibinfo % return format_bibinfo(publisher, "publisher"); 760 | } % } 761 | % 762 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 763 | % 764 | FUNCTION {format.institution} { % String Emtry::format_institution(String institution) { 765 | "institution" format.bibinfo % return format_bibinfo(institution, "institution"); 766 | } % } 767 | % 768 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 769 | % 770 | FUNCTION {format.school} { % String Emtry::format_school(String school) { 771 | "school" format.bibinfo % return format_bibinfo(school, "school"); 772 | } % } 773 | % 774 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 775 | % 776 | FUNCTION {format.year} { % String Emtry::format_year(String year) { 777 | "year" format.bibinfo % return format_bibinfo(year, "year"); 778 | } % } 779 | % 780 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 781 | % 782 | FUNCTION {format.date} { % String Emtry::format_date(String date) { 783 | "date" format.bibinfo % return format_bibinfo(date, "date"); 784 | } % } 785 | % 786 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 787 | % 788 | FUNCTION {format.journal} { % String Emtry::format_journal(String journal) { 789 | "journal" format.bibinfo % return format_bibinfo(journal, "journal"); 790 | } % } 791 | % 792 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 793 | % 794 | FUNCTION {format.volume} { % String Emtry::format_volume(String volume) { 795 | "volume" format.bibinfo % return format_bibinfo(volume, "volume"); 796 | } % } 797 | % 798 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 799 | % 800 | FUNCTION {format.number} { % String Emtry::format_number(String number) { 801 | add.bracket % number = add_bracket(number); 802 | "number" format.bibinfo % return format_bibinfo(number, "number"); 803 | } % } 804 | % 805 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 806 | % 807 | FUNCTION {format.report.number} { % String Emtry::format_report_number(String number) { 808 | "number" format.bibinfo % return format_bibinfo(number, "number"); 809 | } % } 810 | % 811 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 812 | % 813 | FUNCTION {format.version} { % String Emtry::format_version(String version) { 814 | "version" format.bibinfo % return format_bibinfo(version, "version"); 815 | } % } 816 | % 817 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 818 | % 819 | FUNCTION {format.pages} { % String Emtry::format_pages(String pages) { 820 | "pages" format.bibinfo % return format_bibinfo(pages, "pages"); 821 | } % } 822 | % 823 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 824 | % 825 | FUNCTION {format.modifydate} { % String Emtry::format_modifydate(String modifydate) { 826 | add.bracket % modifydate = add_bracket(modifydate); 827 | "modifydate" format.bibinfo % return format_bibinfo(modifydate, "modifydate"); 828 | } % } 829 | % 830 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 831 | % 832 | FUNCTION {format.citedate} { % String Emtry::format_citedate(String citedate) { 833 | add.squarebracket % citedate = add_squarebracket(citedate); 834 | "citedate" format.bibinfo % return format_bibinfo(citedate, "citedate"); 835 | } % } 836 | % 837 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 838 | % 839 | % // NOTE: do not use the format_bibinfo() for URL, 840 | % // since if the URL contains special symbols such 841 | % // as '%', the \biburl{} will be broken. 842 | FUNCTION {format.url} { % String Emtry::format_url(String url) { 843 | "\url{" swap$ * "}" * % return "\url{" + url + "}"; 844 | } % } 845 | % 846 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 847 | % 848 | FUNCTION {get.full.title} { % String Entry::get_full_title() { 849 | series empty$ { % if (empty(this.series)) { 850 | volume empty$ { % if (empty(this.volume)) { 851 | title % return this.title; 852 | } { % } else { 853 | title cap.colon * cap.volume * volume * % return this.title + cap_colon + cap_volume() + this.volume; 854 | } if$ % } 855 | } { % } else { 856 | volume empty$ { % if (empty(this.volume)) { 857 | series cap.colon * title * % return this.series + cap_colon + this.title; 858 | } { % } else { 859 | series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; 860 | cap.colon * title * % return str + cap_colon + this.title; 861 | } if$ % } 862 | } if$ % } 863 | } % } 864 | % 865 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 866 | % 867 | FUNCTION {get.full.booktitle} { % String Entry::get_full_booktitle() { 868 | series empty$ { % if (empty(this.series)) { 869 | volume empty$ { % if (empty(this.volume)) { 870 | booktitle % return this.booktitle; 871 | } { % } else { 872 | booktitle cap.colon * cap.volume * volume * % return this.booktitle + cap_colon + cap_volume() + this.volume; 873 | } if$ % } 874 | } { % } else { 875 | volume empty$ { % if (empty(this.volume)) { 876 | series cap.colon * booktitle * % return this.series + cap_colon + this.booktitle; 877 | } { % } else { 878 | series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; 879 | cap.colon * booktitle * % return str + cap_colon + this.booktitle; 880 | } if$ % } 881 | } if$ % } 882 | } % } 883 | % 884 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 885 | % 886 | FUNCTION {get.pages} { % String Entry::get_pages() { 887 | pages contain.dash { % if (contain_dash(this.pages)) { 888 | pages extract.before.first.dash % String p1 = extract_before_first_dash(this.pages); 889 | pages extract.after.last.dash % String p2 = extract_after_last_dash(this.pages); 890 | cap.dash swap$ * * % return p1 + cap_dash + p2; 891 | } { % } else { 892 | pages % return this.pages; 893 | } if$ % } 894 | } % } 895 | % 896 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 897 | % 898 | FUNCTION {output.author.or.editor} { % void Entry::output_author_or_editor(int required) { 899 | 'required := % this.required = required; 900 | author empty$ not { % if (! empty(this.author)) { 901 | author format.author write$ % write(format_author(this.author)); 902 | cap.period write$ % write(cap_period); 903 | } { % } else { 904 | editor empty$ not { % if (! empty(this.editor)) { 905 | editor format.editor write$ % write(format_editor(this.editor)); 906 | cap.period write$ % write(cap_period); 907 | } { % } else { 908 | required { % if (required == 1) { 909 | "Require author/editor: " cite$ * warning$% warning("Require author/editor: " + this.cite); 910 | cap.anonymous format.author write$ % write(format_author(cap_anonymous())); 911 | cap.period write$ % write(cap_period); 912 | } 'skip$ if$ % } 913 | } if$ % } 914 | } if$ % } 915 | } % } 916 | % 917 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 918 | % 919 | FUNCTION {output.author} { % void Entry::output_author(int required) { 920 | 'required := % this.required = required; 921 | author empty$ not { % if (! empty(this.author)) { 922 | author format.author write$ % write(format_author(this.author)); 923 | cap.period write$ % write(cap_period); 924 | } { % } else { 925 | required { % if (required == 1) { 926 | "Require author: " cite$ * warning$ % warning("Require author: " + this.cite); 927 | cap.anonymous format.author write$ % write(format_author(cap_anonymous())); 928 | cap.period write$ % write(cap_period); 929 | } 'skip$ if$ % } 930 | } if$ % } 931 | } % } 932 | % 933 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 934 | % 935 | FUNCTION {output.editor} { % void Entry::output_editor(int required) { 936 | 'required := % this.required = required; 937 | editor empty$ not { % if (! empty(this.editor)) { 938 | editor format.editor write$ % write(format_editor(this.editor)); 939 | cap.period write$ % write(cap_period); 940 | } { % } else { 941 | required { % if (required == 1) { 942 | "Require editor: " cite$ * warning$ % warning("Require editor: " + this.cite); 943 | cap.anonymous format.editor write$ % write(format_editor(cap_anonymous())); 944 | cap.period write$ % write(cap_period); 945 | } 'skip$ if$ % } 946 | } if$ % } 947 | } % } 948 | % 949 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 950 | % 951 | FUNCTION {output.title} { % void Entry::output_title(int required) { 952 | 'required := % this.required = required; 953 | title empty$ not { % if (! empty(this.title)) { 954 | title format.title write$ % write(format_title(this.title)); 955 | } { % } else { 956 | required { % if (required == 1) { 957 | "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); 958 | } 'skip$ if$ % } 959 | } if$ % } 960 | } % } 961 | % 962 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 963 | % 964 | FUNCTION {output.series.volume.title} { % void Entry::output_series_volume_title(int required) { 965 | 'required := % this.required = required; 966 | title empty$ not { % if (! empty(this.title)) { 967 | get.full.title format.booktitle write$ % write(format_booktitle(get_full_title())); 968 | } { % } else { 969 | required { % if (required == 1) { 970 | "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); 971 | } 'skip$ if$ % } 972 | } if$ % } 973 | } % } 974 | % 975 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 976 | % 977 | FUNCTION {output.series.volume.booktitle} { % void Entry::output_series_volume_booktitle(int required) { 978 | 'required := % this.required = required; 979 | booktitle empty$ not { % if (! empty(this.booktitle)) { 980 | get.full.booktitle format.booktitle write$ % write(format_booktitle(get_full_booktitle()); 981 | } { % } else { 982 | required { % if (required == 1) { 983 | "Require booktitle: " cite$ * warning$ % warning("Require booktitle: " + this.cite); 984 | } 'skip$ if$ % } 985 | } if$ % } 986 | } % } 987 | % 988 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 989 | % 990 | FUNCTION {output.journal} { % void Entry::output_journal(int required) { 991 | 'required := % this.required = required; 992 | journal empty$ not { % if (! empty(this.journal)) { 993 | cap.period write$ % write(cap_period); 994 | journal format.journal write$ % write(format_journal(this.journal)); 995 | } { % } else { 996 | required { % if (required == 1) { 997 | "Require journal: " cite$ * warning$ % warning("Require journal: " + this.cite); 998 | } 'skip$ if$ % } 999 | } if$ % } 1000 | } % } 1001 | % 1002 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1003 | % 1004 | FUNCTION {output.mark} { % void Entry::output_mark(int required) { 1005 | 'required := % this.required = required; 1006 | mark empty$ not { % if (! empty(this.mark)) { 1007 | mark format.mark write$ % write(format_mark(this.mark)); 1008 | } { % } else { 1009 | required { % if (required == 1) { 1010 | "Require mark: " cite$ * warning$ % warning("Require mark: " + this.cite); 1011 | } 'skip$ if$ % } 1012 | } if$ % } 1013 | } % } 1014 | % 1015 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1016 | % 1017 | FUNCTION {output.translator} { % void Entry::output_translator(int required) { 1018 | 'required := % this.required = required; 1019 | translator empty$ not { % if (! empty(this.translator)) { 1020 | cap.period write$ % write(cap_period); 1021 | translator format.translator write$ % write(format_translator(this.translator)); 1022 | } { % } else { 1023 | required { % if (required == 1) { 1024 | "Require translator: " cite$ * warning$ % warning("Require translator: " + this.cite); 1025 | } 'skip$ if$ % } 1026 | } if$ % } 1027 | } % } 1028 | % 1029 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1030 | % 1031 | FUNCTION {output.edition} { % void Entry::output_edition(int required) { 1032 | 'required := % this.required = required; 1033 | edition empty$ not { % if (! empty(this.edition)) { 1034 | cap.period write$ % write(cap_period); 1035 | edition format.edition write$ % write(format_edition(this.edition)); 1036 | } { % } else { 1037 | required { % if (required == 1) { 1038 | "Require edition: " cite$ * warning$ % warning("Require edition: " + this.cite); 1039 | } 'skip$ if$ % } 1040 | } if$ % } 1041 | } % } 1042 | % 1043 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1044 | % 1045 | FUNCTION {output.address} { % void Entry::output_address(int required) { 1046 | 'required := % this.required = required; 1047 | address empty$ not { % if (! empty(this.address)) { 1048 | cap.period write$ % write(cap_period); 1049 | address format.address write$ % write(format_address(this.address)); 1050 | } { % } else { 1051 | required { % if (required == 1) { 1052 | "Require address: " cite$ * warning$ % warning("Require address: " + this.cite); 1053 | cap.period write$ % write(cap_period); 1054 | cap.no.address format.address write$ % write(format_address(cap_no_address())); 1055 | } 'skip$ if$ % } 1056 | } if$ % } 1057 | } % } 1058 | % 1059 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1060 | % 1061 | FUNCTION {output.publisher} { % void Entry::output_publisher(int required) { 1062 | 'required := % this.required = required; 1063 | publisher empty$ not { % if (! empty(this.publisher)) { 1064 | cap.colon write$ % write(cap_colon); 1065 | publisher format.publisher write$ % write(format_publisher(this.publisher)); 1066 | } { % } else { 1067 | required { % if (required == 1) { 1068 | "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1069 | cap.colon write$ % write(cap_colon); 1070 | cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); 1071 | } 'skip$ if$ % } 1072 | } if$ % } 1073 | } % } 1074 | % 1075 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1076 | % 1077 | FUNCTION {output.publisher.no.address} { % void Entry::output_publisher_no_address(int required) { 1078 | 'required := % this.required = required; 1079 | publisher empty$ not { % if (! empty(this.publisher)) { 1080 | cap.period write$ % write(cap_period); 1081 | publisher format.publisher write$ % write(format_publisher(this.publisher)); 1082 | } { % } else { 1083 | required { % if (required == 1) { 1084 | "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1085 | cap.period write$ % write(cap_period); 1086 | cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); 1087 | } 'skip$ if$ % } 1088 | } if$ % } 1089 | } % } 1090 | % 1091 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1092 | % 1093 | FUNCTION {output.school} { % void Entry::output_school(int required) { 1094 | 'required := % this.required = required; 1095 | school empty$ not { % if (! empty(this.school)) { 1096 | cap.colon write$ % write(cap_colon); 1097 | school format.school write$ % write(format_school(this.school)); 1098 | } { % } else { 1099 | required { % if (required == 1) { 1100 | "Require school: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1101 | cap.colon write$ % write(cap_colon); 1102 | cap.no.publisher format.school write$ % write(format_school(cap_no_publisher())); 1103 | } 'skip$ if$ % } 1104 | } if$ % } 1105 | } % } 1106 | % 1107 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1108 | % 1109 | FUNCTION {output.institution} { % void Entry::output_institution(int required) { 1110 | 'required := % this.required = required; 1111 | institution empty$ not { % if (! empty(this.institution)) { 1112 | cap.colon write$ % write(cap_colon); 1113 | institution format.institution write$ % write(format_publisher(this.institution)); 1114 | } { % } else { 1115 | required { % if (required == 1) { 1116 | "Require institution: " cite$ * warning$ % warning("Require institution: " + this.cite); 1117 | cap.colon write$ % write(cap_colon); 1118 | cap.no.publisher format.institution write$ % write(format_institution(cap_no_publisher())); 1119 | } 'skip$ if$ % } 1120 | } if$ % } 1121 | } % } 1122 | % 1123 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1124 | % 1125 | FUNCTION {output.year} { % void Entry::output_year(int required) { 1126 | 'required := % this.required = required; 1127 | year empty$ not { % if (! empty(this.year)) { 1128 | year format.year write$ % write(format_year(this.year)); 1129 | } { % } else { 1130 | required { % if (required == 1) { 1131 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1132 | } 'skip$ if$ % } 1133 | } if$ % } 1134 | } % } 1135 | % 1136 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1137 | % 1138 | FUNCTION {output.pages} { % void Entry::output_pages(int required) { 1139 | 'required := % this.required = required; 1140 | pages empty$ not { % if (! empty(this.pages)) { 1141 | cap.colon write$ % write(cap_colon); 1142 | get.pages format.pages write$ % write(format_pages(get_pages())); 1143 | } { % } else { 1144 | required { % if (required == 1) { 1145 | "Require pages: " cite$ * warning$ % warning("Require pages: " + this.cite); 1146 | } 'skip$ if$ % } 1147 | } if$ % } 1148 | } % } 1149 | % 1150 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1151 | % 1152 | FUNCTION {output.modifydate} { % void Entry::output_modifydate(int required) { 1153 | 'required := % this.required = required; 1154 | modifydate empty$ not { % if (! empty(this.modifydate)) { 1155 | cap.space write$ % write(cap_space); 1156 | modifydate format.modifydate write$ % write(format_modifydate(this.modifydate)); 1157 | } { % } else { 1158 | required { % if (required == 1) { 1159 | "Require modifydate: " cite$ * warning$ % warning("Require modifydate: " + this.cite); 1160 | } 'skip$ if$ % } 1161 | } if$ % } 1162 | } % } 1163 | % 1164 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1165 | % 1166 | FUNCTION {output.citedate} { % void Entry::output_citedate(int required) { 1167 | 'required := % this.required = required; 1168 | citedate empty$ not { % if (! empty(this.citedate)) { 1169 | cap.space write$ % write(cap_space); 1170 | citedate format.citedate write$ % write(format_citedate(this.citedate)); 1171 | } { % } else { 1172 | required is.online or { % if ((required == 1) || (is_online())) { 1173 | "Require citedate: " cite$ * warning$ % warning("Require citedate: " + this.cite); 1174 | } 'skip$ if$ % } 1175 | } if$ % } 1176 | } % } 1177 | % 1178 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1179 | % 1180 | FUNCTION {output.date} { % void Entry::output_date(int required) { 1181 | 'required := % this.required = required; 1182 | date empty$ not { % if (! empty(this.date)) { 1183 | date format.date write$ % write(format_date(this.date)); 1184 | } { % } else { 1185 | required { % if (required == 1) { 1186 | "Require date: " cite$ * warning$ % warning("Require date: " + this.cite); 1187 | } 'skip$ if$ % } 1188 | } if$ % } 1189 | } % } 1190 | % 1191 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1192 | % 1193 | FUNCTION {output.volume} { % void Entry::output_volume(int required) { 1194 | 'required := % this.required = required; 1195 | volume empty$ not { % if (! empty(this.volume)) { 1196 | cap.comma write$ % write(cap_comma); 1197 | volume format.volume write$ % write(format_volume(this.volume)); 1198 | } { % } else { 1199 | required { % if (required == 1) { 1200 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1201 | } 'skip$ if$ % } 1202 | } if$ % } 1203 | } % } 1204 | % 1205 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1206 | % 1207 | FUNCTION {output.number} { % void Entry::output_number(int required) { 1208 | 'required := % this.required = required; 1209 | number empty$ not { % if (! empty(this.number)) { 1210 | number format.number write$ % write(format_number(this.number)); 1211 | } { % } else { 1212 | required { % if (required == 1) { 1213 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1214 | } 'skip$ if$ % } 1215 | } if$ % } 1216 | } % } 1217 | % 1218 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1219 | % 1220 | FUNCTION {output.report.number} { % void Entry::output_report_number(int required) { 1221 | 'required := % this.required = required; 1222 | number empty$ not { % if (! empty(this.number)) { 1223 | cap.colon write$ % write(cap_colon); 1224 | number format.report.number write$ % write(format_report_number(this.number)); 1225 | } { % } else { 1226 | required { % if (required == 1) { 1227 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1228 | } 'skip$ if$ % } 1229 | } if$ % } 1230 | } % } 1231 | % 1232 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1233 | % 1234 | FUNCTION {output.country} { % void Entry::output_country(int required) { 1235 | 'required := % this.required = required; 1236 | country empty$ not { % if (! empty(this.country)) { 1237 | cap.colon write$ % write(cap_colon); 1238 | country format.country write$ % write(format_country(this.country)); 1239 | } { % } else { 1240 | required { % if (required == 1) { 1241 | "Require country: " cite$ * warning$ % warning("Require country: " + this.cite); 1242 | } 'skip$ if$ % } 1243 | } if$ % } 1244 | } % } 1245 | % 1246 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1247 | % 1248 | FUNCTION {output.patentid} { % void Entry::output_patentid(int required) { 1249 | 'required := % this.required = required; 1250 | patentid empty$ not { % if (! empty(this.patentid)) { 1251 | cap.comma write$ % write(cap_comma); 1252 | patentid format.patentid write$ % write(format_patentid(this.patentid)); 1253 | } { % } else { 1254 | required { % if (required == 1) { 1255 | "Require patentid: " cite$ * warning$ % warning("Require patentid: " + this.cite); 1256 | } 'skip$ if$ % } 1257 | } if$ % } 1258 | } % } 1259 | % 1260 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1261 | % 1262 | FUNCTION {output.start.year} { % void Entry::output_start_year(int required) { 1263 | 'required := % this.required = required; 1264 | year empty$ not { % if (! empty(this.year)) { 1265 | year extract.before.first.dash % String str = extract_before_first_dash(this.year); 1266 | format.year write$ % write(format_year(str)); 1267 | } { % } else { 1268 | required { % if (required == 1) { 1269 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1270 | } 'skip$ if$ % } 1271 | } if$ % } 1272 | } % } 1273 | % 1274 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1275 | % 1276 | FUNCTION {output.start.volume} { % void Entry::output_start_volume(int required) { 1277 | 'required := % this.required = required; 1278 | volume empty$ not { % if (! empty(this.volume)) { 1279 | cap.comma write$ % write(cap_comma); 1280 | volume extract.before.first.dash % String str = extract_before_first_dash(this.volume); 1281 | format.volume write$ % write(format_volume(str)); 1282 | } { % } else { 1283 | required { % if (required == 1) { 1284 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1285 | } 'skip$ if$ % } 1286 | } if$ % } 1287 | } % } 1288 | % 1289 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1290 | % 1291 | FUNCTION {output.start.number} { % void Entry::output_start_number(int required) { 1292 | 'required := % this.required = required; 1293 | number empty$ not { % if (! empty(this.number)) { 1294 | number extract.before.first.dash % String str = extract_before_first_dash(this.number); 1295 | format.number write$ % write(format_number(str)); 1296 | } { % } else { 1297 | required { % if (required == 1) { 1298 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1299 | } 'skip$ if$ % } 1300 | } if$ % } 1301 | } % } 1302 | % 1303 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1304 | % 1305 | FUNCTION {output.end.year} { % void Entry::output_end_year(int required) { 1306 | 'required := % this.required = required; 1307 | year empty$ not { % if (! empty(this.year)) { 1308 | year extract.after.last.dash % String str = extract_after_last_dash(this.year); 1309 | format.year write$ % write(format_year(str)); 1310 | } { % } else { 1311 | required { % if (required == 1) { 1312 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1313 | } 'skip$ if$ % } 1314 | } if$ % } 1315 | } % } 1316 | % 1317 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1318 | % 1319 | FUNCTION {output.end.volume} { % void Entry::output_end_volume(int required) { 1320 | 'required := % this.required = required; 1321 | volume empty$ not { % if (! empty(this.volume)) { 1322 | cap.comma write$ % write(cap_comma); 1323 | volume extract.after.last.dash % String str = extract_after_last_dash(this.volume); 1324 | format.volume write$ % write(format_volume(str)); 1325 | } { % } else { 1326 | required { % if (required == 1) { 1327 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1328 | } 'skip$ if$ % } 1329 | } if$ % } 1330 | } % } 1331 | % 1332 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1333 | % 1334 | FUNCTION {output.end.number} { % void Entry::output_end_number(int required) { 1335 | 'required := % this.required = required; 1336 | number empty$ not { % if (! empty(this.number)) { 1337 | number extract.after.last.dash % String str = extract_after_last_dash(this.number); 1338 | format.number write$ % write(format_number(str)); 1339 | } { % } else { 1340 | required { % if (required == 1) { 1341 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1342 | } 'skip$ if$ % } 1343 | } if$ % } 1344 | } % } 1345 | % 1346 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1347 | % 1348 | FUNCTION {output.url.or.doi} { % void Entry::output_url_or_doi(int required) { 1349 | 'required := % this.required = required; 1350 | url empty$ not { % if (! empty(this.url)) { 1351 | cap.period write$ % write(cap_period); 1352 | url format.url write$ % write(format_url(this.url)); 1353 | } { % } else { 1354 | doi empty$ not { % if (! empty(this.doi)) { 1355 | cap.period write$ % write(cap_period); 1356 | cap.doi.url doi * format.url write$ % write(format_url(cap_doi_url + this.doi)); 1357 | } { % } else { 1358 | required { % if (required == 1) { 1359 | "Require URL or DOI: " cite$ * warning$ % warning("Require URL or DOI: " + this.cite); 1360 | } 'skip$ if$ % } 1361 | } if$ % } 1362 | } if$ % } 1363 | } % } 1364 | % 1365 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1366 | % 1367 | FUNCTION {output.url} { % void Entry::output_url(int required) { 1368 | 'required := % this.required = required; 1369 | url empty$ not { % if (! empty(this.url)) { 1370 | cap.period write$ % write(cap_period); 1371 | url format.url write$ % write(format_url(this.url)); 1372 | } { % } else { 1373 | required { % if (required == 1) { 1374 | "Require URL: " cite$ * warning$ % warning("Require URL: " + this.cite); 1375 | } 'skip$ if$ % } 1376 | } if$ % } 1377 | } % } 1378 | % 1379 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1380 | % 1381 | FUNCTION {output.version} { % void Entry::output_version(int required) { 1382 | 'required := % this.required = required; 1383 | version empty$ not { % if (! empty(this.version)) { 1384 | cap.period write$ % write(cap_period); 1385 | version format.version write$ % write(format_version(this.version)); 1386 | } { % } else { 1387 | required { % if (required == 1) { 1388 | "Require version: " cite$ * warning$ % warning("Require version: " + this.cite); 1389 | } 'skip$ if$ % } 1390 | } if$ % } 1391 | } % } 1392 | % 1393 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1394 | % 1395 | FUNCTION {book.impl} { % void Entry::book_impl() { 1396 | start.bibitem % start_bibitem(); 1397 | true output.author.or.editor % output_author_or_editor(true); 1398 | true output.series.volume.title % output_series_volume_title(true); 1399 | true output.mark % output_mark(true); 1400 | false output.translator % output_translator(false); 1401 | false output.edition % output_edition(false); 1402 | publisher empty$ not { % if (! empty(this.publisher)) { 1403 | true output.address % output_address(true); 1404 | true output.publisher % output_publisher(true); 1405 | cap.comma write$ % write(cap_comma); 1406 | } { % } else { 1407 | cap.period write$ % write(cap_period); 1408 | } if$ % } 1409 | true output.year % output_year(true); 1410 | false output.pages % output_pages(false); 1411 | false output.citedate % output_citedate(false); 1412 | false output.url.or.doi % output_url_or_doi(false); 1413 | end.bibitem % end_bibitem(); 1414 | } % } 1415 | % 1416 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1417 | % 1418 | FUNCTION {book} { % void Entry::book() { 1419 | "M" set.mark % set_mark("M"); 1420 | book.impl % book_impl(); 1421 | } % } 1422 | % 1423 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1424 | % 1425 | FUNCTION {collection} { % void Entry::collection() { 1426 | "G" set.mark % set_mark("G"); 1427 | book.impl % book_impl(); 1428 | } % } 1429 | % 1430 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1431 | % 1432 | FUNCTION {proceedings} { % void Entry::proceedings() { 1433 | "C" set.mark % set_mark("C"); 1434 | start.bibitem % start_bibitem(); 1435 | true output.editor % output_editor(true); 1436 | true output.series.volume.title % output_series_volume_title(true); 1437 | true output.mark % output_mark(true); 1438 | false output.translator % output_translator(false); 1439 | false output.edition % output_edition(false); 1440 | publisher empty$ not { % if (! empty(this.publisher)) { 1441 | true output.address % output_address(true); 1442 | true output.publisher % output_publisher(true); 1443 | cap.comma write$ % write(cap_comma); 1444 | } { % } else { 1445 | cap.period write$ % write(cap_period); 1446 | } if$ % } 1447 | true output.year % output_year(true); 1448 | false output.pages % output_pages(false); 1449 | false output.citedate % output_citedate(false); 1450 | false output.url.or.doi % output_url_or_doi(false); 1451 | end.bibitem % end_bibitem(); 1452 | } % } 1453 | % 1454 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1455 | % 1456 | FUNCTION {conference} { % void Entry::conference() { 1457 | proceedings % proceedings(); 1458 | } % } 1459 | % 1460 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1461 | % 1462 | FUNCTION {thesis.impl} { % void Entry::thesis_impl() { 1463 | start.bibitem % start_bibitem(); 1464 | true output.author % output_author(true); 1465 | true output.title % output_title(true); 1466 | true output.mark % output_mark(true); 1467 | false output.translator % output_translator(false); 1468 | true output.address % output_address(true); 1469 | true output.school % output_school(true); 1470 | cap.comma write$ % write(cap_comma); 1471 | true output.year % output_year(true); 1472 | false output.pages % output_pages(false); 1473 | false output.citedate % output_citedate(false); 1474 | false output.url.or.doi % output_url_or_doi(false); 1475 | end.bibitem % end_bibitem(); 1476 | } % } 1477 | % 1478 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1479 | % 1480 | FUNCTION {phdthesis} { % void Entry::phdthesis() { 1481 | "D" set.mark % set_mark("D"); 1482 | thesis.impl % thesis_impl(); 1483 | } % } 1484 | % 1485 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1486 | % 1487 | FUNCTION {masterthesis} { % void Entry::masterthesis() { 1488 | "D" set.mark % set_mark("D"); 1489 | thesis.impl % thesis_impl(); 1490 | } % } 1491 | % 1492 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1493 | % 1494 | FUNCTION {mastersthesis} { % void Entry::mastersthesis() { 1495 | "D" set.mark % set_mark("D"); 1496 | thesis.impl % thesis_impl(); 1497 | } % } 1498 | % 1499 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1500 | % 1501 | FUNCTION {bachelorthesis} { % void Entry::bachelorthesis() { 1502 | "D" set.mark % set_mark("D"); 1503 | thesis.impl % thesis_impl(); 1504 | } % } 1505 | % 1506 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1507 | % 1508 | FUNCTION {techreport} { % void Entry::techreport() { 1509 | "R" set.mark % set_mark("R"); 1510 | start.bibitem % start_bibitem(); 1511 | true output.author % output_author(true); 1512 | true output.title % output_title(true); 1513 | false output.report.number % output_report_number(false); 1514 | true output.mark % output_mark(true); 1515 | false output.translator % output_translator(false); 1516 | false output.edition % output_edition(false); 1517 | false output.version % output_version(false); 1518 | institution empty$ not { % if (! empty(this.institution)) { 1519 | true output.address % output_address(true); 1520 | true output.institution % output_institution(true); 1521 | cap.comma write$ % write(cap_comma); 1522 | } { % } else { 1523 | cap.period write$ % write(cap_period); 1524 | } if$ % } 1525 | true output.year % output_year(true); 1526 | false output.pages % output_pages(false); 1527 | false output.citedate % output_citedate(false); 1528 | false output.url.or.doi % output_url_or_doi(false); 1529 | end.bibitem % end_bibitem(); 1530 | } % } 1531 | % 1532 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1533 | % 1534 | FUNCTION {standard} { % void Entry::standard() { 1535 | "S" set.mark % set_mark("S"); 1536 | start.bibitem % start_bibitem(); 1537 | true output.author % output_author(true); 1538 | true output.title % output_title(true); 1539 | true output.mark % output_mark(true); 1540 | false output.translator % output_translator(false); 1541 | false output.edition % output_edition(false); 1542 | publisher empty$ not { % if (! empty(this.publisher)) { 1543 | true output.address % output_address(true); 1544 | true output.publisher % output_publisher(true); 1545 | cap.comma write$ % write(cap_comma); 1546 | } { % } else { 1547 | cap.period write$ % write(cap_period); 1548 | } if$ % } 1549 | true output.year % output_year(true); 1550 | false output.pages % output_pages(false); 1551 | false output.citedate % output_citedate(false); 1552 | false output.url.or.doi % output_url_or_doi(false); 1553 | end.bibitem % end_bibitem(); 1554 | } % } 1555 | % 1556 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1557 | % 1558 | FUNCTION {reference} { % void Entry::reference() { 1559 | "K" set.mark % set_mark("K"); 1560 | start.bibitem % start_bibitem(); 1561 | false output.author.or.editor % output_author_or_editor(false); 1562 | true output.series.volume.title % output_series_volume_title(true); 1563 | true output.mark % output_mark(true); 1564 | false output.translator % output_translator(false); 1565 | false output.edition % output_edition(false); 1566 | publisher empty$ not { % if (! empty(this.publisher)) { 1567 | true output.address % output_address(true); 1568 | true output.publisher % output_publisher(true); 1569 | cap.comma write$ % write(cap_comma); 1570 | } { % } else { 1571 | cap.period write$ % write(cap_period); 1572 | } if$ % } 1573 | true output.year % output_year(true); 1574 | false output.pages % output_pages(false); 1575 | false output.citedate % output_citedate(false); 1576 | false output.url.or.doi % output_url_or_doi(false); 1577 | end.bibitem % end_bibitem(); 1578 | } % } 1579 | % 1580 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1581 | % 1582 | FUNCTION {manual} { % void Entry::manual() { 1583 | reference % reference(); 1584 | } % } 1585 | % 1586 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1587 | % 1588 | FUNCTION {periodical.impl} { % void Entry::periodical_impl() { 1589 | start.bibitem % start_bibitem(); 1590 | false output.editor % output_editor(false); 1591 | true output.title % output_title(true); 1592 | true output.mark % output_mark(true); 1593 | cap.period write$ % write(cap_period); 1594 | true output.start.year % output_start_year(true); 1595 | false output.start.volume % output_start_volume(false); 1596 | false output.start.number % output_start_number(false); 1597 | cap.dash write$ % write(cap_dash); 1598 | year contain.dash { % if (contain_dash(this.year)) { 1599 | true output.end.year % output_end_year(true); 1600 | false output.end.volume % output_end_volume(false); 1601 | false output.end.number % output_end_number(false); 1602 | } 'skip$ if$ % } 1603 | publisher empty$ not { % if (! empty(this.publisher)) { 1604 | true output.address % output_address(true); 1605 | true output.publisher % output_publisher(true); 1606 | cap.comma write$ % write(cap_comma); 1607 | } { % } else { 1608 | cap.period write$ % write(cap_period); 1609 | } if$ % } 1610 | true output.start.year % output_start_year(true); 1611 | cap.dash write$ % write(cap_dash); 1612 | year contain.dash { % if (contain_dash(this.year)) { 1613 | true output.end.year % output_end_year(true); 1614 | } 'skip$ if$ % } 1615 | false output.citedate % output_citedate(false); 1616 | false output.url.or.doi % output_url_or_doi(false); 1617 | end.bibitem % end_bibitem(); 1618 | } % } 1619 | % 1620 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1621 | % 1622 | FUNCTION {periodical} { % void Entry::periodical() { 1623 | "J" set.mark % set_mark("J"); 1624 | periodical.impl % periodical_impl(); 1625 | } % } 1626 | % 1627 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1628 | % 1629 | FUNCTION {newspaper} { % void Entry::newspaper() { 1630 | "N" set.mark % set_mark("N"); 1631 | periodical.impl % periodical_impl(); 1632 | } % } 1633 | % 1634 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1635 | % 1636 | FUNCTION {patent} { % void Entry::patent() { 1637 | "P" set.mark % set_mark("P"); 1638 | start.bibitem % start_bibitem(); 1639 | true output.author % output_author(true); 1640 | true output.title % output_title(true); 1641 | true output.country % output_country(true); 1642 | true output.patentid % output_patentid(true); 1643 | true output.mark % output_mark(true); 1644 | cap.period write$ % write(cap_period); 1645 | true output.date % output_date(true); 1646 | false output.citedate % output_citedate(false); 1647 | false output.url.or.doi % output_url_or_doi(false); 1648 | end.bibitem % end_bibitem(); 1649 | } % } 1650 | % 1651 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1652 | % 1653 | FUNCTION {online} { % void Entry::online() { 1654 | "EB" set.mark % set_mark("EB"); 1655 | start.bibitem % start_bibitem(); 1656 | false output.author % output_author(false); 1657 | true output.title % output_title(true); 1658 | true output.mark % output_mark(true); 1659 | publisher empty$ not { % if (! empty(this.publisher)) { 1660 | address empty$ not { % if (! empty(this.address)) { 1661 | true output.address % output_address(true); 1662 | true output.publisher % output_publisher(true); 1663 | cap.comma write$ % write(cap_comma); 1664 | } { % } else { 1665 | true output.publisher.no.address % output_publisher_no_address(true); 1666 | cap.comma write$ % write(cap_comma); 1667 | } if$ % } 1668 | } { % } else { 1669 | cap.period write$ % write(cap_period); 1670 | } if$ % } 1671 | true output.year % output_year(true); 1672 | false output.modifydate % output_modifydate(false); 1673 | true output.citedate % output_citedate(true); 1674 | true output.url % output_url(true); 1675 | end.bibitem % end_bibitem(); 1676 | } % } 1677 | % 1678 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1679 | % 1680 | FUNCTION {webpage} { % void Entry::online() { 1681 | online % online(); 1682 | } % } 1683 | % 1684 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1685 | % 1686 | FUNCTION {program.impl} { % void Entry::program_impl() { 1687 | start.bibitem % start_bibitem(); 1688 | false output.author % output_author(false); 1689 | true output.title % output_title(true); 1690 | true output.mark % output_mark(true); 1691 | publisher empty$ not { % if (! empty(this.publisher)) { 1692 | true output.address % output_address(true); 1693 | true output.publisher % output_publisher(true); 1694 | cap.comma write$ % write(cap_comma); 1695 | } { % } else { 1696 | cap.period write$ % write(cap_period); 1697 | } if$ % } 1698 | true output.year % output_year(true); 1699 | false output.citedate % output_citedate(false); 1700 | false output.url.or.doi % output_url_or_doi(false); 1701 | end.bibitem % end_bibitem(); 1702 | } % } 1703 | % 1704 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1705 | % 1706 | FUNCTION {program} { % void Entry::program() { 1707 | "CP" set.mark % set_mark("CP"); 1708 | program.impl % program_impl(); 1709 | } % } 1710 | % 1711 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1712 | % 1713 | FUNCTION {database} { % void Entry::database() { 1714 | "DB" set.mark % set_mark("DB"); 1715 | program.impl % program_impl(); 1716 | } % } 1717 | % 1718 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1719 | % 1720 | FUNCTION {unpublished} { % void Entry::unpublished() { 1721 | "H" set.mark % set_mark("H"); 1722 | start.bibitem % start_bibitem(); 1723 | true output.author % output_author(true); 1724 | true output.title % output_title(true); 1725 | true output.mark % output_mark(true); 1726 | cap.period write$ % write(cap_period); 1727 | true output.year % output_year(true); 1728 | false output.citedate % output_citedate(false); 1729 | false output.url.or.doi % output_url_or_doi(false); 1730 | end.bibitem % end_bibitem(); 1731 | } % } 1732 | % 1733 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1734 | % 1735 | FUNCTION {manuscript} { % void Entry::manuscript() { 1736 | unpublished % unpublished(); 1737 | } % } 1738 | % 1739 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1740 | % 1741 | FUNCTION {inbook.impl} { % void Entry::inbook_impl() { 1742 | start.bibitem % start_bibitem(); 1743 | true output.author % output_author(true); 1744 | true output.title % output_title(true); 1745 | true output.mark % output_mark(true); 1746 | false output.translator % output_translator(false); 1747 | cap.double.slash write$ % write(cap_double_slash); 1748 | false output.editor % output_editor(false); 1749 | true output.series.volume.booktitle % output_series_volume_booktitle(true); 1750 | false output.edition % output_edition(false); 1751 | publisher empty$ not { % if (! empty(this.publisher)) { 1752 | true output.address % output_address(true); 1753 | true output.publisher % output_publisher(true); 1754 | cap.comma write$ % write(cap_comma); 1755 | } { % } else { 1756 | cap.period write$ % write(cap_period); 1757 | } if$ % } 1758 | true output.year % output_year(true); 1759 | false output.pages % output_pages(false); 1760 | false output.citedate % output_citedate(false); 1761 | false output.url.or.doi % output_url_or_doi(false); 1762 | end.bibitem % end_bibitem(); 1763 | } % } 1764 | % 1765 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1766 | % 1767 | FUNCTION {inbook} { % void Entry::inbook() { 1768 | "M" set.mark % set_mark("M"); 1769 | inbook.impl % inbook_impl(); 1770 | } % } 1771 | % 1772 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1773 | % 1774 | FUNCTION {incollection} { % void Entry::incollection() { 1775 | "G" set.mark % set_mark("G"); 1776 | inbook.impl % inbook_impl(); 1777 | } % } 1778 | % 1779 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1780 | % 1781 | FUNCTION {inproceedings} { % void Entry::inproceedings() { 1782 | "C" set.mark % set_mark("C"); 1783 | inbook.impl % inbook_impl(); 1784 | } % } 1785 | % 1786 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1787 | % 1788 | FUNCTION {article} { % void Entry::article() { 1789 | "J" set.mark % set_mark("J"); 1790 | start.bibitem % start_bibitem(); 1791 | true output.author % output_author(true); 1792 | true output.title % output_title(true); 1793 | true output.mark % output_mark(true); 1794 | true output.journal % output_journal(true); 1795 | cap.comma write$ % write(cap_comma); 1796 | true output.year % output_year(true); 1797 | false output.volume % output_volume(false); 1798 | false output.number % output_number(false); 1799 | false output.pages % output_pages(false); 1800 | false output.citedate % output_citedate(false); 1801 | false output.url.or.doi % output_url_or_doi(false); 1802 | end.bibitem % end_bibitem(); 1803 | } % } 1804 | % 1805 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1806 | % 1807 | FUNCTION {news} { % void Entry::news() { 1808 | "N" set.mark % set_mark("N"); 1809 | start.bibitem % start_bibitem(); 1810 | true output.author % output_author(true); 1811 | true output.title % output_title(true); 1812 | true output.mark % output_mark(true); 1813 | true output.journal % output_journal(true); 1814 | cap.comma write$ % write(cap_comma); 1815 | true output.date % output_date(true); 1816 | false output.number % output_number(false); 1817 | false output.citedate % output_citedate(false); 1818 | false output.url.or.doi % output_url_or_doi(false); 1819 | end.bibitem % end_bibitem(); 1820 | } % } 1821 | % 1822 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1823 | % 1824 | FUNCTION {default.type} { % void Entry::default_type() { 1825 | "Unsupported entry type for " cite$ * warning$ % warning("Unsupported entry type for " + this.cite); 1826 | } % } 1827 | % 1828 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1829 | % 1830 | FUNCTION {longest.label.pass} { % void longest_label_pass(Entry entry) { 1831 | entry.count #1 + 'entry.count := % entry_count = entry_count + 1; 1832 | entry.count int.to.str$ 'label := % this.label = int_to_str(entry_count); 1833 | label width$ longest.label.width > { % if (width(this.label) > longest_label_width) { 1834 | label 'longest.label := % longest_label = this.label; 1835 | label width$ 'longest.label.width := % longest_label_width = width(this.label); 1836 | } 'skip$ if$ % } 1837 | } % } 1838 | % 1839 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1840 | % 1841 | FUNCTION {write.style.commands} { % void write_style_commands() { 1842 | cmd.bibauthor write$ % write(cmd_bibauthor); 1843 | newline$ % writeln(); 1844 | cmd.bibeditor write$ % write(cmd_bibeditor); 1845 | newline$ % writeln(); 1846 | cmd.bibtranslator write$ % write(cmd_bibtranslator); 1847 | newline$ % writeln(); 1848 | cmd.bibtitle write$ % write(cmd_bibtitle); 1849 | newline$ % writeln(); 1850 | cmd.bibbooktitle write$ % write(cmd_bibbooktitle); 1851 | newline$ % writeln(); 1852 | cmd.bibjournal write$ % write(cmd_bibjournal); 1853 | newline$ % writeln(); 1854 | cmd.bibmark write$ % write(cmd_bibmark); 1855 | newline$ % writeln(); 1856 | cmd.bibcountry write$ % write(cmd_bibcountry); 1857 | newline$ % writeln(); 1858 | cmd.bibpatentid write$ % write(cmd_bibpatentid); 1859 | newline$ % writeln(); 1860 | cmd.bibedition write$ % write(cmd_bibedition); 1861 | newline$ % writeln(); 1862 | cmd.biborganization write$ % write(cmd_biborganization); 1863 | newline$ % writeln(); 1864 | cmd.bibaddress write$ % write(cmd_bibaddress); 1865 | newline$ % writeln(); 1866 | cmd.bibpublisher write$ % write(cmd_bibpublisher); 1867 | newline$ % writeln(); 1868 | cmd.bibinstitution write$ % write(cmd_bibinstitution); 1869 | newline$ % writeln(); 1870 | cmd.bibschool write$ % write(cmd_bibschool); 1871 | newline$ % writeln(); 1872 | cmd.bibvolume write$ % write(cmd_bibvolume); 1873 | newline$ % writeln(); 1874 | cmd.bibnumber write$ % write(cmd_bibnumber); 1875 | newline$ % writeln(); 1876 | cmd.bibversion write$ % write(cmd_bibversion); 1877 | newline$ % writeln(); 1878 | cmd.bibpages write$ % write(cmd_bibpages); 1879 | newline$ % writeln(); 1880 | cmd.bibmodifydate write$ % write(cmd_bibmodifydate); 1881 | newline$ % writeln(); 1882 | cmd.bibcitedate write$ % write(cmd_bibcitedate); 1883 | newline$ % writeln(); 1884 | cmd.bibyear write$ % write(cmd_bibyear); 1885 | newline$ % writeln(); 1886 | cmd.bibdate write$ % write(cmd_bibdate); 1887 | newline$ % writeln(); 1888 | cmd.biburl write$ % write(cmd_biburl); 1889 | newline$ % writeln(); 1890 | } % } 1891 | % 1892 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1893 | % 1894 | FUNCTION {begin.bib} { % void begin_bib() { 1895 | preamble$ empty$ not { % if (! empty(premble)) { 1896 | preamble$ write$ % write(premeable); 1897 | newline$ % writeln(); 1898 | } 'skip$ if$ % } 1899 | env.bibbegin write$ % write(env_bibbegin); 1900 | "{" longest.label * "}" * write$ % write("{" + longest.label + "}"); 1901 | newline$ % writeln(); 1902 | write.style.commands % write_style_commands(); 1903 | } % } 1904 | % 1905 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1906 | % 1907 | FUNCTION {end.bib} { % void end_bib() { 1908 | newline$ % writeln(); 1909 | env.bibend write$ % write(env_bibend); 1910 | newline$ % writeln(); 1911 | } % } 1912 | % 1913 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1914 | % 1915 | FUNCTION {initialize} { % void initialize() { 1916 | #0 'entry.count := % entry_count = 0; 1917 | #0 'longest.label.width := % longest_label_width = 0; 1918 | "" 'longest.label := % longest_label = ""; 1919 | } % } 1920 | % 1921 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1922 | % 1923 | % void main() { 1924 | READ % List entryList = read(".bib"); 1925 | EXECUTE {initialize} % initialize(); 1926 | ITERATE {longest.label.pass} % for (Entry entry : entryList) { 1927 | % longest_label_pass(entry); 1928 | % } 1929 | EXECUTE {begin.bib} % begin_bib(); 1930 | ITERATE {call.type$} % for (Entry entry : entryList) { 1931 | % switch (typeof(entry)) { 1932 | % case "book": 1933 | % entry.book(); 1934 | % break; 1935 | % case "article": 1936 | % entry.article(); 1937 | % break; 1938 | % . 1939 | % . 1940 | % . 1941 | % case "incollection": 1942 | % entry.incollection(); 1943 | % break; 1944 | % case "misc": 1945 | % entry.misc(); 1946 | % break; 1947 | % default: 1948 | % entry.default_type(); 1949 | % } 1950 | % } 1951 | EXECUTE {end.bib} % end_bib(); 1952 | % } 1953 | % 1954 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1955 | -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | # vim: set ft=perl: 2 | @default_files = ('slide.tex'); 3 | 4 | $pdf_mode = 1; 5 | $bibtex_use = 2; 6 | $recorder = 1; 7 | $preview_continuous_mode = 1; 8 | $clean_ext = "synctex.gz acn acr alg aux bbl bcf blg brf fdb_latexmk glg glo gls idx ilg ind lof log lot out run.xml toc pdf thm toe ist idx vrb nav snm"; 9 | $pdflatex = "xelatex -file-line-error --shell-escape -src-specials -synctex=1 -interaction=nonstopmode %O %S %D %R.pdf"; 10 | $pdf_update_method = 0; 11 | -------------------------------------------------------------------------------- /pic/dtmf.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hithesis/HITBeamer/52278e0cdf0118d5b515184b28466e9a30da8ff3/pic/dtmf.pdf -------------------------------------------------------------------------------- /pic/hit2020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hithesis/HITBeamer/52278e0cdf0118d5b515184b28466e9a30da8ff3/pic/hit2020.png -------------------------------------------------------------------------------- /pic/hitcolor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hithesis/HITBeamer/52278e0cdf0118d5b515184b28466e9a30da8ff3/pic/hitcolor.jpg -------------------------------------------------------------------------------- /pic/hitlogo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hithesis/HITBeamer/52278e0cdf0118d5b515184b28466e9a30da8ff3/pic/hitlogo.pdf -------------------------------------------------------------------------------- /ref.bib: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | 3 | @INPROCEEDINGS{cnproceed, 4 | author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝}, 5 | title = {武林高手从入门到精通}, 6 | booktitle = {第~$N$~次华山论剑}, 7 | year = 2006, 8 | address = {西安, 中国}, 9 | month = sep, 10 | language ="zh", 11 | } 12 | 13 | @ARTICLE{cnarticle, 14 | AUTHOR = "贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春", 15 | TITLE = "论刘姥姥食量大如牛之现实意义", 16 | JOURNAL = "红楼梦杂谈", 17 | PAGES = "260--266", 18 | VOLUME = "224", 19 | YEAR = "1800", 20 | language ="zh", 21 | } 22 | 23 | 24 | @inbook{Lin1992, 25 | language ="zh", 26 | AUTHOR = "林来兴", 27 | TITLE = "空间控制技术", 28 | PUBLISHER = "宇航出版社", 29 | YEAR = "1992", 30 | Pages = "25-42", 31 | ADDRESS = "北京", 32 | } 33 | 34 | @book{xin1994, 35 | language ="zh", 36 | title={信息技术与信息服务国际研讨会论文集}, 37 | author={辛希孟 and 中国科学院文献信息中心 and 孟广均 and 信息学}, 38 | year={1994}, 39 | publisher={中国社会科学出版社}, 40 | pages={45-49}, 41 | address={北京}, 42 | typeoflit={C}, 43 | } 44 | 45 | @book{zhao1998, 46 | language ="zh", 47 | title={新时代的工业工程师}, 48 | author={赵耀东}, 49 | year={1998}, 50 | citedate = {1998-09-26}, 51 | address={台北}, 52 | publisher={天下文化出版社}, 53 | url={http://www.ie.nthu.edu.tw/info/ie.newie.htm(Big5)}, 54 | typeoflit={M/OL}, 55 | } 56 | 57 | @phdthesis{Chen1992, 58 | language ="zh", 59 | Author = {谌颖}, 60 | Title = {空间最优交会控制理论与方法研究}, 61 | ADDRESS = "哈尔滨", 62 | School = {哈尔滨工业大学}, 63 | Year = {1992}, 64 | pages= {8-13}, 65 | } 66 | 67 | @article{hithesis2017, 68 | title={Hi!Thesis!,Harbin Institue of Technology}, 69 | author={Yanshuo Chu}, 70 | journal={Github}, 71 | volume={001}, 72 | number={0001}, 73 | pages={000-999}, 74 | year={2017}, 75 | } 76 | -------------------------------------------------------------------------------- /slide.tex: -------------------------------------------------------------------------------- 1 | \documentclass{beamer} 2 | 3 | \author{Syvshc} 4 | \title{HIT Beamer Theme} 5 | \subtitle{毕业设计开题报告} 6 | \institute[信息与计算科学]{哈尔滨工业大学数学学院信息与计算科学} 7 | \date{2020年1月2日} 8 | \usepackage{hit-style} 9 | \usepackage[minted,fira,siyuan]{hit-extra} 10 | 11 | 12 | \begin{document} 13 | 14 | \begin{frame} 15 | \titlepage 16 | \begin{figure}[htpb] 17 | \begin{center} 18 | \includegraphics[width=0.2\linewidth]{pic/hitcolor.jpg} 19 | \end{center} 20 | \end{figure} 21 | \end{frame} 22 | 23 | \begin{frame} 24 | \tableofcontents[sectionstyle=show,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] 25 | \end{frame} 26 | 27 | 28 | \section{课题背景} 29 | \subsection{一个小标题} 30 | \begin{frame}{用Beamer很高大上?} 31 | \begin{itemize}[<+->] % 当然,除了alert,手动在里面插 \pause 也行 32 | \item 大家都会\LaTeX{},好多学校都有自己的Beamer主题 33 | \item 中文支持请选择 Xe\LaTeX{} 编译选项 34 | \item GitHub项目地址位于 \url{https://github.com/syvshc/HITBeamer},如果有bug或者feature request可以去里面提 \href{https://github.com/syvshc/HITBeamer/issues}{issue} 或 \href{https://github.com/syvshc/HITBeamer/pulls}{PR} 35 | \end{itemize} 36 | \end{frame} 37 | 38 | 39 | \section{研究现状} 40 | 41 | \subsection{Beamer主题分类} 42 | 43 | \begin{frame} 44 | \begin{itemize} 45 | \item 有一些 \LaTeX{} 自带的 46 | \item 还有一些 Github 上的模板 47 | \item 本模板来源自 \href{https://www.latexstudio.net/archives/4051.html}{THU-Beamer-Theme} 48 | \end{itemize} 49 | \end{frame} 50 | 51 | 52 | \section{研究内容} 53 | 54 | \subsection{美化主题} 55 | 56 | \begin{frame}{这一份主题与 THU Beamer Theme 区别在于} 57 | \begin{itemize} 58 | \item 全文使用无衬线体, 中文使用思源黑体, 英文使用 FiraGO, 公式使用 unicode-math 搭配 Fira Math 字体. 下载及使用方法请看 \href{https://github.com/syvshc/HITBeamer\#readme}{README} 59 | \item 修改了颜色为我也不知道应该叫什么的颜色 60 | \item 校徽改为了哈工大校徽 61 | \item 放弃了不显示小标题的 \href{https://github.com/Trinkle23897/THU-Beamer-Theme/commit/061f088d1c7e4b2d2f1f581f3745945ecbb63f25}{commit}, 如果有需要请自行按照该 commit 修改 \mintinline{text}{HIT.sty} 62 | \end{itemize} 63 | \end{frame} 64 | 65 | \subsection{如何更好地做Beamer} 66 | 67 | \begin{frame}{Why Beamer} 68 | \begin{itemize} 69 | \item \LaTeX 广泛用于学术界,期刊会议论文模板 70 | \end{itemize} 71 | \begin{table}[h] 72 | \centering 73 | \begin{tabular}{c|c} 74 | Microsoft\textsuperscript{\textregistered} Word & \LaTeX \\ 75 | \hline 76 | 文字处理工具 & 专业排版软件 \\ 77 | 容易上手,简单直观 & 容易上手 \\ 78 | 所见即所得 & 所见即所想,所想即所得 \\ 79 | 高级功能不易掌握 & 进阶难,但一般用不到 \\ 80 | 处理长文档需要丰富经验 & 和短文档处理基本无异 \\ 81 | 花费大量时间调格式 & 无需担心格式,专心作者内容 \\ 82 | 公式排版差强人意 & 尤其擅长公式排版 \\ 83 | 二进制格式,兼容性差 & 文本文件,易读、稳定 \\ 84 | 付费商业许可 & 自由免费使用 \\ 85 | \end{tabular} 86 | \end{table} 87 | \end{frame} 88 | 89 | \begin{frame}{排版举例} 90 | \begin{exampleblock}{无编号公式} % 加 * 91 | \begin{equation*} 92 | J(\theta) = \mathbb{E}_{\pi_\theta}[G_t] = \sum_{s\in\mathcal{S}} d^\pi (s)V^\pi(s)=\sum_{s\in\mathcal{S}} d^\pi(s)\sum_{a\in\mathcal{A}}\pi_\theta(a|s)Q^\pi(s,a) 93 | \end{equation*} 94 | \end{exampleblock} 95 | \begin{exampleblock}{多行多列公式\footnote{如果公式中有文字出现,请用 $\backslash$mathrm\{\} 或者 $\backslash$text\{\} 包含,不然就会变成 $clip$,在公式里看起来比 $\mathrm{clip}$ 丑非常多。}} 96 | % 使用 & 分隔 97 | \begin{align} 98 | Q_\mathrm{target}&=r+\gamma Q^\pi(s^\prime, \pi_\theta(s^\prime)+\epsilon)\\ 99 | \epsilon&\sim\mathrm{clip}(\mathcal{N}(0, \sigma), -c, c)\nonumber 100 | \end{align} 101 | \end{exampleblock} 102 | \end{frame} 103 | 104 | \begin{frame} 105 | \begin{exampleblock}{编号多行公式} 106 | % Taken from Mathmode.tex 107 | \begin{multline} 108 | A=\lim_{n\rightarrow\infty}\Delta x\left(a^{2}+\left(a^{2}+2a\Delta x+\left(\Delta x\right)^{2}\right)\right.\label{eq:reset}\\ 109 | +\left(a^{2}+2\cdot2a\Delta x+2^{2}\left(\Delta x\right)^{2}\right)\\ 110 | +\left(a^{2}+2\cdot3a\Delta x+3^{2}\left(\Delta x\right)^{2}\right)\\ 111 | +\ldots\\ 112 | \left.+\left(a^{2}+2\cdot(n-1)a\Delta x+(n-1)^{2}\left(\Delta x\right)^{2}\right)\right)\\ 113 | =\frac{1}{3}\left(b^{3}-a^{3}\right) 114 | \end{multline} 115 | \end{exampleblock} 116 | \end{frame} 117 | 118 | \begin{frame}{图形与分栏} 119 | % From thuthesis user guide. 120 | \begin{minipage}[c]{0.3\linewidth} 121 | \begin{tikzpicture} 122 | \draw[-latex] (0, 0) -- (2.5, 0) node[below] {$ x $}; 123 | \draw[-latex] (0, 0) -- (0, 2.5) node[left] {$ y $}; 124 | \draw[fill=gray!50] (0, 1) -- (1, 2) -- (2, 1) -- (1, 0) -- cycle; 125 | \draw[dotted] (0, 2) node[left] {$ 2 $} -- (1, 2); 126 | \draw[dotted] (0, 1) node[left] {$ 1 $} -- (2, 1); 127 | \draw[dotted] (1, 0) node[below] {$ 1 $} -- (1, 2); 128 | \draw[dotted] (2, 0) node[below] {$ 2 $} -- (2, 1); 129 | \end{tikzpicture} 130 | \end{minipage}\hspace{1cm} 131 | \begin{minipage}{0.5\linewidth} 132 | \medskip 133 | %\hspace{2cm} 134 | \begin{figure}[h] 135 | \centering 136 | \includegraphics[height=.4\textheight]{pic/dtmf.pdf} 137 | \end{figure} 138 | \end{minipage} 139 | \end{frame} 140 | 141 | \begin{frame}[fragile]{\LaTeX{} 常用命令} 142 | \begin{exampleblock}{命令} 143 | \centering 144 | \small 145 | \begin{tabular}{llll} 146 | \cmd{chapter} & \cmd{section} & \cmd{subsection} & \cmd{paragraph} \\ 147 | 章 & 节 & 小节 & 带题头段落 \\\hline 148 | \cmd{centering} & \cmd{emph} & \cmd{verb} & \cmd{url} \\ 149 | 居中对齐 & 强调 & 抄录命令 & 超链接 \\\hline 150 | \cmd{footnote} & \cmd{item} & \cmd{caption} & \cmd{includegraphics} \\ 151 | 脚注 & 列表条目 & 标题 & 插入图片 \\\hline 152 | \cmd{label} & \cmd{cite} & \cmd{ref} \\ 153 | 标号 & 引用参考文献 & 引用图表公式等\\\hline 154 | \end{tabular} 155 | \end{exampleblock} 156 | \begin{exampleblock}{环境} 157 | \centering 158 | \small 159 | \begin{tabular}{lll}\hline 160 | \env{table} & \env{figure} & \env{equation}\\ 161 | 表格 & 图片 & 公式 \\\hline 162 | \env{itemize} & \env{enumerate} & \env{description}\\ 163 | 无编号列表 & 编号列表 & 描述 \\\hline 164 | \end{tabular} 165 | \end{exampleblock} 166 | \end{frame} 167 | 168 | \begin{frame}[fragile]{\LaTeX{} 环境命令举例} 169 | \begin{minipage}{0.5\linewidth} 170 | \begin{minted}{latex} 171 | \begin{itemize} 172 | \item A \item B 173 | \item C 174 | \begin{itemize} 175 | \item C-1 176 | \end{itemize} 177 | \end{itemize} 178 | \end{minted} 179 | \end{minipage}\hspace{1cm} 180 | \begin{minipage}{0.3\linewidth} 181 | \begin{itemize} 182 | \item A 183 | \item B 184 | \item C 185 | \begin{itemize} 186 | \item C-1 187 | \end{itemize} 188 | \end{itemize} 189 | \end{minipage} 190 | \medskip 191 | \pause 192 | \begin{minipage}{0.5\linewidth} 193 | 这是 \env{minted} 环境的示例 194 | \begin{minted}{latex} 195 | \begin{enumerate} 196 | \item 巨佬 \item 大佬 197 | \item 萌新 198 | \begin{itemize} 199 | \item[n+e] 瑟瑟发抖 200 | \end{itemize} 201 | \end{enumerate} 202 | \end{minted} 203 | \end{minipage}\hspace{1cm} 204 | \begin{minipage}{0.3\linewidth} 205 | \begin{enumerate} 206 | \item 巨佬 207 | \item 大佬 208 | \item 萌新 209 | \begin{itemize} 210 | \item[n+e] 瑟瑟发抖 211 | \end{itemize} 212 | \end{enumerate} 213 | \end{minipage} 214 | \end{frame} 215 | 216 | \begin{frame}[fragile]{\LaTeX{} 数学公式} 217 | \begin{columns} 218 | \begin{column}{.55\textwidth} 219 | 这是 \env{lstlisting} 环境的示例 220 | \begin{lstlisting}[language=TeX] 221 | $V = \frac{4}{3}\pi r^3$ 222 | 223 | \[ 224 | V = \frac{4}{3}\pi r^3 225 | \] 226 | 227 | \begin{equation} 228 | \label{eq:vsphere} 229 | V = \frac{4}{3}\pi r^3 230 | \end{equation} 231 | \end{lstlisting} 232 | \end{column} 233 | \begin{column}{.4\textwidth} 234 | $V = \frac{4}{3}\pi r^3$ 235 | \[ 236 | V = \frac{4}{3}\pi r^3 237 | \] 238 | \begin{equation} 239 | \label{eq:vsphere} 240 | V = \frac{4}{3}\pi r^3 241 | \end{equation} 242 | \end{column} 243 | \end{columns} 244 | \begin{itemize} 245 | \item 更多内容请看\cite{Lin1992} \href{https://zh.wikipedia.org/wiki/Help:数学公式}{\color{purple}{这里}} 246 | \end{itemize} 247 | \end{frame} 248 | 249 | \begin{frame}[fragile] 250 | \begin{columns} 251 | \column{.5\textwidth} 252 | \begin{minted}{latex} 253 | \begin{table}[htbp] 254 | \caption{编号与含义} 255 | \label{tab:number} 256 | \centering 257 | \begin{tabular}{cl} 258 | \toprule 259 | 编号 & 含义 \\ 260 | \midrule 261 | 1 & 4.0 \\ 262 | 2 & 3.7 \\ 263 | \bottomrule 264 | \end{tabular} 265 | \end{table} 266 | 公式~(\ref{eq:vsphere}) 的编号与含义请参见表~\ref{tab:number}。 267 | \end{minted} 268 | \column{.4\textwidth} 269 | \begin{table}[htpb] 270 | \centering 271 | \caption{编号与含义} 272 | \label{tab:number} 273 | \begin{tabular}{cl}\toprule 274 | 编号 & 含义 \\\midrule 275 | 1 & 4.0\\ 276 | 2 & 3.7\\\bottomrule 277 | \end{tabular} 278 | \end{table} 279 | \normalsize 公式~(\ref{eq:vsphere})的编号与含义请参见表~\ref{tab:number}。 280 | \end{columns} 281 | \end{frame} 282 | 283 | \begin{frame}[fragile]{minted 环境 与 python 代码} 284 | \begin{minted}[]{python} 285 | import numpy as np 286 | print("Hello World") 287 | np.array([x for x in range(5) if x % 2 == 1]) 288 | \end{minted} 289 | \end{frame} 290 | 291 | \begin{frame}{作图} 292 | \begin{itemize} 293 | \item 矢量图 eps, ps, pdf 294 | \begin{itemize} 295 | \item METAPOST, pstricks, pgf $\ldots$ 296 | \item Xfig, Dia, Visio, Inkscape $\ldots$ 297 | \item Matlab / Excel 等保存为 pdf 298 | \end{itemize} 299 | \item 标量图 png, jpg, tiff $\ldots$ 300 | \begin{itemize} 301 | \item 提高清晰度,避免发虚 302 | \item 应尽量避免使用 303 | \end{itemize} 304 | \end{itemize} 305 | \begin{figure}[htpb] 306 | \centering 307 | \includegraphics[width=0.2\linewidth]{pic/hitlogo.pdf} 308 | \caption{\CJKsout{这个校徽就不是矢量图, 差评. }现在这个是矢量图了\footnote{从 \url{http://100.hit.edu.cn/xqgwsy/xqbs} 这里的 VIS 中扒下来的}} 309 | \end{figure} 310 | 311 | \end{frame} 312 | 313 | \begin{frame}{定理环境与块环境} 314 | \begin{definition}[数列极限] 315 | 对任意 $ \varepsilon>0 $, 存在 $ N\in\symbb{N} $, 使得当 $ n>N $ 时, 有 316 | \[ 317 | \abs{a_{n}-a}<\varepsilon 318 | \] 319 | 那么我们称数列 $ \qty{a_{n}} $ \emph{收敛}, 记为 320 | \[ 321 | \lim_{n\to\infty}a_{n}=a. 322 | \] 323 | \end{definition} 324 | \begin{block}{注} 325 | 可使用的定理环境为 \env{theorem}, \env{corollary}, \env{definition}, \env{definitions}, \env{fact}, \env{example}, 与 \env{examples} 326 | \end{block} 327 | \end{frame} 328 | 329 | \section{计划进度} 330 | \begin{frame} 331 | \begin{itemize} 332 | \item 一月:完成文献调研 333 | \item 二月:复现并评测各种Beamer主题美观程度 334 | \item 三、四月:美化HIT Beamer主题 335 | \item 五月:论文撰写\upcite{hithesis2017} 336 | \end{itemize} 337 | \nocite{*} 338 | \end{frame} 339 | 340 | 341 | \section{参考文献} 342 | 343 | \begin{frame}[allowframebreaks] 344 | % \bibliographystyle{hithesis} 345 | % 如果参考文献太多的话,可以像下面这样调整字体: 346 | \tiny\bibliographystyle{hithesis} 347 | \bibliography{ref} 348 | \end{frame} 349 | 350 | \begin{frame} 351 | \begin{center} 352 | {\Huge\calligra Thanks!} 353 | \end{center} 354 | \end{frame} 355 | 356 | \end{document} --------------------------------------------------------------------------------