├── .DS_Store
├── STXingkai.ttf
├── STXinwei.ttf
├── STZhongsong.ttf
├── images
├── cover.jpg
├── latex.jpg
├── sztu.png
├── school_title.pdf
└── cover.svg
├── sztuthesis_main.pdf
├── official_documents
├── 本科论文格式范例2024.docx
└── 本科生毕业论文(设计)撰写规范及要求.doc
├── .gitignore
├── content
├── additional.tex
├── abstractcn.tex
├── info.tex
├── abstracten.tex
└── content.tex
├── texclear.sh
├── thesis-references.bib
├── Makefile
├── config_example
└── settings.json
├── README.md
├── sztuthesis_main.tex
├── gbt7714.sty
├── SZTUthesis.cls
├── LICENSE
└── gbt7714-numerical.bst
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/.DS_Store
--------------------------------------------------------------------------------
/STXingkai.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/STXingkai.ttf
--------------------------------------------------------------------------------
/STXinwei.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/STXinwei.ttf
--------------------------------------------------------------------------------
/STZhongsong.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/STZhongsong.ttf
--------------------------------------------------------------------------------
/images/cover.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/images/cover.jpg
--------------------------------------------------------------------------------
/images/latex.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/images/latex.jpg
--------------------------------------------------------------------------------
/images/sztu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/images/sztu.png
--------------------------------------------------------------------------------
/sztuthesis_main.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/sztuthesis_main.pdf
--------------------------------------------------------------------------------
/images/school_title.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/images/school_title.pdf
--------------------------------------------------------------------------------
/official_documents/本科论文格式范例2024.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/official_documents/本科论文格式范例2024.docx
--------------------------------------------------------------------------------
/official_documents/本科生毕业论文(设计)撰写规范及要求.doc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SZTU-ACM/SZTU-Thesis-Latex-Template/HEAD/official_documents/本科生毕业论文(设计)撰写规范及要求.doc
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /*.bat
2 | *.aux
3 | *.bbl
4 | *.blg
5 | *.fdb_latexmk
6 | *.fls
7 | *.log
8 | *.out
9 | *.spl
10 | *.synctex.gz
11 | *.dvi
12 | *.xdv
13 | *.gz
14 | *.toc
15 | *.bak
16 | *.sav
17 | *.xml
18 | *.snm
19 | *.bcf
20 | *.nav
21 | *.rar
22 | ~$*.docx
23 | ~$*.xlsx
24 | ~$*.pptx
25 | *.tmp
26 | *.thm
--------------------------------------------------------------------------------
/content/additional.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../sztuthesis_main.tex
2 |
3 | % 致谢
4 | \begin{thankscontent}
5 | 本文能顺利完成,首先最要感谢的是...
6 |
7 | 为了能把主要精力放在论文撰写上,许多国际期刊和高校都支持LaTeX的撰写与提交,新手不需要关心格式问题,只需要按部就班的使用少数符号标签,即可得到符合要求的文档。且在需要全篇格式修改时,更换或修改模板文件,即可直接重新编译为新的样式文档,这对于word新手使用word的感受来说是不可思议的。
8 |
9 | 本项目的目的是为了创建一个符合深圳技术大学学位论文撰写规范的TeX模板,解决学位论文撰写时格式调整的痛点。
10 |
11 | % 图X幅,表X个,参考文献X篇(四号宋体)
12 |
13 | \end{thankscontent}
--------------------------------------------------------------------------------
/texclear.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # List of TeX temporary file extensions
4 | extensions=(
5 | "*.aux"
6 | "*.bbl"
7 | "*.blg"
8 | "*.fdb_latexmk"
9 | "*.fls"
10 | "*.log"
11 | "*.synctex*"
12 | "*.toc"
13 | "*.out"
14 | "*.lof"
15 | "*.lot"
16 | "*.idx"
17 | "*.ind"
18 | "*.ilg"
19 | "*.dvi"
20 | "*.nav"
21 | "*.snm"
22 | "*.vrb"
23 | "*.thm"
24 | )
25 |
26 | # Loop over the array and delete all files with the given extensions
27 | for ext in "${extensions[@]}"; do
28 | find . -type f -name "$ext" -delete
29 | done
30 |
31 | echo "TeX temporary files have been deleted."
--------------------------------------------------------------------------------
/content/abstractcn.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../sztuthesis_main.tex
2 | % 设置中文摘要
3 |
4 | \phantomsection
5 | \addcontentsline{toc}{section}{摘要}
6 |
7 | \keywordscn{深圳技术大学;学位论文;LaTeX模板}
8 | \categorycn{TP391}
9 | \begin{abstractcn}
10 | LaTeX利用设置好的模板,可以编译为格式统一的pdf。目前国内大多出版社与高校仍在使用word,word由于其强大的功能与灵活性,在新手面对形式固定的论文时,排版、编号、参考文献等简单事务反而会带来很多困难与麻烦,对于一些需要通篇修改的问题,要想达到LaTeX的效率,对word使用者来说需要具有较高的技能水平。
11 |
12 | 为了能把主要精力放在论文撰写上,许多国际期刊和高校都支持LaTeX的撰写与提交,新手不需要关心格式问题,只需要按部就班的使用少数符号标签,即可得到符合要求的文档。且在需要全篇格式修改时,更换或修改模板文件,即可直接重新编译为新的样式文档,这对于word新手使用word的感受来说是不可思议的。
13 |
14 | 本项目的目的是为了创建一个符合深圳技术大学学位论文撰写规范的TeX模板,解决学位论文撰写时格式调整的痛点。
15 |
16 | % 图X幅,表X个,参考文献X篇(四号宋体)
17 |
18 | \end{abstractcn}
--------------------------------------------------------------------------------
/thesis-references.bib:
--------------------------------------------------------------------------------
1 | % Encoding: UTF-8
2 | @book{lamport1994latex,
3 | title={LATEX: a document preparation system: user's guide and reference manual},
4 | author={Lamport, Leslie},
5 | year={1994},
6 | publisher={Addison-wesley}
7 | }
8 |
9 | @article{pritchard1969statistical,
10 | title={Statistical bibliography or bibliometrics},
11 | author={Pritchard, Alan and others},
12 | journal={Journal of documentation},
13 | volume={25},
14 | number={4},
15 | pages={348--349},
16 | year={1969},
17 | publisher={New York}
18 | }
19 |
20 | @Article{2013浅谈使用,
21 | author = {邵殿国 and 尚宝欣},
22 | journal = {电子制作},
23 | title = {浅谈使用 EditPlus 编辑编译 LaTeX 文件},
24 | year = {2013},
25 | volume = {16},
26 | }
27 |
28 | @Comment{jabref-meta: databaseType:bibtex;}
29 |
--------------------------------------------------------------------------------
/content/info.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../sztuthesis_main.tex
2 | % 文章信息
3 |
4 |
5 | % % 这里注意根据封面需要的样式手动用“\\”对标题断行
6 | % 如果提示 “Overfull \\hbox (26.47823pt too wide)” 或和“题目:”不在同一行,
7 | % 则说明有点宽,可调整断行
8 | % \titlecn{测试短标题}
9 | \titlecn{深圳技术大学本科学位论文LaTeX\\模板标题可能很长则两行呈现}
10 | \titleen{LaTeX Template of Postgraduate Thesis of \\Shenzhen Technology University}
11 |
12 | \priormajor{物联网工程}
13 | \author{郭小侠}
14 | \supervisor{郭大侠}
15 | \supervisortitle{助理教授}
16 | \department{大数据与互联网学院}
17 | \studentid{123456789}
18 | \thesisdate{year=2023,month=5,day=1}
19 |
20 |
21 |
22 | \clcnumber{TP391} % 中图分类号 Chinese Library Classification
23 | \schoolcode{14655} % 学校代码
24 | \udc{004.9} % UDC
25 | \academiccategory{学术学位} % 学术类别
26 |
27 |
28 | \newif \ifblindreview % 条件语句,是否是盲审版本
29 | % \blindreviewtrue
30 | \blindreviewfalse
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # modified from SJTU THESIS PROJECT
2 |
3 | THESIS = sztuthesis_main
4 | # TEX, BIB, TEST dir
5 | TEX_DIR = content
6 | BIB_DIR = .
7 |
8 | # Option for latexmk
9 | LATEXMK_OPT_BASE = -xelatex -gg -silent
10 | LATEXMK_OPT = $(LATEXMK_OPT_BASE) -f
11 | LATEXMK_OPT_PVC = $(LATEXMK_OPT_BASE) -pvc
12 |
13 | all: $(THESIS).pdf
14 |
15 | .PHONY : all cleanall pvc view wordcount git zip
16 |
17 | $(THESIS).pdf : $(THESIS).tex $(TEX_DIR)/*.tex $(BIB_DIR)/*.bib SZTUthesis.cls Makefile
18 | -latexmk $(LATEXMK_OPT) $(THESIS)
19 |
20 | pvc :
21 | latexmk $(LATEXMK_OPT_PVC) $(THESIS)
22 |
23 | view : $(THESIS).pdf
24 | #Mac user
25 | open $<
26 | #Linux user
27 | #xdg-open $<
28 |
29 | wordcount:
30 | @texcount $(THESIS).tex -inc -ch-only | awk '/total/ {getline; print "纯中文字数\t\t\t:",$$4}'
31 | @texcount $(THESIS).tex -inc -chinese | awk '/total/ {getline; print "总字数(英文单词 + 中文字)\t:",$$4}'
32 |
33 | clean :
34 | -@latexmk -c -silent 2> /dev/null
35 | -@rm -f $(TEX_DIR)/*.aux 2> /dev/null || true
36 |
37 | cleanall :
38 | -@latexmk -C -silent 2> /dev/null
39 | -@rm -f $(TEX_DIR)/*.aux 2> /dev/null || true
40 |
41 | zip :
42 | git archive --format zip --output thesis.zip master
43 |
--------------------------------------------------------------------------------
/content/abstracten.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../sztuthesis_main.tex
2 | \phantomsection
3 | \addcontentsline{toc}{section}{Abstract}
4 |
5 | \keywordsen{SZTU;~LaTeX;~Template}
6 | \categoryen{TP391}
7 | \begin{abstracten}
8 | LaTeX can be compiled into a pdf of uniform format using the set template.At present, most domestic publishers and universities still use word. Because of its powerful function and flexibility, when faced with fixed-form papers by novices, simple matters such as typesetting, numbering, and reference documents will bring many difficulties and troubles. For some problems that need to be modified throughout, to achieve the efficiency of LaTeX, it requires a high level of skill for word users.
9 |
10 | In order to focus on the writing of papers, many international journals and universities support the writing and submission of LaTeX. Novices don't need to care about formatting issues. They only need to use a few symbolic labels step by step to get the documents that meet the requirements. And when you need to modify the entire format, you can directly recompile the template file by replacing or modifying the template file. This is incredible for the word novice to use the word.
11 |
12 | The purpose of this project is to create a TeX template that meets the specifications of the graduate degree thesis of Shenzhen Technology University, and to address the pain points of format adjustment during the dissertation writing.
13 | \end{abstracten}
--------------------------------------------------------------------------------
/config_example/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "python.terminal.executeInFileDir": true,
3 | // bibtex 格式
4 | "latex-workshop.bibtex-format.tab": "tab",
5 |
6 | // 自动编译,全部关闭,当且仅当你认为有需要的时候才会去做编译
7 | "latex-workshop.latex.autoBuild.run": "never",
8 | "latex-workshop.latex.autoBuild.cleanAndRetry.enabled": false,
9 |
10 |
11 | // 这是一些独立的编译选项,可以作为工具被编译方案调用
12 | "latex-workshop.latex.tools": [
13 | {
14 | "name": "xelatex",
15 | "command": "xelatex",
16 | "args": [
17 | "-synctex=1",
18 | "-interaction=nonstopmode",
19 | "-file-line-error",
20 | "-output-directory=%OUTDIR%",
21 | "%DOC%"
22 | ]
23 | },
24 | {
25 | "name": "bibtex",
26 | "command": "bibtex",
27 | "args": [
28 | "%DOCFILE%"
29 | ],
30 | "env": {}
31 | }
32 | ],
33 |
34 | // 这是一些编译方案,会出现在 GUI 菜单里
35 | "latex-workshop.latex.recipes": [
36 | {
37 | "name": "xelatex ➞ bibtex ➞ xelatex`×2",
38 | "tools": [
39 | "xelatex",
40 | "bibtex",
41 | "xelatex",
42 | "xelatex"
43 | ]
44 | }
45 | ],
46 |
47 | // 清空中间文件
48 | "latex-workshop.latex.clean.fileTypes": [
49 | "*.aux",
50 | "*.bbl",
51 | "*.blg",
52 | "*.idx",
53 | "*.ind",
54 | "*.lof",
55 | "*.lot",
56 | "*.out",
57 | "*.toc",
58 | "*.acn",
59 | "*.acr",
60 | "*.alg",
61 | "*.glg",
62 | "*.glo",
63 | "*.gls",
64 | "*.ist",
65 | "*.fls",
66 | "*.log",
67 | "*.fdb_latexmk",
68 | "*.bcf",
69 | "*.run.xml",
70 | "*.synctex.gz"
71 | ],
72 | "latex-workshop.view.pdf.viewer": "tab"
73 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | # 深圳技术大学学位论文Tex模版
3 | ## 欢迎Contribute,欢迎一起讨论学位论文 LaTeX 知识
4 |
5 | 欢迎对 LaTeX 感兴趣的同学参与项目维护,添加更多features
6 |
7 |
8 | LaTeX 使用问题,请加
9 | 深圳技术大学学位论文 LaTeX 模板交流 QQ群:
10 | 710337475
11 |
12 |
13 | ## 项目起源
14 |
15 | LaTeX利用设置好的模板,可以编译为格式统一的pdf。
16 |
17 | 目前国内大多出版社与高校仍在使用word,word由于其强大的功能与灵活性,在新手面对形式固定的论文时,排版、编号、参考文献等简单事务反而会带来很多困难与麻烦,对于一些需要通篇修改的问题,要想达到LaTeX的效率,对word使用者来说需要具有较高的技能水平。
18 |
19 | 为了能把主要精力放在论文撰写上,许多国际期刊和高校都支持LaTeX的撰写与提交,新手不需要关心格式问题,只需要按部就班的使用少数符号标签,即可得到符合要求的文档。且在需要全篇格式修改时,更换或修改模板文件,即可直接重新编译为新的样式文档,这对于word新手使用word的感受来说是不可思议的。
20 |
21 | 本项目的目的是为了创建一个符合深圳技术大学毕业论文(设计)撰写规范的TeX模板,解决学位论文撰写时格式调整的痛点。
22 |
23 | 本模板依照[本科论文格式范例2024](./official_documents/本科论文格式范例2024.docx)编写。
24 |
25 | ## 主要内容
26 |
27 | 
28 |
29 | 1. 封面;
30 | 2. 学位论文诚信声明;
31 | 3. 目录;
32 | 4. 中文摘要;
33 | 5. 论文正文;
34 | 6. 参考文献;
35 | 7. 致谢。
36 | 8. 英文摘要;
37 | 9. 附录(必要时);
38 |
39 | ## 版本状况
40 |
41 | 完整支持本科生毕业论文要求。
42 |
43 | ## 文件介绍
44 |
45 | ### `SZTUthesis.cls`
46 |
47 | 样式文件,不需要管这个文件。
48 |
49 | 对LaTeX有所了解的同学,也可按需修改这个文件。如果这个文件的样式设计有什么bug,欢迎在issue里提出。
50 |
51 | ### `gbt7714-numerical.bst`和`gbt7714.sty`两个文件
52 |
53 | 来自项目[CTeX-org/gbt7714-bibtex-style](https://github.com/CTeX-org/gbt7714-bibtex-style),是参考文献的样式。
54 |
55 |
56 | ### `content`目录
57 |
58 | 所有论文的编辑内容在这里。
59 |
60 | `info.tex`:论文的各种信息,标题姓名学院之类的。
61 |
62 | `abstactcn.tex`和`abstracten.tex`:顾名思义。
63 |
64 | `content.tex`:从绪论到总结的全部正文内容。`\cite`的时候可能因为tex文件与主文件分离,LaTeX环境配置不到位,会有找不到bib的提示(Texlive+sublime会这样),没关系,照常插入需要的bibkey即可。
65 |
66 | `additional.tex`:成果、致谢、附录之类的。
67 |
68 |
69 | ### `sztuthesis_main.tex`
70 |
71 | 论文主文件,正常情况下不用修改这个文件,以这个文件编译论文即可。
72 |
73 | 在content目录提供的页面不足以保证所需内容时,可以修改主文件,引入其他自定义content文件。
74 |
75 | ### `images`目录
76 |
77 | 放图片,模板已经配置了相对路径,所以在文中插图片时,直接用images目录下的相对路径即可,比如`images/sztu.png`,在正文中插入只需要`sztu.png`。
78 |
79 | ## 编译
80 |
81 | ### Linux
82 |
83 | ```bash
84 | # 单次编译
85 | make
86 | # 持续集成
87 | make pvc
88 | ```
89 | 或者
90 | 请使用`xelatex`,对`sztuthesis_main.tex`文件进行编译。
91 | Windows下可以使用`TexMaker`,`TexStudio`等IDE,选中`xelatex`编译器进行编译。
92 | 使用高级文本编辑器,如sublime等,否则可能因为ANSI、UTF-8等编码格式问题编译失败。
93 |
94 | ### Windows
95 |
96 | 推荐使用 Visual Studio Code 编辑 Latex
97 |
98 | #### 1. 安装[texlive](http://tug.org/texlive/)
99 |
100 | 官网的用户体验很不好,找iso有点迷
101 |
102 | 这里有提供下载镜像的汇总:[https://ctan.org/mirrors](https://ctan.org/mirrors)
103 |
104 | 这个阿里云的镜像一时半会儿应该不会失效吧:[https://mirrors.aliyun.com/CTAN/systems/texlive/Images/](https://mirrors.aliyun.com/CTAN/systems/texlive/Images/)
105 |
106 | 下载 `texlive.iso`
107 |
108 | 打开iso文件,运行 `install-tl-windows.bat`,界面都看得懂,装就是了。
109 |
110 | #### 2. vscode 安装 latex workshop 扩展
111 |
112 | vscode怎么装扩展不用赘述了
113 |
114 | #### 3. 设置里,找latex栏目下的 `Latex:Tools`,编辑`settings.json`
115 |
116 | 添加:
117 |
118 | ```json
119 | {
120 | "name": "xelatex",
121 | "command": "xelatex",
122 | "args": [
123 | "-synctex=1",
124 | "-interaction=nonstopmode",
125 | "-file-line-error",
126 | "%DOC%"
127 | ]
128 | },
129 | ```
130 |
131 | #### 4. `Latex:Recipes`,编辑`settings.json`
132 |
133 | 添加:
134 |
135 | ```json
136 | {
137 | "name": "xelatex",
138 | "tools": [
139 | "xelatex"
140 | ]
141 | },
142 | {
143 | "name": "xelatex ➞ bibtex ➞ xelatex × 2",
144 | "tools": [
145 | "xelatex",
146 | "bibtex",
147 | "xelatex",
148 | "xelatex"
149 | ]
150 | },
151 | ```
152 |
153 | 可以把latexmk的三条注释掉
154 |
155 | 要想使用bibtex参考文献,需要“四次编译”,可以设为默认,把`"xelatex ➞ bibtex ➞ xelatex × 2"`挪到前面。
156 |
157 | #### 5. 一些快捷键
158 |
159 | - ctrl+alt+b:编译
160 | - ctrl+鼠标点击pdf:可跳至源码位置
161 | - 在源码位置ctrl+alt+j可跳至pdf位置
162 | - ctrl+k ctrl+a: 切换活动栏可见性(左侧图标开关)
163 | - ctrl+alt+x:显示LaTeX面板(左侧编译命令面板和文档大纲)。
164 | - ctrl+alt+c:清除辅助文件
165 | - ctrl+alt+v:查看编译的pdf文件(预览)
166 | - ctrl+alt+j:正向搜索。当设置`"latex-workshop.view.pdf.viewer": "tab";`时,在LaTeX源文件中按下快捷键,定位到PDF文档相应位置。
167 |
--------------------------------------------------------------------------------
/sztuthesis_main.tex:
--------------------------------------------------------------------------------
1 | \documentclass{SZTUthesis}
2 | \usepackage{makecell}
3 | \usepackage{algorithm}
4 | \usepackage{algorithmicx}
5 | \usepackage{setspace}
6 | \setstretch{1.5}
7 | \hypersetup{
8 | colorlinks=true,
9 | linkcolor=black
10 | }
11 |
12 | \newcommand\pkg[1]{\texttt{#1}\textsuperscript{\sffamily PKG}}
13 | \newcommand\env[1]{\texttt{#1}\textsuperscript{\sffamily ENV}}
14 | \newcommand\app[1]{\textsf{#1}}
15 | \newcommand\oper[1]{\texttt{#1}}
16 | \newcommand\cls[1]{\texttt{#1}\textsuperscript{\sffamily CLS}}
17 | \newcommand\bib[1]{\texttt{#1}\textsuperscript{\sffamily BIB}}
18 | \renewcommand\emph[1]{\textbf{#1}}
19 | \newcommand\format[1]{\textsf{#1}}
20 |
21 | %算法
22 | %\begin{algorithm}[t]
23 | %\caption{algorithm caption} %算法的名字
24 | %\hspace*{0.02in} {\bf Input:} %算法的输入, \hspace*{0.02in}用来控制位置,同时利用 \\ 进行换行
25 | %input parameters A, B, C\\
26 | %\hspace*{0.02in} {\bf Output:} %算法的结果输出
27 | %output result
28 | %\begin{algorithmic}[1]
29 | %\State some description % \State 后写一般语句
30 | %\For{condition} % For 语句,需要和EndFor对应
31 | % \State ...
32 | % \If{condition} % If 语句,需要和EndIf对应
33 | % \State ...
34 | % \Else
35 | % \State ...
36 | % \EndIf
37 | %\EndFor
38 | %\While{condition} % While语句,需要和EndWhile对应
39 | % \State ...
40 | %\EndWhile
41 | %\State \Return result
42 | %\end{algorithmic}
43 | %\end{algorithm}
44 |
45 | \input{content/info}
46 |
47 | % lipsum
48 | \newcommand{\lipsum}{%
49 | 这是一段随机插入的文本,用来填充模板布局,感受模板视觉效果。
50 |
51 | 深圳技术大学是广东省和深圳市高起点、高水平、高标准建设的本科层次公办普通高等学校。2015年,深圳市委市政府开始筹建深圳技术大学。2016年3月,深圳市人民政府办公厅发布关于设立深圳技术大学筹备办公室的通知。2017年7月,深圳市机构编制委员会发布关于设立深圳技术大学(筹)的通知。2017年9月、2018年9月深圳技术大学(筹)依托深圳大学分别招收了226人和807人。2018年11月30日,经教育部批准正式设立深圳技术大学,学校独立招生,标识码为4144014655,定位于应用型高等学校。2019年9月,学校首年独立招生录取807人,招生的六个省份均高于一本线(高优线/自招线)录取;其中,广东省理科投档线进入前十。
52 |
53 | 学校充分借鉴和引进德国、瑞士等发达国家一流技术大学先进的办学经验,致力于培养本科及以上层次具有国际视野、工匠精神和创新创业能力的高水平工程师、设计师等高素质应用型人才,努力建成一流的应用型技术大学。
54 |
55 | 着力建设面向国家和地方发展需要的,以工学为主,理学、管理学、艺术学等协调发展的学科体系,并按计划分布发展和优化学科布局。
56 |
57 | 目前设立了中德智能制造学院、大数据与互联网学院、新材料与新能源学院、城市交通与物流学院、健康与环境工程学院、创意设计学院、工程物理学院、质量和标准学院、国际交流学院、商学院、药学院、外国语学院、马克思主义学院(人文社科学院)、体育学院。已开设机械设计制造及其自动化、物联网工程、光源与照明、交通运输、汽车服务工程、工业设计等高度契合经济发展和产业需求的专业。至2022年,学校拟开设专业39个,涵盖工学、理学、管理学、艺术学、经济学等5个学科门类。
58 |
59 | 这是一段随机插入的文本,用来填充模板布局,感受模板视觉效果。%
60 | }
61 |
62 | % 让各类元素在全文按1、2、3...顺序编号,而不因章节变化而重置为1
63 | \numberwithin{figure}{section}
64 | \numberwithin{equation}{section}
65 | \numberwithin{algorithm}{section}
66 | \numberwithin{table}{section}
67 |
68 | \begin{document}
69 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70 | % 封面
71 | % -----------------------------------------------%
72 | \makecoverpage
73 |
74 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
75 | % 前置部分的页眉页脚设置
76 | % -----------------------------------------------%
77 | \newpage
78 |
79 |
80 | \pagestyle{empty}
81 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 | % 声明页
83 | % -----------------------------------------------%
84 | \announcement
85 | \newpage
86 |
87 |
88 | % 目录
89 | % -------------------------------------------%
90 | {
91 | \renewcommand{\contentsname}{\hfill \heiti \zihao{-2} 目\quad 录\hfill}
92 | \zihao{4}
93 | \setlength{\parskip}{6pt} % 段间距,补偿latex行间距计算(与word的差距)
94 | \renewcommand*{\baselinestretch}{1.5} % 行间距
95 | \tableofcontents
96 | }
97 | \newpage
98 |
99 | % 去掉页眉章节序号后面的“.”
100 | \renewcommand{\sectionmark}[1]{\markright{\thesection~ #1}}
101 | \renewcommand{\headrulewidth}{1pt}
102 |
103 |
104 |
105 | % 正文内容
106 | % --------------------------------------------%
107 |
108 | \setheader
109 |
110 | % 可以使用include命令导入tex文件,从而避免过多修改本文件。
111 |
112 | % 论文正文是主体,主体部分应从另页右页开始,每一章应另起页。一般由序号标题、文字叙述、图、表格和公式等五个部分构成。
113 |
114 | % 重新设置正文行间距,因为前置部分设置时候行间距被改过
115 | \renewcommand*{\baselinestretch}{1.5} % 几倍行间距
116 | \setlength{\baselineskip}{16pt} % 基准行间距
117 |
118 | % 摘要
119 | {
120 | \linespread{1.5}
121 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
122 | % 中文摘要
123 | \setabstractfooter
124 |
125 | \input{content/abstractcn}
126 | \newpage
127 |
128 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129 | % 英文摘要
130 | % -----------------------------------------------%
131 | \include{content/abstracten}
132 | }
133 | \setfooter
134 | % 正文
135 | {
136 | % 表格字号应比正文小,这里设为五号,但是暂时没法在cls里设置(不然会影响到封面等tabular环境)
137 | % 所以目前只好在主文件里局部\AtBeginEnvironment
138 | \AtBeginEnvironment{tabular}{\zihao{5}}
139 |
140 | \linespread{1.5}
141 |
142 | % 正文内容
143 |
144 | \begin{spacing}{1.5}
145 | \input{content/content}
146 | \end{spacing}
147 | }
148 |
149 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150 | % 临时标签,用于编译时追踪正文末尾
151 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
152 |
153 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 | % 后续内容
155 | % --------------------------------------------%
156 |
157 | % https://www.zhihu.com/question/29413517/answer/44358389 %
158 | % 说明如下:
159 | % secnumdepth 这个计数器是 LaTeX 标准文档类用来控制章节编号深度的。在 article 中,这个计数器的值默认是 3,对应的章节命令是 \subsubsection。也就是说,默认情况下,article 将会对 \subsubsection 及其之上的所有章节标题进行编号,也就是 \part, \section, \subsection, \subsubsection。LaTeX 标准文档类中,最大的标题是 \part。它在 book 和 report 类中的层级是「-1」,在 article 类中的层级是「0」。这里,我们在调用 \appendix 的时候将计数器设置为 -2,因此所有的章节命令都不会编号了。不过,一般还是会保留 \part 的编号的。所以在实际使用中,将它设置为 0 就可以了。
160 |
161 | % 在修改过程中请注意不要破环命令的完整性
162 |
163 | \renewcommand\appendix{\setcounter{secnumdepth}{-2}}
164 | \appendix
165 |
166 | % 主文件有代码去掉页眉章节编号的“.”,但这会因为bug导致无编号章节显示一个错误编号,所以这里在无编号章节之前再次重定义sectionmark。
167 | \renewcommand{\sectionmark}[1]{\markright{#1}}
168 |
169 | \setreference
170 |
171 | \include{content/additional}
172 |
173 |
174 |
175 | \end{document}
176 |
--------------------------------------------------------------------------------
/content/content.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../sztuthesis_main.tex
2 | % 论文正文是主体,主体部分应从另页右页开始,每一章应另起页。一般由序号标题、文字叙述、图、表格和公式等五个部分构成。
3 | \section{引言}
4 | \subsection{研究背景与意义}
5 |
6 | \app{Word} 不难用,但是想用得漂亮还得费一番功夫。
7 |
8 | 对于小白来说,(注意!!是对于小白来说,不要跟我杠!!!我就是 \app{Word} 小白,高端玩法玩不动):
9 |
10 | 插入个图片,下面的说明文字是不是插入文本框?那文本框要不要跟图片“组合”?是不是直接圈没法圈起来?因为图片要变成浮动格式,和文本框绑定后再改回嵌入格式,你说蛋疼不蛋疼?不组合?那有一定概率发生你的图片在上一页,描述文字在下一页。呵呵。
11 |
12 | 插入参考文献,手动编辑?我的天哪,一百多个文献,中间插一个,怎么改序号?
13 | 很好,可以用交叉引用,一个个编辑文献格式?
14 | 很好,可以用 \app{endnote} 或者 \app{noteexpress} 的插入功能,你有没有发现插入是个宏,\oper{ctrl+z} 的时候会烦死你啊……
15 |
16 | 叮叮!让我们祭出 \LaTeX!!\cite{2013浅谈使用},有 \env{bibliography},一个 \pkg{cite} 包打天下!不要太爽。
17 |
18 |
19 | \begin{figure}[hbt]
20 | \centering
21 | \includegraphics[width=0.5\textwidth]{latex.jpg}
22 | \caption{LaTeX}
23 | \label{F.latex}
24 | \end{figure}
25 |
26 | 插入公式,对 \app{Word} 小白来说,公式居中编号靠右就是一道百度搜索能力过滤器。
27 |
28 | \app{Word} 里编辑三线表,啊烦躁。
29 |
30 | 等等等等……
31 |
32 | 让我们,专心写论文好不好?
33 |
34 | 爱你们。
35 |
36 |
37 | \subsection{主要研究工作}
38 | 虽然我 \LaTeX 水平也很水……但是通过大量 \oper{debug} 也勉强给大家凑出来一个格式绝对标准的 \LaTeX 模板,模板代码丑就丑吧,能用就行。写了大量注释,有一点 \LaTeX 基础就可以根据自己需要修改 \cls{SZTUthesis.cls} 文件。
39 |
40 | (1) 提供图片插入示例。
41 |
42 | (2) 提供表格插入示例。
43 |
44 | (3) 提供公式插入示例。
45 |
46 | (4) 提供参考文献插入示例。
47 |
48 | \subsection{论文组织结构}
49 |
50 | 全文内容共六章,具体内容组织如下:
51 |
52 | 第一章为绪论。
53 |
54 | 第二章为图片插入示例。
55 |
56 | 第三章为表格插入示例。
57 |
58 | 第四章为公式插入示例。
59 |
60 | 第五章为参考文献插入示例。
61 |
62 | 第六章总结与展望,总结了本文的主要工作,展望了下一阶段的研究方向。
63 |
64 | % \newpage % 两个章节之间分页,不想分的话可注释掉
65 |
66 | \section{图像布局}
67 | \label{sec.figure}
68 |
69 | \emph{学校对图片只有小标题要求,没有进一步的子图要求,我们按科技论文常规排版来}
70 |
71 | \subsection{单图布局}
72 |
73 | \lipsum
74 |
75 | \emph{单图布局如图~\ref{F.sztu_single} 所示。}
76 |
77 | \begin{figure}[hbt]
78 | \centering
79 | \includegraphics[width=0.5\textwidth]{sztu.png}
80 | \caption{单图布局示例}
81 | \label{F.sztu_single}
82 | \end{figure}
83 |
84 | \subsection{横排布局}
85 |
86 | \emph{横排布局如图~\ref{F.sztu_row} 所示。}
87 |
88 | \begin{figure}[!htb]
89 | \centering
90 | \begin{subfigure}[t]{0.24\linewidth}
91 | \begin{minipage}[b]{1\linewidth}
92 | \includegraphics[width=1\linewidth]{sztu.png}
93 | \caption{可以增加描述}
94 | \end{minipage}
95 | \end{subfigure}
96 | \begin{subfigure}[t]{0.24\linewidth}
97 | \begin{minipage}[b]{1\linewidth}
98 | \includegraphics[width=1\linewidth]{sztu.png}
99 | \caption{}
100 | \end{minipage}
101 | \end{subfigure}
102 | \begin{subfigure}[t]{0.24\linewidth}
103 | \begin{minipage}[b]{1\linewidth}
104 | \includegraphics[width=1\linewidth]{sztu.png}
105 | \caption{}
106 | \end{minipage}
107 | \end{subfigure}
108 | \begin{subfigure}[t]{0.24\linewidth}
109 | \begin{minipage}[b]{1\linewidth}
110 | \includegraphics[width=1\linewidth]{sztu.png}
111 | \caption{}
112 | \end{minipage}
113 | \end{subfigure}
114 | \caption{横排布局示例}
115 | \label{F.sztu_row}
116 | \end{figure}
117 |
118 | \lipsum
119 |
120 | \subsection{竖排布局}
121 | \emph{竖排布局如图\ref{F.sztu_col}所示。}
122 |
123 | \begin{figure}[!htb]
124 | \centering
125 | \begin{subfigure}[t]{0.15\linewidth}
126 | \begin{minipage}[b]{1\linewidth}
127 | \includegraphics[width=1\linewidth]{sztu.png}
128 | \caption{}
129 | \end{minipage}
130 | \end{subfigure}\\
131 | \begin{subfigure}[t]{0.15\linewidth}
132 | \begin{minipage}[b]{1\linewidth}
133 | \includegraphics[width=1\linewidth]{sztu.png}
134 | \caption{}
135 | \end{minipage}
136 | \end{subfigure}
137 | \caption{竖排布局示例}
138 | \label{F.sztu_col}
139 | \end{figure}
140 |
141 | \lipsum
142 |
143 | \subsection{竖排多图横排布局}
144 |
145 | \begin{figure}[!htb]
146 | \centering
147 | \begin{subfigure}[t]{0.13\linewidth}
148 | \begin{minipage}[b]{1\linewidth}
149 | \includegraphics[width=1\linewidth]{sztu.png} \vspace{-1ex} \vfill
150 | \includegraphics[width=1\linewidth]{sztu.png}
151 | \end{minipage}
152 | \caption{}
153 | \end{subfigure}
154 | \begin{subfigure}[t]{0.13\linewidth}
155 | \begin{minipage}[b]{1\linewidth}
156 | \includegraphics[width=1\linewidth]{sztu.png} \vspace{-1ex} \vfill
157 | \includegraphics[width=1\linewidth]{sztu.png}
158 | \end{minipage}
159 | \caption{}
160 | \end{subfigure}
161 | \caption{竖排多图横排布局}
162 | \label{F.sztu_col_row}
163 | \end{figure}
164 |
165 | \emph{竖排多图横排布局如图~\ref{F.sztu_col_row} 所示。注意看(a)、(b)编号与图关系。}
166 |
167 |
168 | \subsection{横排多图竖排布局}
169 |
170 | \lipsum
171 |
172 | \begin{figure}[!htb]
173 | \centering
174 | \begin{subfigure}[t]{0.3\linewidth}
175 | \begin{minipage}[b]{1\linewidth}
176 | \includegraphics[width=0.45\linewidth]{sztu.png}
177 | \includegraphics[width=0.45\linewidth]{sztu.png}
178 | \end{minipage}
179 | \caption{}
180 | \end{subfigure}\\
181 | \begin{subfigure}[t]{0.3\linewidth}
182 | \begin{minipage}[b]{1\linewidth}
183 | \includegraphics[width=0.45\linewidth]{sztu.png}
184 | \includegraphics[width=0.45\linewidth]{sztu.png}
185 | \end{minipage}
186 | \caption{}
187 | \end{subfigure}
188 | \caption{横排多图竖排布局}
189 | \label{F.sztu_row_col}
190 | \end{figure}
191 |
192 | \emph{横排多图竖排布局如图~\ref{F.sztu_row_col} 所示。注意看(a)、(b)编号与图关系。}
193 |
194 | \subsection{本章小结}
195 | 本章示例图片布局。
196 |
197 | 这里再测试一下不同章节的公式编号
198 | \begin{equation}
199 | p_{i} = \frac{e^{-\varepsilon_{i}/kT}}{\sum_{j=1}^{M}e^{-\varepsilon_{j}/kT}}
200 | \end{equation}
201 |
202 | \newpage % 两个章节之间分页,不想分的话可注释掉
203 |
204 |
205 | \section{表格插入示例}
206 |
207 | \begin{table}[htb]
208 | \centering
209 | \caption{学校文件里对表格的要求不是很高,不过按照学术论文的一般规范,表格为三线表。}
210 | \label{T.example}
211 | \begin{tabular}{llllll}
212 | \hline
213 | & A & B & C & D & E \\
214 | \hline
215 | 1 & 212 & 414 & 4 & 23 & fgw \\
216 | 2 & 212 & 414 & v & 23 & fgw \\
217 | 3 & 212 & 414 & vfwe & 23 & 长一些的内容 \\
218 | 4 & 212 & 414 & 4fwe & 23 & 嗯 \\
219 | 5 & af2 & 4vx & 4 & 23 & 长一些的内容 \\
220 | 6 & af2 & 4vx & 4 & 23 & fgw \\
221 | 7 & 212 & 414 & 4 & 23 & fgw \\
222 |
223 | \hline{}
224 | \end{tabular}
225 | \end{table}
226 |
227 | \emph{表格如表~\ref{T.example} 所示,\LaTeX 表格技巧很多,这里不再详细介绍。}
228 |
229 | \lipsum
230 |
231 | \newpage % 两个章节之间分页,不想分的话可注释掉
232 |
233 | \section{公式插入示例}
234 |
235 | \lipsum
236 |
237 | \emph{公式插入示例如公式~\eqref{E.example} 所示。}
238 | \begin{equation}
239 | \gamma_x=
240 | \begin{cases}
241 | 0, & \text{if $|x| \leq \delta$} \\
242 | x, & \text{otherwise}
243 | \end{cases}
244 | \label{E.example}
245 | \end{equation}
246 |
247 |
248 | \newpage % 两个章节之间分页,不想分的话可注释掉
249 |
250 | \section{参考文献插入示例}
251 |
252 | \LaTeX \cite{lamport1994latex}插入参考文献最方便的方式是使用 \env{bibliography}\cite{pritchard1969statistical}。
253 |
254 | 大多数出版商的论文页面都会有导出 \format{bib} 格式参考文献的链接,把每个文献的 \format{bib} 放入 \bib{thesis-references.bib},然后用 \oper{bibkey} 即可插入参考文献。
255 |
256 | \lipsum
257 |
258 | \newpage % 两个章节之间分页,不想分的话可注释掉
259 |
260 |
261 | \section{总结与展望}
262 |
263 | \noindent{纯数字编号}
264 | \begin{enumerate}
265 | \item XXXXXXXXXX
266 | \label{item1}
267 | \item XXXXXXXXXX
268 | \item XXXXXXXXXX
269 | \end{enumerate}
270 | 罗马编号
271 | \begin{enumerate}[label=(\roman*)]
272 | \item XXXXXXXXXX
273 | \label{item2}
274 | \item XXXXXXXXXX
275 | \item XXXXXXXXXX
276 | \end{enumerate}
277 | 括号编号
278 | \begin{enumerate}[label=(\arabic*)]
279 | \item XXXXXXXXXX
280 | \label{item3}
281 | \item XXXXXXXXXX
282 | \item XXXXXXXXXX
283 | \end{enumerate}
284 | 半括号编号
285 | \begin{enumerate}[label=\arabic*)]
286 | \item XXXXXXXXXX
287 | \label{item4}
288 | \item XXXXXXXXXX
289 | \item XXXXXXXXXX
290 | \end{enumerate}
291 | 小字母编号
292 | \begin{enumerate}[label=\alph*)]
293 | \item XXXXXXXXXX
294 | \label{item5}
295 | \item XXXXXXXXXX
296 | \item XXXXXXXXXX
297 | \end{enumerate}
298 |
299 | 引用测试,正如~\ref{item1}、\ref{item2}、\ref{item3}、\ref{item4}、\ref{item5} 所示
300 |
301 | \subsection{工作展望}
302 | 手动编号 %(不推荐,无法被交叉引用)
303 |
304 | 本课题针对XX,鉴于XXX,对XX进行了提高,但是XXX,所以有如下XX:
305 |
306 | (1)目前XX虽然XX,但是XX仍然XX,所以XX仍然是一个值得XX的问题。
307 |
308 | (2)随着XX,XX具有XX的问题,仍值得进一步XX。
309 |
310 | (3)本课题在XX有了XX,但是XX的XX还存在XX,所以XX。
311 |
312 |
313 | \newpage
314 |
--------------------------------------------------------------------------------
/gbt7714.sty:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `gbt7714.sty',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% gbt7714.dtx (with options: `package')
8 | %% -------------------------------------------------------------------
9 | %% GB/T 7714—2015 BibTeX Style
10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style
11 | %% Version: 2020/12/17 v2.1
12 | %% -------------------------------------------------------------------
13 | %% Copyright (C) 2016-2020 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 2005/12/01 or later.
22 | %% -------------------------------------------------------------------
23 | \NeedsTeXFormat{LaTeX2e}[1999/12/01]
24 | \ProvidesPackage{gbt7714}
25 | [2020/12/17 v2.1 GB/T 7714—2015 BibTeX Style]
26 | \newif\ifgbt@legacy@interface
27 | \newif\ifgbt@mmxv
28 | \newif\ifgbt@numerical
29 | \newif\ifgbt@super
30 | \newcommand\gbt@obsolete@option[1]{%
31 | \PackageWarning{gbt7714}{The option "#1" is obsolete}%
32 | }
33 | \DeclareOption{2015}{%
34 | \gbt@obsolete@option{2015}%
35 | \gbt@legacy@interfacetrue
36 | \gbt@mmxvtrue
37 | }
38 | \DeclareOption{2005}{%
39 | \gbt@obsolete@option{2005}%
40 | \gbt@legacy@interfacetrue
41 | \gbt@mmxvfalse
42 | }
43 | \DeclareOption{super}{%
44 | \gbt@obsolete@option{super}%
45 | \gbt@legacy@interfacetrue
46 | \gbt@numericaltrue
47 | \gbt@supertrue
48 | }
49 | \DeclareOption{numbers}{%
50 | \gbt@obsolete@option{numbers}%
51 | \gbt@legacy@interfacetrue
52 | \gbt@numericaltrue
53 | \gbt@superfalse
54 | }
55 | \DeclareOption{authoryear}{%
56 | \gbt@obsolete@option{authoryear}%
57 | \gbt@legacy@interfacetrue
58 | \gbt@numericalfalse
59 | }
60 | \PassOptionsToPackage{compress}{natbib}
61 | \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}}
62 | \ProcessOptions\relax
63 | \RequirePackage{natbib}
64 | \RequirePackage{url}
65 | \renewcommand\newblock{\space}
66 | \newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
67 | \newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}}
68 | \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}}
69 | \newcommand\bibstyle@inline{\bibstyle@numbers}
70 | \@namedef{bibstyle@gbt7714-numerical}{\bibstyle@super}
71 | \@namedef{bibstyle@gbt7714-author-year}{\bibstyle@authoryear}
72 | \@namedef{bibstyle@gbt7714-2005-numerical}{\bibstyle@super}
73 | \@namedef{bibstyle@gbt7714-2005-author-year}{\bibstyle@authoryear}
74 | \renewcommand\NAT@citesuper[3]{\ifNAT@swa
75 | \if*#2*\else#2\NAT@spacechar\fi
76 | % \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}%
77 | % \if*#3*\else\NAT@spacechar#3\fi\else #1\fi\endgroup}
78 | \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
79 | \else #1\fi\endgroup}
80 | \renewcommand\NAT@citenum%
81 | [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
82 | % #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup}
83 | #1\NAT@@close\textsuperscript{\if*#3*\else#3\fi}\else#1\fi\endgroup}
84 | \def\NAT@citexnum[#1][#2]#3{%
85 | \NAT@reset@parser
86 | \NAT@sort@cites{#3}%
87 | \NAT@reset@citea
88 | \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
89 | \@for\@citeb:=\NAT@cite@list\do
90 | {\@safe@activestrue
91 | \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
92 | \@safe@activesfalse
93 | \@ifundefined{b@\@citeb\@extra@b@citeb}{%
94 | {\reset@font\bfseries?}
95 | \NAT@citeundefined\PackageWarning{natbib}%
96 | {Citation `\@citeb' on page \thepage \space undefined}}%
97 | {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
98 | \NAT@parse{\@citeb}%
99 | \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
100 | \let\NAT@name=\NAT@all@names
101 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
102 | \fi
103 | \ifNAT@full\let\NAT@nm\NAT@all@names\else
104 | \let\NAT@nm\NAT@name\fi
105 | \ifNAT@swa
106 | \@ifnum{\NAT@ctype>\@ne}{%
107 | \@citea
108 | \NAT@hyper@{\@ifnum{\NAT@ctype=\tw@}{\NAT@test{\NAT@ctype}}{\NAT@alias}}%
109 | }{%
110 | \@ifnum{\NAT@cmprs>\z@}{%
111 | \NAT@ifcat@num\NAT@num
112 | {\let\NAT@nm=\NAT@num}%
113 | {\def\NAT@nm{-2}}%
114 | \NAT@ifcat@num\NAT@last@num
115 | {\@tempcnta=\NAT@last@num\relax}%
116 | {\@tempcnta\m@ne}%
117 | \@ifnum{\NAT@nm=\@tempcnta}{%
118 | \@ifnum{\NAT@merge>\@ne}{}{\NAT@last@yr@mbox}%
119 | }{%
120 | \advance\@tempcnta by\@ne
121 | \@ifnum{\NAT@nm=\@tempcnta}{%
122 | % \ifx\NAT@last@yr\relax
123 | % \def@NAT@last@yr{\@citea}%
124 | % \else
125 | % \def@NAT@last@yr{--\NAT@penalty}%
126 | % \fi
127 | \def@NAT@last@yr{-\NAT@penalty}%
128 | }{%
129 | \NAT@last@yr@mbox
130 | }%
131 | }%
132 | }{%
133 | \@tempswatrue
134 | \@ifnum{\NAT@merge>\@ne}{\@ifnum{\NAT@last@num=\NAT@num\relax}{\@tempswafalse}{}}{}%
135 | \if@tempswa\NAT@citea@mbox\fi
136 | }%
137 | }%
138 | \NAT@def@citea
139 | \else
140 | \ifcase\NAT@ctype
141 | \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\NAT@penalty\NAT@space\else
142 | \@citea \NAT@test{\@ne}\NAT@spacechar\NAT@mbox{\NAT@super@kern\NAT@@open}%
143 | \fi
144 | \if*#1*\else#1\NAT@spacechar\fi
145 | \NAT@mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%
146 | \NAT@def@citea@box
147 | \or
148 | \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
149 | \or
150 | \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
151 | \or
152 | \NAT@hyper@citea@space\NAT@alias
153 | \fi
154 | \fi
155 | }%
156 | }%
157 | \@ifnum{\NAT@cmprs>\z@}{\NAT@last@yr}{}%
158 | \ifNAT@swa\else
159 | % \@ifnum{\NAT@ctype=\z@}{%
160 | % \if*#2*\else\NAT@cmt#2\fi
161 | % }{}%
162 | \NAT@mbox{\NAT@@close}%
163 | \@ifnum{\NAT@ctype=\z@}{%
164 | \if*#2*\else\textsuperscript{#2}\fi
165 | }{}%
166 | \fi
167 | }{#1}{#2}%
168 | }%
169 | \renewcommand\NAT@cite%
170 | [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
171 | #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
172 | \def\NAT@citex%
173 | [#1][#2]#3{%
174 | \NAT@reset@parser
175 | \NAT@sort@cites{#3}%
176 | \NAT@reset@citea
177 | \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
178 | \@for\@citeb:=\NAT@cite@list\do
179 | {\@safe@activestrue
180 | \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
181 | \@safe@activesfalse
182 | \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
183 | {\reset@font\bfseries ?}\NAT@citeundefined
184 | \PackageWarning{natbib}%
185 | {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
186 | {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
187 | \NAT@parse{\@citeb}%
188 | \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
189 | \let\NAT@name=\NAT@all@names
190 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
191 | \fi
192 | \ifNAT@full\let\NAT@nm\NAT@all@names\else
193 | \let\NAT@nm\NAT@name\fi
194 | \ifNAT@swa\ifcase\NAT@ctype
195 | \if\relax\NAT@date\relax
196 | \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}%
197 | \else
198 | \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
199 | \ifx\NAT@last@yr\NAT@year
200 | \def\NAT@temp{{?}}%
201 | \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
202 | {Multiple citation on page \thepage: same authors and
203 | year\MessageBreak without distinguishing extra
204 | letter,\MessageBreak appears as question mark}\fi
205 | \NAT@hyper@{\NAT@exlab}%
206 | \else\unskip\NAT@spacechar
207 | \NAT@hyper@{\NAT@date}%
208 | \fi
209 | \else
210 | \@citea\NAT@hyper@{%
211 | \NAT@nmfmt{\NAT@nm}%
212 | \hyper@natlinkbreak{%
213 | \NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb
214 | }%
215 | \NAT@date
216 | }%
217 | \fi
218 | \fi
219 | \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
220 | \or\@citea\NAT@hyper@{\NAT@date}%
221 | \or\@citea\NAT@hyper@{\NAT@alias}%
222 | \fi \NAT@def@citea
223 | \else
224 | \ifcase\NAT@ctype
225 | \if\relax\NAT@date\relax
226 | \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
227 | \else
228 | \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
229 | \ifx\NAT@last@yr\NAT@year
230 | \def\NAT@temp{{?}}%
231 | \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
232 | {Multiple citation on page \thepage: same authors and
233 | year\MessageBreak without distinguishing extra
234 | letter,\MessageBreak appears as question mark}\fi
235 | \NAT@hyper@{\NAT@exlab}%
236 | \else
237 | \unskip\NAT@spacechar
238 | \NAT@hyper@{\NAT@date}%
239 | \fi
240 | \else
241 | \@citea\NAT@hyper@{%
242 | \NAT@nmfmt{\NAT@nm}%
243 | \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%
244 | {\@citeb\@extra@b@citeb}%
245 | \NAT@date
246 | }%
247 | \fi
248 | \fi
249 | \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
250 | \or\@citea\NAT@hyper@{\NAT@date}%
251 | \or\@citea\NAT@hyper@{\NAT@alias}%
252 | \fi
253 | \if\relax\NAT@date\relax
254 | \NAT@def@citea
255 | \else
256 | \NAT@def@citea@close
257 | \fi
258 | \fi
259 | }}\ifNAT@swa\else
260 | % \if*#2*\else\NAT@cmt#2\fi
261 | \if\relax\NAT@date\relax\else\NAT@@close\fi
262 | \if*#2*\else\textsuperscript{#2}\fi
263 | \fi}{#1}{#2}}
264 | \renewcommand\@biblabel[1]{[#1]\hfill}
265 | \g@addto@macro\UrlBreaks{%
266 | \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
267 | \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
268 | \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z
269 | \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m
270 | \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
271 | }
272 | \Urlmuskip=0mu plus 0.1mu
273 | \newif\ifgbt@bib@style@written
274 | \@ifpackageloaded{chapterbib}{}{%
275 | \def\bibliography#1{%
276 | \ifgbt@bib@style@written\else
277 | \bibliographystyle{gbt7714-numerical}%
278 | \fi
279 | \if@filesw
280 | \immediate\write\@auxout{\string\bibdata{\zap@space#1 \@empty}}%
281 | \fi
282 | \@input@{\jobname.bbl}}
283 | \def\bibliographystyle#1{%
284 | \gbt@bib@style@writtentrue
285 | \ifx\@begindocumenthook\@undefined\else
286 | \expandafter\AtBeginDocument
287 | \fi
288 | {\if@filesw
289 | \immediate\write\@auxout{\string\bibstyle{#1}}%
290 | \fi}%
291 | }%
292 | }
293 | \ifgbt@legacy@interface
294 | \ifgbt@numerical
295 | \ifgbt@super\else
296 | \citestyle{numbers}
297 | \fi
298 | \bibliographystyle{gbt7714-numerical}
299 | \else
300 | \bibliographystyle{gbt7714-author-year}
301 | \fi
302 | \fi
303 |
--------------------------------------------------------------------------------
/SZTUthesis.cls:
--------------------------------------------------------------------------------
1 | %
2 | % 本模版根据深圳技术大学学位论文撰写规范创建
3 | % 论文内容一般应由 9 个主要部分组成,依次为:
4 | % 1.封面;
5 | % 2.学位论文诚信声明;
6 | % 3.目录;
7 | % 4.中文摘要;
8 | % 5.论文正文;
9 | % 6.参考文献;
10 | % 7.致谢。
11 | % 8.英文摘要;
12 | % 9.附录(必要时);
13 |
14 |
15 | \NeedsTeXFormat{LaTeX2e}
16 | \ProvidesClass{SZTUthesis}[2021/03/31 v1.0 Standard LaTeX document class]
17 | \ProcessOptions\relax
18 | %% 读取基类
19 | \LoadClass[a4paper,12pt]{article}
20 | \RequirePackage{ifxetex}
21 | \RequireXeTeX
22 | \ifxetex\else
23 | \ClassError{SZTUthesis}{You must use the `xelatex' driver\MessageBreak Please choose `xelatex'}{%
24 | Just choose `xelatex', no `pdflatex' or `latex' and so on.}
25 | \fi
26 | % 相关宏包 %
27 | % ------------------------------------%
28 | % 支持中文的 ctex 宏包
29 | \RequirePackage[fontset=none]{ctex}
30 | % 页面布局
31 | \RequirePackage{geometry}
32 | % 数学宏包
33 | \RequirePackage{amsmath}
34 | \RequirePackage{ntheorem}
35 | \RequirePackage{amsfonts}
36 | \RequirePackage{amssymb}
37 | \RequirePackage{bm}
38 | % 自定义关键词
39 | \RequirePackage{pgfkeys}
40 | % 设置目录
41 | \RequirePackage{titletoc}
42 | % 设置字体
43 | \RequirePackage{fontenc}
44 | % 设置颜色
45 | \RequirePackage{xcolor}
46 | % 设置页眉和页脚
47 | \RequirePackage{fancyhdr}
48 | % 设置标题格式
49 | \RequirePackage{titlesec}
50 | % 超链接 hyperref 的设置
51 | \RequirePackage{hyperref}
52 | % 插入图片
53 | \RequirePackage{graphicx}
54 | % 表格
55 | \RequirePackage{array}
56 | % 长表格
57 | \RequirePackage{longtable}
58 | % % 弹性表格
59 | % \RequirePackage{tabularx}
60 | % booktabs 提供了\toprule 等命令.
61 | \RequirePackage{booktabs}
62 | % multirow 支持在表格中跨行
63 | \RequirePackage{multirow}
64 | % 调整间隔, 让表格更好看些
65 | \RequirePackage{bigstrut}
66 | %在跨行表格中输入定界符
67 | \RequirePackage{bigdelim}
68 | % 保护脆落命令
69 | \RequirePackage{cprotect}
70 | % 设置代码环境
71 | \RequirePackage{listings}
72 | % 首行缩进
73 | \RequirePackage{indentfirst}
74 | % warning: ccaption宏包不能出现在 caption 宏包之后
75 | % % 设置中英文标题
76 | % \RequirePackage{ccaption}
77 | % 设置浮动体的标题
78 | \RequirePackage{caption}
79 | \RequirePackage{subcaption}
80 | % 定制列表环境
81 | \RequirePackage{enumitem}
82 | % 提供\AtBeginEnvironment以方便全局调整一些结构的设置
83 | \RequirePackage{etoolbox}
84 | % 下划线(\underline会执行box逻辑,下划线文字无法换行。ulem的\uline为替代品)
85 | \RequirePackage[normalem]{ulem}
86 | % 动态宽度包,代替minipage
87 | \RequirePackage{varwidth}
88 | % % 尺寸计算
89 | % \RequirePackage{calc}
90 | % 算法编号
91 | \RequirePackage{algorithm}
92 | % 获取总页数
93 | \RequirePackage{lastpage}
94 | % 控制元素编号与章节的关系
95 | \RequirePackage{chngcntr}
96 | % 字符串处理
97 | \RequirePackage{xstring}
98 |
99 | % 参考文献格式 GBT7714-2005
100 | % 来自https://github.com/CTeX-org/gbt7714-bibtex-style
101 | % \RequirePackage{natbib} % gbt7714.sty已经包含了natbib宏包
102 | \RequirePackage{gbt7714}
103 |
104 | % 处理ctex宏包默认字体warning问题 %
105 | \setCJKmainfont[AutoFakeBold]{SimSun}
106 | \setCJKsansfont[AutoFakeBold]{SimHei}
107 | \setCJKmonofont[AutoFakeBold]{FangSong}
108 |
109 | % 页面布局 %
110 | % -------------------------------------------------------%
111 | \geometry{top=25.4mm,bottom=25.4mm,left=31mm,right=31mm}
112 | % 给页眉留足空间(否则会有 \headheight is too small的warning)
113 | \setlength{\headheight}{14.5pt}
114 | % “磅”是衡量印刷字体大小的单位,约等于七十二分之一英寸。
115 | % 而 1英寸=25.4毫米,则1磅=25.4/72≈0.353毫米。
116 | % 磅和 LaTeX的 pt- points (大约 1/72 inch) 是一致的。
117 | \renewcommand*{\baselinestretch}{1.5} % 几倍行间距
118 | \setlength{\baselineskip}{16pt} % 基准行间距
119 | \setlength{\parskip}{12pt} % 基准段间距(word行距与字体有关,这里用12pt近似word五号宋体行间距)
120 |
121 |
122 | % 设置字体 %
123 | % -------------------------------------------------------%
124 | \setmainfont{Times New Roman}
125 | \setmonofont{Courier New}
126 | \setsansfont{Arial}
127 | \renewcommand\normalsize{%
128 | \@setfontsize\normalsize{12pt}{14.45}%
129 | \abovedisplayskip 12\p@ \@plus3\p@ \@minus7\p@
130 | \abovedisplayshortskip \z@ \@plus3\p@
131 | \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@
132 | }
133 |
134 | % 重定义ctex定义好的宋体和黑体,以支持伪加粗AutoFakeBold
135 | % 即支持类似word里的给黑体、宋体等中文字体加粗的操作,用\bfseries
136 | \let\heiti\relax
137 | \newCJKfontfamily[hei]\heiti{SimHei}[AutoFakeBold]
138 | \let\songti\relax
139 | \newCJKfontfamily[song]\songti{SimSun}[AutoFakeBold]
140 | \let\kaishu\relax
141 | \newCJKfontfamily[kai]\kaishu{KaiTi}[AutoFakeBold]
142 |
143 | \let\huawenxingkai\relax
144 | \newCJKfontfamily[hwxk]\huawenxingkai{STXingkai.ttf}[AutoFakeBold]
145 | \let\huawenzhongsong\relax
146 | \newCJKfontfamily[hwzs]\huawenzhongsong{STZhongsong.ttf}[AutoFakeBold]
147 | \let\huawenxinwei\relax
148 | \newCJKfontfamily[hwxw]\huawenxinwei{STXinwei.ttf}[AutoFakeBold]
149 |
150 |
151 | % 每行缩进两个汉字
152 | \setlength{\parindent}{2em}
153 |
154 | % 中文标题名称
155 | \newcommand*{\sztu@cap@contentsname}{目录}
156 | \newcommand*{\sztu@cap@listfigurename}{插图清单}
157 | \newcommand*{\sztu@cap@listtablename}{附表清单}
158 | \newcommand*{\sztu@cap@refname}{参考文献}
159 | \newcommand*{\sztu@cap@indexname}{索引}
160 | \newcommand*{\sztu@cap@figurename}{图}
161 | \newcommand*{\sztu@cap@tablename}{表}
162 | \newcommand*{\sztu@cap@appendixname}{附录}
163 | \newcommand*{\sztu@cap@abstractname}{摘要}
164 | %%% 中文关键字
165 | \newcommand*{\sztu@cap@keywordsname}{关键字}
166 |
167 |
168 | % 定制titlepage
169 | % 定义命令和定义相应的宏。
170 | %----------------------------------------------------------------------%
171 | % 预定义全局使用的文字,如姓名、专业等信息,在content/info.tex中定义
172 | %----------------------------------------------------------------------%
173 | % 以下定义封面相关命令和相应的宏,以titleen为例,\titleen为实际在源码中使用的命令,一旦执行就会因为\gdef\@titleen{#1}使得其产生一个\@titleen的宏,而该宏能够在后续的环境中使用。
174 | \newcommand*{\titlecn}[1]{\gdef\@titlecn{#1}} % 中文标题
175 | \newcommand*{\titlecnSingleLine}{\StrSubstitute{\@titlecn}{\\}{}} % 中文标题去掉换行“\\”
176 | \newcommand*{\titleen}[1]{\gdef\@titleen{#1}} % 英文标题
177 | \newcommand*{\titleenSingleLine}{\StrSubstitute{\@titleen}{\\}{}} % 英文标题去掉换行“\\”
178 | \newcommand*{\priormajor}[1]{\gdef\@priormajor{#1}} % 一级学科(学科专业)
179 | \newcommand*{\minormajor}[1]{\gdef\@minormajor{#1}} % 二级学科(学科方向)
180 | \newcommand*{\interestmajor}[1]{\gdef\@interestmajor{#1}} % 研究方向,关键词组
181 | \newcommand*{\department}[1]{\gdef\@department{#1}} % 二级培养单位
182 | \newcommand*{\supervisor}[1]{\gdef\@supervisor{#1}} % 导师
183 | \newcommand*{\supervisortitle}[1]{\gdef\@supervisortitle{#1}} % 导师职称
184 | \newcommand*{\subsupervisor}[1]{\gdef\@subsupervisor{#1}} % 副导师
185 | \newcommand*{\studentid}[1]{\gdef\@studentid{#1}} % 学号
186 |
187 | \newcommand*{\clcnumber}[1]{\gdef\@clcnumber{#1}} % 中图分类号 Chinese Library Classification
188 | \newcommand*{\schoolcode}[1]{\gdef\@schoolcode{#1}} % 学校代码
189 | \newcommand*{\udc}[1]{\gdef\@udc{#1}} % UDC
190 | \newcommand*{\academiccategory}[1]{\gdef\@academiccategory{#1}} % 学术类别
191 |
192 |
193 | % 封面 %
194 | % -------------------------------------------------------------%
195 |
196 | % 论文日期
197 | % 采用key-value对的方式来制定存储信息的pgf路径
198 | \pgfkeys{/thesisdate/pgf/.cd, % 定义pgf路径
199 | year/.store in = \year, % 指定关键词year的存储位置为\year
200 | month/.store in = \month, % 指定关键词month的存储位置为\month
201 | day/.store in = \day
202 | }
203 | % 利用上述的pgf的key-value定制论文日期命令
204 | \newcommand{\thesisdate}[1] {
205 | \pgfkeys{/thesisdate/pgf/.cd,#1} % 指定使用/thesisdate/pgf/.cd来解释参数,然后在后文能直接使用存储位置来指定解释的内容
206 | \gdef\@thesisdate{\year{} 年 \month{} 月 \day{} 日} % 将构建好的日期存储到宏(\@thesisdate)中
207 | }
208 |
209 | % 以下为学位论文的封面内容
210 |
211 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
212 | % 定义 \makecoverpage 实现封面的重新绘制
213 | % -----------------------------------------------%
214 | \newcommand{\makecoverpage} {
215 | \thispagestyle{empty}
216 | {
217 | \hbadness=10000 % Suppress "Underful \hbox ..."
218 | \centering
219 | \linespread{1.5}
220 | \begin{figure}[H]
221 | \centering
222 | \includegraphics[width=0.75\textwidth]{school_title.pdf}
223 | \end{figure}
224 | \vspace{-1cm}
225 | {\zihao{2} \bfseries \songti 本科毕业论文(设计) \par} % 二号宋体
226 | \vspace{2.5cm} % 空行
227 | \begin{minipage}{\textwidth}
228 | \centering
229 | \bfseries
230 | {\zihao{3} \heiti 题目:}
231 | \begin{varwidth}[t]{0.85\textwidth}
232 | \zihao{2} \kaishu \uline{\@titlecn}
233 | \end{varwidth}
234 |
235 | \end{minipage}
236 | \vskip 3.5cm
237 | {
238 | \zihao{3} \heiti
239 | \begin{tabular}{ll}
240 | \makebox[5em][s]{姓名:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@author \hfill}} \\
241 | \makebox[5em][s]{学院:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@department \hfill}} \\
242 | \makebox[5em][s]{专业:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@priormajor \hfill}} \\
243 | \makebox[5em][s]{学号:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@studentid \hfill}} \\
244 | \makebox[5em][s]{指导教师:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@supervisor \hfill}} \\
245 | \makebox[5em][s]{职称:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@supervisortitle \hfill}} \\
246 | \makebox[5em][s]{提交日期:} & \parbox[t]{14em}{\bfseries \kaishu \uline{\centering \hfill \@thesisdate \hfill}} \\
247 | \end{tabular}
248 | }
249 | \par
250 | }
251 | }
252 |
253 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
254 | % 2.学位论文诚信声明
255 | % -----------------------------------------------%
256 | % 单独设一页,排在扉页后
257 | % 按模板,标题二号,内容四号,这里学校没有特别强调字体字号,
258 | % 应该有一定自由度。
259 |
260 | \newcommand{\announcement}{
261 |
262 | \linespread{1.5} % 这部分的行间距跟正文不一样
263 |
264 | \vspace*{2.5cm}
265 | {\centering \zihao{-2} \bfseries \heiti 深圳技术大学本科毕业论文(设计)诚信声明 \par}
266 |
267 | \vspace{2cm}
268 |
269 | \hbadness=10000 % Suppress "Underful \hbox ..."
270 | \setlength{\parindent}{2em} % 首行缩进
271 | {
272 | \zihao{4}
273 | 本人郑重声明:所呈交的毕业论文(设计),题目《\titlecnSingleLine》 是本人在指导教师的指导下,独立进行研究工作所取得的成果。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式注明。除此之外,本论文不包含任何其他个人或集体已经发表或撰写过的作品成果。本人完全意识到本声明的法律结果。
274 |
275 | \vspace{4cm}
276 |
277 | \begin{flushright}
278 | 毕业论文(设计)作者签名:\makebox[5em][c]{} \\
279 | 日期:\makebox[5em][c]{}\makebox[6em][s]{年月日}
280 | \end{flushright}
281 |
282 | }
283 |
284 | \vspace{1cm}
285 |
286 | }
287 |
288 |
289 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
290 | % 3. 目录 %
291 | % -----------------------------------------------%
292 | % 目录由论文(设计)的章、节、附录等序号、名称和页码组成。单独成页。四号宋体,1.5倍行距分散对齐排版。
293 | % “目录”两字居中(三号黑体),下空两行为章、节、小节及其开始页码(靠右顶格)。章、节、小节分别以阶梯式排列:1(第1章)、1.1、1.1.1依次标出。章、节、小节的题名与页码之间用“......”连接。除“目录”两字外,其余字体均为小四号宋体。
294 |
295 | \setcounter{secnumdepth}{3}
296 | % 定义作为标题的格式
297 | % \titleformat{command}[shape]%定义标题类型和标题样式
298 | % {format}%定义标题格式
299 | % {label}%定义标题的标签,即标题的标号等
300 | % {sep}%定义标题和标号之间的水平距离
301 | % {before-code}%定义标题前的内容
302 | % [after-code]%定义标题后的内容
303 | \newcommand{\sectionbreak}{\clearpage} % 大章前分页
304 | \titleformat{\section}{\zihao{-2}\centering \bfseries \heiti}{\thesection}{1em}{}
305 | \titleformat{\subsection}{\zihao{3} \bfseries \heiti}{\thesubsection}{1em}{}
306 | \titleformat{\subsubsection}{\zihao{-3} \bfseries \heiti}{\thesubsubsection}{1em}{}
307 | % 设置章节标题的段间距,默认0.5段间距足够了,去掉章节标题自带的段间距
308 | \titlespacing{\section}{0pt}{0pt}{0pt}%{0.3em}{0.3em}
309 | \titlespacing{\subsection}{0pt}{0pt}{0pt}%{0.3em}{0.3em}
310 | \titlespacing{\subsubsection}{0pt}{0pt}{0pt}%{0.3em}{0.3em}
311 | % 定义在目录中的格式
312 | % \titlecontents{标题名}
313 | % [左间距]
314 | % {标题格式}
315 | % {标题标志}
316 | % {无序号标题}
317 | % {指引线与页码}
318 | \titlecontents{section}
319 | [0.75em] % 按样例目录左侧是和前置部分文字左侧对齐的
320 | {\zihao{4} \songti}
321 | {\contentslabel {1em}}
322 | {\hspace*{-1em}}
323 | {\titlerule*[0.5pc]{.}\contentspage}
324 |
325 | \titlecontents{subsection}
326 | [2.5em]
327 | {\zihao{4} \songti} % note that 3.8 = 1.5 + 2.3
328 | {\contentslabel{2.2em}}
329 | {\hspace*{-3em}}
330 | {\titlerule*[0.5pc]{.}\contentspage}
331 |
332 | \titlecontents{subsubsection}
333 | [4em]
334 | {\zihao{4} \songti} % note that 3.8 = 1.5 + 2.3
335 | {\contentslabel{3.0em}}
336 | {\hspace*{-5em}}
337 | {\titlerule*[0.5pc]{.}\contentspage}
338 |
339 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
340 | % % 正文标题+作者信息
341 | % \newcommand{\infotitle}{
342 | % \linespread{1.5}
343 | % \begin{center} \zihao{2} \bfseries \huawenzhongsong \titlecnSingleLine \end{center}
344 | % % \begin{center} \zihao{5} \kaishu \@department-\@priormajor \quad \@author \end{center}
345 | % % \begin{center} \zihao{-5} \kaishu 学号:\@studentid \end{center}
346 | % }
347 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
348 | % 页眉
349 | \newcommand{\setheader}{
350 | \pagestyle{fancy}
351 | \fancyhf{}
352 | \fancyhead[C]{\songti \zihao{-5} 深圳技术大学本科毕业论文— \titlecnSingleLine }
353 | }
354 | % 摘要页码格式
355 | \newcommand{\setabstractfooter}{
356 | \setcounter{page}{1} % 重置页码编号
357 | \pagenumbering{Roman}
358 | \fancyfoot[C]{\zihao{-5} \thepage}
359 | }
360 | % 正文页码格式
361 | \newcommand{\setfooter}{
362 | \setcounter{page}{1} % 重置页码编号
363 | \pagenumbering{arabic}
364 | \fancyfoot[C]{\zihao{-5} 第 \thepage\ 页,共 \pageref{LastPage}\ 页}
365 | }
366 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
367 | % 4. 中文摘要
368 | % -----------------------------------------------%
369 | % 摘要】和【关键词】:【】内字符小四号楷体加粗,【】外字符五号楷体。以上内容一律单倍行距、段前段后 0.5 行、两端对齐排版。
370 |
371 | \newcommand*{\keywordscn}[1]{\gdef\@keywordscn{#1}} % 定义中文关键词
372 | \newcommand*{\categorycn}[1]{\gdef\@categorycn{#1}} % 定义中文分类
373 | \newenvironment{abstractcn} { % 定义中文摘要环境
374 |
375 | \linespread{1.5}
376 |
377 | \begin{center} \zihao{2} \bfseries \huawenzhongsong \@titlecn \end{center}
378 |
379 | \vspace{0.5cm}
380 |
381 | \noindent {\zihao{4} \bfseries \kaishu 【摘\quad 要】} % “摘要”两个字为四号楷体
382 | \zihao{-4}\kaishu \noindent % 内容为小四号楷体
383 | }
384 | % 显示中文关键词和分类号
385 | {
386 | \begin{flushleft}
387 | \noindent
388 | {\zihao{4} \bfseries \kaishu 【关键词】} % “关键词”三个字为四号楷体
389 | {\zihao{-4} \kaishu \@keywordscn} \par % 内容为小四号楷体
390 | \end{flushleft}
391 | }
392 |
393 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
394 | % 4. 英文摘要
395 | % -----------------------------------------------%
396 | % 英文摘要格式和内容与中文摘要相对应,另起一页,具体见样例9。居中打印论文英文题名(三号Times New Roman字体),换行顶格编排“Abstract”及英文摘要内容(四号Times New Roman字体),摘要内容每段开头留四个字符空格。摘要内容后下换行顶格编排“Keywords”和“Classification”。
397 | % 定义英文摘要,字体全部为timesnewroman
398 | \newcommand*{\keywordsen}[1]{\gdef\@keywordsen{#1}} % 英文关键词
399 | \newcommand*{\categoryen}[1]{\gdef\@categoryen{#1}} % 中文分类
400 | \newenvironment{abstracten} { % 新建英文摘要环境
401 | \linespread{1.5}
402 |
403 | \begin{center} \zihao{2} \bfseries \@titleen \end{center}
404 |
405 | \vspace{0.5cm}
406 |
407 | \noindent {\zihao{4} \bfseries 【Abstract】~} % 四号
408 | \zihao{-4} \noindent % 小四号
409 | }
410 | {
411 | \begin{flushleft}
412 | \noindent
413 | {\zihao{4} \bfseries 【Key words】~} %四号
414 | {\zihao{-4} \@keywordsen} \par % 小四号
415 | \end{flushleft}
416 | }
417 |
418 |
419 | % 5. 论文正文 %
420 | % -------------------------------------------------------%
421 | % 论文正文是主体,主体部分应从另页右页开始,每一章应另起页。一般由序号标题、文字叙述、图、表格和公式等五个部分构成。
422 | % 写作形式可因研究内容的性质不同而变化,一般可包括绪论(或综述)、理论分析、计算方法、实验装置和测试方法、实验结果分析和讨论、研究成果、结论及意义等。
423 | % 该部分由用户编写
424 | % 一级标题字体不大于小二号,黑体加粗;
425 | % 二级标题比一级标题小半号,黑体加粗;
426 | % 三级标题比上一级标题小半号,黑体加粗;
427 | % 正文内容小四号宋体。
428 | % 以上内容一律1.5倍行距、段前段后0.5行、两端对齐排版。
429 |
430 | % 图表等浮动环境设置 %
431 | % ----------------------------------------------------------%
432 | % 正文中出现的图表力求简明,图次和表次一律写成图 1,图 2…或表 1,表 2…,并尽可能随文排。
433 | % 默认情况下, \LaTeX{} 要求每页的文字至少占据 20%,否则该页就只单独放置一个浮动环境,
434 | % 而这通常不是我们想要的, 我们将这个要求降低到 5%.
435 | \renewcommand*{\textfraction}{0.05}
436 | % 有时如果多个浮动环境连续放在一起, \LaTeX{}
437 | % 会将它们分在几个不同页,即使它们可在同一页放
438 | % 得下. 我们可以通过修改 |\topfraction| 和 |\bottomfraction| 分别设置顶端和底端的浮
439 | % 动环境的最大比例.
440 | \renewcommand*{\topfraction}{0.9}
441 | \renewcommand*{\bottomfraction}{0.8}
442 | % 有时\LaTeX{}会把一个浮动环境单独放在一页,
443 | % 我们要求这个环境至少要占据 85% 才能单独放在一页.
444 | % 注意: |\floatpagefraction| 的数值必须小于 |\topfraction|.
445 | \renewcommand*{\floatpagefraction}{0.85}
446 | % 关于图片 graphicx
447 | % 如果图片没有指定后缀, 依次按下列顺序搜索
448 | \DeclareGraphicsExtensions{.pdf,.eps,.jpg,.png,.tif}
449 | % 设置图表搜索路径, 可以给图表文件夹取如下名字
450 | \graphicspath{{figures/}{figure/}{pictures/}%
451 | {picture/}{pic/}{pics/}{image/}{images/}}
452 |
453 |
454 | % 插图格式
455 | % ------------------------------------------------------%
456 | % \captionsetup[subfigure]{labelfont=normalfont,textfont=normalfont,singlelinecheck=off,justification=raggedright}
457 | % singlelinecheck=off 表示即使caption只有一行, justification 也生效
458 | % justification=raggedright 使子图 caption 靠左对齐,而caption的上下位置由\caption标签的位置决定,以此实现了学校要求的子图标签在左上角显示。
459 | % 这部分功能由 subcaption 这个包实现,而这个包不能和 subfigure 同时使用,所以子图的写法也与 subfigure 包的不大一样。
460 | % \captionsetup[subfigure]{singlelinecheck=off,justification=raggedright} % 左对齐
461 | \captionsetup[subfigure]{singlelinecheck=off,justification=centering} % 居中
462 |
463 | % 图下方描述的字体
464 | \DeclareCaptionFont{song}{\songti}
465 | \DeclareCaptionFont{sfive}{\zihao{5}}
466 | % \renewcommand{\thefigure}{\arabic{section}-\arabic{figure}}
467 |
468 |
469 |
470 | \captionsetup[figure]{
471 | format=plain, % 标题从第二行开始是否缩进,plain无缩进,hang有缩进
472 | labelsep=quad, % 分隔符是一个空格
473 | font={song,sfive}, % 图的字体, 宋体小五
474 | position=bottom % position=bottom, 不代表标题放在下面, 标题仍放在你放\caption的位置.
475 | }
476 | % 表格格式
477 | % ------------------------------------------------------%
478 | % \renewcommand{\thetable}{\arabic{section}-\arabic{table}}
479 | % \renewcommand {\thetable} {\thesection-\arabic{table}}
480 | \captionsetup[table]{
481 | format=plain, % 标题从第二行开始是否缩进,plain无缩进,hang有缩进
482 | labelsep=quad, % 分隔符是一个空格
483 | font={song,sfive}, % 图的字体, 宋体小五
484 | position=top
485 | }
486 | % 算法
487 | % ------------------------------------------------------%
488 | \floatname{algorithm}{算法}
489 | % \renewcommand{\thealgorithm}{\arabic{section}-\arabic{algorithm}}
490 | % \renewcommand {\thealgorithm} {\thesection-\arabic{algorithm}}
491 | \captionsetup[algorithm]{
492 | format=plain, % 标题从第二行开始是否缩进,plain无缩进,hang有缩进
493 | labelsep=quad, % 分隔符是一个空格
494 | font={song,sfive}, % 图的字体, 宋体小五
495 | position=top
496 | }
497 |
498 | % 列表环境设置 %
499 | % ------------------------------------------------------------------%
500 | % \RequirePackage{listings}
501 | \setlist{%
502 | topsep=0.3em, % 列表顶端的垂直空白
503 | partopsep=0pt, % 列表环境前面紧接着一个空白行时其顶端的额外垂直空白
504 | itemsep=0ex plus 0.1ex, % 列表项之间的额外垂直空白
505 | parsep=0pt, % 列表项内的段落之间的垂直空白
506 | leftmargin=1.5em, % 环境的左边界和列表之间的水平距离
507 | rightmargin=0em, % 环境的右边界和列表之间的水平距离
508 | labelsep=0.5em, % 包含标签的盒子与列表项的第一行文本之间的间隔
509 | labelwidth=2em % 包含标签的盒子的正常宽度;若实际宽度更宽,则使用实际宽度。
510 | }
511 |
512 | % 表格 %
513 | % ------------------------------------------------------%
514 | % 修改tabular 环境, 设置表格中的行间距为正文行间距.
515 | \let\sztu@oldtabular\tabular
516 | \let\sztu@endoldtabular\endtabular
517 | \renewenvironment{tabular} {
518 | \bgroup
519 | \renewcommand{\arraystretch}{1.38}
520 | \sztu@oldtabular
521 | } {
522 | \sztu@endoldtabular\egroup
523 | }
524 |
525 | % 表格字号应比正文小,一般五号/10.5pt,但是暂时没法再cls里设置(不然会影响到封面等tabular环境)
526 | % 所以目前只好在主文件里局部\AtBeginEnvironment
527 |
528 | % 数学环境, 定理等设置 %
529 | % -------------------------------------------------------%
530 | % 数学定理相关的常量
531 | \newcommand*{\sztu@cap@definition}{定义}
532 | \newcommand*{\sztu@cap@theorem}{定理}
533 | \newcommand*{\sztu@cap@lemma}{引理}
534 | \newcommand*{\sztu@cap@corollary}{推论}
535 | \newcommand*{\sztu@cap@assumption}{假设}
536 | \newcommand*{\sztu@cap@conjecture}{猜想}
537 | \newcommand*{\sztu@cap@axiom}{公理}
538 | \newcommand*{\sztu@cap@principle}{定律}
539 | \newcommand*{\sztu@cap@problem}{问题}
540 | \newcommand*{\sztu@cap@example}{例}
541 | \newcommand*{\sztu@cap@proof}{证明}
542 | \newcommand*{\sztu@cap@solution}{解}
543 |
544 | \newtheorem{definition}{\sztu@cap@definition}
545 | \newtheorem{theorem}{\sztu@cap@theorem}
546 | \newtheorem{lemma}{\sztu@cap@lemma}
547 | \newtheorem{corollary}{\sztu@cap@corollary}
548 | \newtheorem{assumption}{\sztu@cap@assumption}
549 | \newtheorem{conjecture}{\sztu@cap@conjecture}
550 | \newtheorem{axiom}{\sztu@cap@axiom}
551 | \newtheorem{principle}{\sztu@cap@principle}
552 | \newtheorem{problem}{\sztu@cap@problem}
553 | \newtheorem{example}{\sztu@cap@example}
554 | \newtheorem*{proof}{\it{\sztu@cap@proof}}
555 | \newtheorem{solution}{\sztu@cap@solution}
556 |
557 |
558 |
559 | % 编号分章节。如需要连续编号,注释\makeatletter下面对应内容即可。
560 | % \renewcommand{\theequation}{\arabic{section}-\arabic{equation}}
561 |
562 | \makeatletter
563 | \@addtoreset{figure}{section}
564 | \@addtoreset{table}{section}
565 | \@addtoreset{equation}{section}
566 | \makeatother
567 |
568 | % 6. 参考文献 %
569 | % ------------------------------------------------------%
570 | % 【】标题五号楷体顶格加粗,内容小五号楷体顶格。单倍行距、段前段后 0.5 行、两端对齐排版。
571 | \newcommand{\setreference}
572 | {
573 | \setlength{\bibsep}{2ex} % 参考文献条目间距
574 | % 临时修改section标题样式
575 | \renewcommand{\refname}{参考文献}
576 | \titleformat{\section}{\centering \bfseries \zihao{-2} \heiti}{\thesection}{1em}{}
577 | % \addcontentsline{toc}{section}{参考文献}
578 | % { \zihao{-2} \bfseries \heiti 参考文献 \par}
579 | \phantomsection % 使得hyperref目录能够跳转到正确的位置
580 | \addcontentsline{toc}{section}{参考文献} % 由于参考文献不是section,这句把参考文献加入目录
581 | \zihao{5} \kaishu
582 | \bibliographystyle{gbt7714-numerical}
583 | \bibliography{thesis-references}
584 | \newpage
585 |
586 | % % 改回section样式
587 | % \titleformat{\section}{\zihao{3} \bfseries \heiti}{\thesection}{1em}{}
588 | }
589 | % 7. 致谢 %
590 | % 作者对给予指导、各类资助和协助完成研究工作以及提供各种对论文工作有利条件的单位及个人表示感谢。
591 | % “致谢”二字居中,小四号黑体加粗
592 | % 内容五号宋体,单倍行距、段前段后0.5行
593 |
594 | \newenvironment{thankscontent} { % 定义致谢环境
595 |
596 | \linespread{1.5}
597 |
598 | \vspace{0.5cm}
599 | \phantomsection % 使得hyperref目录能够跳转到正确的位置
600 | \addcontentsline{toc}{section}{致谢}
601 | {\centering \zihao{-2} \bfseries \heiti 致谢 \par}
602 | \vspace{0.5cm}
603 | \zihao{-4} \songti
604 | }
605 |
606 | % 9. 附录(必要时)%
607 | % -------------------------------------------------------%
608 | % TODO %
609 | % 附录中主要列入正文内不便列出的过分冗长的公式推导,供查读方便所需的辅助性数学工具或表格、重复性数据图表、计算程序及说明等。附录依次为附录1,附录2……等,“附录X”三字居中(三号黑体)。附录中的图表公式另编排序号,与正文分开。
610 |
611 |
612 | % 篇眉和页码要求 %
613 | % ---------------------------------------------------------%
614 | % 篇眉宋体小五号居中,深圳技术大学本科毕业论文—论文标题
615 |
616 | % \pagestyle{fancy}
617 | % \fancyhf{} % 清空原有格式
618 | % \fancyhf[RH]{\small\leftmark} % 设置所有(奇数和偶数)右侧页眉
619 | % \fancyhf[LH]{深圳技术大学博士学位论文} % 设置所有(奇数和偶数)左侧页眉
620 | % \fancyhf[CF]{\thepage} % 所有(奇数和偶数)中间页脚
621 |
622 |
623 | \endinput
624 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/images/cover.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
557 |
--------------------------------------------------------------------------------
/gbt7714-numerical.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: 2020/12/17 v2.1
12 | %% -------------------------------------------------------------------
13 | %% Copyright (C) 2016-2020 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 2005/12/01 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 | sentence.case.title
33 | link.title
34 | title.in.journal
35 | show.mark
36 | space.before.mark
37 | show.medium.type
38 | slash.for.extraction
39 | in.booktitle
40 | short.journal
41 | italic.journal
42 | bold.journal.volume
43 | show.missing.address.publisher
44 | space.before.pages
45 | only.start.page
46 | show.urldate
47 | show.url
48 | show.doi
49 | show.preprint
50 | show.note
51 | show.english.translation
52 | }
53 |
54 | FUNCTION {load.config}
55 | {
56 | #2 'citation.et.al.min :=
57 | #1 'citation.et.al.use.first :=
58 | #4 'bibliography.et.al.min :=
59 | #3 'bibliography.et.al.use.first :=
60 | #1 'uppercase.name :=
61 | #0 'terms.in.macro :=
62 | #0 'year.after.author :=
63 | #1 'period.after.author :=
64 | #1 'sentence.case.title :=
65 | #0 'link.title :=
66 | #1 'title.in.journal :=
67 | #1 'show.mark :=
68 | #0 'space.before.mark :=
69 | #1 'show.medium.type :=
70 | #1 'slash.for.extraction :=
71 | #0 'in.booktitle :=
72 | #0 'short.journal :=
73 | #0 'italic.journal :=
74 | #0 'bold.journal.volume :=
75 | #0 'show.missing.address.publisher :=
76 | #1 'space.before.pages :=
77 | #0 'only.start.page :=
78 | #1 'show.urldate :=
79 | #1 'show.url :=
80 | #1 'show.doi :=
81 | #0 'show.preprint :=
82 | #0 'show.note :=
83 | #0 'show.english.translation :=
84 | }
85 |
86 | ENTRY
87 | { address
88 | archivePrefix
89 | author
90 | booktitle
91 | date
92 | doi
93 | edition
94 | editor
95 | eprint
96 | eprinttype
97 | howpublished
98 | institution
99 | journal
100 | journaltitle
101 | key
102 | langid
103 | language
104 | location
105 | mark
106 | medium
107 | note
108 | number
109 | organization
110 | pages
111 | publisher
112 | school
113 | series
114 | shortjournal
115 | title
116 | translation
117 | translator
118 | url
119 | urldate
120 | volume
121 | year
122 | }
123 | { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
124 | { label extra.label sort.label short.label short.list entry.mark entry.url }
125 |
126 | INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
127 |
128 | INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
129 |
130 | INTEGERS { charptr len }
131 |
132 | FUNCTION {init.state.consts}
133 | { #0 'before.all :=
134 | #1 'mid.sentence :=
135 | #2 'after.sentence :=
136 | #3 'after.block :=
137 | #4 'after.slash :=
138 | #3 'lang.zh :=
139 | #4 'lang.ja :=
140 | #1 'lang.en :=
141 | #2 'lang.ru :=
142 | #0 'lang.other :=
143 | }
144 |
145 | FUNCTION {bbl.anonymous}
146 | { entry.lang lang.zh =
147 | { "佚名" }
148 | { "Anon" }
149 | if$
150 | }
151 |
152 | FUNCTION {bbl.space}
153 | { entry.lang lang.zh =
154 | { "\ " }
155 | { " " }
156 | if$
157 | }
158 |
159 | FUNCTION {bbl.and}
160 | { "" }
161 |
162 | FUNCTION {bbl.et.al}
163 | { entry.lang lang.zh =
164 | { "等" }
165 | { entry.lang lang.ja =
166 | { "他" }
167 | { entry.lang lang.ru =
168 | { "идр" }
169 | { "et~al." }
170 | if$
171 | }
172 | if$
173 | }
174 | if$
175 | }
176 |
177 | FUNCTION {citation.and}
178 | { terms.in.macro
179 | { "{\biband}" }
180 | 'bbl.and
181 | if$
182 | }
183 |
184 | FUNCTION {citation.et.al}
185 | { terms.in.macro
186 | { "{\bibetal}" }
187 | 'bbl.et.al
188 | if$
189 | }
190 |
191 | FUNCTION {bbl.colon} { ": " }
192 |
193 | FUNCTION {bbl.pages.colon}
194 | { space.before.pages
195 | { ": " }
196 | { ":\allowbreak " }
197 | if$
198 | }
199 |
200 | FUNCTION {bbl.wide.space} { "\quad " }
201 |
202 | FUNCTION {bbl.slash} { "//\allowbreak " }
203 |
204 | FUNCTION {bbl.sine.loco}
205 | { entry.lang lang.zh =
206 | { "[出版地不详]" }
207 | { "[S.l.]" }
208 | if$
209 | }
210 |
211 | FUNCTION {bbl.sine.nomine}
212 | { entry.lang lang.zh =
213 | { "[出版者不详]" }
214 | { "[s.n.]" }
215 | if$
216 | }
217 |
218 | FUNCTION {bbl.sine.loco.sine.nomine}
219 | { entry.lang lang.zh =
220 | { "[出版地不详: 出版者不详]" }
221 | { "[S.l.: s.n.]" }
222 | if$
223 | }
224 |
225 | FUNCTION {not}
226 | { { #0 }
227 | { #1 }
228 | if$
229 | }
230 |
231 | FUNCTION {and}
232 | { 'skip$
233 | { pop$ #0 }
234 | if$
235 | }
236 |
237 | FUNCTION {or}
238 | { { pop$ #1 }
239 | 'skip$
240 | if$
241 | }
242 |
243 | STRINGS { s t }
244 |
245 | FUNCTION {output.nonnull}
246 | { 's :=
247 | output.state mid.sentence =
248 | { ", " * write$ }
249 | { output.state after.block =
250 | { add.period$ write$
251 | newline$
252 | "\newblock " write$
253 | }
254 | { output.state before.all =
255 | 'write$
256 | { output.state after.slash =
257 | { bbl.slash * write$
258 | newline$
259 | }
260 | { add.period$ " " * write$ }
261 | if$
262 | }
263 | if$
264 | }
265 | if$
266 | mid.sentence 'output.state :=
267 | }
268 | if$
269 | s
270 | }
271 |
272 | FUNCTION {output}
273 | { duplicate$ empty$
274 | 'pop$
275 | 'output.nonnull
276 | if$
277 | }
278 |
279 | FUNCTION {output.after}
280 | { 't :=
281 | duplicate$ empty$
282 | 'pop$
283 | { 's :=
284 | output.state mid.sentence =
285 | { t * write$ }
286 | { output.state after.block =
287 | { add.period$ write$
288 | newline$
289 | "\newblock " write$
290 | }
291 | { output.state before.all =
292 | 'write$
293 | { output.state after.slash =
294 | { bbl.slash * write$ }
295 | { add.period$ " " * write$ }
296 | if$
297 | }
298 | if$
299 | }
300 | if$
301 | mid.sentence 'output.state :=
302 | }
303 | if$
304 | s
305 | }
306 | if$
307 | }
308 |
309 | FUNCTION {output.check}
310 | { 't :=
311 | duplicate$ empty$
312 | { pop$ "empty " t * " in " * cite$ * warning$ }
313 | 'output.nonnull
314 | if$
315 | }
316 |
317 | FUNCTION {fin.entry}
318 | { add.period$
319 | write$
320 | show.english.translation entry.lang lang.zh = and
321 | { ")"
322 | write$
323 | }
324 | 'skip$
325 | if$
326 | newline$
327 | }
328 |
329 | FUNCTION {new.block}
330 | { output.state before.all =
331 | 'skip$
332 | { output.state after.slash =
333 | 'skip$
334 | { after.block 'output.state := }
335 | if$
336 | }
337 | if$
338 | }
339 |
340 | FUNCTION {new.sentence}
341 | { output.state after.block =
342 | 'skip$
343 | { output.state before.all =
344 | 'skip$
345 | { output.state after.slash =
346 | 'skip$
347 | { after.sentence 'output.state := }
348 | if$
349 | }
350 | if$
351 | }
352 | if$
353 | }
354 |
355 | FUNCTION {new.slash}
356 | { output.state before.all =
357 | 'skip$
358 | { slash.for.extraction
359 | { after.slash 'output.state := }
360 | { after.block 'output.state := }
361 | if$
362 | }
363 | if$
364 | }
365 |
366 | FUNCTION {new.block.checka}
367 | { empty$
368 | 'skip$
369 | 'new.block
370 | if$
371 | }
372 |
373 | FUNCTION {new.block.checkb}
374 | { empty$
375 | swap$ empty$
376 | and
377 | 'skip$
378 | 'new.block
379 | if$
380 | }
381 |
382 | FUNCTION {new.sentence.checka}
383 | { empty$
384 | 'skip$
385 | 'new.sentence
386 | if$
387 | }
388 |
389 | FUNCTION {new.sentence.checkb}
390 | { empty$
391 | swap$ empty$
392 | and
393 | 'skip$
394 | 'new.sentence
395 | if$
396 | }
397 |
398 | FUNCTION {field.or.null}
399 | { duplicate$ empty$
400 | { pop$ "" }
401 | 'skip$
402 | if$
403 | }
404 |
405 | FUNCTION {italicize}
406 | { duplicate$ empty$
407 | { pop$ "" }
408 | { "\textit{" swap$ * "}" * }
409 | if$
410 | }
411 |
412 | INTEGERS { byte second.byte }
413 |
414 | INTEGERS { char.lang tmp.lang }
415 |
416 | STRINGS { tmp.str }
417 |
418 | FUNCTION {get.str.lang}
419 | { 'tmp.str :=
420 | lang.other 'tmp.lang :=
421 | #1 'charptr :=
422 | tmp.str text.length$ #1 + 'len :=
423 | { charptr len < }
424 | { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
425 | byte #128 <
426 | { charptr #1 + 'charptr :=
427 | byte #64 > byte #91 < and byte #96 > byte #123 < and or
428 | { lang.en 'char.lang := }
429 | { lang.other 'char.lang := }
430 | if$
431 | }
432 | { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
433 | byte #224 <
434 | { charptr #2 + 'charptr :=
435 | byte #207 > byte #212 < and
436 | byte #212 = second.byte #176 < and or
437 | { lang.ru 'char.lang := }
438 | { lang.other 'char.lang := }
439 | if$
440 | }
441 | { byte #240 <
442 | { charptr #3 + 'charptr :=
443 | byte #227 > byte #234 < and
444 | { lang.zh 'char.lang := }
445 | { byte #227 =
446 | { second.byte #143 >
447 | { lang.zh 'char.lang := }
448 | { second.byte #128 > second.byte #132 < and
449 | { lang.ja 'char.lang := }
450 | { lang.other 'char.lang := }
451 | if$
452 | }
453 | if$
454 | }
455 | { byte #239 =
456 | second.byte #163 > second.byte #172 < and and
457 | { lang.zh 'char.lang := }
458 | { lang.other 'char.lang := }
459 | if$
460 | }
461 | if$
462 | }
463 | if$
464 | }
465 | { charptr #4 + 'charptr :=
466 | byte #240 = second.byte #159 > and
467 | { lang.zh 'char.lang := }
468 | { lang.other 'char.lang := }
469 | if$
470 | }
471 | if$
472 | }
473 | if$
474 | }
475 | if$
476 | char.lang tmp.lang >
477 | { char.lang 'tmp.lang := }
478 | 'skip$
479 | if$
480 | }
481 | while$
482 | tmp.lang
483 | }
484 |
485 | FUNCTION {check.entry.lang}
486 | { author field.or.null
487 | title field.or.null *
488 | get.str.lang
489 | }
490 |
491 | STRINGS { entry.langid }
492 |
493 | FUNCTION {set.entry.lang}
494 | { "" 'entry.langid :=
495 | language empty$ not
496 | { language 'entry.langid := }
497 | 'skip$
498 | if$
499 | langid empty$ not
500 | { langid 'entry.langid := }
501 | 'skip$
502 | if$
503 | entry.langid empty$
504 | { check.entry.lang }
505 | { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or
506 | { lang.en }
507 | { entry.langid "chinese" =
508 | { lang.zh }
509 | { entry.langid "japanese" =
510 | { lang.ja }
511 | { entry.langid "russian" =
512 | { lang.ru }
513 | { check.entry.lang }
514 | if$
515 | }
516 | if$
517 | }
518 | if$
519 | }
520 | if$
521 | }
522 | if$
523 | 'entry.lang :=
524 | }
525 |
526 | FUNCTION {set.entry.numbered}
527 | { type$ "patent" =
528 | type$ "standard" = or
529 | type$ "techreport" = or
530 | { #1 'entry.numbered := }
531 | { #0 'entry.numbered := }
532 | if$
533 | }
534 |
535 | INTEGERS { nameptr namesleft numnames name.lang }
536 |
537 | FUNCTION {format.name}
538 | { "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
539 | t "others" =
540 | { bbl.et.al }
541 | { t get.str.lang 'name.lang :=
542 | name.lang lang.en =
543 | { t #1 "{vv~}{ll}{~f{~}}" format.name$
544 | uppercase.name
545 | { "u" change.case$ }
546 | 'skip$
547 | if$
548 | t #1 "{, jj}" format.name$ *
549 | }
550 | { t #1 "{ll}{ff}" format.name$ }
551 | if$
552 | }
553 | if$
554 | }
555 |
556 | FUNCTION {format.names}
557 | { 's :=
558 | #1 'nameptr :=
559 | s num.names$ 'numnames :=
560 | ""
561 | numnames 'namesleft :=
562 | { namesleft #0 > }
563 | { s nameptr format.name bbl.et.al =
564 | numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or
565 | { ", " *
566 | bbl.et.al *
567 | #1 'namesleft :=
568 | }
569 | { nameptr #1 >
570 | { namesleft #1 = bbl.and "" = not and
571 | { bbl.and * }
572 | { ", " * }
573 | if$
574 | }
575 | 'skip$
576 | if$
577 | s nameptr format.name *
578 | }
579 | if$
580 | nameptr #1 + 'nameptr :=
581 | namesleft #1 - 'namesleft :=
582 | }
583 | while$
584 | }
585 |
586 | FUNCTION {format.key}
587 | { empty$
588 | { key field.or.null }
589 | { "" }
590 | if$
591 | }
592 |
593 | FUNCTION {format.authors}
594 | { author empty$ not
595 | { author format.names }
596 | { "empty author in " cite$ * warning$
597 | ""
598 | }
599 | if$
600 | }
601 |
602 | FUNCTION {format.editors}
603 | { editor empty$
604 | { "" }
605 | { editor format.names }
606 | if$
607 | }
608 |
609 | FUNCTION {format.translators}
610 | { translator empty$
611 | { "" }
612 | { translator format.names
613 | entry.lang lang.zh =
614 | { translator num.names$ #3 >
615 | { "译" * }
616 | { ", 译" * }
617 | if$
618 | }
619 | 'skip$
620 | if$
621 | }
622 | if$
623 | }
624 |
625 | FUNCTION {format.full.names}
626 | {'s :=
627 | #1 'nameptr :=
628 | s num.names$ 'numnames :=
629 | numnames 'namesleft :=
630 | { namesleft #0 > }
631 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
632 | t get.str.lang 'name.lang :=
633 | name.lang lang.en =
634 | { t #1 "{vv~}{ll}" format.name$ 't := }
635 | { t #1 "{ll}{ff}" format.name$ 't := }
636 | if$
637 | nameptr #1 >
638 | {
639 | namesleft #1 >
640 | { ", " * t * }
641 | {
642 | numnames #2 >
643 | { "," * }
644 | 'skip$
645 | if$
646 | t "others" =
647 | { " et~al." * }
648 | { " and " * t * }
649 | if$
650 | }
651 | if$
652 | }
653 | 't
654 | if$
655 | nameptr #1 + 'nameptr :=
656 | namesleft #1 - 'namesleft :=
657 | }
658 | while$
659 | }
660 |
661 | FUNCTION {author.editor.full}
662 | { author empty$
663 | { editor empty$
664 | { "" }
665 | { editor format.full.names }
666 | if$
667 | }
668 | { author format.full.names }
669 | if$
670 | }
671 |
672 | FUNCTION {author.full}
673 | { author empty$
674 | { "" }
675 | { author format.full.names }
676 | if$
677 | }
678 |
679 | FUNCTION {editor.full}
680 | { editor empty$
681 | { "" }
682 | { editor format.full.names }
683 | if$
684 | }
685 |
686 | FUNCTION {make.full.names}
687 | { type$ "book" =
688 | type$ "inbook" =
689 | or
690 | 'author.editor.full
691 | { type$ "collection" =
692 | type$ "proceedings" =
693 | or
694 | 'editor.full
695 | 'author.full
696 | if$
697 | }
698 | if$
699 | }
700 |
701 | FUNCTION {output.bibitem}
702 | { newline$
703 | "\bibitem[" write$
704 | label ")" *
705 | make.full.names duplicate$ short.list =
706 | { pop$ }
707 | { * }
708 | if$
709 | 's :=
710 | s text.length$ 'charptr :=
711 | { charptr #0 > s charptr #1 substring$ "[" = not and }
712 | { charptr #1 - 'charptr := }
713 | while$
714 | charptr #0 >
715 | { "{" s * "}" * }
716 | { s }
717 | if$
718 | "]{" * write$
719 | cite$ write$
720 | "}" write$
721 | newline$
722 | ""
723 | before.all 'output.state :=
724 | }
725 |
726 | FUNCTION {change.sentence.case}
727 | { entry.lang lang.en =
728 | { "t" change.case$ }
729 | 'skip$
730 | if$
731 | }
732 |
733 | FUNCTION {add.link}
734 | { url empty$ not
735 | { "\href{" url * "}{" * swap$ * "}" * }
736 | { doi empty$ not
737 | { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
738 | 'skip$
739 | if$
740 | }
741 | if$
742 | }
743 |
744 | FUNCTION {format.title}
745 | { title empty$
746 | { "" }
747 | { title
748 | sentence.case.title
749 | 'change.sentence.case
750 | 'skip$
751 | if$
752 | entry.numbered number empty$ not and
753 | { bbl.colon * number * }
754 | 'skip$
755 | if$
756 | link.title
757 | 'add.link
758 | 'skip$
759 | if$
760 | }
761 | if$
762 | }
763 |
764 | FUNCTION {tie.or.space.connect}
765 | { duplicate$ text.length$ #3 <
766 | { "~" }
767 | { " " }
768 | if$
769 | swap$ * *
770 | }
771 |
772 | FUNCTION {either.or.check}
773 | { empty$
774 | 'pop$
775 | { "can't use both " swap$ * " fields in " * cite$ * warning$ }
776 | if$
777 | }
778 |
779 | FUNCTION {is.digit}
780 | { duplicate$ empty$
781 | { pop$ #0 }
782 | { chr.to.int$
783 | duplicate$ "0" chr.to.int$ <
784 | { pop$ #0 }
785 | { "9" chr.to.int$ >
786 | { #0 }
787 | { #1 }
788 | if$
789 | }
790 | if$
791 | }
792 | if$
793 | }
794 |
795 | FUNCTION {is.number}
796 | { 's :=
797 | s empty$
798 | { #0 }
799 | { s text.length$ 'charptr :=
800 | { charptr #0 >
801 | s charptr #1 substring$ is.digit
802 | and
803 | }
804 | { charptr #1 - 'charptr := }
805 | while$
806 | charptr not
807 | }
808 | if$
809 | }
810 |
811 | FUNCTION {format.volume}
812 | { volume empty$ not
813 | { volume is.number
814 | { entry.lang lang.zh =
815 | { "第 " volume * " 卷" * }
816 | { "volume" volume tie.or.space.connect }
817 | if$
818 | }
819 | { volume }
820 | if$
821 | }
822 | { "" }
823 | if$
824 | }
825 |
826 | FUNCTION {format.number}
827 | { number empty$ not
828 | { number is.number
829 | { entry.lang lang.zh =
830 | { "第 " number * " 册" * }
831 | { "number" number tie.or.space.connect }
832 | if$
833 | }
834 | { number }
835 | if$
836 | }
837 | { "" }
838 | if$
839 | }
840 |
841 | FUNCTION {format.volume.number}
842 | { volume empty$ not
843 | { format.volume }
844 | { format.number }
845 | if$
846 | }
847 |
848 | FUNCTION {format.title.vol.num}
849 | { title
850 | sentence.case.title
851 | 'change.sentence.case
852 | 'skip$
853 | if$
854 | entry.numbered
855 | { number empty$ not
856 | { bbl.colon * number * }
857 | 'skip$
858 | if$
859 | }
860 | { format.volume.number 's :=
861 | s empty$ not
862 | { bbl.colon * s * }
863 | 'skip$
864 | if$
865 | }
866 | if$
867 | }
868 |
869 | FUNCTION {format.series.vol.num.title}
870 | { format.volume.number 's :=
871 | series empty$ not
872 | { series
873 | sentence.case.title
874 | 'change.sentence.case
875 | 'skip$
876 | if$
877 | entry.numbered
878 | { bbl.wide.space * }
879 | { bbl.colon *
880 | s empty$ not
881 | { s * bbl.wide.space * }
882 | 'skip$
883 | if$
884 | }
885 | if$
886 | title *
887 | sentence.case.title
888 | 'change.sentence.case
889 | 'skip$
890 | if$
891 | entry.numbered number empty$ not and
892 | { bbl.colon * number * }
893 | 'skip$
894 | if$
895 | }
896 | { format.title.vol.num }
897 | if$
898 | link.title
899 | 'add.link
900 | 'skip$
901 | if$
902 | }
903 |
904 | FUNCTION {format.booktitle.vol.num}
905 | { booktitle
906 | entry.numbered
907 | 'skip$
908 | { format.volume.number 's :=
909 | s empty$ not
910 | { bbl.colon * s * }
911 | 'skip$
912 | if$
913 | }
914 | if$
915 | }
916 |
917 | FUNCTION {format.series.vol.num.booktitle}
918 | { format.volume.number 's :=
919 | series empty$ not
920 | { series bbl.colon *
921 | entry.numbered not s empty$ not and
922 | { s * bbl.wide.space * }
923 | 'skip$
924 | if$
925 | booktitle *
926 | }
927 | { format.booktitle.vol.num }
928 | if$
929 | in.booktitle
930 | { duplicate$ empty$ not entry.lang lang.en = and
931 | { "In: " swap$ * }
932 | 'skip$
933 | if$
934 | }
935 | 'skip$
936 | if$
937 | }
938 |
939 | FUNCTION {remove.period}
940 | { 't :=
941 | "" 's :=
942 | { t empty$ not }
943 | { t #1 #1 substring$ 'tmp.str :=
944 | tmp.str "." = not
945 | { s tmp.str * 's := }
946 | 'skip$
947 | if$
948 | t #2 global.max$ substring$ 't :=
949 | }
950 | while$
951 | s
952 | }
953 |
954 | FUNCTION {abbreviate}
955 | { remove.period
956 | 't :=
957 | t "l" change.case$ 's :=
958 | ""
959 | s "physical review letters" =
960 | { "Phys Rev Lett" }
961 | 'skip$
962 | if$
963 | 's :=
964 | s empty$
965 | { t }
966 | { pop$ s }
967 | if$
968 | }
969 |
970 | FUNCTION {format.journal}
971 | { ""
972 | short.journal
973 | { shortjournal empty$ not
974 | { shortjournal * }
975 | { journal empty$ not
976 | { journal * abbreviate }
977 | { journaltitle empty$ not
978 | { journaltitle * abbreviate }
979 | 'skip$
980 | if$
981 | }
982 | if$
983 | }
984 | if$
985 | }
986 | { journal empty$ not
987 | { journal * }
988 | { journaltitle empty$ not
989 | { journaltitle * }
990 | 'skip$
991 | if$
992 | }
993 | if$
994 | }
995 | if$
996 | duplicate$ empty$ not
997 | { italic.journal entry.lang lang.en = and
998 | 'italicize
999 | 'skip$
1000 | if$
1001 | }
1002 | 'skip$
1003 | if$
1004 | }
1005 |
1006 | FUNCTION {set.entry.mark}
1007 | { entry.mark empty$ not
1008 | 'pop$
1009 | { mark empty$ not
1010 | { pop$ mark 'entry.mark := }
1011 | { 'entry.mark := }
1012 | if$
1013 | }
1014 | if$
1015 | }
1016 |
1017 | FUNCTION {format.mark}
1018 | { show.mark
1019 | { entry.mark
1020 | show.medium.type
1021 | { medium empty$ not
1022 | { "/" * medium * }
1023 | { entry.is.electronic
1024 | { "/OL" * }
1025 | 'skip$
1026 | if$
1027 | }
1028 | if$
1029 | }
1030 | 'skip$
1031 | if$
1032 | 'entry.mark :=
1033 | space.before.mark
1034 | { " " }
1035 | { "\allowbreak" }
1036 | if$
1037 | "[" * entry.mark * "]" *
1038 | }
1039 | { "" }
1040 | if$
1041 | }
1042 |
1043 | FUNCTION {num.to.ordinal}
1044 | { duplicate$ text.length$ 'charptr :=
1045 | duplicate$ charptr #1 substring$ 's :=
1046 | s "1" =
1047 | { "st" * }
1048 | { s "2" =
1049 | { "nd" * }
1050 | { s "3" =
1051 | { "rd" * }
1052 | { "th" * }
1053 | if$
1054 | }
1055 | if$
1056 | }
1057 | if$
1058 | }
1059 |
1060 | FUNCTION {format.edition}
1061 | { edition empty$
1062 | { "" }
1063 | { edition is.number
1064 | { entry.lang lang.zh =
1065 | { edition " 版" * }
1066 | { edition num.to.ordinal " ed." * }
1067 | if$
1068 | }
1069 | { entry.lang lang.en =
1070 | { edition change.sentence.case 's :=
1071 | s "Revised" = s "Revised edition" = or
1072 | { "Rev. ed." }
1073 | { s " ed." *}
1074 | if$
1075 | }
1076 | { edition }
1077 | if$
1078 | }
1079 | if$
1080 | }
1081 | if$
1082 | }
1083 |
1084 | FUNCTION {format.publisher}
1085 | { publisher empty$ not
1086 | { publisher }
1087 | { school empty$ not
1088 | { school }
1089 | { organization empty$ not
1090 | { organization }
1091 | { institution empty$ not
1092 | { institution }
1093 | { "" }
1094 | if$
1095 | }
1096 | if$
1097 | }
1098 | if$
1099 | }
1100 | if$
1101 | }
1102 |
1103 | FUNCTION {format.address.publisher}
1104 | { address empty$ not
1105 | { address }
1106 | { location empty$ not
1107 | { location }
1108 | { "" }
1109 | if$
1110 | }
1111 | if$
1112 | duplicate$ empty$ not
1113 | { format.publisher empty$ not
1114 | { bbl.colon * format.publisher * }
1115 | { entry.is.electronic not show.missing.address.publisher and
1116 | { bbl.colon * bbl.sine.nomine * }
1117 | 'skip$
1118 | if$
1119 | }
1120 | if$
1121 | }
1122 | { pop$
1123 | entry.is.electronic not show.missing.address.publisher and
1124 | { format.publisher empty$ not
1125 | { bbl.sine.loco bbl.colon * format.publisher * }
1126 | { bbl.sine.loco.sine.nomine }
1127 | if$
1128 | }
1129 | { format.publisher empty$ not
1130 | { format.publisher }
1131 | { "" }
1132 | if$
1133 | }
1134 | if$
1135 | }
1136 | if$
1137 | }
1138 |
1139 | FUNCTION {extract.before.dash}
1140 | { duplicate$ empty$
1141 | { pop$ "" }
1142 | { 's :=
1143 | #1 'charptr :=
1144 | s text.length$ #1 + 'len :=
1145 | { charptr len <
1146 | s charptr #1 substring$ "-" = not
1147 | and
1148 | }
1149 | { charptr #1 + 'charptr := }
1150 | while$
1151 | s #1 charptr #1 - substring$
1152 | }
1153 | if$
1154 | }
1155 |
1156 | FUNCTION {extract.after.dash}
1157 | { duplicate$ empty$
1158 | { pop$ "" }
1159 | { 's :=
1160 | #1 'charptr :=
1161 | s text.length$ #1 + 'len :=
1162 | { charptr len <
1163 | s charptr #1 substring$ "-" = not
1164 | and
1165 | }
1166 | { charptr #1 + 'charptr := }
1167 | while$
1168 | { charptr len <
1169 | s charptr #1 substring$ "-" =
1170 | and
1171 | }
1172 | { charptr #1 + 'charptr := }
1173 | while$
1174 | s charptr global.max$ substring$
1175 | }
1176 | if$
1177 | }
1178 |
1179 | FUNCTION {contains.dash}
1180 | { duplicate$ empty$
1181 | { pop$ #0 }
1182 | { 's :=
1183 | { s empty$ not
1184 | s #1 #1 substring$ "-" = not
1185 | and
1186 | }
1187 | { s #2 global.max$ substring$ 's := }
1188 | while$
1189 | s empty$ not
1190 | }
1191 | if$
1192 | }
1193 |
1194 | FUNCTION {extract.before.slash}
1195 | { duplicate$ empty$
1196 | { pop$ "" }
1197 | { 's :=
1198 | #1 'charptr :=
1199 | s text.length$ #1 + 'len :=
1200 | { charptr len <
1201 | s charptr #1 substring$ "/" = not
1202 | and
1203 | }
1204 | { charptr #1 + 'charptr := }
1205 | while$
1206 | s #1 charptr #1 - substring$
1207 | }
1208 | if$
1209 | }
1210 |
1211 | FUNCTION {extract.after.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 | s charptr #1 substring$ "/" = not
1221 | and
1222 | }
1223 | { charptr #1 + 'charptr := }
1224 | while$
1225 | { charptr len <
1226 | s charptr #1 substring$ "-" =
1227 | s charptr #1 substring$ "/" =
1228 | or
1229 | and
1230 | }
1231 | { charptr #1 + 'charptr := }
1232 | while$
1233 | s charptr global.max$ substring$
1234 | }
1235 | if$
1236 | }
1237 |
1238 | FUNCTION {contains.slash}
1239 | { duplicate$ empty$
1240 | { pop$ #0 }
1241 | { 's :=
1242 | { s empty$ not
1243 | s #1 #1 substring$ "-" = not
1244 | and
1245 | s #1 #1 substring$ "/" = not
1246 | and
1247 | }
1248 | { s #2 global.max$ substring$ 's := }
1249 | while$
1250 | s empty$ not
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 | { type$ "patent" = type$ "newspaper" = or
1296 | date empty$ not and
1297 | { date }
1298 | { year field.or.null
1299 | extra.label *
1300 | }
1301 | if$
1302 | }
1303 |
1304 | FUNCTION {format.editdate}
1305 | { date empty$ not
1306 | { "\allowbreak(" date * ")" * }
1307 | { "" }
1308 | if$
1309 | }
1310 |
1311 | FUNCTION {format.urldate}
1312 | { urldate empty$ not
1313 | show.urldate show.url and is.pure.electronic or and
1314 | url empty$ not and
1315 | { "\allowbreak[" urldate * "]" * }
1316 | { "" }
1317 | if$
1318 | }
1319 |
1320 | FUNCTION {hyphenate}
1321 | { 't :=
1322 | ""
1323 | { t empty$ not }
1324 | { t #1 #1 substring$ "-" =
1325 | { "-" *
1326 | { t #1 #1 substring$ "-" = }
1327 | { t #2 global.max$ substring$ 't := }
1328 | while$
1329 | }
1330 | { t #1 #1 substring$ *
1331 | t #2 global.max$ substring$ 't :=
1332 | }
1333 | if$
1334 | }
1335 | while$
1336 | }
1337 |
1338 | FUNCTION {format.pages}
1339 | { pages empty$
1340 | { "" }
1341 | { pages hyphenate }
1342 | if$
1343 | }
1344 |
1345 | FUNCTION {format.extracted.pages}
1346 | { pages empty$
1347 | { "" }
1348 | { pages
1349 | only.start.page
1350 | 'extract.before.dash
1351 | 'hyphenate
1352 | if$
1353 | }
1354 | if$
1355 | }
1356 |
1357 | FUNCTION {format.journal.volume}
1358 | { volume empty$ not
1359 | { bold.journal.volume
1360 | { "\textbf{" volume * "}" * }
1361 | { volume }
1362 | if$
1363 | }
1364 | { "" }
1365 | if$
1366 | }
1367 |
1368 | FUNCTION {format.journal.number}
1369 | { number empty$ not
1370 | { "\allowbreak (" number * ")" * }
1371 | { "" }
1372 | if$
1373 | }
1374 |
1375 | FUNCTION {format.journal.pages}
1376 | { pages empty$
1377 | { "" }
1378 | { format.extracted.pages }
1379 | if$
1380 | }
1381 |
1382 | FUNCTION {format.periodical.year.volume.number}
1383 | { year empty$ not
1384 | { year extract.before.slash }
1385 | { "empty year in periodical " cite$ * warning$ }
1386 | if$
1387 | volume empty$ not
1388 | { ", " * volume extract.before.dash * }
1389 | 'skip$
1390 | if$
1391 | number empty$ not
1392 | { "\allowbreak (" * number extract.before.dash * ")" * }
1393 | 'skip$
1394 | if$
1395 | "--" *
1396 | year extract.after.slash empty$
1397 | volume extract.after.dash empty$ and
1398 | number extract.after.dash empty$ and not
1399 | { year extract.after.slash empty$ not
1400 | { year extract.after.slash * }
1401 | { year extract.before.slash * }
1402 | if$
1403 | volume empty$ not
1404 | { ", " * volume extract.after.dash * }
1405 | 'skip$
1406 | if$
1407 | number empty$ not
1408 | { "\allowbreak (" * number extract.after.dash * ")" * }
1409 | 'skip$
1410 | if$
1411 | }
1412 | 'skip$
1413 | if$
1414 | }
1415 |
1416 | FUNCTION {check.url}
1417 | { url empty$ not
1418 | { "\url{" url * "}" * 'entry.url :=
1419 | #1 'entry.is.electronic :=
1420 | }
1421 | { howpublished empty$ not
1422 | { howpublished #1 #5 substring$ "\url{" =
1423 | { howpublished 'entry.url :=
1424 | #1 'entry.is.electronic :=
1425 | }
1426 | 'skip$
1427 | if$
1428 | }
1429 | { note empty$ not
1430 | { note #1 #5 substring$ "\url{" =
1431 | { note 'entry.url :=
1432 | #1 'entry.is.electronic :=
1433 | }
1434 | 'skip$
1435 | if$
1436 | }
1437 | 'skip$
1438 | if$
1439 | }
1440 | if$
1441 | }
1442 | if$
1443 | }
1444 |
1445 | FUNCTION {format.url}
1446 | { entry.url
1447 | }
1448 |
1449 | FUNCTION {output.url}
1450 | { entry.url empty$ not
1451 | { new.block
1452 | entry.url output
1453 | }
1454 | 'skip$
1455 | if$
1456 | }
1457 |
1458 | FUNCTION {check.doi}
1459 | { doi empty$ not
1460 | { #1 'entry.is.electronic := }
1461 | 'skip$
1462 | if$
1463 | }
1464 |
1465 | FUNCTION {is.in.url}
1466 | { 's :=
1467 | s empty$
1468 | { #1 }
1469 | { entry.url empty$
1470 | { #0 }
1471 | { s text.length$ 'len :=
1472 | entry.url text.length$ 'charptr :=
1473 | { entry.url charptr len substring$ s = not
1474 | charptr #0 >
1475 | and
1476 | }
1477 | { charptr #1 - 'charptr := }
1478 | while$
1479 | charptr
1480 | }
1481 | if$
1482 | }
1483 | if$
1484 | }
1485 |
1486 | FUNCTION {format.doi}
1487 | { ""
1488 | doi empty$ not
1489 | { "" 's :=
1490 | doi 't :=
1491 | #0 'numnames :=
1492 | { t empty$ not}
1493 | { t #1 #1 substring$ 'tmp.str :=
1494 | tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
1495 | { t #2 #1 substring$ empty$
1496 | { s tmp.str * 's := }
1497 | 'skip$
1498 | if$
1499 | s empty$ s is.in.url or
1500 | 'skip$
1501 | { numnames #1 + 'numnames :=
1502 | numnames #1 >
1503 | { ", " * }
1504 | { "DOI: " * }
1505 | if$
1506 | "\doi{" s * "}" * *
1507 | }
1508 | if$
1509 | "" 's :=
1510 | }
1511 | { s tmp.str * 's := }
1512 | if$
1513 | t #2 global.max$ substring$ 't :=
1514 | }
1515 | while$
1516 | }
1517 | 'skip$
1518 | if$
1519 | }
1520 |
1521 | FUNCTION {output.doi}
1522 | { doi empty$ not show.doi and
1523 | show.english.translation entry.lang lang.zh = and not and
1524 | { new.block
1525 | format.doi output
1526 | }
1527 | 'skip$
1528 | if$
1529 | }
1530 |
1531 | FUNCTION {check.electronic}
1532 | { "" 'entry.url :=
1533 | #0 'entry.is.electronic :=
1534 | 'check.doi
1535 | 'skip$
1536 | if$
1537 | 'check.url
1538 | 'skip$
1539 | if$
1540 | medium empty$ not
1541 | { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
1542 | { #1 'entry.is.electronic := }
1543 | 'skip$
1544 | if$
1545 | }
1546 | 'skip$
1547 | if$
1548 | }
1549 |
1550 | FUNCTION {format.eprint}
1551 | { eprinttype empty$ not
1552 | { eprinttype }
1553 | { archivePrefix empty$ not
1554 | { archivePrefix }
1555 | { "" }
1556 | if$
1557 | }
1558 | if$
1559 | 's :=
1560 | s empty$ not
1561 | { s ": \eprint{" *
1562 | url empty$ not
1563 | { url }
1564 | { "https://" s "l" change.case$ * ".org/abs/" * eprint * }
1565 | if$
1566 | * "}{" *
1567 | eprint * "}" *
1568 | }
1569 | { eprint }
1570 | if$
1571 | }
1572 |
1573 | FUNCTION {output.eprint}
1574 | { show.preprint eprint empty$ not and
1575 | { new.block
1576 | format.eprint output
1577 | }
1578 | 'skip$
1579 | if$
1580 | }
1581 |
1582 | FUNCTION {format.note}
1583 | { note empty$ not show.note and
1584 | { note }
1585 | { "" }
1586 | if$
1587 | }
1588 |
1589 | FUNCTION {output.translation}
1590 | { show.english.translation entry.lang lang.zh = and
1591 | { translation empty$ not
1592 | { translation }
1593 | { "[English translation missing!]" }
1594 | if$
1595 | " (in Chinese)" * output
1596 | write$
1597 | format.doi duplicate$ empty$ not
1598 | { newline$
1599 | write$
1600 | }
1601 | 'pop$
1602 | if$
1603 | " \\" write$
1604 | newline$
1605 | "(" write$
1606 | ""
1607 | before.all 'output.state :=
1608 | }
1609 | 'skip$
1610 | if$
1611 | }
1612 |
1613 | FUNCTION {empty.misc.check}
1614 | { author empty$ title empty$
1615 | year empty$
1616 | and and
1617 | key empty$ not and
1618 | { "all relevant fields are empty in " cite$ * warning$ }
1619 | 'skip$
1620 | if$
1621 | }
1622 |
1623 | FUNCTION {monograph}
1624 | { output.bibitem
1625 | output.translation
1626 | author empty$ not
1627 | { format.authors }
1628 | { editor empty$ not
1629 | { format.editors }
1630 | { "empty author and editor in " cite$ * warning$
1631 | ""
1632 | }
1633 | if$
1634 | }
1635 | if$
1636 | output
1637 | year.after.author
1638 | { period.after.author
1639 | 'new.sentence
1640 | 'skip$
1641 | if$
1642 | format.year "year" output.check
1643 | }
1644 | 'skip$
1645 | if$
1646 | new.block
1647 | format.series.vol.num.title "title" output.check
1648 | "M" set.entry.mark
1649 | format.mark "" output.after
1650 | new.block
1651 | format.translators output
1652 | new.sentence
1653 | format.edition output
1654 | new.block
1655 | format.address.publisher output
1656 | year.after.author not
1657 | { format.year "year" output.check }
1658 | 'skip$
1659 | if$
1660 | format.pages bbl.pages.colon output.after
1661 | format.urldate "" output.after
1662 | output.url
1663 | output.doi
1664 | new.block
1665 | format.note output
1666 | fin.entry
1667 | }
1668 |
1669 | FUNCTION {incollection}
1670 | { output.bibitem
1671 | output.translation
1672 | format.authors output
1673 | author format.key output
1674 | year.after.author
1675 | { period.after.author
1676 | 'new.sentence
1677 | 'skip$
1678 | if$
1679 | format.year "year" output.check
1680 | }
1681 | 'skip$
1682 | if$
1683 | new.block
1684 | format.title "title" output.check
1685 | "M" set.entry.mark
1686 | format.mark "" output.after
1687 | new.block
1688 | format.translators output
1689 | new.slash
1690 | format.editors output
1691 | new.block
1692 | format.series.vol.num.booktitle "booktitle" output.check
1693 | new.block
1694 | format.edition output
1695 | new.block
1696 | format.address.publisher output
1697 | year.after.author not
1698 | { format.year "year" output.check }
1699 | 'skip$
1700 | if$
1701 | format.extracted.pages bbl.pages.colon output.after
1702 | format.urldate "" output.after
1703 | output.url
1704 | output.doi
1705 | new.block
1706 | format.note output
1707 | fin.entry
1708 | }
1709 |
1710 | FUNCTION {periodical}
1711 | { output.bibitem
1712 | output.translation
1713 | format.authors output
1714 | author format.key output
1715 | year.after.author
1716 | { period.after.author
1717 | 'new.sentence
1718 | 'skip$
1719 | if$
1720 | format.year "year" output.check
1721 | }
1722 | 'skip$
1723 | if$
1724 | new.block
1725 | format.title "title" output.check
1726 | "J" set.entry.mark
1727 | format.mark "" output.after
1728 | new.block
1729 | format.periodical.year.volume.number output
1730 | new.block
1731 | format.address.publisher output
1732 | year.after.author not
1733 | { format.periodical.year "year" output.check }
1734 | 'skip$
1735 | if$
1736 | format.urldate "" output.after
1737 | output.url
1738 | output.doi
1739 | new.block
1740 | format.note output
1741 | fin.entry
1742 | }
1743 |
1744 | FUNCTION {article}
1745 | { output.bibitem
1746 | output.translation
1747 | format.authors output
1748 | author format.key output
1749 | year.after.author
1750 | { period.after.author
1751 | 'new.sentence
1752 | 'skip$
1753 | if$
1754 | format.year "year" output.check
1755 | }
1756 | 'skip$
1757 | if$
1758 | new.block
1759 | title.in.journal
1760 | { format.title "title" output.check
1761 | "J" set.entry.mark
1762 | format.mark "" output.after
1763 | new.block
1764 | }
1765 | 'skip$
1766 | if$
1767 | format.journal "journal" output.check
1768 | year.after.author not
1769 | { format.date "year" output.check }
1770 | 'skip$
1771 | if$
1772 | format.journal.volume output
1773 | format.journal.number "" output.after
1774 | format.journal.pages bbl.pages.colon output.after
1775 | format.urldate "" output.after
1776 | output.url
1777 | output.doi
1778 | new.block
1779 | format.note output
1780 | fin.entry
1781 | }
1782 |
1783 | FUNCTION {patent}
1784 | { output.bibitem
1785 | output.translation
1786 | format.authors output
1787 | author format.key output
1788 | year.after.author
1789 | { period.after.author
1790 | 'new.sentence
1791 | 'skip$
1792 | if$
1793 | format.year "year" output.check
1794 | }
1795 | 'skip$
1796 | if$
1797 | new.block
1798 | format.title "title" output.check
1799 | "P" set.entry.mark
1800 | format.mark "" output.after
1801 | new.block
1802 | format.date "year" output.check
1803 | format.urldate "" output.after
1804 | output.url
1805 | output.doi
1806 | new.block
1807 | format.note output
1808 | fin.entry
1809 | }
1810 |
1811 | FUNCTION {electronic}
1812 | { #1 #1 check.electronic
1813 | #1 'entry.is.electronic :=
1814 | #1 'is.pure.electronic :=
1815 | output.bibitem
1816 | output.translation
1817 | format.authors output
1818 | author format.key output
1819 | year.after.author
1820 | { period.after.author
1821 | 'new.sentence
1822 | 'skip$
1823 | if$
1824 | format.year "year" output.check
1825 | }
1826 | 'skip$
1827 | if$
1828 | new.block
1829 | format.series.vol.num.title "title" output.check
1830 | "EB" set.entry.mark
1831 | format.mark "" output.after
1832 | new.block
1833 | format.address.publisher output
1834 | year.after.author not
1835 | { date empty$
1836 | { format.date output }
1837 | 'skip$
1838 | if$
1839 | }
1840 | 'skip$
1841 | if$
1842 | format.pages bbl.pages.colon output.after
1843 | format.editdate "" output.after
1844 | format.urldate "" output.after
1845 | output.url
1846 | output.doi
1847 | new.block
1848 | format.note output
1849 | fin.entry
1850 | }
1851 |
1852 | FUNCTION {preprint}
1853 | { output.bibitem
1854 | output.translation
1855 | author empty$ not
1856 | { format.authors }
1857 | { editor empty$ not
1858 | { format.editors }
1859 | { "empty author and editor in " cite$ * warning$
1860 | ""
1861 | }
1862 | if$
1863 | }
1864 | if$
1865 | output
1866 | year.after.author
1867 | { period.after.author
1868 | 'new.sentence
1869 | 'skip$
1870 | if$
1871 | format.year "year" output.check
1872 | }
1873 | 'skip$
1874 | if$
1875 | new.block
1876 | title.in.journal
1877 | { format.series.vol.num.title "title" output.check
1878 | "Z" set.entry.mark
1879 | format.mark "" output.after
1880 | new.block
1881 | }
1882 | 'skip$
1883 | if$
1884 | format.translators output
1885 | new.sentence
1886 | format.edition output
1887 | new.block
1888 | output.eprint
1889 | year.after.author not
1890 | { format.year "year" output.check }
1891 | 'skip$
1892 | if$
1893 | format.pages bbl.pages.colon output.after
1894 | format.urldate "" output.after
1895 | output.url
1896 | new.block
1897 | format.note output
1898 | fin.entry
1899 | }
1900 |
1901 | FUNCTION {misc}
1902 | { journal empty$ not
1903 | 'article
1904 | { booktitle empty$ not
1905 | 'incollection
1906 | { publisher empty$ not
1907 | 'monograph
1908 | { eprint empty$ not show.preprint and
1909 | 'preprint
1910 | { entry.is.electronic
1911 | 'electronic
1912 | {
1913 | "Z" set.entry.mark
1914 | monograph
1915 | }
1916 | if$
1917 | }
1918 | if$
1919 | }
1920 | if$
1921 | }
1922 | if$
1923 | }
1924 | if$
1925 | empty.misc.check
1926 | }
1927 |
1928 | FUNCTION {archive}
1929 | { "A" set.entry.mark
1930 | misc
1931 | }
1932 |
1933 | FUNCTION {book} { monograph }
1934 |
1935 | FUNCTION {booklet} { book }
1936 |
1937 | FUNCTION {collection}
1938 | { "G" set.entry.mark
1939 | monograph
1940 | }
1941 |
1942 | FUNCTION {database}
1943 | { "DB" set.entry.mark
1944 | electronic
1945 | }
1946 |
1947 | FUNCTION {dataset}
1948 | { "DS" set.entry.mark
1949 | electronic
1950 | }
1951 |
1952 | FUNCTION {inbook} { book }
1953 |
1954 | FUNCTION {inproceedings}
1955 | { "C" set.entry.mark
1956 | incollection
1957 | }
1958 |
1959 | FUNCTION {conference} { inproceedings }
1960 |
1961 | FUNCTION {map}
1962 | { "CM" set.entry.mark
1963 | misc
1964 | }
1965 |
1966 | FUNCTION {manual} { monograph }
1967 |
1968 | FUNCTION {mastersthesis}
1969 | { "D" set.entry.mark
1970 | monograph
1971 | }
1972 |
1973 | FUNCTION {newspaper}
1974 | { "N" set.entry.mark
1975 | article
1976 | }
1977 |
1978 | FUNCTION {online}
1979 | { "EB" set.entry.mark
1980 | electronic
1981 | }
1982 |
1983 | FUNCTION {phdthesis} { mastersthesis }
1984 |
1985 | FUNCTION {proceedings}
1986 | { "C" set.entry.mark
1987 | monograph
1988 | }
1989 |
1990 | FUNCTION {software}
1991 | { "CP" set.entry.mark
1992 | electronic
1993 | }
1994 |
1995 | FUNCTION {standard}
1996 | { "S" set.entry.mark
1997 | misc
1998 | }
1999 |
2000 | FUNCTION {techreport}
2001 | { "R" set.entry.mark
2002 | misc
2003 | }
2004 |
2005 | FUNCTION {unpublished} { misc }
2006 |
2007 | FUNCTION {default.type} { misc }
2008 |
2009 | MACRO {jan} {"January"}
2010 |
2011 | MACRO {feb} {"February"}
2012 |
2013 | MACRO {mar} {"March"}
2014 |
2015 | MACRO {apr} {"April"}
2016 |
2017 | MACRO {may} {"May"}
2018 |
2019 | MACRO {jun} {"June"}
2020 |
2021 | MACRO {jul} {"July"}
2022 |
2023 | MACRO {aug} {"August"}
2024 |
2025 | MACRO {sep} {"September"}
2026 |
2027 | MACRO {oct} {"October"}
2028 |
2029 | MACRO {nov} {"November"}
2030 |
2031 | MACRO {dec} {"December"}
2032 |
2033 | MACRO {acmcs} {"ACM Computing Surveys"}
2034 |
2035 | MACRO {acta} {"Acta Informatica"}
2036 |
2037 | MACRO {cacm} {"Communications of the ACM"}
2038 |
2039 | MACRO {ibmjrd} {"IBM Journal of Research and Development"}
2040 |
2041 | MACRO {ibmsj} {"IBM Systems Journal"}
2042 |
2043 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
2044 |
2045 | MACRO {ieeetc} {"IEEE Transactions on Computers"}
2046 |
2047 | MACRO {ieeetcad}
2048 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
2049 |
2050 | MACRO {ipl} {"Information Processing Letters"}
2051 |
2052 | MACRO {jacm} {"Journal of the ACM"}
2053 |
2054 | MACRO {jcss} {"Journal of Computer and System Sciences"}
2055 |
2056 | MACRO {scp} {"Science of Computer Programming"}
2057 |
2058 | MACRO {sicomp} {"SIAM Journal on Computing"}
2059 |
2060 | MACRO {tocs} {"ACM Transactions on Computer Systems"}
2061 |
2062 | MACRO {tods} {"ACM Transactions on Database Systems"}
2063 |
2064 | MACRO {tog} {"ACM Transactions on Graphics"}
2065 |
2066 | MACRO {toms} {"ACM Transactions on Mathematical Software"}
2067 |
2068 | MACRO {toois} {"ACM Transactions on Office Information Systems"}
2069 |
2070 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
2071 |
2072 | MACRO {tcs} {"Theoretical Computer Science"}
2073 |
2074 | FUNCTION {sortify}
2075 | { purify$
2076 | "l" change.case$
2077 | }
2078 |
2079 | FUNCTION {chop.word}
2080 | { 's :=
2081 | 'len :=
2082 | s #1 len substring$ =
2083 | { s len #1 + global.max$ substring$ }
2084 | 's
2085 | if$
2086 | }
2087 |
2088 | FUNCTION {format.lab.name}
2089 | { "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
2090 | t "others" =
2091 | { citation.et.al }
2092 | { t get.str.lang 'name.lang :=
2093 | name.lang lang.zh = name.lang lang.ja = or
2094 | { t #1 "{ll}{ff}" format.name$ }
2095 | { t #1 "{vv~}{ll}" format.name$ }
2096 | if$
2097 | }
2098 | if$
2099 | }
2100 |
2101 | FUNCTION {format.lab.names}
2102 | { 's :=
2103 | s #1 format.lab.name 'short.label :=
2104 | #1 'nameptr :=
2105 | s num.names$ 'numnames :=
2106 | ""
2107 | numnames 'namesleft :=
2108 | { namesleft #0 > }
2109 | { s nameptr format.lab.name citation.et.al =
2110 | numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or
2111 | { bbl.space *
2112 | citation.et.al *
2113 | #1 'namesleft :=
2114 | }
2115 | { nameptr #1 >
2116 | { namesleft #1 = citation.and "" = not and
2117 | { citation.and * }
2118 | { ", " * }
2119 | if$
2120 | }
2121 | 'skip$
2122 | if$
2123 | s nameptr format.lab.name *
2124 | }
2125 | if$
2126 | nameptr #1 + 'nameptr :=
2127 | namesleft #1 - 'namesleft :=
2128 | }
2129 | while$
2130 | }
2131 |
2132 | FUNCTION {author.key.label}
2133 | { author empty$
2134 | { key empty$
2135 | { cite$ #1 #3 substring$ }
2136 | 'key
2137 | if$
2138 | }
2139 | { author format.lab.names }
2140 | if$
2141 | }
2142 |
2143 | FUNCTION {author.editor.key.label}
2144 | { author empty$
2145 | { editor empty$
2146 | { key empty$
2147 | { cite$ #1 #3 substring$ }
2148 | 'key
2149 | if$
2150 | }
2151 | { editor format.lab.names }
2152 | if$
2153 | }
2154 | { author format.lab.names }
2155 | if$
2156 | }
2157 |
2158 | FUNCTION {author.key.organization.label}
2159 | { author empty$
2160 | { key empty$
2161 | { organization empty$
2162 | { cite$ #1 #3 substring$ }
2163 | { "The " #4 organization chop.word #3 text.prefix$ }
2164 | if$
2165 | }
2166 | 'key
2167 | if$
2168 | }
2169 | { author format.lab.names }
2170 | if$
2171 | }
2172 |
2173 | FUNCTION {editor.key.organization.label}
2174 | { editor empty$
2175 | { key empty$
2176 | { organization empty$
2177 | { cite$ #1 #3 substring$ }
2178 | { "The " #4 organization chop.word #3 text.prefix$ }
2179 | if$
2180 | }
2181 | 'key
2182 | if$
2183 | }
2184 | { editor format.lab.names }
2185 | if$
2186 | }
2187 |
2188 | FUNCTION {calc.short.authors}
2189 | { "" 'short.label :=
2190 | type$ "book" =
2191 | type$ "inbook" =
2192 | or
2193 | 'author.editor.key.label
2194 | { type$ "collection" =
2195 | type$ "proceedings" =
2196 | or
2197 | { editor empty$ not
2198 | 'editor.key.organization.label
2199 | 'author.key.organization.label
2200 | if$
2201 | }
2202 | 'author.key.label
2203 | if$
2204 | }
2205 | if$
2206 | 'short.list :=
2207 | short.label empty$
2208 | { short.list 'short.label := }
2209 | 'skip$
2210 | if$
2211 | }
2212 |
2213 | FUNCTION {calc.label}
2214 | { calc.short.authors
2215 | short.list
2216 | "("
2217 | *
2218 | format.year duplicate$ empty$
2219 | short.list key field.or.null = or
2220 | { pop$ "" }
2221 | 'skip$
2222 | if$
2223 | *
2224 | 'label :=
2225 | short.label
2226 | "("
2227 | *
2228 | format.year duplicate$ empty$
2229 | short.list key field.or.null = or
2230 | { pop$ "" }
2231 | 'skip$
2232 | if$
2233 | *
2234 | 'short.label :=
2235 | }
2236 |
2237 | INTEGERS { seq.num }
2238 |
2239 | FUNCTION {init.seq}
2240 | { #0 'seq.num :=}
2241 |
2242 | FUNCTION {int.to.fix}
2243 | { "000000000" swap$ int.to.str$ *
2244 | #-1 #10 substring$
2245 | }
2246 |
2247 | FUNCTION {presort}
2248 | { set.entry.lang
2249 | set.entry.numbered
2250 | show.url show.doi check.electronic
2251 | #0 'is.pure.electronic :=
2252 | calc.label
2253 | label sortify
2254 | " "
2255 | *
2256 | seq.num #1 + 'seq.num :=
2257 | seq.num int.to.fix
2258 | 'sort.label :=
2259 | sort.label *
2260 | #1 entry.max$ substring$
2261 | 'sort.key$ :=
2262 | }
2263 |
2264 | STRINGS { longest.label last.label next.extra }
2265 |
2266 | INTEGERS { longest.label.width last.extra.num number.label }
2267 |
2268 | FUNCTION {initialize.longest.label}
2269 | { "" 'longest.label :=
2270 | #0 int.to.chr$ 'last.label :=
2271 | "" 'next.extra :=
2272 | #0 'longest.label.width :=
2273 | #0 'last.extra.num :=
2274 | #0 'number.label :=
2275 | }
2276 |
2277 | FUNCTION {forward.pass}
2278 | { last.label short.label =
2279 | { last.extra.num #1 + 'last.extra.num :=
2280 | last.extra.num int.to.chr$ 'extra.label :=
2281 | }
2282 | { "a" chr.to.int$ 'last.extra.num :=
2283 | "" 'extra.label :=
2284 | short.label 'last.label :=
2285 | }
2286 | if$
2287 | number.label #1 + 'number.label :=
2288 | }
2289 |
2290 | FUNCTION {reverse.pass}
2291 | { next.extra "b" =
2292 | { "a" 'extra.label := }
2293 | 'skip$
2294 | if$
2295 | extra.label 'next.extra :=
2296 | extra.label
2297 | duplicate$ empty$
2298 | 'skip$
2299 | { "{\natexlab{" swap$ * "}}" * }
2300 | if$
2301 | 'extra.label :=
2302 | label extra.label * 'label :=
2303 | }
2304 |
2305 | FUNCTION {bib.sort.order}
2306 | { sort.label 'sort.key$ :=
2307 | }
2308 |
2309 | FUNCTION {begin.bib}
2310 | { preamble$ empty$
2311 | 'skip$
2312 | { preamble$ write$ newline$ }
2313 | if$
2314 | "\begin{thebibliography}{" number.label int.to.str$ * "}" *
2315 | write$ newline$
2316 | terms.in.macro
2317 | { "\providecommand{\biband}{和}"
2318 | write$ newline$
2319 | "\providecommand{\bibetal}{等}"
2320 | write$ newline$
2321 | }
2322 | 'skip$
2323 | if$
2324 | "\providecommand{\natexlab}[1]{#1}"
2325 | write$ newline$
2326 | "\providecommand{\url}[1]{#1}"
2327 | write$ newline$
2328 | "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
2329 | write$ newline$
2330 | " \urlstyle{same}\fi"
2331 | write$ newline$
2332 | "\expandafter\ifx\csname href\endcsname\relax"
2333 | write$ newline$
2334 | " \DeclareUrlCommand\doi{\urlstyle{rm}}"
2335 | write$ newline$
2336 | " \def\eprint#1#2{#2}"
2337 | write$ newline$
2338 | "\else"
2339 | write$ newline$
2340 | " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}"
2341 | write$ newline$
2342 | " \let\eprint\href"
2343 | write$ newline$
2344 | "\fi"
2345 | write$ newline$
2346 | }
2347 |
2348 | FUNCTION {end.bib}
2349 | { newline$
2350 | "\end{thebibliography}" write$ newline$
2351 | }
2352 |
2353 | READ
2354 |
2355 | EXECUTE {init.state.consts}
2356 |
2357 | EXECUTE {load.config}
2358 |
2359 | EXECUTE {init.seq}
2360 |
2361 | ITERATE {presort}
2362 |
2363 | SORT
2364 |
2365 | EXECUTE {initialize.longest.label}
2366 |
2367 | ITERATE {forward.pass}
2368 |
2369 | REVERSE {reverse.pass}
2370 |
2371 | ITERATE {bib.sort.order}
2372 |
2373 | SORT
2374 |
2375 | EXECUTE {begin.bib}
2376 |
2377 | ITERATE {call.type$}
2378 |
2379 | EXECUTE {end.bib}
2380 |
--------------------------------------------------------------------------------