├── .devcontainer ├── Dockerfile ├── README.md ├── devcontainer.json └── docker-compose.yml ├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── ---feature-request-.md │ └── --bug--report-bug-.md ├── .gitignore ├── .gitmodules ├── LICENSE ├── README.md ├── docs └── index.html ├── makefile ├── nputhesis-noslash.bst ├── nputhesis.bst ├── poster.png ├── preview ├── abstract_chs.png ├── abstract_eng.png ├── accomplishments.png ├── acknowledgements.png ├── appendix.png ├── blindreview_off.png ├── blindreview_on.png ├── coverpage.png ├── frontpage_chs.png ├── frontpage_eng.png ├── references.png └── statement.png ├── reference.bib ├── release-helper ├── badges.png ├── badges.py ├── badges.svg ├── gallery.md └── rename_preview.sh ├── workspace.code-workspace ├── yanputhesis-sample.tex ├── yanputhesis.cls ├── yanputhesis.dtx └── yanputhesis.ins /.devcontainer/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM qmcgaw/latexdevcontainer:latest-full 2 | RUN apt install -y texlive-full make 3 | -------------------------------------------------------------------------------- /.devcontainer/README.md: -------------------------------------------------------------------------------- 1 | # Development container 2 | 3 | Development container that can be used with VSCode. 4 | 5 | It works on Linux, Windows and OSX. 6 | 7 | ## Requirements 8 | 9 | - [VS code](https://code.visualstudio.com/download) installed 10 | - [VS code remote containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) installed 11 | - [Docker](https://www.docker.com/products/docker-desktop) installed and running 12 | - [Docker Compose](https://docs.docker.com/compose/install/) installed 13 | 14 | ## Setup 15 | 16 | 1. Create the following files on your host if you don't have them: 17 | 18 | ```sh 19 | touch ~/.gitconfig ~/.zsh_history 20 | ``` 21 | 22 | Note that the development container will create the empty directories `~/.docker` and `~/.ssh` if you don't have them. 23 | 24 | 1. **For Docker on OSX or Windows without WSL**: ensure your home directory `~` is accessible by Docker. 25 | 1. **For Docker on Windows without WSL:** if you want to use SSH keys, bind mount your host `~/.ssh` to `/tmp/.ssh` instead of `~/.ssh` by changing the `volumes` section in the [docker-compose.yml](docker-compose.yml). 26 | 1. Open the command palette in Visual Studio Code (CTRL+SHIFT+P). 27 | 1. Select `Remote-Containers: Open Folder in Container...` and choose the project directory. 28 | 29 | ## Customization 30 | 31 | ### Customize the image 32 | 33 | You can make changes to the [Dockerfile](Dockerfile) and then rebuild the image. For example, your Dockerfile could be: 34 | 35 | ```Dockerfile 36 | FROM qmcgaw/latexdevcontainer 37 | RUN apk add curl 38 | ``` 39 | 40 | To rebuild the image, either: 41 | 42 | - With VSCode through the command palette, select `Remote-Containers: Rebuild and reopen in container` 43 | - With a terminal, go to this directory and `docker-compose build` 44 | 45 | ### Customize VS code settings 46 | 47 | You can customize **settings** and **extensions** in the [devcontainer.json](devcontainer.json) definition file. 48 | 49 | ### Entrypoint script 50 | 51 | You can bind mount a shell script to `/home/vscode/.welcome.sh` to replace the [current welcome script](shell/.welcome.sh). 52 | 53 | ### Publish a port 54 | 55 | To access a port from your host to your development container, publish a port in [docker-compose.yml](docker-compose.yml). You can also now do it directly with VSCode without restarting the container. 56 | 57 | ### Run other services 58 | 59 | 1. Modify [docker-compose.yml](docker-compose.yml) to launch other services at the same time as this development container, such as a test database: 60 | 61 | ```yml 62 | database: 63 | image: postgres 64 | restart: always 65 | environment: 66 | POSTGRES_PASSWORD: password 67 | ``` 68 | 69 | 1. In [devcontainer.json](devcontainer.json), change the line `"runServices": ["vscode"],` to `"runServices": ["vscode", "database"],`. 70 | 1. In the VS code command palette, rebuild the container. 71 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "texlive", 3 | "dockerComposeFile": ["docker-compose.yml"], 4 | "service": "vscode", 5 | "runServices": ["vscode"], 6 | "shutdownAction": "stopCompose", 7 | "workspaceFolder": "/workspace", 8 | "mounts": [ 9 | "source=${localWorkspaceFolder}/fonts,target=/usr/share/fonts/my_fonts,type=bind,consistency=cached" 10 | ], 11 | "postCreateCommand": "fc-cache -fv", 12 | "customizations": { 13 | "vscode": { 14 | "extensions": [ 15 | "james-yu.latex-workshop", 16 | // Git 17 | "eamodio.gitlens", 18 | // Other helpers 19 | "shardulm94.trailing-spaces", 20 | "stkb.rewrap", // rewrap comments after n characters on one line 21 | // Other 22 | "vscode-icons-team.vscode-icons" 23 | ], 24 | "settings": { 25 | // General settings 26 | "files.eol": "\n", 27 | // Latex settings 28 | "latex-workshop.linting.chktex.enabled": true, 29 | "latex-workshop.linting.chktex.exec.path": "chktex", 30 | "latex-workshop.latex.clean.subfolder.enabled": true, 31 | "latex-workshop.latex.autoClean.run": "onBuilt", 32 | "editor.formatOnSave": true, 33 | "files.associations": { 34 | "*.tex": "latex" 35 | }, 36 | "latex-workshop.latexindent.path": "latexindent", 37 | "latex-workshop.latexindent.args": [ 38 | "-c", 39 | "%DIR%/", 40 | "%TMPFILE%", 41 | "-y=defaultIndent: '%INDENT%'" 42 | ] 43 | } 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /.devcontainer/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.2" 2 | 3 | services: 4 | vscode: 5 | build: . 6 | image: latexdevcontainer 7 | volumes: 8 | - ../:/workspace 9 | # Docker socket to access Docker server 10 | - /var/run/docker.sock:/var/run/docker.sock 11 | # SSH directory 12 | # - ~/.ssh:/root/.ssh 13 | # For Windows without WSL, a copy will be made 14 | # from /tmp/.ssh to ~/.ssh to fix permissions 15 | # - ~/.ssh:/tmp/.ssh:ro 16 | # Shell history persistence 17 | - ~/.zsh_history:/root/.zsh_history:z 18 | # Git config 19 | # - ~/.gitconfig:/root/.gitconfig 20 | environment: 21 | - TZ= 22 | entrypoint: ["zsh", "-c", "while sleep 1000; do :; done"] 23 | 24 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: ['https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/Sponsorships/wechat_donate_appcode.jpg', 'https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/Sponsorships/alipay_donate_qrcode_polossk.jpg'] 14 | 15 | # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---feature-request-.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 建议(Feature request) 3 | about: 您可以提出您的建议 (Suggest an idea for this project) 4 | title: "[Suggestion]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 欢迎您对Yet Another LaTeX Template for NPU Thesis提出建议,非常感谢您对本项目的贡献! 11 | 在留下您的建议时,辛苦您同步提供如下信息: 12 | 1. 代码版本(Code version)(留空则默认最新): 13 | 2. 操作系统 (OS): 14 | 3. Tex Live版本,其他Tex版本也请注明 (Version of Tex Live or other Tex distribution): 15 | 4. Tex 编译器 (Tex compiler, eg. XeTeX): 16 | 17 | **你的建议是否和一个已知问题有关 (Is your feature request related to a problem? Please describe.)** 18 | 简洁、精准的概括您的问题(A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]) 19 | 20 | **告诉我们你想要的解决方案(Describe the solution you'd like)** 21 | 简介而精准的告诉我们你想要怎么样 (A clear and concise description of what you want to happen.) 22 | 23 | **告诉我们你想到的其他替代方案(Describe alternatives you've considered)** 24 | 简介而精准的告诉我们其他替代方案 (A clear and concise description of any alternative solutions or features you've considered.) 25 | 26 | **其他信息(Additional context)** 27 | 添加有关这个建议的其他信息,例如截图(Add any other context or screenshots about the feature request here.) 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/--bug--report-bug-.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 报告BUG (Report bug) 3 | about: 提交一个问题(Create a report to help us improve) 4 | title: "[BUG]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **描述您的问题 (Describe the bug)** 11 | 12 | *简洁、精准的概括您的问题(A clear and concise description of what the bug is.)例如:“在Mac OS系统下使用Tex Live 2019编译失败”* 13 | 14 | **环境与版本信息** 15 | 1. 代码版本(Code version)(留空则默认最新): 16 | 2. 操作系统 (OS): 17 | 3. Tex Live版本,其他Tex版本也请注明 (Version of Tex Live or other Tex distribution): 18 | 4. Tex 编译器 (Tex compiler, eg. XeTeX): 19 | 20 | **错误内容 (Error contents)** 21 | 22 | *如果您能提供错误信息(比如编译器),请在此粘贴 (Provide the error information if you could)* 23 | 24 | **可复现内容 (Reproduceable steps)** 25 | 26 | *请详细描述您的问题,同步贴出报错信息、日志、可复现的代码片段 (Describe your current behavior and code to reproduce the issue)* 27 | 28 | ** 附加内容 (Other info, bugs and logs)** 29 | 30 | *如果您对于此BUG有何见解或者有一些附加信息,请在此键入(Tell us your hints and thought about the bug)* 31 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | *.acn 3 | *.bbl 4 | *.blg 5 | *.glo 6 | *.ist 7 | *.log 8 | *.out 9 | *.synctex.gz 10 | *.thm 11 | *.toc 12 | *.aux 13 | *.lof 14 | *.lot 15 | *.DS_Store 16 | .vscode/settings.json 17 | *.idx 18 | *.nlo 19 | *.hd 20 | zhmakeindex 21 | yanputhesis.pdf 22 | yanputhesis-sample.pdf 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "fonts"] 2 | path = fonts 3 | url = https://github.com/NWPUMetaphysicsOffice/Fonts-For-NPU-Thesis-Template 4 | [submodule "Sponsorships"] 5 | path = Sponsorships 6 | url = https://github.com/NWPUMetaphysicsOffice/Sponsorships.git 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Yet Another NPU Thesis Template 2 | 3 | ![Poster][poster] 4 | 5 | ![Status](https://img.shields.io/badge/status-complete-brightgreen.svg) ![PhD-Thesis](https://img.shields.io/badge/PhD-Thesis-D11A2D.svg) ![Master-Thesis](https://img.shields.io/badge/Master-Thesis-1177B0.svg) ![TeX-Template](https://img.shields.io/badge/TeX-Template-3D6117.svg?style=flat-square) [![License](https://img.shields.io/badge/license-GNU_General_Public_License_v3.0-blue.svg)](LICENSE) ![Version](https://img.shields.io/badge/version-v1.8.5.0307-674EA7.svg) 6 | 7 | ![TeXLive>=2021](https://img.shields.io/badge/TeXLive-%3E=2021-3D6117.svg) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4159248.svg)](https://doi.org/10.5281/zenodo.4159248) [![](https://img.shields.io/github/last-commit/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis)](https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/zipball/master) [![](https://img.shields.io/github/issues/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis)](https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/issues) 8 | 9 | 这是在西北工业大学硕博研究生学位论文格式的要求下的一份 $\LaTeX$ 文档类模板,通过使用 `yanputhesis` 文档类来完成学位论文,也可直接在发布示例文件的基础上,修改章节标题,撰写内容,即可完成学位论文任务。 10 | 11 | 本 repo 主要基于开源库 [polossk/LaTeX-Template-For-NPU-Thesis](https://github.com/polossk/LaTeX-Template-For-NPU-Thesis) 之上修改而成,格式参照于 2022 年西北工业大学研究生院编写的[西北工业大学研究生学位论文写作指南](https://gs.nwpu.edu.cn/info/2284/15346.htm)。 12 | 13 | 目前项目主要由 @polossk 维护,发布版本可能会有一些不影响阅读与送审的小问题。如果有相关格式更正需求,请发布 issue 催更,我们将对模板 bug 发布更新。 14 | 15 | * master 分支,发布累积更新后的版本,当前版本 [v1.8.5](https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/releases) 16 | * polossk-dev 分支,由 @polossk 维护的开发分支,用于及时发布更新补丁,当前版本 v1.8.5.0307 [下载链接](https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/archive/refs/heads/polossk-dev.zip) 17 | 18 | ## 使用说明 19 | 20 | 1. 下载这个项目的 zip 包到到本地 21 | 2. 确保您的 TeX 版本为**不低于 Texlive 2021 版本** 22 | 3. 直接对 `yanputhesis-sample.tex` 文件进行修改,对应的摘要、章节内容、附录文件均已经默认生成,在此基础上加以修改即可 23 | 4. 如有必要,也可以请仿照 `yanputhesis-sample.tex` 的文件格式,在**导言区**使用 `\documentclass[lang=chs, degree=phd, blindreview=false, adobe=false, academic=true]{yanputhesis}` 来直接设置文档格式 24 | 5. 如有必要,修改 `makefile` 文件的 `MAIN` 选项为自己 `tex` 文档的文件名 25 | 6. *make samplebib & Enjoy* 26 | 27 | ## 基本信息录入 28 | 29 | ```tex 30 | %%=============================================================================% 31 | %% 基本信息录入 32 | %%-----------------------------------------------------------------------------% 33 | \title{基于 LaTeX 排版的 \\ 西北工业大学论文模板}{ % 中英文标题 34 | Yet Another Thesis Template of \\ Northwestern Polytechnical University 35 | } % 请自行断行 36 | \author{\blindreview{张三丰}}{\blindreview{Sanfeng Zhang}} % 姓名(添加盲评标记) 37 | \date{2022年6月}{Jun 2022} % 答辩日期 38 | \school{数学与统计学院}{School of Mathematics and Statistics}% 学院 39 | % 专业 博士请使用 Philosophy in XXXX,硕士只写 XXXX 即可 40 | \major{数学}{Philosophy in Mathematics} % 专业 41 | \advisor{\blindreview{李四海}}{\blindreview{Sihai Li}} % 导师(添加盲评标记) 42 | \advisorAcademicRank{教授}{Professor} % 导师中英学术职位(教授 Professor、副教授 Associate Professor、研究员 Researcher 和讲师 Lecturer) 43 | \studentnumber{2016123456} % 学号 44 | \funding{本研究得到玄学基金(编号23336666)资助.}{ % 基金资助 45 | The present work is supported by Funding of Metaphysics % 46 | (Project No:23336666).} % 47 | %%=============================================================================% 48 | ``` 49 | 50 | ## 常见问题 Q&A 51 | 52 | * **Q:博士学位论文 or 硕士学位论文?** 53 | * 本模版**默认**为学术博士学位论文,并且**兼容**硕士学位论文。目前不兼容本科毕业设计论文(未来计划兼容)。 54 | * 硕士如需使用,请使用编辑器搜索 `degree=phd` 标志,并修改 `phd` 为 `master` 即可。 55 | * 专业型学位,请使用编辑器搜索 `academic=true` 标志,并修改 `true` 为 `false` 即可,留空默认提供学术型学位。 56 | * 本科毕业设计论文推荐直接使用 [polossk/LaTeX-Template-For-NPU-Thesis](https://github.com/polossk/LaTeX-Template-For-NPU-Thesis) 模板,该模板的格式控制均集成在 `setting.tex` 文件当中,更方便初学者使用与学习。 57 | * **Q:参考文献的格式是哪个标准下的?** 58 | * 默认使用 `nputhesis.bst` [国标 GB/T 7714—2015 格式文件](https://github.com/zepinglee/gbt7714-bibtex-style),请在 tex 文档中声明 `\bibliographystyle{nputhesis}`。 59 | * **Q:我是 CTEX 套件用户,运行时出现错误,是什么原因?** 60 | * 因为 CTEX 套件**年久失修**,我们**没有适配**。请使用**不低于 Texlive 2021 版本**编写您的学位论文。 61 | * **Q:为什么页眉出现了多余的数字编号?** 62 | * 因为 `fancyhdr` 在旧版本中 `leftmark` 有 bug,新版本已修复,请使用**不低于 Texlive 2021 版本**即可避免该问题。 63 | * **Q:有专家评审问询到参考文献格式中为何会有多余的斜线(斜杠),这是什么原因?** 64 | * 最新国标是允许文档类型中通过斜线标注文档出处的,但是很多专家并不会关心新国标有哪些改动,会认为斜线是一种错误。如果遇到这种情况,请立即更换使用订正后的 `nputhesis-noslash.bst` 格式文件,如果有其他问题,请提交 issue,注明所引用的参考文献的类型以及对应的 `bibtex` 代码,最好展示出目前的输出结果与目标期望输出结果,方便我们帮助维护改正。 65 | * **Q:我是 Linux/macOS 用户,字体是否兼容?** 66 | * 本模板使用的是 **Windows** 系统的自带字体(宋体、黑体、楷体、仿宋、Times New Roman、Consolas),Windows 环境下目前能保证字体的指向正确。 67 | * 本模板目前兼容 Linux 与 macOS 用户。请在编译的时候添加 `-shell-escape` 选项,以保证模板正确识别操作系统。 68 | * Linux 用户请检查自己的字体库中是否有上述字体,推荐从 Windows 系统上拷贝一整套字体(宋黑楷仿宋)以方便后续使用。 69 | * macOS 用户使用系统自带的宋、黑、楷、仿宋字体(华文字体系列),对应的字体名分别是:STSongti-SC-Regular、STHeiti、STKaiti、STFangSong。 70 | * **Q:我是 macOS 用户,为什么我的黑体与别人的不一样?** 71 | * 这是由于 macOS 用户的黑体字体 `STHeiti` 与 Windows 上黑体字体 `SimHei` 本质上是两种不同的字体,因此部分汉字的显示效果有差异。目前非 Windows 操作系统的用户并没有取得 Windows 上黑体字体 `SimHei` 字体的授权,所以需要另外下载或拷贝使用。 72 | * 在文章送审时,你的评委老师的电脑极有可能是 Windows 的,所以为了避免字体显示问题(如文字很挤、字重不统一等),建议从 Windows 上拷贝一整套字体(宋黑楷仿宋),然后在文档类中添加选项 `winfonts=true` 以强制使用 Windows 字体。 73 | * 如果你觉得 Windows 上的字体也很丑不够美观,可以自行更换为其他开源或商用字体。比如开源的[思源宋体](https://github.com/adobe-fonts/source-han-serif)、[思源黑体](https://github.com/adobe-fonts/source-han-sans),然后更新对应操作系统的字体配置。 74 | * 请注意,如果你的文章会被收录或者其他商业用途,建议使用开源字体或默认操作系统字体,以避免不必要的麻烦。 75 | * **Q:我没有等宽字体(默认 Consolas),应该怎么办?** 76 | * 非 Windows 操作系统的用户(包括 macOS 与 Linux 用户)需要安装 Consolas 字体后使用,字体文件存放于 `fonts/English-Fonts/` 文件夹中。 77 | * `fonts` 文件夹与 [Fonts-For-NPU-Thesis-Template](https://github.com/NWPUMetaphysicsOffice/Fonts-For-NPU-Thesis-Template) 项目保持同步,可通过执行更新命令 `git submodule update --init --recursive` 来获取最新版本。 78 | * 如果有其他字体的需求,也可以自行更改 `yanputhesis.cls` 中 `\newcommand\codeFont{Consolas}` 为其他字体,例如修改为 `\newcommand\codeFont{Source Code Pro}` 以使用 `Source Code Pro` 字体。 79 | * **Q:有没有 Overleaf 版本?** 80 | * 也许可以通过本 repo 在 Overleaf 上建立一个项目,但是可能会遇到字体问题,请再三斟酌。 81 | * **Q:这个编译报错了 balabala,怎么解决?** 82 | * 请优先检索过往 issue 查看是否已有人提及相关解决方案。其次请确认是模板的 bug,我们将及时发布补丁。如果是其他问题,恕我们精力有限不能一一答复,建议善用搜索引擎或 ChatGPT。 83 | * **Q:编译时卡顿了,怎么解决?** 84 | * 对于 Windows 电脑,如果在编译过程中遇到卡在字体缓冲问题,请先关闭当前进程,并用管理员模式打开命令提示符(或终端),键入 `fc-cache -f -v` 强制刷新字体缓存即可 85 | * **Q:LaTeX 怎么调整公式大小/公式换行/怎么加粗?** 86 | * 抱歉,**恕制作者们不解答任何 LaTeX 使用问题**,请您自行百度或查阅相关书籍。 87 | * **Q:请问默认的 `makefile` 提供了哪些功能?** 88 | * 本模板提供了简单的 `makefile` 文件来控制编译流程,可以编译 `dtx` 文件从而得到模板类 `cls` 文件,也可以编译大论文文档 `yanputhesis-sample.tex`。 89 | * 所有基本流程为关闭当前已打开的输出 pdf 文件并删除,清理缓存文件,编译 tex 文档并打开。 90 | * 默认选项 `make` 或者 `make main` 负责编译编译 `dtx` 文件从而得到模板类 `yanputhesis.cls` 文件和样例文件 `yanputhesis-sample.tex`。 91 | * 提供选项 `make sample` 负责生成不含参考文献的样例文档 `yanputhesis-sample.pdf` 92 | * 提供选项 `make samplebib` 负责生成含有参考文献的样例文档 `yanputhesis-sample.pdf` 93 | * 同时提供了 `open[sample]`, `close`, `clean`, `wipe[sample]` 四组快捷指令,其效果如下: 94 | * `open[sample]`:使用 Acrobat 打开输出的 pdf 文件; 95 | * `close`:终止 Acrobat 进程从而关闭输出的 pdf 文件(会误伤其他已打开的文件); 96 | * `clean`:删除 `*.aux` 和其他缓存文件; 97 | * `wipe[sample]`:删除输出的 pdf 文件; 98 | * 对于 Linux 玩家而言,可参考上述功能,并在此 `makefile` 基础上稍作修改即可使用。 99 | * **Q:关于中文标题页和英文标题页排版太靠上的问题** 100 | * 尝试修改yanputhesis.cls中的设置中文标题页, 将 101 | ```latex 102 | \fSong \sSanhao \par \vspace{1\baselineskip} % 1 * 21pt * 1.5 103 | ``` 104 | 修改为 105 | ```latex 106 | \fSong \sSanhao \par \vspace*{2\baselineskip} % 1 * 21pt * 1.5 107 | ``` 108 | 加星号强制输出空行, 后续可以自行调节 109 | * **Q:为什么缩略语和术语表不显示** 110 | * 在编译前请使用`makeglossaries`命令完成对于缩略语和术语表的预编译。 111 | 112 | ## 成品预览 113 | 114 | 以下命令或环境按照实际论文中出现顺序排序: 115 | * 封皮页及标题页 `\maketitle` 116 | * 中文摘要及关键字 `\begin{abstract} ... \begin{keywords} ... \end{keywords} \end{abstract}` 117 | * 英文摘要及关键字 `\begin{engabstract} ... \begin{engkeywords} ... \end{engkeywords} \end{engabstract}` 118 | * 参考文献 `\bibliography{reference}` 119 | * 附录 `\appendix \section{附录} ...` 120 | * 致谢 `\begin{acknowledgements} ... \end{acknowledgements}` 121 | * 发表的学术论文和参加科研情况 `\begin{accomplishments} ... \end{accomplishments}` 122 | * 原创性声明 `\makestatement` 123 | 124 | | | 展示 | 展示 | 125 | | :---: | :---------------------------------: | :-----------------------------------: | 126 | | 预览 | ![Coverpage][coverpage] | ![Frontpage_Chs][frontpage_chs] | 127 | | 说明 | 封面页(外封面) | 中文标题页(题名页/内封面) | 128 | | 预览 | ![Frontpage_Eng][frontpage_eng] | ![Abstract_Chs][abstract_chs] | 129 | | 说明 | 英文标题页 | 中文摘要 | 130 | | 预览 | ![Abstract_Eng][abstract_eng] | ![References][references] | 131 | | 说明 | 英文摘要 | 参考文献 | 132 | | 预览 | ![Appendix][appendix] | ![Acknowledgements][acknowledgements] | 133 | | 说明 | 附录 | 致谢 | 134 | | 预览 | ![Accomplishments][accomplishments] | ![Statement][statement] | 135 | | 说明 | 参加科研情况 | 原创性声明 | 136 | | 预览 | ![Blindreview_On][blindreview_on] | ![Blindreview_Off][blindreview_off] | 137 | | 说明 | 开启盲评 | 默认关闭盲评 | 138 | 139 | ## 其他注意事项 140 | 141 | * **格式符说明** 142 | * 字体大小(size)的控制命令统一前缀为 `s` 143 | * 字体格式(font)的控制命令统一前缀为 `f` 144 | * **开源许可问题** 145 | * 基于 [GPLv3-LICENSE](LICENSE) 146 | * 如有帮助,请在自己的文章中引用;如果在此基础上新增/删除/更改,请按照开源许可的要求继续保持开源,且同时继续使用相同开源许可 147 | 148 | ## 鸣谢 149 | 150 | 本模板的实现参考了目前仍在维护的模板,这些模板的贡献者有(按姓氏排序): 151 | 152 | * 西工大玄学办:Congzhuo Fang (@CongzhuoFang), Shangkun Shen (@polossk),Zhihe Wang (@cfrpg),Jiduo Zhang (@kidozh),Lin Zhang (@DrLinZhang), Weijia Zhang (@njzwj); 153 | * 西北工业大学数学与统计学院:Yiqiang Li (@lyq105),Ying Liu,Jiashu Lu,Zongze Yang (@lrtfm); 154 | * GitHub 热心网友:@Alex-Beng, @itf0x, Li Kunyao (@likunyao),@neilwth,@wayne17,Wei Wang (@WilmerWang)。 155 | 156 | ## 如何参与该项目 157 | 158 | 您的使用与推广就是对本项目的最大支持!如果您想贡献代码或参与后期维护,我们十分欢迎! 159 | * 目前模板成型于 **2022 年**。如果后期有任何格式上的变化,欢迎 *fork-modify-pull-request* 或者在 [issue](hhttps://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/issues) 中详细说明新旧格式之差异,我们乐意解决模板使用的问题 160 | * 如果您已经光速修复了 bug,欢迎提交 pull-request 至 public-dev 分支当中,我们会及时将您的代码与更新日志一同合并至 master 分支,并署名鸣谢 161 | * 如果需要改动,您可能需要使用 `zhmakeindex` 来维护更新清单,请[下载](https://github.com/leo-liu/zhmakeindex/releases/tag/zhmakeindex-1.2)对应操作系统的可执行文件 162 | 163 | ## 如何赞助该项目(钞能力催更) 164 | 165 | 如果本项目对您的顺利毕业有那么一点点的帮助,希望您慷慨解囊。 166 | 167 | 开个玩笑。玄学办不拒绝您的合法资助,并且会公示您的资助金额与后续用途。目前支持扫码赞助,欢迎有条件的同学、老师请玄学办的小伙伴喝咖啡:) 168 | 169 | | | | 170 | | :----------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------: | 171 | | 来点微信扫码 | 或者来点可乐 | 172 | 173 | ### 打赏记录 174 | 175 | > 截止 2025 年 1 月 9 日,共收到赞赏 **34** 次,累积收款 **446.68** 元,感谢各位大佬的资助!因篇幅限制,详细捐献清单请查阅 [Sponsorships](https://nwpumetaphysicsoffice.github.io/Sponsorships/) 176 | 177 | | 时间 | 平台 | 金额 | 昵称 | 单号 | 留言备注 | 178 | | ----------------------- | ---------- | ------- | ------------------ | ----------------------------------- | ------------------------------------------- | 179 | | 2025年5月22日 17:56:02 | 微信赞赏码 | ¥9.96 | 无名大侠 | 10001081012025052219216\*\*\*\*1084 | 论文盲审已过,感谢! | 180 | | 2025年4月15日 14:25:31 | 微信赞赏码 | ¥0.66 | 无名大侠 | 10001081012025041517106\*\*\*\*3357 | 感谢大佬的贡献,之后用了直接给大佬一个66.66 | 181 | | 2025年4月10日 10:07:30 | 支付宝扫码 | ¥4.98 | \*\*俊 | 20250410220014015114\*\*\*\*2947 | 已顺利毕业,感谢大佬们的模板! | 182 | | 2025年1月9日 20:28:45 | 微信赞赏码 | ¥9.96 | \*\*\*\*\*\*\*\*我 | 10001081012025010916101\*\*\*\*9515 | 大佬喝茶 | 183 | | 2024年12月27日 11:39:01 | 微信赞赏码 | ¥9.96 | \*\*流 | 10001081012024122715214\*\*\*\*5632 | 感谢大佬们胃癌发电~已完稿请喝瑞幸 | 184 | | 2024年12月24日 21:04:10 | 支付宝扫码 | ¥4.98 | \*\*宇 | 20241224220014310314\*\*\*\*6910 | 请玄学办喝可乐!顺利毕业! | 185 | | 2024年12月24日 16:49:36 | 微信赞赏码 | ¥99.96 | \*简 | 10001081012024122419229\*\*\*\*2477 | 感谢你们为瓜大毕设开源社区做出的贡献 | 186 | | 2024年12月8日 19:27:38 | 支付宝扫码 | ¥4.98 | \*\*伯 | 20241208220014172414\*\*\*\*3556 | 请玄学办喝可乐! | 187 | | 2024年11月20日 11:01:38 | 支付宝扫码 | ¥4.98 | \*\*龙 | 20241120220014440614\*\*\*\*0807 | | 188 | | 2024年7月8日 20:34:33 | 支付宝扫码 | ¥4.98 | \*\*爽 | 20240708220014381014\*\*\*\*7109 | | 189 | | ... | ... | ... | ... | ... | ... | 190 | | 小结 | 44 次打赏 | ¥446.68 | | 感谢每一位支持我们的同学~ | | 191 | 192 | ## BibTeX 193 | 194 | ```bibtex 195 | @software{NWPUThesisLaTeXTemplate, 196 | title = {Yet Another {{\LaTeX}} Template for NPU Thesis}, 197 | author = {Shangkun Shen and Zhihe Wang and Jiduo Zhang and Weijia Zhang}, 198 | month = {11}, 199 | year = {2019}, 200 | publisher = {Zenodo}, 201 | journal = {GitHub repository}, 202 | doi = {10.5281/zenodo.4159248}, 203 | url = {https://doi.org/10.5281/zenodo.4159248} 204 | } 205 | ``` 206 | 207 | ## Copyright 208 | 209 | Use this code whatever you want, under the circumstances of acknowledging the GPL license on this page below. Star this repository if you like, and it will be very generous of you! 210 | 211 | ## License 212 | 213 | Copyright (c) 2016-2022 _NWPU Metaphysics Office_ 214 | 215 | This repo is under the license of **GNU General Public License v3.0**. Check the [license](https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/blob/master/LICENSE "license") for details. 216 | 217 | The association _NWPU Metaphysics Office_ is a club-like student group. The 218 | members are cfrpg, kidozh, njzwj, polossk, in alphabet order. 219 | 220 | ## 彩蛋 221 | 222 | * ![PhD-Thesis](https://img.shields.io/badge/PhD-Thesis-D11A2D.svg) ![Master-Thesis](https://img.shields.io/badge/Master-Thesis-1177B0.svg) 分别对应着博士服与硕士服的颜色。 223 | 224 | [poster]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/poster.png 225 | [coverpage]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/coverpage.png 226 | [frontpage_chs]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/frontpage_chs.png 227 | [frontpage_eng]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/frontpage_eng.png 228 | [abstract_chs]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/abstract_chs.png 229 | [abstract_eng]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/abstract_eng.png 230 | [references]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/references.png 231 | [appendix]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/appendix.png 232 | [acknowledgements]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/acknowledgements.png 233 | [accomplishments]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/accomplishments.png 234 | [statement]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/statement.png 235 | [blindreview_on]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/blindreview_on.png 236 | [blindreview_off]: https://github.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/raw/master/preview/blindreview_off.png 237 | -------------------------------------------------------------------------------- /makefile: -------------------------------------------------------------------------------- 1 | TEX = xelatex 2 | BIB = bibtex 3 | MKI = makeindex 4 | MAIN = yanputhesis 5 | TEXARGS = -synctex=1 -shell-escape 6 | 7 | main: close wipe clean makecls open 8 | 9 | sample: close wipesample clean texsample opensample 10 | 11 | samplebib: close wipesample clean texsamplebib opensample 12 | 13 | makecls: $(MAIN).dtx 14 | $(TEX) $< 15 | ./zhmakeindex -s gglo.ist -o $(MAIN).gls $(MAIN).glo 16 | $(MKI) -s gind.ist -o $(MAIN).ind $(MAIN).idx 17 | $(TEX) $< 18 | $(TEX) $< 19 | 20 | ifeq ($(OS), Windows_NT) 21 | PLATFORM = Windows 22 | else 23 | ifeq ($(shell uname), Darwin) 24 | PLATFORM = MacOS 25 | else 26 | PLATFORM = Unix-Like 27 | endif 28 | endif 29 | 30 | ifeq ($(PLATFORM), Windows) 31 | RM = del /s /f 32 | OPEN = cmd /c start 33 | CLOSE = cmd /c taskkill /im Acrobat.exe /t /f 34 | else 35 | RM = rm -rf 36 | OPEN = open 37 | PID = $$(ps -ef | grep AdobeAcrobat | grep -v grep | awk '{print $$2}') 38 | CLOSE = kill -9 $(PID) 39 | endif 40 | 41 | texsample: $(MAIN)-sample.tex 42 | $(TEX) $(TEXARGS) $< 43 | $(MKI) $(MAIN)-sample.nlo -s nomencl.ist -o $(MAIN)-sample.nls 44 | $(TEX) $(TEXARGS) $< 45 | 46 | texsamplebib: $(MAIN)-sample.tex 47 | $(TEX) $(TEXARGS) $< 48 | $(BIB) $(MAIN)-sample.aux 49 | $(MKI) $(MAIN)-sample.nlo -s nomencl.ist -o $(MAIN)-sample.nls 50 | $(TEX) $(TEXARGS) $< 51 | $(TEX) $(TEXARGS) $< 52 | 53 | open: $(MAIN).pdf 54 | $(OPEN) $(MAIN).pdf 55 | 56 | opensample: $(MAIN)-sample.pdf 57 | $(OPEN) $(MAIN)-sample.pdf 58 | 59 | close: 60 | @$(CLOSE) || echo not found 61 | 62 | clean: 63 | $(RM) *.gls *.glo *.ind yanputhesis.idx 64 | $(RM) *.ilg *.aux *.toc *.aux 65 | $(RM) *.hd *.out *.thm *.gz *.nlo *.nls 66 | $(RM) *.log *.lof *.lot *.bbl *.blg 67 | 68 | wipe: 69 | $(RM) $(MAIN).pdf 70 | 71 | wipesample: 72 | $(RM) $(MAIN)-sample.pdf 73 | 74 | .PHONY: open close clean wipe 75 | -------------------------------------------------------------------------------- /nputhesis-noslash.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `gbt7714-numerical.bst', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% gbt7714.dtx (with options: `2015,numerical') 8 | %% ------------------------------------------------------------------- 9 | %% GB/T 7714—2015 BibTeX Style 10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style 11 | %% Version: 2021/06/20 v2.1.2 12 | %% ------------------------------------------------------------------- 13 | %% Copyright (C) 2016—2021 by Zeping Lee 14 | %% ------------------------------------------------------------------- 15 | %% This file may be distributed and/or modified under the 16 | %% conditions of the LaTeX Project Public License, either version 1.3c 17 | %% of this license or (at your option) any later version. 18 | %% The latest version of this license is in 19 | %% https://www.latex-project.org/lppl.txt 20 | %% and version 1.3c or later is part of all distributions of LaTeX 21 | %% version 2008 or later. 22 | %% ------------------------------------------------------------------- 23 | INTEGERS { 24 | citation.et.al.min 25 | citation.et.al.use.first 26 | bibliography.et.al.min 27 | bibliography.et.al.use.first 28 | uppercase.name 29 | terms.in.macro 30 | year.after.author 31 | period.after.author 32 | italic.book.title 33 | sentence.case.title 34 | link.title 35 | title.in.journal 36 | show.mark 37 | space.before.mark 38 | show.medium.type 39 | slash.for.extraction 40 | in.booktitle 41 | short.journal 42 | italic.journal 43 | bold.journal.volume 44 | show.missing.address.publisher 45 | space.before.pages 46 | only.start.page 47 | wave.dash.in.pages 48 | show.urldate 49 | show.url 50 | show.doi 51 | show.preprint 52 | show.note 53 | show.english.translation 54 | end.with.period 55 | } 56 | 57 | FUNCTION {load.config} 58 | { 59 | #2 'citation.et.al.min := 60 | #1 'citation.et.al.use.first := 61 | #4 'bibliography.et.al.min := 62 | #3 'bibliography.et.al.use.first := 63 | #1 'uppercase.name := 64 | #0 'terms.in.macro := 65 | #0 'year.after.author := 66 | #1 'period.after.author := 67 | #0 'italic.book.title := 68 | #1 'sentence.case.title := 69 | #0 'link.title := 70 | #1 'title.in.journal := 71 | #1 'show.mark := 72 | #0 'space.before.mark := 73 | #1 'show.medium.type := 74 | #1 'slash.for.extraction := 75 | #0 'in.booktitle := 76 | #0 'short.journal := 77 | #0 'italic.journal := 78 | #0 'bold.journal.volume := 79 | #0 'show.missing.address.publisher := 80 | #1 'space.before.pages := 81 | #0 'only.start.page := 82 | #0 'wave.dash.in.pages := 83 | #1 'show.urldate := 84 | #1 'show.url := 85 | #1 'show.doi := 86 | #0 'show.preprint := 87 | #0 'show.note := 88 | #0 'show.english.translation := 89 | #1 'end.with.period := 90 | } 91 | 92 | ENTRY 93 | { address 94 | archivePrefix 95 | author 96 | booktitle 97 | date 98 | doi 99 | edition 100 | editor 101 | eprint 102 | eprinttype 103 | howpublished 104 | institution 105 | journal 106 | journaltitle 107 | key 108 | langid 109 | language 110 | location 111 | mark 112 | medium 113 | note 114 | number 115 | organization 116 | pages 117 | publisher 118 | school 119 | series 120 | shortjournal 121 | title 122 | translation 123 | translator 124 | url 125 | urldate 126 | volume 127 | year 128 | } 129 | { entry.lang entry.is.electronic is.pure.electronic entry.numbered } 130 | { label extra.label sort.label short.label short.list entry.mark entry.url } 131 | 132 | INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } 133 | 134 | INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } 135 | 136 | INTEGERS { charptr len } 137 | 138 | FUNCTION {init.state.consts} 139 | { #0 'before.all := 140 | #1 'mid.sentence := 141 | #2 'after.sentence := 142 | #3 'after.block := 143 | #4 'after.slash := 144 | #3 'lang.zh := 145 | #4 'lang.ja := 146 | #1 'lang.en := 147 | #2 'lang.ru := 148 | #0 'lang.other := 149 | } 150 | 151 | FUNCTION {bbl.anonymous} 152 | { entry.lang lang.zh = 153 | { "佚名" } 154 | { "Anon" } 155 | if$ 156 | } 157 | 158 | FUNCTION {bbl.space} 159 | { entry.lang lang.zh = 160 | { "\ " } 161 | { " " } 162 | if$ 163 | } 164 | 165 | FUNCTION {bbl.and} 166 | { "" } 167 | 168 | FUNCTION {bbl.et.al} 169 | { entry.lang lang.zh = 170 | { "等" } 171 | { entry.lang lang.ja = 172 | { "他" } 173 | { entry.lang lang.ru = 174 | { "идр" } 175 | { "et~al." } 176 | if$ 177 | } 178 | if$ 179 | } 180 | if$ 181 | } 182 | 183 | FUNCTION {citation.and} 184 | { terms.in.macro 185 | { "{\biband}" } 186 | 'bbl.and 187 | if$ 188 | } 189 | 190 | FUNCTION {citation.et.al} 191 | { terms.in.macro 192 | { "{\bibetal}" } 193 | 'bbl.et.al 194 | if$ 195 | } 196 | 197 | FUNCTION {bbl.colon} { ": " } 198 | 199 | FUNCTION {bbl.pages.colon} 200 | { space.before.pages 201 | { ": " } 202 | { ":\allowbreak " } 203 | if$ 204 | } 205 | 206 | FUNCTION {bbl.wide.space} { "\quad " } 207 | 208 | FUNCTION {bbl.slash} { ". \allowbreak " } %% Modified by polossk, 2022-11-01: no need for double slash 209 | % FUNCTION {bbl.slash} { "//\allowbreak " } 210 | 211 | FUNCTION {bbl.sine.loco} 212 | { entry.lang lang.zh = 213 | { "[出版地不详]" } 214 | { "[S.l.]" } 215 | if$ 216 | } 217 | 218 | FUNCTION {bbl.sine.nomine} 219 | { entry.lang lang.zh = 220 | { "[出版者不详]" } 221 | { "[s.n.]" } 222 | if$ 223 | } 224 | 225 | FUNCTION {bbl.sine.loco.sine.nomine} 226 | { entry.lang lang.zh = 227 | { "[出版地不详: 出版者不详]" } 228 | { "[S.l.: s.n.]" } 229 | if$ 230 | } 231 | 232 | FUNCTION {not} 233 | { { #0 } 234 | { #1 } 235 | if$ 236 | } 237 | 238 | FUNCTION {and} 239 | { 'skip$ 240 | { pop$ #0 } 241 | if$ 242 | } 243 | 244 | FUNCTION {or} 245 | { { pop$ #1 } 246 | 'skip$ 247 | if$ 248 | } 249 | 250 | STRINGS { x y } 251 | 252 | FUNCTION {contains} 253 | { 'y := 254 | 'x := 255 | y text.length$ 'len := 256 | x text.length$ len - #1 + 'charptr := 257 | { charptr #0 > 258 | x charptr len substring$ y = not 259 | and 260 | } 261 | { charptr #1 - 'charptr := } 262 | while$ 263 | charptr #0 > 264 | } 265 | 266 | STRINGS { s t } 267 | 268 | FUNCTION {output.nonnull} 269 | { 's := 270 | output.state mid.sentence = 271 | { ", " * write$ } 272 | { output.state after.block = 273 | { add.period$ write$ 274 | newline$ 275 | "\newblock " write$ 276 | } 277 | { output.state before.all = 278 | 'write$ 279 | { output.state after.slash = 280 | { bbl.slash * write$ 281 | newline$ 282 | } 283 | { add.period$ " " * write$ } 284 | if$ 285 | } 286 | if$ 287 | } 288 | if$ 289 | mid.sentence 'output.state := 290 | } 291 | if$ 292 | s 293 | } 294 | 295 | FUNCTION {output} 296 | { duplicate$ empty$ 297 | 'pop$ 298 | 'output.nonnull 299 | if$ 300 | } 301 | 302 | FUNCTION {output.after} 303 | { 't := 304 | duplicate$ empty$ 305 | 'pop$ 306 | { 's := 307 | output.state mid.sentence = 308 | { t * write$ } 309 | { output.state after.block = 310 | { add.period$ write$ 311 | newline$ 312 | "\newblock " write$ 313 | } 314 | { output.state before.all = 315 | 'write$ 316 | { output.state after.slash = 317 | { bbl.slash * write$ } 318 | { add.period$ " " * write$ } 319 | if$ 320 | } 321 | if$ 322 | } 323 | if$ 324 | mid.sentence 'output.state := 325 | } 326 | if$ 327 | s 328 | } 329 | if$ 330 | } 331 | 332 | FUNCTION {output.check} 333 | { 't := 334 | duplicate$ empty$ 335 | { pop$ "empty " t * " in " * cite$ * warning$ } 336 | 'output.nonnull 337 | if$ 338 | } 339 | 340 | FUNCTION {fin.entry} 341 | { end.with.period 342 | 'add.period$ 343 | 'skip$ 344 | if$ 345 | write$ 346 | show.english.translation entry.lang lang.zh = and 347 | { ")" 348 | write$ 349 | } 350 | 'skip$ 351 | if$ 352 | newline$ 353 | } 354 | 355 | FUNCTION {new.block} 356 | { output.state before.all = 357 | 'skip$ 358 | { output.state after.slash = 359 | 'skip$ 360 | { after.block 'output.state := } 361 | if$ 362 | } 363 | if$ 364 | } 365 | 366 | FUNCTION {new.sentence} 367 | { output.state after.block = 368 | 'skip$ 369 | { output.state before.all = 370 | 'skip$ 371 | { output.state after.slash = 372 | 'skip$ 373 | { after.sentence 'output.state := } 374 | if$ 375 | } 376 | if$ 377 | } 378 | if$ 379 | } 380 | 381 | FUNCTION {new.slash} 382 | { output.state before.all = 383 | 'skip$ 384 | { slash.for.extraction 385 | { after.slash 'output.state := } 386 | { after.block 'output.state := } 387 | if$ 388 | } 389 | if$ 390 | } 391 | 392 | FUNCTION {new.block.checka} 393 | { empty$ 394 | 'skip$ 395 | 'new.block 396 | if$ 397 | } 398 | 399 | FUNCTION {new.block.checkb} 400 | { empty$ 401 | swap$ empty$ 402 | and 403 | 'skip$ 404 | 'new.block 405 | if$ 406 | } 407 | 408 | FUNCTION {new.sentence.checka} 409 | { empty$ 410 | 'skip$ 411 | 'new.sentence 412 | if$ 413 | } 414 | 415 | FUNCTION {new.sentence.checkb} 416 | { empty$ 417 | swap$ empty$ 418 | and 419 | 'skip$ 420 | 'new.sentence 421 | if$ 422 | } 423 | 424 | FUNCTION {field.or.null} 425 | { duplicate$ empty$ 426 | { pop$ "" } 427 | 'skip$ 428 | if$ 429 | } 430 | 431 | FUNCTION {emphasize} 432 | { duplicate$ empty$ 433 | { pop$ "" } 434 | { "\emph{" swap$ * "}" * } 435 | if$ 436 | } 437 | 438 | FUNCTION {format.btitle} 439 | { italic.book.title 440 | entry.lang lang.en = and 441 | 'emphasize 442 | 'skip$ 443 | if$ 444 | } 445 | 446 | INTEGERS { byte second.byte } 447 | 448 | INTEGERS { char.lang tmp.lang } 449 | 450 | STRINGS { tmp.str } 451 | 452 | FUNCTION {get.str.lang} 453 | { 'tmp.str := 454 | lang.other 'tmp.lang := 455 | #1 'charptr := 456 | tmp.str text.length$ #1 + 'len := 457 | { charptr len < } 458 | { tmp.str charptr #1 substring$ chr.to.int$ 'byte := 459 | byte #128 < 460 | { charptr #1 + 'charptr := 461 | byte #64 > byte #91 < and byte #96 > byte #123 < and or 462 | { lang.en 'char.lang := } 463 | { lang.other 'char.lang := } 464 | if$ 465 | } 466 | { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := 467 | byte #224 < 468 | { charptr #2 + 'charptr := 469 | byte #207 > byte #212 < and 470 | byte #212 = second.byte #176 < and or 471 | { lang.ru 'char.lang := } 472 | { lang.other 'char.lang := } 473 | if$ 474 | } 475 | { byte #240 < 476 | { charptr #3 + 'charptr := 477 | byte #227 > byte #234 < and 478 | { lang.zh 'char.lang := } 479 | { byte #227 = 480 | { second.byte #143 > 481 | { lang.zh 'char.lang := } 482 | { second.byte #128 > second.byte #132 < and 483 | { lang.ja 'char.lang := } 484 | { lang.other 'char.lang := } 485 | if$ 486 | } 487 | if$ 488 | } 489 | { byte #239 = 490 | second.byte #163 > second.byte #172 < and and 491 | { lang.zh 'char.lang := } 492 | { lang.other 'char.lang := } 493 | if$ 494 | } 495 | if$ 496 | } 497 | if$ 498 | } 499 | { charptr #4 + 'charptr := 500 | byte #240 = second.byte #159 > and 501 | { lang.zh 'char.lang := } 502 | { lang.other 'char.lang := } 503 | if$ 504 | } 505 | if$ 506 | } 507 | if$ 508 | } 509 | if$ 510 | char.lang tmp.lang > 511 | { char.lang 'tmp.lang := } 512 | 'skip$ 513 | if$ 514 | } 515 | while$ 516 | tmp.lang 517 | } 518 | 519 | FUNCTION {check.entry.lang} 520 | { author field.or.null 521 | title field.or.null * 522 | get.str.lang 523 | } 524 | 525 | STRINGS { entry.langid } 526 | 527 | FUNCTION {set.entry.lang} 528 | { "" 'entry.langid := 529 | language empty$ not 530 | { language 'entry.langid := } 531 | 'skip$ 532 | if$ 533 | langid empty$ not 534 | { langid 'entry.langid := } 535 | 'skip$ 536 | if$ 537 | entry.langid empty$ 538 | { check.entry.lang } 539 | { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or 540 | { lang.en } 541 | { entry.langid "chinese" = 542 | { lang.zh } 543 | { entry.langid "japanese" = 544 | { lang.ja } 545 | { entry.langid "russian" = 546 | { lang.ru } 547 | { check.entry.lang } 548 | if$ 549 | } 550 | if$ 551 | } 552 | if$ 553 | } 554 | if$ 555 | } 556 | if$ 557 | 'entry.lang := 558 | } 559 | 560 | FUNCTION {set.entry.numbered} 561 | { type$ "patent" = 562 | type$ "standard" = or 563 | type$ "techreport" = or 564 | { #1 'entry.numbered := } 565 | { #0 'entry.numbered := } 566 | if$ 567 | } 568 | 569 | INTEGERS { nameptr namesleft numnames name.lang } 570 | 571 | FUNCTION {format.name} 572 | { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 573 | t "others" = 574 | { bbl.et.al } 575 | { t get.str.lang 'name.lang := 576 | name.lang lang.en = 577 | { t #1 "{vv~}{ll}{ f{~}}" format.name$ 578 | % edit by polossk, for NPU usage. 579 | % uppercase.name 580 | % { "u" change.case$ } 581 | % 'skip$ 582 | % if$ 583 | t #1 "{, jj}" format.name$ * 584 | } 585 | { t #1 "{ll}{ff}" format.name$ } 586 | if$ 587 | } 588 | if$ 589 | } 590 | 591 | FUNCTION {format.names} 592 | { 's := 593 | #1 'nameptr := 594 | s num.names$ 'numnames := 595 | "" 596 | numnames 'namesleft := 597 | { namesleft #0 > } 598 | { s nameptr format.name bbl.et.al = 599 | numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or 600 | { ", " * 601 | bbl.et.al * 602 | #1 'namesleft := 603 | } 604 | { nameptr #1 > 605 | { namesleft #1 = bbl.and "" = not and 606 | { bbl.and * } 607 | { ", " * } 608 | if$ 609 | } 610 | 'skip$ 611 | if$ 612 | s nameptr format.name * 613 | } 614 | if$ 615 | nameptr #1 + 'nameptr := 616 | namesleft #1 - 'namesleft := 617 | } 618 | while$ 619 | } 620 | 621 | FUNCTION {format.key} 622 | { empty$ 623 | { key field.or.null } 624 | { "" } 625 | if$ 626 | } 627 | 628 | FUNCTION {format.authors} 629 | { author empty$ not 630 | { author format.names } 631 | { "empty author in " cite$ * warning$ 632 | "" 633 | } 634 | if$ 635 | } 636 | 637 | FUNCTION {format.editors} 638 | { editor empty$ 639 | { "" } 640 | { editor format.names } 641 | if$ 642 | } 643 | 644 | FUNCTION {format.translators} 645 | { translator empty$ 646 | { "" } 647 | { translator format.names 648 | entry.lang lang.zh = 649 | { translator num.names$ #3 > 650 | { "译" * } 651 | { ", 译" * } 652 | if$ 653 | } 654 | 'skip$ 655 | if$ 656 | } 657 | if$ 658 | } 659 | 660 | FUNCTION {format.full.names} 661 | {'s := 662 | #1 'nameptr := 663 | s num.names$ 'numnames := 664 | numnames 'namesleft := 665 | { namesleft #0 > } 666 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 667 | t get.str.lang 'name.lang := 668 | name.lang lang.en = 669 | { t #1 "{vv~}{ll}" format.name$ 't := } 670 | { t #1 "{ll}{ff}" format.name$ 't := } 671 | if$ 672 | nameptr #1 > 673 | { 674 | namesleft #1 > 675 | { ", " * t * } 676 | { 677 | numnames #2 > 678 | { "," * } 679 | 'skip$ 680 | if$ 681 | t "others" = 682 | { " et~al." * } 683 | { " and " * t * } 684 | if$ 685 | } 686 | if$ 687 | } 688 | 't 689 | if$ 690 | nameptr #1 + 'nameptr := 691 | namesleft #1 - 'namesleft := 692 | } 693 | while$ 694 | } 695 | 696 | FUNCTION {author.editor.full} 697 | { author empty$ 698 | { editor empty$ 699 | { "" } 700 | { editor format.full.names } 701 | if$ 702 | } 703 | { author format.full.names } 704 | if$ 705 | } 706 | 707 | FUNCTION {author.full} 708 | { author empty$ 709 | { "" } 710 | { author format.full.names } 711 | if$ 712 | } 713 | 714 | FUNCTION {editor.full} 715 | { editor empty$ 716 | { "" } 717 | { editor format.full.names } 718 | if$ 719 | } 720 | 721 | FUNCTION {make.full.names} 722 | { type$ "book" = 723 | type$ "inbook" = 724 | or 725 | 'author.editor.full 726 | { type$ "collection" = 727 | type$ "proceedings" = 728 | or 729 | 'editor.full 730 | 'author.full 731 | if$ 732 | } 733 | if$ 734 | } 735 | 736 | FUNCTION {output.bibitem} 737 | { newline$ 738 | "\bibitem[" write$ 739 | label ")" * 740 | make.full.names duplicate$ short.list = 741 | { pop$ } 742 | { duplicate$ "]" contains 743 | { "{" swap$ * "}" * } 744 | 'skip$ 745 | if$ 746 | * 747 | } 748 | if$ 749 | "]{" * write$ 750 | cite$ write$ 751 | "}" write$ 752 | newline$ 753 | "" 754 | before.all 'output.state := 755 | } 756 | 757 | FUNCTION {change.sentence.case} 758 | { entry.lang lang.en = 759 | { "t" change.case$ } 760 | 'skip$ 761 | if$ 762 | } 763 | 764 | FUNCTION {add.link} 765 | { url empty$ not 766 | { "\href{" url * "}{" * swap$ * "}" * } 767 | { doi empty$ not 768 | { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } 769 | 'skip$ 770 | if$ 771 | } 772 | if$ 773 | } 774 | 775 | FUNCTION {format.title} 776 | { title empty$ 777 | { "" } 778 | { title 779 | sentence.case.title 780 | 'change.sentence.case 781 | 'skip$ 782 | if$ 783 | entry.numbered number empty$ not and 784 | { bbl.colon * number * } 785 | 'skip$ 786 | if$ 787 | link.title 788 | 'add.link 789 | 'skip$ 790 | if$ 791 | } 792 | if$ 793 | } 794 | 795 | FUNCTION {tie.or.space.connect} 796 | { duplicate$ text.length$ #3 < 797 | { "~" } 798 | { " " } 799 | if$ 800 | swap$ * * 801 | } 802 | 803 | FUNCTION {either.or.check} 804 | { empty$ 805 | 'pop$ 806 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 807 | if$ 808 | } 809 | 810 | FUNCTION {is.digit} 811 | { duplicate$ empty$ 812 | { pop$ #0 } 813 | { chr.to.int$ 814 | duplicate$ "0" chr.to.int$ < 815 | { pop$ #0 } 816 | { "9" chr.to.int$ > 817 | { #0 } 818 | { #1 } 819 | if$ 820 | } 821 | if$ 822 | } 823 | if$ 824 | } 825 | 826 | FUNCTION {is.number} 827 | { 's := 828 | s empty$ 829 | { #0 } 830 | { s text.length$ 'charptr := 831 | { charptr #0 > 832 | s charptr #1 substring$ is.digit 833 | and 834 | } 835 | { charptr #1 - 'charptr := } 836 | while$ 837 | charptr not 838 | } 839 | if$ 840 | } 841 | 842 | FUNCTION {format.volume} 843 | { volume empty$ not 844 | { volume is.number 845 | { entry.lang lang.zh = 846 | { "第 " volume * " 卷" * } 847 | { "volume" volume tie.or.space.connect } 848 | if$ 849 | } 850 | { volume } 851 | if$ 852 | } 853 | { "" } 854 | if$ 855 | } 856 | 857 | FUNCTION {format.number} 858 | { number empty$ not 859 | { number is.number 860 | { entry.lang lang.zh = 861 | { "第 " number * " 册" * } 862 | { "number" number tie.or.space.connect } 863 | if$ 864 | } 865 | { number } 866 | if$ 867 | } 868 | { "" } 869 | if$ 870 | } 871 | 872 | FUNCTION {format.volume.number} 873 | { volume empty$ not 874 | { format.volume } 875 | { format.number } 876 | if$ 877 | } 878 | 879 | FUNCTION {format.title.vol.num} 880 | { title 881 | sentence.case.title 882 | 'change.sentence.case 883 | 'skip$ 884 | if$ 885 | entry.numbered 886 | { number empty$ not 887 | { bbl.colon * number * } 888 | 'skip$ 889 | if$ 890 | } 891 | { format.volume.number 's := 892 | s empty$ not 893 | { bbl.colon * s * } 894 | 'skip$ 895 | if$ 896 | } 897 | if$ 898 | } 899 | 900 | FUNCTION {format.series.vol.num.title} 901 | { format.volume.number 's := 902 | series empty$ not 903 | { series 904 | sentence.case.title 905 | 'change.sentence.case 906 | 'skip$ 907 | if$ 908 | entry.numbered 909 | { bbl.wide.space * } 910 | { bbl.colon * 911 | s empty$ not 912 | { s * bbl.wide.space * } 913 | 'skip$ 914 | if$ 915 | } 916 | if$ 917 | title * 918 | sentence.case.title 919 | 'change.sentence.case 920 | 'skip$ 921 | if$ 922 | entry.numbered number empty$ not and 923 | { bbl.colon * number * } 924 | 'skip$ 925 | if$ 926 | } 927 | { format.title.vol.num } 928 | if$ 929 | format.btitle 930 | link.title 931 | 'add.link 932 | 'skip$ 933 | if$ 934 | } 935 | 936 | FUNCTION {format.booktitle.vol.num} 937 | { booktitle 938 | entry.numbered 939 | 'skip$ 940 | { format.volume.number 's := 941 | s empty$ not 942 | { bbl.colon * s * } 943 | 'skip$ 944 | if$ 945 | } 946 | if$ 947 | } 948 | 949 | FUNCTION {format.series.vol.num.booktitle} 950 | { format.volume.number 's := 951 | series empty$ not 952 | { series bbl.colon * 953 | entry.numbered not s empty$ not and 954 | { s * bbl.wide.space * } 955 | 'skip$ 956 | if$ 957 | booktitle * 958 | } 959 | { format.booktitle.vol.num } 960 | if$ 961 | format.btitle 962 | in.booktitle 963 | { duplicate$ empty$ not entry.lang lang.en = and 964 | { "In: " swap$ * } 965 | 'skip$ 966 | if$ 967 | } 968 | 'skip$ 969 | if$ 970 | } 971 | 972 | FUNCTION {remove.period} 973 | { 't := 974 | "" 's := 975 | { t empty$ not } 976 | { t #1 #1 substring$ 'tmp.str := 977 | tmp.str "." = not 978 | { s tmp.str * 's := } 979 | 'skip$ 980 | if$ 981 | t #2 global.max$ substring$ 't := 982 | } 983 | while$ 984 | s 985 | } 986 | 987 | FUNCTION {abbreviate} 988 | { remove.period 989 | 't := 990 | t "l" change.case$ 's := 991 | "" 992 | s "physical review letters" = 993 | { "Phys Rev Lett" } 994 | 'skip$ 995 | if$ 996 | 's := 997 | s empty$ 998 | { t } 999 | { pop$ s } 1000 | if$ 1001 | } 1002 | 1003 | FUNCTION {format.journal} 1004 | { "" 1005 | short.journal 1006 | { shortjournal empty$ not 1007 | { shortjournal * } 1008 | { journal empty$ not 1009 | { journal * abbreviate } 1010 | { journaltitle empty$ not 1011 | { journaltitle * abbreviate } 1012 | 'skip$ 1013 | if$ 1014 | } 1015 | if$ 1016 | } 1017 | if$ 1018 | } 1019 | { journal empty$ not 1020 | { journal * } 1021 | { journaltitle empty$ not 1022 | { journaltitle * } 1023 | 'skip$ 1024 | if$ 1025 | } 1026 | if$ 1027 | } 1028 | if$ 1029 | duplicate$ empty$ not 1030 | { italic.journal entry.lang lang.en = and 1031 | 'emphasize 1032 | 'skip$ 1033 | if$ 1034 | } 1035 | 'skip$ 1036 | if$ 1037 | } 1038 | 1039 | FUNCTION {set.entry.mark} 1040 | { entry.mark empty$ not 1041 | 'pop$ 1042 | { mark empty$ not 1043 | { pop$ mark 'entry.mark := } 1044 | { 'entry.mark := } 1045 | if$ 1046 | } 1047 | if$ 1048 | } 1049 | 1050 | FUNCTION {format.mark} 1051 | { show.mark 1052 | { entry.mark 1053 | show.medium.type 1054 | { medium empty$ not 1055 | { "" * } 1056 | { "" * } %% Modified by polossk, 2022-11-01: no need for double slash 1057 | % { "/" * medium * } 1058 | % { entry.is.electronic 1059 | % { "/OL" * } 1060 | % 'skip$ 1061 | % if$ 1062 | % } 1063 | if$ 1064 | } 1065 | 'skip$ 1066 | if$ 1067 | 'entry.mark := 1068 | space.before.mark 1069 | { " " } 1070 | { "\allowbreak" } 1071 | if$ 1072 | "[" * entry.mark * "]" * 1073 | } 1074 | { "" } 1075 | if$ 1076 | } 1077 | 1078 | FUNCTION {num.to.ordinal} 1079 | { duplicate$ text.length$ 'charptr := 1080 | duplicate$ charptr #1 substring$ 's := 1081 | s "1" = 1082 | { "st" * } 1083 | { s "2" = 1084 | { "nd" * } 1085 | { s "3" = 1086 | { "rd" * } 1087 | { "th" * } 1088 | if$ 1089 | } 1090 | if$ 1091 | } 1092 | if$ 1093 | } 1094 | 1095 | FUNCTION {format.edition} 1096 | { edition empty$ 1097 | { "" } 1098 | { edition is.number 1099 | { entry.lang lang.zh = 1100 | { edition " 版" * } 1101 | { edition num.to.ordinal " ed." * } 1102 | if$ 1103 | } 1104 | { entry.lang lang.en = 1105 | { edition change.sentence.case 's := 1106 | s "Revised" = s "Revised edition" = or 1107 | { "Rev. ed." } 1108 | { s " ed." *} 1109 | if$ 1110 | } 1111 | { edition } 1112 | if$ 1113 | } 1114 | if$ 1115 | } 1116 | if$ 1117 | } 1118 | 1119 | FUNCTION {format.publisher} 1120 | { publisher empty$ not 1121 | { publisher } 1122 | { school empty$ not 1123 | { school } 1124 | { organization empty$ not 1125 | { organization } 1126 | { institution empty$ not 1127 | { institution } 1128 | { "" } 1129 | if$ 1130 | } 1131 | if$ 1132 | } 1133 | if$ 1134 | } 1135 | if$ 1136 | } 1137 | 1138 | FUNCTION {format.address.publisher} 1139 | { address empty$ not 1140 | { address } 1141 | { location empty$ not 1142 | { location } 1143 | { "" } 1144 | if$ 1145 | } 1146 | if$ 1147 | duplicate$ empty$ not 1148 | { format.publisher empty$ not 1149 | { bbl.colon * format.publisher * } 1150 | { entry.is.electronic not show.missing.address.publisher and 1151 | { bbl.colon * bbl.sine.nomine * } 1152 | 'skip$ 1153 | if$ 1154 | } 1155 | if$ 1156 | } 1157 | { pop$ 1158 | entry.is.electronic not show.missing.address.publisher and 1159 | { format.publisher empty$ not 1160 | { bbl.sine.loco bbl.colon * format.publisher * } 1161 | { bbl.sine.loco.sine.nomine } 1162 | if$ 1163 | } 1164 | { format.publisher empty$ not 1165 | { format.publisher } 1166 | { "" } 1167 | if$ 1168 | } 1169 | if$ 1170 | } 1171 | if$ 1172 | } 1173 | 1174 | FUNCTION {extract.before.dash} 1175 | { duplicate$ empty$ 1176 | { pop$ "" } 1177 | { 's := 1178 | #1 'charptr := 1179 | s text.length$ #1 + 'len := 1180 | { charptr len < 1181 | s charptr #1 substring$ "-" = not 1182 | and 1183 | } 1184 | { charptr #1 + 'charptr := } 1185 | while$ 1186 | s #1 charptr #1 - substring$ 1187 | } 1188 | if$ 1189 | } 1190 | 1191 | FUNCTION {extract.after.dash} 1192 | { duplicate$ empty$ 1193 | { pop$ "" } 1194 | { 's := 1195 | #1 'charptr := 1196 | s text.length$ #1 + 'len := 1197 | { charptr len < 1198 | s charptr #1 substring$ "-" = not 1199 | and 1200 | } 1201 | { charptr #1 + 'charptr := } 1202 | while$ 1203 | { charptr len < 1204 | s charptr #1 substring$ "-" = 1205 | and 1206 | } 1207 | { charptr #1 + 'charptr := } 1208 | while$ 1209 | s charptr global.max$ substring$ 1210 | } 1211 | if$ 1212 | } 1213 | 1214 | FUNCTION {extract.before.slash} 1215 | { duplicate$ empty$ 1216 | { pop$ "" } 1217 | { 's := 1218 | #1 'charptr := 1219 | s text.length$ #1 + 'len := 1220 | { charptr len < 1221 | s charptr #1 substring$ "/" = not 1222 | and 1223 | } 1224 | { charptr #1 + 'charptr := } 1225 | while$ 1226 | s #1 charptr #1 - substring$ 1227 | } 1228 | if$ 1229 | } 1230 | 1231 | FUNCTION {extract.after.slash} 1232 | { duplicate$ empty$ 1233 | { pop$ "" } 1234 | { 's := 1235 | #1 'charptr := 1236 | s text.length$ #1 + 'len := 1237 | { charptr len < 1238 | s charptr #1 substring$ "-" = not 1239 | and 1240 | s charptr #1 substring$ "/" = not 1241 | and 1242 | } 1243 | { charptr #1 + 'charptr := } 1244 | while$ 1245 | { charptr len < 1246 | s charptr #1 substring$ "-" = 1247 | s charptr #1 substring$ "/" = 1248 | or 1249 | and 1250 | } 1251 | { charptr #1 + 'charptr := } 1252 | while$ 1253 | s charptr global.max$ substring$ 1254 | } 1255 | if$ 1256 | } 1257 | 1258 | FUNCTION {format.year} 1259 | { year empty$ not 1260 | { year extract.before.slash extra.label * } 1261 | { date empty$ not 1262 | { date extract.before.dash extra.label * } 1263 | { "empty year in " cite$ * warning$ 1264 | urldate empty$ not 1265 | { "[" urldate extract.before.dash * extra.label * "]" * } 1266 | { "" } 1267 | if$ 1268 | } 1269 | if$ 1270 | } 1271 | if$ 1272 | } 1273 | 1274 | FUNCTION {format.periodical.year} 1275 | { year empty$ not 1276 | { year extract.before.slash 1277 | "--" * 1278 | year extract.after.slash 1279 | duplicate$ empty$ 1280 | 'pop$ 1281 | { * } 1282 | if$ 1283 | } 1284 | { date empty$ not 1285 | { date extract.before.dash } 1286 | { "empty year in " cite$ * warning$ 1287 | urldate empty$ not 1288 | { "[" urldate extract.before.dash * "]" * } 1289 | { "" } 1290 | if$ 1291 | } 1292 | if$ 1293 | } 1294 | if$ 1295 | } 1296 | 1297 | FUNCTION {format.date} 1298 | { date empty$ not 1299 | { type$ "patent" = type$ "newspaper" = or 1300 | { date } 1301 | { format.year } 1302 | if$ 1303 | } 1304 | { year empty$ not 1305 | { format.year } 1306 | { "" } 1307 | if$ 1308 | } 1309 | if$ 1310 | } 1311 | 1312 | FUNCTION {format.editdate} 1313 | { date empty$ not 1314 | { "\allowbreak(" date * ")" * } 1315 | { "" } 1316 | if$ 1317 | } 1318 | 1319 | FUNCTION {format.urldate} 1320 | { urldate empty$ not 1321 | show.urldate show.url and is.pure.electronic or and 1322 | url empty$ not and 1323 | { "\allowbreak[" urldate * "]" * } 1324 | { "" } 1325 | if$ 1326 | } 1327 | 1328 | FUNCTION {hyphenate} 1329 | { 't := 1330 | "" 1331 | { t empty$ not } 1332 | { t #1 #1 substring$ "-" = 1333 | { wave.dash.in.pages 1334 | { "~" * } 1335 | { "-" * } 1336 | if$ 1337 | { t #1 #1 substring$ "-" = } 1338 | { t #2 global.max$ substring$ 't := } 1339 | while$ 1340 | } 1341 | { t #1 #1 substring$ * 1342 | t #2 global.max$ substring$ 't := 1343 | } 1344 | if$ 1345 | } 1346 | while$ 1347 | } 1348 | 1349 | FUNCTION {format.pages} 1350 | { pages empty$ 1351 | { "" } 1352 | { pages hyphenate } 1353 | if$ 1354 | } 1355 | 1356 | FUNCTION {format.extracted.pages} 1357 | { pages empty$ 1358 | { "" } 1359 | { pages 1360 | only.start.page 1361 | 'extract.before.dash 1362 | 'hyphenate 1363 | if$ 1364 | } 1365 | if$ 1366 | } 1367 | 1368 | FUNCTION {format.journal.volume} 1369 | { volume empty$ not 1370 | { bold.journal.volume 1371 | { "\textbf{" volume * "}" * } 1372 | { volume } 1373 | if$ 1374 | } 1375 | { "" } 1376 | if$ 1377 | } 1378 | 1379 | FUNCTION {format.journal.number} 1380 | { number empty$ not 1381 | { "\allowbreak (" number * ")" * } 1382 | { "" } 1383 | if$ 1384 | } 1385 | 1386 | FUNCTION {format.journal.pages} 1387 | { pages empty$ 1388 | { "" } 1389 | { format.extracted.pages } 1390 | if$ 1391 | } 1392 | 1393 | FUNCTION {format.periodical.year.volume.number} 1394 | { year empty$ not 1395 | { year extract.before.slash } 1396 | { "empty year in periodical " cite$ * warning$ } 1397 | if$ 1398 | volume empty$ not 1399 | { ", " * volume extract.before.dash * } 1400 | 'skip$ 1401 | if$ 1402 | number empty$ not 1403 | { "\allowbreak (" * number extract.before.dash * ")" * } 1404 | 'skip$ 1405 | if$ 1406 | "--" * 1407 | year extract.after.slash empty$ 1408 | volume extract.after.dash empty$ and 1409 | number extract.after.dash empty$ and not 1410 | { year extract.after.slash empty$ not 1411 | { year extract.after.slash * } 1412 | { year extract.before.slash * } 1413 | if$ 1414 | volume empty$ not 1415 | { ", " * volume extract.after.dash * } 1416 | 'skip$ 1417 | if$ 1418 | number empty$ not 1419 | { "\allowbreak (" * number extract.after.dash * ")" * } 1420 | 'skip$ 1421 | if$ 1422 | } 1423 | 'skip$ 1424 | if$ 1425 | } 1426 | 1427 | FUNCTION {check.url} 1428 | { url empty$ not 1429 | { "\url{" url * "}" * 'entry.url := 1430 | #1 'entry.is.electronic := 1431 | } 1432 | { howpublished empty$ not 1433 | { howpublished #1 #5 substring$ "\url{" = 1434 | { howpublished 'entry.url := 1435 | #1 'entry.is.electronic := 1436 | } 1437 | 'skip$ 1438 | if$ 1439 | } 1440 | { note empty$ not 1441 | { note #1 #5 substring$ "\url{" = 1442 | { note 'entry.url := 1443 | #1 'entry.is.electronic := 1444 | } 1445 | 'skip$ 1446 | if$ 1447 | } 1448 | 'skip$ 1449 | if$ 1450 | } 1451 | if$ 1452 | } 1453 | if$ 1454 | } 1455 | 1456 | FUNCTION {format.url} 1457 | { entry.url 1458 | } 1459 | 1460 | FUNCTION {output.url} 1461 | { entry.url empty$ not 1462 | { new.block 1463 | entry.url output 1464 | } 1465 | 'skip$ 1466 | if$ 1467 | } 1468 | 1469 | FUNCTION {check.doi} 1470 | { doi empty$ not 1471 | { #1 'entry.is.electronic := } 1472 | 'skip$ 1473 | if$ 1474 | } 1475 | 1476 | FUNCTION {is.in.url} 1477 | { 's := 1478 | s empty$ 1479 | { #1 } 1480 | { entry.url empty$ 1481 | { #0 } 1482 | { s text.length$ 'len := 1483 | entry.url text.length$ 'charptr := 1484 | { entry.url charptr len substring$ s = not 1485 | charptr #0 > 1486 | and 1487 | } 1488 | { charptr #1 - 'charptr := } 1489 | while$ 1490 | charptr 1491 | } 1492 | if$ 1493 | } 1494 | if$ 1495 | } 1496 | 1497 | FUNCTION {format.doi} 1498 | { "" 1499 | doi empty$ not 1500 | { "" 's := 1501 | doi 't := 1502 | #0 'numnames := 1503 | { t empty$ not} 1504 | { t #1 #1 substring$ 'tmp.str := 1505 | tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or 1506 | { t #2 #1 substring$ empty$ 1507 | { s tmp.str * 's := } 1508 | 'skip$ 1509 | if$ 1510 | s empty$ s is.in.url or 1511 | 'skip$ 1512 | { numnames #1 + 'numnames := 1513 | numnames #1 > 1514 | { ", " * } 1515 | { "DOI: " * } 1516 | if$ 1517 | "\doi{" s * "}" * * 1518 | } 1519 | if$ 1520 | "" 's := 1521 | } 1522 | { s tmp.str * 's := } 1523 | if$ 1524 | t #2 global.max$ substring$ 't := 1525 | } 1526 | while$ 1527 | } 1528 | 'skip$ 1529 | if$ 1530 | } 1531 | 1532 | FUNCTION {output.doi} 1533 | { doi empty$ not show.doi and 1534 | show.english.translation entry.lang lang.zh = and not and 1535 | { new.block 1536 | format.doi output 1537 | } 1538 | 'skip$ 1539 | if$ 1540 | } 1541 | 1542 | FUNCTION {check.electronic} 1543 | { "" 'entry.url := 1544 | #0 'entry.is.electronic := 1545 | 'check.doi 1546 | 'skip$ 1547 | if$ 1548 | 'check.url 1549 | 'skip$ 1550 | if$ 1551 | medium empty$ not 1552 | { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or 1553 | { #1 'entry.is.electronic := } 1554 | 'skip$ 1555 | if$ 1556 | } 1557 | 'skip$ 1558 | if$ 1559 | } 1560 | 1561 | FUNCTION {format.eprint} 1562 | { eprinttype empty$ not 1563 | { eprinttype } 1564 | { archivePrefix empty$ not 1565 | { archivePrefix } 1566 | { "" } 1567 | if$ 1568 | } 1569 | if$ 1570 | 's := 1571 | s empty$ not 1572 | { s ": \eprint{" * 1573 | url empty$ not 1574 | { url } 1575 | { "https://" s "l" change.case$ * ".org/abs/" * eprint * } 1576 | if$ 1577 | * "}{" * 1578 | eprint * "}" * 1579 | } 1580 | { eprint } 1581 | if$ 1582 | } 1583 | 1584 | FUNCTION {output.eprint} 1585 | { show.preprint eprint empty$ not and 1586 | { new.block 1587 | format.eprint output 1588 | } 1589 | 'skip$ 1590 | if$ 1591 | } 1592 | 1593 | FUNCTION {format.note} 1594 | { note empty$ not show.note and 1595 | { note } 1596 | { "" } 1597 | if$ 1598 | } 1599 | 1600 | FUNCTION {output.translation} 1601 | { show.english.translation entry.lang lang.zh = and 1602 | { translation empty$ not 1603 | { translation } 1604 | { "[English translation missing!]" } 1605 | if$ 1606 | " (in Chinese)" * output 1607 | write$ 1608 | format.doi duplicate$ empty$ not 1609 | { newline$ 1610 | write$ 1611 | } 1612 | 'pop$ 1613 | if$ 1614 | " \\" write$ 1615 | newline$ 1616 | "(" write$ 1617 | "" 1618 | before.all 'output.state := 1619 | } 1620 | 'skip$ 1621 | if$ 1622 | } 1623 | 1624 | FUNCTION {empty.misc.check} 1625 | { author empty$ title empty$ 1626 | year empty$ 1627 | and and 1628 | key empty$ not and 1629 | { "all relevant fields are empty in " cite$ * warning$ } 1630 | 'skip$ 1631 | if$ 1632 | } 1633 | 1634 | FUNCTION {monograph} 1635 | { output.bibitem 1636 | output.translation 1637 | author empty$ not 1638 | { format.authors } 1639 | { editor empty$ not 1640 | { format.editors } 1641 | { "empty author and editor in " cite$ * warning$ 1642 | "" 1643 | } 1644 | if$ 1645 | } 1646 | if$ 1647 | output 1648 | year.after.author 1649 | { period.after.author 1650 | 'new.sentence 1651 | 'skip$ 1652 | if$ 1653 | format.year "year" output.check 1654 | } 1655 | 'skip$ 1656 | if$ 1657 | new.block 1658 | format.series.vol.num.title "title" output.check 1659 | "M" set.entry.mark 1660 | format.mark "" output.after 1661 | new.block 1662 | format.translators output 1663 | new.sentence 1664 | format.edition output 1665 | new.block 1666 | format.address.publisher output 1667 | year.after.author not 1668 | { format.year "year" output.check } 1669 | 'skip$ 1670 | if$ 1671 | format.pages bbl.pages.colon output.after 1672 | format.urldate "" output.after 1673 | output.url 1674 | output.doi 1675 | new.block 1676 | format.note output 1677 | fin.entry 1678 | } 1679 | 1680 | FUNCTION {incollection} 1681 | { output.bibitem 1682 | output.translation 1683 | format.authors output 1684 | author format.key output 1685 | year.after.author 1686 | { period.after.author 1687 | 'new.sentence 1688 | 'skip$ 1689 | if$ 1690 | format.year "year" output.check 1691 | } 1692 | 'skip$ 1693 | if$ 1694 | new.block 1695 | format.title "title" output.check 1696 | "M" set.entry.mark 1697 | format.mark "" output.after 1698 | new.block 1699 | format.translators output 1700 | new.slash 1701 | format.editors output 1702 | new.block 1703 | format.series.vol.num.booktitle "booktitle" output.check 1704 | new.block 1705 | format.edition output 1706 | new.block 1707 | format.address.publisher output 1708 | year.after.author not 1709 | { format.year "year" output.check } 1710 | 'skip$ 1711 | if$ 1712 | format.extracted.pages bbl.pages.colon output.after 1713 | format.urldate "" output.after 1714 | output.url 1715 | output.doi 1716 | new.block 1717 | format.note output 1718 | fin.entry 1719 | } 1720 | 1721 | FUNCTION {periodical} 1722 | { output.bibitem 1723 | output.translation 1724 | format.authors output 1725 | author format.key output 1726 | year.after.author 1727 | { period.after.author 1728 | 'new.sentence 1729 | 'skip$ 1730 | if$ 1731 | format.year "year" output.check 1732 | } 1733 | 'skip$ 1734 | if$ 1735 | new.block 1736 | format.title "title" output.check 1737 | "J" set.entry.mark 1738 | format.mark "" output.after 1739 | new.block 1740 | format.periodical.year.volume.number output 1741 | new.block 1742 | format.address.publisher output 1743 | year.after.author not 1744 | { format.periodical.year "year" output.check } 1745 | 'skip$ 1746 | if$ 1747 | format.urldate "" output.after 1748 | output.url 1749 | output.doi 1750 | new.block 1751 | format.note output 1752 | fin.entry 1753 | } 1754 | 1755 | FUNCTION {article} 1756 | { output.bibitem 1757 | output.translation 1758 | format.authors output 1759 | author format.key output 1760 | year.after.author 1761 | { period.after.author 1762 | 'new.sentence 1763 | 'skip$ 1764 | if$ 1765 | format.year "year" output.check 1766 | } 1767 | 'skip$ 1768 | if$ 1769 | new.block 1770 | title.in.journal 1771 | { format.title "title" output.check 1772 | "J" set.entry.mark 1773 | format.mark "" output.after 1774 | new.block 1775 | } 1776 | 'skip$ 1777 | if$ 1778 | format.journal "journal" output.check 1779 | year.after.author not 1780 | { format.date "year" output.check } 1781 | 'skip$ 1782 | if$ 1783 | format.journal.volume output 1784 | format.journal.number "" output.after 1785 | format.journal.pages bbl.pages.colon output.after 1786 | format.urldate "" output.after 1787 | output.url 1788 | output.doi 1789 | new.block 1790 | format.note output 1791 | fin.entry 1792 | } 1793 | 1794 | FUNCTION {patent} 1795 | { output.bibitem 1796 | output.translation 1797 | format.authors output 1798 | author format.key output 1799 | year.after.author 1800 | { period.after.author 1801 | 'new.sentence 1802 | 'skip$ 1803 | if$ 1804 | format.year "year" output.check 1805 | } 1806 | 'skip$ 1807 | if$ 1808 | new.block 1809 | format.title "title" output.check 1810 | "P" set.entry.mark 1811 | format.mark "" output.after 1812 | new.block 1813 | format.date "year" output.check 1814 | format.urldate "" output.after 1815 | output.url 1816 | output.doi 1817 | new.block 1818 | format.note output 1819 | fin.entry 1820 | } 1821 | 1822 | FUNCTION {electronic} 1823 | { #1 #1 check.electronic 1824 | #1 'entry.is.electronic := 1825 | #1 'is.pure.electronic := 1826 | output.bibitem 1827 | output.translation 1828 | format.authors output 1829 | author format.key output 1830 | year.after.author 1831 | { period.after.author 1832 | 'new.sentence 1833 | 'skip$ 1834 | if$ 1835 | format.year "year" output.check 1836 | } 1837 | 'skip$ 1838 | if$ 1839 | new.block 1840 | format.series.vol.num.title "title" output.check 1841 | "EB" set.entry.mark 1842 | format.mark "" output.after 1843 | new.block 1844 | format.address.publisher output 1845 | year.after.author not 1846 | { date empty$ 1847 | { format.date output } 1848 | 'skip$ 1849 | if$ 1850 | } 1851 | 'skip$ 1852 | if$ 1853 | format.pages bbl.pages.colon output.after 1854 | format.editdate "" output.after 1855 | format.urldate "" output.after 1856 | output.url 1857 | output.doi 1858 | new.block 1859 | format.note output 1860 | fin.entry 1861 | } 1862 | 1863 | FUNCTION {preprint} 1864 | { output.bibitem 1865 | output.translation 1866 | author empty$ not 1867 | { format.authors } 1868 | { editor empty$ not 1869 | { format.editors } 1870 | { "empty author and editor in " cite$ * warning$ 1871 | "" 1872 | } 1873 | if$ 1874 | } 1875 | if$ 1876 | output 1877 | year.after.author 1878 | { period.after.author 1879 | 'new.sentence 1880 | 'skip$ 1881 | if$ 1882 | format.year "year" output.check 1883 | } 1884 | 'skip$ 1885 | if$ 1886 | new.block 1887 | title.in.journal 1888 | { format.series.vol.num.title "title" output.check 1889 | "Z" set.entry.mark 1890 | format.mark "" output.after 1891 | new.block 1892 | } 1893 | 'skip$ 1894 | if$ 1895 | format.translators output 1896 | new.sentence 1897 | format.edition output 1898 | new.block 1899 | output.eprint 1900 | year.after.author not 1901 | { format.year "year" output.check } 1902 | 'skip$ 1903 | if$ 1904 | format.pages bbl.pages.colon output.after 1905 | format.urldate "" output.after 1906 | output.url 1907 | new.block 1908 | format.note output 1909 | fin.entry 1910 | } 1911 | 1912 | FUNCTION {misc} 1913 | { journal empty$ not 1914 | 'article 1915 | { booktitle empty$ not 1916 | 'incollection 1917 | { publisher empty$ not 1918 | 'monograph 1919 | { eprint empty$ not show.preprint and 1920 | 'preprint 1921 | { entry.is.electronic 1922 | 'electronic 1923 | { 1924 | "Z" set.entry.mark 1925 | monograph 1926 | } 1927 | if$ 1928 | } 1929 | if$ 1930 | } 1931 | if$ 1932 | } 1933 | if$ 1934 | } 1935 | if$ 1936 | empty.misc.check 1937 | } 1938 | 1939 | FUNCTION {archive} 1940 | { "A" set.entry.mark 1941 | misc 1942 | } 1943 | 1944 | FUNCTION {book} { monograph } 1945 | 1946 | FUNCTION {booklet} { book } 1947 | 1948 | FUNCTION {collection} 1949 | { "G" set.entry.mark 1950 | monograph 1951 | } 1952 | 1953 | FUNCTION {database} 1954 | { "DB" set.entry.mark 1955 | electronic 1956 | } 1957 | 1958 | FUNCTION {dataset} 1959 | { "DS" set.entry.mark 1960 | electronic 1961 | } 1962 | 1963 | FUNCTION {inbook} { book } 1964 | 1965 | FUNCTION {inproceedings} 1966 | { "C" set.entry.mark 1967 | incollection 1968 | } 1969 | 1970 | FUNCTION {conference} { inproceedings } 1971 | 1972 | FUNCTION {map} 1973 | { "CM" set.entry.mark 1974 | misc 1975 | } 1976 | 1977 | FUNCTION {manual} { monograph } 1978 | 1979 | FUNCTION {mastersthesis} 1980 | { "D" set.entry.mark 1981 | monograph 1982 | } 1983 | 1984 | FUNCTION {newspaper} 1985 | { "N" set.entry.mark 1986 | article 1987 | } 1988 | 1989 | FUNCTION {online} 1990 | { "Z" set.entry.mark %% Modified by polossk, 2022-11-01: use "Z" for others 1991 | % { "EB" set.entry.mark 1992 | electronic 1993 | } 1994 | 1995 | FUNCTION {phdthesis} { mastersthesis } 1996 | 1997 | FUNCTION {proceedings} 1998 | { "C" set.entry.mark 1999 | monograph 2000 | } 2001 | 2002 | FUNCTION {software} 2003 | { "Z" set.entry.mark %% Modified by polossk, 2022-11-01: use "Z" for others 2004 | % { "CP" set.entry.mark 2005 | electronic 2006 | } 2007 | 2008 | FUNCTION {standard} 2009 | { "S" set.entry.mark 2010 | misc 2011 | } 2012 | 2013 | FUNCTION {techreport} 2014 | { "R" set.entry.mark 2015 | misc 2016 | } 2017 | 2018 | FUNCTION {unpublished} { misc } 2019 | 2020 | FUNCTION {default.type} { misc } 2021 | 2022 | MACRO {jan} {"January"} 2023 | 2024 | MACRO {feb} {"February"} 2025 | 2026 | MACRO {mar} {"March"} 2027 | 2028 | MACRO {apr} {"April"} 2029 | 2030 | MACRO {may} {"May"} 2031 | 2032 | MACRO {jun} {"June"} 2033 | 2034 | MACRO {jul} {"July"} 2035 | 2036 | MACRO {aug} {"August"} 2037 | 2038 | MACRO {sep} {"September"} 2039 | 2040 | MACRO {oct} {"October"} 2041 | 2042 | MACRO {nov} {"November"} 2043 | 2044 | MACRO {dec} {"December"} 2045 | 2046 | MACRO {acmcs} {"ACM Computing Surveys"} 2047 | 2048 | MACRO {acta} {"Acta Informatica"} 2049 | 2050 | MACRO {cacm} {"Communications of the ACM"} 2051 | 2052 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 2053 | 2054 | MACRO {ibmsj} {"IBM Systems Journal"} 2055 | 2056 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 2057 | 2058 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 2059 | 2060 | MACRO {ieeetcad} 2061 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 2062 | 2063 | MACRO {ipl} {"Information Processing Letters"} 2064 | 2065 | MACRO {jacm} {"Journal of the ACM"} 2066 | 2067 | MACRO {jcss} {"Journal of Computer and System Sciences"} 2068 | 2069 | MACRO {scp} {"Science of Computer Programming"} 2070 | 2071 | MACRO {sicomp} {"SIAM Journal on Computing"} 2072 | 2073 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 2074 | 2075 | MACRO {tods} {"ACM Transactions on Database Systems"} 2076 | 2077 | MACRO {tog} {"ACM Transactions on Graphics"} 2078 | 2079 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 2080 | 2081 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 2082 | 2083 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 2084 | 2085 | MACRO {tcs} {"Theoretical Computer Science"} 2086 | 2087 | FUNCTION {sortify} 2088 | { purify$ 2089 | "l" change.case$ 2090 | } 2091 | 2092 | FUNCTION {chop.word} 2093 | { 's := 2094 | 'len := 2095 | s #1 len substring$ = 2096 | { s len #1 + global.max$ substring$ } 2097 | 's 2098 | if$ 2099 | } 2100 | 2101 | FUNCTION {format.lab.name} 2102 | { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 2103 | t "others" = 2104 | { citation.et.al } 2105 | { t get.str.lang 'name.lang := 2106 | name.lang lang.zh = name.lang lang.ja = or 2107 | { t #1 "{ll}{ff}" format.name$ } 2108 | { t #1 "{vv~}{ll}" format.name$ } 2109 | if$ 2110 | } 2111 | if$ 2112 | } 2113 | 2114 | FUNCTION {format.lab.names} 2115 | { 's := 2116 | s #1 format.lab.name 'short.label := 2117 | #1 'nameptr := 2118 | s num.names$ 'numnames := 2119 | "" 2120 | numnames 'namesleft := 2121 | { namesleft #0 > } 2122 | { s nameptr format.lab.name citation.et.al = 2123 | numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or 2124 | { bbl.space * 2125 | citation.et.al * 2126 | #1 'namesleft := 2127 | } 2128 | { nameptr #1 > 2129 | { namesleft #1 = citation.and "" = not and 2130 | { citation.and * } 2131 | { ", " * } 2132 | if$ 2133 | } 2134 | 'skip$ 2135 | if$ 2136 | s nameptr format.lab.name * 2137 | } 2138 | if$ 2139 | nameptr #1 + 'nameptr := 2140 | namesleft #1 - 'namesleft := 2141 | } 2142 | while$ 2143 | } 2144 | 2145 | FUNCTION {author.key.label} 2146 | { author empty$ 2147 | { key empty$ 2148 | { cite$ #1 #3 substring$ } 2149 | 'key 2150 | if$ 2151 | } 2152 | { author format.lab.names } 2153 | if$ 2154 | } 2155 | 2156 | FUNCTION {author.editor.key.label} 2157 | { author empty$ 2158 | { editor empty$ 2159 | { key empty$ 2160 | { cite$ #1 #3 substring$ } 2161 | 'key 2162 | if$ 2163 | } 2164 | { editor format.lab.names } 2165 | if$ 2166 | } 2167 | { author format.lab.names } 2168 | if$ 2169 | } 2170 | 2171 | FUNCTION {author.key.organization.label} 2172 | { author empty$ 2173 | { key empty$ 2174 | { organization empty$ 2175 | { cite$ #1 #3 substring$ } 2176 | { "The " #4 organization chop.word #3 text.prefix$ } 2177 | if$ 2178 | } 2179 | 'key 2180 | if$ 2181 | } 2182 | { author format.lab.names } 2183 | if$ 2184 | } 2185 | 2186 | FUNCTION {editor.key.organization.label} 2187 | { editor empty$ 2188 | { key empty$ 2189 | { organization empty$ 2190 | { cite$ #1 #3 substring$ } 2191 | { "The " #4 organization chop.word #3 text.prefix$ } 2192 | if$ 2193 | } 2194 | 'key 2195 | if$ 2196 | } 2197 | { editor format.lab.names } 2198 | if$ 2199 | } 2200 | 2201 | FUNCTION {calc.short.authors} 2202 | { "" 'short.label := 2203 | type$ "book" = 2204 | type$ "inbook" = 2205 | or 2206 | 'author.editor.key.label 2207 | { type$ "collection" = 2208 | type$ "proceedings" = 2209 | or 2210 | { editor empty$ not 2211 | 'editor.key.organization.label 2212 | 'author.key.organization.label 2213 | if$ 2214 | } 2215 | 'author.key.label 2216 | if$ 2217 | } 2218 | if$ 2219 | 'short.list := 2220 | short.label empty$ 2221 | { short.list 'short.label := } 2222 | 'skip$ 2223 | if$ 2224 | } 2225 | 2226 | FUNCTION {calc.label} 2227 | { calc.short.authors 2228 | short.list "]" contains 2229 | { "{" short.list * "}" * } 2230 | { short.list } 2231 | if$ 2232 | "(" 2233 | * 2234 | format.year duplicate$ empty$ 2235 | short.list key field.or.null = or 2236 | { pop$ "" } 2237 | 'skip$ 2238 | if$ 2239 | duplicate$ "]" contains 2240 | { "{" swap$ * "}" * } 2241 | 'skip$ 2242 | if$ 2243 | * 2244 | 'label := 2245 | short.label 2246 | "(" 2247 | * 2248 | format.year duplicate$ empty$ 2249 | short.list key field.or.null = or 2250 | { pop$ "" } 2251 | 'skip$ 2252 | if$ 2253 | * 2254 | 'short.label := 2255 | } 2256 | 2257 | INTEGERS { seq.num } 2258 | 2259 | FUNCTION {init.seq} 2260 | { #0 'seq.num :=} 2261 | 2262 | FUNCTION {int.to.fix} 2263 | { "000000000" swap$ int.to.str$ * 2264 | #-1 #10 substring$ 2265 | } 2266 | 2267 | FUNCTION {presort} 2268 | { set.entry.lang 2269 | set.entry.numbered 2270 | show.url show.doi check.electronic 2271 | #0 'is.pure.electronic := 2272 | calc.label 2273 | label sortify 2274 | " " 2275 | * 2276 | seq.num #1 + 'seq.num := 2277 | seq.num int.to.fix 2278 | 'sort.label := 2279 | sort.label * 2280 | #1 entry.max$ substring$ 2281 | 'sort.key$ := 2282 | } 2283 | 2284 | STRINGS { longest.label last.label next.extra } 2285 | 2286 | INTEGERS { longest.label.width last.extra.num number.label } 2287 | 2288 | FUNCTION {initialize.longest.label} 2289 | { "" 'longest.label := 2290 | #0 int.to.chr$ 'last.label := 2291 | "" 'next.extra := 2292 | #0 'longest.label.width := 2293 | #0 'last.extra.num := 2294 | #0 'number.label := 2295 | } 2296 | 2297 | FUNCTION {forward.pass} 2298 | { last.label short.label = 2299 | { last.extra.num #1 + 'last.extra.num := 2300 | last.extra.num int.to.chr$ 'extra.label := 2301 | } 2302 | { "a" chr.to.int$ 'last.extra.num := 2303 | "" 'extra.label := 2304 | short.label 'last.label := 2305 | } 2306 | if$ 2307 | number.label #1 + 'number.label := 2308 | } 2309 | 2310 | FUNCTION {reverse.pass} 2311 | { next.extra "b" = 2312 | { "a" 'extra.label := } 2313 | 'skip$ 2314 | if$ 2315 | extra.label 'next.extra := 2316 | extra.label 2317 | duplicate$ empty$ 2318 | 'skip$ 2319 | { "{\natexlab{" swap$ * "}}" * } 2320 | if$ 2321 | 'extra.label := 2322 | label extra.label * 'label := 2323 | } 2324 | 2325 | FUNCTION {bib.sort.order} 2326 | { sort.label 'sort.key$ := 2327 | } 2328 | 2329 | FUNCTION {begin.bib} 2330 | { preamble$ empty$ 2331 | 'skip$ 2332 | { preamble$ write$ newline$ } 2333 | if$ 2334 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * 2335 | write$ newline$ 2336 | terms.in.macro 2337 | { "\providecommand{\biband}{和}" 2338 | write$ newline$ 2339 | "\providecommand{\bibetal}{等}" 2340 | write$ newline$ 2341 | } 2342 | 'skip$ 2343 | if$ 2344 | "\providecommand{\natexlab}[1]{#1}" 2345 | write$ newline$ 2346 | "\providecommand{\url}[1]{#1}" 2347 | write$ newline$ 2348 | "\expandafter\ifx\csname urlstyle\endcsname\relax\else" 2349 | write$ newline$ 2350 | " \urlstyle{same}\fi" 2351 | write$ newline$ 2352 | "\expandafter\ifx\csname href\endcsname\relax" 2353 | write$ newline$ 2354 | " \DeclareUrlCommand\doi{\urlstyle{rm}}" 2355 | write$ newline$ 2356 | " \def\eprint#1#2{#2}" 2357 | write$ newline$ 2358 | "\else" 2359 | write$ newline$ 2360 | " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" 2361 | write$ newline$ 2362 | " \let\eprint\href" 2363 | write$ newline$ 2364 | "\fi" 2365 | write$ newline$ 2366 | } 2367 | 2368 | FUNCTION {end.bib} 2369 | { newline$ 2370 | "\end{thebibliography}" write$ newline$ 2371 | } 2372 | 2373 | READ 2374 | 2375 | EXECUTE {init.state.consts} 2376 | 2377 | EXECUTE {load.config} 2378 | 2379 | EXECUTE {init.seq} 2380 | 2381 | ITERATE {presort} 2382 | 2383 | SORT 2384 | 2385 | EXECUTE {initialize.longest.label} 2386 | 2387 | ITERATE {forward.pass} 2388 | 2389 | REVERSE {reverse.pass} 2390 | 2391 | ITERATE {bib.sort.order} 2392 | 2393 | SORT 2394 | 2395 | EXECUTE {begin.bib} 2396 | 2397 | ITERATE {call.type$} 2398 | 2399 | EXECUTE {end.bib} 2400 | -------------------------------------------------------------------------------- /nputhesis.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `gbt7714-numerical.bst', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% gbt7714.dtx (with options: `2015,numerical') 8 | %% ------------------------------------------------------------------- 9 | %% GB/T 7714—2015 BibTeX Style 10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style 11 | %% Version: 2021/06/20 v2.1.2 12 | %% ------------------------------------------------------------------- 13 | %% Copyright (C) 2016—2021 by Zeping Lee 14 | %% ------------------------------------------------------------------- 15 | %% This file may be distributed and/or modified under the 16 | %% conditions of the LaTeX Project Public License, either version 1.3c 17 | %% of this license or (at your option) any later version. 18 | %% The latest version of this license is in 19 | %% https://www.latex-project.org/lppl.txt 20 | %% and version 1.3c or later is part of all distributions of LaTeX 21 | %% version 2008 or later. 22 | %% ------------------------------------------------------------------- 23 | INTEGERS { 24 | citation.et.al.min 25 | citation.et.al.use.first 26 | bibliography.et.al.min 27 | bibliography.et.al.use.first 28 | uppercase.name 29 | terms.in.macro 30 | year.after.author 31 | period.after.author 32 | italic.book.title 33 | sentence.case.title 34 | link.title 35 | title.in.journal 36 | show.mark 37 | space.before.mark 38 | show.medium.type 39 | slash.for.extraction 40 | in.booktitle 41 | short.journal 42 | italic.journal 43 | bold.journal.volume 44 | show.missing.address.publisher 45 | space.before.pages 46 | only.start.page 47 | wave.dash.in.pages 48 | show.urldate 49 | show.url 50 | show.doi 51 | show.preprint 52 | show.note 53 | show.english.translation 54 | end.with.period 55 | } 56 | 57 | FUNCTION {load.config} 58 | { 59 | #2 'citation.et.al.min := 60 | #1 'citation.et.al.use.first := 61 | #4 'bibliography.et.al.min := 62 | #3 'bibliography.et.al.use.first := 63 | #1 'uppercase.name := 64 | #0 'terms.in.macro := 65 | #0 'year.after.author := 66 | #1 'period.after.author := 67 | #0 'italic.book.title := 68 | #1 'sentence.case.title := 69 | #0 'link.title := 70 | #1 'title.in.journal := 71 | #1 'show.mark := 72 | #0 'space.before.mark := 73 | #1 'show.medium.type := 74 | #1 'slash.for.extraction := 75 | #0 'in.booktitle := 76 | #0 'short.journal := 77 | #0 'italic.journal := 78 | #0 'bold.journal.volume := 79 | #0 'show.missing.address.publisher := 80 | #1 'space.before.pages := 81 | #0 'only.start.page := 82 | #0 'wave.dash.in.pages := 83 | #1 'show.urldate := 84 | #1 'show.url := 85 | #1 'show.doi := 86 | #0 'show.preprint := 87 | #0 'show.note := 88 | #0 'show.english.translation := 89 | #1 'end.with.period := 90 | } 91 | 92 | ENTRY 93 | { address 94 | archivePrefix 95 | author 96 | booktitle 97 | date 98 | doi 99 | edition 100 | editor 101 | eprint 102 | eprinttype 103 | howpublished 104 | institution 105 | journal 106 | journaltitle 107 | key 108 | langid 109 | language 110 | location 111 | mark 112 | medium 113 | note 114 | number 115 | organization 116 | pages 117 | publisher 118 | school 119 | series 120 | shortjournal 121 | title 122 | translation 123 | translator 124 | url 125 | urldate 126 | volume 127 | year 128 | } 129 | { entry.lang entry.is.electronic is.pure.electronic entry.numbered } 130 | { label extra.label sort.label short.label short.list entry.mark entry.url } 131 | 132 | INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } 133 | 134 | INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } 135 | 136 | INTEGERS { charptr len } 137 | 138 | FUNCTION {init.state.consts} 139 | { #0 'before.all := 140 | #1 'mid.sentence := 141 | #2 'after.sentence := 142 | #3 'after.block := 143 | #4 'after.slash := 144 | #3 'lang.zh := 145 | #4 'lang.ja := 146 | #1 'lang.en := 147 | #2 'lang.ru := 148 | #0 'lang.other := 149 | } 150 | 151 | FUNCTION {bbl.anonymous} 152 | { entry.lang lang.zh = 153 | { "佚名" } 154 | { "Anon" } 155 | if$ 156 | } 157 | 158 | FUNCTION {bbl.space} 159 | { entry.lang lang.zh = 160 | { "\ " } 161 | { " " } 162 | if$ 163 | } 164 | 165 | FUNCTION {bbl.and} 166 | { "" } 167 | 168 | FUNCTION {bbl.et.al} 169 | { entry.lang lang.zh = 170 | { "等" } 171 | { entry.lang lang.ja = 172 | { "他" } 173 | { entry.lang lang.ru = 174 | { "идр" } 175 | { "et~al." } 176 | if$ 177 | } 178 | if$ 179 | } 180 | if$ 181 | } 182 | 183 | FUNCTION {citation.and} 184 | { terms.in.macro 185 | { "{\biband}" } 186 | 'bbl.and 187 | if$ 188 | } 189 | 190 | FUNCTION {citation.et.al} 191 | { terms.in.macro 192 | { "{\bibetal}" } 193 | 'bbl.et.al 194 | if$ 195 | } 196 | 197 | FUNCTION {bbl.colon} { ": " } 198 | 199 | FUNCTION {bbl.pages.colon} 200 | { space.before.pages 201 | { ": " } 202 | { ":\allowbreak " } 203 | if$ 204 | } 205 | 206 | FUNCTION {bbl.wide.space} { "\quad " } 207 | 208 | FUNCTION {bbl.slash} { "//\allowbreak " } 209 | 210 | FUNCTION {bbl.sine.loco} 211 | { entry.lang lang.zh = 212 | { "[出版地不详]" } 213 | { "[S.l.]" } 214 | if$ 215 | } 216 | 217 | FUNCTION {bbl.sine.nomine} 218 | { entry.lang lang.zh = 219 | { "[出版者不详]" } 220 | { "[s.n.]" } 221 | if$ 222 | } 223 | 224 | FUNCTION {bbl.sine.loco.sine.nomine} 225 | { entry.lang lang.zh = 226 | { "[出版地不详: 出版者不详]" } 227 | { "[S.l.: s.n.]" } 228 | if$ 229 | } 230 | 231 | FUNCTION {not} 232 | { { #0 } 233 | { #1 } 234 | if$ 235 | } 236 | 237 | FUNCTION {and} 238 | { 'skip$ 239 | { pop$ #0 } 240 | if$ 241 | } 242 | 243 | FUNCTION {or} 244 | { { pop$ #1 } 245 | 'skip$ 246 | if$ 247 | } 248 | 249 | STRINGS { x y } 250 | 251 | FUNCTION {contains} 252 | { 'y := 253 | 'x := 254 | y text.length$ 'len := 255 | x text.length$ len - #1 + 'charptr := 256 | { charptr #0 > 257 | x charptr len substring$ y = not 258 | and 259 | } 260 | { charptr #1 - 'charptr := } 261 | while$ 262 | charptr #0 > 263 | } 264 | 265 | STRINGS { s t } 266 | 267 | FUNCTION {output.nonnull} 268 | { 's := 269 | output.state mid.sentence = 270 | { ", " * write$ } 271 | { output.state after.block = 272 | { add.period$ write$ 273 | newline$ 274 | "\newblock " write$ 275 | } 276 | { output.state before.all = 277 | 'write$ 278 | { output.state after.slash = 279 | { bbl.slash * write$ 280 | newline$ 281 | } 282 | { add.period$ " " * write$ } 283 | if$ 284 | } 285 | if$ 286 | } 287 | if$ 288 | mid.sentence 'output.state := 289 | } 290 | if$ 291 | s 292 | } 293 | 294 | FUNCTION {output} 295 | { duplicate$ empty$ 296 | 'pop$ 297 | 'output.nonnull 298 | if$ 299 | } 300 | 301 | FUNCTION {output.after} 302 | { 't := 303 | duplicate$ empty$ 304 | 'pop$ 305 | { 's := 306 | output.state mid.sentence = 307 | { t * write$ } 308 | { output.state after.block = 309 | { add.period$ write$ 310 | newline$ 311 | "\newblock " write$ 312 | } 313 | { output.state before.all = 314 | 'write$ 315 | { output.state after.slash = 316 | { bbl.slash * write$ } 317 | { add.period$ " " * write$ } 318 | if$ 319 | } 320 | if$ 321 | } 322 | if$ 323 | mid.sentence 'output.state := 324 | } 325 | if$ 326 | s 327 | } 328 | if$ 329 | } 330 | 331 | FUNCTION {output.check} 332 | { 't := 333 | duplicate$ empty$ 334 | { pop$ "empty " t * " in " * cite$ * warning$ } 335 | 'output.nonnull 336 | if$ 337 | } 338 | 339 | FUNCTION {fin.entry} 340 | { end.with.period 341 | 'add.period$ 342 | 'skip$ 343 | if$ 344 | write$ 345 | show.english.translation entry.lang lang.zh = and 346 | { ")" 347 | write$ 348 | } 349 | 'skip$ 350 | if$ 351 | newline$ 352 | } 353 | 354 | FUNCTION {new.block} 355 | { output.state before.all = 356 | 'skip$ 357 | { output.state after.slash = 358 | 'skip$ 359 | { after.block 'output.state := } 360 | if$ 361 | } 362 | if$ 363 | } 364 | 365 | FUNCTION {new.sentence} 366 | { output.state after.block = 367 | 'skip$ 368 | { output.state before.all = 369 | 'skip$ 370 | { output.state after.slash = 371 | 'skip$ 372 | { after.sentence 'output.state := } 373 | if$ 374 | } 375 | if$ 376 | } 377 | if$ 378 | } 379 | 380 | FUNCTION {new.slash} 381 | { output.state before.all = 382 | 'skip$ 383 | { slash.for.extraction 384 | { after.slash 'output.state := } 385 | { after.block 'output.state := } 386 | if$ 387 | } 388 | if$ 389 | } 390 | 391 | FUNCTION {new.block.checka} 392 | { empty$ 393 | 'skip$ 394 | 'new.block 395 | if$ 396 | } 397 | 398 | FUNCTION {new.block.checkb} 399 | { empty$ 400 | swap$ empty$ 401 | and 402 | 'skip$ 403 | 'new.block 404 | if$ 405 | } 406 | 407 | FUNCTION {new.sentence.checka} 408 | { empty$ 409 | 'skip$ 410 | 'new.sentence 411 | if$ 412 | } 413 | 414 | FUNCTION {new.sentence.checkb} 415 | { empty$ 416 | swap$ empty$ 417 | and 418 | 'skip$ 419 | 'new.sentence 420 | if$ 421 | } 422 | 423 | FUNCTION {field.or.null} 424 | { duplicate$ empty$ 425 | { pop$ "" } 426 | 'skip$ 427 | if$ 428 | } 429 | 430 | FUNCTION {emphasize} 431 | { duplicate$ empty$ 432 | { pop$ "" } 433 | { "\emph{" swap$ * "}" * } 434 | if$ 435 | } 436 | 437 | FUNCTION {format.btitle} 438 | { italic.book.title 439 | entry.lang lang.en = and 440 | 'emphasize 441 | 'skip$ 442 | if$ 443 | } 444 | 445 | INTEGERS { byte second.byte } 446 | 447 | INTEGERS { char.lang tmp.lang } 448 | 449 | STRINGS { tmp.str } 450 | 451 | FUNCTION {get.str.lang} 452 | { 'tmp.str := 453 | lang.other 'tmp.lang := 454 | #1 'charptr := 455 | tmp.str text.length$ #1 + 'len := 456 | { charptr len < } 457 | { tmp.str charptr #1 substring$ chr.to.int$ 'byte := 458 | byte #128 < 459 | { charptr #1 + 'charptr := 460 | byte #64 > byte #91 < and byte #96 > byte #123 < and or 461 | { lang.en 'char.lang := } 462 | { lang.other 'char.lang := } 463 | if$ 464 | } 465 | { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := 466 | byte #224 < 467 | { charptr #2 + 'charptr := 468 | byte #207 > byte #212 < and 469 | byte #212 = second.byte #176 < and or 470 | { lang.ru 'char.lang := } 471 | { lang.other 'char.lang := } 472 | if$ 473 | } 474 | { byte #240 < 475 | { charptr #3 + 'charptr := 476 | byte #227 > byte #234 < and 477 | { lang.zh 'char.lang := } 478 | { byte #227 = 479 | { second.byte #143 > 480 | { lang.zh 'char.lang := } 481 | { second.byte #128 > second.byte #132 < and 482 | { lang.ja 'char.lang := } 483 | { lang.other 'char.lang := } 484 | if$ 485 | } 486 | if$ 487 | } 488 | { byte #239 = 489 | second.byte #163 > second.byte #172 < and and 490 | { lang.zh 'char.lang := } 491 | { lang.other 'char.lang := } 492 | if$ 493 | } 494 | if$ 495 | } 496 | if$ 497 | } 498 | { charptr #4 + 'charptr := 499 | byte #240 = second.byte #159 > and 500 | { lang.zh 'char.lang := } 501 | { lang.other 'char.lang := } 502 | if$ 503 | } 504 | if$ 505 | } 506 | if$ 507 | } 508 | if$ 509 | char.lang tmp.lang > 510 | { char.lang 'tmp.lang := } 511 | 'skip$ 512 | if$ 513 | } 514 | while$ 515 | tmp.lang 516 | } 517 | 518 | FUNCTION {check.entry.lang} 519 | { author field.or.null 520 | title field.or.null * 521 | get.str.lang 522 | } 523 | 524 | STRINGS { entry.langid } 525 | 526 | FUNCTION {set.entry.lang} 527 | { "" 'entry.langid := 528 | language empty$ not 529 | { language 'entry.langid := } 530 | 'skip$ 531 | if$ 532 | langid empty$ not 533 | { langid 'entry.langid := } 534 | 'skip$ 535 | if$ 536 | entry.langid empty$ 537 | { check.entry.lang } 538 | { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or 539 | { lang.en } 540 | { entry.langid "chinese" = 541 | { lang.zh } 542 | { entry.langid "japanese" = 543 | { lang.ja } 544 | { entry.langid "russian" = 545 | { lang.ru } 546 | { check.entry.lang } 547 | if$ 548 | } 549 | if$ 550 | } 551 | if$ 552 | } 553 | if$ 554 | } 555 | if$ 556 | 'entry.lang := 557 | } 558 | 559 | FUNCTION {set.entry.numbered} 560 | { type$ "patent" = 561 | type$ "standard" = or 562 | type$ "techreport" = or 563 | { #1 'entry.numbered := } 564 | { #0 'entry.numbered := } 565 | if$ 566 | } 567 | 568 | INTEGERS { nameptr namesleft numnames name.lang } 569 | 570 | FUNCTION {format.name} 571 | { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 572 | t "others" = 573 | { bbl.et.al } 574 | { t get.str.lang 'name.lang := 575 | name.lang lang.en = 576 | { t #1 "{vv~}{ll}{ f{~}}" format.name$ 577 | % edit by polossk, for NPU usage. 578 | % uppercase.name 579 | % { "u" change.case$ } 580 | % 'skip$ 581 | % if$ 582 | t #1 "{, jj}" format.name$ * 583 | } 584 | { t #1 "{ll}{ff}" format.name$ } 585 | if$ 586 | } 587 | if$ 588 | } 589 | 590 | FUNCTION {format.names} 591 | { 's := 592 | #1 'nameptr := 593 | s num.names$ 'numnames := 594 | "" 595 | numnames 'namesleft := 596 | { namesleft #0 > } 597 | { s nameptr format.name bbl.et.al = 598 | numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or 599 | { ", " * 600 | bbl.et.al * 601 | #1 'namesleft := 602 | } 603 | { nameptr #1 > 604 | { namesleft #1 = bbl.and "" = not and 605 | { bbl.and * } 606 | { ", " * } 607 | if$ 608 | } 609 | 'skip$ 610 | if$ 611 | s nameptr format.name * 612 | } 613 | if$ 614 | nameptr #1 + 'nameptr := 615 | namesleft #1 - 'namesleft := 616 | } 617 | while$ 618 | } 619 | 620 | FUNCTION {format.key} 621 | { empty$ 622 | { key field.or.null } 623 | { "" } 624 | if$ 625 | } 626 | 627 | FUNCTION {format.authors} 628 | { author empty$ not 629 | { author format.names } 630 | { "empty author in " cite$ * warning$ 631 | "" 632 | } 633 | if$ 634 | } 635 | 636 | FUNCTION {format.editors} 637 | { editor empty$ 638 | { "" } 639 | { editor format.names } 640 | if$ 641 | } 642 | 643 | FUNCTION {format.translators} 644 | { translator empty$ 645 | { "" } 646 | { translator format.names 647 | entry.lang lang.zh = 648 | { translator num.names$ #3 > 649 | { "译" * } 650 | { ", 译" * } 651 | if$ 652 | } 653 | 'skip$ 654 | if$ 655 | } 656 | if$ 657 | } 658 | 659 | FUNCTION {format.full.names} 660 | {'s := 661 | #1 'nameptr := 662 | s num.names$ 'numnames := 663 | numnames 'namesleft := 664 | { namesleft #0 > } 665 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 666 | t get.str.lang 'name.lang := 667 | name.lang lang.en = 668 | { t #1 "{vv~}{ll}" format.name$ 't := } 669 | { t #1 "{ll}{ff}" format.name$ 't := } 670 | if$ 671 | nameptr #1 > 672 | { 673 | namesleft #1 > 674 | { ", " * t * } 675 | { 676 | numnames #2 > 677 | { "," * } 678 | 'skip$ 679 | if$ 680 | t "others" = 681 | { " et~al." * } 682 | { " and " * t * } 683 | if$ 684 | } 685 | if$ 686 | } 687 | 't 688 | if$ 689 | nameptr #1 + 'nameptr := 690 | namesleft #1 - 'namesleft := 691 | } 692 | while$ 693 | } 694 | 695 | FUNCTION {author.editor.full} 696 | { author empty$ 697 | { editor empty$ 698 | { "" } 699 | { editor format.full.names } 700 | if$ 701 | } 702 | { author format.full.names } 703 | if$ 704 | } 705 | 706 | FUNCTION {author.full} 707 | { author empty$ 708 | { "" } 709 | { author format.full.names } 710 | if$ 711 | } 712 | 713 | FUNCTION {editor.full} 714 | { editor empty$ 715 | { "" } 716 | { editor format.full.names } 717 | if$ 718 | } 719 | 720 | FUNCTION {make.full.names} 721 | { type$ "book" = 722 | type$ "inbook" = 723 | or 724 | 'author.editor.full 725 | { type$ "collection" = 726 | type$ "proceedings" = 727 | or 728 | 'editor.full 729 | 'author.full 730 | if$ 731 | } 732 | if$ 733 | } 734 | 735 | FUNCTION {output.bibitem} 736 | { newline$ 737 | "\bibitem[" write$ 738 | label ")" * 739 | make.full.names duplicate$ short.list = 740 | { pop$ } 741 | { duplicate$ "]" contains 742 | { "{" swap$ * "}" * } 743 | 'skip$ 744 | if$ 745 | * 746 | } 747 | if$ 748 | "]{" * write$ 749 | cite$ write$ 750 | "}" write$ 751 | newline$ 752 | "" 753 | before.all 'output.state := 754 | } 755 | 756 | FUNCTION {change.sentence.case} 757 | { entry.lang lang.en = 758 | { "t" change.case$ } 759 | 'skip$ 760 | if$ 761 | } 762 | 763 | FUNCTION {add.link} 764 | { url empty$ not 765 | { "\href{" url * "}{" * swap$ * "}" * } 766 | { doi empty$ not 767 | { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } 768 | 'skip$ 769 | if$ 770 | } 771 | if$ 772 | } 773 | 774 | FUNCTION {format.title} 775 | { title empty$ 776 | { "" } 777 | { title 778 | sentence.case.title 779 | 'change.sentence.case 780 | 'skip$ 781 | if$ 782 | entry.numbered number empty$ not and 783 | { bbl.colon * number * } 784 | 'skip$ 785 | if$ 786 | link.title 787 | 'add.link 788 | 'skip$ 789 | if$ 790 | } 791 | if$ 792 | } 793 | 794 | FUNCTION {tie.or.space.connect} 795 | { duplicate$ text.length$ #3 < 796 | { "~" } 797 | { " " } 798 | if$ 799 | swap$ * * 800 | } 801 | 802 | FUNCTION {either.or.check} 803 | { empty$ 804 | 'pop$ 805 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 806 | if$ 807 | } 808 | 809 | FUNCTION {is.digit} 810 | { duplicate$ empty$ 811 | { pop$ #0 } 812 | { chr.to.int$ 813 | duplicate$ "0" chr.to.int$ < 814 | { pop$ #0 } 815 | { "9" chr.to.int$ > 816 | { #0 } 817 | { #1 } 818 | if$ 819 | } 820 | if$ 821 | } 822 | if$ 823 | } 824 | 825 | FUNCTION {is.number} 826 | { 's := 827 | s empty$ 828 | { #0 } 829 | { s text.length$ 'charptr := 830 | { charptr #0 > 831 | s charptr #1 substring$ is.digit 832 | and 833 | } 834 | { charptr #1 - 'charptr := } 835 | while$ 836 | charptr not 837 | } 838 | if$ 839 | } 840 | 841 | FUNCTION {format.volume} 842 | { volume empty$ not 843 | { volume is.number 844 | { entry.lang lang.zh = 845 | { "第 " volume * " 卷" * } 846 | { "volume" volume tie.or.space.connect } 847 | if$ 848 | } 849 | { volume } 850 | if$ 851 | } 852 | { "" } 853 | if$ 854 | } 855 | 856 | FUNCTION {format.number} 857 | { number empty$ not 858 | { number is.number 859 | { entry.lang lang.zh = 860 | { "第 " number * " 册" * } 861 | { "number" number tie.or.space.connect } 862 | if$ 863 | } 864 | { number } 865 | if$ 866 | } 867 | { "" } 868 | if$ 869 | } 870 | 871 | FUNCTION {format.volume.number} 872 | { volume empty$ not 873 | { format.volume } 874 | { format.number } 875 | if$ 876 | } 877 | 878 | FUNCTION {format.title.vol.num} 879 | { title 880 | sentence.case.title 881 | 'change.sentence.case 882 | 'skip$ 883 | if$ 884 | entry.numbered 885 | { number empty$ not 886 | { bbl.colon * number * } 887 | 'skip$ 888 | if$ 889 | } 890 | { format.volume.number 's := 891 | s empty$ not 892 | { bbl.colon * s * } 893 | 'skip$ 894 | if$ 895 | } 896 | if$ 897 | } 898 | 899 | FUNCTION {format.series.vol.num.title} 900 | { format.volume.number 's := 901 | series empty$ not 902 | { series 903 | sentence.case.title 904 | 'change.sentence.case 905 | 'skip$ 906 | if$ 907 | entry.numbered 908 | { bbl.wide.space * } 909 | { bbl.colon * 910 | s empty$ not 911 | { s * bbl.wide.space * } 912 | 'skip$ 913 | if$ 914 | } 915 | if$ 916 | title * 917 | sentence.case.title 918 | 'change.sentence.case 919 | 'skip$ 920 | if$ 921 | entry.numbered number empty$ not and 922 | { bbl.colon * number * } 923 | 'skip$ 924 | if$ 925 | } 926 | { format.title.vol.num } 927 | if$ 928 | format.btitle 929 | link.title 930 | 'add.link 931 | 'skip$ 932 | if$ 933 | } 934 | 935 | FUNCTION {format.booktitle.vol.num} 936 | { booktitle 937 | entry.numbered 938 | 'skip$ 939 | { format.volume.number 's := 940 | s empty$ not 941 | { bbl.colon * s * } 942 | 'skip$ 943 | if$ 944 | } 945 | if$ 946 | } 947 | 948 | FUNCTION {format.series.vol.num.booktitle} 949 | { format.volume.number 's := 950 | series empty$ not 951 | { series bbl.colon * 952 | entry.numbered not s empty$ not and 953 | { s * bbl.wide.space * } 954 | 'skip$ 955 | if$ 956 | booktitle * 957 | } 958 | { format.booktitle.vol.num } 959 | if$ 960 | format.btitle 961 | in.booktitle 962 | { duplicate$ empty$ not entry.lang lang.en = and 963 | { "In: " swap$ * } 964 | 'skip$ 965 | if$ 966 | } 967 | 'skip$ 968 | if$ 969 | } 970 | 971 | FUNCTION {remove.period} 972 | { 't := 973 | "" 's := 974 | { t empty$ not } 975 | { t #1 #1 substring$ 'tmp.str := 976 | tmp.str "." = not 977 | { s tmp.str * 's := } 978 | 'skip$ 979 | if$ 980 | t #2 global.max$ substring$ 't := 981 | } 982 | while$ 983 | s 984 | } 985 | 986 | FUNCTION {abbreviate} 987 | { remove.period 988 | 't := 989 | t "l" change.case$ 's := 990 | "" 991 | s "physical review letters" = 992 | { "Phys Rev Lett" } 993 | 'skip$ 994 | if$ 995 | 's := 996 | s empty$ 997 | { t } 998 | { pop$ s } 999 | if$ 1000 | } 1001 | 1002 | FUNCTION {format.journal} 1003 | { "" 1004 | short.journal 1005 | { shortjournal empty$ not 1006 | { shortjournal * } 1007 | { journal empty$ not 1008 | { journal * abbreviate } 1009 | { journaltitle empty$ not 1010 | { journaltitle * abbreviate } 1011 | 'skip$ 1012 | if$ 1013 | } 1014 | if$ 1015 | } 1016 | if$ 1017 | } 1018 | { journal empty$ not 1019 | { journal * } 1020 | { journaltitle empty$ not 1021 | { journaltitle * } 1022 | 'skip$ 1023 | if$ 1024 | } 1025 | if$ 1026 | } 1027 | if$ 1028 | duplicate$ empty$ not 1029 | { italic.journal entry.lang lang.en = and 1030 | 'emphasize 1031 | 'skip$ 1032 | if$ 1033 | } 1034 | 'skip$ 1035 | if$ 1036 | } 1037 | 1038 | FUNCTION {set.entry.mark} 1039 | { entry.mark empty$ not 1040 | 'pop$ 1041 | { mark empty$ not 1042 | { pop$ mark 'entry.mark := } 1043 | { 'entry.mark := } 1044 | if$ 1045 | } 1046 | if$ 1047 | } 1048 | 1049 | FUNCTION {format.mark} 1050 | { show.mark 1051 | { entry.mark 1052 | show.medium.type 1053 | { medium empty$ not 1054 | { "/" * medium * } 1055 | { entry.is.electronic 1056 | { "/OL" * } 1057 | 'skip$ 1058 | if$ 1059 | } 1060 | if$ 1061 | } 1062 | 'skip$ 1063 | if$ 1064 | 'entry.mark := 1065 | space.before.mark 1066 | { " " } 1067 | { "\allowbreak" } 1068 | if$ 1069 | "[" * entry.mark * "]" * 1070 | } 1071 | { "" } 1072 | if$ 1073 | } 1074 | 1075 | FUNCTION {num.to.ordinal} 1076 | { duplicate$ text.length$ 'charptr := 1077 | duplicate$ charptr #1 substring$ 's := 1078 | s "1" = 1079 | { "st" * } 1080 | { s "2" = 1081 | { "nd" * } 1082 | { s "3" = 1083 | { "rd" * } 1084 | { "th" * } 1085 | if$ 1086 | } 1087 | if$ 1088 | } 1089 | if$ 1090 | } 1091 | 1092 | FUNCTION {format.edition} 1093 | { edition empty$ 1094 | { "" } 1095 | { edition is.number 1096 | { entry.lang lang.zh = 1097 | { edition " 版" * } 1098 | { edition num.to.ordinal " ed." * } 1099 | if$ 1100 | } 1101 | { entry.lang lang.en = 1102 | { edition change.sentence.case 's := 1103 | s "Revised" = s "Revised edition" = or 1104 | { "Rev. ed." } 1105 | { s " ed." *} 1106 | if$ 1107 | } 1108 | { edition } 1109 | if$ 1110 | } 1111 | if$ 1112 | } 1113 | if$ 1114 | } 1115 | 1116 | FUNCTION {format.publisher} 1117 | { publisher empty$ not 1118 | { publisher } 1119 | { school empty$ not 1120 | { school } 1121 | { organization empty$ not 1122 | { organization } 1123 | { institution empty$ not 1124 | { institution } 1125 | { "" } 1126 | if$ 1127 | } 1128 | if$ 1129 | } 1130 | if$ 1131 | } 1132 | if$ 1133 | } 1134 | 1135 | FUNCTION {format.address.publisher} 1136 | { address empty$ not 1137 | { address } 1138 | { location empty$ not 1139 | { location } 1140 | { "" } 1141 | if$ 1142 | } 1143 | if$ 1144 | duplicate$ empty$ not 1145 | { format.publisher empty$ not 1146 | { bbl.colon * format.publisher * } 1147 | { entry.is.electronic not show.missing.address.publisher and 1148 | { bbl.colon * bbl.sine.nomine * } 1149 | 'skip$ 1150 | if$ 1151 | } 1152 | if$ 1153 | } 1154 | { pop$ 1155 | entry.is.electronic not show.missing.address.publisher and 1156 | { format.publisher empty$ not 1157 | { bbl.sine.loco bbl.colon * format.publisher * } 1158 | { bbl.sine.loco.sine.nomine } 1159 | if$ 1160 | } 1161 | { format.publisher empty$ not 1162 | { format.publisher } 1163 | { "" } 1164 | if$ 1165 | } 1166 | if$ 1167 | } 1168 | if$ 1169 | } 1170 | 1171 | FUNCTION {extract.before.dash} 1172 | { duplicate$ empty$ 1173 | { pop$ "" } 1174 | { 's := 1175 | #1 'charptr := 1176 | s text.length$ #1 + 'len := 1177 | { charptr len < 1178 | s charptr #1 substring$ "-" = not 1179 | and 1180 | } 1181 | { charptr #1 + 'charptr := } 1182 | while$ 1183 | s #1 charptr #1 - substring$ 1184 | } 1185 | if$ 1186 | } 1187 | 1188 | FUNCTION {extract.after.dash} 1189 | { duplicate$ empty$ 1190 | { pop$ "" } 1191 | { 's := 1192 | #1 'charptr := 1193 | s text.length$ #1 + 'len := 1194 | { charptr len < 1195 | s charptr #1 substring$ "-" = not 1196 | and 1197 | } 1198 | { charptr #1 + 'charptr := } 1199 | while$ 1200 | { charptr len < 1201 | s charptr #1 substring$ "-" = 1202 | and 1203 | } 1204 | { charptr #1 + 'charptr := } 1205 | while$ 1206 | s charptr global.max$ substring$ 1207 | } 1208 | if$ 1209 | } 1210 | 1211 | FUNCTION {extract.before.slash} 1212 | { duplicate$ empty$ 1213 | { pop$ "" } 1214 | { 's := 1215 | #1 'charptr := 1216 | s text.length$ #1 + 'len := 1217 | { charptr len < 1218 | s charptr #1 substring$ "/" = not 1219 | and 1220 | } 1221 | { charptr #1 + 'charptr := } 1222 | while$ 1223 | s #1 charptr #1 - substring$ 1224 | } 1225 | if$ 1226 | } 1227 | 1228 | FUNCTION {extract.after.slash} 1229 | { duplicate$ empty$ 1230 | { pop$ "" } 1231 | { 's := 1232 | #1 'charptr := 1233 | s text.length$ #1 + 'len := 1234 | { charptr len < 1235 | s charptr #1 substring$ "-" = not 1236 | and 1237 | s charptr #1 substring$ "/" = not 1238 | and 1239 | } 1240 | { charptr #1 + 'charptr := } 1241 | while$ 1242 | { charptr len < 1243 | s charptr #1 substring$ "-" = 1244 | s charptr #1 substring$ "/" = 1245 | or 1246 | and 1247 | } 1248 | { charptr #1 + 'charptr := } 1249 | while$ 1250 | s charptr global.max$ substring$ 1251 | } 1252 | if$ 1253 | } 1254 | 1255 | FUNCTION {format.year} 1256 | { year empty$ not 1257 | { year extract.before.slash extra.label * } 1258 | { date empty$ not 1259 | { date extract.before.dash extra.label * } 1260 | { "empty year in " cite$ * warning$ 1261 | urldate empty$ not 1262 | { "[" urldate extract.before.dash * extra.label * "]" * } 1263 | { "" } 1264 | if$ 1265 | } 1266 | if$ 1267 | } 1268 | if$ 1269 | } 1270 | 1271 | FUNCTION {format.periodical.year} 1272 | { year empty$ not 1273 | { year extract.before.slash 1274 | "--" * 1275 | year extract.after.slash 1276 | duplicate$ empty$ 1277 | 'pop$ 1278 | { * } 1279 | if$ 1280 | } 1281 | { date empty$ not 1282 | { date extract.before.dash } 1283 | { "empty year in " cite$ * warning$ 1284 | urldate empty$ not 1285 | { "[" urldate extract.before.dash * "]" * } 1286 | { "" } 1287 | if$ 1288 | } 1289 | if$ 1290 | } 1291 | if$ 1292 | } 1293 | 1294 | FUNCTION {format.date} 1295 | { date empty$ not 1296 | { type$ "patent" = type$ "newspaper" = or 1297 | { date } 1298 | { format.year } 1299 | if$ 1300 | } 1301 | { year empty$ not 1302 | { format.year } 1303 | { "" } 1304 | if$ 1305 | } 1306 | if$ 1307 | } 1308 | 1309 | FUNCTION {format.editdate} 1310 | { date empty$ not 1311 | { "\allowbreak(" date * ")" * } 1312 | { "" } 1313 | if$ 1314 | } 1315 | 1316 | FUNCTION {format.urldate} 1317 | { urldate empty$ not 1318 | show.urldate show.url and is.pure.electronic or and 1319 | url empty$ not and 1320 | { "\allowbreak[" urldate * "]" * } 1321 | { "" } 1322 | if$ 1323 | } 1324 | 1325 | FUNCTION {hyphenate} 1326 | { 't := 1327 | "" 1328 | { t empty$ not } 1329 | { t #1 #1 substring$ "-" = 1330 | { wave.dash.in.pages 1331 | { "~" * } 1332 | { "-" * } 1333 | if$ 1334 | { t #1 #1 substring$ "-" = } 1335 | { t #2 global.max$ substring$ 't := } 1336 | while$ 1337 | } 1338 | { t #1 #1 substring$ * 1339 | t #2 global.max$ substring$ 't := 1340 | } 1341 | if$ 1342 | } 1343 | while$ 1344 | } 1345 | 1346 | FUNCTION {format.pages} 1347 | { pages empty$ 1348 | { "" } 1349 | { pages hyphenate } 1350 | if$ 1351 | } 1352 | 1353 | FUNCTION {format.extracted.pages} 1354 | { pages empty$ 1355 | { "" } 1356 | { pages 1357 | only.start.page 1358 | 'extract.before.dash 1359 | 'hyphenate 1360 | if$ 1361 | } 1362 | if$ 1363 | } 1364 | 1365 | FUNCTION {format.journal.volume} 1366 | { volume empty$ not 1367 | { bold.journal.volume 1368 | { "\textbf{" volume * "}" * } 1369 | { volume } 1370 | if$ 1371 | } 1372 | { "" } 1373 | if$ 1374 | } 1375 | 1376 | FUNCTION {format.journal.number} 1377 | { number empty$ not 1378 | { "\allowbreak (" number * ")" * } 1379 | { "" } 1380 | if$ 1381 | } 1382 | 1383 | FUNCTION {format.journal.pages} 1384 | { pages empty$ 1385 | { "" } 1386 | { format.extracted.pages } 1387 | if$ 1388 | } 1389 | 1390 | FUNCTION {format.periodical.year.volume.number} 1391 | { year empty$ not 1392 | { year extract.before.slash } 1393 | { "empty year in periodical " cite$ * warning$ } 1394 | if$ 1395 | volume empty$ not 1396 | { ", " * volume extract.before.dash * } 1397 | 'skip$ 1398 | if$ 1399 | number empty$ not 1400 | { "\allowbreak (" * number extract.before.dash * ")" * } 1401 | 'skip$ 1402 | if$ 1403 | "--" * 1404 | year extract.after.slash empty$ 1405 | volume extract.after.dash empty$ and 1406 | number extract.after.dash empty$ and not 1407 | { year extract.after.slash empty$ not 1408 | { year extract.after.slash * } 1409 | { year extract.before.slash * } 1410 | if$ 1411 | volume empty$ not 1412 | { ", " * volume extract.after.dash * } 1413 | 'skip$ 1414 | if$ 1415 | number empty$ not 1416 | { "\allowbreak (" * number extract.after.dash * ")" * } 1417 | 'skip$ 1418 | if$ 1419 | } 1420 | 'skip$ 1421 | if$ 1422 | } 1423 | 1424 | FUNCTION {check.url} 1425 | { url empty$ not 1426 | { "\url{" url * "}" * 'entry.url := 1427 | #1 'entry.is.electronic := 1428 | } 1429 | { howpublished empty$ not 1430 | { howpublished #1 #5 substring$ "\url{" = 1431 | { howpublished 'entry.url := 1432 | #1 'entry.is.electronic := 1433 | } 1434 | 'skip$ 1435 | if$ 1436 | } 1437 | { note empty$ not 1438 | { note #1 #5 substring$ "\url{" = 1439 | { note 'entry.url := 1440 | #1 'entry.is.electronic := 1441 | } 1442 | 'skip$ 1443 | if$ 1444 | } 1445 | 'skip$ 1446 | if$ 1447 | } 1448 | if$ 1449 | } 1450 | if$ 1451 | } 1452 | 1453 | FUNCTION {format.url} 1454 | { entry.url 1455 | } 1456 | 1457 | FUNCTION {output.url} 1458 | { entry.url empty$ not 1459 | { new.block 1460 | entry.url output 1461 | } 1462 | 'skip$ 1463 | if$ 1464 | } 1465 | 1466 | FUNCTION {check.doi} 1467 | { doi empty$ not 1468 | { #1 'entry.is.electronic := } 1469 | 'skip$ 1470 | if$ 1471 | } 1472 | 1473 | FUNCTION {is.in.url} 1474 | { 's := 1475 | s empty$ 1476 | { #1 } 1477 | { entry.url empty$ 1478 | { #0 } 1479 | { s text.length$ 'len := 1480 | entry.url text.length$ 'charptr := 1481 | { entry.url charptr len substring$ s = not 1482 | charptr #0 > 1483 | and 1484 | } 1485 | { charptr #1 - 'charptr := } 1486 | while$ 1487 | charptr 1488 | } 1489 | if$ 1490 | } 1491 | if$ 1492 | } 1493 | 1494 | FUNCTION {format.doi} 1495 | { "" 1496 | doi empty$ not 1497 | { "" 's := 1498 | doi 't := 1499 | #0 'numnames := 1500 | { t empty$ not} 1501 | { t #1 #1 substring$ 'tmp.str := 1502 | tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or 1503 | { t #2 #1 substring$ empty$ 1504 | { s tmp.str * 's := } 1505 | 'skip$ 1506 | if$ 1507 | s empty$ s is.in.url or 1508 | 'skip$ 1509 | { numnames #1 + 'numnames := 1510 | numnames #1 > 1511 | { ", " * } 1512 | { "DOI: " * } 1513 | if$ 1514 | "\doi{" s * "}" * * 1515 | } 1516 | if$ 1517 | "" 's := 1518 | } 1519 | { s tmp.str * 's := } 1520 | if$ 1521 | t #2 global.max$ substring$ 't := 1522 | } 1523 | while$ 1524 | } 1525 | 'skip$ 1526 | if$ 1527 | } 1528 | 1529 | FUNCTION {output.doi} 1530 | { doi empty$ not show.doi and 1531 | show.english.translation entry.lang lang.zh = and not and 1532 | { new.block 1533 | format.doi output 1534 | } 1535 | 'skip$ 1536 | if$ 1537 | } 1538 | 1539 | FUNCTION {check.electronic} 1540 | { "" 'entry.url := 1541 | #0 'entry.is.electronic := 1542 | 'check.doi 1543 | 'skip$ 1544 | if$ 1545 | 'check.url 1546 | 'skip$ 1547 | if$ 1548 | medium empty$ not 1549 | { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or 1550 | { #1 'entry.is.electronic := } 1551 | 'skip$ 1552 | if$ 1553 | } 1554 | 'skip$ 1555 | if$ 1556 | } 1557 | 1558 | FUNCTION {format.eprint} 1559 | { eprinttype empty$ not 1560 | { eprinttype } 1561 | { archivePrefix empty$ not 1562 | { archivePrefix } 1563 | { "" } 1564 | if$ 1565 | } 1566 | if$ 1567 | 's := 1568 | s empty$ not 1569 | { s ": \eprint{" * 1570 | url empty$ not 1571 | { url } 1572 | { "https://" s "l" change.case$ * ".org/abs/" * eprint * } 1573 | if$ 1574 | * "}{" * 1575 | eprint * "}" * 1576 | } 1577 | { eprint } 1578 | if$ 1579 | } 1580 | 1581 | FUNCTION {output.eprint} 1582 | { show.preprint eprint empty$ not and 1583 | { new.block 1584 | format.eprint output 1585 | } 1586 | 'skip$ 1587 | if$ 1588 | } 1589 | 1590 | FUNCTION {format.note} 1591 | { note empty$ not show.note and 1592 | { note } 1593 | { "" } 1594 | if$ 1595 | } 1596 | 1597 | FUNCTION {output.translation} 1598 | { show.english.translation entry.lang lang.zh = and 1599 | { translation empty$ not 1600 | { translation } 1601 | { "[English translation missing!]" } 1602 | if$ 1603 | " (in Chinese)" * output 1604 | write$ 1605 | format.doi duplicate$ empty$ not 1606 | { newline$ 1607 | write$ 1608 | } 1609 | 'pop$ 1610 | if$ 1611 | " \\" write$ 1612 | newline$ 1613 | "(" write$ 1614 | "" 1615 | before.all 'output.state := 1616 | } 1617 | 'skip$ 1618 | if$ 1619 | } 1620 | 1621 | FUNCTION {empty.misc.check} 1622 | { author empty$ title empty$ 1623 | year empty$ 1624 | and and 1625 | key empty$ not and 1626 | { "all relevant fields are empty in " cite$ * warning$ } 1627 | 'skip$ 1628 | if$ 1629 | } 1630 | 1631 | FUNCTION {monograph} 1632 | { output.bibitem 1633 | output.translation 1634 | author empty$ not 1635 | { format.authors } 1636 | { editor empty$ not 1637 | { format.editors } 1638 | { "empty author and editor in " cite$ * warning$ 1639 | "" 1640 | } 1641 | if$ 1642 | } 1643 | if$ 1644 | output 1645 | year.after.author 1646 | { period.after.author 1647 | 'new.sentence 1648 | 'skip$ 1649 | if$ 1650 | format.year "year" output.check 1651 | } 1652 | 'skip$ 1653 | if$ 1654 | new.block 1655 | format.series.vol.num.title "title" output.check 1656 | "M" set.entry.mark 1657 | format.mark "" output.after 1658 | new.block 1659 | format.translators output 1660 | new.sentence 1661 | format.edition output 1662 | new.block 1663 | format.address.publisher output 1664 | year.after.author not 1665 | { format.year "year" output.check } 1666 | 'skip$ 1667 | if$ 1668 | format.pages bbl.pages.colon output.after 1669 | format.urldate "" output.after 1670 | output.url 1671 | output.doi 1672 | new.block 1673 | format.note output 1674 | fin.entry 1675 | } 1676 | 1677 | FUNCTION {incollection} 1678 | { output.bibitem 1679 | output.translation 1680 | format.authors output 1681 | author format.key output 1682 | year.after.author 1683 | { period.after.author 1684 | 'new.sentence 1685 | 'skip$ 1686 | if$ 1687 | format.year "year" output.check 1688 | } 1689 | 'skip$ 1690 | if$ 1691 | new.block 1692 | format.title "title" output.check 1693 | "M" set.entry.mark 1694 | format.mark "" output.after 1695 | new.block 1696 | format.translators output 1697 | new.slash 1698 | format.editors output 1699 | new.block 1700 | format.series.vol.num.booktitle "booktitle" output.check 1701 | new.block 1702 | format.edition output 1703 | new.block 1704 | format.address.publisher output 1705 | year.after.author not 1706 | { format.year "year" output.check } 1707 | 'skip$ 1708 | if$ 1709 | format.extracted.pages bbl.pages.colon output.after 1710 | format.urldate "" output.after 1711 | output.url 1712 | output.doi 1713 | new.block 1714 | format.note output 1715 | fin.entry 1716 | } 1717 | 1718 | FUNCTION {periodical} 1719 | { output.bibitem 1720 | output.translation 1721 | format.authors output 1722 | author format.key output 1723 | year.after.author 1724 | { period.after.author 1725 | 'new.sentence 1726 | 'skip$ 1727 | if$ 1728 | format.year "year" output.check 1729 | } 1730 | 'skip$ 1731 | if$ 1732 | new.block 1733 | format.title "title" output.check 1734 | "J" set.entry.mark 1735 | format.mark "" output.after 1736 | new.block 1737 | format.periodical.year.volume.number output 1738 | new.block 1739 | format.address.publisher output 1740 | year.after.author not 1741 | { format.periodical.year "year" output.check } 1742 | 'skip$ 1743 | if$ 1744 | format.urldate "" output.after 1745 | output.url 1746 | output.doi 1747 | new.block 1748 | format.note output 1749 | fin.entry 1750 | } 1751 | 1752 | FUNCTION {article} 1753 | { output.bibitem 1754 | output.translation 1755 | format.authors output 1756 | author format.key output 1757 | year.after.author 1758 | { period.after.author 1759 | 'new.sentence 1760 | 'skip$ 1761 | if$ 1762 | format.year "year" output.check 1763 | } 1764 | 'skip$ 1765 | if$ 1766 | new.block 1767 | title.in.journal 1768 | { format.title "title" output.check 1769 | "J" set.entry.mark 1770 | format.mark "" output.after 1771 | new.block 1772 | } 1773 | 'skip$ 1774 | if$ 1775 | format.journal "journal" output.check 1776 | year.after.author not 1777 | { format.date "year" output.check } 1778 | 'skip$ 1779 | if$ 1780 | format.journal.volume output 1781 | format.journal.number "" output.after 1782 | format.journal.pages bbl.pages.colon output.after 1783 | format.urldate "" output.after 1784 | output.url 1785 | output.doi 1786 | new.block 1787 | format.note output 1788 | fin.entry 1789 | } 1790 | 1791 | FUNCTION {patent} 1792 | { output.bibitem 1793 | output.translation 1794 | format.authors output 1795 | author format.key output 1796 | year.after.author 1797 | { period.after.author 1798 | 'new.sentence 1799 | 'skip$ 1800 | if$ 1801 | format.year "year" output.check 1802 | } 1803 | 'skip$ 1804 | if$ 1805 | new.block 1806 | format.title "title" output.check 1807 | "P" set.entry.mark 1808 | format.mark "" output.after 1809 | new.block 1810 | format.date "year" output.check 1811 | format.urldate "" output.after 1812 | output.url 1813 | output.doi 1814 | new.block 1815 | format.note output 1816 | fin.entry 1817 | } 1818 | 1819 | FUNCTION {electronic} 1820 | { #1 #1 check.electronic 1821 | #1 'entry.is.electronic := 1822 | #1 'is.pure.electronic := 1823 | output.bibitem 1824 | output.translation 1825 | format.authors output 1826 | author format.key output 1827 | year.after.author 1828 | { period.after.author 1829 | 'new.sentence 1830 | 'skip$ 1831 | if$ 1832 | format.year "year" output.check 1833 | } 1834 | 'skip$ 1835 | if$ 1836 | new.block 1837 | format.series.vol.num.title "title" output.check 1838 | "EB" set.entry.mark 1839 | format.mark "" output.after 1840 | new.block 1841 | format.address.publisher output 1842 | year.after.author not 1843 | { date empty$ 1844 | { format.date output } 1845 | 'skip$ 1846 | if$ 1847 | } 1848 | 'skip$ 1849 | if$ 1850 | format.pages bbl.pages.colon output.after 1851 | format.editdate "" output.after 1852 | format.urldate "" output.after 1853 | output.url 1854 | output.doi 1855 | new.block 1856 | format.note output 1857 | fin.entry 1858 | } 1859 | 1860 | FUNCTION {preprint} 1861 | { output.bibitem 1862 | output.translation 1863 | author empty$ not 1864 | { format.authors } 1865 | { editor empty$ not 1866 | { format.editors } 1867 | { "empty author and editor in " cite$ * warning$ 1868 | "" 1869 | } 1870 | if$ 1871 | } 1872 | if$ 1873 | output 1874 | year.after.author 1875 | { period.after.author 1876 | 'new.sentence 1877 | 'skip$ 1878 | if$ 1879 | format.year "year" output.check 1880 | } 1881 | 'skip$ 1882 | if$ 1883 | new.block 1884 | title.in.journal 1885 | { format.series.vol.num.title "title" output.check 1886 | "Z" set.entry.mark 1887 | format.mark "" output.after 1888 | new.block 1889 | } 1890 | 'skip$ 1891 | if$ 1892 | format.translators output 1893 | new.sentence 1894 | format.edition output 1895 | new.block 1896 | output.eprint 1897 | year.after.author not 1898 | { format.year "year" output.check } 1899 | 'skip$ 1900 | if$ 1901 | format.pages bbl.pages.colon output.after 1902 | format.urldate "" output.after 1903 | output.url 1904 | new.block 1905 | format.note output 1906 | fin.entry 1907 | } 1908 | 1909 | FUNCTION {misc} 1910 | { journal empty$ not 1911 | 'article 1912 | { booktitle empty$ not 1913 | 'incollection 1914 | { publisher empty$ not 1915 | 'monograph 1916 | { eprint empty$ not show.preprint and 1917 | 'preprint 1918 | { entry.is.electronic 1919 | 'electronic 1920 | { 1921 | "Z" set.entry.mark 1922 | monograph 1923 | } 1924 | if$ 1925 | } 1926 | if$ 1927 | } 1928 | if$ 1929 | } 1930 | if$ 1931 | } 1932 | if$ 1933 | empty.misc.check 1934 | } 1935 | 1936 | FUNCTION {archive} 1937 | { "A" set.entry.mark 1938 | misc 1939 | } 1940 | 1941 | FUNCTION {book} { monograph } 1942 | 1943 | FUNCTION {booklet} { book } 1944 | 1945 | FUNCTION {collection} 1946 | { "G" set.entry.mark 1947 | monograph 1948 | } 1949 | 1950 | FUNCTION {database} 1951 | { "DB" set.entry.mark 1952 | electronic 1953 | } 1954 | 1955 | FUNCTION {dataset} 1956 | { "DS" set.entry.mark 1957 | electronic 1958 | } 1959 | 1960 | FUNCTION {inbook} { book } 1961 | 1962 | FUNCTION {inproceedings} 1963 | { "C" set.entry.mark 1964 | incollection 1965 | } 1966 | 1967 | FUNCTION {conference} { inproceedings } 1968 | 1969 | FUNCTION {map} 1970 | { "CM" set.entry.mark 1971 | misc 1972 | } 1973 | 1974 | FUNCTION {manual} { monograph } 1975 | 1976 | FUNCTION {mastersthesis} 1977 | { "D" set.entry.mark 1978 | monograph 1979 | } 1980 | 1981 | FUNCTION {newspaper} 1982 | { "N" set.entry.mark 1983 | article 1984 | } 1985 | 1986 | FUNCTION {online} 1987 | { "EB" set.entry.mark 1988 | electronic 1989 | } 1990 | 1991 | FUNCTION {phdthesis} { mastersthesis } 1992 | 1993 | FUNCTION {proceedings} 1994 | { "C" set.entry.mark 1995 | monograph 1996 | } 1997 | 1998 | FUNCTION {software} 1999 | { "CP" set.entry.mark 2000 | electronic 2001 | } 2002 | 2003 | FUNCTION {standard} 2004 | { "S" set.entry.mark 2005 | misc 2006 | } 2007 | 2008 | FUNCTION {techreport} 2009 | { "R" set.entry.mark 2010 | misc 2011 | } 2012 | 2013 | FUNCTION {unpublished} { misc } 2014 | 2015 | FUNCTION {default.type} { misc } 2016 | 2017 | MACRO {jan} {"January"} 2018 | 2019 | MACRO {feb} {"February"} 2020 | 2021 | MACRO {mar} {"March"} 2022 | 2023 | MACRO {apr} {"April"} 2024 | 2025 | MACRO {may} {"May"} 2026 | 2027 | MACRO {jun} {"June"} 2028 | 2029 | MACRO {jul} {"July"} 2030 | 2031 | MACRO {aug} {"August"} 2032 | 2033 | MACRO {sep} {"September"} 2034 | 2035 | MACRO {oct} {"October"} 2036 | 2037 | MACRO {nov} {"November"} 2038 | 2039 | MACRO {dec} {"December"} 2040 | 2041 | MACRO {acmcs} {"ACM Computing Surveys"} 2042 | 2043 | MACRO {acta} {"Acta Informatica"} 2044 | 2045 | MACRO {cacm} {"Communications of the ACM"} 2046 | 2047 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 2048 | 2049 | MACRO {ibmsj} {"IBM Systems Journal"} 2050 | 2051 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 2052 | 2053 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 2054 | 2055 | MACRO {ieeetcad} 2056 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 2057 | 2058 | MACRO {ipl} {"Information Processing Letters"} 2059 | 2060 | MACRO {jacm} {"Journal of the ACM"} 2061 | 2062 | MACRO {jcss} {"Journal of Computer and System Sciences"} 2063 | 2064 | MACRO {scp} {"Science of Computer Programming"} 2065 | 2066 | MACRO {sicomp} {"SIAM Journal on Computing"} 2067 | 2068 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 2069 | 2070 | MACRO {tods} {"ACM Transactions on Database Systems"} 2071 | 2072 | MACRO {tog} {"ACM Transactions on Graphics"} 2073 | 2074 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 2075 | 2076 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 2077 | 2078 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 2079 | 2080 | MACRO {tcs} {"Theoretical Computer Science"} 2081 | 2082 | FUNCTION {sortify} 2083 | { purify$ 2084 | "l" change.case$ 2085 | } 2086 | 2087 | FUNCTION {chop.word} 2088 | { 's := 2089 | 'len := 2090 | s #1 len substring$ = 2091 | { s len #1 + global.max$ substring$ } 2092 | 's 2093 | if$ 2094 | } 2095 | 2096 | FUNCTION {format.lab.name} 2097 | { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 2098 | t "others" = 2099 | { citation.et.al } 2100 | { t get.str.lang 'name.lang := 2101 | name.lang lang.zh = name.lang lang.ja = or 2102 | { t #1 "{ll}{ff}" format.name$ } 2103 | { t #1 "{vv~}{ll}" format.name$ } 2104 | if$ 2105 | } 2106 | if$ 2107 | } 2108 | 2109 | FUNCTION {format.lab.names} 2110 | { 's := 2111 | s #1 format.lab.name 'short.label := 2112 | #1 'nameptr := 2113 | s num.names$ 'numnames := 2114 | "" 2115 | numnames 'namesleft := 2116 | { namesleft #0 > } 2117 | { s nameptr format.lab.name citation.et.al = 2118 | numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or 2119 | { bbl.space * 2120 | citation.et.al * 2121 | #1 'namesleft := 2122 | } 2123 | { nameptr #1 > 2124 | { namesleft #1 = citation.and "" = not and 2125 | { citation.and * } 2126 | { ", " * } 2127 | if$ 2128 | } 2129 | 'skip$ 2130 | if$ 2131 | s nameptr format.lab.name * 2132 | } 2133 | if$ 2134 | nameptr #1 + 'nameptr := 2135 | namesleft #1 - 'namesleft := 2136 | } 2137 | while$ 2138 | } 2139 | 2140 | FUNCTION {author.key.label} 2141 | { author empty$ 2142 | { key empty$ 2143 | { cite$ #1 #3 substring$ } 2144 | 'key 2145 | if$ 2146 | } 2147 | { author format.lab.names } 2148 | if$ 2149 | } 2150 | 2151 | FUNCTION {author.editor.key.label} 2152 | { author empty$ 2153 | { editor empty$ 2154 | { key empty$ 2155 | { cite$ #1 #3 substring$ } 2156 | 'key 2157 | if$ 2158 | } 2159 | { editor format.lab.names } 2160 | if$ 2161 | } 2162 | { author format.lab.names } 2163 | if$ 2164 | } 2165 | 2166 | FUNCTION {author.key.organization.label} 2167 | { author empty$ 2168 | { key empty$ 2169 | { organization empty$ 2170 | { cite$ #1 #3 substring$ } 2171 | { "The " #4 organization chop.word #3 text.prefix$ } 2172 | if$ 2173 | } 2174 | 'key 2175 | if$ 2176 | } 2177 | { author format.lab.names } 2178 | if$ 2179 | } 2180 | 2181 | FUNCTION {editor.key.organization.label} 2182 | { editor empty$ 2183 | { key empty$ 2184 | { organization empty$ 2185 | { cite$ #1 #3 substring$ } 2186 | { "The " #4 organization chop.word #3 text.prefix$ } 2187 | if$ 2188 | } 2189 | 'key 2190 | if$ 2191 | } 2192 | { editor format.lab.names } 2193 | if$ 2194 | } 2195 | 2196 | FUNCTION {calc.short.authors} 2197 | { "" 'short.label := 2198 | type$ "book" = 2199 | type$ "inbook" = 2200 | or 2201 | 'author.editor.key.label 2202 | { type$ "collection" = 2203 | type$ "proceedings" = 2204 | or 2205 | { editor empty$ not 2206 | 'editor.key.organization.label 2207 | 'author.key.organization.label 2208 | if$ 2209 | } 2210 | 'author.key.label 2211 | if$ 2212 | } 2213 | if$ 2214 | 'short.list := 2215 | short.label empty$ 2216 | { short.list 'short.label := } 2217 | 'skip$ 2218 | if$ 2219 | } 2220 | 2221 | FUNCTION {calc.label} 2222 | { calc.short.authors 2223 | short.list "]" contains 2224 | { "{" short.list * "}" * } 2225 | { short.list } 2226 | if$ 2227 | "(" 2228 | * 2229 | format.year duplicate$ empty$ 2230 | short.list key field.or.null = or 2231 | { pop$ "" } 2232 | 'skip$ 2233 | if$ 2234 | duplicate$ "]" contains 2235 | { "{" swap$ * "}" * } 2236 | 'skip$ 2237 | if$ 2238 | * 2239 | 'label := 2240 | short.label 2241 | "(" 2242 | * 2243 | format.year duplicate$ empty$ 2244 | short.list key field.or.null = or 2245 | { pop$ "" } 2246 | 'skip$ 2247 | if$ 2248 | * 2249 | 'short.label := 2250 | } 2251 | 2252 | INTEGERS { seq.num } 2253 | 2254 | FUNCTION {init.seq} 2255 | { #0 'seq.num :=} 2256 | 2257 | FUNCTION {int.to.fix} 2258 | { "000000000" swap$ int.to.str$ * 2259 | #-1 #10 substring$ 2260 | } 2261 | 2262 | FUNCTION {presort} 2263 | { set.entry.lang 2264 | set.entry.numbered 2265 | show.url show.doi check.electronic 2266 | #0 'is.pure.electronic := 2267 | calc.label 2268 | label sortify 2269 | " " 2270 | * 2271 | seq.num #1 + 'seq.num := 2272 | seq.num int.to.fix 2273 | 'sort.label := 2274 | sort.label * 2275 | #1 entry.max$ substring$ 2276 | 'sort.key$ := 2277 | } 2278 | 2279 | STRINGS { longest.label last.label next.extra } 2280 | 2281 | INTEGERS { longest.label.width last.extra.num number.label } 2282 | 2283 | FUNCTION {initialize.longest.label} 2284 | { "" 'longest.label := 2285 | #0 int.to.chr$ 'last.label := 2286 | "" 'next.extra := 2287 | #0 'longest.label.width := 2288 | #0 'last.extra.num := 2289 | #0 'number.label := 2290 | } 2291 | 2292 | FUNCTION {forward.pass} 2293 | { last.label short.label = 2294 | { last.extra.num #1 + 'last.extra.num := 2295 | last.extra.num int.to.chr$ 'extra.label := 2296 | } 2297 | { "a" chr.to.int$ 'last.extra.num := 2298 | "" 'extra.label := 2299 | short.label 'last.label := 2300 | } 2301 | if$ 2302 | number.label #1 + 'number.label := 2303 | } 2304 | 2305 | FUNCTION {reverse.pass} 2306 | { next.extra "b" = 2307 | { "a" 'extra.label := } 2308 | 'skip$ 2309 | if$ 2310 | extra.label 'next.extra := 2311 | extra.label 2312 | duplicate$ empty$ 2313 | 'skip$ 2314 | { "{\natexlab{" swap$ * "}}" * } 2315 | if$ 2316 | 'extra.label := 2317 | label extra.label * 'label := 2318 | } 2319 | 2320 | FUNCTION {bib.sort.order} 2321 | { sort.label 'sort.key$ := 2322 | } 2323 | 2324 | FUNCTION {begin.bib} 2325 | { preamble$ empty$ 2326 | 'skip$ 2327 | { preamble$ write$ newline$ } 2328 | if$ 2329 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * 2330 | write$ newline$ 2331 | terms.in.macro 2332 | { "\providecommand{\biband}{和}" 2333 | write$ newline$ 2334 | "\providecommand{\bibetal}{等}" 2335 | write$ newline$ 2336 | } 2337 | 'skip$ 2338 | if$ 2339 | "\providecommand{\natexlab}[1]{#1}" 2340 | write$ newline$ 2341 | "\providecommand{\url}[1]{#1}" 2342 | write$ newline$ 2343 | "\expandafter\ifx\csname urlstyle\endcsname\relax\else" 2344 | write$ newline$ 2345 | " \urlstyle{same}\fi" 2346 | write$ newline$ 2347 | "\expandafter\ifx\csname href\endcsname\relax" 2348 | write$ newline$ 2349 | " \DeclareUrlCommand\doi{\urlstyle{rm}}" 2350 | write$ newline$ 2351 | " \def\eprint#1#2{#2}" 2352 | write$ newline$ 2353 | "\else" 2354 | write$ newline$ 2355 | " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" 2356 | write$ newline$ 2357 | " \let\eprint\href" 2358 | write$ newline$ 2359 | "\fi" 2360 | write$ newline$ 2361 | } 2362 | 2363 | FUNCTION {end.bib} 2364 | { newline$ 2365 | "\end{thebibliography}" write$ newline$ 2366 | } 2367 | 2368 | READ 2369 | 2370 | EXECUTE {init.state.consts} 2371 | 2372 | EXECUTE {load.config} 2373 | 2374 | EXECUTE {init.seq} 2375 | 2376 | ITERATE {presort} 2377 | 2378 | SORT 2379 | 2380 | EXECUTE {initialize.longest.label} 2381 | 2382 | ITERATE {forward.pass} 2383 | 2384 | REVERSE {reverse.pass} 2385 | 2386 | ITERATE {bib.sort.order} 2387 | 2388 | SORT 2389 | 2390 | EXECUTE {begin.bib} 2391 | 2392 | ITERATE {call.type$} 2393 | 2394 | EXECUTE {end.bib} -------------------------------------------------------------------------------- /poster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/poster.png -------------------------------------------------------------------------------- /preview/abstract_chs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/abstract_chs.png -------------------------------------------------------------------------------- /preview/abstract_eng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/abstract_eng.png -------------------------------------------------------------------------------- /preview/accomplishments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/accomplishments.png -------------------------------------------------------------------------------- /preview/acknowledgements.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/acknowledgements.png -------------------------------------------------------------------------------- /preview/appendix.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/appendix.png -------------------------------------------------------------------------------- /preview/blindreview_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/blindreview_off.png -------------------------------------------------------------------------------- /preview/blindreview_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/blindreview_on.png -------------------------------------------------------------------------------- /preview/coverpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/coverpage.png -------------------------------------------------------------------------------- /preview/frontpage_chs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/frontpage_chs.png -------------------------------------------------------------------------------- /preview/frontpage_eng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/frontpage_eng.png -------------------------------------------------------------------------------- /preview/references.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/references.png -------------------------------------------------------------------------------- /preview/statement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/preview/statement.png -------------------------------------------------------------------------------- /reference.bib: -------------------------------------------------------------------------------- 1 | %% LaTeX2e file `reference.bib' 2 | %% generated by the `filecontents' environment 3 | %% from source `yanputhesis-sample' on 2023/03/02. 4 | %% 5 | @software{NWPUThesisLaTeXTemplate, 6 | title = {Yet Another {{\LaTeX}} Template for NPU Thesis}, 7 | author = {Shangkun Shen and Zhihe Wang and Jiduo Zhang and Weijia Zhang}, 8 | month = {11}, 9 | year = {2019}, 10 | publisher = {Zenodo}, 11 | journal = {GitHub repository}, 12 | doi = {10.5281/zenodo.4159248}, 13 | url = {https://doi.org/10.5281/zenodo.4159248} 14 | } 15 | 16 | @book{knuth1986the, 17 | title = {The {{\TeX}}book}, 18 | author = {Knuth, Donald E}, 19 | publisher = {Addison-Wesley}, 20 | year = {1986} 21 | } 22 | 23 | @book{lamport1989latex, 24 | title = {{{\LaTeX}}: a document preparation system}, 25 | author = {Lamport, Leslie}, 26 | publisher = {Addison-Wesley Professional}, 27 | year = {1989} 28 | } 29 | 30 | @article{szegedy2015going, 31 | title = {Going deeper with convolutions}, 32 | author = {Szegedy, Christian and Liu, Wei and Jia, Yangqing and 33 | Sermanet, Pierre and Reed, Scott E and Anguelov, Dragomir and 34 | Erhan, Dumitru and Vanhoucke, Vincent and Rabinovich, Andrew}, 35 | journal = {Computer Vision and Pattern Recognition}, 36 | pages = {1--9}, 37 | year = {2015} 38 | } 39 | 40 | @software{MathSymbolsinLaTeXbypolossk, 41 | title = {Math Symbols in {{\LaTeX}}}, 42 | author = {Shangkun Shen}, 43 | year = {2017}, 44 | month = {10}, 45 | publisher = {Zenodo}, 46 | journal = {GitHub repository}, 47 | doi = {10.5281/zenodo.4120375}, 48 | url = {https://doi.org/10.5281/zenodo.4120375} 49 | } 50 | 51 | @article{chen2014maiyuan, 52 | title = {脉源三支 强强融合——西北工业大学}, 53 | author = {{陈家忠}}, 54 | journal = {电子技术与软件工程}, 55 | number = {9}, 56 | pages = {15--16}, 57 | year = {2014} 58 | } 59 | 60 | @article{shen2021peridynamic, 61 | title = {Peridynamic modeling with energy-based surface correction for 62 | fracture simulation of random porous materials}, 63 | journal = {Theoretical and Applied Fracture Mechanics}, 64 | volume = {114}, 65 | pages = {102987}, 66 | year = {2021}, 67 | issn = {0167-8442}, 68 | author = {Shangkun Shen and Zihao Yang and Fei Han and Junzhi Cui and 69 | Jieqiong Zhang}, 70 | publisher = {Elsevier} 71 | } 72 | 73 | @inproceedings{chen2018autonomous, 74 | title = {Autonomous vehicle testing and validation platform: Integrated 75 | simulation system with hardware in the loop}, 76 | author = {Chen, Yu and Chen, Shitao and Zhang, Tangyike and 77 | Zhang, Songyi and Zheng, Nanning}, 78 | booktitle = {2018 IEEE Intelligent Vehicles Symposium (IV)}, 79 | pages = {949--956}, 80 | year = {2018}, 81 | organization = {IEEE} 82 | } 83 | -------------------------------------------------------------------------------- /release-helper/badges.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NWPUMetaphysicsOffice/Yet-Another-LaTeX-Template-for-NPU-Thesis/ea54c66b668a0cbb81271ba58ed1bfbd0447bb1d/release-helper/badges.png -------------------------------------------------------------------------------- /release-helper/badges.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | badges_urls = [ 4 | r"https://img.shields.io/badge/status-complete-brightgreen.svg?style=flat-square", 5 | r"https://img.shields.io/badge/PhD-Thesis-D11A2D.svg?style=flat-square", 6 | r"https://img.shields.io/badge/Master-Thesis-1177B0.svg?style=flat-square", 7 | r"https://img.shields.io/badge/TeX-Template-3D6117.svg?style=flat-square", 8 | r"https://img.shields.io/badge/license-GNU_General_Public_License_v3.0-blue.svg?style=flat-square", 9 | r"https://img.shields.io/badge/TeXLive-%3E=2021-3D6117.svg?style=flat-square", 10 | r"https://img.shields.io/badge/version-v1.8.5.0307-674EA7.svg?style=flat-square", 11 | r"https://img.shields.io/badge/DOI-10.5281%2Fzenodo.4159248-blue.svg?style=flat-square" 12 | ] 13 | 14 | for i, url in enumerate(badges_urls): 15 | print(f"curl -o badge_{i:02d}.svg {url}") 16 | os.system(f"curl -o badge_{i:02d}.svg {url}") 17 | -------------------------------------------------------------------------------- /release-helper/badges.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | statuscompletePhDThesisMasterThesisTeXTemplatelicenseGNU General Public License v3.0versionv1.8.1.1206DOI10.5281/zenodo.4159248TeXLive>=2021 331 | -------------------------------------------------------------------------------- /release-helper/gallery.md: -------------------------------------------------------------------------------- 1 | | 展示 | 展示 | 2 | | :-------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------: | 3 | | ![](https://files.mdnice.com/user/20269/0e1cf324-53f0-4344-a4a4-711a750f9866.png) | ![](https://files.mdnice.com/user/20269/0e73b982-7cb3-421e-a79b-aa0b480e1b76.png) | 4 | | 封面页(外封面) | 中文标题页(题名页/内封面) | 5 | | ![](https://files.mdnice.com/user/20269/fe994ac0-44ab-42ba-a2a5-2d77c46c0b43.png) | ![](https://files.mdnice.com/user/20269/faba4fcf-bf08-46ff-b48d-da7038385185.png) | 6 | | 英文标题页 | 中文摘要 | 7 | | ![](https://files.mdnice.com/user/20269/e6bb3347-47ff-4f17-b7f7-9392344a6fba.png) | ![](https://files.mdnice.com/user/20269/fc49f6e8-1ded-4457-9848-8d290b7bb890.png) | 8 | | 英文摘要 | 参考文献 | 9 | | ![](https://files.mdnice.com/user/20269/2d9bb0bf-3b81-4473-bc19-6c5c21573bac.png) | ![](https://files.mdnice.com/user/20269/de3561bc-a7c2-4424-9179-5b1f1ad48f13.png) | 10 | | 附录 | 致谢 | 11 | | ![](https://files.mdnice.com/user/20269/2d0b6d34-54df-473b-a421-66e7d1a4b92f.png) | ![](https://files.mdnice.com/user/20269/c2c5f758-6a39-4169-913b-0357b74fd8b9.png) | 12 | | 发表的学术论文和参加科研情况 | 原创性声明 | 13 | -------------------------------------------------------------------------------- /release-helper/rename_preview.sh: -------------------------------------------------------------------------------- 1 | mv "yanputhesis-sample_页面_01.png" "coverpage.png" 2 | mv "yanputhesis-sample_页面_03.png" "frontpage_chs.png" 3 | mv "yanputhesis-sample_页面_05.png" "frontpage_eng.png" 4 | mv "yanputhesis-sample_页面_07.png" "abstract_chs.png" 5 | mv "yanputhesis-sample_页面_09.png" "abstract_eng.png" 6 | mv "yanputhesis-sample_页面_23.png" "references.png" 7 | mv "yanputhesis-sample_页面_25.png" "appendix.png" 8 | mv "yanputhesis-sample_页面_29.png" "acknowledgements.png" 9 | mv "yanputhesis-sample_页面_31.png" "accomplishments.png" 10 | mv "yanputhesis-sample_页面_33.png" "statement.png" 11 | mv "yanputhesis-sample_页面_20.png" "blindreview_off.png" -------------------------------------------------------------------------------- /workspace.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | } 6 | ], 7 | "settings": { 8 | // "editor.insertSpaces": true, 9 | // "editor.smoothScrolling": true, 10 | // "editor.wordWrap": "on", 11 | // "editor.fontLigatures": true, 12 | // "editor.renderWhitespace": "boundary", 13 | // "editor.formatOnPaste": false, 14 | // "editor.formatOnSave": false, 15 | // "editor.minimap.enabled": false, 16 | "editor.suggestSelection": "recentlyUsedByPrefix", 17 | "editor.defaultFormatter": "James-Yu.latex-workshop", 18 | "files.trimTrailingWhitespace": true, 19 | "latex-workshop.synctex.afterBuild.enabled": true, 20 | "latex-workshop.chktex.enabled": true, 21 | "latex-workshop.view.pdf.viewer": "tab", 22 | "latex-workshop.intellisense.package.enabled": true, 23 | "latex-workshop.latex.clean.subfolder.enabled": true, 24 | "latex-workshop.latex.autoClean.run":"onFailed", 25 | "latex-workshop.latex.autoBuild.run": "onSave", 26 | "latex-workshop.latex.external.build.args": [ 27 | "--shell-escape" 28 | ], 29 | "latex-workshop.texdoc.args": [ 30 | "--view", 31 | "--shell-escape" 32 | ], 33 | "files.exclude": { 34 | "**/.project": true, 35 | "**/.chktexrc": true, 36 | "**/.settings": true, 37 | "**/.dockerignore": true, 38 | "**/.devcontainer": true, 39 | "**/.gitattributes": true, 40 | "**/.gitignore": true, 41 | "**/makefile": true, 42 | "**/fonts": true, 43 | "**/*.aux":true, 44 | "**/*.out":true, 45 | "**/*.fls":true, 46 | "**/*.iml":true, 47 | "**/*.toc":true, 48 | "**/*.gz":true, 49 | "**/*.bbl":true, 50 | "**/*.lof":true, 51 | "**/*.blg":true, 52 | "**/*.lot":true, 53 | "**/*.fdb_latexmk":true, 54 | "**/*.synctex(busy)":true, 55 | "**/*.git":true, 56 | "**/*.idea":true, 57 | "**/*.vscode":true, 58 | "**/*.github":true, 59 | "**/*.user": true, 60 | "**/*.log": true, 61 | "**/*.ilk": true, 62 | "**/*.bst": true, 63 | 64 | }, 65 | } 66 | } -------------------------------------------------------------------------------- /yanputhesis-sample.tex: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `yanputhesis-sample.tex', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% yanputhesis.dtx (with options: `sample') 8 | %% Copyright (C) 2022 by Shangkun Shen 9 | %% 10 | %% It may be distributed and/or modified under the conditions of the LaTeX 11 | %% Project Public License, either version 1.3b of this license or (at your 12 | %% option) any later version. The latest version of this license is in 13 | %% https://www.latex-project.org/lppl.txt 14 | %% and version 1.3b or later is part of all distributions of LaTeX version 15 | %% 2005/12/01 or later. 16 | %%=============================================================================% 17 | %% 设置论文格式(学位、学位类型、盲评、Adobe 字体) 18 | %%-----------------------------------------------------------------------------% 19 | %% 博士、学术学位、正常版本、不使用 Adobe 字体 20 | %% \documentclass[lang=chs, degree=phd, blindreview=false, adobe=false, academic=true]{yanputhesis} 21 | %% 博士、专业学位、盲评版本、不使用 Adobe 字体 22 | %% \documentclass[lang=chs, degree=phd, blindreview=true, adobe=false, academic=false]{yanputhesis} 23 | %% 博士、学术学位、正常版本、强制使用 Windows 系统字体 24 | \documentclass[lang=chs, degree=phd, blindreview=false, winfonts=true, academic=true]{yanputhesis} 25 | %% 硕士、学术学位、正常版本、不使用 Adobe 字体 26 | %% \documentclass[lang=chs, degree=master, blindreview=false, adobe=false, academic=true]{yanputhesis} 27 | %% 硕士、专业学位、盲评版本、不使用 Adobe 字体 28 | %% \documentclass[lang=chs, degree=master, blindreview=true, adobe=false, academic=false]{yanputhesis} 29 | %%=============================================================================% 30 | %% 导言区:请自行添加额外宏包 31 | %%-----------------------------------------------------------------------------% 32 | \usepackage{blindtext} % 生成无意义文本 33 | \usepackage{metalogo} % 软件标志 34 | \usepackage[binary-units=true]{siunitx} % 物理量单位 35 | \usepackage{amsmath} % 基础数学库 36 | \usepackage[acronym]{glossaries} % 缩略表库 37 | %%=============================================================================% 38 | %% 缩略语(也可以是独立文件) 39 | %%-----------------------------------------------------------------------------% 40 | \newacronym{npu}{西工大}{西北工业大学} 41 | \newglossaryentry{massEnergyFunc}{ 42 | name = 质能方程, 43 | description = 一种阐述能量与质量间相互关系的理论物理学公式 44 | } 45 | \makeglossaries 46 | %%=============================================================================% 47 | %% 参考文献(也可以是独立文件) 48 | %%-----------------------------------------------------------------------------% 49 | \begin{filecontents}{reference.bib} 50 | @software{NWPUThesisLaTeXTemplate, 51 | title = {Yet Another {{\LaTeX}} Template for NPU Thesis}, 52 | author = {Shangkun Shen and Zhihe Wang and Jiduo Zhang and Weijia Zhang}, 53 | month = {11}, 54 | year = {2019}, 55 | publisher = {Zenodo}, 56 | journal = {GitHub repository}, 57 | doi = {10.5281/zenodo.4159248}, 58 | url = {https://doi.org/10.5281/zenodo.4159248} 59 | } 60 | 61 | @book{knuth1986the, 62 | title = {The {{\TeX}}book}, 63 | author = {Knuth, Donald E}, 64 | publisher = {Addison-Wesley}, 65 | year = {1986} 66 | } 67 | 68 | @book{lamport1989latex, 69 | title = {{{\LaTeX}}: a document preparation system}, 70 | author = {Lamport, Leslie}, 71 | publisher = {Addison-Wesley Professional}, 72 | year = {1989} 73 | } 74 | 75 | @article{szegedy2015going, 76 | title = {Going deeper with convolutions}, 77 | author = {Szegedy, Christian and Liu, Wei and Jia, Yangqing and 78 | Sermanet, Pierre and Reed, Scott E and Anguelov, Dragomir and 79 | Erhan, Dumitru and Vanhoucke, Vincent and Rabinovich, Andrew}, 80 | journal = {Computer Vision and Pattern Recognition}, 81 | pages = {1--9}, 82 | year = {2015} 83 | } 84 | 85 | @software{MathSymbolsinLaTeXbypolossk, 86 | title = {Math Symbols in {{\LaTeX}}}, 87 | author = {Shangkun Shen}, 88 | year = {2017}, 89 | month = {10}, 90 | publisher = {Zenodo}, 91 | journal = {GitHub repository}, 92 | doi = {10.5281/zenodo.4120375}, 93 | url = {https://doi.org/10.5281/zenodo.4120375} 94 | } 95 | 96 | @article{chen2014maiyuan, 97 | title = {脉源三支 强强融合——西北工业大学}, 98 | author = {{陈家忠}}, 99 | journal = {电子技术与软件工程}, 100 | number = {9}, 101 | pages = {15--16}, 102 | year = {2014} 103 | } 104 | 105 | @article{shen2021peridynamic, 106 | title = {Peridynamic modeling with energy-based surface correction for 107 | fracture simulation of random porous materials}, 108 | journal = {Theoretical and Applied Fracture Mechanics}, 109 | volume = {114}, 110 | pages = {102987}, 111 | year = {2021}, 112 | issn = {0167-8442}, 113 | author = {Shangkun Shen and Zihao Yang and Fei Han and Junzhi Cui and 114 | Jieqiong Zhang}, 115 | publisher = {Elsevier} 116 | } 117 | 118 | @inproceedings{chen2018autonomous, 119 | title = {Autonomous vehicle testing and validation platform: Integrated 120 | simulation system with hardware in the loop}, 121 | author = {Chen, Yu and Chen, Shitao and Zhang, Tangyike and 122 | Zhang, Songyi and Zheng, Nanning}, 123 | booktitle = {2018 IEEE Intelligent Vehicles Symposium (IV)}, 124 | pages = {949--956}, 125 | year = {2018}, 126 | organization = {IEEE} 127 | } 128 | \end{filecontents} 129 | %%=============================================================================% 130 | %% 基本信息录入 131 | %%-----------------------------------------------------------------------------% 132 | \title{基于 LaTeX 排版的 \\ 西北工业大学论文模板}{ % 中英文标题 133 | Yet Another Thesis Template of \\ Northwestern Polytechnical University 134 | } % 请自行断行 135 | \author{\blindreview{张三丰}}{\blindreview{Sanfeng Zhang}} % 姓名(添加盲评标记) 136 | \date{2022年6月}{Jun 2022} % 答辩日期 137 | \school{数学与统计学院}{School of Mathematics and Statistics}% 学院 138 | \major{数学}{Philosophy in Mathematics} % 专业 博士请添加 Ph 139 | \advisor{\blindreview{李四海}}{\blindreview{Sihai Li}} % 导师(添加盲评标记) 140 | \advisorAcademicRank{教授}{Professor} % 导师中英学术职位(教授 Professor、副教授 Associate Professor、研究员 Researcher 和讲师 Lecturer) 141 | \studentnumber{2016123456} % 学号 142 | \funding{本研究得到玄学基金(编号23336666)资助。}{ % 基金资助 143 | The present work is supported by Funding of Metaphysics % 144 | (Project No:23336666).} % 145 | %%=============================================================================% 146 | %% 文档开始 147 | %%-----------------------------------------------------------------------------% 148 | \begin{document} 149 | %%-----------------------------------------------------------------------------% 150 | %% 总前言,包含封皮页、中英文标题、中英文摘要、目录 151 | %%-----------------------------------------------------------------------------% 152 | \frontmatter % 前言部分 153 | \maketitle % 封皮页及标题页 154 | %%-----------------------------------------------------------------------------% 155 | \makeCommitteePage{ % 学位论文评阅人 156 | \reviewers{\fullBlindReview{5}} % 和答辩委员会名单 157 | \committee{2023 年 x 月 y 日}{ 158 | \defenseChair{赵钱孙}{教授}{西北工业大学} 159 | \committeeMember{周吴郑}{教授}{西北工业大学} 160 | \committeeMember{冯陈褚}{教授}{西北工业大学} 161 | \committeeMember{蒋沈韩}{教授}{西北工业大学} 162 | \committeeMember{朱秦尤}{教授}{西北工业大学} 163 | \committeeMember{何吕施}{教授}{西北工业大学} 164 | \committeeMember{孔曹严}{教授}{西北工业大学} 165 | \defenseSecretary{金魏陶}{教授}{西北工业大学} 166 | } 167 | } 168 | %%-----------------------------------------------------------------------------% 169 | \begin{abstract} % 中文摘要开始 170 | 这是在西北工业大学本科毕业设计、硕博研究生毕业论文格式的要求下的一份 LaTeX 171 | 文档类模板。使用者无需额外修改格式控制细节,直接在所发布的样例基础上,修改章 172 | 节标题,撰写内容,即可完成毕业设计论文任务。 % 173 | \begin{keywords} % 中文关键词开始 174 | 学位论文 \sep 模板 \sep \LaTeX % 175 | \end{keywords} % 中文关键词结束 176 | \end{abstract} % 中文摘要结束 177 | %%-----------------------------------------------------------------------------% 178 | \begin{engabstract} % 英文摘要开始 179 | \noindent \blindtext % 180 | \begin{engkeywords} % 英文关键词开始 181 | thesis \ensep template \ensep \LaTeX % 182 | \end{engkeywords} % 英文关键词结束 183 | \end{engabstract} % 英文摘要结束 184 | %%-----------------------------------------------------------------------------% 185 | \tableofcontents % 目录 186 | \phantomsection\addcontentsline{toc}{chapter}{缩写表} % 缩写表(学校未做要求) 187 | \printglossary[type=\acronymtype,title=缩写表] % 缩写表(学校未做要求) 188 | \printglossary[title=术语表] % 术语表(学校未做要求) 189 | \listoffigures % 图目录(学校未做要求) 190 | \listoftables % 表目录(学校未做要求) 191 | \printnomenclature % 符号表(学校未做要求) 192 | %%-----------------------------------------------------------------------------% 193 | \mainmatter 194 | \sDefault 195 | \chapter{绪论} 196 | \chaptermark{绪论} 197 | \section{这是中标题} 198 | emmmm 199 | \subsection{这是小标题} 200 | emmmmm 201 | \subsubsection{这是小小标题} 202 | 搞这么多层大丈夫? 203 | 204 | \section{公式} 205 | 简单行内公式 $a+b=233$,超高公式会被压缩 $\frac{1}{2}=0.5$ 或者使用 206 | \lstinline`\displaystyle` 防止被压缩:$\displaystyle \frac{1}{2}=0.5$。 207 | 208 | 简单的不标号单行公式 209 | $$a_0+a_1+a_2=\sqrt{233}$$ 210 | 需要标号和起名的公式如\autoref{eq:eqtest} 所示。测试下 autoref \autoref{eq:eqtest} 211 | \begin{equation} 212 | \label{eq:eqtest} 213 | a_0 + a_1 + a_2 = \sqrt{233} 214 | \end{equation} 215 | 216 | \section{术语} 217 | 218 | 在使用术语和缩略的时候可以使用\lstinline`\gls`命令:例如:术语\gls{massEnergyFunc}及缩略\gls{npu}。 219 | 220 | \section{特殊符号} 221 | 222 | 用\href{http://detexify.kirelabs.org/classify.html}{ 223 | http://detexify.kirelabs.org/classify.html}画出来。 224 | 225 | \section{参考文献的引用} 226 | 227 | \LaTeX{} 中要求参考文献使用 \lstinline`\cite` 进行参考引用,若论文要求中说明需在 228 | 文字的右上角注明引用,请使用命令 \lstinline`\cite` 进行参考引用。举个不恰当的例 229 | 子,比如本论文模板的原版“LaTeX-Template-For-NPU-Thesis”\cite{NWPUThesisLaTeXTemplate} 230 | 要求务必声明引用,同时预配置了插件“math-symbols”\cite{MathSymbolsinLaTeXbypolossk}。 231 | 对组件的引用是每一名科学工作者的基本素养(一本正经)。对于需要引用但是并不需要明 232 | 确指明引用位置的文献,请使用 \lstinline`\nocite` 命令。 233 | 234 | 在此同时感谢真正的 dalao 高德纳开发了全世界版本号最接近 $\pi$ 的软件 235 | \LaTeX \cite{knuth1986the}\nocite{lamport1989latex}。 236 | 237 | 测试引用文献 \cite{szegedy2015going, shen2021peridynamic, chen2014maiyuan, chen2018autonomous}。 238 | 其中倒数第二篇为中文文献,最后一篇为会议文献。 239 | 240 | \section{标点符号的选择} 241 | 242 | 根据《中华人民共和国国家标准 GB/T 15834-1995》及《出版工作中的语言文字规范》中提 243 | 及,“科学技术中文图书,如果涉及公式、算式较多,句号可以统一用英文句号‘.’,省略 244 | 号用英文三个点的省略号‘…’”。如果您是中文的科技论文写作者,建议您使用全角英文句 245 | 号“\lstinline`.`”间隔句子。如果是人文学科则可以不做处理。您也可以在一开始先使用 246 | 中文句号‘。’,最后批量替换即可。 247 | 248 | \section{萌新如何编译} 249 | 250 | \begin{enumerate} 251 | \setlength{\itemsep}{0pt} 252 | \item 安装正确版本的 TexLive 2021 253 | \item 使用自带的 TeXworks 打开 \lstinline`yanputhesis-sample.tex` 254 | \item 左上角下拉框选择工具 255 | \item 依次使用 \lstinline`XeLaTeX-BibTeX-XeLaTeX-XeLaTeX` 编译 256 | \end{enumerate} 257 | 258 | \section{如何生成盲评版本} 259 | 260 | \begin{enumerate} 261 | \setlength{\itemsep}{0pt} 262 | \item 在这份样例当中,已经将标题页可能用到的作者姓名、导师姓名添加了空白盲评 263 | 标记 \lstinline`\blindreview{text}`。如果需要生成盲评版本,则需要将文档类型 264 | 设置为 \lstinline`blindreview=true`,这样便可得到标题页不含作者与导师姓名的 265 | 版本。 266 | \item 在致谢中,除了导师名字之外,其他老师、同学的名字也应当隐去。同样可以将 267 | 姓名添加空白盲评标记 \lstinline`\blindreview{text}` 来得到留空版本的结果。 268 | \item 一般正文中不建议出现留空,因此推荐另外两种盲评标记,涂黑或者打星。使用 269 | \lstinline`\blackbox{text}` 命令将姓名添加涂黑盲评标记,文本会替换为与文字相 270 | 同长度的黑色方块,制造涂黑效果。或者使用 \lstinline`\markname{text}` 命令将 271 | 姓名添加打星盲评标记,姓名将替换成 3 个星号“***”。 272 | \item 下面给出示例(通过开启盲评选项查看效果): 273 | \begin{enumerate} 274 | \setlength{\itemsep}{0pt} 275 | \item 不添加任何盲评标记:“感谢某某某教授的悉心指导。” 276 | \item 使用了空白盲评标记:“感谢\blindreview{某某某}教授的悉心指导。” 277 | \item 使用了涂黑盲评标记:“感谢\blackbox{某某某}教授的悉心指导。” 278 | \item 使用了打星盲评标记:“感谢\markname{某某某}教授的悉心指导。” 279 | \end{enumerate} 280 | \end{enumerate} 281 | 282 | \section{如何生成学位论文评阅人和答辩委员会名单} 283 | 284 | \begin{enumerate} 285 | \setlength{\itemsep}{0pt} 286 | \item 在这份样例当中,已经预设置了盲评学位论文评阅人和答辩委员会名单,实现代码可 287 | 参考\autoref{code:makeBlindReviewerCommitteePage} 所示,明审版本可参考 288 | \autoref{code:makeOpenReviewerCommitteePage} 所示。 289 | \item 在学位论文评阅人名单中分为两种情况,即盲评与明审。请根据自身情况填写评 290 | 委信息。如果是盲评,使用命令 \lstinline`\fullBlindReview{num}` 来生成 291 | 盲评表格,其中参数 \lstinline`num` 表示盲评专家人数,一般是 3 或 5 人。 292 | 如果是明审,使用命令 \lstinline`\expert{name}{title}{university}` 293 | 登记评委信息,其中参数 \lstinline`name`、\lstinline`title`、 294 | \lstinline`university` 分别为专家的姓名、职称、学校。 295 | \item 答辩委员会需登记四个信息:答辩时间、答辩主席、答辩评委以及答辩秘书。其 296 | 中,答辩时间为 \lstinline`\committee` 命令后的第一个参数,其余分别使用 297 | \lstinline`\defenseChair`、\lstinline`\committeeMember`、 298 | \lstinline`\defenseSecretary` 命令登记专家个人信息,用法与 299 | \lstinline`\expert` 命令一致。 300 | \end{enumerate} 301 | 302 | \begin{lstlisting}[language={TeX}, label={code:makeBlindReviewerCommitteePage}, 303 | caption={盲评样例 makeBlindReviewerCommitteePage.tex}] 304 | \makeCommitteePage{ 305 | \reviewers{\fullBlindReview{5}} 306 | \committee{2023 年 x 月 y 日}{ 307 | \defenseChair{赵钱孙}{教授}{西北工业大学} 308 | \committeeMember{周吴郑}{教授}{西北工业大学} 309 | \committeeMember{冯陈褚}{教授}{西北工业大学} 310 | \committeeMember{蒋沈韩}{教授}{西北工业大学} 311 | \committeeMember{朱秦尤}{教授}{西北工业大学} 312 | \committeeMember{何吕施}{教授}{西北工业大学} 313 | \committeeMember{孔曹严}{教授}{西北工业大学} 314 | \defenseSecretary{金魏陶}{教授}{西北工业大学} 315 | } 316 | } 317 | \end{lstlisting} 318 | 319 | \begin{lstlisting}[language={TeX}, label={code:makeOpenReviewerCommitteePage}, 320 | caption={明审样例 makeOpenReviewerCommitteePage.tex}] 321 | \makeCommitteePage{ 322 | \reviewers{ 323 | \expert{周吴郑}{教授}{西北工业大学} 324 | \expert{冯陈褚}{教授}{西北工业大学} 325 | \expert{蒋沈韩}{教授}{西北工业大学} 326 | \expert{朱秦尤}{教授}{西北工业大学} 327 | \expert{何吕施}{教授}{西北工业大学} 328 | } 329 | \committee{2023 年 x 月 y 日}{ 330 | \defenseChair{赵钱孙}{教授}{西北工业大学} 331 | \committeeMember{周吴郑}{教授}{西北工业大学} 332 | \committeeMember{冯陈褚}{教授}{西北工业大学} 333 | \committeeMember{蒋沈韩}{教授}{西北工业大学} 334 | \committeeMember{朱秦尤}{教授}{西北工业大学} 335 | \committeeMember{何吕施}{教授}{西北工业大学} 336 | \committeeMember{孔曹严}{教授}{西北工业大学} 337 | \defenseSecretary{金魏陶}{教授}{西北工业大学} 338 | } 339 | } 340 | \end{lstlisting} 341 | 342 | \cleardoublepage 343 | 344 | \chapter{插入图表以及如何引用} 345 | \chaptermark{插入图表以及如何引用} 346 | 347 | \section{表格} 348 | 349 | 使用 \href{http://www.tablesgenerator.com/}{http://www.tablesgenerator.com/} 生 350 | 成,可粘贴Excel。效果如表\ref{my-label}所示。注意表中的字号(五号)和表格宽度( 351 | 通栏)。外部请用 \lstinline`table` 环境,内部使用 \lstinline`tabularx` 即可。 352 | 353 | \begin{table}[!h] 354 | \centering 355 | \caption{表格标题} 356 | \label{my-label} 357 | \begin{tabularx}{\textwidth}{CCCC} 358 | \toprule 359 | $A$ & $B$ & $A+B$ & $A\times B$ \\ \midrule 360 | 1 & 6 & 7 & 6 \\ 361 | 2 & 7 & 9 & 14 \\ 362 | 3 & 8 & 11 & 24 \\ 363 | 4 & 9 & 13 & 36 \\ 364 | 5 & 10 & 15 & 50 \\ \bottomrule 365 | \end{tabularx} 366 | \end{table} 367 | 368 | \begin{table}[!h] 369 | \centering 370 | \caption{指定宽度与对齐方式} 371 | \label{my-label-2} 372 | \begin{tabularx}{\textwidth}{|P{2cm}|O{3cm}|Q{4cm}|C} 373 | \toprule 374 | \SI{2}{\centi\metre} & \SI{3}{\centi\metre} & \SI{4}{\centi\metre} & Other \\ \midrule 375 | 1 & 6 & 7 & 1 \\ 376 | 2 & 7 & 9 & 2 \\ 377 | 3 & 8 & 11 & 3 \\ \bottomrule 378 | \end{tabularx} 379 | \end{table} 380 | 381 | \section{插图} 382 | 383 | 请直接使用 \lstinline`figure` 环境,内部使用 \lstinline`includegraphics` 即可。 384 | 如果需要多张子图排版,请在 \lstinline`figure` 环境内部使用 \lstinline`minipage` 385 | 预先设置总的浮动体宽度,然后再使用 \lstinline`subfigure` 环境进行排版。 386 | 387 | 测试下文章内的图片引用。如\autoref{fig:example} 和\autoref{fig:example2} 所示, 388 | 这是两幅插图。在这其中\autoref{subfig:example2-subfig1} 是第一幅子图, 389 | \autoref{subfig:example2-subfig2} 是第二幅子图。 390 | 391 | \begin{figure}[htb] 392 | \centering 393 | \includegraphics[scale=0.2]{poster.png} 394 | \caption{ 395 | 这里是个普通的标题 396 | } 397 | \label{fig:example} 398 | \end{figure} 399 | 400 | \begin{figure}[htb] 401 | \centering 402 | \begin{minipage}[t]{0.96\textwidth} 403 | \centering 404 | \begin{subfigure}[t]{0.47\textwidth} 405 | \centering 406 | \includegraphics[scale=0.1]{poster.png} 407 | \caption{\label{subfig:example2-subfig1}} 408 | \end{subfigure} 409 | \begin{subfigure}[t]{0.47\textwidth} 410 | \centering 411 | \includegraphics[scale=0.1]{poster.png} 412 | \caption{\label{subfig:example2-subfig2}} 413 | \end{subfigure} 414 | \end{minipage} 415 | \caption{这里是另一个普通的标题} 416 | \label{fig:example2} 417 | \end{figure} 418 | 419 | \section{插入源代码} 420 | 421 | 这里给出一个 Hello World 的样例,如\autoref{code:hello-world} 所示。 422 | 423 | \begin{lstlisting}[language={C++}, label={code:hello-world}, 424 | caption={Hello World.cpp}] 425 | #include 426 | using namespace std; 427 | 428 | int main() 429 | { 430 | // output "Hello World!" 431 | cout << "Hello World!" << endl; 432 | return 0; 433 | } 434 | \end{lstlisting} 435 | 436 | \section{引用以及其他编写建议} 437 | 438 | \LaTeX 提供了 \lstinline`ref` 和 \lstinline`autoref` 两种引用方式,其中前者只显 439 | 示序号,后者可以显示提示语,如“\autoref{code:hello-world}”表示引用代码, 440 | 而“\autoref{subfig:example2-subfig2}”表示引用图片的子图.为了方便引用以及作者阅读, 441 | 本人强烈建议使用 \lstinline`autoref` 来统一处理引用问题,同时在每一个 442 | \lstinline`autoref` 添加提示语,如 \lstinline`fig` 和 \lstinline`tab` 分别表示插 443 | 图和表格。 444 | 445 | 由于 \XeLaTeX 在处理中文时,会自动在中文之间添加空格,所以请放心地在编写文档时换 446 | 行,防止某一行过长导致阅读时的不便。另外中英文之间的空格(包括命令)并未做严格限 447 | 制。本文推荐除在不影响最终成文的结果这一前提下,为保持文档的美观与易读,请自行选 448 | 择合适的编写方式。 449 | 450 | \cleardoublepage 451 | %%=============================================================================% 452 | %% 参考文献以及附录 453 | %%-----------------------------------------------------------------------------% 454 | %% \bibliographystyle{nputhesis} % GB/T 7714-2015 格式 455 | \bibliographystyle{nputhesis-noslash} % 参考文献改进格式 456 | \bibliography{reference} % 参考文献 457 | \appendix 458 | \chapter{一份说明 顺便测试英文标题 Title} 459 | 460 | 强烈不推荐英文标题!仅供测试,擅自使用后果自负。 461 | 462 | \section{测试附录子标题} 463 | 464 | 这是一份附录,请放置一些独立的证明、源代码、或其他辅助资料。 465 | 466 | \nomenclature{$r$}{圆(或球)的半径} 467 | \nomenclature{$C$}{圆的周长} 468 | \nomenclature{$S$}{圆的面积} 469 | 470 | \begin{equation} 471 | C = 2 \pi r 472 | \end{equation} 473 | 474 | \begin{equation} 475 | S = \pi r^2 476 | \end{equation} 477 | 478 | \cleardoublepage 479 | 480 | \chapter{另一份说明} 481 | 482 | 这是另一份附录,请放置一些独立的证明、源代码、或其他辅助资料。 483 | 484 | \nomenclature{$S_{\text{sphere}}$}{球的表面积} 485 | \nomenclature{$V_{\text{sphere}}$}{球的体积} 486 | 487 | \begin{equation} 488 | S_{\text{sphere}} = 4 \pi r^2 489 | \end{equation} 490 | 491 | \begin{equation} 492 | V_{\text{sphere}} = \frac43 \pi r^3 493 | \end{equation} 494 | 495 | \cleardoublepage 496 | %%=============================================================================% 497 | %% 文档附页部分(致谢、参加科研情况、知识产权与原创性声明) 498 | %%-----------------------------------------------------------------------------% 499 | \backmatter % 文档附页部分 500 | %%-----------------------------------------------------------------------------% 501 | \begin{acknowledgements} % 致谢开始 502 | 感谢我的老师和我的朋友们…… 503 | \end{acknowledgements} % 致谢结束 504 | %%-----------------------------------------------------------------------------% 505 | \begin{accomplishments} % 参加科研情况开始 506 | [1] ... 507 | \end{accomplishments} % 参加科研情况结束 508 | %%-----------------------------------------------------------------------------% 509 | \makestatement % 知识产权与原创性声明 510 | %%=============================================================================% 511 | %% 文档结束 512 | %%-----------------------------------------------------------------------------% 513 | \end{document} 514 | %%=============================================================================% 515 | 516 | 517 | %% 518 | %% This work consists of the file yanputhesis.dtx 519 | %% and the derived files yanputhesis.ins, 520 | %% yanputhesis.pdf, 521 | %% yanputhesis.cls. 522 | %% 523 | %% 524 | %% End of file `yanputhesis-sample.tex'. 525 | -------------------------------------------------------------------------------- /yanputhesis.ins: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `yanputhesis.ins', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% yanputhesis.dtx (with options: `install') 8 | %% Copyright (C) 2022 by Shangkun Shen 9 | %% 10 | %% It may be distributed and/or modified under the conditions of the LaTeX 11 | %% Project Public License, either version 1.3b of this license or (at your 12 | %% option) any later version. The latest version of this license is in 13 | %% https://www.latex-project.org/lppl.txt 14 | %% and version 1.3b or later is part of all distributions of LaTeX version 15 | %% 2005/12/01 or later. 16 | \input docstrip.tex 17 | \keepsilent 18 | \askforoverwritefalse 19 | \preamble 20 | Copyright (C) 2022 by Shangkun Shen 21 | 22 | It may be distributed and/or modified under the conditions of the LaTeX 23 | Project Public License, either version 1.3b of this license or (at your 24 | option) any later version. The latest version of this license is in 25 | https://www.latex-project.org/lppl.txt 26 | and version 1.3b or later is part of all distributions of LaTeX version 27 | 2005/12/01 or later. 28 | \endpreamble 29 | \postamble 30 | 31 | This work consists of the file yanputhesis.dtx 32 | and the derived files yanputhesis.ins, 33 | yanputhesis.pdf, 34 | yanputhesis.cls. 35 | 36 | \endpostamble 37 | 38 | \generate 39 | { 40 | \usedir{tex/latex/yanputhesis} 41 | \file{yanputhesis.cls} {\from{\jobname.dtx}{class}} 42 | \usedir{doc/latex/yanputhesis} 43 | \file{yanputhesis-sample.tex} {\from{\jobname.dtx}{sample}} 44 | } 45 | 46 | \Msg{*************************************************************} 47 | \Msg{* *} 48 | \Msg{* To finish the installation you have to move the following *} 49 | \Msg{* files into a directory searched by TeX: *} 50 | \Msg{* *} 51 | \Msg{* \space\space yanputhesis.cls *} 52 | \Msg{* *} 53 | \Msg{* To produce the documentation run the files ending with *} 54 | \Msg{* `.dtx' through XeLaTeX. *} 55 | \Msg{* *} 56 | \Msg{* Happy TeXing *} 57 | \Msg{*************************************************************} 58 | 59 | \endbatchfile 60 | 61 | 62 | %% 63 | %% This work consists of the file yanputhesis.dtx 64 | %% and the derived files yanputhesis.ins, 65 | %% yanputhesis.pdf, 66 | %% yanputhesis.cls. 67 | %% 68 | %% 69 | %% End of file `yanputhesis.ins'. 70 | --------------------------------------------------------------------------------