├── License ├── Makefile ├── README.md ├── figures └── thulogo.pdf ├── macros.tex ├── main-en.pdf ├── main-en.tex ├── main.pdf ├── main.tex ├── makebeamer-en.bat ├── makebeamer.bat ├── makeclean.bat ├── makecleanall.bat ├── makedoc.bat ├── reference.bib ├── thubeamer.bst ├── thubeamer.dtx └── thubeamer.pdf /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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | beamer: 2 | pdflatex -synctex=1 -interaction=nonstopmode main 3 | bibtex main 4 | pdflatex -synctex=1 -interaction=nonstopmode main 5 | pdflatex -synctex=1 -interaction=nonstopmode main 6 | 7 | beamer-en: 8 | pdflatex -synctex=1 -interaction=nonstopmode main-en 9 | bibtex main-en 10 | pdflatex -synctex=1 -interaction=nonstopmode main-en 11 | pdflatex -synctex=1 -interaction=nonstopmode main-en 12 | 13 | doc: 14 | xelatex thubeamer.dtx 15 | makeindex -s gind.ist -o thubeamer.ind thubeamer.idx 16 | makeindex -s gglo.ist -o thubeamer.gls thubeamer.glo 17 | xelatex thubeamer.dtx 18 | xelatex thubeamer.dtx 19 | 20 | clean: 21 | rm -f *.toc *.bbl *.blg *.out *.aux *.log *.bak *.thm *.synctex.gz *.fdb_latexmk *.fls *.glo *.gls *.idx *.ilg *.ind *.nav *.snm *.hd 22 | 23 | cleanall: 24 | rm -f *.toc *.bbl *.blg *.out *.aux *.log *.bak *.thm *.synctex.gz *.fdb_latexmk *.fls *.glo *.gls *.idx *.ilg *.ind *.nav *.snm *.hd *.sty *.ins 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # thubeamer: A Beamer Theme for Tsinghua University (THU) 5 | 6 | # thubeamer:清华大学 Beamer 模板 7 | 8 | ![CTAN Version](https://img.shields.io/ctan/v/thubeamer.svg) 9 | ![GitHub Version](https://img.shields.io/github/release/YangLaTeX/thubeamer.svg) 10 | ![Repo Size](https://img.shields.io/github/repo-size/YangLaTeX/thubeamer.svg) 11 | ![License](https://img.shields.io/ctan/l/thubeamer.svg) 12 | 13 | [GitHub](https://github.com/YangLaTeX/thubeamer) | [Download](https://github.com/YangLaTeX/thubeamer/releases) | [Wiki](https://github.com/YangLaTeX/thubeamer/wiki) | [CTAN](https://www.ctan.org/pkg/thubeamer) 14 | 15 | # Introduction to thubeamer 16 | 17 | **thubeamer** is a **beamer theme** designed for Tsinghua University (THU). Current version is 1.2, updated on 2023/11/27. 18 | 19 | ```latex 20 | |- figures 21 | |- thulogo.pdf 22 | |- macros.tex 23 | |- main-en.tex 24 | |- main-en.pdf 25 | |- main.tex 26 | |- main.pdf 27 | |- makebeamer-en.bat 28 | |- makebeamer.bat 29 | |- makeclean.bat 30 | |- makecleanall.bat 31 | |- makedoc.bat 32 | |- Makefile 33 | |- README.md 34 | |- reference.bib 35 | |- thubeamer.bst 36 | |- thubeamer.dtx 37 | |- thubeamer.pdf 38 | ``` 39 | 40 | # thubeamer 简介 41 | 42 | thubeamer 是清华大学风格 Beamer 模板,当前版本1.2,更新于2023年11月27日。 43 | 44 | # Documentation 45 | 46 | Download and unzip the template. Specific usage documentation and examples can be found in the files below: 47 | 48 | * Template usage (thubeamer.pdf, in Chinese) 49 | * Template example (main.pdf, in Chinese) 50 | * Brief Introduction (README.md, both in Chinese and English) 51 | 52 | # 说明文档 53 | 54 | 下载并解压本模板,文件夹中包含以下说明文档: 55 | 56 | * 模板开发文档(thubeamer.pdf,中文版) 57 | * 模板撰写示例(main.pdf,中文版) 58 | * 模板简介(README.md,中英双语) 59 | 60 | # Downloads 61 | 62 | * Published version: [CTAN](https://www.ctan.org/pkg/thubeamer) 63 | * Developer version: [GitHub](https://github.com/YangLaTeX/thubeamer) 64 | 65 | # 下载 66 | 67 | * 发布版本:[CTAN](https://www.ctan.org/pkg/thubeamer) 68 | * 开发版本:[GitHub](https://github.com/YangLaTeX/thubeamer) 69 | 70 | # Reporting Issues 71 | 72 | Please follow the procedure below: 73 | 74 | * [GitHub Issues](https://github.com/YangLaTeX/thubeamer/issues) 75 | * [Educational Email](mailto:yangjx20@mails.tsinghua.edu.cn) 76 | * [Gmail](mailto:yanglatex2e@gmail.com) 77 | 78 | # 模板问题反馈 79 | 80 | 请按照以下顺序反馈问题: 81 | 82 | * [GitHub 问题反馈](https://github.com/YangLaTeX/thubeamer/issues) 83 | * [教育邮箱](mailto:yangjx20@mails.tsinghua.edu.cn) 84 | * [Gmail 邮箱](mailto:yanglatex2e@gmail.com) 85 | 86 | # Makefile Usage 87 | 88 | To use Makefile, you should have GNU `make` tool installed. 89 | 90 | ```bash 91 | make doc # compile documentation (required before compiling the beamer) 92 | make beamer # compile beamer 93 | make beamer-en # compile beamer prepared in English 94 | make clean # clean auxiliary files 95 | make cleanall # clean auxiliary files and style files 96 | ``` 97 | 98 | # 使用 Makefile 99 | 100 | 使用Makefile之前请确保已安装GNU `make`工具。 101 | 102 | ```bash 103 | make doc # 编译说明文档(在编译 beamer之前必须编译说明文档) 104 | make beamer # 编译 beamer 105 | make beamer-en # 编译英文 beamer 106 | make clean # 清除辅助文件 107 | make cleanall # 清除辅助文件与样式文件 108 | ``` 109 | 110 | # batch Usage 111 | 112 | `makedoc.bat`, `makebeamer.bat`, `makeclean.bat` and `makecleanall` are designed for windows platform. Double click these files, then they will echo corresponding functions automatically. 113 | 114 | ```bash 115 | makedoc # compile documentation (required before compiling the beamer) 116 | makebeamer # compile beamer 117 | makebeamer-en # compile beamer prepared in English 118 | makeclean # clean auxiliary files 119 | makecleanall # clean auxiliary files and style files 120 | ``` 121 | 122 | # 使用编译脚本 123 | 124 | `makedoc.bat`、`makebeamer.bat`、`makeclean.bat`与`makecleanall`为windows编译脚本,双击即可执行相应的功能。 125 | 126 | ```bash 127 | makedoc # 编译说明文档(在编译 beamer之前必须编译说明文档) 128 | makebeamer # 编译 beamer 129 | makebeamer-en # 编译英文 beamer 130 | makeclean # 清除辅助文件 131 | makecleanall # 清除辅助文件与样式文件 132 | ``` 133 | 134 | # License 135 | 136 | This material is subject to the [LATEX Project Public License 1.3c](https://ctan.org/license/lppl1.3) or any later version. 137 | 138 | # 协议 139 | 140 | 本模板的发布遵照 [LATEX Project Public License 1.3c](https://ctan.org/license/lppl1.3) 协议或其后版本。 141 | 142 | # Acknowledgements(致谢) 143 | 144 | * [XDUstyle](https://github.com/StickCui/XDUstyle-Beamer-Theme) 145 | * [THUBeamer](https://github.com/tl3shi/THUBeamer) 146 | -------------------------------------------------------------------------------- /figures/thulogo.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YangLaTeX/thubeamer/210c08e200224e73e7535bb2a450e9f390520552/figures/thulogo.pdf -------------------------------------------------------------------------------- /macros.tex: -------------------------------------------------------------------------------- 1 | % About: Macros for Vector, Matrix, Tensor, Math Operator and Misc 2 | % Author: Jingxuan Yang 3 | 4 | % vectors 5 | \newcommand{\va}{\bm{a}} \newcommand{\vah}{\hat{\bm{a}}} \newcommand{\ah}{\hat{a}} \newcommand{\vat}{\tilde{\bm{a}}} \newcommand{\at}{\tilde{a}} 6 | \newcommand{\vb}{\bm{b}} \newcommand{\vbh}{\hat{\bm{b}}} \newcommand{\bh}{\hat{b}} \newcommand{\vbt}{\tilde{\bm{b}}} \newcommand{\bt}{\tilde{b}} 7 | \newcommand{\vc}{\bm{c}} \newcommand{\vch}{\hat{\bm{c}}} \newcommand{\ch}{\hat{c}} \newcommand{\vct}{\tilde{\bm{c}}} \newcommand{\ct}{\tilde{c}} 8 | \newcommand{\vd}{\bm{d}} \newcommand{\vdh}{\hat{\bm{d}}} \newcommand{\dhat}{\hat{d}} \newcommand{\vdt}{\tilde{\bm{d}}} \newcommand{\dt}{\tilde{d}} 9 | \newcommand{\ve}{\bm{e}} \newcommand{\veh}{\hat{\bm{e}}} \newcommand{\eh}{\hat{e}} \newcommand{\vet}{\tilde{\bm{e}}} \newcommand{\et}{\tilde{e}} 10 | \newcommand{\vf}{\bm{f}} \newcommand{\vfh}{\hat{\bm{f}}} \newcommand{\fh}{\hat{f}} \newcommand{\vft}{\tilde{\bm{f}}} \newcommand{\ft}{\tilde{f}} 11 | \newcommand{\vg}{\bm{g}} \newcommand{\vgh}{\hat{\bm{g}}} \newcommand{\gh}{\hat{g}} \newcommand{\vgt}{\tilde{\bm{g}}} \newcommand{\gt}{\tilde{g}} 12 | \newcommand{\vh}{\bm{h}} \newcommand{\vhh}{\hat{\bm{h}}} \newcommand{\hh}{\hat{h}} \newcommand{\vht}{\tilde{\bm{h}}} \newcommand{\htild}{\tilde{h}} 13 | \newcommand{\vi}{\bm{i}} \newcommand{\vih}{\hat{\bm{i}}} \newcommand{\ih}{\hat{i}} \newcommand{\vit}{\tilde{\bm{i}}} \newcommand{\itild}{\tilde{i}} 14 | \newcommand{\vj}{\bm{j}} \newcommand{\vjh}{\hat{\bm{j}}} \newcommand{\jh}{\hat{j}} \newcommand{\vjt}{\tilde{\bm{j}}} \newcommand{\jt}{\tilde{j}} 15 | \newcommand{\vk}{\bm{k}} \newcommand{\vkh}{\hat{\bm{k}}} \newcommand{\kh}{\hat{k}} \newcommand{\vkt}{\tilde{\bm{k}}} \newcommand{\kt}{\tilde{k}} 16 | \newcommand{\vl}{\bm{l}} \newcommand{\vlh}{\hat{\bm{l}}} \newcommand{\lh}{\hat{l}} \newcommand{\vlt}{\tilde{\bm{l}}} \newcommand{\lt}{\tilde{l}} 17 | \newcommand{\vm}{\bm{m}} \newcommand{\vmh}{\hat{\bm{m}}} \newcommand{\mh}{\hat{m}} \newcommand{\vmt}{\tilde{\bm{m}}} \newcommand{\mt}{\tilde{m}} 18 | \newcommand{\vn}{\bm{n}} \newcommand{\vnh}{\hat{\bm{n}}} \newcommand{\nh}{\hat{n}} \newcommand{\vnt}{\tilde{\bm{n}}} \newcommand{\nt}{\tilde{n}} 19 | \newcommand{\vo}{\bm{o}} \newcommand{\voh}{\hat{\bm{o}}} \newcommand{\oh}{\hat{o}} \newcommand{\vot}{\tilde{\bm{o}}} \newcommand{\ot}{\tilde{o}} 20 | \newcommand{\vp}{\bm{p}} \newcommand{\vph}{\hat{\bm{p}}} \newcommand{\ph}{\hat{p}} \newcommand{\vpt}{\tilde{\bm{p}}} \newcommand{\pt}{\tilde{p}} 21 | \newcommand{\vq}{\bm{q}} \newcommand{\vqh}{\hat{\bm{q}}} \newcommand{\qh}{\hat{q}} \newcommand{\vqt}{\tilde{\bm{q}}} \newcommand{\qt}{\tilde{q}} 22 | \newcommand{\vr}{\bm{r}} \newcommand{\vrh}{\hat{\bm{r}}} \newcommand{\rh}{\hat{r}} \newcommand{\vrt}{\tilde{\bm{r}}} \newcommand{\rt}{\tilde{r}} 23 | \newcommand{\vs}{\bm{s}} \newcommand{\vsh}{\hat{\bm{s}}} \newcommand{\sh}{\hat{s}} \newcommand{\vst}{\tilde{\bm{s}}} \newcommand{\st}{\tilde{s}} 24 | \newcommand{\vt}{\bm{t}} \newcommand{\vth}{\hat{\bm{t}}} \newcommand{\that}{\hat{t}} \newcommand{\vtt}{\tilde{\bm{t}}} \newcommand{\ttil}{\tilde{t}} 25 | \newcommand{\vu}{\bm{u}} \newcommand{\vuh}{\hat{\bm{u}}} \newcommand{\uh}{\hat{u}} \newcommand{\vut}{\tilde{\bm{u}}} \newcommand{\ut}{\tilde{u}} 26 | \newcommand{\vv}{\bm{v}} \newcommand{\vvh}{\hat{\bm{v}}} \newcommand{\vhat}{\hat{v}} \newcommand{\vvt}{\tilde{\bm{v}}} \newcommand{\vtild}{\tilde{v}} 27 | \newcommand{\vw}{\bm{w}} \newcommand{\vwh}{\hat{\bm{w}}} \newcommand{\wh}{\hat{w}} \newcommand{\vwt}{\tilde{\bm{w}}} \newcommand{\wt}{\tilde{w}} 28 | \newcommand{\vx}{\bm{x}} \newcommand{\vxh}{\hat{\bm{x}}} \newcommand{\xh}{\hat{x}} \newcommand{\vxt}{\tilde{\bm{x}}} \newcommand{\xt}{\tilde{x}} 29 | \newcommand{\vy}{\bm{y}} \newcommand{\vyh}{\hat{\bm{y}}} \newcommand{\yh}{\hat{y}} \newcommand{\vyt}{\tilde{\bm{y}}} \newcommand{\yt}{\tilde{y}} 30 | \newcommand{\vz}{\bm{z}} \newcommand{\vzh}{\hat{\bm{z}}} \newcommand{\zh}{\hat{z}} \newcommand{\vzt}{\tilde{\bm{z}}} \newcommand{\zt}{\tilde{z}} 31 | 32 | \newcommand{\valpha}{\bm{\alpha}} 33 | \newcommand{\vbeta}{\bm{\beta}} 34 | \newcommand{\vgamma}{\bm{\gamma}} 35 | \newcommand{\vtheta}{\bm{\theta}} 36 | \newcommand{\vlambda}{\bm{\lambda}} 37 | \newcommand{\vmu}{\bm{\mu}} 38 | \newcommand{\vomega}{\bm{\omega}} 39 | 40 | \newcommand{\mSigma}{\bm{\Sigma}} 41 | 42 | \newcommand{\Fc}{\mathcal{F}} 43 | \newcommand{\Xc}{\mathcal{X}} 44 | \newcommand{\Yc}{\mathcal{Y}} 45 | \newcommand{\Zc}{\mathcal{Z}} 46 | \newcommand{\Gc}{\mathcal{G}} 47 | \newcommand{\Hc}{\mathcal{H}} 48 | \newcommand{\Dc}{\mathcal{D}} 49 | \newcommand{\Cc}{\mathcal{C}} 50 | \newcommand{\Rc}{\mathcal{R}} 51 | \newcommand{\Lc}{\mathcal{L}} 52 | \newcommand{\Nc}{\mathcal{N}} 53 | \newcommand{\Tc}{\mathcal{T}} 54 | 55 | % matrices 56 | \newcommand{\ma}{\bm{A}} 57 | \newcommand{\mb}{\bm{B}} 58 | \newcommand{\md}{\bm{D}} 59 | \newcommand{\mH}{\bm{H}} 60 | \newcommand{\mE}{\bm{E}} 61 | \newcommand{\mi}{\bm{I}} 62 | \newcommand{\mk}{\bm{K}} 63 | \newcommand{\ml}{\bm{L}} 64 | \newcommand{\mn}{\bm{N}} 65 | \newcommand{\mP}{\bm{P}} 66 | \newcommand{\mq}{\bm{Q}} 67 | \newcommand{\mr}{\bm{R}} 68 | \newcommand{\mU}{\bm{U}} 69 | \newcommand{\mv}{\bm{V}} 70 | \newcommand{\mw}{\bm{W}} 71 | \newcommand{\mx}{\bm{X}} 72 | \newcommand{\my}{\bm{Y}} 73 | \newcommand{\mz}{\bm{Z}} 74 | 75 | % tensors 76 | \newcommand{\tp}{\mathsf{P}} 77 | \newcommand{\tu}{\mathsf{U}} 78 | \newcommand{\tx}{\mathsf{X}} 79 | \newcommand{\ty}{\mathsf{Y}} 80 | \newcommand{\tz}{\mathsf{Z}} 81 | \newcommand{\tw}{\mathsf{W}} 82 | \newcommand{\tf}{\mathsf{F}} 83 | \newcommand{\ta}{\mathsf{A}} 84 | \renewcommand{\th}{\mathsf{H}} 85 | 86 | % norms 87 | \newcommand{\mynorm}[2]{\| {#1} \|_{#2}} 88 | \newcommand{\norm}[2]{\mynorm{#1}{#2}} 89 | \newcommand{\bignorm}[2]{\left\| {#1} \right\|_{#2}} 90 | \newcommand{\norml}[1]{\mynorm{#1}{1}} 91 | \newcommand{\bignorml}[1]{\bignorm{#1}{1}} 92 | \newcommand{\infnorm}[1]{\mynorm{#1}{\infty}} 93 | \newcommand{\biginfnorm}[1]{\bignorm{#1}{\infty}} 94 | \newcommand{\oneinf}{\ell_{1,\infty}} 95 | \newcommand{\onetwo}{\ell_{1,2}} 96 | \newcommand{\oneinfnorm}[1]{\mynorm{#1}{1,\infty}} 97 | \newcommand{\bigoneinf}[1]{\bignorm{#1}{1,\infty}} 98 | \newcommand{\onetwonorm}[1]{\mynorm{#1}{1,2}} 99 | \newcommand{\bigonetwo}[1]{\bignorm{#1}{1,2}} 100 | \newcommand{\enorm}[1]{\mynorm{#1}{2}} 101 | \newcommand{\bigenorm}[1]{\bignorm{#1}{2}} 102 | \newcommand{\znorm}[1]{\mynorm{#1}{0}} 103 | \newcommand{\bigznorm}[1]{\bignorm{#1}{0}} 104 | \newcommand{\frob}[1]{\|{#1}\|_{\text{F}}} 105 | \newcommand{\bigfrob}[1]{\bignorm{#1}{\text{F}}} 106 | \newcommand{\grpnorm}[2]{\norm{#1}{\text{Gr}(#2)}} 107 | 108 | % math operators 109 | \DeclareMathOperator*{\argmin}{argmin} 110 | \DeclareMathOperator*{\argmax}{argmax} 111 | \DeclareMathOperator{\divg}{div} 112 | \DeclareMathOperator{\dom}{dom} 113 | \DeclareMathOperator{\interior}{int} 114 | \DeclareMathOperator{\ri}{ri} 115 | \DeclareMathOperator{\sgn}{sgn} 116 | \DeclareMathOperator{\trace}{Tr} 117 | \DeclareMathOperator{\diag}{diag} 118 | \DeclareMathOperator{\rank}{rank} 119 | \DeclareMathOperator{\range}{range} 120 | \DeclareMathOperator{\vect}{vec} 121 | \DeclareMathOperator{\prox}{prox} 122 | \DeclareMathOperator{\intr}{int} 123 | \DeclareMathOperator{\relint}{ri} 124 | \DeclareMathOperator{\hard}{hard} 125 | \DeclareMathOperator{\id}{id} 126 | % \DeclareMathOperator{\tf}{tf} 127 | % \DeclareMathOperator{\idf}{idf} 128 | 129 | % misc 130 | \newcommand{\gs}{\geqslant} 131 | \newcommand{\ls}{\leqslant} 132 | \newcommand{\set}[1]{\left\{ {#1}\right\}} 133 | 134 | \newcommand{\defeq}{\ \stackrel{\text{def}}{=}\ } 135 | \newcommand{\ip}[2]{\left\langle#1, #2\right\rangle} 136 | \newcommand{\reals}{\mathbb{R}} 137 | \newcommand{\complex}{\mathbb{C}} 138 | \newcommand{\half}{\frac{1}{2}} 139 | -------------------------------------------------------------------------------- /main-en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YangLaTeX/thubeamer/210c08e200224e73e7535bb2a450e9f390520552/main-en.pdf -------------------------------------------------------------------------------- /main-en.tex: -------------------------------------------------------------------------------- 1 | %%======================================================================= 2 | % !Mode:: "TeX:UTF-8" 3 | % !TEX program = PdfLaTeX 4 | %%======================================================================= 5 | % 模板名称:thubeamer 6 | % 模板版本:V1.2 7 | % 模板作者:杨敬轩(Jingxuan Yang) 8 | % 联系作者:yangjx20@mails.tsinghua.edu.cn & yanglatex2e@gmail.com 9 | % 模板适用:清华大学风格 Beamer 模板 10 | % 模板编译:手动编译方法参看 README.md 或 thubeamer.pdf 11 | % 编译 beamer 之前必须编译说明文档:make doc 或双击 makedoc.bat 12 | % 编译说明文档同时分离出四个样式文件 *thubeamer.sty 13 | % GNU make 工具:make beamer 14 | % Windows 批处理脚本:双击 makebeamer.bat 自动编译 beamer 15 | % 更多编译细节详见说明文档:thubeamer.pdf 16 | % 更新时间:2023/11/27 17 | % 模板帮助:请**务必务必务必**阅读 thubeamer.pdf 说明文档,文档查看方法: 18 | % 下载模板文件夹里就有,如果是从 CTAN 上安装更新本模板,则通过 19 | % cmd 命令行:texdoc thubeamer 查看文档 20 | % 推荐前往模板的 GitHub 仓库获取最新文件,地址: 21 | % https://github.com/YangLaTeX/thubeamer 22 | %%======================================================================= 23 | 24 | % 设置文档类别为 25 | % \documentclass[aspectratio=169]{beamer} % 设置长宽比为 16:9 26 | \documentclass{beamer} 27 | 28 | % 使用 主题 29 | \usetheme[en]{thubeamer} 30 | 31 | % 模板选项如下 32 | % (a.1) smoothbars: 页面顶端单行显示目录,默认选项 33 | % (a.2) sidebar: 页面左侧分栏显示目录 34 | % \usetheme[sidebar]{thubeamer} 35 | 36 | % (b) sectiontoc: 在每节(section)前显示目录,并高亮显示当前节,默认不显示 37 | 38 | % (c) subsectiontoc: 在每小节(subsection)前显示目录,并高亮显示当前节和当前小节,默认不显示 39 | 40 | % (d) en: 仅使用英文来制作 beamer,应用此选项后,汉字将全部无法编译 41 | 42 | % 图片存放路径 43 | \graphicspath{{figures/}} 44 | 45 | \include{macros} 46 | 47 | % 封面信息,方括号内容是显示在左侧边栏的内容(当选择 sidebar 主题时有效) 48 | \title[Title]{Title\\[2mm] Presentation} 49 | \author[Jingxuan Yang]{Student: Jingxuan Yang\\[5mm] Supervisor: Prof. XX} 50 | \institute[Tsinghua University]{\small Tsinghua University} 51 | \date{\small \vskip -10pt \today} 52 | 53 | % 开始写文章 54 | \begin{document} 55 | 56 | % 标题页 57 | \begin{frame} 58 | \maketitle 59 | \end{frame} 60 | 61 | % 目录页 62 | \section*{Contents} 63 | \frame{ 64 | \frametitle{\secname} 65 | \tableofcontents[hideallsubsections] 66 | } 67 | 68 | \section{Research Contents} 69 | 70 | \subsection{Research Contents of This Project} 71 | 72 | \begin{frame}{Research Contents of This Project} 73 | \begin{figure} 74 | \includegraphics[width=0.4\linewidth]{thulogo} 75 | \caption{Research Contents of This Project} 76 | \end{figure} 77 | \end{frame} 78 | 79 | \subsection{Research progress} 80 | 81 | \begin{frame}{Research progress} 82 | \begin{figure} 83 | \includegraphics[width=0.4\linewidth]{thulogo} 84 | \caption{Research progress} 85 | \end{figure} 86 | \end{frame} 87 | 88 | \section{Results} 89 | 90 | \begin{frame}{Results} 91 | \begin{block}{Results} 92 | \begin{itemize} 93 | \setlength{\itemsep}{6pt} 94 | \item XXXX 95 | \item XXXX 96 | \item XXXX 97 | \item XXXX 98 | \item XXXX 99 | \item XXXX 100 | \end{itemize} 101 | \end{block} 102 | \end{frame} 103 | 104 | \subsection{Case 1} 105 | 106 | \begin{frame}{Case 1} 107 | \begin{block}{Unnumbered equation} 108 | Example of unnumbered equation: 109 | $$ 110 | k:[-\pi,\pi] \rightarrow [0,1] 111 | $$ 112 | \end{block} 113 | \end{frame} 114 | 115 | \subsection{Case 2} 116 | 117 | \begin{frame}{Case 2} 118 | \begin{block}{numbered equation} 119 | \begin{itemize} 120 | \item Example of numbered equation: the input is an image 121 | \begin{equation} 122 | \vx\in\reals^{C_{\text{in}}\times H\times W} 123 | \end{equation} 124 | where $C_{\text{in}}$ represents number of input channels, $H$ is the height of image, and $W$ is the width of image. 125 | \end{itemize} 126 | \end{block} 127 | \end{frame} 128 | 129 | \subsection{Case 3} 130 | 131 | \begin{frame}{Case 3} 132 | \begin{block}{Table} 133 | Example of tables, shown in \ref{tab:unique_values}. 134 | 135 | \begin{table}[htbp] 136 | \small 137 | \centering 138 | \caption{Unique elements in train.csv } 139 | \label{tab:unique_values} 140 | \begin{tabular}{lc} 141 | \toprule 142 | column & \# unique values \\ 143 | \midrule 144 | posting\_id & 34250 \\ 145 | image & 32412 \\ 146 | image\_phash & 28735 \\ 147 | title & 33117 \\ 148 | label\_group & 11014 \\ 149 | \bottomrule 150 | \end{tabular} 151 | \end{table} 152 | \end{block} 153 | \end{frame} 154 | 155 | \subsection{Case 4} 156 | 157 | \begin{frame}{Case 4} 158 | \begin{block}{Parallel figures} 159 | Example of parallel figures. 160 | \end{block} 161 | \begin{figure}[htbp] 162 | \centering 163 | \begin{minipage}[t]{0.48\textwidth} 164 | \centering 165 | \includegraphics[width=3cm]{thulogo.pdf} 166 | \caption{Example figure 1} 167 | \label{fig:left_side} 168 | \end{minipage} 169 | \begin{minipage}[t]{0.48\textwidth} 170 | \centering 171 | \includegraphics[width=3cm]{thulogo.pdf} 172 | \caption{Example figure 2} 173 | \label{fig:right_side} 174 | \end{minipage} 175 | \end{figure} 176 | \end{frame} 177 | 178 | \section{Future Work} 179 | 180 | \subsection{Future Work} 181 | 182 | \begin{frame}{Future work} 183 | \begin{block}{Future work} 184 | \begin{itemize} 185 | \setlength{\itemsep}{6pt} 186 | \item XXXX 187 | \item XXXX 188 | \item XXXX 189 | \item XXXX 190 | \end{itemize} 191 | \end{block} 192 | \end{frame} 193 | 194 | \subsection{Scheduling} 195 | 196 | \begin{frame}{Scheduling} 197 | \begin{block}{Scheduling} 198 | \begin{itemize} 199 | \setlength{\itemsep}{6pt} 200 | \item XXXX\cite{webster2010} 201 | \item XXXX\cite{jones2006} 202 | \item XXXX\cite{mcmahan2005} 203 | \item XXXX\cite{Gravagne2003} 204 | \end{itemize} 205 | \end{block} 206 | \end{frame} 207 | 208 | \begin{frame}[allowframebreaks]{Bibliography} 209 | \bibliographystyle{thubeamer} 210 | \bibliography{reference} 211 | \end{frame} 212 | 213 | \begin{frame} 214 | \begin{center} 215 | {\Huge\calligra Thanks for your attention!} 216 | \vspace{1cm} 217 | 218 | {\Huge Q \& A} 219 | \end{center} 220 | \end{frame} 221 | 222 | \end{document} 223 | -------------------------------------------------------------------------------- /main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YangLaTeX/thubeamer/210c08e200224e73e7535bb2a450e9f390520552/main.pdf -------------------------------------------------------------------------------- /main.tex: -------------------------------------------------------------------------------- 1 | %%======================================================================= 2 | % !Mode:: "TeX:UTF-8" 3 | % !TEX program = PdfLaTeX 4 | %%======================================================================= 5 | % 模板名称:thubeamer 6 | % 模板版本:V1.2 7 | % 模板作者:杨敬轩(Jingxuan Yang) 8 | % 联系作者:yangjx20@mails.tsinghua.edu.cn & yanglatex2e@gmail.com 9 | % 模板适用:清华大学风格 Beamer 模板 10 | % 模板编译:手动编译方法参看 README.md 或 thubeamer.pdf 11 | % 编译 beamer 之前必须编译说明文档:make doc 或双击 makedoc.bat 12 | % 编译说明文档同时分离出四个样式文件 *thubeamer.sty 13 | % GNU make 工具:make beamer 14 | % Windows 批处理脚本:双击 makebeamer.bat 自动编译 beamer 15 | % 更多编译细节详见说明文档:thubeamer.pdf 16 | % 更新时间:2023/11/27 17 | % 模板帮助:请**务必务必务必**阅读 thubeamer.pdf 说明文档,文档查看方法: 18 | % 下载模板文件夹里就有,如果是从 CTAN 上安装更新本模板,则通过 19 | % cmd 命令行:texdoc thubeamer 查看文档 20 | % 推荐前往模板的 GitHub 仓库获取最新文件,地址: 21 | % https://github.com/YangLaTeX/thubeamer 22 | %%======================================================================= 23 | 24 | % 设置文档类别为 25 | % \documentclass[aspectratio=169]{beamer} % 设置长宽比为 16:9 26 | \documentclass{beamer} 27 | 28 | % 使用 主题 29 | % 模板选项如下 30 | % (a.1) smoothbars: 页面顶端单行显示目录,默认选项 31 | \usetheme{thubeamer} 32 | 33 | % (a.2) sidebar: 页面左侧分栏显示目录 34 | % \usetheme[sidebar]{thubeamer} 35 | 36 | % (b) sectiontoc: 在每节(section)前显示目录,并高亮显示当前节,默认不显示 37 | 38 | % (c) subsectiontoc: 在每小节(subsection)前显示目录,并高亮显示当前节和当前小节,默认不显示 39 | 40 | % (d) en: 仅使用英文来制作 beamer,应用此选项后,汉字将全部无法编译 41 | 42 | % 图片存放路径 43 | \graphicspath{{figures/}} 44 | 45 | \include{macros} 46 | 47 | % 封面信息,方括号内容是显示在左侧边栏的内容(当选择 sidebar 主题时有效) 48 | \title[报告标题]{报告标题\\[2mm] 课程答辩} 49 | \author[杨敬轩]{学生:杨敬轩\\[5mm] 导师:XX 教授} 50 | \institute[清华大学]{\small 清华大学} 51 | \date{\small \vskip -10pt \today} 52 | 53 | % 开始写文章 54 | \begin{document} 55 | 56 | % 标题页 57 | \begin{frame} 58 | \maketitle 59 | \end{frame} 60 | 61 | % 目录页 62 | \section*{目录} 63 | \frame{ 64 | \frametitle{\secname} 65 | \tableofcontents[hideallsubsections] 66 | } 67 | 68 | \section{研究内容及进度} 69 | 70 | \subsection{课题主要研究内容} 71 | 72 | \begin{frame}{课题主要研究内容} 73 | \begin{figure} 74 | \includegraphics[width=0.4\linewidth]{thulogo} 75 | \caption{课题主要研究内容} 76 | \end{figure} 77 | \end{frame} 78 | 79 | \subsection{进度介绍} 80 | 81 | \begin{frame}{进度介绍} 82 | \begin{figure} 83 | \includegraphics[width=0.4\linewidth]{thulogo} 84 | \caption{进度介绍} 85 | \end{figure} 86 | \end{frame} 87 | 88 | \section{研究工作及成果} 89 | 90 | \begin{frame}{已完成的研究工作及成果} 91 | \begin{block}{已完成的研究工作简介} 92 | \begin{itemize} 93 | \setlength{\itemsep}{6pt} 94 | \item XXXX 95 | \item XXXX 96 | \item XXXX 97 | \item XXXX 98 | \item XXXX 99 | \item XXXX 100 | \end{itemize} 101 | \end{block} 102 | \end{frame} 103 | 104 | \subsection{研究工作一} 105 | 106 | \begin{frame}{研究工作一} 107 | \begin{block}{无编号公式} 108 | 无编号公式示例: 109 | $$ 110 | k:[-\pi,\pi] \rightarrow [0,1] 111 | $$ 112 | \end{block} 113 | \end{frame} 114 | 115 | \subsection{研究工作二} 116 | 117 | \begin{frame}{研究工作二} 118 | \begin{block}{有编号公式} 119 | \begin{itemize} 120 | \item 有编号公式示例:输入为图像 121 | \begin{equation} 122 | \vx\in\reals^{C_{\text{in}}\times H\times W} 123 | \end{equation} 124 | 其中 $C_{\text{in}}$ 表示通道, $H$ 表示图像高度, $W$ 表示图像深度. 125 | \end{itemize} 126 | \end{block} 127 | \end{frame} 128 | 129 | \subsection{研究工作三} 130 | 131 | \begin{frame}{研究工作三} 132 | \begin{block}{表格} 133 | 表格示例, 如表 \ref{tab:unique_values} 所示. 134 | 135 | \begin{table}[htbp] 136 | \small 137 | \centering 138 | \caption{train.csv 每列非重复元素个数} 139 | \label{tab:unique_values} 140 | \begin{tabular}{lc} 141 | \toprule 142 | column & \# unique values \\ 143 | \midrule 144 | posting\_id & 34250 \\ 145 | image & 32412 \\ 146 | image\_phash & 28735 \\ 147 | title & 33117 \\ 148 | label\_group & 11014 \\ 149 | \bottomrule 150 | \end{tabular} 151 | \end{table} 152 | \end{block} 153 | \end{frame} 154 | 155 | \subsection{研究工作四} 156 | 157 | \begin{frame}{研究工作四} 158 | \begin{block}{并排图片} 159 | 并排图片示例. 160 | \end{block} 161 | \begin{figure}[htbp] 162 | \centering 163 | \begin{minipage}[t]{0.48\textwidth} 164 | \centering 165 | \includegraphics[width=3cm]{thulogo.pdf} 166 | \caption{并排图片1} 167 | \label{fig:left_side} 168 | \end{minipage} 169 | \begin{minipage}[t]{0.48\textwidth} 170 | \centering 171 | \includegraphics[width=3cm]{thulogo.pdf} 172 | \caption{并排图片2} 173 | \label{fig:right_side} 174 | \end{minipage} 175 | \end{figure} 176 | \end{frame} 177 | 178 | \section{后期工作与安排} 179 | 180 | \subsection{后期研究工作} 181 | 182 | \begin{frame}{后期研究工作} 183 | \begin{block}{后期研究工作} 184 | \begin{itemize} 185 | \setlength{\itemsep}{6pt} 186 | \item XXXX 187 | \item XXXX 188 | \item XXXX 189 | \item XXXX 190 | \end{itemize} 191 | \end{block} 192 | \end{frame} 193 | 194 | \subsection{进度安排} 195 | 196 | \begin{frame}{进度安排} 197 | \begin{block}{进度安排} 198 | \begin{itemize} 199 | \setlength{\itemsep}{6pt} 200 | \item XXXX\cite{liu2016} 201 | \item XXXX\cite{ren2010} 202 | \item XXXX\cite{Chen1992} 203 | \item XXXX\cite{Gravagne2003} 204 | \end{itemize} 205 | \end{block} 206 | \end{frame} 207 | 208 | \section{问题与解决方案} 209 | 210 | \begin{frame}{问题与解决方案} 211 | \begin{block}{问题} 212 | \begin{itemize} 213 | \item XXXX 214 | \end{itemize} 215 | \end{block} 216 | \begin{block}{对应解决方案} 217 | \begin{itemize} 218 | \item XXXX 219 | \end{itemize} 220 | \end{block} 221 | \end{frame} 222 | 223 | \section{按时完成可能性} 224 | 225 | \begin{frame}{按时完成可能性} 226 | \begin{block}{按时完成可能性} 227 | \begin{itemize} 228 | \setlength{\itemsep}{6pt} 229 | \item XXXX\cite{xin1994} 230 | \item XXXX\cite{zhai2015} 231 | \item XXXX\cite{jones2004} 232 | \item XXXX\cite{mcmahan2005} 233 | \end{itemize} 234 | \end{block} 235 | \end{frame} 236 | 237 | \begin{frame}[allowframebreaks]{参考文献} 238 | \bibliographystyle{thubeamer} 239 | \bibliography{reference} 240 | \end{frame} 241 | 242 | \begin{frame} 243 | \begin{center} 244 | {\Huge\calligra Thanks for your attention!} 245 | \vspace{1cm} 246 | 247 | {\Huge Q \& A} 248 | \end{center} 249 | \end{frame} 250 | 251 | % 结束文档撰写 252 | \end{document} 253 | -------------------------------------------------------------------------------- /makebeamer-en.bat: -------------------------------------------------------------------------------- 1 | latexmk -c main-en 2 | pdflatex -synctex=1 -interaction=nonstopmode main-en 3 | bibtex main-en 4 | pdflatex -synctex=1 -interaction=nonstopmode main-en 5 | pdflatex -synctex=1 -interaction=nonstopmode main-en -------------------------------------------------------------------------------- /makebeamer.bat: -------------------------------------------------------------------------------- 1 | latexmk -c main 2 | pdflatex -synctex=1 -interaction=nonstopmode main 3 | bibtex main 4 | pdflatex -synctex=1 -interaction=nonstopmode main 5 | pdflatex -synctex=1 -interaction=nonstopmode main -------------------------------------------------------------------------------- /makeclean.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | del *.toc /s 3 | del *.bbl /s 4 | del *.blg /s 5 | del *.out /s 6 | del *.aux /s 7 | del *.log /s 8 | del *.bak /s 9 | del *.thm /s 10 | del *.synctex.gz /s 11 | del *.fdb_latexmk /s 12 | del *.fls /s 13 | del *.glo /s 14 | del *.gls /s 15 | del *.idx /s 16 | del *.ilg /s 17 | del *.ind /s 18 | del *.nav /s 19 | del *.snm /s 20 | del *.hd /s -------------------------------------------------------------------------------- /makecleanall.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | del *.toc /s 3 | del *.bbl /s 4 | del *.blg /s 5 | del *.out /s 6 | del *.aux /s 7 | del *.log /s 8 | del *.bak /s 9 | del *.thm /s 10 | del *.synctex.gz /s 11 | del *.fdb_latexmk /s 12 | del *.fls /s 13 | del *.glo /s 14 | del *.gls /s 15 | del *.idx /s 16 | del *.ilg /s 17 | del *.ind /s 18 | del *.nav /s 19 | del *.snm /s 20 | del *.hd /s 21 | del *.ins /s 22 | del *.sty /s -------------------------------------------------------------------------------- /makedoc.bat: -------------------------------------------------------------------------------- 1 | xelatex thubeamer.dtx 2 | makeindex -s gind.ist -o thubeamer.ind thubeamer.idx 3 | makeindex -s gglo.ist -o thubeamer.gls thubeamer.glo 4 | xelatex thubeamer.dtx 5 | xelatex thubeamer.dtx -------------------------------------------------------------------------------- /reference.bib: -------------------------------------------------------------------------------- 1 | % !Mode:: "TeX:UTF-8" 2 | 3 | @ARTICLE{ren2010, 4 | AUTHOR = "任春珍 and 杨再华 and 孙刚 and 贾探春", 5 | TITLE = "空环境飞行器交会对接设备精测工艺方法研究", 6 | JOURNAL = "航天器环境工程", 7 | PAGES = "768--771", 8 | VOLUME = "27", 9 | number = "6", 10 | YEAR = "2010", 11 | language ="zh", 12 | } 13 | 14 | @ARTICLE{Gravagne2003, 15 | author={I A {Gravagne} and C D {Rahn} and I D {Walker}}, 16 | journal={IEEE/ASME Transactions on Mechatronics}, 17 | title={Large Deflection Dynamics and Control for Planar Continuum Robots}, 18 | year={2003}, 19 | volume={8}, 20 | number={2}, 21 | pages={299--307}, 22 | } 23 | 24 | @article{webster2010, 25 | title={Design and Kinematic Modeling of Constant Curvature Continuum Robots: A Review}, 26 | author={Webster III, Robert J and Jones, Bryan A}, 27 | journal={The International Journal of Robotics Research}, 28 | volume={29}, 29 | number={13}, 30 | pages={1661--1683}, 31 | year={2010}, 32 | } 33 | 34 | @phdthesis{liu2016, 35 | title={面向狭小空间作业的绳索驱动超冗余机械臂的研究}, 36 | author={刘天亮}, 37 | school={哈尔滨工业大学}, 38 | year={2016}, 39 | pages={61--63}, 40 | ADDRESS="深圳", 41 | } 42 | 43 | @phdthesis{fu2018, 44 | title={狭小空间作业绳驱分段联动机器人设计及控制研究}, 45 | author={付亚南}, 46 | school={哈尔滨工业大学}, 47 | year={2018}, 48 | pages={12--13}, 49 | ADDRESS="深圳", 50 | } 51 | 52 | @ARTICLE{zhai2015, 53 | AUTHOR = "翟士民 and 刘荣 and 薛彤", 54 | TITLE = "绳驱动连续型机械臂设计", 55 | JOURNAL = "机械工程与自动化", 56 | PAGES = "119--121", 57 | YEAR="2015", 58 | VOLUME = "2", 59 | language ="zh", 60 | } 61 | 62 | @article{yao2015, 63 | title={蛇形臂机器人装配系统研究}, 64 | author={姚艳彬 and 杜兆才 and 魏志强}, 65 | journal={航空制造技术}, 66 | volume={491}, 67 | number={21}, 68 | YEAR="2015", 69 | pages={26--30}, 70 | language="zh", 71 | } 72 | 73 | @article{jones2006, 74 | title={Kinematics for Multisection Continuum Robots}, 75 | author={Jones, Bryan A and Walker, Ian D}, 76 | journal={IEEE Transactions on Robotics}, 77 | volume={22}, 78 | number={1}, 79 | pages={43--55}, 80 | year={2006}, 81 | } 82 | 83 | @INPROCEEDINGS{mcmahan2005, 84 | title={Design and Implementation of a Multi-section Continuum Robot: Air-Octor}, 85 | author={McMahan, William and Jones, Bryan A and Walker, Ian D}, 86 | booktitle={IEEE/RSJ International Conference on Intelligent Robots and Systems}, 87 | address={Shanghai, China}, 88 | pages={2578--2585}, 89 | year={2005}, 90 | } 91 | 92 | @inproceedings{jones2004, 93 | title={Design and Analysis of a Novel Pneumatic Manipulator}, 94 | author={Jones, Bryan A and McMahan, William and Walker, Ian}, 95 | booktitle={IFAC Symposium on Mechatronic Systems}, 96 | address={Hanburg, German}, 97 | pages={745--750}, 98 | year={2004}, 99 | } 100 | 101 | @inbook{Lin1992, 102 | language ="zh", 103 | AUTHOR = "林来兴", 104 | TITLE = "空间控制技术", 105 | PUBLISHER = "宇航出版社", 106 | YEAR = "1992", 107 | Pages = "25-42", 108 | ADDRESS = "北京", 109 | } 110 | 111 | @book{xin1994, 112 | language ="zh", 113 | title={信息技术与信息服务国际研讨会论文集}, 114 | author={辛希孟 and 中国科学院文献信息中心 and 孟广均 and 信息学}, 115 | year={1994}, 116 | publisher={中国社会科学出版社}, 117 | pages={45-49}, 118 | address={北京}, 119 | typeoflit={C}, 120 | } 121 | 122 | @phdthesis{Chen1992, 123 | language ="zh", 124 | Author = {谌颖}, 125 | Title = {空间最优交会控制理论与方法研究}, 126 | ADDRESS = "哈尔滨", 127 | School = {哈尔滨工业大学}, 128 | Year = {1992}, 129 | pages= {8-13}, 130 | } 131 | 132 | @article{hitszthesis2020, 133 | title={Dissertation Template for Harbin Institute of Technology, ShenZhen (HITSZ)}, 134 | author={Jingxuan Yang}, 135 | journal={Github}, 136 | volume={001}, 137 | number={0001}, 138 | pages={000-999}, 139 | year={2020}, 140 | } 141 | -------------------------------------------------------------------------------- /thubeamer.bst: -------------------------------------------------------------------------------- 1 | %============================================================================= 2 | % FileName: thubeamer.bst 3 | % Author: 杨敬轩(Jingxuan Yang) 4 | % Email: yanglatex2e@gmail.com 5 | % Version: 1.0.0 6 | % Modified: 杨敬轩(Jingxuan Yang) 7 | % History: Yanshuo Chu,胡海星 8 | % LastChange: 2021-07-07 16:59 9 | %============================================================================= 10 | % 11 | ENTRY % class Entry { 12 | { % public: 13 | author % String author; 14 | editor % String editor; 15 | translator % String translator; 16 | title % String title; 17 | edition % String edition; 18 | address % String address; 19 | publisher % String publisher; 20 | pages % String pages; 21 | year % String year; 22 | date % String date; 23 | modifydate % String modifydate; 24 | citedate % String citedate; 25 | url % String url; 26 | doi % String doi; 27 | language % String language; 28 | booktitle % String booktitle; 29 | journal % String journal; 30 | chapter % String chapter; 31 | series % String series; 32 | volume % String volume; 33 | number % String number; 34 | version % String version; 35 | month % String month; 36 | school % String school; 37 | institution % String institution; 38 | organization % String organization; 39 | type % String type; 40 | howpublished % String howpublished; 41 | eid % String eid; 42 | key % String key; 43 | country % String country; 44 | patentid % String patentid; 45 | media % String media; 46 | } { % // declare integer variables 47 | required % int required; // withther the bibfield is required 48 | } { % // declare String variables 49 | label % String label; // label for the entry 50 | mark % String mark; // mark for the entry 51 | % // there is ahidden entry variable sort.key$ 52 | % String sort_key; 53 | } % } 54 | % 55 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 56 | % 57 | INTEGERS { % // declare global int variables 58 | entry.count % static int entry_count; // number of entries 59 | longest.label.width % static int longest_label_width; // width of the longest label 60 | i % static int i; 61 | j % static int j; 62 | k % static int k; 63 | } % 64 | % 65 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 66 | % 67 | STRINGS { % // declare global String variables 68 | longest.label % static String longest_label; // the longest label 69 | s % static String s; 70 | t % static String t; 71 | } % 72 | % 73 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 74 | 75 | % define global static constants 76 | FUNCTION {true} {#1} 77 | FUNCTION {false} {#0} 78 | FUNCTION {debug.enabled} {true} 79 | FUNCTION {cap.volume.en} {"Vol~"} 80 | FUNCTION {cap.volume.zh} {"卷"} 81 | FUNCTION {cap.edition.en} {"~ed"} 82 | FUNCTION {cap.edition.zh} {"版"} 83 | FUNCTION {cap.anonymous.en} {"Anon"} 84 | FUNCTION {cap.anonymous.zh} {"佚名"} 85 | FUNCTION {cap.no.address.en} {"[S.l.]"} 86 | FUNCTION {cap.no.address.zh} {"[出版地不详]"} 87 | FUNCTION {cap.no.publisher.en} {"[s.n.]"} 88 | FUNCTION {cap.no.publisher.zh} {"[出版者不详]"} 89 | FUNCTION {cap.et.al.en} {", et~al"} 90 | FUNCTION {cap.et.al.zh} {", 等"} 91 | FUNCTION {cap.translate.en} {"~trans"} 92 | FUNCTION {cap.translate.zh} {"译"} 93 | FUNCTION {cap.doi.url} {"http://dx.doi.org/"} 94 | FUNCTION {cap.st.en} {"st"} 95 | FUNCTION {cap.nd.en} {"nd"} 96 | FUNCTION {cap.rd.en} {"rd"} 97 | FUNCTION {cap.th.en} {"th"} 98 | 99 | FUNCTION {cap.space} {" "} 100 | FUNCTION {cap.period} {"\@. "} 101 | FUNCTION {cap.comma} {"\@, "} 102 | FUNCTION {cap.colon} {"\thinspace{}\textnormal{: }"} 103 | FUNCTION {cap.double.slash} {" //\thinspace{}"} 104 | FUNCTION {cap.dash} {"\textnormal{-}"} 105 | 106 | % Predefined latex command used to format the style of bibitems 107 | FUNCTION {env.bibbegin} { "\begin{thebibliography}" } 108 | FUNCTION {env.bibend} { "\end{thebibliography}" } 109 | FUNCTION {cmd.bibauthor} { "\providecommand{\bibauthor}[1]{#1}" } 110 | FUNCTION {cmd.bibeditor} { "\providecommand{\bibeditor}[1]{#1}" } 111 | FUNCTION {cmd.bibtranslator} { "\providecommand{\bibtranslator}[1]{#1}" } 112 | FUNCTION {cmd.bibtitle} { "\providecommand{\bibtitle}[1]{#1}" } 113 | FUNCTION {cmd.bibbooktitle} { "\providecommand{\bibbooktitle}[1]{#1}" } 114 | FUNCTION {cmd.bibjournal} { "\providecommand{\bibjournal}[1]{#1}" } 115 | FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{\mbox{#1}}" } 116 | FUNCTION {cmd.bibcountry} { "\providecommand{\bibcountry}[1]{#1}" } 117 | FUNCTION {cmd.bibpatentid} { "\providecommand{\bibpatentid}[1]{#1}" } 118 | FUNCTION {cmd.bibedition} { "\providecommand{\bibedition}[1]{#1}" } 119 | FUNCTION {cmd.biborganization} { "\providecommand{\biborganization}[1]{#1}" } 120 | FUNCTION {cmd.bibaddress} { "\providecommand{\bibaddress}[1]{#1}" } 121 | FUNCTION {cmd.bibpublisher} { "\providecommand{\bibpublisher}[1]{#1}" } 122 | FUNCTION {cmd.bibinstitution} { "\providecommand{\bibinstitution}[1]{#1}" } 123 | FUNCTION {cmd.bibschool} { "\providecommand{\bibschool}[1]{#1}" } 124 | FUNCTION {cmd.bibvolume} { "\providecommand{\bibvolume}[1]{#1}" } 125 | FUNCTION {cmd.bibnumber} { "\providecommand{\bibnumber}[1]{#1}" } 126 | FUNCTION {cmd.bibversion} { "\providecommand{\bibversion}[1]{#1}" } 127 | FUNCTION {cmd.bibpages} { "\providecommand{\bibpages}[1]{#1}" } 128 | FUNCTION {cmd.bibmodifydate} { "\providecommand{\bibmodifydate}[1]{#1}" } 129 | FUNCTION {cmd.bibcitedate} { "\providecommand{\bibcitedate}[1]{#1}" } 130 | FUNCTION {cmd.bibyear} { "\providecommand{\bibyear}[1]{#1}" } 131 | FUNCTION {cmd.bibdate} { "\providecommand{\bibdate}[1]{#1}" } 132 | FUNCTION {cmd.biburl} { "\providecommand{\biburl}[1]{\newline\url{#1}}" } 133 | 134 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 135 | % 136 | FUNCTION {log.str} { % void Entry::log_str(String value, String message) 137 | debug.enabled { % if (debug_enabled == 1) { 138 | "DEBUG: " swap$ * " - '" * % message = "DEBUG: " + message + " - '"; 139 | swap$ * % message = message + value; 140 | "'" * % message = message + "'"; 141 | top$ % log(message); 142 | } { % } else { 143 | pop$ pop$ % return; 144 | } if$ % } 145 | } % } 146 | % 147 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 148 | % 149 | FUNCTION {log.int} { % int Entry::log_int(int value, String message) 150 | debug.enabled { % if (debug_enabled == 1) { 151 | "DEBUG: " swap$ * " - " * % message = "DEBUG: " + message + " - "; 152 | swap$ int.to.str$ * % message = message + int_to_str(value); 153 | top$ % log(message); 154 | } { % } else { 155 | pop$ pop$ % return; 156 | } if$ % } 157 | } % } 158 | % 159 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 160 | % 161 | FUNCTION {not} { % int Entry::not(int x) { 162 | { % if (x == 1) { 163 | false % return false; 164 | } { % } else { 165 | true % return true; 166 | } if$ % } 167 | } % } 168 | % 169 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 170 | % 171 | FUNCTION {and} { % int Entry::and(int x, int y) { 172 | { % if (y == 1) { 173 | skip$ % return x; 174 | } { % } else { 175 | pop$ false % return false; 176 | } if$ % } 177 | } % } 178 | % 179 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 180 | % 181 | FUNCTION {or} { % int Entry::or(int x, int y) { 182 | { % if (y == 1) { 183 | pop$ true % return true; 184 | } { % } else { 185 | skip$ % return x; 186 | } if$ % } 187 | } % } 188 | % 189 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 190 | % // calculate the length in characters of a string 191 | % // We need this function since text.length$ is NOT 192 | % // the length in characters. 193 | INTEGERS {length.i} % static int length_i; 194 | FUNCTION {length} { % int Entry::length(String str) { 195 | duplicate$ empty$ { % if (empty(str)) { 196 | pop$ #0 % return 0; 197 | } { % } else { 198 | #1 'length.i := % length_i = 1; 199 | false % int stop = false; 200 | {not} { % while (! stop) { 201 | duplicate$ length.i #1 substring$ % String tmp = substring(str, length_i, 1); 202 | "" = { % if (tmp == "") { 203 | true % stop = true; 204 | } { % } else { 205 | length.i #1 + 'length.i := % length_i = length_i + 1; 206 | false % stop = false; 207 | } if$ % } 208 | } while$ % } 209 | pop$ length.i #1 - % return length_i - 1; 210 | } if$ % } 211 | } % } 212 | % 213 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 214 | % 215 | FUNCTION {is.digit} { % int Entry::is_digit(String ch) { 216 | chr.to.int$ % int ascii = chr_to_int(ch); 217 | duplicate$ "0" chr.to.int$ < { % if (ascii < chr_to_int("0")) { 218 | pop$ false % return false; 219 | } { % } else { 220 | "9" chr.to.int$ > { % if (ascii > chr_to_int("9")) { 221 | false % return false; 222 | } { % } else { 223 | true % return true; 224 | } if$ % } 225 | } if$ % } 226 | } % } 227 | % 228 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 229 | % // test if str is a number 230 | FUNCTION {is.number} { % int Entry::is_number(String str) { 231 | duplicate$ empty$ not swap$ % int result = (! empty(str)); 232 | { duplicate$ empty$ not} { % while (! empty(str)) { 233 | duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(str, 1, 1))) { 234 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 235 | } { % } else { 236 | pop$ pop$ false % result = false; 237 | "" % str = ""; 238 | } if$ % } 239 | } while$ % } 240 | pop$ % return result; 241 | } % } 242 | % 243 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 244 | % // extract the number prefix of str 245 | FUNCTION {extract.number} { % String Entry::extract_number(String str) { 246 | duplicate$ % String suffix = str; 247 | duplicate$ length swap$ % int n = length(str); 248 | duplicate$ empty$ % int stop = empty(suffix); 249 | { not } { % while (! stop) { 250 | duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(suffix, 1, 1))) { 251 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 252 | duplicate$ empty$ % stop = empty(suffix); 253 | } { % } else { 254 | true % stop = true; 255 | } if$ % } 256 | } while$ % } 257 | length - % int n = n - length(suffix); 258 | #1 swap$ substring$ % return substring(str, 1, n); 259 | } % } 260 | % 261 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 262 | % 263 | FUNCTION {get.last.chr} { % String Entry::get_last_chr(String str) { 264 | duplicate$ length % int n = length(str); 265 | duplicate$ #0 = { % if (n == 0) { 266 | pop$ % return str; 267 | } { % } else { 268 | #1 substring$ % return substring(str, n, 1); 269 | } if$ % } 270 | } % } 271 | % 272 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 273 | % 274 | FUNCTION {get.ordinal.suffix.en} { % String Entry::get_ordinal_suffix_en(String ch) { 275 | duplicate$ "1" = { % if (num == "1") { 276 | pop$ cap.st.en % return cap_st_en; 277 | } { % } else { 278 | duplicate$ "2" = { % if (num == "2") { 279 | pop$ cap.nd.en % return cap_nd_en; 280 | } { % } else { 281 | duplicate$ "3" = { % if (num == "3") { 282 | pop$ cap.rd.en % return cap_rd_en; 283 | } { % } else { 284 | pop$ cap.th.en % return cap_th_en; 285 | } if$ % } 286 | } if$ % } 287 | } if$ % } 288 | } % } 289 | % 290 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 291 | % 292 | FUNCTION {num.to.ordinal.en} { % String Entry::num_to_ordinal_en(String num) { 293 | duplicate$ empty$ { % if (empty(num)) { 294 | skip$ % return num; 295 | } { % } else { 296 | duplicate$ get.last.chr % String ch = get_last_chr(num); 297 | get.ordinal.suffix.en % String str = get_ordinal_suffix_en(ch); 298 | * % reutrn num + str; 299 | } if$ % } 300 | } % } 301 | % 302 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 303 | % 304 | STRINGS {remove.dots.result} % static String remove_dots_result; 305 | % 306 | FUNCTION {remove.dots} { % String Entry::remove_dots(String str) { 307 | "" 'remove.dots.result := % remove_dots_result = ""; 308 | { duplicate$ empty$ not } { % while (! empty(str)) { 309 | duplicate$ #1 #2 substring$ % String tmp = substring(str, 1, 2); 310 | "\." = { % if (tmp == "\.") { 311 | #3 global.max$ substring$ % str = substring(str, 3, global_max); 312 | } { % } else { 313 | duplicate$ #1 #1 substring$ % tmp = substring(str, 1, 1); 314 | duplicate$ "." = { % if (tmp == ".") { 315 | pop$ #2 global.max$ substring$ % str = substring(str, 2, global_max); 316 | } { % } else { 317 | remove.dots.result swap$ * % tmp = remove_dots_result + tmp; 318 | 'remove.dots.result := % remove_dots_result = tmp; 319 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 320 | } if$ % } 321 | } if$ % } 322 | } while$ % } 323 | pop$ remove.dots.result % return remove_dots_result; 324 | } % } 325 | % 326 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 327 | % 328 | FUNCTION {add.brace} { % String Entry::add_brace(String str) { 329 | "{" swap$ * "}" * % return "{" + str + "}"; 330 | } % } 331 | % 332 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 333 | % 334 | FUNCTION {add.bracket} { % String Entry::bracket(String str) { 335 | "(" swap$ * ")" * % return "(" + str + ")"; 336 | } % } 337 | % 338 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 339 | % 340 | FUNCTION {add.squarebracket} { % String Entry::add_squarebracket(String str) { 341 | "[" swap$ * "]" * % return "[" + str + "]"; 342 | } % } 343 | % 344 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 345 | % 346 | FUNCTION {add.textit} { % String Entry::add_textit(String str) { 347 | "\textit{" swap$ * "}" * % return "\textit{" + str + "}"; 348 | } % } 349 | % 350 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 351 | % 352 | FUNCTION {add.textbf} { % String Entry::add_textbf(String str) { 353 | "\textbf{" swap$ * "}" * % return "\textbf{" + str + "}"; 354 | } % } 355 | % 356 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 357 | % // test if str contains a dash '-' 358 | FUNCTION {contain.dash} { % int Entry::contain_dash(String str) { 359 | false swap$ % int result = false; 360 | { duplicate$ empty$ not} { % while (! empty(str)) { 361 | duplicate$ #1 #1 substring$ "-" = { % if (substring(str, 1, 1) == "-") { 362 | pop$ pop$ true % result = true; 363 | "" % str = ""; 364 | } { % } else { 365 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 366 | } if$ % } 367 | } while$ % } 368 | pop$ % return result; 369 | } % } 370 | % 371 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 372 | % // extract the substring before the first '-' 373 | % // returns the string itself if no '-' 374 | FUNCTION {extract.before.first.dash} { % String Entry::extract_before_first_dash(String str) { 375 | duplicate$ % String suffix = str; 376 | duplicate$ length swap$ % int n = length(str); 377 | duplicate$ empty$ % int stop = empty(suffix); 378 | { not } { % while (! stop) { 379 | duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { 380 | true % stop = true; 381 | } { % } else {4r 382 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 383 | duplicate$ empty$ % stop = empty(suffix); 384 | } if$ % } 385 | } while$ % } 386 | length - % int n = n - length(suffix); 387 | #1 swap$ substring$ % return substring(str, 1, n); 388 | } % } 389 | % 390 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 391 | % // extract the substring after the first '-' 392 | % // returns the string itself if no '-' 393 | FUNCTION {extract.after.first.dash} { % String Entry::extract_after_first_dash(String str) { 394 | duplicate$ % String suffix = str; 395 | duplicate$ empty$ % int stop = empty(suffix); 396 | { not } { % while (! stop) { 397 | duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { 398 | true % stop = true; 399 | } { % } else {4r 400 | #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); 401 | duplicate$ empty$ % stop = empty(suffix); 402 | } if$ % } 403 | } while$ % } 404 | duplicate$ empty$ { % if (empty(suffix)) { 405 | pop$ % return str; 406 | } { % } else { 407 | swap$ pop$ #2 global.max$ substring$ % return substring(suffix, 2, global_max); 408 | } if$ % } 409 | } % } 410 | % 411 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 412 | % // extract the substring after the last '-' 413 | % // returns the empty string if no '-' 414 | FUNCTION {extract.after.last.dash} { % String Entry::extract_after_last_dash(String str) { 415 | duplicate$ contain.dash not { % if (! contain_dash(str)) { 416 | pop$ "" % return ""; 417 | } { % } else { 418 | {duplicate$ contain.dash} { % while (contain_dash(str)) { 419 | extract.after.first.dash % str = extract_after_first_dash(str); 420 | } while$ % } 421 | % return str; 422 | } if$ % } 423 | } % } 424 | % 425 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 426 | % 427 | FUNCTION {trim.start} { % String Entry::trim_start(String str) { 428 | {duplicate$ #1 #1 substring$ " " =} { % while (substring(str, 1, 1) == " ") { 429 | #2 global.max$ substring$ % str = substring(str, 2, global_max); 430 | } while$ % } 431 | % return str; 432 | } % } 433 | % 434 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 435 | % 436 | FUNCTION {trim.end} { % String Entry::trim_end(String str) { 437 | {duplicate$ get.last.chr " " =} { % while (get_last_chr(str) == " ") { 438 | duplicate$ length #1 - % int n = length(str) - 1; 439 | #1 swap$ substring$ % str = substring(str, 1, n); 440 | } while$ % } 441 | % return str; 442 | } % } 443 | % 444 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 445 | % 446 | FUNCTION {trim} { % String Entry::trim(String str) { 447 | trim.start % str = trim_start(str); 448 | trim.end % return trim_end(str); 449 | } % } 450 | % 451 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 452 | % 453 | FUNCTION {start.bibitem} { % void Entry::start_bibitem() { 454 | newline$ % writeln(); 455 | "\bibitem{" cite$ * "}" * write$ % write("\bibitem{" + this.cite + "}"); 456 | newline$ % writeln(); 457 | } % } 458 | % 459 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 460 | % 461 | FUNCTION {end.bibitem} { % void Entry::end_bibitem() { 462 | cap.period write$ % write(cap_period); 463 | newline$ % writeln(); 464 | } % } 465 | % 466 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 467 | % 468 | FUNCTION {is.in.chinese} { % int Entry::is_in_chinese() { 469 | language empty$ { % if (empty(this.language)) { 470 | false % return false; 471 | } { % } else { 472 | language "zh" = { % if (this.language == "zh") { 473 | true % return true; 474 | } { % } else { 475 | false % return false; 476 | } if$ % } 477 | } if$ % } 478 | } % } 479 | % 480 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 481 | % 482 | FUNCTION {is.online} { % int Entry::is_online() { 483 | url empty$ not { % if (! empty(this.url)) { 484 | true % return true; 485 | } { % } else { 486 | doi empty$ not { % if (! empty(this.doi)) { 487 | true % return true; 488 | } { % } else { 489 | false % return false; 490 | } if$ % } 491 | } if$ % } 492 | } % } 493 | % 494 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 495 | % 496 | FUNCTION {set.mark} { % void Entry::set_mark(String mark) { 497 | 'mark := % this.mark = mark; 498 | is.online { % if (is_online()) { 499 | mark "/OL" * 'mark := % this.mark = this.mark + "/OL"; 500 | } { % } else { 501 | media empty$ not { % if (! empty(this.media)) { 502 | mark "/" * media * 'mark := % this.mark = this.mark + "/" + this.media; 503 | } 'skip$ if$ % } 504 | } if$ % } 505 | } % } 506 | % 507 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 508 | % 509 | FUNCTION {cap.volume} { % String Entry::cap_volume() { 510 | is.in.chinese { % if (is_in_chinese()) { 511 | cap.volume.zh % return cap_volume_zh; 512 | } { % } else { 513 | cap.volume.en % return cap_volume_en; 514 | } if$ % } 515 | } % } 516 | % 517 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 518 | % 519 | FUNCTION {cap.edition} { % String Entry::cap_edition() { 520 | is.in.chinese { % if (is_in_chinese()) { 521 | cap.edition.zh % return cap_edition_zh; 522 | } { % } else { 523 | cap.edition.en % return cap_edition_en; 524 | } if$ % } 525 | } % } 526 | % 527 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 528 | % 529 | FUNCTION {cap.anonymous} { % String Entry::cap_anonymous() { 530 | is.in.chinese { % if (is_in_chinese()) { 531 | cap.anonymous.zh % return cap_anonymous_zh; 532 | } { % } else { 533 | cap.anonymous.en % return cap_anonymous_en; 534 | } if$ % } 535 | } % } 536 | % 537 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 538 | % 539 | FUNCTION {cap.no.address} { % String Entry::cap_no_address() { 540 | is.in.chinese { % if (is_in_chinese()) { 541 | cap.no.address.zh % return cap_no_address_zh; 542 | } { % } else { 543 | cap.no.address.en % return cap_no_address_en; 544 | } if$ % } 545 | } % } 546 | % 547 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 548 | % 549 | FUNCTION {cap.no.publisher} { % String Entry::cap_no_publisher() { 550 | is.in.chinese { % if (is_in_chinese()) { 551 | cap.no.publisher.zh % return cap_no_publisher_zh; 552 | } { % } else { 553 | cap.no.publisher.en % return cap_no_publisher_en; 554 | } if$ % } 555 | } % } 556 | % 557 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 558 | % 559 | FUNCTION {cap.et.al} { % String Entry::cap_et_al() { 560 | is.in.chinese { % if (is_in_chinese()) { 561 | cap.et.al.zh % return cap_et_al_zh; 562 | } { % } else { 563 | cap.et.al.en % return cap_et_al_en; 564 | } if$ % } 565 | } % } 566 | % 567 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 568 | % 569 | FUNCTION {cap.translate} { % String Entry::cap_translate() { 570 | is.in.chinese { % if (is_in_chinese()) { 571 | cap.translate.zh % return cap_translate_zh; 572 | } { % } else { 573 | cap.translate.en % return cap_translate_en; 574 | } if$ % } 575 | } % } 576 | % 577 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 578 | % 579 | FUNCTION {format.bibinfo} { % String Entry::format_bibinfo(String info, String type) { 580 | swap$ add.brace swap$ % info = add_brace(info); 581 | "\bib" swap$ * swap$ * % return "\bib" + type + info; 582 | } % } 583 | % 584 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 585 | INTEGERS { nameindex namecount } % static int nameindex, namecount; 586 | STRINGS { namelist nameformat } % static String namelist, nameformat; 587 | STRINGS { firstname lastname jrname vonname} % static String firstname, lastname, jrname, vonname; 588 | % 589 | FUNCTION {format.names} { % String Entry::format_names(String names) { 590 | 'namelist := % namelist = names; 591 | namelist num.names$ 'namecount := % namecount = num_names(namelist); 592 | "" % String result = ""; 593 | #0 'nameindex := % nameindex = 0; 594 | {nameindex namecount < nameindex #3 < and} { % while ((nameindex < namecount) && (nameindex < 3)) { 595 | nameindex #1 + 'nameindex := % nameindex = nameindex + 1; 596 | nameindex #1 > { % if (nameindex > 1) { 597 | cap.comma * % result = result + cap_comma; 598 | } 'skip$ if$ % } 599 | namelist nameindex "{vv}" format.name$ % String tmp = format_name(namelist, nameindex, "{vv}"); 600 | 'vonname := % vonname = tmp; 601 | namelist nameindex "{jj}" format.name$ % tmp = format_name(namelist, nameindex, "{jj}"); 602 | remove.dots 'jrname := % jrname = remove_dots(tmp); 603 | namelist nameindex "{f}" format.name$ % tmp = format_name(namelist, nameindex, "{f}"); 604 | remove.dots % tmp = remove_dots(tmp); 605 | 'firstname := % firstname = change_case(tmp, "u"); 606 | namelist nameindex "{ll}" format.name$ % tmp = format_name(namelist, nameindex, "{ll}"); 607 | 'lastname := % lastname = change_case(tmp, "u"); 608 | jrname empty$ not { % if (! empty(jrname)) { 609 | jrname * " " * % result = result + jrname + " " 610 | } 'skip$ if$ % } 611 | vonname empty$ not { % if (! empty(vonname)) { 612 | vonname * " " * % result = result + vonname + " " 613 | } 'skip$ if$ % } 614 | lastname empty$ not { % if (! empty(lastname)) { 615 | lastname * " " * % result = result + lastname + " " 616 | } 'skip$ if$ % } 617 | firstname empty$ not { % if (! empty(firstname)) { 618 | firstname * " " * % result = result + firstname + " " 619 | } 'skip$ if$ % } 620 | trim.end % result = trim_end(result); 621 | } while$ % } 622 | nameindex namecount < { % if (nameindex < namecount) { 623 | cap.et.al * % result = result + cap_et_al(); 624 | } 'skip$ if$ % } 625 | } % } 626 | % 627 | % 628 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 629 | % // format English names 630 | FUNCTION {format.names.en} { % String Entry::format_names_en(String names) { 631 | format.names % format_names(names); 632 | } % } 633 | % 634 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 635 | % // format Chinese names 636 | FUNCTION {format.names.zh} { % String Entry::format_names_zh(String names) { 637 | format.names % format_names(names); 638 | } % } 639 | % 640 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 641 | % 642 | FUNCTION {format.author} { % String Emtry::format_author(String authors) { 643 | is.in.chinese { % if (is_in_chinese) { 644 | format.names.zh % authors = format_names_zh(authors); 645 | } { % } else { 646 | format.names.en % authors = format_names_en(authors); 647 | } if$ % } 648 | "author" format.bibinfo % return format_bibinfo(authors, "author"); 649 | } % } 650 | % 651 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 652 | % 653 | FUNCTION {format.editor} { % String Emtry::format_author(String editors) { 654 | is.in.chinese { % if (is_in_chinese) { 655 | format.names.zh % editors = format_names_zh(editors); 656 | } { % } else { 657 | format.names.en % editors = format_names_en(editors); 658 | } if$ % } 659 | "editor" format.bibinfo % return format_bibinfo(editors, "editor"); 660 | } % } 661 | % 662 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 663 | % 664 | FUNCTION {format.translator} { % String Emtry::format_translator(String translators) { 665 | is.in.chinese { % if (is_in_chinese) { 666 | duplicate$ % String names = translators; 667 | format.names.zh % translators = format_names_zh(translators); 668 | swap$ num.names$ #3 > { % if (num_names(names) > 3) { 669 | cap.translate.zh * % translators = translators + cap_translate_zh; 670 | } { % } else { 671 | cap.comma * cap.translate.zh * % translators = translators + cap_comma + cap_translate_zh; 672 | } if$ % } 673 | } { % } else { 674 | duplicate$ % String names = translators; 675 | format.names.en % translators = format_names_en(translators); 676 | swap$ num.names$ #3 > { % if (num_names(names) > 3) { 677 | cap.translate.en * % translators = translators + cap_translate_en; 678 | } { % } else { 679 | cap.comma * cap.translate.en * % translators = translators + cap_comma + cap_translate_en; 680 | } if$ % } 681 | } if$ % } 682 | "translator" format.bibinfo % return format_bibinfo(translator, "translator"); 683 | } % } 684 | % 685 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 686 | % 687 | FUNCTION {format.title} { % String Emtry::format_title(String title) { 688 | "title" format.bibinfo % return format_bibinfo(title, "title"); 689 | } % } 690 | % 691 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 692 | % 693 | FUNCTION {format.booktitle} { % String Emtry::format_booktitle(String booktitle) { 694 | "booktitle" format.bibinfo % return format_bibinfo(booktitle, "booktitle"); 695 | } % } 696 | % 697 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 698 | % 699 | FUNCTION {format.mark} { % String Emtry::format_mark(String mark) { 700 | "[" swap$ * "]" * % mark = "[" + mark + "]"; 701 | "mark" format.bibinfo % return format_bibinfo(mark, "mark"); 702 | } % } 703 | % 704 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 705 | % 706 | FUNCTION {format.country} { % String Emtry::format_country(String country) { 707 | "country" format.bibinfo % return format_bibinfo(country, "country"); 708 | } % } 709 | % 710 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 711 | % 712 | FUNCTION {format.patentid} { % String Emtry::format_patentid(String patentid) { 713 | "patentid" format.bibinfo % return format_bibinfo(patentid, "patentid"); 714 | } % } 715 | % 716 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 717 | % 718 | FUNCTION {format.edition} { % String Emtry::format_edition(String edition) { 719 | duplicate$ is.number { % if (is_number(edition)) { 720 | is.in.chinese { % if (is_in_chinese()) { 721 | cap.edition.zh * % edition = edition + cap_edition_zh; 722 | } { % } else { 723 | num.to.ordinal.en cap.edition.en * % edition = num_to_ordinal_en(edition) + cap_edition_en; 724 | } if$ % } 725 | } 'skip$ if$ % } 726 | % // use a \mbox{} to prevent line break within edition 727 | "\mbox{" swap$ * "}" * % edition = "\mbox{" + edition + "}"; 728 | "edition" format.bibinfo % return format_bibinfo(edition, "edition"); 729 | } % } 730 | % 731 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 732 | % 733 | FUNCTION {format.organization} { % String Emtry::format_organization(String organization) { 734 | "organization" format.bibinfo % return format_bibinfo(organization, "organization"); 735 | } % } 736 | % 737 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 738 | % 739 | FUNCTION {format.address} { % String Emtry::format_address(String address) { 740 | "address" format.bibinfo % return format_bibinfo(address, "address"); 741 | } % } 742 | % 743 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 744 | % 745 | FUNCTION {format.publisher} { % String Emtry::format_publisher(String publisher) { 746 | "publisher" format.bibinfo % return format_bibinfo(publisher, "publisher"); 747 | } % } 748 | % 749 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 750 | % 751 | FUNCTION {format.institution} { % String Emtry::format_institution(String institution) { 752 | "institution" format.bibinfo % return format_bibinfo(institution, "institution"); 753 | } % } 754 | % 755 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 756 | % 757 | FUNCTION {format.school} { % String Emtry::format_school(String school) { 758 | "school" format.bibinfo % return format_bibinfo(school, "school"); 759 | } % } 760 | % 761 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 762 | % 763 | FUNCTION {format.year} { % String Emtry::format_year(String year) { 764 | "year" format.bibinfo % return format_bibinfo(year, "year"); 765 | } % } 766 | % 767 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 768 | % 769 | FUNCTION {format.date} { % String Emtry::format_date(String date) { 770 | "date" format.bibinfo % return format_bibinfo(date, "date"); 771 | } % } 772 | % 773 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 774 | % 775 | FUNCTION {format.journal} { % String Emtry::format_journal(String journal) { 776 | "journal" format.bibinfo % return format_bibinfo(journal, "journal"); 777 | } % } 778 | % 779 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 780 | % 781 | FUNCTION {format.volume} { % String Emtry::format_volume(String volume) { 782 | "volume" format.bibinfo % return format_bibinfo(volume, "volume"); 783 | } % } 784 | % 785 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 786 | % 787 | FUNCTION {format.number} { % String Emtry::format_number(String number) { 788 | add.bracket % number = add_bracket(number); 789 | "number" format.bibinfo % return format_bibinfo(number, "number"); 790 | } % } 791 | % 792 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 793 | % 794 | FUNCTION {format.report.number} { % String Emtry::format_report_number(String number) { 795 | "number" format.bibinfo % return format_bibinfo(number, "number"); 796 | } % } 797 | % 798 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 799 | % 800 | FUNCTION {format.version} { % String Emtry::format_version(String version) { 801 | "version" format.bibinfo % return format_bibinfo(version, "version"); 802 | } % } 803 | % 804 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 805 | % 806 | FUNCTION {format.pages} { % String Emtry::format_pages(String pages) { 807 | "pages" format.bibinfo % return format_bibinfo(pages, "pages"); 808 | } % } 809 | % 810 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 811 | % 812 | FUNCTION {format.modifydate} { % String Emtry::format_modifydate(String modifydate) { 813 | add.bracket % modifydate = add_bracket(modifydate); 814 | "modifydate" format.bibinfo % return format_bibinfo(modifydate, "modifydate"); 815 | } % } 816 | % 817 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 818 | % 819 | FUNCTION {format.citedate} { % String Emtry::format_citedate(String citedate) { 820 | add.squarebracket % citedate = add_squarebracket(citedate); 821 | "citedate" format.bibinfo % return format_bibinfo(citedate, "citedate"); 822 | } % } 823 | % 824 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 825 | % 826 | % // NOTE: do not use the format_bibinfo() for URL, 827 | % // since if the URL contains special symbols such 828 | % // as '%', the \biburl{} will be broken. 829 | FUNCTION {format.url} { % String Emtry::format_url(String url) { 830 | "\url{" swap$ * "}" * % return "\url{" + url + "}"; 831 | } % } 832 | % 833 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 834 | % 835 | FUNCTION {get.full.title} { % String Entry::get_full_title() { 836 | series empty$ { % if (empty(this.series)) { 837 | volume empty$ { % if (empty(this.volume)) { 838 | title % return this.title; 839 | } { % } else { 840 | title cap.colon * cap.volume * volume * % return this.title + cap_colon + cap_volume() + this.volume; 841 | } if$ % } 842 | } { % } else { 843 | volume empty$ { % if (empty(this.volume)) { 844 | series cap.colon * title * % return this.series + cap_colon + this.title; 845 | } { % } else { 846 | series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; 847 | cap.colon * title * % return str + cap_colon + this.title; 848 | } if$ % } 849 | } if$ % } 850 | } % } 851 | % 852 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 853 | % 854 | FUNCTION {get.full.booktitle} { % String Entry::get_full_booktitle() { 855 | series empty$ { % if (empty(this.series)) { 856 | volume empty$ { % if (empty(this.volume)) { 857 | booktitle % return this.booktitle; 858 | } { % } else { 859 | booktitle cap.colon * cap.volume * volume * % return this.booktitle + cap_colon + cap_volume() + this.volume; 860 | } if$ % } 861 | } { % } else { 862 | volume empty$ { % if (empty(this.volume)) { 863 | series cap.colon * booktitle * % return this.series + cap_colon + this.booktitle; 864 | } { % } else { 865 | series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; 866 | cap.colon * booktitle * % return str + cap_colon + this.booktitle; 867 | } if$ % } 868 | } if$ % } 869 | } % } 870 | % 871 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 872 | % 873 | FUNCTION {get.pages} { % String Entry::get_pages() { 874 | pages contain.dash { % if (contain_dash(this.pages)) { 875 | pages extract.before.first.dash % String p1 = extract_before_first_dash(this.pages); 876 | pages extract.after.last.dash % String p2 = extract_after_last_dash(this.pages); 877 | cap.dash swap$ * * % return p1 + cap_dash + p2; 878 | } { % } else { 879 | pages % return this.pages; 880 | } if$ % } 881 | } % } 882 | % 883 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 884 | % 885 | FUNCTION {output.author.or.editor} { % void Entry::output_author_or_editor(int required) { 886 | 'required := % this.required = required; 887 | author empty$ not { % if (! empty(this.author)) { 888 | author format.author write$ % write(format_author(this.author)); 889 | cap.period write$ % write(cap_period); 890 | } { % } else { 891 | editor empty$ not { % if (! empty(this.editor)) { 892 | editor format.editor write$ % write(format_editor(this.editor)); 893 | cap.period write$ % write(cap_period); 894 | } { % } else { 895 | required { % if (required == 1) { 896 | "Require author/editor: " cite$ * warning$% warning("Require author/editor: " + this.cite); 897 | cap.anonymous format.author write$ % write(format_author(cap_anonymous())); 898 | cap.period write$ % write(cap_period); 899 | } 'skip$ if$ % } 900 | } if$ % } 901 | } if$ % } 902 | } % } 903 | % 904 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 905 | % 906 | FUNCTION {output.author} { % void Entry::output_author(int required) { 907 | 'required := % this.required = required; 908 | author empty$ not { % if (! empty(this.author)) { 909 | author format.author write$ % write(format_author(this.author)); 910 | cap.period write$ % write(cap_period); 911 | } { % } else { 912 | required { % if (required == 1) { 913 | "Require author: " cite$ * warning$ % warning("Require author: " + this.cite); 914 | cap.anonymous format.author write$ % write(format_author(cap_anonymous())); 915 | cap.period write$ % write(cap_period); 916 | } 'skip$ if$ % } 917 | } if$ % } 918 | } % } 919 | % 920 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 921 | % 922 | FUNCTION {output.editor} { % void Entry::output_editor(int required) { 923 | 'required := % this.required = required; 924 | editor empty$ not { % if (! empty(this.editor)) { 925 | editor format.editor write$ % write(format_editor(this.editor)); 926 | cap.period write$ % write(cap_period); 927 | } { % } else { 928 | required { % if (required == 1) { 929 | "Require editor: " cite$ * warning$ % warning("Require editor: " + this.cite); 930 | cap.anonymous format.editor write$ % write(format_editor(cap_anonymous())); 931 | cap.period write$ % write(cap_period); 932 | } 'skip$ if$ % } 933 | } if$ % } 934 | } % } 935 | % 936 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 937 | % 938 | FUNCTION {output.title} { % void Entry::output_title(int required) { 939 | 'required := % this.required = required; 940 | title empty$ not { % if (! empty(this.title)) { 941 | title format.title write$ % write(format_title(this.title)); 942 | } { % } else { 943 | required { % if (required == 1) { 944 | "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); 945 | } 'skip$ if$ % } 946 | } if$ % } 947 | } % } 948 | % 949 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 950 | % 951 | FUNCTION {output.series.volume.title} { % void Entry::output_series_volume_title(int required) { 952 | 'required := % this.required = required; 953 | title empty$ not { % if (! empty(this.title)) { 954 | get.full.title format.booktitle write$ % write(format_booktitle(get_full_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.booktitle} { % void Entry::output_series_volume_booktitle(int required) { 965 | 'required := % this.required = required; 966 | booktitle empty$ not { % if (! empty(this.booktitle)) { 967 | get.full.booktitle format.booktitle write$ % write(format_booktitle(get_full_booktitle()); 968 | } { % } else { 969 | required { % if (required == 1) { 970 | "Require booktitle: " cite$ * warning$ % warning("Require booktitle: " + this.cite); 971 | } 'skip$ if$ % } 972 | } if$ % } 973 | } % } 974 | % 975 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 976 | % 977 | FUNCTION {output.journal} { % void Entry::output_journal(int required) { 978 | 'required := % this.required = required; 979 | journal empty$ not { % if (! empty(this.journal)) { 980 | cap.period write$ % write(cap_period); 981 | journal format.journal write$ % write(format_journal(this.journal)); 982 | } { % } else { 983 | required { % if (required == 1) { 984 | "Require journal: " cite$ * warning$ % warning("Require journal: " + this.cite); 985 | } 'skip$ if$ % } 986 | } if$ % } 987 | } % } 988 | % 989 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 990 | % 991 | FUNCTION {output.mark} { % void Entry::output_mark(int required) { 992 | 'required := % this.required = required; 993 | mark empty$ not { % if (! empty(this.mark)) { 994 | mark format.mark write$ % write(format_mark(this.mark)); 995 | } { % } else { 996 | required { % if (required == 1) { 997 | "Require mark: " cite$ * warning$ % warning("Require mark: " + this.cite); 998 | } 'skip$ if$ % } 999 | } if$ % } 1000 | } % } 1001 | % 1002 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1003 | % 1004 | FUNCTION {output.translator} { % void Entry::output_translator(int required) { 1005 | 'required := % this.required = required; 1006 | translator empty$ not { % if (! empty(this.translator)) { 1007 | cap.period write$ % write(cap_period); 1008 | translator format.translator write$ % write(format_translator(this.translator)); 1009 | } { % } else { 1010 | required { % if (required == 1) { 1011 | "Require translator: " cite$ * warning$ % warning("Require translator: " + this.cite); 1012 | } 'skip$ if$ % } 1013 | } if$ % } 1014 | } % } 1015 | % 1016 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1017 | % 1018 | FUNCTION {output.edition} { % void Entry::output_edition(int required) { 1019 | 'required := % this.required = required; 1020 | edition empty$ not { % if (! empty(this.edition)) { 1021 | cap.period write$ % write(cap_period); 1022 | edition format.edition write$ % write(format_edition(this.edition)); 1023 | } { % } else { 1024 | required { % if (required == 1) { 1025 | "Require edition: " cite$ * warning$ % warning("Require edition: " + this.cite); 1026 | } 'skip$ if$ % } 1027 | } if$ % } 1028 | } % } 1029 | % 1030 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1031 | % 1032 | FUNCTION {output.address} { % void Entry::output_address(int required) { 1033 | 'required := % this.required = required; 1034 | address empty$ not { % if (! empty(this.address)) { 1035 | cap.period write$ % write(cap_period); 1036 | address format.address write$ % write(format_address(this.address)); 1037 | } { % } else { 1038 | required { % if (required == 1) { 1039 | "Require address: " cite$ * warning$ % warning("Require address: " + this.cite); 1040 | cap.period write$ % write(cap_period); 1041 | cap.no.address format.address write$ % write(format_address(cap_no_address())); 1042 | } 'skip$ if$ % } 1043 | } if$ % } 1044 | } % } 1045 | % 1046 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1047 | % 1048 | FUNCTION {output.inproaddress} { % void Entry::output_inproaddress(int required) { 1049 | 'required := % this.required = required; 1050 | address empty$ not { % if (! empty(this.address)) { 1051 | cap.comma write$ % write(cap_comma); 1052 | address format.address write$ % write(format_address(this.address)); 1053 | } { % } else { 1054 | required { % if (required == 1) { 1055 | "Require address: " cite$ * warning$ % warning("Require address: " + this.cite); 1056 | cap.comma write$ % write(cap_comma); 1057 | cap.no.address format.address write$ % write(format_address(cap_no_address())); 1058 | } 'skip$ if$ % } 1059 | } if$ % } 1060 | } % } 1061 | % 1062 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1063 | % 1064 | FUNCTION {output.publisher} { % void Entry::output_publisher(int required) { 1065 | 'required := % this.required = required; 1066 | publisher empty$ not { % if (! empty(this.publisher)) { 1067 | cap.colon write$ % write(cap_colon); 1068 | publisher format.publisher write$ % write(format_publisher(this.publisher)); 1069 | } { % } else { 1070 | required { % if (required == 1) { 1071 | "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1072 | cap.colon write$ % write(cap_colon); 1073 | cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); 1074 | } 'skip$ if$ % } 1075 | } if$ % } 1076 | } % } 1077 | % 1078 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1079 | % 1080 | FUNCTION {output.publisher.no.address} { % void Entry::output_publisher_no_address(int required) { 1081 | 'required := % this.required = required; 1082 | publisher empty$ not { % if (! empty(this.publisher)) { 1083 | cap.period write$ % write(cap_period); 1084 | publisher format.publisher write$ % write(format_publisher(this.publisher)); 1085 | } { % } else { 1086 | required { % if (required == 1) { 1087 | "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1088 | cap.period write$ % write(cap_period); 1089 | cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); 1090 | } 'skip$ if$ % } 1091 | } if$ % } 1092 | } % } 1093 | % 1094 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1095 | % 1096 | FUNCTION {output.school} { % void Entry::output_school(int required) { 1097 | 'required := % this.required = required; 1098 | school empty$ not { % if (! empty(this.school)) { 1099 | cap.colon write$ % write(cap_colon); 1100 | school format.school write$ % write(format_school(this.school)); 1101 | } { % } else { 1102 | required { % if (required == 1) { 1103 | "Require school: " cite$ * warning$ % warning("Require publisher: " + this.cite); 1104 | cap.colon write$ % write(cap_colon); 1105 | cap.no.publisher format.school write$ % write(format_school(cap_no_publisher())); 1106 | } 'skip$ if$ % } 1107 | } if$ % } 1108 | } % } 1109 | % 1110 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1111 | % 1112 | FUNCTION {output.institution} { % void Entry::output_institution(int required) { 1113 | 'required := % this.required = required; 1114 | institution empty$ not { % if (! empty(this.institution)) { 1115 | cap.colon write$ % write(cap_colon); 1116 | institution format.institution write$ % write(format_publisher(this.institution)); 1117 | } { % } else { 1118 | required { % if (required == 1) { 1119 | "Require institution: " cite$ * warning$ % warning("Require institution: " + this.cite); 1120 | cap.colon write$ % write(cap_colon); 1121 | cap.no.publisher format.institution write$ % write(format_institution(cap_no_publisher())); 1122 | } 'skip$ if$ % } 1123 | } if$ % } 1124 | } % } 1125 | % 1126 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1127 | % 1128 | FUNCTION {output.year} { % void Entry::output_year(int required) { 1129 | 'required := % this.required = required; 1130 | year empty$ not { % if (! empty(this.year)) { 1131 | year format.year write$ % write(format_year(this.year)); 1132 | } { % } else { 1133 | required { % if (required == 1) { 1134 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1135 | } 'skip$ if$ % } 1136 | } if$ % } 1137 | } % } 1138 | % 1139 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1140 | % 1141 | FUNCTION {output.pages} { % void Entry::output_pages(int required) { 1142 | 'required := % this.required = required; 1143 | pages empty$ not { % if (! empty(this.pages)) { 1144 | cap.colon write$ % write(cap_colon); 1145 | get.pages format.pages write$ % write(format_pages(get_pages())); 1146 | } { % } else { 1147 | required { % if (required == 1) { 1148 | "Require pages: " cite$ * warning$ % warning("Require pages: " + this.cite); 1149 | } 'skip$ if$ % } 1150 | } if$ % } 1151 | } % } 1152 | % 1153 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1154 | % 1155 | FUNCTION {output.modifydate} { % void Entry::output_modifydate(int required) { 1156 | 'required := % this.required = required; 1157 | modifydate empty$ not { % if (! empty(this.modifydate)) { 1158 | cap.space write$ % write(cap_space); 1159 | modifydate format.modifydate write$ % write(format_modifydate(this.modifydate)); 1160 | } { % } else { 1161 | required { % if (required == 1) { 1162 | "Require modifydate: " cite$ * warning$ % warning("Require modifydate: " + this.cite); 1163 | } 'skip$ if$ % } 1164 | } if$ % } 1165 | } % } 1166 | % 1167 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1168 | % 1169 | FUNCTION {output.citedate} { % void Entry::output_citedate(int required) { 1170 | 'required := % this.required = required; 1171 | citedate empty$ not { % if (! empty(this.citedate)) { 1172 | cap.space write$ % write(cap_space); 1173 | citedate format.citedate write$ % write(format_citedate(this.citedate)); 1174 | } { % } else { 1175 | required is.online or { % if ((required == 1) || (is_online())) { 1176 | "Require citedate: " cite$ * warning$ % warning("Require citedate: " + this.cite); 1177 | } 'skip$ if$ % } 1178 | } if$ % } 1179 | } % } 1180 | % 1181 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1182 | % 1183 | FUNCTION {output.date} { % void Entry::output_date(int required) { 1184 | 'required := % this.required = required; 1185 | date empty$ not { % if (! empty(this.date)) { 1186 | date format.date write$ % write(format_date(this.date)); 1187 | } { % } else { 1188 | required { % if (required == 1) { 1189 | "Require date: " cite$ * warning$ % warning("Require date: " + this.cite); 1190 | } 'skip$ if$ % } 1191 | } if$ % } 1192 | } % } 1193 | % 1194 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1195 | % 1196 | FUNCTION {output.volume} { % void Entry::output_volume(int required) { 1197 | 'required := % this.required = required; 1198 | volume empty$ not { % if (! empty(this.volume)) { 1199 | cap.comma write$ % write(cap_comma); 1200 | volume format.volume write$ % write(format_volume(this.volume)); 1201 | } { % } else { 1202 | required { % if (required == 1) { 1203 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1204 | } 'skip$ if$ % } 1205 | } if$ % } 1206 | } % } 1207 | % 1208 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1209 | % 1210 | FUNCTION {output.number} { % void Entry::output_number(int required) { 1211 | 'required := % this.required = required; 1212 | number empty$ not { % if (! empty(this.number)) { 1213 | number format.number write$ % write(format_number(this.number)); 1214 | } { % } else { 1215 | required { % if (required == 1) { 1216 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1217 | } 'skip$ if$ % } 1218 | } if$ % } 1219 | } % } 1220 | % 1221 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1222 | % 1223 | FUNCTION {output.report.number} { % void Entry::output_report_number(int required) { 1224 | 'required := % this.required = required; 1225 | number empty$ not { % if (! empty(this.number)) { 1226 | cap.colon write$ % write(cap_colon); 1227 | number format.report.number write$ % write(format_report_number(this.number)); 1228 | } { % } else { 1229 | required { % if (required == 1) { 1230 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1231 | } 'skip$ if$ % } 1232 | } if$ % } 1233 | } % } 1234 | % 1235 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1236 | % 1237 | FUNCTION {output.country} { % void Entry::output_country(int required) { 1238 | 'required := % this.required = required; 1239 | country empty$ not { % if (! empty(this.country)) { 1240 | cap.colon write$ % write(cap_colon); 1241 | country format.country write$ % write(format_country(this.country)); 1242 | } { % } else { 1243 | required { % if (required == 1) { 1244 | "Require country: " cite$ * warning$ % warning("Require country: " + this.cite); 1245 | } 'skip$ if$ % } 1246 | } if$ % } 1247 | } % } 1248 | % 1249 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1250 | % 1251 | FUNCTION {output.patentid} { % void Entry::output_patentid(int required) { 1252 | 'required := % this.required = required; 1253 | patentid empty$ not { % if (! empty(this.patentid)) { 1254 | cap.comma write$ % write(cap_comma); 1255 | patentid format.patentid write$ % write(format_patentid(this.patentid)); 1256 | } { % } else { 1257 | required { % if (required == 1) { 1258 | "Require patentid: " cite$ * warning$ % warning("Require patentid: " + this.cite); 1259 | } 'skip$ if$ % } 1260 | } if$ % } 1261 | } % } 1262 | % 1263 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1264 | % 1265 | FUNCTION {output.start.year} { % void Entry::output_start_year(int required) { 1266 | 'required := % this.required = required; 1267 | year empty$ not { % if (! empty(this.year)) { 1268 | year extract.before.first.dash % String str = extract_before_first_dash(this.year); 1269 | format.year write$ % write(format_year(str)); 1270 | } { % } else { 1271 | required { % if (required == 1) { 1272 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1273 | } 'skip$ if$ % } 1274 | } if$ % } 1275 | } % } 1276 | % 1277 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1278 | % 1279 | FUNCTION {output.start.volume} { % void Entry::output_start_volume(int required) { 1280 | 'required := % this.required = required; 1281 | volume empty$ not { % if (! empty(this.volume)) { 1282 | cap.comma write$ % write(cap_comma); 1283 | volume extract.before.first.dash % String str = extract_before_first_dash(this.volume); 1284 | format.volume write$ % write(format_volume(str)); 1285 | } { % } else { 1286 | required { % if (required == 1) { 1287 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1288 | } 'skip$ if$ % } 1289 | } if$ % } 1290 | } % } 1291 | % 1292 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1293 | % 1294 | FUNCTION {output.start.number} { % void Entry::output_start_number(int required) { 1295 | 'required := % this.required = required; 1296 | number empty$ not { % if (! empty(this.number)) { 1297 | number extract.before.first.dash % String str = extract_before_first_dash(this.number); 1298 | format.number write$ % write(format_number(str)); 1299 | } { % } else { 1300 | required { % if (required == 1) { 1301 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1302 | } 'skip$ if$ % } 1303 | } if$ % } 1304 | } % } 1305 | % 1306 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1307 | % 1308 | FUNCTION {output.end.year} { % void Entry::output_end_year(int required) { 1309 | 'required := % this.required = required; 1310 | year empty$ not { % if (! empty(this.year)) { 1311 | year extract.after.last.dash % String str = extract_after_last_dash(this.year); 1312 | format.year write$ % write(format_year(str)); 1313 | } { % } else { 1314 | required { % if (required == 1) { 1315 | "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); 1316 | } 'skip$ if$ % } 1317 | } if$ % } 1318 | } % } 1319 | % 1320 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1321 | % 1322 | FUNCTION {output.end.volume} { % void Entry::output_end_volume(int required) { 1323 | 'required := % this.required = required; 1324 | volume empty$ not { % if (! empty(this.volume)) { 1325 | cap.comma write$ % write(cap_comma); 1326 | volume extract.after.last.dash % String str = extract_after_last_dash(this.volume); 1327 | format.volume write$ % write(format_volume(str)); 1328 | } { % } else { 1329 | required { % if (required == 1) { 1330 | "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); 1331 | } 'skip$ if$ % } 1332 | } if$ % } 1333 | } % } 1334 | % 1335 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1336 | % 1337 | FUNCTION {output.end.number} { % void Entry::output_end_number(int required) { 1338 | 'required := % this.required = required; 1339 | number empty$ not { % if (! empty(this.number)) { 1340 | number extract.after.last.dash % String str = extract_after_last_dash(this.number); 1341 | format.number write$ % write(format_number(str)); 1342 | } { % } else { 1343 | required { % if (required == 1) { 1344 | "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); 1345 | } 'skip$ if$ % } 1346 | } if$ % } 1347 | } % } 1348 | % 1349 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1350 | % 1351 | FUNCTION {output.url.or.doi} { % void Entry::output_url_or_doi(int required) { 1352 | 'required := % this.required = required; 1353 | url empty$ not { % if (! empty(this.url)) { 1354 | cap.period write$ % write(cap_period); 1355 | url format.url write$ % write(format_url(this.url)); 1356 | } { % } else { 1357 | doi empty$ not { % if (! empty(this.doi)) { 1358 | cap.period write$ % write(cap_period); 1359 | cap.doi.url doi * format.url write$ % write(format_url(cap_doi_url + this.doi)); 1360 | } { % } else { 1361 | required { % if (required == 1) { 1362 | "Require URL or DOI: " cite$ * warning$ % warning("Require URL or DOI: " + this.cite); 1363 | } 'skip$ if$ % } 1364 | } if$ % } 1365 | } if$ % } 1366 | } % } 1367 | % 1368 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1369 | % 1370 | FUNCTION {output.url} { % void Entry::output_url(int required) { 1371 | 'required := % this.required = required; 1372 | url empty$ not { % if (! empty(this.url)) { 1373 | cap.period write$ % write(cap_period); 1374 | url format.url write$ % write(format_url(this.url)); 1375 | } { % } else { 1376 | required { % if (required == 1) { 1377 | "Require URL: " cite$ * warning$ % warning("Require URL: " + this.cite); 1378 | } 'skip$ if$ % } 1379 | } if$ % } 1380 | } % } 1381 | % 1382 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1383 | % 1384 | FUNCTION {output.version} { % void Entry::output_version(int required) { 1385 | 'required := % this.required = required; 1386 | version empty$ not { % if (! empty(this.version)) { 1387 | cap.period write$ % write(cap_period); 1388 | version format.version write$ % write(format_version(this.version)); 1389 | } { % } else { 1390 | required { % if (required == 1) { 1391 | "Require version: " cite$ * warning$ % warning("Require version: " + this.cite); 1392 | } 'skip$ if$ % } 1393 | } if$ % } 1394 | } % } 1395 | % 1396 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1397 | % 1398 | FUNCTION {book.impl} { % void Entry::book_impl() { 1399 | start.bibitem % start_bibitem(); 1400 | true output.author.or.editor % output_author_or_editor(true); 1401 | true output.series.volume.title % output_series_volume_title(true); 1402 | true output.mark % output_mark(true); 1403 | false output.translator % output_translator(false); 1404 | false output.edition % output_edition(false); 1405 | publisher empty$ not { % if (! empty(this.publisher)) { 1406 | true output.address % output_address(true); 1407 | true output.publisher % output_publisher(true); 1408 | cap.comma write$ % write(cap_comma); 1409 | } { % } else { 1410 | cap.period write$ % write(cap_period); 1411 | } if$ % } 1412 | true output.year % output_year(true); 1413 | false output.pages % output_pages(false); 1414 | false output.citedate % output_citedate(false); 1415 | false output.url.or.doi % output_url_or_doi(false); 1416 | end.bibitem % end_bibitem(); 1417 | } % } 1418 | % 1419 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1420 | % 1421 | FUNCTION {book} { % void Entry::book() { 1422 | "M" set.mark % set_mark("M"); 1423 | book.impl % book_impl(); 1424 | } % } 1425 | % 1426 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1427 | % 1428 | FUNCTION {collection} { % void Entry::collection() { 1429 | "G" set.mark % set_mark("G"); 1430 | book.impl % book_impl(); 1431 | } % } 1432 | % 1433 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1434 | % 1435 | FUNCTION {proceedings} { % void Entry::proceedings() { 1436 | "C" set.mark % set_mark("C"); 1437 | start.bibitem % start_bibitem(); 1438 | true output.editor % output_editor(true); 1439 | true output.series.volume.title % output_series_volume_title(true); 1440 | true output.mark % output_mark(true); 1441 | false output.translator % output_translator(false); 1442 | false output.edition % output_edition(false); 1443 | publisher empty$ not { % if (! empty(this.publisher)) { 1444 | true output.address % output_address(true); 1445 | true output.publisher % output_publisher(true); 1446 | cap.comma write$ % write(cap_comma); 1447 | } { % } else { 1448 | cap.period write$ % write(cap_period); 1449 | } if$ % } 1450 | true output.year % output_year(true); 1451 | false output.pages % output_pages(false); 1452 | false output.citedate % output_citedate(false); 1453 | false output.url.or.doi % output_url_or_doi(false); 1454 | end.bibitem % end_bibitem(); 1455 | } % } 1456 | % 1457 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1458 | % 1459 | FUNCTION {conference} { % void Entry::conference() { 1460 | proceedings % proceedings(); 1461 | } % } 1462 | % 1463 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1464 | % 1465 | FUNCTION {thesis.impl} { % void Entry::thesis_impl() { 1466 | start.bibitem % start_bibitem(); 1467 | true output.author % output_author(true); 1468 | true output.title % output_title(true); 1469 | true output.mark % output_mark(true); 1470 | false output.translator % output_translator(false); 1471 | true output.address % output_address(true); 1472 | true output.school % output_school(true); 1473 | cap.comma write$ % write(cap_comma); 1474 | true output.year % output_year(true); 1475 | false output.pages % output_pages(false); 1476 | false output.citedate % output_citedate(false); 1477 | false output.url.or.doi % output_url_or_doi(false); 1478 | end.bibitem % end_bibitem(); 1479 | } % } 1480 | % 1481 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1482 | % 1483 | FUNCTION {phdthesis} { % void Entry::phdthesis() { 1484 | "D" set.mark % set_mark("D"); 1485 | thesis.impl % thesis_impl(); 1486 | } % } 1487 | % 1488 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1489 | % 1490 | FUNCTION {masterthesis} { % void Entry::masterthesis() { 1491 | "D" set.mark % set_mark("D"); 1492 | thesis.impl % thesis_impl(); 1493 | } % } 1494 | % 1495 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1496 | % 1497 | FUNCTION {bachelorthesis} { % void Entry::bachelorthesis() { 1498 | "D" set.mark % set_mark("D"); 1499 | thesis.impl % thesis_impl(); 1500 | } % } 1501 | % 1502 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1503 | % 1504 | FUNCTION {techreport} { % void Entry::techreport() { 1505 | "R" set.mark % set_mark("R"); 1506 | start.bibitem % start_bibitem(); 1507 | true output.author % output_author(true); 1508 | true output.title % output_title(true); 1509 | false output.report.number % output_report_number(false); 1510 | true output.mark % output_mark(true); 1511 | false output.translator % output_translator(false); 1512 | false output.edition % output_edition(false); 1513 | false output.version % output_version(false); 1514 | institution empty$ not { % if (! empty(this.institution)) { 1515 | true output.address % output_address(true); 1516 | true output.institution % output_institution(true); 1517 | cap.comma write$ % write(cap_comma); 1518 | } { % } else { 1519 | cap.period write$ % write(cap_period); 1520 | } if$ % } 1521 | true output.year % output_year(true); 1522 | false output.pages % output_pages(false); 1523 | false output.citedate % output_citedate(false); 1524 | false output.url.or.doi % output_url_or_doi(false); 1525 | end.bibitem % end_bibitem(); 1526 | } % } 1527 | % 1528 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1529 | % 1530 | FUNCTION {standard} { % void Entry::standard() { 1531 | "S" set.mark % set_mark("S"); 1532 | start.bibitem % start_bibitem(); 1533 | true output.author % output_author(true); 1534 | true output.title % output_title(true); 1535 | true output.mark % output_mark(true); 1536 | false output.translator % output_translator(false); 1537 | false output.edition % output_edition(false); 1538 | publisher empty$ not { % if (! empty(this.publisher)) { 1539 | true output.address % output_address(true); 1540 | true output.publisher % output_publisher(true); 1541 | cap.comma write$ % write(cap_comma); 1542 | } { % } else { 1543 | cap.period write$ % write(cap_period); 1544 | } if$ % } 1545 | true output.year % output_year(true); 1546 | false output.pages % output_pages(false); 1547 | false output.citedate % output_citedate(false); 1548 | false output.url.or.doi % output_url_or_doi(false); 1549 | end.bibitem % end_bibitem(); 1550 | } % } 1551 | % 1552 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1553 | % 1554 | FUNCTION {reference} { % void Entry::reference() { 1555 | "K" set.mark % set_mark("K"); 1556 | start.bibitem % start_bibitem(); 1557 | false output.author.or.editor % output_author_or_editor(false); 1558 | true output.series.volume.title % output_series_volume_title(true); 1559 | true output.mark % output_mark(true); 1560 | false output.translator % output_translator(false); 1561 | false output.edition % output_edition(false); 1562 | publisher empty$ not { % if (! empty(this.publisher)) { 1563 | true output.address % output_address(true); 1564 | true output.publisher % output_publisher(true); 1565 | cap.comma write$ % write(cap_comma); 1566 | } { % } else { 1567 | cap.period write$ % write(cap_period); 1568 | } if$ % } 1569 | true output.year % output_year(true); 1570 | false output.pages % output_pages(false); 1571 | false output.citedate % output_citedate(false); 1572 | false output.url.or.doi % output_url_or_doi(false); 1573 | end.bibitem % end_bibitem(); 1574 | } % } 1575 | % 1576 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1577 | % 1578 | FUNCTION {manual} { % void Entry::manual() { 1579 | reference % reference(); 1580 | } % } 1581 | % 1582 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1583 | % 1584 | FUNCTION {periodical.impl} { % void Entry::periodical_impl() { 1585 | start.bibitem % start_bibitem(); 1586 | false output.editor % output_editor(false); 1587 | true output.title % output_title(true); 1588 | true output.mark % output_mark(true); 1589 | cap.period write$ % write(cap_period); 1590 | true output.start.year % output_start_year(true); 1591 | false output.start.volume % output_start_volume(false); 1592 | false output.start.number % output_start_number(false); 1593 | cap.dash write$ % write(cap_dash); 1594 | year contain.dash { % if (contain_dash(this.year)) { 1595 | true output.end.year % output_end_year(true); 1596 | false output.end.volume % output_end_volume(false); 1597 | false output.end.number % output_end_number(false); 1598 | } 'skip$ if$ % } 1599 | publisher empty$ not { % if (! empty(this.publisher)) { 1600 | true output.address % output_address(true); 1601 | true output.publisher % output_publisher(true); 1602 | cap.comma write$ % write(cap_comma); 1603 | } { % } else { 1604 | cap.period write$ % write(cap_period); 1605 | } if$ % } 1606 | true output.start.year % output_start_year(true); 1607 | cap.dash write$ % write(cap_dash); 1608 | year contain.dash { % if (contain_dash(this.year)) { 1609 | true output.end.year % output_end_year(true); 1610 | } 'skip$ if$ % } 1611 | false output.citedate % output_citedate(false); 1612 | false output.url.or.doi % output_url_or_doi(false); 1613 | end.bibitem % end_bibitem(); 1614 | } % } 1615 | % 1616 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1617 | % 1618 | FUNCTION {periodical} { % void Entry::periodical() { 1619 | "J" set.mark % set_mark("J"); 1620 | periodical.impl % periodical_impl(); 1621 | } % } 1622 | % 1623 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1624 | % 1625 | FUNCTION {newspaper} { % void Entry::newspaper() { 1626 | "N" set.mark % set_mark("N"); 1627 | periodical.impl % periodical_impl(); 1628 | } % } 1629 | % 1630 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1631 | % 1632 | FUNCTION {patent} { % void Entry::patent() { 1633 | "P" set.mark % set_mark("P"); 1634 | start.bibitem % start_bibitem(); 1635 | true output.author % output_author(true); 1636 | true output.title % output_title(true); 1637 | true output.country % output_country(true); 1638 | true output.patentid % output_patentid(true); 1639 | true output.mark % output_mark(true); 1640 | cap.period write$ % write(cap_period); 1641 | true output.date % output_date(true); 1642 | false output.citedate % output_citedate(false); 1643 | false output.url.or.doi % output_url_or_doi(false); 1644 | end.bibitem % end_bibitem(); 1645 | } % } 1646 | % 1647 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1648 | % 1649 | FUNCTION {online} { % void Entry::online() { 1650 | "EB" set.mark % set_mark("EB"); 1651 | start.bibitem % start_bibitem(); 1652 | false output.author % output_author(false); 1653 | true output.title % output_title(true); 1654 | true output.mark % output_mark(true); 1655 | publisher empty$ not { % if (! empty(this.publisher)) { 1656 | address empty$ not { % if (! empty(this.address)) { 1657 | true output.address % output_address(true); 1658 | true output.publisher % output_publisher(true); 1659 | cap.comma write$ % write(cap_comma); 1660 | } { % } else { 1661 | true output.publisher.no.address % output_publisher_no_address(true); 1662 | cap.comma write$ % write(cap_comma); 1663 | } if$ % } 1664 | } { % } else { 1665 | cap.period write$ % write(cap_period); 1666 | } if$ % } 1667 | true output.year % output_year(true); 1668 | false output.modifydate % output_modifydate(false); 1669 | true output.citedate % output_citedate(true); 1670 | true output.url % output_url(true); 1671 | end.bibitem % end_bibitem(); 1672 | } % } 1673 | % 1674 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1675 | % 1676 | FUNCTION {webpage} { % void Entry::online() { 1677 | online % online(); 1678 | } % } 1679 | % 1680 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1681 | % 1682 | FUNCTION {program.impl} { % void Entry::program_impl() { 1683 | start.bibitem % start_bibitem(); 1684 | false output.author % output_author(false); 1685 | true output.title % output_title(true); 1686 | true output.mark % output_mark(true); 1687 | publisher empty$ not { % if (! empty(this.publisher)) { 1688 | true output.address % output_address(true); 1689 | true output.publisher % output_publisher(true); 1690 | cap.comma write$ % write(cap_comma); 1691 | } { % } else { 1692 | cap.period write$ % write(cap_period); 1693 | } if$ % } 1694 | true output.year % output_year(true); 1695 | false output.citedate % output_citedate(false); 1696 | false output.url.or.doi % output_url_or_doi(false); 1697 | end.bibitem % end_bibitem(); 1698 | } % } 1699 | % 1700 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1701 | % 1702 | FUNCTION {program} { % void Entry::program() { 1703 | "CP" set.mark % set_mark("CP"); 1704 | program.impl % program_impl(); 1705 | } % } 1706 | % 1707 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1708 | % 1709 | FUNCTION {database} { % void Entry::database() { 1710 | "DB" set.mark % set_mark("DB"); 1711 | program.impl % program_impl(); 1712 | } % } 1713 | % 1714 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1715 | % 1716 | FUNCTION {unpublished} { % void Entry::unpublished() { 1717 | "H" set.mark % set_mark("H"); 1718 | start.bibitem % start_bibitem(); 1719 | true output.author % output_author(true); 1720 | true output.title % output_title(true); 1721 | true output.mark % output_mark(true); 1722 | cap.period write$ % write(cap_period); 1723 | true output.year % output_year(true); 1724 | false output.citedate % output_citedate(false); 1725 | false output.url.or.doi % output_url_or_doi(false); 1726 | end.bibitem % end_bibitem(); 1727 | } % } 1728 | % 1729 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1730 | % 1731 | FUNCTION {manuscript} { % void Entry::manuscript() { 1732 | unpublished % unpublished(); 1733 | } % } 1734 | % 1735 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1736 | % 1737 | FUNCTION {inbook.impl} { % void Entry::inbook_impl() { 1738 | start.bibitem % start_bibitem(); 1739 | true output.author % output_author(true); 1740 | true output.title % output_title(true); 1741 | true output.mark % output_mark(true); 1742 | false output.translator % output_translator(false); 1743 | cap.double.slash write$ % write(cap_double_slash); 1744 | false output.editor % output_editor(false); 1745 | true output.series.volume.booktitle % output_series_volume_booktitle(true); 1746 | false output.edition % output_edition(false); 1747 | publisher empty$ not { % if (! empty(this.publisher)) { 1748 | true output.address % output_address(true); 1749 | true output.publisher % output_publisher(true); 1750 | cap.comma write$ % write(cap_comma); 1751 | } { % } else { 1752 | cap.period write$ % write(cap_period); 1753 | } if$ % } 1754 | true output.year % output_year(true); 1755 | false output.pages % output_pages(false); 1756 | false output.citedate % output_citedate(false); 1757 | false output.url.or.doi % output_url_or_doi(false); 1758 | end.bibitem % end_bibitem(); 1759 | } % } 1760 | % 1761 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1762 | % 1763 | FUNCTION {inproceedings.impl} { % void Entry::inproceedings_impl() { 1764 | start.bibitem % start_bibitem(); 1765 | true output.author % output_author(true); 1766 | true output.title % output_title(true); 1767 | true output.mark % output_mark(true); 1768 | false output.translator % output_translator(false); 1769 | cap.double.slash write$ % write(cap_double_slash); 1770 | false output.editor % output_editor(false); 1771 | true output.series.volume.booktitle % output_series_volume_booktitle(true); 1772 | false output.edition % output_edition(false); 1773 | publisher empty$ not { % if (! empty(this.publisher)) { 1774 | true output.inproaddress % output_inproaddress(true); 1775 | true output.publisher % output_publisher(true); 1776 | cap.comma write$ % write(cap_comma); 1777 | } { % } else { 1778 | true output.inproaddress % output_inproaddress(true); 1779 | cap.comma write$ % write(cap_comma); 1780 | } if$ % } 1781 | true output.year % output_year(true); 1782 | false output.pages % output_pages(false); 1783 | false output.citedate % output_citedate(false); 1784 | false output.url.or.doi % output_url_or_doi(false); 1785 | end.bibitem % end_bibitem(); 1786 | } % } 1787 | % 1788 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1789 | % 1790 | FUNCTION {inbook} { % void Entry::inbook() { 1791 | "M" set.mark % set_mark("M"); 1792 | inbook.impl % inbook_impl(); 1793 | } % } 1794 | % 1795 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1796 | % 1797 | FUNCTION {incollection} { % void Entry::incollection() { 1798 | "G" set.mark % set_mark("G"); 1799 | inbook.impl % inbook_impl(); 1800 | } % } 1801 | % 1802 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1803 | % 1804 | FUNCTION {inproceedings} { % void Entry::inproceedings() { 1805 | "C" set.mark % set_mark("C"); 1806 | inproceedings.impl % inproceedings_impl(); 1807 | } % } 1808 | % 1809 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1810 | % 1811 | FUNCTION {article} { % void Entry::article() { 1812 | "J" set.mark % set_mark("J"); 1813 | start.bibitem % start_bibitem(); 1814 | true output.author % output_author(true); 1815 | true output.title % output_title(true); 1816 | true output.mark % output_mark(true); 1817 | true output.journal % output_journal(true); 1818 | cap.comma write$ % write(cap_comma); 1819 | true output.year % output_year(true); 1820 | false output.volume % output_volume(false); 1821 | false output.number % output_number(false); 1822 | false output.pages % output_pages(false); 1823 | false output.citedate % output_citedate(false); 1824 | false output.url.or.doi % output_url_or_doi(false); 1825 | end.bibitem % end_bibitem(); 1826 | } % } 1827 | % 1828 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1829 | % 1830 | 1831 | 1832 | 1833 | FUNCTION {misc} 1834 | { 1835 | "OL" set.mark % set_mark("J"); 1836 | start.bibitem % start_bibitem(); 1837 | true output.title % output_title(true); 1838 | cap.comma write$ % write(cap_full_stop); 1839 | true output.author % output_author(true); 1840 | % true output.mark % output_mark(true); 1841 | % true output.journal % output_journal(true); 1842 | true output.url % output_url(true); 1843 | % output_year(true); 1844 | % false output.volume % output_volume(false); 1845 | % false output.number % output_number(false); 1846 | % false output.pages % output_pages(false); 1847 | % false output.citedate % output_citedate(false); 1848 | % false output.url.or.doi % output_url_or_doi(false); 1849 | end.bibitem % end_bibitem(); 1850 | % bibitem.begin 1851 | % format.authors write$ add.period 1852 | % format.title "[OL]" * write$ add.period 1853 | % format.year write$ add.comma 1854 | % note write$ 1855 | % format.url 1856 | % newline$ 1857 | } 1858 | 1859 | FUNCTION {news} { % void Entry::news() { 1860 | "N" set.mark % set_mark("N"); 1861 | start.bibitem % start_bibitem(); 1862 | true output.author % output_author(true); 1863 | true output.title % output_title(true); 1864 | true output.mark % output_mark(true); 1865 | true output.journal % output_journal(true); 1866 | cap.comma write$ % write(cap_comma); 1867 | true output.date % output_date(true); 1868 | false output.number % output_number(false); 1869 | false output.citedate % output_citedate(false); 1870 | false output.url.or.doi % output_url_or_doi(false); 1871 | end.bibitem % end_bibitem(); 1872 | } % } 1873 | % 1874 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1875 | % 1876 | FUNCTION {default.type} { % void Entry::default_type() { 1877 | "Unsupported entry type for " cite$ * warning$ % warning("Unsupported entry type for " + this.cite); 1878 | } % } 1879 | % 1880 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1881 | % 1882 | FUNCTION {longest.label.pass} { % void longest_label_pass(Entry entry) { 1883 | entry.count #1 + 'entry.count := % entry_count = entry_count + 1; 1884 | entry.count int.to.str$ 'label := % this.label = int_to_str(entry_count); 1885 | label width$ longest.label.width > { % if (width(this.label) > longest_label_width) { 1886 | label 'longest.label := % longest_label = this.label; 1887 | label width$ 'longest.label.width := % longest_label_width = width(this.label); 1888 | } 'skip$ if$ % } 1889 | } % } 1890 | % 1891 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1892 | % 1893 | FUNCTION {write.style.commands} { % void write_style_commands() { 1894 | cmd.bibauthor write$ % write(cmd_bibauthor); 1895 | newline$ % writeln(); 1896 | cmd.bibeditor write$ % write(cmd_bibeditor); 1897 | newline$ % writeln(); 1898 | cmd.bibtranslator write$ % write(cmd_bibtranslator); 1899 | newline$ % writeln(); 1900 | cmd.bibtitle write$ % write(cmd_bibtitle); 1901 | newline$ % writeln(); 1902 | cmd.bibbooktitle write$ % write(cmd_bibbooktitle); 1903 | newline$ % writeln(); 1904 | cmd.bibjournal write$ % write(cmd_bibjournal); 1905 | newline$ % writeln(); 1906 | cmd.bibmark write$ % write(cmd_bibmark); 1907 | newline$ % writeln(); 1908 | cmd.bibcountry write$ % write(cmd_bibcountry); 1909 | newline$ % writeln(); 1910 | cmd.bibpatentid write$ % write(cmd_bibpatentid); 1911 | newline$ % writeln(); 1912 | cmd.bibedition write$ % write(cmd_bibedition); 1913 | newline$ % writeln(); 1914 | cmd.biborganization write$ % write(cmd_biborganization); 1915 | newline$ % writeln(); 1916 | cmd.bibaddress write$ % write(cmd_bibaddress); 1917 | newline$ % writeln(); 1918 | cmd.bibpublisher write$ % write(cmd_bibpublisher); 1919 | newline$ % writeln(); 1920 | cmd.bibinstitution write$ % write(cmd_bibinstitution); 1921 | newline$ % writeln(); 1922 | cmd.bibschool write$ % write(cmd_bibschool); 1923 | newline$ % writeln(); 1924 | cmd.bibvolume write$ % write(cmd_bibvolume); 1925 | newline$ % writeln(); 1926 | cmd.bibnumber write$ % write(cmd_bibnumber); 1927 | newline$ % writeln(); 1928 | cmd.bibversion write$ % write(cmd_bibversion); 1929 | newline$ % writeln(); 1930 | cmd.bibpages write$ % write(cmd_bibpages); 1931 | newline$ % writeln(); 1932 | cmd.bibmodifydate write$ % write(cmd_bibmodifydate); 1933 | newline$ % writeln(); 1934 | cmd.bibcitedate write$ % write(cmd_bibcitedate); 1935 | newline$ % writeln(); 1936 | cmd.bibyear write$ % write(cmd_bibyear); 1937 | newline$ % writeln(); 1938 | cmd.bibdate write$ % write(cmd_bibdate); 1939 | newline$ % writeln(); 1940 | cmd.biburl write$ % write(cmd_biburl); 1941 | newline$ % writeln(); 1942 | } % } 1943 | % 1944 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1945 | % 1946 | FUNCTION {begin.bib} { % void begin_bib() { 1947 | preamble$ empty$ not { % if (! empty(premble)) { 1948 | preamble$ write$ % write(premeable); 1949 | newline$ % writeln(); 1950 | } 'skip$ if$ % } 1951 | env.bibbegin write$ % write(env_bibbegin); 1952 | "{" longest.label * "}" * write$ % write("{" + longest.label + "}"); 1953 | newline$ % writeln(); 1954 | write.style.commands % write_style_commands(); 1955 | } % } 1956 | % 1957 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1958 | % 1959 | FUNCTION {end.bib} { % void end_bib() { 1960 | newline$ % writeln(); 1961 | env.bibend write$ % write(env_bibend); 1962 | newline$ % writeln(); 1963 | } % } 1964 | % 1965 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1966 | % 1967 | FUNCTION {initialize} { % void initialize() { 1968 | #0 'entry.count := % entry_count = 0; 1969 | #0 'longest.label.width := % longest_label_width = 0; 1970 | "" 'longest.label := % longest_label = ""; 1971 | } % } 1972 | % 1973 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1974 | % 1975 | % void main() { 1976 | READ % List entryList = read(".bib"); 1977 | EXECUTE {initialize} % initialize(); 1978 | ITERATE {longest.label.pass} % for (Entry entry : entryList) { 1979 | % longest_label_pass(entry); 1980 | % } 1981 | EXECUTE {begin.bib} % begin_bib(); 1982 | ITERATE {call.type$} % for (Entry entry : entryList) { 1983 | % switch (typeof(entry)) { 1984 | % case "book": 1985 | % entry.book(); 1986 | % break; 1987 | % case "article": 1988 | % entry.article(); 1989 | % break; 1990 | % . 1991 | % . 1992 | % . 1993 | % case "incollection": 1994 | % entry.incollection(); 1995 | % break; 1996 | % case "misc": 1997 | % entry.misc(); 1998 | % break; 1999 | % default: 2000 | % entry.default_type(); 2001 | % } 2002 | % } 2003 | EXECUTE {end.bib} % end_bib(); 2004 | % } 2005 | % 2006 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2007 | %% End of file `GBT7714-2005.bst' 2008 | -------------------------------------------------------------------------------- /thubeamer.dtx: -------------------------------------------------------------------------------- 1 | % \iffalse meta-comment 2 | % !TeX program = XeLaTeX 3 | % !TeX encoding = UTF-8 4 | % 5 | % Copyright (C) 2019--\the\year by Jingxuan Yang 6 | % 7 | % This file may be distributed and/or modified under the 8 | % conditions of the LaTeX Project Public License, either version 1.3c 9 | % of this license or (at your option) any later version. 10 | % The latest version of this license is in: 11 | % 12 | % http://www.latex-project.org/lppl.txt 13 | % 14 | % and version 1.3c or later is part of all distributions of LaTeX 15 | % version 2008/05/04 or later. 16 | 17 | %<*internal> 18 | \def\nameofplainTeX{plain} 19 | \ifx\fmtname\nameofplainTeX\else 20 | \expandafter\begingroup 21 | \fi 22 | % 23 | %<*install> 24 | 25 | \input docstrip 26 | \keepsilent 27 | \askforoverwritefalse 28 | \preamble 29 | 30 | This is a generated file. 31 | 32 | Copyright (C) 2019--\the\year by Jingxuan Yang 33 | 34 | This file may be distributed and/or modified under the 35 | conditions of the LaTeX Project Public License, either version 1.3c 36 | of this license or (at your option) any later version. 37 | The latest version of this license is in: 38 | 39 | http://www.latex-project.org/lppl.txt 40 | 41 | and version 1.3c or later is part of all distributions of LaTeX 42 | version 2008/05/04 or later. 43 | 44 | To produce the documentation run the original source files ending with `.dtx' 45 | through LaTeX. 46 | 47 | \endpreamble 48 | \postamble 49 | 50 | This package consists of the file thubeamer.dtx, 51 | and the derived files thubeamer.pdf, 52 | beamerthemethubeamer.sty, 53 | beamercolorthemethubeamer.sty, 54 | beamerinnerthemethubeamer.sty, 55 | beamerouterthemethubeamer.sty. 56 | 57 | \endpostamble 58 | 59 | \usedir{tex/latex/thubeamer} 60 | \generate 61 | { 62 | \file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}} 63 | \file{beamerthemethubeamer.sty}{\from{\jobname.dtx}{thubeamer}} 64 | \file{beamercolorthemethubeamer.sty}{\from{\jobname.dtx}{thucolorstyle}} 65 | \file{beamerinnerthemethubeamer.sty}{\from{\jobname.dtx}{thuinnerstyle}} 66 | \file{beamerouterthemethubeamer.sty}{\from{\jobname.dtx}{thuouterstyle}} 67 | } 68 | 69 | \Msg{***********************************************************} 70 | \Msg{*} 71 | \Msg{* To finish the installation you have to move the following} 72 | \Msg{* files into a directory searched by TeX:} 73 | \Msg{*} 74 | \Msg{* The recommended directory is TEXMF/tex/latex/thubeamer} 75 | \Msg{*} 76 | \Msg{* \space\space dtx-style.sty} 77 | \Msg{* \space\space beamerthemethubeamer.sty} 78 | \Msg{* \space\space beamercolorthemethubeamer.sty} 79 | \Msg{* \space\space beamerinnerthemethubeamer.sty} 80 | \Msg{* \space\space beamerouterthemethubeamer.sty} 81 | \Msg{*} 82 | \Msg{* To produce the documentation run the files ending with} 83 | \Msg{* `.dtx' through LaTeX.} 84 | \Msg{*} 85 | \Msg{* Happy TeXing!} 86 | \Msg{***********************************************************} 87 | 88 | % 89 | %\endbatchfile 90 | %<*internal> 91 | 92 | \usedir{tex/latex/thubeamer} 93 | \generate 94 | { 95 | \file{\jobname.ins}{\from{\jobname.dtx}{install}} 96 | } 97 | \nopreamble\nopostamble 98 | 99 | \ifx\fmtname\nameofplainTeX 100 | \expandafter\endbatchfile 101 | \else 102 | \expandafter\endgroup 103 | \fi 104 | % 105 | % 106 | %\NeedsTeXFormat{LaTeX2e} 107 | %\ProvidesPackage{beamerthemethubeamer} 108 | %\ProvidesPackage{beamercolorthemethubeamer} 109 | %\ProvidesPackage{beamerinnerthemethubeamer} 110 | %\ProvidesPackage{beamerouterthemethubeamer} 111 | %[2023/11/27 v1.2 A Beamer Theme for Tsinghua University (THU)] 112 | % 113 | %<*driver> 114 | \ProvidesFile{thubeamer.dtx}[2023/11/27 v1.2 A Beamer Theme for Tsinghua University (THU)] 115 | \documentclass{ltxdoc} 116 | \usepackage{dtx-style} 117 | 118 | \EnableCrossrefs 119 | \CodelineIndex 120 | \RecordChanges 121 | 122 | \begin{document} 123 | \DocInput{\jobname.dtx} 124 | \end{document} 125 | % 126 | % 127 | % \fi 128 | % 129 | % \CheckSum{0} 130 | % \CharacterTable 131 | % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 132 | % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z 133 | % Digits \0\1\2\3\4\5\6\7\8\9 134 | % Exclamation \! Double quote \" Hash (number) \# 135 | % Dollar \$ Percent \% Ampersand \& 136 | % Acute accent \' Left paren \( Right paren \) 137 | % Asterisk \* Plus \+ Comma \, 138 | % Minus \- Point \. Solidus \/ 139 | % Colon \: Semicolon \; Less than \< 140 | % Equals \= Greater than \> Question mark \? 141 | % Commercial at \@ Left bracket \[ Backslash \\ 142 | % Right bracket \] Circumflex \^ Underscore \_ 143 | % Grave accent \` Left brace \{ Vertical bar \| 144 | % Right brace \} Tilde \~} 145 | % 146 | % \GetFileInfo{\jobname.dtx} 147 | % 148 | % \changes{v1.0.0}{2021/07/07}{Initially design thubeamer} 149 | % 150 | % \DoNotIndex{\begin,\end,\begingroup,\endgroup} 151 | % \DoNotIndex{\ifx,\ifdim,\ifnum,\ifcase,\else,\or,\fi,\-} 152 | % \DoNotIndex{\let,\def,\xdef,\newcommand,\renewcommand} 153 | % \DoNotIndex{\expandafter,\csname,\endcsname,\relax,\protect} 154 | % \DoNotIndex{\Huge,\huge,\LARGE,\Large,\large,\normalsize} 155 | % \DoNotIndex{\small,\footnotesize,\scriptsize,\tiny} 156 | % \DoNotIndex{\normalfont,\bfseries,\slshape,\interlinepenalty} 157 | % \DoNotIndex{\hfil,\par,\hskip,\vskip,\vspace,\quad} 158 | % \DoNotIndex{\centering,\raggedright} 159 | % \DoNotIndex{\c@secnumdepth,\@startsection,\@setfontsize} 160 | % \DoNotIndex{\ ,\@plus,\@minus,\p@,\z@,\@m,\@M,\@ne,\m@ne} 161 | % \DoNotIndex{\@@par,\DeclareOperation,\RequirePackage,\LoadClass} 162 | % \DoNotIndex{\AtBeginDocument,\AtEndDocument} 163 | % 164 | % \IndexPrologue{\section*{索~~~~引}} 165 | % \GlossaryPrologue{\section*{修改记录}} 166 | % 167 | % \definecolor{beamer@headercolor}{RGB}{129,48,140} 168 | % \title{\bfseries\color{beamer@headercolor}\thubeamer:清华大学风格\\ Beamer主题} 169 | % \author{{\Large\fangsong 杨敬轩}\\[5pt]\texttt{yanglatex2e@gmail.com}\\[5pt]\texttt{yangjx20@mails.tsinghua.edu.cn}} 170 | % \date{\fileversion\ (\filedate)} 171 | % 172 | % \maketitle\thispagestyle{empty} 173 | % 174 | % \vskip 0.5cm 175 | % 176 | % \def\abstractname{\Large 摘\quad 要} 177 | % \begin{abstract}\normalsize\vskip0.5cm 178 | % \thubeamer~主题为作者在准备课程展示时设计制作, 179 | % 旨在帮助清华大学师生进行学术交流或其他需要演示文稿活动时,方便的使用 \LaTeX{} 制作含有学校特色的演示文稿。 180 | % \end{abstract} 181 | % 182 | % \vspace*{2em} 183 | % \def\abstractname{\Large 免责声明} 184 | % \begin{abstract} 185 | % \noindent\normalsize 186 | % \begin{enumerate} 187 | % \item 本模板的发布遵守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 以及其后的最新版本,使用前请认真阅读协议内 188 | % 容。 189 | % \item 本主题为作者个人制作,使用仅供参考,任何由于使用本主题而引起的任何问题均与本主题作者无关。 190 | % \item 任何个人或组织以本模板为基础进行修改、扩展而生成的新的专用模板,请严格遵 191 | % 守 \href{http://www.latex-project.org/lppl.txt}{\LaTeX\ Project Public License 1.3c} 协议以及其后的最新版本。由于违犯协议而引起的任何纠纷争端均与 192 | % 本模板作者无关。 193 | % \end{enumerate} 194 | % \end{abstract} 195 | % 196 | % 197 | % \clearpage 198 | % \pagestyle{fancy} 199 | % \begin{multicols}{2}[ 200 | % \setlength{\columnseprule}{.4pt} 201 | % \setlength{\columnsep}{18pt}] 202 | % \tableofcontents 203 | % \end{multicols} 204 | % \clearpage 205 | % 206 | % \section{模板介绍} 207 | % \thubeamer\ (\textbf{T}sing\textbf{H}ua \textbf{U}niversity \LaTeX{} 208 | % \textbf{Beamer} Template) 是为了帮助清华大学师生撰写演示文稿而编写的 \LaTeX{} Beamer 模板。 209 | % 210 | % 本文档将尽量完整的介绍模板的使用方法,如有不清楚之处可以参考示例文档或者根据 211 | % 第~\ref{sec:howtoask} 节说明提问,有兴趣者可以联系作者参与完善此手册,非常欢迎你清学子对本代码作出贡献。 212 | % 213 | % \section{安装} 214 | % \label{sec:installation} 215 | % 216 | % \thubeamer\ 已经上传 CTAN,已包含在 TeXLive 与 MiKTeX 发行版中。 217 | % 安装方法:打开命令行,输入以下命令即可 218 | % \begin{shell} 219 | % $ tlmgr install thubeamer 220 | % \end{shell} 221 | % 阅读本说明文档可以使用以下命令: 222 | % \begin{shell} 223 | % $ texdoc thubeamer 224 | % \end{shell} 225 | % 226 | % 如果要使用开发版,需自己下载,\thubeamer\ 相关链接: 227 | % \begin{itemize} 228 | % \item 主页:\href{https://github.com/YangLaTeX/thubeamer}{GitHub} 229 | % \item 下载:\href{http://www.ctan.org/pkg/thubeamer}{CTAN} 230 | % \end{itemize} 231 | % 232 | % \subsection{模板的组成} 233 | % 下表列出了 \thubeamer{} 的主要文件及其功能介绍: 234 | % 235 | % \changes{v1.1.1}{2022/05/20}{omit vertical rules} 236 | % 237 | % \begin{longtable}{lp{8cm}} 238 | % \toprule 239 | % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule 240 | % \endfirsthead 241 | % \midrule 242 | % {\heiti 文件(夹)} & {\heiti 功能描述}\\\midrule 243 | % \endhead 244 | % \endfoot 245 | % \endlastfoot 246 | % thubeamer.dtx & 主题宏包、说明文档以及主题驱动文件的混排文件\\ 247 | % main.tex & 主题测试文档\\ 248 | % figures/ & 主题相关矢量图存储文件夹\\ 249 | % makedoc.bat & 生成主题与用户手册脚本\\ 250 | % makebeamer.bat & 编译测试样例脚本\\ 251 | % makeclean.bat & 清理编译过程中间文件脚本\\ 252 | % makecleanall.bat & 清理编译过程中间文件与样式文件脚本\\ 253 | % Makefile & Linux \& Mac OS脚本\\ 254 | % \textbf{thubeamer.pdf} & 用户手册(本文档)\\ 255 | % \bottomrule 256 | % \end{longtable} 257 | % \textbf{注:}使用前,请仔细阅读\textbf{thubeamer.pdf},即本文档。 258 | % 259 | % \section{使用说明} 260 | % \label{sec:usage} 261 | % 本手册假定用户已经能处理一般的 \LaTeX\ 文档,并对 \BibTeX\ 有一定了解。如果 262 | % 从来没有接触过 \TeX\ 和 \LaTeX,建议先学习相关的基础知识。 263 | % 264 | % \subsection{关于提问} 265 | % \label{sec:howtoask} 266 | % 按照优先级推荐提问的位置如下: 267 | % 268 | % \begin{itemize} 269 | % \item Github Issues: \href{http://github.com/YangLaTeX/thubeamer/issues}{http://github.com/YangLaTeX/thubeamer/issues} 270 | % \item Email: \href{mailto:yanglatex2e@gmail.com}{yanglatex2e@gmail.com}, \href{mailto:yangjx20@mails.tsinghua.edu.cn}{yangjx20@mails.tsinghua.edu.cn} 271 | % \end{itemize} 272 | % 273 | % \subsection{示例文件} 274 | % \label{sec:userguide} 275 | % 模板核心文件有四个\file{*.sty},但是如果 276 | % 没有示例文档用户会发现很难下手。所以推荐新用户从模板自带的示例文档入手,里面包 277 | % 括了Beamer写作用到的所有命令及其使用方法,只需要用自己的内容进行相应替换就可以。 278 | % 对于不清楚的命令可以查阅本手册。下面的例子描述了模板中章节的组织形式,来自于示 279 | % 例文档,具体内容可以参考模板附带的 \file{main.tex}。 280 | % 281 | % \lstinputlisting[style=lstStyleLaTeX]{main.tex} 282 | % 283 | % \subsection{论文选项} 284 | % \label{sec:option} 285 | % 286 | % 论文选项在\file{main.tex} 文件的开头描述,此处不赘述。 287 | % 288 | % \section{使用模板} 289 | % \subsection{如何编译}\label{SubSec:HowToMake} 290 | % \subsubsection{Windows用户} 291 | % 主题项目里已经列出了脚本: 292 | % 首先双击\file{makedoc.bat} 脚本,生成主题和用户手册; 293 | % 然后双击\file{makebeamer.bat} 脚本生成测试 Beamer 文件预览; 294 | % 最后双击\file{makeclean.bat} 清理编译过程的中间文件; 295 | % 双击\file{makecleanall.bat}可以清除辅助文件以及样式文件。 296 | % 297 | % \subsubsection{Linux \& Mac OS用户} 298 | % 首先运行下面命令生成主题和用户手册; 299 | % \begin{shell} 300 | % $ make doc 301 | % \end{shell} 302 | % 303 | % 然后运行下面命令生成测试 Beamer 文件预览; 304 | % \begin{shell} 305 | % $ make beamer 306 | % \end{shell} 307 | % 308 | % 最后运行下面命令清理编译过程的中间文件。 309 | % \begin{shell} 310 | % $ make clean 311 | % \end{shell} 312 | % 313 | % 若运行下面命令则清理编译过程的中间文件以及所有样式文件。 314 | % \begin{shell} 315 | % $ make cleanall 316 | % \end{shell} 317 | % 318 | % \section{致谢} 319 | % \label{sec:thanks} 320 | % 感谢 \href{https://github.com/StickCui/XDUstyle-Beamer-Theme}{XDUstyle}、\href{https://github.com/tl3shi/THUBeamer}{thubeamer} 模板的作者,本模板基于他们改编而来! 321 | % 322 | % 欢迎各位到 \href{http://github.com/YangLaTeX/thubeamer/}{\thubeamer\ Github 主页}贡献! 323 | % 324 | % \StopEventually{\PrintChanges\PrintIndex} 325 | % \clearpage 326 | % 327 | % \section{实现细节} 328 | % 329 | % \subsection{主题主文件部分} 330 | % 导入必要宏包 331 | % \begin{macrocode} 332 | %<*thubeamer> 333 | \def\thubeamer{\textsc{thu}\-\textsc{Beamer}} 334 | \RequirePackage{tikz} 335 | \usetikzlibrary{external} 336 | \RequirePackage{pgf} 337 | \RequirePackage{multicol} 338 | \RequirePackage{multimedia} 339 | \RequirePackage{calc} 340 | \RequirePackage{amsmath} 341 | \RequirePackage{amsthm} 342 | \RequirePackage{amssymb} 343 | \RequirePackage{bm} 344 | \RequirePackage{graphicx} 345 | \RequirePackage{tabularx} 346 | \RequirePackage{booktabs} 347 | \RequirePackage{multirow} 348 | \RequirePackage{enumerate} 349 | \RequirePackage{hyperref} 350 | \RequirePackage{algorithm} 351 | \RequirePackage{algorithmic} 352 | \RequirePackage[T1]{fontenc} 353 | \RequirePackage{latexsym,xcolor,multicol,calligra} 354 | \RequirePackage{pstricks,listings,stackengine} 355 | \RequirePackage[sort&compress,numbers]{natbib} 356 | % \end{macrocode} 357 | % 358 | % 主题选项 359 | % \begin{macrocode} 360 | \DeclareOptionBeamer{thupurple}{ 361 | \PassOptionsToPackage{thupurple}{beamercolorthemethubeamer} 362 | \PassOptionsToPackage{thupurple}{beamerinnerthemethubeamer} 363 | \PassOptionsToPackage{thupurple}{beamerouterthemethubeamer} 364 | } 365 | \DeclareOptionBeamer{thupurple2}{ 366 | \PassOptionsToPackage{thupurple2}{beamercolorthemethubeamer} 367 | \PassOptionsToPackage{thupurple2}{beamerinnerthemethubeamer} 368 | \PassOptionsToPackage{thupurple2}{beamerouterthemethubeamer} 369 | } 370 | \DeclareOptionBeamer{smoothbars}{ 371 | \PassOptionsToPackage{smoothbars}{beamercolorthemethubeamer} 372 | \PassOptionsToPackage{smoothbars}{beamerouterthemethubeamer} 373 | } 374 | \DeclareOptionBeamer{sidebar}{ 375 | \PassOptionsToPackage{sidebar}{beamercolorthemethubeamer} 376 | \PassOptionsToPackage{sidebar}{beamerouterthemethubeamer} 377 | } 378 | \DeclareOptionBeamer{sectiontoc}{ 379 | \PassOptionsToPackage{sectiontoc}{beamerinnerthemethubeamer} 380 | } 381 | \DeclareOptionBeamer{subsectiontoc}{ 382 | \PassOptionsToPackage{subsectiontoc}{beamerinnerthemethubeamer} 383 | } 384 | \DeclareOptionBeamer{en}{ 385 | \PassOptionsToPackage{en}{beamerinnerthemethubeamer} 386 | } 387 | \ProcessOptionsBeamer 388 | % \end{macrocode} 389 | % 390 | % 特殊设置 391 | % \begin{macrocode} 392 | \mode 393 | { 394 | \useinnertheme{thubeamer} 395 | \useoutertheme{thubeamer} 396 | \usecolortheme{thubeamer} 397 | } 398 | 399 | \mode 400 | % 401 | % \end{macrocode} 402 | % \subsection{主题配色文件部分} 403 | % 404 | % 参数设置 405 | % \begin{macrocode} 406 | %<*thucolorstyle> 407 | \DeclareOptionBeamer{thupurple}{\def\beamer@thucolor{thupurple}} 408 | \DeclareOptionBeamer{thupurple2}{\def\beamer@thucolor{thupurple2}} 409 | \DeclareOptionBeamer{smoothbars}{\def\beamer@thubar{smoothbars}} 410 | \DeclareOptionBeamer{sidebar}{\def\beamer@thubar{sidebar}} 411 | \ProcessOptionsBeamer 412 | 413 | \def\beamer@thucolorpurple{thupurple} 414 | \def\beamer@thusidebar{sidebar} 415 | % \end{macrocode} 416 | % 417 | % 颜色设置。 418 | % \begin{macrocode} 419 | \mode 420 | 421 | \ifx\beamer@thucolor\beamer@thucolorpurple 422 | \definecolor{beamer@textcolor}{RGB}{119,33,151} 423 | \definecolor{beamer@headercolor}{RGB}{129,48,140} % purple 424 | \ifx\beamer@thubar\beamer@thusidebar 425 | \definecolor{beamer@sidebarcolor}{RGB}{129,48,140} 426 | \else 427 | \definecolor{beamer@sidebarcolor}{RGB}{129,48,140} 428 | \fi 429 | \else 430 | \definecolor{beamer@textcolor}{RGB}{119,33,151} 431 | \definecolor{beamer@headercolor}{RGB}{129,48,140} 432 | \ifx\beamer@thubar\beamer@thusidebar 433 | \definecolor{beamer@sidebarcolor}{RGB}{129,48,140} 434 | \else 435 | \definecolor{beamer@sidebarcolor}{RGB}{129,48,140} 436 | \fi 437 | \fi 438 | 439 | % \setbeamercolor{footline}{bg=beamer@headercolor} 440 | \setbeamercolor{title}{fg=white,bg=beamer@headercolor} 441 | \ifx\beamer@thubar\beamer@thusidebar 442 | \setbeamercolor{frametitle}{fg=beamer@headercolor,bg=beamer@headercolor!10} 443 | \else 444 | \setbeamercolor{frametitle}{fg=white,bg=beamer@headercolor} 445 | \fi 446 | \setbeamerfont{frametitle}{size=\large} 447 | 448 | \setbeamercolor{secondbottomline}{fg=white,bg=beamer@headercolor!50!black} 449 | \setbeamercolor{firstbottomline}{fg=white,bg=beamer@headercolor} 450 | 451 | \setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg} 452 | \setbeamercolor{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black} 453 | \setbeamercolor{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black} 454 | \setbeamercolor{palette quaternary}{fg=white,bg=structure.fg!50!black} 455 | 456 | \setbeamercolor{block title}{fg=white,bg=beamer@headercolor} 457 | \setbeamercolor{block body}{bg=beamer@headercolor!10} 458 | \setbeamercolor{block title example}{% 459 | use={normal text,example text},fg=white,bg=example text.fg!75!green 460 | } 461 | \setbeamercolor{fine separation line}{} 462 | \setbeamercolor{item projected}{fg=white} 463 | 464 | \setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg} 465 | \setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg} 466 | \setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg} 467 | \setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg} 468 | 469 | \setbeamercolor{section in sidebar}{fg=beamer@textcolor} 470 | \setbeamercolor{section in sidebar shaded}{fg=gray} 471 | \setbeamercolor{separation line}{} 472 | \ifx\beamer@thubar\beamer@thusidebar 473 | \setbeamercolor{sidebar}{bg=beamer@sidebarcolor!10} 474 | \else 475 | \setbeamercolor{sidebar}{bg=beamer@sidebarcolor} 476 | \fi 477 | \setbeamercolor{sidebar}{parent=palette primary} 478 | \setbeamercolor{structure}{fg=beamer@headercolor} 479 | \setbeamercolor{subsection in sidebar}{fg=beamer@textcolor} 480 | \setbeamercolor{subsection in sidebar shaded}{fg=gray} 481 | \setbeamercolor{logo}{bg=beamer@headercolor!20} 482 | 483 | \mode 484 | % 485 | % \end{macrocode} 486 | % 487 | % \subsection{内部主题文件部分} 488 | % 489 | % 必要宏包 490 | % \begin{macrocode} 491 | %<*thuinnerstyle> 492 | \RequirePackage{tikz} 493 | \usetikzlibrary{external} 494 | % \end{macrocode} 495 | % 496 | % 参数设置 497 | % \changes{v1.1.0}{2021/11/15}{add option `en' for preparing beamer in English} 498 | % \begin{macrocode} 499 | \DeclareOptionBeamer{en}{\def\beamer@thulang{english}} 500 | \DeclareOptionBeamer{sectiontoc}{\def\beamer@thusectoc{sectiontoc}} 501 | \DeclareOptionBeamer{subsectiontoc}{\def\beamer@thusubsectoc{subsectiontoc}} 502 | \ProcessOptionsBeamer 503 | 504 | \def\beamer@thulanguage{english} 505 | \def\beamer@thusectiontoc{sectiontoc} 506 | \def\beamer@thusubsectiontoc{subsectiontoc} 507 | % \end{macrocode} 508 | % 509 | % 特殊设置 510 | % \begin{macrocode} 511 | \mode 512 | 513 | \ifx\beamer@thulang\beamer@thulanguage 514 | \relax 515 | \else 516 | \RequirePackage{ctex} 517 | \fi 518 | 519 | \useinnertheme{circles} 520 | % \usefonttheme{structurebold} 521 | \setbeamertemplate{caption}[numbered]{} 522 | \useinnertheme[shadow]{rounded} 523 | 524 | \newcommand\varparallel{% 525 | \mathrel{% 526 | \text{% 527 | \tikz[baseline] \draw (0em,-0.3ex) -- (.4em,1.7ex) (.2em,-0.3ex) -- (.6em,1.7ex); 528 | }% 529 | }% 530 | } 531 | 532 | \ifx\beamer@thusectoc\beamer@thusectiontoc 533 | \AtBeginSection[]{ 534 | \begin{frame} 535 | \begin{multicols}{2} 536 | \tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] 537 | \end{multicols} 538 | \end{frame} 539 | } 540 | \fi 541 | 542 | \ifx\beamer@thusubsectoc\beamer@thusubsectiontoc 543 | \AtBeginSubsection[]{ 544 | \begin{frame} 545 | \begin{multicols}{2} 546 | \tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide] 547 | \end{multicols} 548 | \end{frame} 549 | } 550 | \fi 551 | 552 | \mode 553 | % 554 | % \end{macrocode} 555 | % \subsection{外部主题文件部分} 556 | % 557 | % \begin{macrocode} 558 | %<*thuouterstyle> 559 | % \end{macrocode} 560 | % 561 | % 参数设置 562 | % \begin{macrocode} 563 | \DeclareOptionBeamer{smoothbars}{\def\beamer@thubar{smoothbars}} 564 | \DeclareOptionBeamer{sidebar}{\def\beamer@thubar{sidebar}} 565 | \ProcessOptionsBeamer 566 | \def\beamer@thusidebar{sidebar} 567 | 568 | \mode 569 | 570 | % 取消导航符号 571 | \setbeamertemplate{navigation symbols}{} 572 | 573 | \ifx\beamer@thubar\beamer@thusidebar 574 | \useoutertheme[width=0.17\linewidth]{sidebar} 575 | \logo{\includegraphics[width=0.08\linewidth]{thulogo.pdf}} 576 | \else 577 | \useoutertheme[footline=authorinstitutetitle,subsection=false]{smoothbars} 578 | \fi 579 | 580 | % set footline 581 | \makeatletter 582 | \newcommand{\frameofframes}{/} 583 | \newcommand{\setframeofframes}[1]{ 584 | \renewcommand{\frameofframes}{#1} 585 | } 586 | \setbeamertemplate{footline}{% 587 | \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot} 588 | \end{beamercolorbox} 589 | \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% 590 | leftskip=.3cm,rightskip=.3cm plus1fil]{firstbottomline}% 591 | \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}% 592 | \hfill% 593 | {\usebeamerfont{institute in head/foot}% 594 | \usebeamercolor[fg]{frame number}% 595 | \insertshortinstitute 596 | }% 597 | \end{beamercolorbox}% 598 | \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,% 599 | leftskip=.3cm,rightskip=.3cm plus1fil]{secondbottomline}% 600 | {\usebeamerfont{title in head/foot}\insertshorttitle}% 601 | \hfill% 602 | {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber} 603 | \end{beamercolorbox}% 604 | \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot} 605 | \end{beamercolorbox} 606 | } 607 | \makeatother 608 | 609 | \mode 610 | % 611 | % \end{macrocode} 612 | % 613 | % \changes{v1.1.1}{2022/05/20}{fix \pkg{newpxtext} bug} 614 | % \iffalse 615 | % \begin{macrocode} 616 | %<*dtx-style> 617 | \ProvidesPackage{dtx-style} 618 | \RequirePackage{hypdoc} 619 | \RequirePackage[UTF8,scheme=chinese,fontset=windowsnew]{ctex} 620 | % \RequirePackage{newpxtext} 621 | \setmainfont{TeXGyrePagellaX}[ 622 | Extension = .otf, 623 | UprightFont = *-Regular, 624 | BoldFont = *-Bold, 625 | ItalicFont = *-Italic, 626 | BoldItalicFont = *-BoldItalic, 627 | ] 628 | \setsansfont{IBMPlexSansCondensed}[% 629 | Extension = .otf, 630 | UprightFont = *-Regular, 631 | BoldFont = *-Bold, 632 | ItalicFont = *-Italic, 633 | BoldItalicFont = *-BoldItalic 634 | ] 635 | \setmonofont{CMU Typewriter Text} 636 | \RequirePackage{newpxmath} 637 | \RequirePackage[top=2.5cm, bottom=2.5cm, left=3cm, right=2cm, headsep=8mm]{geometry} 638 | \RequirePackage{array,longtable,booktabs} 639 | \RequirePackage{listings} 640 | \RequirePackage{fancyhdr} 641 | \RequirePackage{xcolor} 642 | \RequirePackage{enumitem} 643 | \RequirePackage{etoolbox} 644 | \RequirePackage{metalogo} 645 | \RequirePackage{hyperref} 646 | 647 | \colorlet{thu@macro}{purple!60!black} 648 | \colorlet{thu@env}{purple!70!black} 649 | \colorlet{thu@option}{purple} 650 | \patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{} 651 | \patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{} 652 | \patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{} 653 | \patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{} 654 | 655 | \def\DescribeOption{% 656 | \leavevmode\@bsphack\begingroup\MakePrivateLetters% 657 | \Describe@Option} 658 | \def\Describe@Option#1{\endgroup 659 | \marginpar{\raggedleft\PrintDescribeOption{#1}}% 660 | \thu@special@index{option}{#1}\@esphack\ignorespaces} 661 | \def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{thu@option} #1\ } 662 | \def\thu@special@index#1#2{\@bsphack 663 | \begingroup 664 | \HD@target 665 | \let\HDorg@encapchar\encapchar 666 | \edef\encapchar usage{% 667 | \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}% 668 | }% 669 | \index{#2\actualchar{\string\ttfamily\space#2} 670 | (#1)\encapchar usage}% 671 | \index{#1:\levelchar#2\actualchar 672 | {\string\ttfamily\space#2}\encapchar usage}% 673 | \endgroup 674 | \@esphack} 675 | 676 | \lstdefinestyle{lstStyleBase}{% 677 | basicstyle=\small\ttfamily, 678 | aboveskip=\medskipamount, 679 | belowskip=\medskipamount, 680 | lineskip=0pt, 681 | boxpos=c, 682 | showlines=false, 683 | extendedchars=true, 684 | upquote=true, 685 | tabsize=2, 686 | showtabs=false, 687 | showspaces=false, 688 | showstringspaces=false, 689 | numbers=none, 690 | linewidth=\linewidth, 691 | xleftmargin=4pt, 692 | xrightmargin=0pt, 693 | resetmargins=false, 694 | breaklines=true, 695 | breakatwhitespace=false, 696 | breakindent=0pt, 697 | breakautoindent=true, 698 | columns=flexible, 699 | keepspaces=true, 700 | gobble=2, 701 | framesep=3pt, 702 | rulesep=1pt, 703 | framerule=1pt, 704 | backgroundcolor=\color{gray!5}, 705 | stringstyle=\color{purple!40!black!100}, 706 | keywordstyle=\bfseries\color{purple!50!black}, 707 | commentstyle=\slshape\color{black!60}} 708 | 709 | \lstdefinestyle{lstStyleShell}{% 710 | style=lstStyleBase, 711 | frame=l, 712 | rulecolor=\color{purple}, 713 | language=bash} 714 | 715 | \definecolor{beamer@headercolor}{RGB}{21,95,130} 716 | \lstdefinestyle{lstStyleLaTeX}{% 717 | style=lstStyleBase, 718 | frame=l, 719 | rulecolor=\color{beamer@headercolor}, 720 | language=[LaTeX]TeX} 721 | 722 | \lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{} 723 | \lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{} 724 | 725 | \setlist{nosep} 726 | 727 | \DeclareDocumentCommand{\option}{m}{\textsf{#1}} 728 | \DeclareDocumentCommand{\env}{m}{\texttt{#1}} 729 | \DeclareDocumentCommand{\pkg}{s m}{% 730 | \texttt{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}} 731 | \DeclareDocumentCommand{\file}{s m}{% 732 | \texttt{#2}\IfBooleanF#1{\thu@special@index{file}{#2}}} 733 | \newcommand{\myentry}[1]{% 734 | \marginpar{\small\raggedleft\color{purple}\bfseries\strut #1}} 735 | \newcommand{\note}[2][Note]{{% 736 | \color{magenta}{\bfseries #1}\emph{#2}}} 737 | \def\thubeamer{\textsc{Thu}\-\textsc{Beamer}} 738 | \def\thu{清华大学} 739 | % 740 | % \end{macrocode} 741 | % \fi 742 | % 743 | % \Finale 744 | % 745 | \endinput 746 | % \iffalse 747 | % Local Variables: 748 | % mode: doctex 749 | % TeX-master: t 750 | % End: 751 | % \fi 752 | -------------------------------------------------------------------------------- /thubeamer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YangLaTeX/thubeamer/210c08e200224e73e7535bb2a450e9f390520552/thubeamer.pdf --------------------------------------------------------------------------------