diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 43763ba..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/README.md b/README.md index d040e0d..867e030 100755 --- a/README.md +++ b/README.md @@ -1,21 +1,40 @@ -# 欢迎使用中南大学研究生学位论文LaTex模版(博士和硕士) +# 中南大学研究生学位论文LaTex模版(博士&硕士) -## Prior work on CSU thesis template +## 1、简介 + +目的是创建一个符合中南大学研究生学位论文(硕博)撰写规范的LaTeX模板,解决学位论文撰写时格式调整的痛点。 + +**请注意 CSUthesis 目前仅支持 XeTeX 引擎** + +使用模板时请直接下载并复制`csuthesis_template`文件夹,该文件夹包含了编译模板的最小文件集合。或使用Github Release页面提供的发布文件(注意鉴别打包版本,当前无明确的版本规则) + + + +## 2、相关工作 本示例模板是应用中南大学研究生学位论文(非官方)LaTeX 文档类 CSUthesis 的一个完整实现。演示了排版中常用的例子,包括公式、表格、算法、参考文献等。 用户可以参考或者直接基于此示例文档撰写论文。 -请注意 CSUthesis 目前仅支持 XeTeX 引擎,字符编码仅支持 UTF-8。 +非常感谢郭大侠提供基础[中南大学学位论文LaTex模板](https://github.com/CSGrandeur/CSU-Thesis-LaTeX-Template) -非常感谢郭大侠提供基础[中南大学学位论文LaTex模板](https://github.com/CSGrandeur/CSU-Thesis-LaTeX-Template)。 学校之前下发的研究生学位论文撰写规范: + + 2016年4月学校下发的[《中南大学研究生学位论文撰写规范》中大研字【2016】166号](http://gra.its.csu.edu.cn/yjsy/pygl/wjtzxq54858_3_6.html) + 2020年4月2号学校下发的[《中南大学研究生学位论文撰写规范》中大研字【2020】30号](http://oa.its.csu.edu.cn/Home/ReleaseMainText/909CD53BF50943CD97B83C352032FEA4) -后续的修改也是上述规范基础上。 -## Motivation -目的是创建一个符合中南大学研究生学位论文(博士)撰写规范的LaTeX模板,解决学位论文撰写时格式调整的痛点。 -已有珠玉在前,我们之所以还要重新造轮子,主要依据2022年4月18号学校最新下发的[《中南大学研究生学位论文撰写规范》中大研字【2022】8号](http://oa.its.csu.edu.cn/Home/ReleaseMainText/9CFE8926B13143009D5EB424333AAD6C),重新修改了封面和扉页、部分字体类型和大小、标题内容,以期做到与 Word 模板尽可能的相似。 -**学校要求**:2022年起,申请博士、硕士学位的学位论文必须按新文件执行。主要修订如下: +后续的修改也是上述规范基础上 + +* 《中南大学研究生学位论文撰写规范》中大研字【2022】8号 + +中南其他Latex论文模板项目:https://github.com/disc0ver-csu/csu-thesis + + + +## 3、更改日志 + +**学校要求**:2022年起,申请博士、硕士学位的学位论文必须按新文件执行。依据2022年4月18号学校最新下发的[《中南大学研究生学位论文撰写规范》中大研字【2022】8号](http://oa.its.csu.edu.cn/Home/ReleaseMainText/9CFE8926B13143009D5EB424333AAD6C),重新修改了封面和扉页、部分字体类型和大小、标题内容,以期做到与 Word 模板尽可能的相似。 + +主要修订如下: + + 按要求修订段落与各级标题间距; + 按要求修订中英文段落间距,章节间距,附录标题段落间距,研究成果及致谢标题间距,参考文献间距等; + 增加博士和硕士论文模板选项,只需要info.tex选择即可,方便使用; @@ -45,35 +64,10 @@ + 根据需要调整合适的算法包; -## 编译环境和工具 - -### 编译环境 -由于 CTeX 宏集的行为会受编译方式影响,比如不同编译方式下 CTeX 宏集底层的中文支持方式也会不同。LaTeX 和 pdfLaTeX 为 CJK 宏包,XeLaTeX 为 xeCJK 宏包,LuaLaTeX 为 LuaTeX-ja 宏包;使用 XeLaTeX 和 LuaLaTeX 编译时,CTeX 宏集使用 UTF-8 编码,LaTeX 和 pdfLaTeX 时使用 GBK 编码。最终的排版效果因不同编译方式而已。 - -**本模板唯一推荐使用的是 XeLaTeX**,可以获得与 Word 模板100%接近的效果。发行版为 [TeXLive](http://tug.org/texlive/)**建议下载当年的最新版**,支持GNU/Linux, macOS, 和Windows操作系统,按需下载。这里暂不推荐其他发行版,毕竟按照 [L 叔](http://liam0205.me/)的名言 - -> 选择 TeX Live,选择简单的人生; -> -> 选择 MiKTeX,选择麻烦的人生; -> -> 选择 CTeX 套装,选择崩溃的人生。 - -### 写作工具 - -推荐使用2种常用写作工具: -+ [**TeXstudio**](http://texstudio.sourceforge.net/):TeXstudio is an integrated writing environment for creating LaTeX documents. Our goal is to make writing LaTeX as easy and comfortable as possible.(Windows上面支持最完善,macOS也支持) -+ **Sublime+LaTex**:[Windows部署指南](https://blog.csdn.net/qazxswed807/article/details/51234834)和[macOS部署指南](https://www.readern.com/sublime-text-latex-chinese-under-mac.html)。 -### 文献管理工具 -如果你使用LaTex写作,强烈建议你使用[JabRef](https://www.jabref.org/)管理你的文献。 - -[JabRef安装及使用指南。](https://blog.csdn.net/weixin_44191286/article/details/85698921) -## 主要内容 -**中南大学学术型博士学位论文封面(公开):** -![cover](images/csulgphd.png) +## 4、主要内容 -**中南大学学术型硕士学位论文封面(公开):** -![cover](images/csulgmaster.png) +### 4.1、文章目录 1. 封面(最新版的封面改版,胶封时处理)、扉页; 2. 学位论文原创性声明和版权使用授权书; @@ -87,27 +81,66 @@ 10. 攻读博(硕)士学位期间主要研究成果; 11. 致谢。 -## 版本状况 +### 4.2、文章封面 -完全支持新版本撰写规范,支持普通学术学位博士论文。 +**中南大学学术型博士学位论文封面(公开):** +![cover](images/csulgphd.png) -其他涉密、定向等可能需要修改封面的情况,需要自行修改`CSUthesis.cls`文件。 +**中南大学学术型硕士学位论文封面(公开):** +![cover](images/csulgmaster.png) -硕士版本也可按需修改`CSUthesis.cls`文件。 +### 4.3、模板构成 -以后版本会增加支持各类学位的配置文件(如果我有空的话)。 +``` +csuthesis_template +├── content +│   ├── abstractcn.tex +│   ├── abstracten.tex +│   ├── additional.tex +│   ├── appendix.tex +│   ├── content.tex +│   ├── denotation.tex +│   └── info.tex +├── CSUthesis.cls +├── csuthesis_main.tex +├── gbt7714 +│   ├── 2005.bst +│   ├── 2015-little.bst +│   └── 2015-numerical.bst +├── images +│   └── csu.png +├── Makefile +└── references.bib +``` -## 文件介绍 +#### csuthesis_main.tex -### `CSUthesis.cls` +论文主文件,正常情况下不用修改这个文件,以这个文件编译论文即可。 -样式文件,如果是标准的普通学术型博士,不需要管这个文件。 +在content目录提供的页面不足以保证所需内容时,可以修改主文件,引入其他自定义content文件。 -其他如涉密、定向之类的,目前本版本没有设计特定的设置功能,需要修改该文件。 +#### content/ -对LaTeX有所了解的同学,也可按需修改这个文件。如果这个文件的样式设计有什么bug,欢迎在issue里提出。 +所有论文的编辑内容在这里。 + +* `info.tex`:论文基本信息 + + 标题姓名学院之类的。添加盲审格式输出,根据需求注释/保留 `\blindreviewtrue`和 `\blindreviewfalse`,输出盲审送审版本和正式版本。 + +* `abstactcn.tex`:中文摘要段落 +* `abstracten.tex`:英文摘要段落 + +* `content.tex`:论文正文 + `\cite`的时候可能因为tex文件与主文件分离,LaTeX环境配置不到位,会有找不到bib的提示(Texlive+sublime会这样),没关系,照常插入需要的bibkey即可。另外,如遇到参考文献没有及时更新时,请将编译后的`.bbl`文件删除,然后重新编译即可。 + +* `additional.tex`:成果、致谢与其他 + +* `denotation.tex`:符号说明 + +* `appendix.tex`:附录 + +#### references.bib -### 参考文献 关于参考文献的设置如下,使用了 natbib 宏包来定制参考文献,除了常用的 `\ cite{}` 命令来提供 full size 的参考文献引用,还提供了 `\citess{}` 命令用于提供上标(右上角)时候的引用(ss 是 superscript 的缩写)。最后一句代码用于调节参考文献条目之间距离。 ```latex @@ -115,8 +148,8 @@ \newcommand{\citess}[1]{\textsuperscript{\cite{#1}}} %\setlength{\bibsep}{1pt plus 0.3ex} ``` -GBT7714-2005和GBT7714-2015没有重大区别,参考文献的字体、大小和样式风格,可以在 .tex 文件中下面代码里调节。gbt7714-2005.bst 文件基于南京大学计算机科学与技术系胡海星博士的 [GBT7714-2005-BibTeX-Style 项目](https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style),在此基础上稍做了一点修改,使得英文人名从全部字母大写变为只有首字母大写。 -其中, +GBT7714-2005和GBT7714-2015没有重大区别,参考文献的字体、大小和样式风格,可以在 .tex 文件中下面代码里调节。gbt7714-2005.bst 文件基于南京大学计算机科学与技术系胡海星博士的 [GBT7714-2005-BibTeX-Style 项目](https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style),在此基础上稍做了一点修改,使得英文人名从全部字母大写变为只有首字母大写。其中: + + gbt7714-2015-little.bst: 英文人名只有首字母大写(默认); + gbt7714-2015-numerical.bst: 英文人名全部字母大写, 请大家按需选择。 @@ -131,43 +164,141 @@ GBT7714-2005和GBT7714-2015没有重大区别,参考文献的字体、大小 \end{spacing} ``` -### `content`目录 +#### images/ -所有论文的编辑内容在这里。 +放图片,模板已经配置了相对路径,所以在文中插图片时,直接用images目录下的相对路径即可,比如`images/csu.png`,在正文中插入只需要`csu.png`。 + +#### CSUthesis.cls + +样式文件,如果是标准的普通学术型博士,不需要管这个文件。 -`info.tex`:论文的各种信息,标题姓名学院之类的。添加盲审格式输出,根据需求注释/保留 `\blindreviewtrue`和 `\blindreviewfalse`,输出盲审送审版本和正式版本。 +其他如涉密、定向之类的,目前本版本没有设计特定的设置功能,需要修改该文件。 -`abstactcn.tex`和`abstracten.tex`:顾名思义。 +对LaTeX有所了解的同学,也可按需修改这个文件。如果这个文件的样式设计有什么bug,欢迎在issue里提出。 -`content.tex`:从绪论到总结的全部正文内容。`\cite`的时候可能因为tex文件与主文件分离,LaTeX环境配置不到位,会有找不到bib的提示(Texlive+sublime会这样),没关系,照常插入需要的bibkey即可。另外,如遇到参考文献没有及时更新时,请将编译后的`.bbl`文件删除,然后重新编译即可。 -`additional.tex`:成果、致谢、附录之类的。 -`denotation.tex`:符号说明。 +## 4、编译环境 -`appendix.tex`:附录。 +### 4.1、在线编译环境 +#### Overleaf平台 +**该模板由于使用XeLaTeX编译且需要Makefile文件,因此无法使用Overleaf平台(还在努力中** -### `csuthesis_main.tex` +Overleaf平台对于XeLaTeX支持存在基础性问题,对于`latexmk -xelatex`的支持不完整且无修复动向,因此在模本重构之前无法使用。详见Issue:https://github.com/overleaf/overleaf/issues/837 -论文主文件,正常情况下不用修改这个文件,以这个文件编译论文即可。 +#### ShareLaTeX平台/Ubuntu平台 -在content目录提供的页面不足以保证所需内容时,可以修改主文件,引入其他自定义content文件。 +**以下内容目标平台:Linux/Ubuntu/ShareLaTeX** -### `images`目录 +ShareLaTeX是一个使用Docker部署的Overleaf写作平台,鉴于部分实验室已使用该平台进行论文共享与协作,因此针对该部署模式或相似部署模式进行优化说明。 -放图片,模板已经配置了相对路径,所以在文中插图片时,直接用images目录下的相对路径即可,比如`images/csu.png`,在正文中插入只需要`csu.png`。 +使用Linux基础的在线编译平台使用该模板需要解决两个问题:依赖完整性问题、字体完整性问题 + +**依赖完整性** + +对于非完整安装的latex编译环境,需要用户补充安装xetex编译相关功能,公式相关扩展,CJK相关扩展 + +**字体完整性** + +由于Linux平台无论文写作所需的中英文字体,因此需要安装微软字体库并手动导入模板依赖的中文字体 + +英文字体依赖 + +``` +Times New Roman +Courier New +Arial +``` + +中文字体依赖(依赖字体详见仓库`fonts`文件夹) + +``` +STXinwei(华文新魏) +SimFang(仿宋) +SimHei(黑体) +SimSun(宋体) +SimKai(楷体) +``` + +**修复过程** + +本例以ShareLaTeX平台为例,ShareLaTeX以Ubuntu为基础预安装texlive环境,安装教程详见:[ShareLaTeX自部署,集成XeLaTeX+中文CJK+LDAP – WolfBolin](https://blog.wolfbolin.com/archives/808) + +通过SSH或`docker exec`进入texlive基础环境后执行以下内容 + +``` +# 更新软件列表 +$ apt update + +# 安装xetex基础环境 +$ apt install -y texlive texlive-xetex texlive-latex-base texlive-latex-recommended + +# 安装模板相关扩展 +$ apt install -y texlive-latex-extra texlive-science texlive-pictures texlive-bibtex-extra + +# 安装CJK字符编码库 +$ apt install -y latex-cjk-all texlive-lang-chinese texlive-lang-english + +# 安装微软英文字体库 +$ echo "yes" | apt install -y --reinstall ttf-mscorefonts-installer + +# 上传中文字体到服务器 +$ cp fonts/* /usr/share/fonts/zh-cn/ + +# 进入系统字体文件夹 +$ cd /usr/share/fonts + +# 更新字体缓存 +$ fc-cache -fv -## 编译 +# 检查中文字体 +$ fc-list :lang=zh-cn +/usr/share/fonts/zh-cn/simkai.ttf: KaiTi,楷体:style=Regular +,... +/usr/share/fonts/zh-cn/simfang.ttf: FangSong,仿宋:style=Regular +,... +/usr/share/fonts/zh-cn/simhei.ttf: SimHei,黑体:style=Regular +/usr/share/fonts/truetype/arphic-gkai00mp/gkai00mp.ttf: AR PL KaitiM GB,文鼎PL简中楷:style=Regular +/usr/share/fonts/truetype/arphic-gbsn00lp/gbsn00lp.ttf: AR PL SungtiL GB,文鼎PL简报宋:style=Regular +/usr/share/fonts/zh-cn/simsun.ttf: SimSun,宋体:style=Regular +/usr/share/fonts/zh-cn/stxinwei.ttf: STXinwei,华文新魏:style=Regular + +# 检查英文字体 +$ fc-match Arial +Arial.ttf: "Arial" "Regular" +``` + +**注意:**针对Docker用户,请在完成环境更新后,先进行`docker commit`操作再重启容器,否则做出的修改将会丢失 + + + +### 4.2、本地编译环境 + +(该部分内容需要本地编译使用者详细补充——在线编译使用者WolfBolin注) + +#### 编译工具 + +由于 CTeX 宏集的行为会受编译方式影响,比如不同编译方式下 CTeX 宏集底层的中文支持方式也会不同。LaTeX 和 pdfLaTeX 为 CJK 宏包,XeLaTeX 为 xeCJK 宏包,LuaLaTeX 为 LuaTeX-ja 宏包;使用 XeLaTeX 和 LuaLaTeX 编译时,CTeX 宏集使用 UTF-8 编码,LaTeX 和 pdfLaTeX 时使用 GBK 编码。最终的排版效果因不同编译方式而已。 + +**本模板唯一推荐使用的是 XeLaTeX**,可以获得与 Word 模板100%接近的效果。发行版为 [TeXLive](http://tug.org/texlive/)**建议下载当年的最新版**,支持GNU/Linux, macOS, 和Windows操作系统,按需下载。这里暂不推荐其他发行版,毕竟按照 [L 叔](http://liam0205.me/)的名言 + +> 选择 TeX Live,选择简单的人生; +> +> 选择 MiKTeX,选择麻烦的人生; +> +> 选择 CTeX 套装,选择崩溃的人生。 `Linux` + ```bash # 单次编译 make # 持续集成 make pvc ``` + 或者 请使用`xelatex`,对`csuthesis_main.tex`文件进行编译。 Windows下可以使用`TexMaker`,`TexStudio`等IDE,选中`xelatex`编译器进行编译。 @@ -175,16 +306,28 @@ Windows下可以使用`TexMaker`,`TexStudio`等IDE,选中`xelatex`编译器进 本模板同时已经在macOS(10.14 & 12.3.1)进行正常运行。 -## 反馈与贡献 +#### 写作工具 + +推荐使用2种常用写作工具: + ++ [**TeXstudio**](http://texstudio.sourceforge.net/):TeXstudio is an integrated writing environment for creating LaTeX documents. Our goal is to make writing LaTeX as easy and comfortable as possible.(Windows上面支持最完善,macOS也支持) ++ **Sublime+LaTex**:[Windows部署指南](https://blog.csdn.net/qazxswed807/article/details/51234834)和[macOS部署指南](https://www.readern.com/sublime-text-latex-chinese-under-mac.html)。 + + + +## 5、反馈与贡献 由于新版本的撰写指南刚下发,难免有些地方错误,请及时反馈! 本模版是由诸多感兴趣的同学一起维护的开源项目,我们非常欢迎问题反馈和新的贡献者! -## 致谢 -Shaowen Xiong, CSU; + + +## 6、致谢 +Shaowen Xiong, CSU Shaoyong Li, CSU +[WolfBolin](https://wolfbolin.com), CSU diff --git a/content/.DS_Store b/content/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/content/.DS_Store and /dev/null differ diff --git a/csuthesis_main_template.pdf b/csuthesis_main_template.pdf deleted file mode 100644 index 4b52793..0000000 Binary files a/csuthesis_main_template.pdf and /dev/null differ diff --git a/CSUthesis.cls b/csuthesis_template/CSUthesis.cls similarity index 95% rename from CSUthesis.cls rename to csuthesis_template/CSUthesis.cls index 6d14ecc..b7e7b46 100644 --- a/CSUthesis.cls +++ b/csuthesis_template/CSUthesis.cls @@ -145,18 +145,21 @@ Just choose `xelatex', no `pdflatex' or `latex' and so on.} \abovedisplayshortskip \z@ \@plus3\p@ \belowdisplayshortskip 6.5\p@ \@plus3.5\p@ \@minus3\p@ } -% 协议页的标题按模板是华文新魏 -\setCJKfamilyfont{hwxw}{STXinwei}[AutoFakeBold] -\newcommand{\huawenxinwei}{\CJKfamily{hwxw}} + % 重定义ctex定义好的宋体和黑体,以支持伪加粗AutoFakeBold % 即支持类似word里的给黑体、宋体等中文字体加粗的操作,用\bfseries +% 需要设置主字体,避免正文使用默认字体(Linux可能为FandolSong-Regular) +\setCJKmainfont[AutoFakeBold]{SimSun} +% 设定多种字体定义 \let\heiti\relax \newCJKfontfamily[hei]\heiti{SimHei}[AutoFakeBold] \let\songti\relax \newCJKfontfamily[song]\songti{SimSun}[AutoFakeBold] \let\TimesNewRoman\relax \newCJKfontfamily[TimesNewRoman]\TimesNewRoman{Times New Roman}[AutoFakeBold] - +% 协议页的标题按模板是华文新魏 +\setCJKfamilyfont{hwxw}{STXinwei}[AutoFakeBold] +\newcommand{\huawenxinwei}{\CJKfamily{hwxw}} % 每行缩进两个汉字 \setlength{\parindent}{2em} @@ -628,11 +631,17 @@ Just choose `xelatex', no `pdflatex' or `latex' and so on.} \renewcommand{\thefigure}{\arabic{section}-\arabic{figure}} % \renewcommand{\thefigure} {\thesection-\arabic{figure}} -\renewenvironment{figure} +% 图片按照单独的段落进行留白设计,需要在正文排版搭配规范使用 +% 此处满足图片段前一行空行,段后一行空行,图片与标题间没有空白 +\renewenvironment{figure}[1][] { - \setlength\abovecaptionskip{4pt} %% 调整标题与图片距离 - \setlength\belowcaptionskip{0pt} %% 调整标题与下文距离 - \@float{figure}} + \setlength{\parskip}{10pt}% 调整浮动体上下的垂直间距 + \setlength{\intextsep}{20pt}% 调整浮动体和正文之间的垂直间距 + \setlength{\abovecaptionskip}{0pt}% 删除图片标题与下文的垂直间距 + \setlength{\belowcaptionskip}{0pt}% 删除图片标题与上文的垂直间距 + \setlength{\floatsep}{20pt}% 删除图片和正文之间的垂直间距 + \@float{figure}[#1]% 引入图片,不可与setlength交换顺序 + } {\end@float} %\captionsetup[subfigure]{labelfont=bf,labelsep=period,labelformat=mysublabelfmt} @@ -662,13 +671,33 @@ Just choose `xelatex', no `pdflatex' or `latex' and so on.} position=top } -\renewenvironment{table} - {%\vspace{0.3cm} % 调整表格与上文距离 - \setlength\abovecaptionskip{0pt} %% 调整标题与表格距离 - \setlength\belowcaptionskip{10pt} %% 调整标题与下文距离 - \@float{table}} +% 表格按照单独的段落进行留白设计,需要在正文排版搭配规范使用 +% 此处满足表格段前一行空行,段后没有空行,表格与标题间没有空白 +% 模板对于表格后是否应该有空行没有明确要求(示例有正文段前空行) +% 如果要在表格后删除空行,可将parskip改为20 +\renewenvironment{table}[1][] + { + \setlength{\parskip}{10pt}% 调整浮动体上下的垂直间距 + \setlength{\intextsep}{20pt}% 调整浮动体和正文之间的垂直间距 + \setlength{\abovecaptionskip}{0pt}% 删除表格标题与下文的垂直间距 + \setlength{\belowcaptionskip}{0pt}% 调整表格标题与上文的垂直间距 + \setlength{\floatsep}{20pt}% 删除表格和正文之间的垂直间距 + \@float{table}[#1]% 引入表格,不可与setlength交换顺序 + \centering% 将表格居中对齐 + } {\end@float} +% 修改tabular 环境, 设置表格中的行间距为正文行间距. +\let\csu@oldtabular\tabular +\let\csu@endoldtabular\endtabular +\renewenvironment{tabular} { + \bgroup + \renewcommand{\arraystretch}{1.38} + \csu@oldtabular +} { + \csu@endoldtabular\egroup +} + % 算法 % ------------------------------------------------------% \floatname{algorithm}{算法} @@ -694,19 +723,6 @@ Just choose `xelatex', no `pdflatex' or `latex' and so on.} labelwidth=2em % 包含标签的盒子的正常宽度;若实际宽度更宽,则使用实际宽度。 } -% 表格 % -% ------------------------------------------------------% -% 修改tabular 环境, 设置表格中的行间距为正文行间距. -\let\csu@oldtabular\tabular -\let\csu@endoldtabular\endtabular -\renewenvironment{tabular} { - \bgroup - \renewcommand{\arraystretch}{1.38} - \csu@oldtabular -} { - \csu@endoldtabular\egroup -} - % 表格字号应比正文小,一般五号/10.5pt,但是暂时没法再cls里设置(不然会影响到封面等tabular环境) % 所以目前只好在主文件里局部\AtBeginEnvironment diff --git a/Makefile b/csuthesis_template/Makefile old mode 100755 new mode 100644 similarity index 100% rename from Makefile rename to csuthesis_template/Makefile diff --git a/content/abstractcn.tex b/csuthesis_template/content/abstractcn.tex old mode 100755 new mode 100644 similarity index 100% rename from content/abstractcn.tex rename to csuthesis_template/content/abstractcn.tex diff --git a/content/abstracten.tex b/csuthesis_template/content/abstracten.tex old mode 100755 new mode 100644 similarity index 100% rename from content/abstracten.tex rename to csuthesis_template/content/abstracten.tex diff --git a/content/additional.tex b/csuthesis_template/content/additional.tex old mode 100755 new mode 100644 similarity index 100% rename from content/additional.tex rename to csuthesis_template/content/additional.tex diff --git a/content/appendix.tex b/csuthesis_template/content/appendix.tex similarity index 95% rename from content/appendix.tex rename to csuthesis_template/content/appendix.tex index b54ca4b..8a5c7c3 100644 --- a/content/appendix.tex +++ b/csuthesis_template/content/appendix.tex @@ -1,19 +1,19 @@ -{~} -\vspace{18pt} -\section{附录A (附录名称 )(三号黑体,加粗)(必要时)} % 无章节编号 - -附录正文… -…(格式参考正文)。 -换行示例 -。 - -%\newpage -% -%{~} -%\vspace{18pt} -%\section{附录B (附录名称 )(三号黑体,加粗)(必要时)} % 无章节编号 -% -%附录正文… -%…(格式参考正文)。 -%换行示例 -%。 +{~} +\vspace{18pt} +\section{附录A (附录名称 )(三号黑体,加粗)(必要时)} % 无章节编号 + +附录正文… +…(格式参考正文)。 +换行示例 +。 + +%\newpage +% +%{~} +%\vspace{18pt} +%\section{附录B (附录名称 )(三号黑体,加粗)(必要时)} % 无章节编号 +% +%附录正文… +%…(格式参考正文)。 +%换行示例 +%。 diff --git a/content/content.tex b/csuthesis_template/content/content.tex old mode 100755 new mode 100644 similarity index 100% rename from content/content.tex rename to csuthesis_template/content/content.tex diff --git a/content/denotation.tex b/csuthesis_template/content/denotation.tex similarity index 100% rename from content/denotation.tex rename to csuthesis_template/content/denotation.tex diff --git a/content/info.tex b/csuthesis_template/content/information.tex old mode 100755 new mode 100644 similarity index 100% rename from content/info.tex rename to csuthesis_template/content/information.tex diff --git a/csuthesis_main.tex b/csuthesis_template/csuthesis_main.tex similarity index 93% rename from csuthesis_main.tex rename to csuthesis_template/csuthesis_main.tex index de83256..62060d5 100644 --- a/csuthesis_main.tex +++ b/csuthesis_template/csuthesis_main.tex @@ -29,7 +29,7 @@ \renewcommand{\headrulewidth}{0pt} % 中文摘要之前无需页码 -\include{content/info} +\include{content/information} @@ -48,19 +48,17 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 扉页 % -----------------------------------------------% - \maketitlepage - \clearpage \mbox{} \clearpage -\setlength{\headheight}{9.6mm} -\setlength{\footskip}{7.9mm} -\setlength{\textheight}{681.5pt} % 调整版面高度 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 声明页 % -----------------------------------------------% +\setlength{\headheight}{9.6mm} +\setlength{\footskip}{7.9mm} +\setlength{\textheight}{681.5pt} \announcement \clearpage \mbox{} @@ -68,11 +66,14 @@ \fi %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% 设置页眉和页脚 % +% 全局设置页眉、页脚和页面高度 % \setlength{\headheight}{9.6mm} \setlength{\footskip}{7.9mm} +\setlength{\textheight}{681.5pt} +% 套用页面格式模板 \pagestyle{fancy} -\fancyhf[CF]{\TimesNewRoman \zihao{-5} \thepage} % 所有(奇数和偶数)中间页脚,TimesNewRoman小五号 +% 所有(奇数和偶数)中间页脚,TimesNewRoman小五号 +\fancyhf[CF]{\TimesNewRoman \zihao{-5} \thepage} \addtocontents{toc}{\vspace{-8pt}} @@ -184,6 +185,10 @@ % 正文 { + % 模板在cls文件中定义的页边距未考虑geometry的布局模型 + % 导致在页眉与正文第一行之间的距离不为零(25pt) + % 此处为临时补救措施,以实现视觉统一(By WolfBolin) + \setlength{\headsep}{10pt} % 表格字号应比正文小,一般五号/10.5pt,但是暂时没法再cls里设置(不然会影响到封面等tabular环境) % 所以目前只好在主文件里局部\AtBeginEnvironment \AtBeginEnvironment{tabular}{\zihao{5}} @@ -226,9 +231,9 @@ \phantomsection %% 解决目录中超链接地址错误问题 \addcontentsline{toc}{section}{参考文献} % 由于参考文献不是section,这句把参考文献加入目录 \zihao{-4} \setmainfont{Times New Roman} -\setlength{\baselineskip}{20pt} % 基准行间距 -\bibliographystyle{gbt7714-2015-little} -\bibliography{thesis-references} +\setlength{\baselineskip}{20pt} % 基准行间距 +\bibliographystyle{gbt7714/2015-numerical} % 使用2005会带来一些错误 +\bibliography{references} \clearpage % 附录 diff --git a/gbt7714-2005.bst b/csuthesis_template/gbt7714/2005.bst similarity index 100% rename from gbt7714-2005.bst rename to csuthesis_template/gbt7714/2005.bst diff --git a/gbt7714-2015-little.bst b/csuthesis_template/gbt7714/2015-little.bst similarity index 95% rename from gbt7714-2015-little.bst rename to csuthesis_template/gbt7714/2015-little.bst index 68a7c72..76f73a8 100644 --- a/gbt7714-2015-little.bst +++ b/csuthesis_template/gbt7714/2015-little.bst @@ -1,2274 +1,2274 @@ -%% -%% This is file `gbt7714-numerical.bst', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% gbt7714.dtx (with options: `2015,numerical') -%% ------------------------------------------------------------------- -%% GB/T 7714-2015 BibTeX Style -%% https://github.com/CTeX-org/gbt7714-bibtex-style -%% Version: 2020/06/08 v2.0.2 -%% ------------------------------------------------------------------- -%% Copyright (C) 2016-2020 by Zeping Lee -%% ------------------------------------------------------------------- -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2005/12/01 or later. -%% ------------------------------------------------------------------- -INTEGERS { - citation.et.al.min - citation.et.al.use.first - bibliography.et.al.min - bibliography.et.al.use.first - uppercase.name - terms.in.macro - year.after.author - period.after.author - sentence.case.title - link.title - title.in.journal - show.mark - space.before.mark - show.medium.type - slash.for.extraction - in.booktitle - short.journal - italic.journal - bold.journal.volume - show.missing.address.publisher - only.start.page - show.urldate - show.url - show.doi - show.preprint - show.note - show.english.translation - } - - FUNCTION {load.config} - { - #2 'citation.et.al.min := - #1 'citation.et.al.use.first := - #4 'bibliography.et.al.min := - #3 'bibliography.et.al.use.first := - #0 'uppercase.name := - #1 'terms.in.macro := - #0 'year.after.author := - #1 'period.after.author := - #1 'sentence.case.title := - #0 'link.title := - #1 'title.in.journal := - #1 'show.mark := - #1 'space.before.mark := - #1 'show.medium.type := - #1 'slash.for.extraction := - #0 'in.booktitle := - #0 'short.journal := - #0 'italic.journal := - #0 'bold.journal.volume := - #0 'show.missing.address.publisher := - #0 'only.start.page := - #1 'show.urldate := - #1 'show.url := - #1 'show.doi := - #0 'show.preprint := - #0 'show.note := - #0 'show.english.translation := - } - - ENTRY - { address - archivePrefix - author - booktitle - date - doi - edition - editor - eprint - eprinttype - howpublished - institution - journal - journaltitle - key - langid - language - location - mark - medium - note - number - organization - pages - publisher - school - series - shortjournal - title - translation - translator - url - urldate - volume - year - } - { entry.lang entry.is.electronic is.pure.electronic entry.numbered } - { label extra.label sort.label short.list entry.mark entry.url } - - INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } - - INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } - - INTEGERS { charptr len } - - FUNCTION {init.state.consts} - { #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := - #4 'after.slash := - #3 'lang.zh := - #4 'lang.ja := - #1 'lang.en := - #2 'lang.ru := - #0 'lang.other := - } - - FUNCTION {bbl.anonymous} - { entry.lang lang.zh = - { "佚名" } - { "Anon" } - if$ - } - - FUNCTION {bbl.space} - { entry.lang lang.zh = - { "\ " } - { " " } - if$ - } - - FUNCTION {bbl.and} - { "" } - - FUNCTION {bbl.et.al} - { entry.lang lang.zh = - { "等" } - { entry.lang lang.ja = - { "他" } - { entry.lang lang.ru = - { "идр" } - { "et~al." } - if$ - } - if$ - } - if$ - } - - FUNCTION {citation.and} - { terms.in.macro - { "{\biband}" } - 'bbl.and - if$ - } - - FUNCTION {citation.et.al} - { terms.in.macro - { "{\bibetal}" } - 'bbl.et.al - if$ - } - - FUNCTION {bbl.colon} { ": " } - - FUNCTION {bbl.wide.space} { "\quad " } - - FUNCTION {bbl.slash} { "//\allowbreak " } - - FUNCTION {bbl.sine.loco} - { entry.lang lang.zh = - { "[出版地不详]" } - { "[S.l.]" } - if$ - } - - FUNCTION {bbl.sine.nomine} - { entry.lang lang.zh = - { "[出版者不详]" } - { "[s.n.]" } - if$ - } - - FUNCTION {bbl.sine.loco.sine.nomine} - { entry.lang lang.zh = - { "[出版地不详: 出版者不详]" } - { "[S.l.: s.n.]" } - if$ - } - - FUNCTION {not} - { { #0 } - { #1 } - if$ - } - - FUNCTION {and} - { 'skip$ - { pop$ #0 } - if$ - } - - FUNCTION {or} - { { pop$ #1 } - 'skip$ - if$ - } - - STRINGS { s t } - - FUNCTION {output.nonnull} - { 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { output.state after.slash = - { bbl.slash * write$ - newline$ - } - { add.period$ " " * write$ } - if$ - } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s - } - - FUNCTION {output} - { duplicate$ empty$ - 'pop$ - 'output.nonnull - if$ - } - - FUNCTION {output.after} - { 't := - duplicate$ empty$ - 'pop$ - { 's := - output.state mid.sentence = - { t * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { output.state after.slash = - { bbl.slash * write$ } - { add.period$ " " * write$ } - if$ - } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s - } - if$ - } - - FUNCTION {output.check} - { 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ - } - - FUNCTION {fin.entry} - { add.period$ - write$ - show.english.translation entry.lang lang.zh = and - { ")" - write$ - } - 'skip$ - if$ - newline$ - } - - FUNCTION {new.block} - { output.state before.all = - 'skip$ - { output.state after.slash = - 'skip$ - { after.block 'output.state := } - if$ - } - if$ - } - - FUNCTION {new.sentence} - { output.state after.block = - 'skip$ - { output.state before.all = - 'skip$ - { output.state after.slash = - 'skip$ - { after.sentence 'output.state := } - if$ - } - if$ - } - if$ - } - - FUNCTION {new.slash} - { output.state before.all = - 'skip$ - { slash.for.extraction - { after.slash 'output.state := } - { after.block 'output.state := } - if$ - } - if$ - } - - FUNCTION {new.block.checka} - { empty$ - 'skip$ - 'new.block - if$ - } - - FUNCTION {new.block.checkb} - { empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ - } - - FUNCTION {new.sentence.checka} - { empty$ - 'skip$ - 'new.sentence - if$ - } - - FUNCTION {new.sentence.checkb} - { empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ - } - - FUNCTION {field.or.null} - { duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ - } - - FUNCTION {italicize} - { duplicate$ empty$ - { pop$ "" } - { "\textit{" swap$ * "}" * } - if$ - } - - INTEGERS { byte second.byte } - - INTEGERS { char.lang tmp.lang } - - STRINGS { tmp.str } - - FUNCTION {get.str.lang} - { 'tmp.str := - lang.other 'tmp.lang := - #1 'charptr := - tmp.str text.length$ #1 + 'len := - { charptr len < } - { tmp.str charptr #1 substring$ chr.to.int$ 'byte := - byte #128 < - { charptr #1 + 'charptr := - byte #64 > byte #91 < and byte #96 > byte #123 < and or - { lang.en 'char.lang := } - { lang.other 'char.lang := } - if$ - } - { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := - byte #224 < - { charptr #2 + 'charptr := - byte #207 > byte #212 < and - byte #212 = second.byte #176 < and or - { lang.ru 'char.lang := } - { lang.other 'char.lang := } - if$ - } - { byte #240 < - { charptr #3 + 'charptr := - byte #227 > byte #234 < and - { lang.zh 'char.lang := } - { byte #227 = - { second.byte #143 > - { lang.zh 'char.lang := } - { second.byte #128 > second.byte #132 < and - { lang.ja 'char.lang := } - { lang.other 'char.lang := } - if$ - } - if$ - } - { byte #239 = - second.byte #163 > second.byte #172 < and and - { lang.zh 'char.lang := } - { lang.other 'char.lang := } - if$ - } - if$ - } - if$ - } - { charptr #4 + 'charptr := - byte #240 = second.byte #159 > and - { lang.zh 'char.lang := } - { lang.other 'char.lang := } - if$ - } - if$ - } - if$ - } - if$ - char.lang tmp.lang > - { char.lang 'tmp.lang := } - 'skip$ - if$ - } - while$ - tmp.lang - } - - FUNCTION {check.entry.lang} - { author field.or.null - title field.or.null * - get.str.lang - } - - STRINGS { entry.langid } - - FUNCTION {set.entry.lang} - { "" 'entry.langid := - language empty$ not - { language 'entry.langid := } - 'skip$ - if$ - langid empty$ not - { langid 'entry.langid := } - 'skip$ - if$ - entry.langid empty$ - { check.entry.lang } - { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or - { lang.en } - { entry.langid "chinese" = - { lang.zh } - { entry.langid "japanese" = - { lang.ja } - { entry.langid "russian" = - { lang.ru } - { check.entry.lang } - if$ - } - if$ - } - if$ - } - if$ - } - if$ - 'entry.lang := - } - - FUNCTION {set.entry.numbered} - { type$ "patent" = - type$ "standard" = or - type$ "techreport" = or - { #1 'entry.numbered := } - { #0 'entry.numbered := } - if$ - } - - INTEGERS { nameptr namesleft numnames name.lang } - - FUNCTION {format.name} - { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := - t "others" = - { bbl.et.al } - { t get.str.lang 'name.lang := - name.lang lang.en = - { t #1 "{vv~}{ll}{~f{~}}" format.name$ - uppercase.name - { "u" change.case$ } - 'skip$ - if$ - t #1 "{, jj}" format.name$ * - } - { t #1 "{ll}{ff}" format.name$ } - if$ - } - if$ - } - - FUNCTION {format.names} - { 's := - #1 'nameptr := - s num.names$ 'numnames := - "" - numnames 'namesleft := - { namesleft #0 > } - { s nameptr format.name bbl.et.al = - numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or - { ", " * - bbl.et.al * - #1 'namesleft := - } - { nameptr #1 > - { namesleft #1 = bbl.and "" = not and - { bbl.and * } - { ", " * } - if$ - } - 'skip$ - if$ - s nameptr format.name * - } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } - - FUNCTION {format.key} - { empty$ - { key field.or.null } - { "" } - if$ - } - - FUNCTION {format.authors} - { author empty$ not - { author format.names } - { "empty author in " cite$ * warning$ - "" - } - if$ - } - - FUNCTION {format.editors} - { editor empty$ - { "" } - { editor format.names } - if$ - } - - FUNCTION {format.translators} - { translator empty$ - { "" } - { translator format.names - entry.lang lang.zh = - { translator num.names$ #3 > - { "译" * } - { ", 译" * } - if$ - } - 'skip$ - if$ - } - if$ - } - - FUNCTION {format.full.names} - {'s := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := - t get.str.lang 'name.lang := - name.lang lang.en = - { t #1 "{vv~}{ll}" format.name$ 't := } - { t #1 "{ll}{ff}" format.name$ 't := } - if$ - nameptr #1 > - { - namesleft #1 > - { ", " * t * } - { - numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } - - FUNCTION {author.editor.full} - { author empty$ - { editor empty$ - { "" } - { editor format.full.names } - if$ - } - { author format.full.names } - if$ - } - - FUNCTION {author.full} - { author empty$ - { "" } - { author format.full.names } - if$ - } - - FUNCTION {editor.full} - { editor empty$ - { "" } - { editor format.full.names } - if$ - } - - FUNCTION {make.full.names} - { type$ "book" = - type$ "inbook" = - or - 'author.editor.full - { type$ "collection" = - type$ "proceedings" = - or - 'editor.full - 'author.full - if$ - } - if$ - } - - FUNCTION {output.bibitem} - { newline$ - "\bibitem[" write$ - label ")" * - make.full.names duplicate$ short.list = - { pop$ } - { * } - if$ - 's := - s text.length$ 'charptr := - { charptr #0 > s charptr #1 substring$ "[" = not and } - { charptr #1 - 'charptr := } - while$ - charptr #0 > - { "{" s * "}" * } - { s } - if$ - "]{" * write$ - cite$ write$ - "}" write$ - newline$ - "" - before.all 'output.state := - } - - FUNCTION {change.sentence.case} - { entry.lang lang.en = - { "t" change.case$ } - 'skip$ - if$ - } - - FUNCTION {add.link} - { url empty$ not - { "\href{" url * "}{" * swap$ * "}" * } - { doi empty$ not - { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } - 'skip$ - if$ - } - if$ - } - - FUNCTION {format.title} - { title empty$ - { "" } - { title - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered number empty$ not and - { bbl.colon * number * } - 'skip$ - if$ - link.title - 'add.link - 'skip$ - if$ - } - if$ - } - - FUNCTION {tie.or.space.connect} - { duplicate$ text.length$ #3 < - { "~" } - { " " } - if$ - swap$ * * - } - - FUNCTION {either.or.check} - { empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ - } - - FUNCTION {is.digit} - { duplicate$ empty$ - { pop$ #0 } - { chr.to.int$ - duplicate$ "0" chr.to.int$ < - { pop$ #0 } - { "9" chr.to.int$ > - { #0 } - { #1 } - if$ - } - if$ - } - if$ - } - - FUNCTION {is.number} - { 's := - s empty$ - { #0 } - { s text.length$ 'charptr := - { charptr #0 > - s charptr #1 substring$ is.digit - and - } - { charptr #1 - 'charptr := } - while$ - charptr not - } - if$ - } - - FUNCTION {format.volume} - { volume empty$ not - { volume is.number - { entry.lang lang.zh = - { "第 " volume * " 卷" * } - { "volume" volume tie.or.space.connect } - if$ - } - { volume } - if$ - } - { "" } - if$ - } - - FUNCTION {format.number} - { number empty$ not - { number is.number - { entry.lang lang.zh = - { "第 " number * " 册" * } - { "number" number tie.or.space.connect } - if$ - } - { number } - if$ - } - { "" } - if$ - } - - FUNCTION {format.volume.number} - { volume empty$ not - { format.volume } - { format.number } - if$ - } - - FUNCTION {format.title.vol.num} - { title - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered - { number empty$ not - { bbl.colon * number * } - 'skip$ - if$ - } - { format.volume.number 's := - s empty$ not - { bbl.colon * s * } - 'skip$ - if$ - } - if$ - } - - FUNCTION {format.series.vol.num.title} - { format.volume.number 's := - series empty$ not - { series - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered - { bbl.wide.space * } - { bbl.colon * - s empty$ not - { s * bbl.wide.space * } - 'skip$ - if$ - } - if$ - title * - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered number empty$ not and - { bbl.colon * number * } - 'skip$ - if$ - } - { format.title.vol.num } - if$ - link.title - 'add.link - 'skip$ - if$ - } - - FUNCTION {format.booktitle.vol.num} - { booktitle - entry.numbered - 'skip$ - { format.volume.number 's := - s empty$ not - { bbl.colon * s * } - 'skip$ - if$ - } - if$ - } - - FUNCTION {format.series.vol.num.booktitle} - { format.volume.number 's := - series empty$ not - { series bbl.colon * - entry.numbered not s empty$ not and - { s * bbl.wide.space * } - 'skip$ - if$ - booktitle * - } - { format.booktitle.vol.num } - if$ - in.booktitle - { duplicate$ empty$ not entry.lang lang.en = and - { "In: " swap$ * } - 'skip$ - if$ - } - 'skip$ - if$ - } - - FUNCTION {remove.period} - { 't := - "" 's := - { t empty$ not } - { t #1 #1 substring$ 'tmp.str := - tmp.str "." = not - { s tmp.str * 's := } - 'skip$ - if$ - t #2 global.max$ substring$ 't := - } - while$ - s - } - - FUNCTION {abbreviate} - { remove.period - 't := - t "l" change.case$ 's := - "" - s "physical review letters" = - { "Phys Rev Lett" } - 'skip$ - if$ - 's := - s empty$ - { t } - { pop$ s } - if$ - } - - FUNCTION {format.journal} - { "" - short.journal - { shortjournal empty$ not - { shortjournal * } - { journal empty$ not - { journal * abbreviate } - { journaltitle empty$ not - { journaltitle * abbreviate } - 'skip$ - if$ - } - if$ - } - if$ - } - { journal empty$ not - { journal * } - { journaltitle empty$ not - { journaltitle * } - 'skip$ - if$ - } - if$ - } - if$ - duplicate$ empty$ not - { italic.journal entry.lang lang.en = and - 'italicize - 'skip$ - if$ - } - 'skip$ - if$ - } - - FUNCTION {set.entry.mark} - { entry.mark empty$ not - 'pop$ - { mark empty$ not - { pop$ mark 'entry.mark := } - { 'entry.mark := } - if$ - } - if$ - } - - FUNCTION {format.mark} - { show.mark - { entry.mark - show.medium.type - { medium empty$ not - { "/" * medium * } - { entry.is.electronic - { "/OL" * } - 'skip$ - if$ - } - if$ - } - 'skip$ - if$ - 'entry.mark := - space.before.mark - { " [" entry.mark * "]" * } - { "[" entry.mark * "]" * } - if$ - } - { "" } - if$ - } - - FUNCTION {num.to.ordinal} - { duplicate$ text.length$ 'charptr := - duplicate$ charptr #1 substring$ 's := - s "1" = - { "st" * } - { s "2" = - { "nd" * } - { s "3" = - { "rd" * } - { "th" * } - if$ - } - if$ - } - if$ - } - - FUNCTION {format.edition} - { edition empty$ - { "" } - { edition is.number - { entry.lang lang.zh = - { edition " 版" * } - { edition num.to.ordinal " ed." * } - if$ - } - { entry.lang lang.en = - { edition change.sentence.case 's := - s "Revised" = s "Revised edition" = or - { "Rev. ed." } - { s " ed." *} - if$ - } - { edition } - if$ - } - if$ - } - if$ - } - - FUNCTION {format.publisher} - { publisher empty$ not - { publisher } - { school empty$ not - { school } - { organization empty$ not - { organization } - { institution empty$ not - { institution } - { "" } - if$ - } - if$ - } - if$ - } - if$ - } - - FUNCTION {format.address.publisher} - { address empty$ not - { address } - { location empty$ not - { location } - { "" } - if$ - } - if$ - duplicate$ empty$ not - { format.publisher empty$ not - { bbl.colon * format.publisher * } - { entry.is.electronic not show.missing.address.publisher and - { bbl.colon * bbl.sine.nomine * } - 'skip$ - if$ - } - if$ - } - { pop$ - entry.is.electronic not show.missing.address.publisher and - { format.publisher empty$ not - { bbl.sine.loco bbl.colon * format.publisher * } - { bbl.sine.loco.sine.nomine } - if$ - } - { format.publisher empty$ not - { format.publisher } - { "" } - if$ - } - if$ - } - if$ - } - - FUNCTION {extract.before.dash} - { duplicate$ empty$ - { pop$ "" } - { 's := - #1 'charptr := - s text.length$ #1 + 'len := - { charptr len < - s charptr #1 substring$ "-" = not - and - } - { charptr #1 + 'charptr := } - while$ - s #1 charptr #1 - substring$ - } - if$ - } - - FUNCTION {extract.after.dash} - { duplicate$ empty$ - { pop$ "" } - { 's := - #1 'charptr := - s text.length$ #1 + 'len := - { charptr len < - s charptr #1 substring$ "-" = not - and - } - { charptr #1 + 'charptr := } - while$ - { charptr len < - s charptr #1 substring$ "-" = - and - } - { charptr #1 + 'charptr := } - while$ - s charptr global.max$ substring$ - } - if$ - } - - FUNCTION {contains.dash} - { duplicate$ empty$ - { pop$ #0 } - { 's := - { s empty$ not - s #1 #1 substring$ "-" = not - and - } - { s #2 global.max$ substring$ 's := } - while$ - s empty$ not - } - if$ - } - - FUNCTION {format.year} - { year empty$ not - { year extract.before.dash } - { date empty$ not - { date extract.before.dash } - { "empty year in " cite$ * warning$ - urldate empty$ not - { "[" urldate extract.before.dash * "]" * } - { "" } - if$ - } - if$ - } - if$ - extra.label * - } - - FUNCTION {format.date} - { type$ "patent" = type$ "newspaper" = or - date empty$ not and - { date } - { year } - if$ - } - - FUNCTION {format.editdate} - { date empty$ not - { "\allowbreak(" date * ")" * } - { "" } - if$ - } - - FUNCTION {format.urldate} - { urldate empty$ not - show.urldate show.url and is.pure.electronic or and - url empty$ not and - { "\allowbreak[" urldate * "]" * } - { "" } - if$ - } - - FUNCTION {hyphenate} - { 't := - "" - { t empty$ not } - { t #1 #1 substring$ "-" = - { "-" * - { t #1 #1 substring$ "-" = } - { t #2 global.max$ substring$ 't := } - while$ - } - { t #1 #1 substring$ * - t #2 global.max$ substring$ 't := - } - if$ - } - while$ - } - - FUNCTION {format.pages} - { pages empty$ - { "" } - { pages hyphenate } - if$ - } - - FUNCTION {format.extracted.pages} - { pages empty$ - { "" } - { pages - only.start.page - 'extract.before.dash - 'hyphenate - if$ - } - if$ - } - - FUNCTION {format.journal.volume} - { volume empty$ not - { bold.journal.volume - { "\textbf{" volume * "}" * } - { volume } - if$ - } - { "" } - if$ - } - - FUNCTION {format.journal.number} - { number empty$ not - { "\penalty0 (" number * ")" * } - { "" } - if$ - } - - FUNCTION {format.journal.pages} - { pages empty$ - { "" } - { ": " - format.extracted.pages * - } - if$ - } - - FUNCTION {format.periodical.year.volume.number} - { year empty$ not - { year extract.before.dash } - { "empty year in periodical " cite$ * warning$ } - if$ - volume empty$ not - { ", " * volume extract.before.dash * } - 'skip$ - if$ - number empty$ not - { "\penalty0 (" * number extract.before.dash * ")" * } - 'skip$ - if$ - year contains.dash - { "--" * - year extract.after.dash empty$ - volume extract.after.dash empty$ and - number extract.after.dash empty$ and not - { year extract.after.dash empty$ not - { year extract.after.dash * } - { year extract.before.dash * } - if$ - volume empty$ not - { ", " * volume extract.after.dash * } - 'skip$ - if$ - number empty$ not - { "\penalty0 (" * number extract.after.dash * ")" * } - 'skip$ - if$ - } - 'skip$ - if$ - } - 'skip$ - if$ - } - - FUNCTION {check.url} - { url empty$ not - { "\url{" url * "}" * 'entry.url := - #1 'entry.is.electronic := - } - { howpublished empty$ not - { howpublished #1 #5 substring$ "\url{" = - { howpublished 'entry.url := - #1 'entry.is.electronic := - } - 'skip$ - if$ - } - { note empty$ not - { note #1 #5 substring$ "\url{" = - { note 'entry.url := - #1 'entry.is.electronic := - } - 'skip$ - if$ - } - 'skip$ - if$ - } - if$ - } - if$ - } - - FUNCTION {format.url} - { entry.url - } - - FUNCTION {output.url} - { entry.url empty$ not - { new.block - entry.url output - } - 'skip$ - if$ - } - - FUNCTION {check.doi} - { doi empty$ not - { #1 'entry.is.electronic := } - 'skip$ - if$ - } - - FUNCTION {is.in.url} - { 's := - s empty$ - { #1 } - { entry.url empty$ - { #0 } - { s text.length$ 'len := - entry.url text.length$ 'charptr := - { entry.url charptr len substring$ s = not - charptr #0 > - and - } - { charptr #1 - 'charptr := } - while$ - charptr - } - if$ - } - if$ - } - - FUNCTION {format.doi} - { "" - doi empty$ not - { "" 's := - doi 't := - #0 'numnames := - { t empty$ not} - { t #1 #1 substring$ 'tmp.str := - tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or - { t #2 #1 substring$ empty$ - { s tmp.str * 's := } - 'skip$ - if$ - s empty$ s is.in.url or - 'skip$ - { numnames #1 + 'numnames := - numnames #1 > - { ", " * } - { "DOI: " * } - if$ - "\doi{" s * "}" * * - } - if$ - "" 's := - } - { s tmp.str * 's := } - if$ - t #2 global.max$ substring$ 't := - } - while$ - } - 'skip$ - if$ - } - - FUNCTION {output.doi} - { doi empty$ not show.doi and - show.english.translation entry.lang lang.zh = and not and - { new.block - format.doi output - } - 'skip$ - if$ - } - - FUNCTION {check.electronic} - { "" 'entry.url := - #0 'entry.is.electronic := - 'check.doi - 'skip$ - if$ - 'check.url - 'skip$ - if$ - medium empty$ not - { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or - { #1 'entry.is.electronic := } - 'skip$ - if$ - } - 'skip$ - if$ - } - - FUNCTION {format.eprint} - { eprinttype empty$ not - { eprinttype } - { archivePrefix empty$ not - { archivePrefix } - { "" } - if$ - } - if$ - 's := - s empty$ not - { s ": \eprint{" * - url empty$ not - { url } - { "https://" s "l" change.case$ * ".org/abs/" * eprint * } - if$ - * "}{" * - eprint * "}" * - } - { eprint } - if$ - } - - FUNCTION {output.eprint} - { show.preprint eprint empty$ not and - { new.block - format.eprint output - } - 'skip$ - if$ - } - - FUNCTION {format.note} - { note empty$ not show.note and - { note } - { "" } - if$ - } - - FUNCTION {output.translation} - { show.english.translation entry.lang lang.zh = and - { translation empty$ not - { translation } - { "[English translation missing!]" } - if$ - " (in Chinese)" * output - write$ - format.doi duplicate$ empty$ not - { newline$ - write$ - } - 'pop$ - if$ - " \\" write$ - newline$ - "(" write$ - "" - before.all 'output.state := - } - 'skip$ - if$ - } - - FUNCTION {empty.misc.check} - { author empty$ title empty$ - year empty$ - and and - key empty$ not and - { "all relevant fields are empty in " cite$ * warning$ } - 'skip$ - if$ - } - - FUNCTION {monograph} - { output.bibitem - output.translation - author empty$ not - { format.authors } - { editor empty$ not - { format.editors } - { "empty author and editor in " cite$ * warning$ - "" - } - if$ - } - if$ - output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.series.vol.num.title "title" output.check - "M" set.entry.mark - format.mark "" output.after - new.block - format.translators output - new.sentence - format.edition output - new.block - format.address.publisher output - year.after.author not - { format.year "year" output.check } - 'skip$ - if$ - format.pages bbl.colon output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry - } - - FUNCTION {incollection} - { output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.title "title" output.check - "M" set.entry.mark - format.mark "" output.after - new.block - format.translators output - new.slash - format.editors output - new.block - format.series.vol.num.booktitle "booktitle" output.check - new.block - format.edition output - new.block - format.address.publisher output - year.after.author not - { format.year "year" output.check } - 'skip$ - if$ - format.extracted.pages bbl.colon output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry - } - - FUNCTION {periodical} - { output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.title "title" output.check - "J" set.entry.mark - format.mark "" output.after - new.block - format.periodical.year.volume.number output - new.block - format.address.publisher output - year.after.author not - { format.date "year" output.check } - 'skip$ - if$ - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry - } - - FUNCTION {article} - { output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - title.in.journal - { format.title "title" output.check - "J" set.entry.mark - format.mark "" output.after - new.block - } - 'skip$ - if$ - format.journal "journal" output.check - year.after.author not - { format.date "year" output.check } - 'skip$ - if$ - format.journal.volume output - format.journal.number "" output.after - format.journal.pages "" output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry - } - - FUNCTION {patent} - { output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.title "title" output.check - "P" set.entry.mark - format.mark "" output.after - new.block - format.date "year" output.check - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry - } - - FUNCTION {electronic} - { #1 #1 check.electronic - #1 'entry.is.electronic := - #1 'is.pure.electronic := - output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.series.vol.num.title "title" output.check - "EB" set.entry.mark - format.mark "" output.after - new.block - format.address.publisher output - year.after.author not - { date empty$ - { format.date output } - 'skip$ - if$ - } - 'skip$ - if$ - format.pages bbl.colon output.after - format.editdate "" output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry - } - - FUNCTION {preprint} - { output.bibitem - output.translation - author empty$ not - { format.authors } - { editor empty$ not - { format.editors } - { "empty author and editor in " cite$ * warning$ - "" - } - if$ - } - if$ - output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - title.in.journal - { format.series.vol.num.title "title" output.check - "Z" set.entry.mark - format.mark "" output.after - new.block - } - 'skip$ - if$ - format.translators output - new.sentence - format.edition output - new.block - output.eprint - year.after.author not - { format.year "year" output.check } - 'skip$ - if$ - format.pages bbl.colon output.after - format.urldate "" output.after - output.url - new.block - format.note output - fin.entry - } - - FUNCTION {misc} - { journal empty$ not - 'article - { booktitle empty$ not - 'incollection - { publisher empty$ not - 'monograph - { eprint empty$ not show.preprint and - 'preprint - { entry.is.electronic - 'electronic - { - "Z" set.entry.mark - monograph - } - if$ - } - if$ - } - if$ - } - if$ - } - if$ - empty.misc.check - } - - FUNCTION {archive} - { "A" set.entry.mark - misc - } - - FUNCTION {book} { monograph } - - FUNCTION {booklet} { book } - - FUNCTION {collection} - { "G" set.entry.mark - monograph - } - - FUNCTION {database} - { "DB" set.entry.mark - electronic - } - - FUNCTION {dataset} - { "DS" set.entry.mark - electronic - } - - FUNCTION {inbook} { book } - - FUNCTION {inproceedings} - { "C" set.entry.mark - incollection - } - - FUNCTION {conference} { inproceedings } - - FUNCTION {map} - { "CM" set.entry.mark - misc - } - - FUNCTION {manual} { monograph } - - FUNCTION {mastersthesis} - { "D" set.entry.mark - monograph - } - - FUNCTION {newspaper} - { "N" set.entry.mark - article - } - - FUNCTION {online} - { "EB" set.entry.mark - electronic - } - - FUNCTION {phdthesis} { mastersthesis } - - FUNCTION {proceedings} - { "C" set.entry.mark - monograph - } - - FUNCTION {software} - { "CP" set.entry.mark - electronic - } - - FUNCTION {standard} - { "S" set.entry.mark - misc - } - - FUNCTION {techreport} - { "R" set.entry.mark - misc - } - - FUNCTION {unpublished} { misc } - - FUNCTION {default.type} { misc } - - MACRO {jan} {"January"} - - MACRO {feb} {"February"} - - MACRO {mar} {"March"} - - MACRO {apr} {"April"} - - MACRO {may} {"May"} - - MACRO {jun} {"June"} - - MACRO {jul} {"July"} - - MACRO {aug} {"August"} - - MACRO {sep} {"September"} - - MACRO {oct} {"October"} - - MACRO {nov} {"November"} - - MACRO {dec} {"December"} - - MACRO {acmcs} {"ACM Computing Surveys"} - - MACRO {acta} {"Acta Informatica"} - - MACRO {cacm} {"Communications of the ACM"} - - MACRO {ibmjrd} {"IBM Journal of Research and Development"} - - MACRO {ibmsj} {"IBM Systems Journal"} - - MACRO {ieeese} {"IEEE Transactions on Software Engineering"} - - MACRO {ieeetc} {"IEEE Transactions on Computers"} - - MACRO {ieeetcad} - {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} - - MACRO {ipl} {"Information Processing Letters"} - - MACRO {jacm} {"Journal of the ACM"} - - MACRO {jcss} {"Journal of Computer and System Sciences"} - - MACRO {scp} {"Science of Computer Programming"} - - MACRO {sicomp} {"SIAM Journal on Computing"} - - MACRO {tocs} {"ACM Transactions on Computer Systems"} - - MACRO {tods} {"ACM Transactions on Database Systems"} - - MACRO {tog} {"ACM Transactions on Graphics"} - - MACRO {toms} {"ACM Transactions on Mathematical Software"} - - MACRO {toois} {"ACM Transactions on Office Information Systems"} - - MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} - - MACRO {tcs} {"Theoretical Computer Science"} - - FUNCTION {sortify} - { purify$ - "l" change.case$ - } - - FUNCTION {chop.word} - { 's := - 'len := - s #1 len substring$ = - { s len #1 + global.max$ substring$ } - 's - if$ - } - - FUNCTION {format.lab.name} - { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := - t "others" = - { citation.et.al } - { t get.str.lang 'name.lang := - name.lang lang.zh = name.lang lang.ja = or - { t #1 "{ll}{ff}" format.name$ } - { t #1 "{vv~}{ll}" format.name$ } - if$ - } - if$ - } - - FUNCTION {format.lab.names} - { 's := - #1 'nameptr := - s num.names$ 'numnames := - "" - numnames 'namesleft := - { namesleft #0 > } - { s nameptr format.lab.name citation.et.al = - numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or - { bbl.space * - citation.et.al * - #1 'namesleft := - } - { nameptr #1 > - { namesleft #1 = citation.and "" = not and - { citation.and * } - { ", " * } - if$ - } - 'skip$ - if$ - s nameptr format.lab.name * - } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ - } - - FUNCTION {author.key.label} - { author empty$ - { key empty$ - { cite$ #1 #3 substring$ } - 'key - if$ - } - { author format.lab.names } - if$ - } - - FUNCTION {author.editor.key.label} - { author empty$ - { editor empty$ - { key empty$ - { cite$ #1 #3 substring$ } - 'key - if$ - } - { editor format.lab.names } - if$ - } - { author format.lab.names } - if$ - } - - FUNCTION {author.key.organization.label} - { author empty$ - { key empty$ - { organization empty$ - { cite$ #1 #3 substring$ } - { "The " #4 organization chop.word #3 text.prefix$ } - if$ - } - 'key - if$ - } - { author format.lab.names } - if$ - } - - FUNCTION {editor.key.organization.label} - { editor empty$ - { key empty$ - { organization empty$ - { cite$ #1 #3 substring$ } - { "The " #4 organization chop.word #3 text.prefix$ } - if$ - } - 'key - if$ - } - { editor format.lab.names } - if$ - } - - FUNCTION {calc.short.authors} - { type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label - { type$ "collection" = - type$ "proceedings" = - or - { editor empty$ not - 'editor.key.organization.label - 'author.key.organization.label - if$ - } - 'author.key.label - if$ - } - if$ - 'short.list := - } - - FUNCTION {calc.label} - { calc.short.authors - short.list - "(" - * - format.year duplicate$ empty$ - short.list key field.or.null = or - { pop$ "" } - 'skip$ - if$ - * - 'label := - } - - INTEGERS { seq.num } - - FUNCTION {init.seq} - { #0 'seq.num :=} - - FUNCTION {int.to.fix} - { "000000000" swap$ int.to.str$ * - #-1 #10 substring$ - } - - FUNCTION {presort} - { set.entry.lang - set.entry.numbered - show.url show.doi check.electronic - #0 'is.pure.electronic := - calc.label - label sortify - " " - * - seq.num #1 + 'seq.num := - seq.num int.to.fix - 'sort.label := - sort.label * - #1 entry.max$ substring$ - 'sort.key$ := - } - - STRINGS { longest.label last.label next.extra } - - INTEGERS { longest.label.width last.extra.num number.label } - - FUNCTION {initialize.longest.label} - { "" 'longest.label := - #0 int.to.chr$ 'last.label := - "" 'next.extra := - #0 'longest.label.width := - #0 'last.extra.num := - #0 'number.label := - } - - FUNCTION {forward.pass} - { last.label label = - { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := - } - { "a" chr.to.int$ 'last.extra.num := - "" 'extra.label := - label 'last.label := - } - if$ - number.label #1 + 'number.label := - } - - FUNCTION {reverse.pass} - { next.extra "b" = - { "a" 'extra.label := } - 'skip$ - if$ - extra.label 'next.extra := - extra.label - duplicate$ empty$ - 'skip$ - { "{\natexlab{" swap$ * "}}" * } - if$ - 'extra.label := - label extra.label * 'label := - } - - FUNCTION {bib.sort.order} - { sort.label 'sort.key$ := - } - - FUNCTION {begin.bib} - { preamble$ empty$ - 'skip$ - { preamble$ write$ newline$ } - if$ - "\begin{thebibliography}{" number.label int.to.str$ * "}" * - write$ newline$ - terms.in.macro - { "\providecommand{\biband}{和}" - write$ newline$ - "\providecommand{\bibetal}{等}" - write$ newline$ - } - 'skip$ - if$ - "\providecommand{\natexlab}[1]{#1}" - write$ newline$ - "\providecommand{\url}[1]{#1}" - write$ newline$ - "\expandafter\ifx\csname urlstyle\endcsname\relax\else" - write$ newline$ - " \urlstyle{same}\fi" - write$ newline$ - "\expandafter\ifx\csname href\endcsname\relax" - write$ newline$ - " \DeclareUrlCommand\doi{\urlstyle{rm}}" - write$ newline$ - " \def\eprint#1#2{#2}" - write$ newline$ - "\else" - write$ newline$ - " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" - write$ newline$ - " \let\eprint\href" - write$ newline$ - "\fi" - write$ newline$ - } - - FUNCTION {end.bib} - { newline$ - "\end{thebibliography}" write$ newline$ - } - - READ - - EXECUTE {init.state.consts} - - EXECUTE {load.config} - - EXECUTE {init.seq} - - ITERATE {presort} - - SORT - - EXECUTE {initialize.longest.label} - - ITERATE {forward.pass} - - REVERSE {reverse.pass} - - ITERATE {bib.sort.order} - - SORT - - EXECUTE {begin.bib} - - ITERATE {call.type$} - +%% +%% This is file `gbt7714-numerical.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gbt7714.dtx (with options: `2015,numerical') +%% ------------------------------------------------------------------- +%% GB/T 7714-2015 BibTeX Style +%% https://github.com/CTeX-org/gbt7714-bibtex-style +%% Version: 2020/06/08 v2.0.2 +%% ------------------------------------------------------------------- +%% Copyright (C) 2016-2020 by Zeping Lee +%% ------------------------------------------------------------------- +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% https://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% ------------------------------------------------------------------- +INTEGERS { + citation.et.al.min + citation.et.al.use.first + bibliography.et.al.min + bibliography.et.al.use.first + uppercase.name + terms.in.macro + year.after.author + period.after.author + sentence.case.title + link.title + title.in.journal + show.mark + space.before.mark + show.medium.type + slash.for.extraction + in.booktitle + short.journal + italic.journal + bold.journal.volume + show.missing.address.publisher + only.start.page + show.urldate + show.url + show.doi + show.preprint + show.note + show.english.translation + } + + FUNCTION {load.config} + { + #2 'citation.et.al.min := + #1 'citation.et.al.use.first := + #4 'bibliography.et.al.min := + #3 'bibliography.et.al.use.first := + #0 'uppercase.name := + #1 'terms.in.macro := + #0 'year.after.author := + #1 'period.after.author := + #1 'sentence.case.title := + #0 'link.title := + #1 'title.in.journal := + #1 'show.mark := + #1 'space.before.mark := + #1 'show.medium.type := + #1 'slash.for.extraction := + #0 'in.booktitle := + #0 'short.journal := + #0 'italic.journal := + #0 'bold.journal.volume := + #0 'show.missing.address.publisher := + #0 'only.start.page := + #1 'show.urldate := + #1 'show.url := + #1 'show.doi := + #0 'show.preprint := + #0 'show.note := + #0 'show.english.translation := + } + + ENTRY + { address + archivePrefix + author + booktitle + date + doi + edition + editor + eprint + eprinttype + howpublished + institution + journal + journaltitle + key + langid + language + location + mark + medium + note + number + organization + pages + publisher + school + series + shortjournal + title + translation + translator + url + urldate + volume + year + } + { entry.lang entry.is.electronic is.pure.electronic entry.numbered } + { label extra.label sort.label short.list entry.mark entry.url } + + INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } + + INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } + + INTEGERS { charptr len } + + FUNCTION {init.state.consts} + { #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.slash := + #3 'lang.zh := + #4 'lang.ja := + #1 'lang.en := + #2 'lang.ru := + #0 'lang.other := + } + + FUNCTION {bbl.anonymous} + { entry.lang lang.zh = + { "佚名" } + { "Anon" } + if$ + } + + FUNCTION {bbl.space} + { entry.lang lang.zh = + { "\ " } + { " " } + if$ + } + + FUNCTION {bbl.and} + { "" } + + FUNCTION {bbl.et.al} + { entry.lang lang.zh = + { "等" } + { entry.lang lang.ja = + { "他" } + { entry.lang lang.ru = + { "идр" } + { "et~al." } + if$ + } + if$ + } + if$ + } + + FUNCTION {citation.and} + { terms.in.macro + { "{\biband}" } + 'bbl.and + if$ + } + + FUNCTION {citation.et.al} + { terms.in.macro + { "{\bibetal}" } + 'bbl.et.al + if$ + } + + FUNCTION {bbl.colon} { ": " } + + FUNCTION {bbl.wide.space} { "\quad " } + + FUNCTION {bbl.slash} { "//\allowbreak " } + + FUNCTION {bbl.sine.loco} + { entry.lang lang.zh = + { "[出版地不详]" } + { "[S.l.]" } + if$ + } + + FUNCTION {bbl.sine.nomine} + { entry.lang lang.zh = + { "[出版者不详]" } + { "[s.n.]" } + if$ + } + + FUNCTION {bbl.sine.loco.sine.nomine} + { entry.lang lang.zh = + { "[出版地不详: 出版者不详]" } + { "[S.l.: s.n.]" } + if$ + } + + FUNCTION {not} + { { #0 } + { #1 } + if$ + } + + FUNCTION {and} + { 'skip$ + { pop$ #0 } + if$ + } + + FUNCTION {or} + { { pop$ #1 } + 'skip$ + if$ + } + + STRINGS { s t } + + FUNCTION {output.nonnull} + { 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.slash = + { bbl.slash * write$ + newline$ + } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s + } + + FUNCTION {output} + { duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ + } + + FUNCTION {output.after} + { 't := + duplicate$ empty$ + 'pop$ + { 's := + output.state mid.sentence = + { t * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.slash = + { bbl.slash * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s + } + if$ + } + + FUNCTION {output.check} + { 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ + } + + FUNCTION {fin.entry} + { add.period$ + write$ + show.english.translation entry.lang lang.zh = and + { ")" + write$ + } + 'skip$ + if$ + newline$ + } + + FUNCTION {new.block} + { output.state before.all = + 'skip$ + { output.state after.slash = + 'skip$ + { after.block 'output.state := } + if$ + } + if$ + } + + FUNCTION {new.sentence} + { output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { output.state after.slash = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ + } + if$ + } + + FUNCTION {new.slash} + { output.state before.all = + 'skip$ + { slash.for.extraction + { after.slash 'output.state := } + { after.block 'output.state := } + if$ + } + if$ + } + + FUNCTION {new.block.checka} + { empty$ + 'skip$ + 'new.block + if$ + } + + FUNCTION {new.block.checkb} + { empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ + } + + FUNCTION {new.sentence.checka} + { empty$ + 'skip$ + 'new.sentence + if$ + } + + FUNCTION {new.sentence.checkb} + { empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ + } + + FUNCTION {field.or.null} + { duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ + } + + FUNCTION {italicize} + { duplicate$ empty$ + { pop$ "" } + { "\textit{" swap$ * "}" * } + if$ + } + + INTEGERS { byte second.byte } + + INTEGERS { char.lang tmp.lang } + + STRINGS { tmp.str } + + FUNCTION {get.str.lang} + { 'tmp.str := + lang.other 'tmp.lang := + #1 'charptr := + tmp.str text.length$ #1 + 'len := + { charptr len < } + { tmp.str charptr #1 substring$ chr.to.int$ 'byte := + byte #128 < + { charptr #1 + 'charptr := + byte #64 > byte #91 < and byte #96 > byte #123 < and or + { lang.en 'char.lang := } + { lang.other 'char.lang := } + if$ + } + { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := + byte #224 < + { charptr #2 + 'charptr := + byte #207 > byte #212 < and + byte #212 = second.byte #176 < and or + { lang.ru 'char.lang := } + { lang.other 'char.lang := } + if$ + } + { byte #240 < + { charptr #3 + 'charptr := + byte #227 > byte #234 < and + { lang.zh 'char.lang := } + { byte #227 = + { second.byte #143 > + { lang.zh 'char.lang := } + { second.byte #128 > second.byte #132 < and + { lang.ja 'char.lang := } + { lang.other 'char.lang := } + if$ + } + if$ + } + { byte #239 = + second.byte #163 > second.byte #172 < and and + { lang.zh 'char.lang := } + { lang.other 'char.lang := } + if$ + } + if$ + } + if$ + } + { charptr #4 + 'charptr := + byte #240 = second.byte #159 > and + { lang.zh 'char.lang := } + { lang.other 'char.lang := } + if$ + } + if$ + } + if$ + } + if$ + char.lang tmp.lang > + { char.lang 'tmp.lang := } + 'skip$ + if$ + } + while$ + tmp.lang + } + + FUNCTION {check.entry.lang} + { author field.or.null + title field.or.null * + get.str.lang + } + + STRINGS { entry.langid } + + FUNCTION {set.entry.lang} + { "" 'entry.langid := + language empty$ not + { language 'entry.langid := } + 'skip$ + if$ + langid empty$ not + { langid 'entry.langid := } + 'skip$ + if$ + entry.langid empty$ + { check.entry.lang } + { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or + { lang.en } + { entry.langid "chinese" = + { lang.zh } + { entry.langid "japanese" = + { lang.ja } + { entry.langid "russian" = + { lang.ru } + { check.entry.lang } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + 'entry.lang := + } + + FUNCTION {set.entry.numbered} + { type$ "patent" = + type$ "standard" = or + type$ "techreport" = or + { #1 'entry.numbered := } + { #0 'entry.numbered := } + if$ + } + + INTEGERS { nameptr namesleft numnames name.lang } + + FUNCTION {format.name} + { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + t "others" = + { bbl.et.al } + { t get.str.lang 'name.lang := + name.lang lang.en = + { t #1 "{vv~}{ll}{~f{~}}" format.name$ + uppercase.name + { "u" change.case$ } + 'skip$ + if$ + t #1 "{, jj}" format.name$ * + } + { t #1 "{ll}{ff}" format.name$ } + if$ + } + if$ + } + + FUNCTION {format.names} + { 's := + #1 'nameptr := + s num.names$ 'numnames := + "" + numnames 'namesleft := + { namesleft #0 > } + { s nameptr format.name bbl.et.al = + numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or + { ", " * + bbl.et.al * + #1 'namesleft := + } + { nameptr #1 > + { namesleft #1 = bbl.and "" = not and + { bbl.and * } + { ", " * } + if$ + } + 'skip$ + if$ + s nameptr format.name * + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } + + FUNCTION {format.key} + { empty$ + { key field.or.null } + { "" } + if$ + } + + FUNCTION {format.authors} + { author empty$ not + { author format.names } + { "empty author in " cite$ * warning$ + "" + } + if$ + } + + FUNCTION {format.editors} + { editor empty$ + { "" } + { editor format.names } + if$ + } + + FUNCTION {format.translators} + { translator empty$ + { "" } + { translator format.names + entry.lang lang.zh = + { translator num.names$ #3 > + { "译" * } + { ", 译" * } + if$ + } + 'skip$ + if$ + } + if$ + } + + FUNCTION {format.full.names} + {'s := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + t get.str.lang 'name.lang := + name.lang lang.en = + { t #1 "{vv~}{ll}" format.name$ 't := } + { t #1 "{ll}{ff}" format.name$ 't := } + if$ + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } + + FUNCTION {author.editor.full} + { author empty$ + { editor empty$ + { "" } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ + } + + FUNCTION {author.full} + { author empty$ + { "" } + { author format.full.names } + if$ + } + + FUNCTION {editor.full} + { editor empty$ + { "" } + { editor format.full.names } + if$ + } + + FUNCTION {make.full.names} + { type$ "book" = + type$ "inbook" = + or + 'author.editor.full + { type$ "collection" = + type$ "proceedings" = + or + 'editor.full + 'author.full + if$ + } + if$ + } + + FUNCTION {output.bibitem} + { newline$ + "\bibitem[" write$ + label ")" * + make.full.names duplicate$ short.list = + { pop$ } + { * } + if$ + 's := + s text.length$ 'charptr := + { charptr #0 > s charptr #1 substring$ "[" = not and } + { charptr #1 - 'charptr := } + while$ + charptr #0 > + { "{" s * "}" * } + { s } + if$ + "]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := + } + + FUNCTION {change.sentence.case} + { entry.lang lang.en = + { "t" change.case$ } + 'skip$ + if$ + } + + FUNCTION {add.link} + { url empty$ not + { "\href{" url * "}{" * swap$ * "}" * } + { doi empty$ not + { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } + 'skip$ + if$ + } + if$ + } + + FUNCTION {format.title} + { title empty$ + { "" } + { title + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered number empty$ not and + { bbl.colon * number * } + 'skip$ + if$ + link.title + 'add.link + 'skip$ + if$ + } + if$ + } + + FUNCTION {tie.or.space.connect} + { duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * + } + + FUNCTION {either.or.check} + { empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ + } + + FUNCTION {is.digit} + { duplicate$ empty$ + { pop$ #0 } + { chr.to.int$ + duplicate$ "0" chr.to.int$ < + { pop$ #0 } + { "9" chr.to.int$ > + { #0 } + { #1 } + if$ + } + if$ + } + if$ + } + + FUNCTION {is.number} + { 's := + s empty$ + { #0 } + { s text.length$ 'charptr := + { charptr #0 > + s charptr #1 substring$ is.digit + and + } + { charptr #1 - 'charptr := } + while$ + charptr not + } + if$ + } + + FUNCTION {format.volume} + { volume empty$ not + { volume is.number + { entry.lang lang.zh = + { "第 " volume * " 卷" * } + { "volume" volume tie.or.space.connect } + if$ + } + { volume } + if$ + } + { "" } + if$ + } + + FUNCTION {format.number} + { number empty$ not + { number is.number + { entry.lang lang.zh = + { "第 " number * " 册" * } + { "number" number tie.or.space.connect } + if$ + } + { number } + if$ + } + { "" } + if$ + } + + FUNCTION {format.volume.number} + { volume empty$ not + { format.volume } + { format.number } + if$ + } + + FUNCTION {format.title.vol.num} + { title + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered + { number empty$ not + { bbl.colon * number * } + 'skip$ + if$ + } + { format.volume.number 's := + s empty$ not + { bbl.colon * s * } + 'skip$ + if$ + } + if$ + } + + FUNCTION {format.series.vol.num.title} + { format.volume.number 's := + series empty$ not + { series + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered + { bbl.wide.space * } + { bbl.colon * + s empty$ not + { s * bbl.wide.space * } + 'skip$ + if$ + } + if$ + title * + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered number empty$ not and + { bbl.colon * number * } + 'skip$ + if$ + } + { format.title.vol.num } + if$ + link.title + 'add.link + 'skip$ + if$ + } + + FUNCTION {format.booktitle.vol.num} + { booktitle + entry.numbered + 'skip$ + { format.volume.number 's := + s empty$ not + { bbl.colon * s * } + 'skip$ + if$ + } + if$ + } + + FUNCTION {format.series.vol.num.booktitle} + { format.volume.number 's := + series empty$ not + { series bbl.colon * + entry.numbered not s empty$ not and + { s * bbl.wide.space * } + 'skip$ + if$ + booktitle * + } + { format.booktitle.vol.num } + if$ + in.booktitle + { duplicate$ empty$ not entry.lang lang.en = and + { "In: " swap$ * } + 'skip$ + if$ + } + 'skip$ + if$ + } + + FUNCTION {remove.period} + { 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ 'tmp.str := + tmp.str "." = not + { s tmp.str * 's := } + 'skip$ + if$ + t #2 global.max$ substring$ 't := + } + while$ + s + } + + FUNCTION {abbreviate} + { remove.period + 't := + t "l" change.case$ 's := + "" + s "physical review letters" = + { "Phys Rev Lett" } + 'skip$ + if$ + 's := + s empty$ + { t } + { pop$ s } + if$ + } + + FUNCTION {format.journal} + { "" + short.journal + { shortjournal empty$ not + { shortjournal * } + { journal empty$ not + { journal * abbreviate } + { journaltitle empty$ not + { journaltitle * abbreviate } + 'skip$ + if$ + } + if$ + } + if$ + } + { journal empty$ not + { journal * } + { journaltitle empty$ not + { journaltitle * } + 'skip$ + if$ + } + if$ + } + if$ + duplicate$ empty$ not + { italic.journal entry.lang lang.en = and + 'italicize + 'skip$ + if$ + } + 'skip$ + if$ + } + + FUNCTION {set.entry.mark} + { entry.mark empty$ not + 'pop$ + { mark empty$ not + { pop$ mark 'entry.mark := } + { 'entry.mark := } + if$ + } + if$ + } + + FUNCTION {format.mark} + { show.mark + { entry.mark + show.medium.type + { medium empty$ not + { "/" * medium * } + { entry.is.electronic + { "/OL" * } + 'skip$ + if$ + } + if$ + } + 'skip$ + if$ + 'entry.mark := + space.before.mark + { " [" entry.mark * "]" * } + { "[" entry.mark * "]" * } + if$ + } + { "" } + if$ + } + + FUNCTION {num.to.ordinal} + { duplicate$ text.length$ 'charptr := + duplicate$ charptr #1 substring$ 's := + s "1" = + { "st" * } + { s "2" = + { "nd" * } + { s "3" = + { "rd" * } + { "th" * } + if$ + } + if$ + } + if$ + } + + FUNCTION {format.edition} + { edition empty$ + { "" } + { edition is.number + { entry.lang lang.zh = + { edition " 版" * } + { edition num.to.ordinal " ed." * } + if$ + } + { entry.lang lang.en = + { edition change.sentence.case 's := + s "Revised" = s "Revised edition" = or + { "Rev. ed." } + { s " ed." *} + if$ + } + { edition } + if$ + } + if$ + } + if$ + } + + FUNCTION {format.publisher} + { publisher empty$ not + { publisher } + { school empty$ not + { school } + { organization empty$ not + { organization } + { institution empty$ not + { institution } + { "" } + if$ + } + if$ + } + if$ + } + if$ + } + + FUNCTION {format.address.publisher} + { address empty$ not + { address } + { location empty$ not + { location } + { "" } + if$ + } + if$ + duplicate$ empty$ not + { format.publisher empty$ not + { bbl.colon * format.publisher * } + { entry.is.electronic not show.missing.address.publisher and + { bbl.colon * bbl.sine.nomine * } + 'skip$ + if$ + } + if$ + } + { pop$ + entry.is.electronic not show.missing.address.publisher and + { format.publisher empty$ not + { bbl.sine.loco bbl.colon * format.publisher * } + { bbl.sine.loco.sine.nomine } + if$ + } + { format.publisher empty$ not + { format.publisher } + { "" } + if$ + } + if$ + } + if$ + } + + FUNCTION {extract.before.dash} + { duplicate$ empty$ + { pop$ "" } + { 's := + #1 'charptr := + s text.length$ #1 + 'len := + { charptr len < + s charptr #1 substring$ "-" = not + and + } + { charptr #1 + 'charptr := } + while$ + s #1 charptr #1 - substring$ + } + if$ + } + + FUNCTION {extract.after.dash} + { duplicate$ empty$ + { pop$ "" } + { 's := + #1 'charptr := + s text.length$ #1 + 'len := + { charptr len < + s charptr #1 substring$ "-" = not + and + } + { charptr #1 + 'charptr := } + while$ + { charptr len < + s charptr #1 substring$ "-" = + and + } + { charptr #1 + 'charptr := } + while$ + s charptr global.max$ substring$ + } + if$ + } + + FUNCTION {contains.dash} + { duplicate$ empty$ + { pop$ #0 } + { 's := + { s empty$ not + s #1 #1 substring$ "-" = not + and + } + { s #2 global.max$ substring$ 's := } + while$ + s empty$ not + } + if$ + } + + FUNCTION {format.year} + { year empty$ not + { year extract.before.dash } + { date empty$ not + { date extract.before.dash } + { "empty year in " cite$ * warning$ + urldate empty$ not + { "[" urldate extract.before.dash * "]" * } + { "" } + if$ + } + if$ + } + if$ + extra.label * + } + + FUNCTION {format.date} + { type$ "patent" = type$ "newspaper" = or + date empty$ not and + { date } + { year } + if$ + } + + FUNCTION {format.editdate} + { date empty$ not + { "\allowbreak(" date * ")" * } + { "" } + if$ + } + + FUNCTION {format.urldate} + { urldate empty$ not + show.urldate show.url and is.pure.electronic or and + url empty$ not and + { "\allowbreak[" urldate * "]" * } + { "" } + if$ + } + + FUNCTION {hyphenate} + { 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { "-" * + { t #1 #1 substring$ "-" = } + { t #2 global.max$ substring$ 't := } + while$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ + } + + FUNCTION {format.pages} + { pages empty$ + { "" } + { pages hyphenate } + if$ + } + + FUNCTION {format.extracted.pages} + { pages empty$ + { "" } + { pages + only.start.page + 'extract.before.dash + 'hyphenate + if$ + } + if$ + } + + FUNCTION {format.journal.volume} + { volume empty$ not + { bold.journal.volume + { "\textbf{" volume * "}" * } + { volume } + if$ + } + { "" } + if$ + } + + FUNCTION {format.journal.number} + { number empty$ not + { "\penalty0 (" number * ")" * } + { "" } + if$ + } + + FUNCTION {format.journal.pages} + { pages empty$ + { "" } + { ": " + format.extracted.pages * + } + if$ + } + + FUNCTION {format.periodical.year.volume.number} + { year empty$ not + { year extract.before.dash } + { "empty year in periodical " cite$ * warning$ } + if$ + volume empty$ not + { ", " * volume extract.before.dash * } + 'skip$ + if$ + number empty$ not + { "\penalty0 (" * number extract.before.dash * ")" * } + 'skip$ + if$ + year contains.dash + { "--" * + year extract.after.dash empty$ + volume extract.after.dash empty$ and + number extract.after.dash empty$ and not + { year extract.after.dash empty$ not + { year extract.after.dash * } + { year extract.before.dash * } + if$ + volume empty$ not + { ", " * volume extract.after.dash * } + 'skip$ + if$ + number empty$ not + { "\penalty0 (" * number extract.after.dash * ")" * } + 'skip$ + if$ + } + 'skip$ + if$ + } + 'skip$ + if$ + } + + FUNCTION {check.url} + { url empty$ not + { "\url{" url * "}" * 'entry.url := + #1 'entry.is.electronic := + } + { howpublished empty$ not + { howpublished #1 #5 substring$ "\url{" = + { howpublished 'entry.url := + #1 'entry.is.electronic := + } + 'skip$ + if$ + } + { note empty$ not + { note #1 #5 substring$ "\url{" = + { note 'entry.url := + #1 'entry.is.electronic := + } + 'skip$ + if$ + } + 'skip$ + if$ + } + if$ + } + if$ + } + + FUNCTION {format.url} + { entry.url + } + + FUNCTION {output.url} + { entry.url empty$ not + { new.block + entry.url output + } + 'skip$ + if$ + } + + FUNCTION {check.doi} + { doi empty$ not + { #1 'entry.is.electronic := } + 'skip$ + if$ + } + + FUNCTION {is.in.url} + { 's := + s empty$ + { #1 } + { entry.url empty$ + { #0 } + { s text.length$ 'len := + entry.url text.length$ 'charptr := + { entry.url charptr len substring$ s = not + charptr #0 > + and + } + { charptr #1 - 'charptr := } + while$ + charptr + } + if$ + } + if$ + } + + FUNCTION {format.doi} + { "" + doi empty$ not + { "" 's := + doi 't := + #0 'numnames := + { t empty$ not} + { t #1 #1 substring$ 'tmp.str := + tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or + { t #2 #1 substring$ empty$ + { s tmp.str * 's := } + 'skip$ + if$ + s empty$ s is.in.url or + 'skip$ + { numnames #1 + 'numnames := + numnames #1 > + { ", " * } + { "DOI: " * } + if$ + "\doi{" s * "}" * * + } + if$ + "" 's := + } + { s tmp.str * 's := } + if$ + t #2 global.max$ substring$ 't := + } + while$ + } + 'skip$ + if$ + } + + FUNCTION {output.doi} + { doi empty$ not show.doi and + show.english.translation entry.lang lang.zh = and not and + { new.block + format.doi output + } + 'skip$ + if$ + } + + FUNCTION {check.electronic} + { "" 'entry.url := + #0 'entry.is.electronic := + 'check.doi + 'skip$ + if$ + 'check.url + 'skip$ + if$ + medium empty$ not + { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or + { #1 'entry.is.electronic := } + 'skip$ + if$ + } + 'skip$ + if$ + } + + FUNCTION {format.eprint} + { eprinttype empty$ not + { eprinttype } + { archivePrefix empty$ not + { archivePrefix } + { "" } + if$ + } + if$ + 's := + s empty$ not + { s ": \eprint{" * + url empty$ not + { url } + { "https://" s "l" change.case$ * ".org/abs/" * eprint * } + if$ + * "}{" * + eprint * "}" * + } + { eprint } + if$ + } + + FUNCTION {output.eprint} + { show.preprint eprint empty$ not and + { new.block + format.eprint output + } + 'skip$ + if$ + } + + FUNCTION {format.note} + { note empty$ not show.note and + { note } + { "" } + if$ + } + + FUNCTION {output.translation} + { show.english.translation entry.lang lang.zh = and + { translation empty$ not + { translation } + { "[English translation missing!]" } + if$ + " (in Chinese)" * output + write$ + format.doi duplicate$ empty$ not + { newline$ + write$ + } + 'pop$ + if$ + " \\" write$ + newline$ + "(" write$ + "" + before.all 'output.state := + } + 'skip$ + if$ + } + + FUNCTION {empty.misc.check} + { author empty$ title empty$ + year empty$ + and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ + } + + FUNCTION {monograph} + { output.bibitem + output.translation + author empty$ not + { format.authors } + { editor empty$ not + { format.editors } + { "empty author and editor in " cite$ * warning$ + "" + } + if$ + } + if$ + output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.series.vol.num.title "title" output.check + "M" set.entry.mark + format.mark "" output.after + new.block + format.translators output + new.sentence + format.edition output + new.block + format.address.publisher output + year.after.author not + { format.year "year" output.check } + 'skip$ + if$ + format.pages bbl.colon output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry + } + + FUNCTION {incollection} + { output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.title "title" output.check + "M" set.entry.mark + format.mark "" output.after + new.block + format.translators output + new.slash + format.editors output + new.block + format.series.vol.num.booktitle "booktitle" output.check + new.block + format.edition output + new.block + format.address.publisher output + year.after.author not + { format.year "year" output.check } + 'skip$ + if$ + format.extracted.pages bbl.colon output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry + } + + FUNCTION {periodical} + { output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.title "title" output.check + "J" set.entry.mark + format.mark "" output.after + new.block + format.periodical.year.volume.number output + new.block + format.address.publisher output + year.after.author not + { format.date "year" output.check } + 'skip$ + if$ + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry + } + + FUNCTION {article} + { output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + title.in.journal + { format.title "title" output.check + "J" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ + format.journal "journal" output.check + year.after.author not + { format.date "year" output.check } + 'skip$ + if$ + format.journal.volume output + format.journal.number "" output.after + format.journal.pages "" output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry + } + + FUNCTION {patent} + { output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.title "title" output.check + "P" set.entry.mark + format.mark "" output.after + new.block + format.date "year" output.check + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry + } + + FUNCTION {electronic} + { #1 #1 check.electronic + #1 'entry.is.electronic := + #1 'is.pure.electronic := + output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.series.vol.num.title "title" output.check + "EB" set.entry.mark + format.mark "" output.after + new.block + format.address.publisher output + year.after.author not + { date empty$ + { format.date output } + 'skip$ + if$ + } + 'skip$ + if$ + format.pages bbl.colon output.after + format.editdate "" output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry + } + + FUNCTION {preprint} + { output.bibitem + output.translation + author empty$ not + { format.authors } + { editor empty$ not + { format.editors } + { "empty author and editor in " cite$ * warning$ + "" + } + if$ + } + if$ + output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + title.in.journal + { format.series.vol.num.title "title" output.check + "Z" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ + format.translators output + new.sentence + format.edition output + new.block + output.eprint + year.after.author not + { format.year "year" output.check } + 'skip$ + if$ + format.pages bbl.colon output.after + format.urldate "" output.after + output.url + new.block + format.note output + fin.entry + } + + FUNCTION {misc} + { journal empty$ not + 'article + { booktitle empty$ not + 'incollection + { publisher empty$ not + 'monograph + { eprint empty$ not show.preprint and + 'preprint + { entry.is.electronic + 'electronic + { + "Z" set.entry.mark + monograph + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + empty.misc.check + } + + FUNCTION {archive} + { "A" set.entry.mark + misc + } + + FUNCTION {book} { monograph } + + FUNCTION {booklet} { book } + + FUNCTION {collection} + { "G" set.entry.mark + monograph + } + + FUNCTION {database} + { "DB" set.entry.mark + electronic + } + + FUNCTION {dataset} + { "DS" set.entry.mark + electronic + } + + FUNCTION {inbook} { book } + + FUNCTION {inproceedings} + { "C" set.entry.mark + incollection + } + + FUNCTION {conference} { inproceedings } + + FUNCTION {map} + { "CM" set.entry.mark + misc + } + + FUNCTION {manual} { monograph } + + FUNCTION {mastersthesis} + { "D" set.entry.mark + monograph + } + + FUNCTION {newspaper} + { "N" set.entry.mark + article + } + + FUNCTION {online} + { "EB" set.entry.mark + electronic + } + + FUNCTION {phdthesis} { mastersthesis } + + FUNCTION {proceedings} + { "C" set.entry.mark + monograph + } + + FUNCTION {software} + { "CP" set.entry.mark + electronic + } + + FUNCTION {standard} + { "S" set.entry.mark + misc + } + + FUNCTION {techreport} + { "R" set.entry.mark + misc + } + + FUNCTION {unpublished} { misc } + + FUNCTION {default.type} { misc } + + MACRO {jan} {"January"} + + MACRO {feb} {"February"} + + MACRO {mar} {"March"} + + MACRO {apr} {"April"} + + MACRO {may} {"May"} + + MACRO {jun} {"June"} + + MACRO {jul} {"July"} + + MACRO {aug} {"August"} + + MACRO {sep} {"September"} + + MACRO {oct} {"October"} + + MACRO {nov} {"November"} + + MACRO {dec} {"December"} + + MACRO {acmcs} {"ACM Computing Surveys"} + + MACRO {acta} {"Acta Informatica"} + + MACRO {cacm} {"Communications of the ACM"} + + MACRO {ibmjrd} {"IBM Journal of Research and Development"} + + MACRO {ibmsj} {"IBM Systems Journal"} + + MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + + MACRO {ieeetc} {"IEEE Transactions on Computers"} + + MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + + MACRO {ipl} {"Information Processing Letters"} + + MACRO {jacm} {"Journal of the ACM"} + + MACRO {jcss} {"Journal of Computer and System Sciences"} + + MACRO {scp} {"Science of Computer Programming"} + + MACRO {sicomp} {"SIAM Journal on Computing"} + + MACRO {tocs} {"ACM Transactions on Computer Systems"} + + MACRO {tods} {"ACM Transactions on Database Systems"} + + MACRO {tog} {"ACM Transactions on Graphics"} + + MACRO {toms} {"ACM Transactions on Mathematical Software"} + + MACRO {toois} {"ACM Transactions on Office Information Systems"} + + MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + + MACRO {tcs} {"Theoretical Computer Science"} + + FUNCTION {sortify} + { purify$ + "l" change.case$ + } + + FUNCTION {chop.word} + { 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ + } + + FUNCTION {format.lab.name} + { "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + t "others" = + { citation.et.al } + { t get.str.lang 'name.lang := + name.lang lang.zh = name.lang lang.ja = or + { t #1 "{ll}{ff}" format.name$ } + { t #1 "{vv~}{ll}" format.name$ } + if$ + } + if$ + } + + FUNCTION {format.lab.names} + { 's := + #1 'nameptr := + s num.names$ 'numnames := + "" + numnames 'namesleft := + { namesleft #0 > } + { s nameptr format.lab.name citation.et.al = + numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or + { bbl.space * + citation.et.al * + #1 'namesleft := + } + { nameptr #1 > + { namesleft #1 = citation.and "" = not and + { citation.and * } + { ", " * } + if$ + } + 'skip$ + if$ + s nameptr format.lab.name * + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ + } + + FUNCTION {author.key.label} + { author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ + } + + FUNCTION {author.editor.key.label} + { author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ + } + + FUNCTION {author.key.organization.label} + { author empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { author format.lab.names } + if$ + } + + FUNCTION {editor.key.organization.label} + { editor empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { editor format.lab.names } + if$ + } + + FUNCTION {calc.short.authors} + { type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "collection" = + type$ "proceedings" = + or + { editor empty$ not + 'editor.key.organization.label + 'author.key.organization.label + if$ + } + 'author.key.label + if$ + } + if$ + 'short.list := + } + + FUNCTION {calc.label} + { calc.short.authors + short.list + "(" + * + format.year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'label := + } + + INTEGERS { seq.num } + + FUNCTION {init.seq} + { #0 'seq.num :=} + + FUNCTION {int.to.fix} + { "000000000" swap$ int.to.str$ * + #-1 #10 substring$ + } + + FUNCTION {presort} + { set.entry.lang + set.entry.numbered + show.url show.doi check.electronic + #0 'is.pure.electronic := + calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label * + #1 entry.max$ substring$ + 'sort.key$ := + } + + STRINGS { longest.label last.label next.extra } + + INTEGERS { longest.label.width last.extra.num number.label } + + FUNCTION {initialize.longest.label} + { "" 'longest.label := + #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'longest.label.width := + #0 'last.extra.num := + #0 'number.label := + } + + FUNCTION {forward.pass} + { last.label label = + { last.extra.num #1 + 'last.extra.num := + last.extra.num int.to.chr$ 'extra.label := + } + { "a" chr.to.int$ 'last.extra.num := + "" 'extra.label := + label 'last.label := + } + if$ + number.label #1 + 'number.label := + } + + FUNCTION {reverse.pass} + { next.extra "b" = + { "a" 'extra.label := } + 'skip$ + if$ + extra.label 'next.extra := + extra.label + duplicate$ empty$ + 'skip$ + { "{\natexlab{" swap$ * "}}" * } + if$ + 'extra.label := + label extra.label * 'label := + } + + FUNCTION {bib.sort.order} + { sort.label 'sort.key$ := + } + + FUNCTION {begin.bib} + { preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + terms.in.macro + { "\providecommand{\biband}{和}" + write$ newline$ + "\providecommand{\bibetal}{等}" + write$ newline$ + } + 'skip$ + if$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{#1}" + write$ newline$ + "\expandafter\ifx\csname urlstyle\endcsname\relax\else" + write$ newline$ + " \urlstyle{same}\fi" + write$ newline$ + "\expandafter\ifx\csname href\endcsname\relax" + write$ newline$ + " \DeclareUrlCommand\doi{\urlstyle{rm}}" + write$ newline$ + " \def\eprint#1#2{#2}" + write$ newline$ + "\else" + write$ newline$ + " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" + write$ newline$ + " \let\eprint\href" + write$ newline$ + "\fi" + write$ newline$ + } + + FUNCTION {end.bib} + { newline$ + "\end{thebibliography}" write$ newline$ + } + + READ + + EXECUTE {init.state.consts} + + EXECUTE {load.config} + + EXECUTE {init.seq} + + ITERATE {presort} + + SORT + + EXECUTE {initialize.longest.label} + + ITERATE {forward.pass} + + REVERSE {reverse.pass} + + ITERATE {bib.sort.order} + + SORT + + EXECUTE {begin.bib} + + ITERATE {call.type$} + EXECUTE {end.bib} \ No newline at end of file diff --git a/gbt7714-2015-numerical.bst b/csuthesis_template/gbt7714/2015-numerical.bst similarity index 94% rename from gbt7714-2015-numerical.bst rename to csuthesis_template/gbt7714/2015-numerical.bst index 643be54..c38de66 100644 --- a/gbt7714-2015-numerical.bst +++ b/csuthesis_template/gbt7714/2015-numerical.bst @@ -1,2448 +1,2448 @@ -%% -%% This is file `gbt7714-numerical.bst', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% gbt7714.dtx (with options: `2015,numerical') -%% ------------------------------------------------------------------- -%% GB/T 7714 BibTeX Style -%% https://github.com/zepinglee/gbt7714-bibtex-style -%% Version: 2022/03/21 v2.1.4 -%% ------------------------------------------------------------------- -%% Copyright (C) 2016--2022 by Zeping Lee -%% ------------------------------------------------------------------- -%% This file may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.3c -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% https://www.latex-project.org/lppl.txt -%% and version 1.3c or later is part of all distributions of LaTeX -%% version 2008 or later. -%% ------------------------------------------------------------------- -INTEGERS { - citation.et.al.min - citation.et.al.use.first - bibliography.et.al.min - bibliography.et.al.use.first - uppercase.name - terms.in.macro - year.after.author - period.after.author - italic.book.title - sentence.case.title - link.title - title.in.journal - show.patent.country - show.mark - space.before.mark - show.medium.type - short.journal - italic.journal - bold.journal.volume - show.missing.address.publisher - space.before.pages - only.start.page - wave.dash.in.pages - show.urldate - show.url - show.doi - show.preprint - show.note - show.english.translation - end.with.period -} - -STRINGS { - component.part.label -} - -FUNCTION {load.config} -{ - #2 'citation.et.al.min := - #1 'citation.et.al.use.first := - #4 'bibliography.et.al.min := - #3 'bibliography.et.al.use.first := - #1 'uppercase.name := - #0 'terms.in.macro := - #0 'year.after.author := - #1 'period.after.author := - #0 'italic.book.title := - #1 'sentence.case.title := - #0 'link.title := - #1 'title.in.journal := - #0 'show.patent.country := - #1 'show.mark := - #0 'space.before.mark := - #1 'show.medium.type := - "slash" 'component.part.label := - #0 'short.journal := - #0 'italic.journal := - #0 'bold.journal.volume := - #0 'show.missing.address.publisher := - #1 'space.before.pages := - #0 'only.start.page := - #0 'wave.dash.in.pages := - #1 'show.urldate := - #1 'show.url := - #1 'show.doi := - #1 'show.preprint := - #0 'show.note := - #0 'show.english.translation := - #1 'end.with.period := -} - -ENTRY - { address - archivePrefix - author - booktitle - date - doi - edition - editor - eprint - eprinttype - entrysubtype - howpublished - institution - journal - journaltitle - key - langid - language - location - mark - medium - note - number - organization - pages - publisher - school - series - shortjournal - title - translation - translator - url - urldate - volume - year - } - { entry.lang entry.is.electronic is.pure.electronic entry.numbered } - { label extra.label sort.label short.label short.list entry.mark entry.url } - -INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } - -INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } - -INTEGERS { charptr len } - -FUNCTION {init.state.consts} -{ #0 'before.all := - #1 'mid.sentence := - #2 'after.sentence := - #3 'after.block := - #4 'after.slash := - #3 'lang.zh := - #4 'lang.ja := - #1 'lang.en := - #2 'lang.ru := - #0 'lang.other := -} - -FUNCTION {bbl.anonymous} -{ entry.lang lang.zh = - { "佚名" } - { "Anon" } - if$ -} - -FUNCTION {bbl.space} -{ entry.lang lang.zh = - { "\ " } - { " " } - if$ -} - -FUNCTION {bbl.and} -{ "" } - -FUNCTION {bbl.et.al} -{ entry.lang lang.zh = - { "等" } - { entry.lang lang.ja = - { "他" } - { entry.lang lang.ru = - { "идр" } - { "et~al." } - if$ - } - if$ - } - if$ -} - -FUNCTION {citation.and} -{ terms.in.macro - { "{\biband}" } - 'bbl.and - if$ -} - -FUNCTION {citation.et.al} -{ terms.in.macro - { "{\bibetal}" } - 'bbl.et.al - if$ -} - -FUNCTION {bbl.colon} { ": " } - -FUNCTION {bbl.pages.colon} -{ space.before.pages - { ": " } - { ":\allowbreak " } - if$ -} - -FUNCTION {bbl.wide.space} { "\quad " } - -FUNCTION {bbl.slash} { "//\allowbreak " } - -FUNCTION {bbl.sine.loco} -{ entry.lang lang.zh = - { "[出版地不详]" } - { "[S.l.]" } - if$ -} - -FUNCTION {bbl.sine.nomine} -{ entry.lang lang.zh = - { "[出版者不详]" } - { "[s.n.]" } - if$ -} - -FUNCTION {bbl.sine.loco.sine.nomine} -{ entry.lang lang.zh = - { "[出版地不详: 出版者不详]" } - { "[S.l.: s.n.]" } - if$ -} - -FUNCTION {not} -{ { #0 } - { #1 } - if$ -} - -FUNCTION {and} -{ 'skip$ - { pop$ #0 } - if$ -} - -FUNCTION {or} -{ { pop$ #1 } - 'skip$ - if$ -} - -STRINGS { x y } - -FUNCTION {contains} -{ 'y := - 'x := - y text.length$ 'len := - x text.length$ len - #1 + 'charptr := - { charptr #0 > - x charptr len substring$ y = not - and - } - { charptr #1 - 'charptr := } - while$ - charptr #0 > -} - -STRINGS { s t } - -FUNCTION {output.nonnull} -{ 's := - output.state mid.sentence = - { ", " * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { output.state after.slash = - { bbl.slash * write$ - newline$ - } - { add.period$ " " * write$ } - if$ - } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s -} - -FUNCTION {output} -{ duplicate$ empty$ - 'pop$ - 'output.nonnull - if$ -} - -FUNCTION {output.after} -{ 't := - duplicate$ empty$ - 'pop$ - { 's := - output.state mid.sentence = - { t * write$ } - { output.state after.block = - { add.period$ write$ - newline$ - "\newblock " write$ - } - { output.state before.all = - 'write$ - { output.state after.slash = - { bbl.slash * write$ } - { add.period$ " " * write$ } - if$ - } - if$ - } - if$ - mid.sentence 'output.state := - } - if$ - s - } - if$ -} - -FUNCTION {output.check} -{ 't := - duplicate$ empty$ - { pop$ "empty " t * " in " * cite$ * warning$ } - 'output.nonnull - if$ -} - -FUNCTION {fin.entry} -{ end.with.period - 'add.period$ - 'skip$ - if$ - write$ - show.english.translation entry.lang lang.zh = and - { ")" - write$ - } - 'skip$ - if$ - newline$ -} - -FUNCTION {new.block} -{ output.state before.all = - 'skip$ - { output.state after.slash = - 'skip$ - { after.block 'output.state := } - if$ - } - if$ -} - -FUNCTION {new.sentence} -{ output.state after.block = - 'skip$ - { output.state before.all = - 'skip$ - { output.state after.slash = - 'skip$ - { after.sentence 'output.state := } - if$ - } - if$ - } - if$ -} - -FUNCTION {new.slash} -{ output.state before.all = - 'skip$ - { component.part.label "slash" = - { after.slash 'output.state := } - { new.block - component.part.label "in" = - { entry.lang lang.en = - { "In: " output - write$ - "" - before.all 'output.state := - } - 'skip$ - if$ - } - 'skip$ - if$ - } - if$ - } - if$ -} - -FUNCTION {new.block.checka} -{ empty$ - 'skip$ - 'new.block - if$ -} - -FUNCTION {new.block.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.block - if$ -} - -FUNCTION {new.sentence.checka} -{ empty$ - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {new.sentence.checkb} -{ empty$ - swap$ empty$ - and - 'skip$ - 'new.sentence - if$ -} - -FUNCTION {field.or.null} -{ duplicate$ empty$ - { pop$ "" } - 'skip$ - if$ -} - -FUNCTION {emphasize} -{ duplicate$ empty$ - { pop$ "" } - { "\emph{" swap$ * "}" * } - if$ -} - -FUNCTION {format.btitle} -{ italic.book.title - entry.lang lang.en = and - 'emphasize - 'skip$ - if$ -} - -INTEGERS { byte second.byte } - -INTEGERS { char.lang tmp.lang } - -STRINGS { tmp.str } - -FUNCTION {get.str.lang} -{ 'tmp.str := - lang.other 'tmp.lang := - #1 'charptr := - tmp.str text.length$ #1 + 'len := - { charptr len < } - { tmp.str charptr #1 substring$ chr.to.int$ 'byte := - byte #128 < - { charptr #1 + 'charptr := - byte #64 > byte #91 < and byte #96 > byte #123 < and or - { lang.en 'char.lang := } - { lang.other 'char.lang := } - if$ - } - { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := - byte #224 < - { charptr #2 + 'charptr := - byte #207 > byte #212 < and - byte #212 = second.byte #176 < and or - { lang.ru 'char.lang := } - { lang.other 'char.lang := } - if$ - } - { byte #240 < - { charptr #3 + 'charptr := - byte #227 > byte #234 < and - { lang.zh 'char.lang := } - { byte #227 = - { second.byte #143 > - { lang.zh 'char.lang := } - { second.byte #128 > second.byte #132 < and - { lang.ja 'char.lang := } - { lang.other 'char.lang := } - if$ - } - if$ - } - { byte #239 = - second.byte #163 > second.byte #172 < and and - { lang.zh 'char.lang := } - { lang.other 'char.lang := } - if$ - } - if$ - } - if$ - } - { charptr #4 + 'charptr := - byte #240 = second.byte #159 > and - { lang.zh 'char.lang := } - { lang.other 'char.lang := } - if$ - } - if$ - } - if$ - } - if$ - char.lang tmp.lang > - { char.lang 'tmp.lang := } - 'skip$ - if$ - } - while$ - tmp.lang -} - -FUNCTION {check.entry.lang} -{ author field.or.null - title field.or.null * - get.str.lang -} - -STRINGS { entry.langid } - -FUNCTION {set.entry.lang} -{ "" 'entry.langid := - language empty$ not - { language 'entry.langid := } - 'skip$ - if$ - langid empty$ not - { langid 'entry.langid := } - 'skip$ - if$ - entry.langid empty$ - { check.entry.lang } - { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or - { lang.en } - { entry.langid "chinese" = - { lang.zh } - { entry.langid "japanese" = - { lang.ja } - { entry.langid "russian" = - { lang.ru } - { check.entry.lang } - if$ - } - if$ - } - if$ - } - if$ - } - if$ - 'entry.lang := -} - -FUNCTION {set.entry.numbered} -{ type$ "patent" = - type$ "standard" = or - type$ "techreport" = or - { #1 'entry.numbered := } - { #0 'entry.numbered := } - if$ -} - -INTEGERS { nameptr namesleft numnames name.lang } - -FUNCTION {format.name} -{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't := - t "others" = - { bbl.et.al } - { t get.str.lang 'name.lang := - name.lang lang.en = - { t #1 "{vv~}{ll}{ f{~}}" format.name$ - uppercase.name - { "u" change.case$ } - 'skip$ - if$ - t #1 "{, jj}" format.name$ * - } - { t #1 "{ll}{ff}" format.name$ } - if$ - } - if$ -} - -FUNCTION {format.names} -{ 's := - #1 'nameptr := - s num.names$ 'numnames := - "" - numnames 'namesleft := - { namesleft #0 > } - { s nameptr format.name bbl.et.al = - numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or - { ", " * - bbl.et.al * - #1 'namesleft := - } - { nameptr #1 > - { namesleft #1 = bbl.and "" = not and - { bbl.and * } - { ", " * } - if$ - } - 'skip$ - if$ - s nameptr format.name * - } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ -} - -FUNCTION {format.key} -{ empty$ - { key field.or.null } - { "" } - if$ -} - -FUNCTION {format.authors} -{ author empty$ not - { author format.names } - { "empty author in " cite$ * warning$ - "" - } - if$ -} - -FUNCTION {format.editors} -{ editor empty$ - { "" } - { editor format.names } - if$ -} - -FUNCTION {format.translators} -{ translator empty$ - { "" } - { translator format.names - entry.lang lang.zh = - { translator num.names$ #3 > - { "译" * } - { ", 译" * } - if$ - } - 'skip$ - if$ - } - if$ -} - -FUNCTION {format.full.names} -{'s := - #1 'nameptr := - s num.names$ 'numnames := - numnames 'namesleft := - { namesleft #0 > } - { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := - t get.str.lang 'name.lang := - name.lang lang.en = - { t #1 "{vv~}{ll}" format.name$ 't := } - { t #1 "{ll}{ff}" format.name$ 't := } - if$ - nameptr #1 > - { - namesleft #1 > - { ", " * t * } - { - numnames #2 > - { "," * } - 'skip$ - if$ - t "others" = - { " et~al." * } - { " and " * t * } - if$ - } - if$ - } - 't - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ -} - -FUNCTION {author.editor.full} -{ author empty$ - { editor empty$ - { "" } - { editor format.full.names } - if$ - } - { author format.full.names } - if$ -} - -FUNCTION {author.full} -{ author empty$ - { "" } - { author format.full.names } - if$ -} - -FUNCTION {editor.full} -{ editor empty$ - { "" } - { editor format.full.names } - if$ -} - -FUNCTION {make.full.names} -{ type$ "book" = - type$ "inbook" = - or - 'author.editor.full - { type$ "collection" = - type$ "proceedings" = - or - 'editor.full - 'author.full - if$ - } - if$ -} - -FUNCTION {output.bibitem} -{ newline$ - "\bibitem[" write$ - label ")" * - make.full.names duplicate$ short.list = - { pop$ } - { duplicate$ "]" contains - { "{" swap$ * "}" * } - 'skip$ - if$ - * - } - if$ - "]{" * write$ - cite$ write$ - "}" write$ - newline$ - "" - before.all 'output.state := -} - -FUNCTION {change.sentence.case} -{ entry.lang lang.en = - { "t" change.case$ } - 'skip$ - if$ -} - -FUNCTION {add.link} -{ url empty$ not - { "\href{" url * "}{" * swap$ * "}" * } - { doi empty$ not - { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } - 'skip$ - if$ - } - if$ -} - -FUNCTION {format.title} -{ title empty$ - { "" } - { title - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered number empty$ not and - { bbl.colon * - type$ "patent" = show.patent.country and - { address empty$ not - { address * ", " * } - { location empty$ not - { location * ", " * } - { entry.lang lang.zh = - { "中国" * ", " * } - 'skip$ - if$ - } - if$ - } - if$ - } - 'skip$ - if$ - number * - } - 'skip$ - if$ - link.title - 'add.link - 'skip$ - if$ - } - if$ -} - -FUNCTION {tie.or.space.connect} -{ duplicate$ text.length$ #3 < - { "~" } - { " " } - if$ - swap$ * * -} - -FUNCTION {either.or.check} -{ empty$ - 'pop$ - { "can't use both " swap$ * " fields in " * cite$ * warning$ } - if$ -} - -FUNCTION {is.digit} -{ duplicate$ empty$ - { pop$ #0 } - { chr.to.int$ - duplicate$ "0" chr.to.int$ < - { pop$ #0 } - { "9" chr.to.int$ > - { #0 } - { #1 } - if$ - } - if$ - } - if$ -} - -FUNCTION {is.number} -{ 's := - s empty$ - { #0 } - { s text.length$ 'charptr := - { charptr #0 > - s charptr #1 substring$ is.digit - and - } - { charptr #1 - 'charptr := } - while$ - charptr not - } - if$ -} - -FUNCTION {format.volume} -{ volume empty$ not - { volume is.number - { entry.lang lang.zh = - { "第 " volume * " 卷" * } - { "volume" volume tie.or.space.connect } - if$ - } - { volume } - if$ - } - { "" } - if$ -} - -FUNCTION {format.number} -{ number empty$ not - { number is.number - { entry.lang lang.zh = - { "第 " number * " 册" * } - { "number" number tie.or.space.connect } - if$ - } - { number } - if$ - } - { "" } - if$ -} - -FUNCTION {format.volume.number} -{ volume empty$ not - { format.volume } - { format.number } - if$ -} - -FUNCTION {format.title.vol.num} -{ title - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered - { number empty$ not - { bbl.colon * number * } - 'skip$ - if$ - } - { format.volume.number 's := - s empty$ not - { bbl.colon * s * } - 'skip$ - if$ - } - if$ -} - -FUNCTION {format.series.vol.num.title} -{ format.volume.number 's := - series empty$ not - { series - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered - { bbl.wide.space * } - { bbl.colon * - s empty$ not - { s * bbl.wide.space * } - 'skip$ - if$ - } - if$ - title * - sentence.case.title - 'change.sentence.case - 'skip$ - if$ - entry.numbered number empty$ not and - { bbl.colon * number * } - 'skip$ - if$ - } - { format.title.vol.num } - if$ - format.btitle - link.title - 'add.link - 'skip$ - if$ -} - -FUNCTION {format.booktitle.vol.num} -{ booktitle - entry.numbered - 'skip$ - { format.volume.number 's := - s empty$ not - { bbl.colon * s * } - 'skip$ - if$ - } - if$ -} - -FUNCTION {format.series.vol.num.booktitle} -{ format.volume.number 's := - series empty$ not - { series bbl.colon * - entry.numbered not s empty$ not and - { s * bbl.wide.space * } - 'skip$ - if$ - booktitle * - } - { format.booktitle.vol.num } - if$ - format.btitle -} - -FUNCTION {remove.period} -{ 't := - "" 's := - { t empty$ not } - { t #1 #1 substring$ 'tmp.str := - tmp.str "." = not - { s tmp.str * 's := } - 'skip$ - if$ - t #2 global.max$ substring$ 't := - } - while$ - s -} - -FUNCTION {abbreviate} -{ remove.period - 't := - t "l" change.case$ 's := - "" - s "physical review letters" = - { "Phys Rev Lett" } - 'skip$ - if$ - 's := - s empty$ - { t } - { pop$ s } - if$ -} - -FUNCTION {get.journal.title} -{ short.journal - { shortjournal empty$ not - { shortjournal } - { journal empty$ not - { journal abbreviate } - { journaltitle empty$ not - { journaltitle abbreviate } - { "" } - if$ - } - if$ - } - if$ - } - { journal empty$ not - { journal } - { journaltitle empty$ not - { journaltitle } - { shortjournal empty$ not - { shortjournal } - { "" } - if$ - } - if$ - } - if$ - } - if$ -} - -FUNCTION {check.arxiv.preprint} -{ #1 #5 substring$ "l" change.case$ "arxiv" = - { #1 } - { #0 } - if$ -} - -FUNCTION {format.journal} -{ get.journal.title - duplicate$ empty$ not - { italic.journal entry.lang lang.en = and - 'emphasize - 'skip$ - if$ - } - 'skip$ - if$ -} - -FUNCTION {set.entry.mark} -{ entry.mark empty$ not - 'pop$ - { mark empty$ not - { pop$ mark 'entry.mark := } - { 'entry.mark := } - if$ - } - if$ -} - -FUNCTION {format.mark} -{ show.mark - { entry.mark - show.medium.type - { medium empty$ not - { "/" * medium * } - { entry.is.electronic - { "/OL" * } - 'skip$ - if$ - } - if$ - } - 'skip$ - if$ - 'entry.mark := - space.before.mark - { " " } - { "\allowbreak" } - if$ - "[" * entry.mark * "]" * - } - { "" } - if$ -} - -FUNCTION {num.to.ordinal} -{ duplicate$ text.length$ 'charptr := - duplicate$ charptr #1 substring$ 's := - s "1" = - { "st" * } - { s "2" = - { "nd" * } - { s "3" = - { "rd" * } - { "th" * } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.edition} -{ edition empty$ - { "" } - { edition is.number - { edition "1" = not - { entry.lang lang.zh = - { edition " 版" * } - { edition num.to.ordinal " ed." * } - if$ - } - 'skip$ - if$ - } - { entry.lang lang.en = - { edition change.sentence.case 's := - s "Revised" = s "Revised edition" = or - { "Rev. ed." } - { s " ed." * } - if$ - } - { edition } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.publisher} -{ publisher empty$ not - { publisher } - { school empty$ not - { school } - { organization empty$ not - { organization } - { institution empty$ not - { institution } - { "" } - if$ - } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.address.publisher} -{ address empty$ not - { address } - { location empty$ not - { location } - { "" } - if$ - } - if$ - duplicate$ empty$ not - { format.publisher empty$ not - { bbl.colon * format.publisher * } - { entry.is.electronic not show.missing.address.publisher and - { bbl.colon * bbl.sine.nomine * } - 'skip$ - if$ - } - if$ - } - { pop$ - entry.is.electronic not show.missing.address.publisher and - { format.publisher empty$ not - { bbl.sine.loco bbl.colon * format.publisher * } - { bbl.sine.loco.sine.nomine } - if$ - } - { format.publisher empty$ not - { format.publisher } - { "" } - if$ - } - if$ - } - if$ -} - -FUNCTION {extract.before.dash} -{ duplicate$ empty$ - { pop$ "" } - { 's := - #1 'charptr := - s text.length$ #1 + 'len := - { charptr len < - s charptr #1 substring$ "-" = not - and - } - { charptr #1 + 'charptr := } - while$ - s #1 charptr #1 - substring$ - } - if$ -} - -FUNCTION {extract.after.dash} -{ duplicate$ empty$ - { pop$ "" } - { 's := - #1 'charptr := - s text.length$ #1 + 'len := - { charptr len < - s charptr #1 substring$ "-" = not - and - } - { charptr #1 + 'charptr := } - while$ - { charptr len < - s charptr #1 substring$ "-" = - and - } - { charptr #1 + 'charptr := } - while$ - s charptr global.max$ substring$ - } - if$ -} - -FUNCTION {extract.before.slash} -{ duplicate$ empty$ - { pop$ "" } - { 's := - #1 'charptr := - s text.length$ #1 + 'len := - { charptr len < - s charptr #1 substring$ "/" = not - and - } - { charptr #1 + 'charptr := } - while$ - s #1 charptr #1 - substring$ - } - if$ -} - -FUNCTION {extract.after.slash} -{ duplicate$ empty$ - { pop$ "" } - { 's := - #1 'charptr := - s text.length$ #1 + 'len := - { charptr len < - s charptr #1 substring$ "-" = not - and - s charptr #1 substring$ "/" = not - and - } - { charptr #1 + 'charptr := } - while$ - { charptr len < - s charptr #1 substring$ "-" = - s charptr #1 substring$ "/" = - or - and - } - { charptr #1 + 'charptr := } - while$ - s charptr global.max$ substring$ - } - if$ -} - -FUNCTION {format.year} -{ year empty$ not - { year extract.before.slash extra.label * } - { date empty$ not - { date extract.before.dash extra.label * } - { "empty year in " cite$ * warning$ - urldate empty$ not - { "[" urldate extract.before.dash * extra.label * "]" * } - { "" } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.periodical.year} -{ year empty$ not - { year extract.before.slash - "--" * - year extract.after.slash - duplicate$ empty$ - 'pop$ - { * } - if$ - } - { date empty$ not - { date extract.before.dash } - { "empty year in " cite$ * warning$ - urldate empty$ not - { "[" urldate extract.before.dash * "]" * } - { "" } - if$ - } - if$ - } - if$ -} - -FUNCTION {format.date} -{ date empty$ not - { type$ "patent" = type$ "newspaper" = or - { date } - { entrysubtype empty$ not - { type$ "article" = entrysubtype "newspaper" = and - { date } - { format.year } - if$ - } - { format.year } - if$ - } - if$ - } - { year empty$ not - { format.year } - { "" } - if$ - } - if$ -} - -FUNCTION {format.editdate} -{ date empty$ not - { "\allowbreak(" date * ")" * } - { "" } - if$ -} - -FUNCTION {format.urldate} -{ show.urldate show.url and entry.url empty$ not and - is.pure.electronic or - urldate empty$ not and - { "\allowbreak[" urldate * "]" * } - { "" } - if$ -} - -FUNCTION {hyphenate} -{ 't := - "" - { t empty$ not } - { t #1 #1 substring$ "-" = - { wave.dash.in.pages - { "~" * } - { "-" * } - if$ - { t #1 #1 substring$ "-" = } - { t #2 global.max$ substring$ 't := } - while$ - } - { t #1 #1 substring$ * - t #2 global.max$ substring$ 't := - } - if$ - } - while$ -} - -FUNCTION {format.pages} -{ pages empty$ - { "" } - { pages hyphenate } - if$ -} - -FUNCTION {format.extracted.pages} -{ pages empty$ - { "" } - { pages - only.start.page - 'extract.before.dash - 'hyphenate - if$ - } - if$ -} - -FUNCTION {format.journal.volume} -{ volume empty$ not - { bold.journal.volume - { "\textbf{" volume * "}" * } - { volume } - if$ - } - { "" } - if$ -} - -FUNCTION {format.journal.number} -{ number empty$ not - { "\allowbreak (" number * ")" * } - { "" } - if$ -} - -FUNCTION {format.journal.pages} -{ pages empty$ - { "" } - { format.extracted.pages } - if$ -} - -FUNCTION {format.periodical.year.volume.number} -{ year empty$ not - { year extract.before.slash } - { "empty year in periodical " cite$ * warning$ } - if$ - volume empty$ not - { ", " * volume extract.before.dash * } - 'skip$ - if$ - number empty$ not - { "\allowbreak (" * number extract.before.dash * ")" * } - 'skip$ - if$ - "--" * - year extract.after.slash empty$ - volume extract.after.dash empty$ and - number extract.after.dash empty$ and not - { year extract.after.slash empty$ not - { year extract.after.slash * } - { year extract.before.slash * } - if$ - volume empty$ not - { ", " * volume extract.after.dash * } - 'skip$ - if$ - number empty$ not - { "\allowbreak (" * number extract.after.dash * ")" * } - 'skip$ - if$ - } - 'skip$ - if$ -} - -FUNCTION {check.url} -{ url empty$ not - { "\url{" url * "}" * 'entry.url := - #1 'entry.is.electronic := - } - { howpublished empty$ not - { howpublished #1 #5 substring$ "\url{" = - { howpublished 'entry.url := - #1 'entry.is.electronic := - } - 'skip$ - if$ - } - { note empty$ not - { note #1 #5 substring$ "\url{" = - { note 'entry.url := - #1 'entry.is.electronic := - } - 'skip$ - if$ - } - 'skip$ - if$ - } - if$ - } - if$ -} - -FUNCTION {output.url} -{ show.url is.pure.electronic or - entry.url empty$ not and - { new.block - entry.url output - } - 'skip$ - if$ -} - -FUNCTION {check.doi} -{ doi empty$ not - { #1 'entry.is.electronic := } - 'skip$ - if$ -} - -FUNCTION {is.in.url} -{ 's := - s empty$ - { #1 } - { entry.url empty$ - { #0 } - { s text.length$ 'len := - entry.url text.length$ 'charptr := - { entry.url charptr len substring$ s = not - charptr #0 > - and - } - { charptr #1 - 'charptr := } - while$ - charptr - } - if$ - } - if$ -} - -FUNCTION {format.doi} -{ "" - doi empty$ not - { "" 's := - doi 't := - #0 'numnames := - { t empty$ not} - { t #1 #1 substring$ 'tmp.str := - tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or - { t #2 #1 substring$ empty$ - { s tmp.str * 's := } - 'skip$ - if$ - s empty$ s is.in.url or - 'skip$ - { numnames #1 + 'numnames := - numnames #1 > - { ", " * } - { "DOI: " * } - if$ - "\doi{" s * "}" * * - } - if$ - "" 's := - } - { s tmp.str * 's := } - if$ - t #2 global.max$ substring$ 't := - } - while$ - } - 'skip$ - if$ -} - -FUNCTION {output.doi} -{ doi empty$ not show.doi and - show.english.translation entry.lang lang.zh = and not and - { new.block - format.doi output - } - 'skip$ - if$ -} - -FUNCTION {check.electronic} -{ "" 'entry.url := - #0 'entry.is.electronic := - 'check.doi - 'skip$ - if$ - 'check.url - 'skip$ - if$ - medium empty$ not - { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or - { #1 'entry.is.electronic := } - 'skip$ - if$ - } - 'skip$ - if$ -} - -FUNCTION {format.eprint} -{ archivePrefix empty$ not - { archivePrefix } - { eprinttype empty$ not - { archivePrefix } - { "" } - if$ - } - if$ - 's := - s empty$ not - { s ": \eprint{" * - url empty$ not - { url } - { "https://" s "l" change.case$ * ".org/abs/" * eprint * } - if$ - * "}{" * - eprint * "}" * - } - { eprint } - if$ -} - -FUNCTION {output.eprint} -{ show.preprint eprint empty$ not and - { new.block - format.eprint output - } - 'skip$ - if$ -} - -FUNCTION {format.note} -{ note empty$ not show.note and - { note } - { "" } - if$ -} - -FUNCTION {output.translation} -{ show.english.translation entry.lang lang.zh = and - { translation empty$ not - { translation } - { "[English translation missing!]" } - if$ - " (in Chinese)" * output - write$ - format.doi duplicate$ empty$ not - { newline$ - write$ - } - 'pop$ - if$ - " \\" write$ - newline$ - "(" write$ - "" - before.all 'output.state := - } - 'skip$ - if$ -} - -FUNCTION {empty.misc.check} -{ author empty$ title empty$ - year empty$ - and and - key empty$ not and - { "all relevant fields are empty in " cite$ * warning$ } - 'skip$ - if$ -} - -FUNCTION {monograph} -{ output.bibitem - output.translation - author empty$ not - { format.authors } - { editor empty$ not - { format.editors } - { "empty author and editor in " cite$ * warning$ - "" - } - if$ - } - if$ - output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.series.vol.num.title "title" output.check - "M" set.entry.mark - format.mark "" output.after - new.block - format.translators output - new.sentence - format.edition output - new.block - format.address.publisher output - year.after.author not - { format.year "year" output.check } - 'skip$ - if$ - format.pages bbl.pages.colon output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry -} - -FUNCTION {incollection} -{ output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.title "title" output.check - "M" set.entry.mark - format.mark "" output.after - new.block - format.translators output - new.slash - format.editors output - new.block - format.series.vol.num.booktitle "booktitle" output.check - new.block - format.edition output - new.block - format.address.publisher output - year.after.author not - { format.year "year" output.check } - 'skip$ - if$ - format.extracted.pages bbl.pages.colon output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry -} - -FUNCTION {periodical} -{ output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.title "title" output.check - "J" set.entry.mark - format.mark "" output.after - new.block - format.periodical.year.volume.number output - new.block - format.address.publisher output - year.after.author not - { format.periodical.year "year" output.check } - 'skip$ - if$ - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry -} - -FUNCTION {journal.article} -{ output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - title.in.journal - { format.title "title" output.check - entrysubtype empty$ not - { - entrysubtype "newspaper" = - { "N" set.entry.mark } - { "J" set.entry.mark } - if$ - } - { "J" set.entry.mark } - if$ - format.mark "" output.after - new.block - } - 'skip$ - if$ - format.journal "journal" output.check - year.after.author not - { format.date "year" output.check } - 'skip$ - if$ - format.journal.volume output - format.journal.number "" output.after - format.journal.pages bbl.pages.colon output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry -} - -FUNCTION {patent} -{ output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.title "title" output.check - "P" set.entry.mark - format.mark "" output.after - new.block - format.date "year" output.check - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry -} - -FUNCTION {electronic} -{ #1 #1 check.electronic - #1 'entry.is.electronic := - #1 'is.pure.electronic := - output.bibitem - output.translation - format.authors output - author format.key output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - format.series.vol.num.title "title" output.check - "EB" set.entry.mark - format.mark "" output.after - new.block - format.address.publisher output - year.after.author not - { date empty$ - { format.date output } - 'skip$ - if$ - } - 'skip$ - if$ - format.pages bbl.pages.colon output.after - format.editdate "" output.after - format.urldate "" output.after - output.url - output.doi - new.block - format.note output - fin.entry -} - -FUNCTION {preprint} -{ output.bibitem - output.translation - author empty$ not - { format.authors } - { editor empty$ not - { format.editors } - { "empty author and editor in " cite$ * warning$ - "" - } - if$ - } - if$ - output - year.after.author - { period.after.author - 'new.sentence - 'skip$ - if$ - format.year "year" output.check - } - 'skip$ - if$ - new.block - title.in.journal - { format.series.vol.num.title "title" output.check - "A" set.entry.mark - format.mark "" output.after - new.block - } - 'skip$ - if$ - format.translators output - new.sentence - format.edition output - new.block - year.after.author not - { date empty$ - { format.date output } - 'skip$ - if$ - } - 'skip$ - if$ - format.pages bbl.pages.colon output.after - format.editdate "" output.after - format.urldate "" output.after - output.eprint - output.url - new.block - format.note output - fin.entry -} - -FUNCTION {misc} -{ get.journal.title - duplicate$ empty$ not - { check.arxiv.preprint - 'preprint - 'journal.article - if$ - } - { pop$ - booktitle empty$ not - 'incollection - { publisher empty$ not - 'monograph - { eprint empty$ not archivePrefix empty$ not or - 'preprint - { entry.is.electronic - 'electronic - { - "Z" set.entry.mark - monograph - } - if$ - } - if$ - } - if$ - } - if$ - } - if$ - empty.misc.check -} - -FUNCTION {archive} -{ "A" set.entry.mark - misc -} - -FUNCTION {article} { misc } - -FUNCTION {book} { monograph } - -FUNCTION {booklet} { book } - -FUNCTION {collection} -{ "G" set.entry.mark - monograph -} - -FUNCTION {database} -{ "DB" set.entry.mark - electronic -} - -FUNCTION {dataset} -{ "DS" set.entry.mark - electronic -} - -FUNCTION {inbook} { book } - -FUNCTION {inproceedings} -{ "C" set.entry.mark - incollection -} - -FUNCTION {conference} { inproceedings } - -FUNCTION {legislation} { archive } - -FUNCTION {map} -{ "CM" set.entry.mark - misc -} - -FUNCTION {manual} { monograph } - -FUNCTION {mastersthesis} -{ "D" set.entry.mark - monograph -} - -FUNCTION {newspaper} -{ "N" set.entry.mark - article -} - -FUNCTION {online} -{ "EB" set.entry.mark - electronic -} - -FUNCTION {phdthesis} { mastersthesis } - -FUNCTION {proceedings} -{ "C" set.entry.mark - monograph -} - -FUNCTION {software} -{ "CP" set.entry.mark - electronic -} - -FUNCTION {standard} -{ "S" set.entry.mark - misc -} - -FUNCTION {techreport} -{ "R" set.entry.mark - misc -} - -FUNCTION {unpublished} { misc } - -FUNCTION {default.type} { misc } - -MACRO {jan} {"January"} - -MACRO {feb} {"February"} - -MACRO {mar} {"March"} - -MACRO {apr} {"April"} - -MACRO {may} {"May"} - -MACRO {jun} {"June"} - -MACRO {jul} {"July"} - -MACRO {aug} {"August"} - -MACRO {sep} {"September"} - -MACRO {oct} {"October"} - -MACRO {nov} {"November"} - -MACRO {dec} {"December"} - -MACRO {acmcs} {"ACM Computing Surveys"} - -MACRO {acta} {"Acta Informatica"} - -MACRO {cacm} {"Communications of the ACM"} - -MACRO {ibmjrd} {"IBM Journal of Research and Development"} - -MACRO {ibmsj} {"IBM Systems Journal"} - -MACRO {ieeese} {"IEEE Transactions on Software Engineering"} - -MACRO {ieeetc} {"IEEE Transactions on Computers"} - -MACRO {ieeetcad} - {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} - -MACRO {ipl} {"Information Processing Letters"} - -MACRO {jacm} {"Journal of the ACM"} - -MACRO {jcss} {"Journal of Computer and System Sciences"} - -MACRO {scp} {"Science of Computer Programming"} - -MACRO {sicomp} {"SIAM Journal on Computing"} - -MACRO {tocs} {"ACM Transactions on Computer Systems"} - -MACRO {tods} {"ACM Transactions on Database Systems"} - -MACRO {tog} {"ACM Transactions on Graphics"} - -MACRO {toms} {"ACM Transactions on Mathematical Software"} - -MACRO {toois} {"ACM Transactions on Office Information Systems"} - -MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} - -MACRO {tcs} {"Theoretical Computer Science"} - -FUNCTION {sortify} -{ purify$ - "l" change.case$ -} - -FUNCTION {chop.word} -{ 's := - 'len := - s #1 len substring$ = - { s len #1 + global.max$ substring$ } - 's - if$ -} - -FUNCTION {format.lab.name} -{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't := - t "others" = - { citation.et.al } - { t get.str.lang 'name.lang := - name.lang lang.zh = name.lang lang.ja = or - { t #1 "{ll}{ff}" format.name$ } - { t #1 "{vv~}{ll}" format.name$ } - if$ - } - if$ -} - -FUNCTION {format.lab.names} -{ 's := - s #1 format.lab.name 'short.label := - #1 'nameptr := - s num.names$ 'numnames := - "" - numnames 'namesleft := - { namesleft #0 > } - { s nameptr format.lab.name citation.et.al = - numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or - { bbl.space * - citation.et.al * - #1 'namesleft := - } - { nameptr #1 > - { namesleft #1 = citation.and "" = not and - { citation.and * } - { ", " * } - if$ - } - 'skip$ - if$ - s nameptr format.lab.name * - } - if$ - nameptr #1 + 'nameptr := - namesleft #1 - 'namesleft := - } - while$ -} - -FUNCTION {author.key.label} -{ author empty$ - { key empty$ - { cite$ #1 #3 substring$ } - 'key - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {author.editor.key.label} -{ author empty$ - { editor empty$ - { key empty$ - { cite$ #1 #3 substring$ } - 'key - if$ - } - { editor format.lab.names } - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {author.key.organization.label} -{ author empty$ - { key empty$ - { organization empty$ - { cite$ #1 #3 substring$ } - { "The " #4 organization chop.word #3 text.prefix$ } - if$ - } - 'key - if$ - } - { author format.lab.names } - if$ -} - -FUNCTION {editor.key.organization.label} -{ editor empty$ - { key empty$ - { organization empty$ - { cite$ #1 #3 substring$ } - { "The " #4 organization chop.word #3 text.prefix$ } - if$ - } - 'key - if$ - } - { editor format.lab.names } - if$ -} - -FUNCTION {calc.short.authors} -{ "" 'short.label := - type$ "book" = - type$ "inbook" = - or - 'author.editor.key.label - { type$ "collection" = - type$ "proceedings" = - or - { editor empty$ not - 'editor.key.organization.label - 'author.key.organization.label - if$ - } - 'author.key.label - if$ - } - if$ - 'short.list := - short.label empty$ - { short.list 'short.label := } - 'skip$ - if$ -} - -FUNCTION {calc.label} -{ calc.short.authors - short.list "]" contains - { "{" short.list * "}" * } - { short.list } - if$ - "(" - * - format.year duplicate$ empty$ - short.list key field.or.null = or - { pop$ "" } - 'skip$ - if$ - duplicate$ "]" contains - { "{" swap$ * "}" * } - 'skip$ - if$ - * - 'label := - short.label - "(" - * - format.year duplicate$ empty$ - short.list key field.or.null = or - { pop$ "" } - 'skip$ - if$ - * - 'short.label := -} - -INTEGERS { seq.num } - -FUNCTION {init.seq} -{ #0 'seq.num :=} - -FUNCTION {int.to.fix} -{ "000000000" swap$ int.to.str$ * - #-1 #10 substring$ -} - -FUNCTION {presort} -{ set.entry.lang - set.entry.numbered - show.url show.doi check.electronic - #0 'is.pure.electronic := - calc.label - label sortify - " " - * - seq.num #1 + 'seq.num := - seq.num int.to.fix - 'sort.label := - sort.label * - #1 entry.max$ substring$ - 'sort.key$ := -} - -STRINGS { longest.label last.label next.extra last.extra.label } - -INTEGERS { longest.label.width number.label } - -FUNCTION {initialize.longest.label} -{ "" 'longest.label := - #0 int.to.chr$ 'last.label := - "" 'next.extra := - #0 'longest.label.width := - #0 'number.label := - "" 'last.extra.label := -} - -FUNCTION {forward.pass} -{ - number.label #1 + 'number.label := -} - -FUNCTION {reverse.pass} -{ - label extra.label * 'label := -} - -FUNCTION {bib.sort.order} -{ sort.label 'sort.key$ := -} - -FUNCTION {begin.bib} -{ preamble$ empty$ - 'skip$ - { preamble$ write$ newline$ } - if$ - "\begin{thebibliography}{" number.label int.to.str$ * "}" * - write$ newline$ - terms.in.macro - { "\providecommand{\biband}{和}" - write$ newline$ - "\providecommand{\bibetal}{等}" - write$ newline$ - } - 'skip$ - if$ - "\providecommand{\natexlab}[1]{#1}" - write$ newline$ - "\providecommand{\url}[1]{#1}" - write$ newline$ - "\expandafter\ifx\csname urlstyle\endcsname\relax\else" - write$ newline$ - " \urlstyle{same}\fi" - write$ newline$ - "\expandafter\ifx\csname href\endcsname\relax" - write$ newline$ - " \DeclareUrlCommand\doi{\urlstyle{rm}}" - write$ newline$ - " \def\eprint#1#2{#2}" - write$ newline$ - "\else" - write$ newline$ - " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" - write$ newline$ - " \let\eprint\href" - write$ newline$ - "\fi" - write$ newline$ - } - -FUNCTION {end.bib} -{ newline$ - "\end{thebibliography}" write$ newline$ -} - -READ - -EXECUTE {init.state.consts} - -EXECUTE {load.config} - -EXECUTE {init.seq} - -ITERATE {presort} - -SORT - -EXECUTE {initialize.longest.label} - -ITERATE {forward.pass} - -REVERSE {reverse.pass} - -ITERATE {bib.sort.order} - -SORT - -EXECUTE {begin.bib} - -ITERATE {call.type$} - +%% +%% This is file `gbt7714-numerical.bst', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% gbt7714.dtx (with options: `2015,numerical') +%% ------------------------------------------------------------------- +%% GB/T 7714 BibTeX Style +%% https://github.com/zepinglee/gbt7714-bibtex-style +%% Version: 2022/03/21 v2.1.4 +%% ------------------------------------------------------------------- +%% Copyright (C) 2016--2022 by Zeping Lee +%% ------------------------------------------------------------------- +%% This file may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% https://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2008 or later. +%% ------------------------------------------------------------------- +INTEGERS { + citation.et.al.min + citation.et.al.use.first + bibliography.et.al.min + bibliography.et.al.use.first + uppercase.name + terms.in.macro + year.after.author + period.after.author + italic.book.title + sentence.case.title + link.title + title.in.journal + show.patent.country + show.mark + space.before.mark + show.medium.type + short.journal + italic.journal + bold.journal.volume + show.missing.address.publisher + space.before.pages + only.start.page + wave.dash.in.pages + show.urldate + show.url + show.doi + show.preprint + show.note + show.english.translation + end.with.period +} + +STRINGS { + component.part.label +} + +FUNCTION {load.config} +{ + #2 'citation.et.al.min := + #1 'citation.et.al.use.first := + #4 'bibliography.et.al.min := + #3 'bibliography.et.al.use.first := + #1 'uppercase.name := + #0 'terms.in.macro := + #0 'year.after.author := + #1 'period.after.author := + #0 'italic.book.title := + #1 'sentence.case.title := + #0 'link.title := + #1 'title.in.journal := + #0 'show.patent.country := + #1 'show.mark := + #0 'space.before.mark := + #1 'show.medium.type := + "slash" 'component.part.label := + #0 'short.journal := + #0 'italic.journal := + #0 'bold.journal.volume := + #0 'show.missing.address.publisher := + #1 'space.before.pages := + #0 'only.start.page := + #0 'wave.dash.in.pages := + #1 'show.urldate := + #1 'show.url := + #1 'show.doi := + #1 'show.preprint := + #0 'show.note := + #0 'show.english.translation := + #1 'end.with.period := +} + +ENTRY + { address + archivePrefix + author + booktitle + date + doi + edition + editor + eprint + eprinttype + entrysubtype + howpublished + institution + journal + journaltitle + key + langid + language + location + mark + medium + note + number + organization + pages + publisher + school + series + shortjournal + title + translation + translator + url + urldate + volume + year + } + { entry.lang entry.is.electronic is.pure.electronic entry.numbered } + { label extra.label sort.label short.label short.list entry.mark entry.url } + +INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } + +INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } + +INTEGERS { charptr len } + +FUNCTION {init.state.consts} +{ #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := + #4 'after.slash := + #3 'lang.zh := + #4 'lang.ja := + #1 'lang.en := + #2 'lang.ru := + #0 'lang.other := +} + +FUNCTION {bbl.anonymous} +{ entry.lang lang.zh = + { "佚名" } + { "Anon" } + if$ +} + +FUNCTION {bbl.space} +{ entry.lang lang.zh = + { "\ " } + { " " } + if$ +} + +FUNCTION {bbl.and} +{ "" } + +FUNCTION {bbl.et.al} +{ entry.lang lang.zh = + { "等" } + { entry.lang lang.ja = + { "他" } + { entry.lang lang.ru = + { "идр" } + { "et~al." } + if$ + } + if$ + } + if$ +} + +FUNCTION {citation.and} +{ terms.in.macro + { "{\biband}" } + 'bbl.and + if$ +} + +FUNCTION {citation.et.al} +{ terms.in.macro + { "{\bibetal}" } + 'bbl.et.al + if$ +} + +FUNCTION {bbl.colon} { ": " } + +FUNCTION {bbl.pages.colon} +{ space.before.pages + { ": " } + { ":\allowbreak " } + if$ +} + +FUNCTION {bbl.wide.space} { "\quad " } + +FUNCTION {bbl.slash} { "//\allowbreak " } + +FUNCTION {bbl.sine.loco} +{ entry.lang lang.zh = + { "[出版地不详]" } + { "[S.l.]" } + if$ +} + +FUNCTION {bbl.sine.nomine} +{ entry.lang lang.zh = + { "[出版者不详]" } + { "[s.n.]" } + if$ +} + +FUNCTION {bbl.sine.loco.sine.nomine} +{ entry.lang lang.zh = + { "[出版地不详: 出版者不详]" } + { "[S.l.: s.n.]" } + if$ +} + +FUNCTION {not} +{ { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ { pop$ #1 } + 'skip$ + if$ +} + +STRINGS { x y } + +FUNCTION {contains} +{ 'y := + 'x := + y text.length$ 'len := + x text.length$ len - #1 + 'charptr := + { charptr #0 > + x charptr len substring$ y = not + and + } + { charptr #1 - 'charptr := } + while$ + charptr #0 > +} + +STRINGS { s t } + +FUNCTION {output.nonnull} +{ 's := + output.state mid.sentence = + { ", " * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.slash = + { bbl.slash * write$ + newline$ + } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.after} +{ 't := + duplicate$ empty$ + 'pop$ + { 's := + output.state mid.sentence = + { t * write$ } + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { output.state after.slash = + { bbl.slash * write$ } + { add.period$ " " * write$ } + if$ + } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s + } + if$ +} + +FUNCTION {output.check} +{ 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * cite$ * warning$ } + 'output.nonnull + if$ +} + +FUNCTION {fin.entry} +{ end.with.period + 'add.period$ + 'skip$ + if$ + write$ + show.english.translation entry.lang lang.zh = and + { ")" + write$ + } + 'skip$ + if$ + newline$ +} + +FUNCTION {new.block} +{ output.state before.all = + 'skip$ + { output.state after.slash = + 'skip$ + { after.block 'output.state := } + if$ + } + if$ +} + +FUNCTION {new.sentence} +{ output.state after.block = + 'skip$ + { output.state before.all = + 'skip$ + { output.state after.slash = + 'skip$ + { after.sentence 'output.state := } + if$ + } + if$ + } + if$ +} + +FUNCTION {new.slash} +{ output.state before.all = + 'skip$ + { component.part.label "slash" = + { after.slash 'output.state := } + { new.block + component.part.label "in" = + { entry.lang lang.en = + { "In: " output + write$ + "" + before.all 'output.state := + } + 'skip$ + if$ + } + 'skip$ + if$ + } + if$ + } + if$ +} + +FUNCTION {new.block.checka} +{ empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {emphasize} +{ duplicate$ empty$ + { pop$ "" } + { "\emph{" swap$ * "}" * } + if$ +} + +FUNCTION {format.btitle} +{ italic.book.title + entry.lang lang.en = and + 'emphasize + 'skip$ + if$ +} + +INTEGERS { byte second.byte } + +INTEGERS { char.lang tmp.lang } + +STRINGS { tmp.str } + +FUNCTION {get.str.lang} +{ 'tmp.str := + lang.other 'tmp.lang := + #1 'charptr := + tmp.str text.length$ #1 + 'len := + { charptr len < } + { tmp.str charptr #1 substring$ chr.to.int$ 'byte := + byte #128 < + { charptr #1 + 'charptr := + byte #64 > byte #91 < and byte #96 > byte #123 < and or + { lang.en 'char.lang := } + { lang.other 'char.lang := } + if$ + } + { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := + byte #224 < + { charptr #2 + 'charptr := + byte #207 > byte #212 < and + byte #212 = second.byte #176 < and or + { lang.ru 'char.lang := } + { lang.other 'char.lang := } + if$ + } + { byte #240 < + { charptr #3 + 'charptr := + byte #227 > byte #234 < and + { lang.zh 'char.lang := } + { byte #227 = + { second.byte #143 > + { lang.zh 'char.lang := } + { second.byte #128 > second.byte #132 < and + { lang.ja 'char.lang := } + { lang.other 'char.lang := } + if$ + } + if$ + } + { byte #239 = + second.byte #163 > second.byte #172 < and and + { lang.zh 'char.lang := } + { lang.other 'char.lang := } + if$ + } + if$ + } + if$ + } + { charptr #4 + 'charptr := + byte #240 = second.byte #159 > and + { lang.zh 'char.lang := } + { lang.other 'char.lang := } + if$ + } + if$ + } + if$ + } + if$ + char.lang tmp.lang > + { char.lang 'tmp.lang := } + 'skip$ + if$ + } + while$ + tmp.lang +} + +FUNCTION {check.entry.lang} +{ author field.or.null + title field.or.null * + get.str.lang +} + +STRINGS { entry.langid } + +FUNCTION {set.entry.lang} +{ "" 'entry.langid := + language empty$ not + { language 'entry.langid := } + 'skip$ + if$ + langid empty$ not + { langid 'entry.langid := } + 'skip$ + if$ + entry.langid empty$ + { check.entry.lang } + { entry.langid "english" = entry.langid "american" = or entry.langid "british" = or + { lang.en } + { entry.langid "chinese" = + { lang.zh } + { entry.langid "japanese" = + { lang.ja } + { entry.langid "russian" = + { lang.ru } + { check.entry.lang } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + 'entry.lang := +} + +FUNCTION {set.entry.numbered} +{ type$ "patent" = + type$ "standard" = or + type$ "techreport" = or + { #1 'entry.numbered := } + { #0 'entry.numbered := } + if$ +} + +INTEGERS { nameptr namesleft numnames name.lang } + +FUNCTION {format.name} +{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + t "others" = + { bbl.et.al } + { t get.str.lang 'name.lang := + name.lang lang.en = + { t #1 "{vv~}{ll}{ f{~}}" format.name$ + uppercase.name + { "u" change.case$ } + 'skip$ + if$ + t #1 "{, jj}" format.name$ * + } + { t #1 "{ll}{ff}" format.name$ } + if$ + } + if$ +} + +FUNCTION {format.names} +{ 's := + #1 'nameptr := + s num.names$ 'numnames := + "" + numnames 'namesleft := + { namesleft #0 > } + { s nameptr format.name bbl.et.al = + numnames bibliography.et.al.min #1 - > nameptr bibliography.et.al.use.first > and or + { ", " * + bbl.et.al * + #1 'namesleft := + } + { nameptr #1 > + { namesleft #1 = bbl.and "" = not and + { bbl.and * } + { ", " * } + if$ + } + 'skip$ + if$ + s nameptr format.name * + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.key} +{ empty$ + { key field.or.null } + { "" } + if$ +} + +FUNCTION {format.authors} +{ author empty$ not + { author format.names } + { "empty author in " cite$ * warning$ + "" + } + if$ +} + +FUNCTION {format.editors} +{ editor empty$ + { "" } + { editor format.names } + if$ +} + +FUNCTION {format.translators} +{ translator empty$ + { "" } + { translator format.names + entry.lang lang.zh = + { translator num.names$ #3 > + { "译" * } + { ", 译" * } + if$ + } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.full.names} +{'s := + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + { namesleft #0 > } + { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + t get.str.lang 'name.lang := + name.lang lang.en = + { t #1 "{vv~}{ll}" format.name$ 't := } + { t #1 "{ll}{ff}" format.name$ 't := } + if$ + nameptr #1 > + { + namesleft #1 > + { ", " * t * } + { + numnames #2 > + { "," * } + 'skip$ + if$ + t "others" = + { " et~al." * } + { " and " * t * } + if$ + } + if$ + } + 't + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.editor.full} +{ author empty$ + { editor empty$ + { "" } + { editor format.full.names } + if$ + } + { author format.full.names } + if$ +} + +FUNCTION {author.full} +{ author empty$ + { "" } + { author format.full.names } + if$ +} + +FUNCTION {editor.full} +{ editor empty$ + { "" } + { editor format.full.names } + if$ +} + +FUNCTION {make.full.names} +{ type$ "book" = + type$ "inbook" = + or + 'author.editor.full + { type$ "collection" = + type$ "proceedings" = + or + 'editor.full + 'author.full + if$ + } + if$ +} + +FUNCTION {output.bibitem} +{ newline$ + "\bibitem[" write$ + label ")" * + make.full.names duplicate$ short.list = + { pop$ } + { duplicate$ "]" contains + { "{" swap$ * "}" * } + 'skip$ + if$ + * + } + if$ + "]{" * write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {change.sentence.case} +{ entry.lang lang.en = + { "t" change.case$ } + 'skip$ + if$ +} + +FUNCTION {add.link} +{ url empty$ not + { "\href{" url * "}{" * swap$ * "}" * } + { doi empty$ not + { "\href{https://doi.org/" doi * "}{" * swap$ * "}" * } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.title} +{ title empty$ + { "" } + { title + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered number empty$ not and + { bbl.colon * + type$ "patent" = show.patent.country and + { address empty$ not + { address * ", " * } + { location empty$ not + { location * ", " * } + { entry.lang lang.zh = + { "中国" * ", " * } + 'skip$ + if$ + } + if$ + } + if$ + } + 'skip$ + if$ + number * + } + 'skip$ + if$ + link.title + 'add.link + 'skip$ + if$ + } + if$ +} + +FUNCTION {tie.or.space.connect} +{ duplicate$ text.length$ #3 < + { "~" } + { " " } + if$ + swap$ * * +} + +FUNCTION {either.or.check} +{ empty$ + 'pop$ + { "can't use both " swap$ * " fields in " * cite$ * warning$ } + if$ +} + +FUNCTION {is.digit} +{ duplicate$ empty$ + { pop$ #0 } + { chr.to.int$ + duplicate$ "0" chr.to.int$ < + { pop$ #0 } + { "9" chr.to.int$ > + { #0 } + { #1 } + if$ + } + if$ + } + if$ +} + +FUNCTION {is.number} +{ 's := + s empty$ + { #0 } + { s text.length$ 'charptr := + { charptr #0 > + s charptr #1 substring$ is.digit + and + } + { charptr #1 - 'charptr := } + while$ + charptr not + } + if$ +} + +FUNCTION {format.volume} +{ volume empty$ not + { volume is.number + { entry.lang lang.zh = + { "第 " volume * " 卷" * } + { "volume" volume tie.or.space.connect } + if$ + } + { volume } + if$ + } + { "" } + if$ +} + +FUNCTION {format.number} +{ number empty$ not + { number is.number + { entry.lang lang.zh = + { "第 " number * " 册" * } + { "number" number tie.or.space.connect } + if$ + } + { number } + if$ + } + { "" } + if$ +} + +FUNCTION {format.volume.number} +{ volume empty$ not + { format.volume } + { format.number } + if$ +} + +FUNCTION {format.title.vol.num} +{ title + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered + { number empty$ not + { bbl.colon * number * } + 'skip$ + if$ + } + { format.volume.number 's := + s empty$ not + { bbl.colon * s * } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.series.vol.num.title} +{ format.volume.number 's := + series empty$ not + { series + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered + { bbl.wide.space * } + { bbl.colon * + s empty$ not + { s * bbl.wide.space * } + 'skip$ + if$ + } + if$ + title * + sentence.case.title + 'change.sentence.case + 'skip$ + if$ + entry.numbered number empty$ not and + { bbl.colon * number * } + 'skip$ + if$ + } + { format.title.vol.num } + if$ + format.btitle + link.title + 'add.link + 'skip$ + if$ +} + +FUNCTION {format.booktitle.vol.num} +{ booktitle + entry.numbered + 'skip$ + { format.volume.number 's := + s empty$ not + { bbl.colon * s * } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.series.vol.num.booktitle} +{ format.volume.number 's := + series empty$ not + { series bbl.colon * + entry.numbered not s empty$ not and + { s * bbl.wide.space * } + 'skip$ + if$ + booktitle * + } + { format.booktitle.vol.num } + if$ + format.btitle +} + +FUNCTION {remove.period} +{ 't := + "" 's := + { t empty$ not } + { t #1 #1 substring$ 'tmp.str := + tmp.str "." = not + { s tmp.str * 's := } + 'skip$ + if$ + t #2 global.max$ substring$ 't := + } + while$ + s +} + +FUNCTION {abbreviate} +{ remove.period + 't := + t "l" change.case$ 's := + "" + s "physical review letters" = + { "Phys Rev Lett" } + 'skip$ + if$ + 's := + s empty$ + { t } + { pop$ s } + if$ +} + +FUNCTION {get.journal.title} +{ short.journal + { shortjournal empty$ not + { shortjournal } + { journal empty$ not + { journal abbreviate } + { journaltitle empty$ not + { journaltitle abbreviate } + { "" } + if$ + } + if$ + } + if$ + } + { journal empty$ not + { journal } + { journaltitle empty$ not + { journaltitle } + { shortjournal empty$ not + { shortjournal } + { "" } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {check.arxiv.preprint} +{ #1 #5 substring$ "l" change.case$ "arxiv" = + { #1 } + { #0 } + if$ +} + +FUNCTION {format.journal} +{ get.journal.title + duplicate$ empty$ not + { italic.journal entry.lang lang.en = and + 'emphasize + 'skip$ + if$ + } + 'skip$ + if$ +} + +FUNCTION {set.entry.mark} +{ entry.mark empty$ not + 'pop$ + { mark empty$ not + { pop$ mark 'entry.mark := } + { 'entry.mark := } + if$ + } + if$ +} + +FUNCTION {format.mark} +{ show.mark + { entry.mark + show.medium.type + { medium empty$ not + { "/" * medium * } + { entry.is.electronic + { "/OL" * } + 'skip$ + if$ + } + if$ + } + 'skip$ + if$ + 'entry.mark := + space.before.mark + { " " } + { "\allowbreak" } + if$ + "[" * entry.mark * "]" * + } + { "" } + if$ +} + +FUNCTION {num.to.ordinal} +{ duplicate$ text.length$ 'charptr := + duplicate$ charptr #1 substring$ 's := + s "1" = + { "st" * } + { s "2" = + { "nd" * } + { s "3" = + { "rd" * } + { "th" * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.edition} +{ edition empty$ + { "" } + { edition is.number + { edition "1" = not + { entry.lang lang.zh = + { edition " 版" * } + { edition num.to.ordinal " ed." * } + if$ + } + 'skip$ + if$ + } + { entry.lang lang.en = + { edition change.sentence.case 's := + s "Revised" = s "Revised edition" = or + { "Rev. ed." } + { s " ed." * } + if$ + } + { edition } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.publisher} +{ publisher empty$ not + { publisher } + { school empty$ not + { school } + { organization empty$ not + { organization } + { institution empty$ not + { institution } + { "" } + if$ + } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.address.publisher} +{ address empty$ not + { address } + { location empty$ not + { location } + { "" } + if$ + } + if$ + duplicate$ empty$ not + { format.publisher empty$ not + { bbl.colon * format.publisher * } + { entry.is.electronic not show.missing.address.publisher and + { bbl.colon * bbl.sine.nomine * } + 'skip$ + if$ + } + if$ + } + { pop$ + entry.is.electronic not show.missing.address.publisher and + { format.publisher empty$ not + { bbl.sine.loco bbl.colon * format.publisher * } + { bbl.sine.loco.sine.nomine } + if$ + } + { format.publisher empty$ not + { format.publisher } + { "" } + if$ + } + if$ + } + if$ +} + +FUNCTION {extract.before.dash} +{ duplicate$ empty$ + { pop$ "" } + { 's := + #1 'charptr := + s text.length$ #1 + 'len := + { charptr len < + s charptr #1 substring$ "-" = not + and + } + { charptr #1 + 'charptr := } + while$ + s #1 charptr #1 - substring$ + } + if$ +} + +FUNCTION {extract.after.dash} +{ duplicate$ empty$ + { pop$ "" } + { 's := + #1 'charptr := + s text.length$ #1 + 'len := + { charptr len < + s charptr #1 substring$ "-" = not + and + } + { charptr #1 + 'charptr := } + while$ + { charptr len < + s charptr #1 substring$ "-" = + and + } + { charptr #1 + 'charptr := } + while$ + s charptr global.max$ substring$ + } + if$ +} + +FUNCTION {extract.before.slash} +{ duplicate$ empty$ + { pop$ "" } + { 's := + #1 'charptr := + s text.length$ #1 + 'len := + { charptr len < + s charptr #1 substring$ "/" = not + and + } + { charptr #1 + 'charptr := } + while$ + s #1 charptr #1 - substring$ + } + if$ +} + +FUNCTION {extract.after.slash} +{ duplicate$ empty$ + { pop$ "" } + { 's := + #1 'charptr := + s text.length$ #1 + 'len := + { charptr len < + s charptr #1 substring$ "-" = not + and + s charptr #1 substring$ "/" = not + and + } + { charptr #1 + 'charptr := } + while$ + { charptr len < + s charptr #1 substring$ "-" = + s charptr #1 substring$ "/" = + or + and + } + { charptr #1 + 'charptr := } + while$ + s charptr global.max$ substring$ + } + if$ +} + +FUNCTION {format.year} +{ year empty$ not + { year extract.before.slash extra.label * } + { date empty$ not + { date extract.before.dash extra.label * } + { "empty year in " cite$ * warning$ + urldate empty$ not + { "[" urldate extract.before.dash * extra.label * "]" * } + { "" } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.periodical.year} +{ year empty$ not + { year extract.before.slash + "--" * + year extract.after.slash + duplicate$ empty$ + 'pop$ + { * } + if$ + } + { date empty$ not + { date extract.before.dash } + { "empty year in " cite$ * warning$ + urldate empty$ not + { "[" urldate extract.before.dash * "]" * } + { "" } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.date} +{ date empty$ not + { type$ "patent" = type$ "newspaper" = or + { date } + { entrysubtype empty$ not + { type$ "article" = entrysubtype "newspaper" = and + { date } + { format.year } + if$ + } + { format.year } + if$ + } + if$ + } + { year empty$ not + { format.year } + { "" } + if$ + } + if$ +} + +FUNCTION {format.editdate} +{ date empty$ not + { "\allowbreak(" date * ")" * } + { "" } + if$ +} + +FUNCTION {format.urldate} +{ show.urldate show.url and entry.url empty$ not and + is.pure.electronic or + urldate empty$ not and + { "\allowbreak[" urldate * "]" * } + { "" } + if$ +} + +FUNCTION {hyphenate} +{ 't := + "" + { t empty$ not } + { t #1 #1 substring$ "-" = + { wave.dash.in.pages + { "~" * } + { "-" * } + if$ + { t #1 #1 substring$ "-" = } + { t #2 global.max$ substring$ 't := } + while$ + } + { t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.pages} +{ pages empty$ + { "" } + { pages hyphenate } + if$ +} + +FUNCTION {format.extracted.pages} +{ pages empty$ + { "" } + { pages + only.start.page + 'extract.before.dash + 'hyphenate + if$ + } + if$ +} + +FUNCTION {format.journal.volume} +{ volume empty$ not + { bold.journal.volume + { "\textbf{" volume * "}" * } + { volume } + if$ + } + { "" } + if$ +} + +FUNCTION {format.journal.number} +{ number empty$ not + { "\allowbreak (" number * ")" * } + { "" } + if$ +} + +FUNCTION {format.journal.pages} +{ pages empty$ + { "" } + { format.extracted.pages } + if$ +} + +FUNCTION {format.periodical.year.volume.number} +{ year empty$ not + { year extract.before.slash } + { "empty year in periodical " cite$ * warning$ } + if$ + volume empty$ not + { ", " * volume extract.before.dash * } + 'skip$ + if$ + number empty$ not + { "\allowbreak (" * number extract.before.dash * ")" * } + 'skip$ + if$ + "--" * + year extract.after.slash empty$ + volume extract.after.dash empty$ and + number extract.after.dash empty$ and not + { year extract.after.slash empty$ not + { year extract.after.slash * } + { year extract.before.slash * } + if$ + volume empty$ not + { ", " * volume extract.after.dash * } + 'skip$ + if$ + number empty$ not + { "\allowbreak (" * number extract.after.dash * ")" * } + 'skip$ + if$ + } + 'skip$ + if$ +} + +FUNCTION {check.url} +{ url empty$ not + { "\url{" url * "}" * 'entry.url := + #1 'entry.is.electronic := + } + { howpublished empty$ not + { howpublished #1 #5 substring$ "\url{" = + { howpublished 'entry.url := + #1 'entry.is.electronic := + } + 'skip$ + if$ + } + { note empty$ not + { note #1 #5 substring$ "\url{" = + { note 'entry.url := + #1 'entry.is.electronic := + } + 'skip$ + if$ + } + 'skip$ + if$ + } + if$ + } + if$ +} + +FUNCTION {output.url} +{ show.url is.pure.electronic or + entry.url empty$ not and + { new.block + entry.url output + } + 'skip$ + if$ +} + +FUNCTION {check.doi} +{ doi empty$ not + { #1 'entry.is.electronic := } + 'skip$ + if$ +} + +FUNCTION {is.in.url} +{ 's := + s empty$ + { #1 } + { entry.url empty$ + { #0 } + { s text.length$ 'len := + entry.url text.length$ 'charptr := + { entry.url charptr len substring$ s = not + charptr #0 > + and + } + { charptr #1 - 'charptr := } + while$ + charptr + } + if$ + } + if$ +} + +FUNCTION {format.doi} +{ "" + doi empty$ not + { "" 's := + doi 't := + #0 'numnames := + { t empty$ not} + { t #1 #1 substring$ 'tmp.str := + tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or + { t #2 #1 substring$ empty$ + { s tmp.str * 's := } + 'skip$ + if$ + s empty$ s is.in.url or + 'skip$ + { numnames #1 + 'numnames := + numnames #1 > + { ", " * } + { "DOI: " * } + if$ + "\doi{" s * "}" * * + } + if$ + "" 's := + } + { s tmp.str * 's := } + if$ + t #2 global.max$ substring$ 't := + } + while$ + } + 'skip$ + if$ +} + +FUNCTION {output.doi} +{ doi empty$ not show.doi and + show.english.translation entry.lang lang.zh = and not and + { new.block + format.doi output + } + 'skip$ + if$ +} + +FUNCTION {check.electronic} +{ "" 'entry.url := + #0 'entry.is.electronic := + 'check.doi + 'skip$ + if$ + 'check.url + 'skip$ + if$ + medium empty$ not + { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or + { #1 'entry.is.electronic := } + 'skip$ + if$ + } + 'skip$ + if$ +} + +FUNCTION {format.eprint} +{ archivePrefix empty$ not + { archivePrefix } + { eprinttype empty$ not + { archivePrefix } + { "" } + if$ + } + if$ + 's := + s empty$ not + { s ": \eprint{" * + url empty$ not + { url } + { "https://" s "l" change.case$ * ".org/abs/" * eprint * } + if$ + * "}{" * + eprint * "}" * + } + { eprint } + if$ +} + +FUNCTION {output.eprint} +{ show.preprint eprint empty$ not and + { new.block + format.eprint output + } + 'skip$ + if$ +} + +FUNCTION {format.note} +{ note empty$ not show.note and + { note } + { "" } + if$ +} + +FUNCTION {output.translation} +{ show.english.translation entry.lang lang.zh = and + { translation empty$ not + { translation } + { "[English translation missing!]" } + if$ + " (in Chinese)" * output + write$ + format.doi duplicate$ empty$ not + { newline$ + write$ + } + 'pop$ + if$ + " \\" write$ + newline$ + "(" write$ + "" + before.all 'output.state := + } + 'skip$ + if$ +} + +FUNCTION {empty.misc.check} +{ author empty$ title empty$ + year empty$ + and and + key empty$ not and + { "all relevant fields are empty in " cite$ * warning$ } + 'skip$ + if$ +} + +FUNCTION {monograph} +{ output.bibitem + output.translation + author empty$ not + { format.authors } + { editor empty$ not + { format.editors } + { "empty author and editor in " cite$ * warning$ + "" + } + if$ + } + if$ + output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.series.vol.num.title "title" output.check + "M" set.entry.mark + format.mark "" output.after + new.block + format.translators output + new.sentence + format.edition output + new.block + format.address.publisher output + year.after.author not + { format.year "year" output.check } + 'skip$ + if$ + format.pages bbl.pages.colon output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.title "title" output.check + "M" set.entry.mark + format.mark "" output.after + new.block + format.translators output + new.slash + format.editors output + new.block + format.series.vol.num.booktitle "booktitle" output.check + new.block + format.edition output + new.block + format.address.publisher output + year.after.author not + { format.year "year" output.check } + 'skip$ + if$ + format.extracted.pages bbl.pages.colon output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry +} + +FUNCTION {periodical} +{ output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.title "title" output.check + "J" set.entry.mark + format.mark "" output.after + new.block + format.periodical.year.volume.number output + new.block + format.address.publisher output + year.after.author not + { format.periodical.year "year" output.check } + 'skip$ + if$ + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry +} + +FUNCTION {journal.article} +{ output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + title.in.journal + { format.title "title" output.check + entrysubtype empty$ not + { + entrysubtype "newspaper" = + { "N" set.entry.mark } + { "J" set.entry.mark } + if$ + } + { "J" set.entry.mark } + if$ + format.mark "" output.after + new.block + } + 'skip$ + if$ + format.journal "journal" output.check + year.after.author not + { format.date "year" output.check } + 'skip$ + if$ + format.journal.volume output + format.journal.number "" output.after + format.journal.pages bbl.pages.colon output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry +} + +FUNCTION {patent} +{ output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.title "title" output.check + "P" set.entry.mark + format.mark "" output.after + new.block + format.date "year" output.check + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry +} + +FUNCTION {electronic} +{ #1 #1 check.electronic + #1 'entry.is.electronic := + #1 'is.pure.electronic := + output.bibitem + output.translation + format.authors output + author format.key output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + format.series.vol.num.title "title" output.check + "EB" set.entry.mark + format.mark "" output.after + new.block + format.address.publisher output + year.after.author not + { date empty$ + { format.date output } + 'skip$ + if$ + } + 'skip$ + if$ + format.pages bbl.pages.colon output.after + format.editdate "" output.after + format.urldate "" output.after + output.url + output.doi + new.block + format.note output + fin.entry +} + +FUNCTION {preprint} +{ output.bibitem + output.translation + author empty$ not + { format.authors } + { editor empty$ not + { format.editors } + { "empty author and editor in " cite$ * warning$ + "" + } + if$ + } + if$ + output + year.after.author + { period.after.author + 'new.sentence + 'skip$ + if$ + format.year "year" output.check + } + 'skip$ + if$ + new.block + title.in.journal + { format.series.vol.num.title "title" output.check + "A" set.entry.mark + format.mark "" output.after + new.block + } + 'skip$ + if$ + format.translators output + new.sentence + format.edition output + new.block + year.after.author not + { date empty$ + { format.date output } + 'skip$ + if$ + } + 'skip$ + if$ + format.pages bbl.pages.colon output.after + format.editdate "" output.after + format.urldate "" output.after + output.eprint + output.url + new.block + format.note output + fin.entry +} + +FUNCTION {misc} +{ get.journal.title + duplicate$ empty$ not + { check.arxiv.preprint + 'preprint + 'journal.article + if$ + } + { pop$ + booktitle empty$ not + 'incollection + { publisher empty$ not + 'monograph + { eprint empty$ not archivePrefix empty$ not or + 'preprint + { entry.is.electronic + 'electronic + { + "Z" set.entry.mark + monograph + } + if$ + } + if$ + } + if$ + } + if$ + } + if$ + empty.misc.check +} + +FUNCTION {archive} +{ "A" set.entry.mark + misc +} + +FUNCTION {article} { misc } + +FUNCTION {book} { monograph } + +FUNCTION {booklet} { book } + +FUNCTION {collection} +{ "G" set.entry.mark + monograph +} + +FUNCTION {database} +{ "DB" set.entry.mark + electronic +} + +FUNCTION {dataset} +{ "DS" set.entry.mark + electronic +} + +FUNCTION {inbook} { book } + +FUNCTION {inproceedings} +{ "C" set.entry.mark + incollection +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {legislation} { archive } + +FUNCTION {map} +{ "CM" set.entry.mark + misc +} + +FUNCTION {manual} { monograph } + +FUNCTION {mastersthesis} +{ "D" set.entry.mark + monograph +} + +FUNCTION {newspaper} +{ "N" set.entry.mark + article +} + +FUNCTION {online} +{ "EB" set.entry.mark + electronic +} + +FUNCTION {phdthesis} { mastersthesis } + +FUNCTION {proceedings} +{ "C" set.entry.mark + monograph +} + +FUNCTION {software} +{ "CP" set.entry.mark + electronic +} + +FUNCTION {standard} +{ "S" set.entry.mark + misc +} + +FUNCTION {techreport} +{ "R" set.entry.mark + misc +} + +FUNCTION {unpublished} { misc } + +FUNCTION {default.type} { misc } + +MACRO {jan} {"January"} + +MACRO {feb} {"February"} + +MACRO {mar} {"March"} + +MACRO {apr} {"April"} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"August"} + +MACRO {sep} {"September"} + +MACRO {oct} {"October"} + +MACRO {nov} {"November"} + +MACRO {dec} {"December"} + +MACRO {acmcs} {"ACM Computing Surveys"} + +MACRO {acta} {"Acta Informatica"} + +MACRO {cacm} {"Communications of the ACM"} + +MACRO {ibmjrd} {"IBM Journal of Research and Development"} + +MACRO {ibmsj} {"IBM Systems Journal"} + +MACRO {ieeese} {"IEEE Transactions on Software Engineering"} + +MACRO {ieeetc} {"IEEE Transactions on Computers"} + +MACRO {ieeetcad} + {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} + +MACRO {ipl} {"Information Processing Letters"} + +MACRO {jacm} {"Journal of the ACM"} + +MACRO {jcss} {"Journal of Computer and System Sciences"} + +MACRO {scp} {"Science of Computer Programming"} + +MACRO {sicomp} {"SIAM Journal on Computing"} + +MACRO {tocs} {"ACM Transactions on Computer Systems"} + +MACRO {tods} {"ACM Transactions on Database Systems"} + +MACRO {tog} {"ACM Transactions on Graphics"} + +MACRO {toms} {"ACM Transactions on Mathematical Software"} + +MACRO {toois} {"ACM Transactions on Office Information Systems"} + +MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} + +MACRO {tcs} {"Theoretical Computer Science"} + +FUNCTION {sortify} +{ purify$ + "l" change.case$ +} + +FUNCTION {chop.word} +{ 's := + 'len := + s #1 len substring$ = + { s len #1 + global.max$ substring$ } + 's + if$ +} + +FUNCTION {format.lab.name} +{ "{vv~}{ll}{, jj}{, ff}" format.name$ 't := + t "others" = + { citation.et.al } + { t get.str.lang 'name.lang := + name.lang lang.zh = name.lang lang.ja = or + { t #1 "{ll}{ff}" format.name$ } + { t #1 "{vv~}{ll}" format.name$ } + if$ + } + if$ +} + +FUNCTION {format.lab.names} +{ 's := + s #1 format.lab.name 'short.label := + #1 'nameptr := + s num.names$ 'numnames := + "" + numnames 'namesleft := + { namesleft #0 > } + { s nameptr format.lab.name citation.et.al = + numnames citation.et.al.min #1 - > nameptr citation.et.al.use.first > and or + { bbl.space * + citation.et.al * + #1 'namesleft := + } + { nameptr #1 > + { namesleft #1 = citation.and "" = not and + { citation.and * } + { ", " * } + if$ + } + 'skip$ + if$ + s nameptr format.lab.name * + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {author.key.label} +{ author empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.editor.key.label} +{ author empty$ + { editor empty$ + { key empty$ + { cite$ #1 #3 substring$ } + 'key + if$ + } + { editor format.lab.names } + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {author.key.organization.label} +{ author empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { author format.lab.names } + if$ +} + +FUNCTION {editor.key.organization.label} +{ editor empty$ + { key empty$ + { organization empty$ + { cite$ #1 #3 substring$ } + { "The " #4 organization chop.word #3 text.prefix$ } + if$ + } + 'key + if$ + } + { editor format.lab.names } + if$ +} + +FUNCTION {calc.short.authors} +{ "" 'short.label := + type$ "book" = + type$ "inbook" = + or + 'author.editor.key.label + { type$ "collection" = + type$ "proceedings" = + or + { editor empty$ not + 'editor.key.organization.label + 'author.key.organization.label + if$ + } + 'author.key.label + if$ + } + if$ + 'short.list := + short.label empty$ + { short.list 'short.label := } + 'skip$ + if$ +} + +FUNCTION {calc.label} +{ calc.short.authors + short.list "]" contains + { "{" short.list * "}" * } + { short.list } + if$ + "(" + * + format.year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + duplicate$ "]" contains + { "{" swap$ * "}" * } + 'skip$ + if$ + * + 'label := + short.label + "(" + * + format.year duplicate$ empty$ + short.list key field.or.null = or + { pop$ "" } + 'skip$ + if$ + * + 'short.label := +} + +INTEGERS { seq.num } + +FUNCTION {init.seq} +{ #0 'seq.num :=} + +FUNCTION {int.to.fix} +{ "000000000" swap$ int.to.str$ * + #-1 #10 substring$ +} + +FUNCTION {presort} +{ set.entry.lang + set.entry.numbered + show.url show.doi check.electronic + #0 'is.pure.electronic := + calc.label + label sortify + " " + * + seq.num #1 + 'seq.num := + seq.num int.to.fix + 'sort.label := + sort.label * + #1 entry.max$ substring$ + 'sort.key$ := +} + +STRINGS { longest.label last.label next.extra last.extra.label } + +INTEGERS { longest.label.width number.label } + +FUNCTION {initialize.longest.label} +{ "" 'longest.label := + #0 int.to.chr$ 'last.label := + "" 'next.extra := + #0 'longest.label.width := + #0 'number.label := + "" 'last.extra.label := +} + +FUNCTION {forward.pass} +{ + number.label #1 + 'number.label := +} + +FUNCTION {reverse.pass} +{ + label extra.label * 'label := +} + +FUNCTION {bib.sort.order} +{ sort.label 'sort.key$ := +} + +FUNCTION {begin.bib} +{ preamble$ empty$ + 'skip$ + { preamble$ write$ newline$ } + if$ + "\begin{thebibliography}{" number.label int.to.str$ * "}" * + write$ newline$ + terms.in.macro + { "\providecommand{\biband}{和}" + write$ newline$ + "\providecommand{\bibetal}{等}" + write$ newline$ + } + 'skip$ + if$ + "\providecommand{\natexlab}[1]{#1}" + write$ newline$ + "\providecommand{\url}[1]{#1}" + write$ newline$ + "\expandafter\ifx\csname urlstyle\endcsname\relax\else" + write$ newline$ + " \urlstyle{same}\fi" + write$ newline$ + "\expandafter\ifx\csname href\endcsname\relax" + write$ newline$ + " \DeclareUrlCommand\doi{\urlstyle{rm}}" + write$ newline$ + " \def\eprint#1#2{#2}" + write$ newline$ + "\else" + write$ newline$ + " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}" + write$ newline$ + " \let\eprint\href" + write$ newline$ + "\fi" + write$ newline$ + } + +FUNCTION {end.bib} +{ newline$ + "\end{thebibliography}" write$ newline$ +} + +READ + +EXECUTE {init.state.consts} + +EXECUTE {load.config} + +EXECUTE {init.seq} + +ITERATE {presort} + +SORT + +EXECUTE {initialize.longest.label} + +ITERATE {forward.pass} + +REVERSE {reverse.pass} + +ITERATE {bib.sort.order} + +SORT + +EXECUTE {begin.bib} + +ITERATE {call.type$} + EXECUTE {end.bib} \ No newline at end of file diff --git a/images/csu.png b/csuthesis_template/images/csu.png old mode 100755 new mode 100644 similarity index 100% rename from images/csu.png rename to csuthesis_template/images/csu.png diff --git a/thesis-references.bib b/csuthesis_template/references.bib old mode 100755 new mode 100644 similarity index 100% rename from thesis-references.bib rename to csuthesis_template/references.bib diff --git a/fonts/simfang.ttf b/fonts/simfang.ttf new file mode 100644 index 0000000..68334e2 Binary files /dev/null and b/fonts/simfang.ttf differ diff --git a/fonts/simhei.ttf b/fonts/simhei.ttf new file mode 100644 index 0000000..c686a4c Binary files /dev/null and b/fonts/simhei.ttf differ diff --git a/fonts/simkai.ttf b/fonts/simkai.ttf new file mode 100644 index 0000000..d7c3b90 Binary files /dev/null and b/fonts/simkai.ttf differ diff --git a/fonts/simsun.ttf b/fonts/simsun.ttf new file mode 100644 index 0000000..e0115ab Binary files /dev/null and b/fonts/simsun.ttf differ diff --git a/fonts/stxinwei.ttf b/fonts/stxinwei.ttf new file mode 100644 index 0000000..7f57b1b Binary files /dev/null and b/fonts/stxinwei.ttf differ diff --git a/images/cover.png b/images/cover.png deleted file mode 100755 index d6979ef..0000000 Binary files a/images/cover.png and /dev/null differ diff --git a/official_documents_2020/.DS_Store b/official_documents_2020/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/official_documents_2020/.DS_Store and /dev/null differ