├── .github
└── workflows
│ └── build.yml
├── .gitignore
├── LICENSE
├── Makefile
├── README.md
├── buaathesis.cls
├── data
├── abstract.tex
├── appendix1-faq.tex
├── appendix2-contactus.tex
├── bachelor
│ ├── acknowledgement.tex
│ ├── assign.tex
│ └── bachelor_info.tex
├── bibs.bib
├── chapter1-intro.tex
├── chapter2-config.tex
├── chapter3-download.tex
├── chapter4-basic.tex
├── chapter5-usage.tex
├── chapter6-implement.tex
├── com_info.tex
├── conclusion.tex
├── master
│ ├── back1-achievement.tex
│ ├── back2-acknowledgement.tex
│ ├── back3-aboutauthor.tex
│ ├── denotation.tex
│ └── master_info.tex
└── reference.tex
├── figure
├── buaamark.pdf
├── buaaname.pdf
├── buaaname_ch.pdf
└── image.pdf
├── gbt7714-author-year.bst
├── gbt7714-numerical.bst
├── gbt7714.sty
├── msmake.bat
├── sample-bachelor.tex
├── sample-kaitireport.tex
└── sample-master.tex
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build Paper
2 |
3 | on:
4 | - push
5 | - pull_request
6 |
7 | jobs:
8 | unittest:
9 | name: Paper build
10 | runs-on: ${{ matrix.os }}
11 | if: "!contains(github.event.head_commit.message, 'ci skip')"
12 | strategy:
13 | fail-fast: false
14 | matrix:
15 | os:
16 | - 'ubuntu-22.04'
17 | latex-entry:
18 | - 'sample-bachelor'
19 | - 'sample-kaitireport'
20 | - 'sample-master'
21 |
22 | steps:
23 | - name: Checkout code
24 | uses: actions/checkout@v2
25 | with:
26 | fetch-depth: 10
27 | - name: Set up system dependences on linux
28 | if: ${{ runner.os == 'Linux' }}
29 | run: |
30 | sudo apt-get update
31 | sudo apt-get install -y tree cloc make
32 | - name: Load the font requirements
33 | run: |
34 | mkdir -p ./local_fonts
35 |
36 | curl -L 'https://github.com/dolbydu/font/raw/master/unicode/SimSun.ttc' -o ./local_fonts/SimSun.ttc # download songti
37 | curl -L 'https://github.com/dolbydu/font/raw/master/unicode/SimHei.ttf' -o ./local_fonts/SimHei.ttf # download heiti
38 | curl -L 'https://github.com/dolbydu/font/raw/master/unicode/STXingkai.TTF' -o ./local_fonts/STXingkai.ttf # download STXingKai
39 | curl -L 'https://github.com/dolbydu/font/raw/master/unicode/STKaiti.TTF' -o ./local_fonts/STKaiti.ttf # download STKaiTi
40 | - name: Test the basic environment
41 | run: |
42 | tree .
43 | cloc .
44 | - name: Compile ${{ matrix.latex-entry }}.tex to pdf
45 | uses: xu-cheng/latex-action@v3
46 | with:
47 | root_file: ${{ matrix.latex-entry }}.tex
48 | latexmk_use_xelatex: true
49 | latexmk_shell_escape: true
50 | extra_fonts: |
51 | ./local_fonts/*
52 | pre_compile: |
53 | apk add msttcorefonts-installer fontconfig
54 | update-ms-fonts
55 | fc-cache -f
56 | - name: Test the compiled file
57 | run: |
58 | ls -al *.pdf
59 | - uses: actions/upload-artifact@v2
60 | with:
61 | name: ${{ matrix.latex-entry }}.pdf
62 | path: ${{ matrix.latex-entry }}.pdf
63 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.acn
2 | *.acr
3 | *.alg
4 | *.aux
5 | *.bbl
6 | *.blg
7 | *.dvi
8 | *.fdb_latexmk
9 | *.glg
10 | *.glo
11 | *.gls
12 | *.idx
13 | *.ilg
14 | *.ind
15 | *.ist
16 | *.lof
17 | *.log
18 | *.lot
19 | *.maf
20 | *.mtc
21 | *.mtc0
22 | *.nav
23 | *.nlo
24 | *.out
25 | *.pdfsync
26 | *.ps
27 | *.snm
28 | *.synctex.gz
29 | *.toc
30 | *.vrb
31 | *.xdy
32 | *.swp
33 | *.thm
34 | *.pdf
35 | *.zip
36 | .DS_Store
37 | /local_fonts
38 | /times_new_roman
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 BHOSC All rights reserved.
2 |
3 | # GPLv3
4 |
5 | This program is free software: you can redistribute it and/or modify
6 | it under the terms of the GNU General Public License as published by
7 | the Free Software Foundation, either version 3 of the License, or
8 | (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program. If not, see .
17 |
18 | # LPPL
19 |
20 | This work may be distributed and/or modified under the
21 | conditions of the LaTeX Project Public License, either version 1.3
22 | of this license or (at your option) any later version.
23 | The latest version of this license is in
24 | http://www.latex-project.org/lppl.txt
25 | and version 1.3 or later is part of all distributions of LaTeX
26 | version 2005/12/01 or later.
27 |
28 | This work has the LPPL maintenance status 'maintained'.
29 |
30 | The Current Maintainer of this work is BHOSC.
31 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | bachelor:
2 | xelatex sample-bachelor.tex
3 | -bibtex sample-bachelor.aux
4 | xelatex sample-bachelor.tex
5 | xelatex sample-bachelor.tex
6 | master:
7 | xelatex sample-master.tex
8 | -bibtex sample-master.aux
9 | xelatex sample-master.tex
10 | xelatex sample-master.tex
11 | kaitireport:
12 | xelatex sample-kaitireport.tex
13 | -bibtex sample-kaitireport.aux
14 | xelatex sample-kaitireport.tex
15 | xelatex sample-kaitireport.tex
16 | clean:
17 | find . -name '*.aux' -print0 | xargs -0 rm -rf
18 | rm -rf *.lof *.log *.lot *.out *.toc *.bbl *.blg *.thm
19 | depclean: clean
20 | rm -rf *.pdf
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BUAAthesis
2 |
3 | 北航毕设论文 LaTeX 模板
4 |
5 | ## 项目说明
6 |
7 | 这是北航开源俱乐部维护的的北航毕设论文的 LaTeX 模板
8 |
9 | 目前仍在开发中,欢迎关注进展,提交 bug/issue,甚至贡献代码
10 |
11 | ## 预览
12 |
13 | 项目发布了最新版本的编译好的 [PDF 样例文档](https://github.com/BHOSC/BUAAthesis/releases/latest) 供大家预览:
14 |
15 | + 本科:https://github.com/BHOSC/BUAAthesis/releases/download/v0.1/sample-bachelor.pdf
16 | + 硕士:https://github.com/BHOSC/BUAAthesis/releases/download/v0.1/sample-master.pdf
17 | + 博士:https://github.com/BHOSC/BUAAthesis/releases/download/v0.1/sample-doctor.pdf
18 |
19 | ## 依赖
20 |
21 | 模板依赖 v2.0 及以上版本的 ctex 包,请使用较新版本的 LaTeX 发行版。
22 |
23 | 目前已经测试的 LaTeX 发行版包括:
24 |
25 | + TeXLive 2015、TeXLive 2016、TeXLive 2019(** 推荐 **)
26 | + CTeX 2.9.3
27 |
28 | 对于老版本的 LaTeX 发行版,请通过包管理器升级 ctex 的版本。
29 |
30 |
31 |
32 | 此外,对于非Windows环境,会需要额外安装两个字体:
33 |
34 | * `Times New Roman`,该字体可以在Windows系统字体库中获取,可以从[此链接下载](https://dl.freefontsfamily.com/download/Times-New-Roman-Font/),也可以在Ubuntu/Debian下快速安装(**推荐使用此方法以实现自动化**)
35 |
36 | ```shell
37 | echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections # 用于非交互模式下自动安装,其他情况下非必须
38 | sudo apt-get install -y ttf-mscorefonts-installer # 安装微软核心字体库
39 | ```
40 |
41 | * `STXingKai`,该字体暂无可靠的自动安装手段,可以从Windows系统字体库中获取,或从[此链接下载](https://github.com/dolbydu/font/raw/master/unicode/STXingkai.TTF)。
42 |
43 | * `STKaiTi`,该字体暂无可靠的自动安装手段,可以从Windows系统字体库中获取,或从[此链接下载](https://github.com/dolbydu/font/raw/master/unicode/STKaiti.TTF)。
44 |
45 | * `SimSun`,该字体暂无可靠的自动安装手段,可以从Windows系统字体库中获取,或从[此链接下载](https://github.com/dolbydu/font/raw/master/unicode/SimSun.ttc)。
46 |
47 | * `SimHei`,该字体暂无可靠的自动安装手段,可以从Windows系统字体库中获取,或从[此链接下载](https://github.com/dolbydu/font/raw/master/unicode/SimHei.ttf)。
48 |
49 | 关于Linux环境下安装字体,可以参考此篇:[linux安装字体](https://www.cnblogs.com/wangjiming/p/12553535.html)
50 |
51 | 如需更多字体文件,可以去[此仓库查找并下载](https://github.com/dolbydu/font)。
52 |
53 |
54 | ## 使用方法
55 |
56 | 1. 可以使用命令行或 PowerShell 等,配合项目中的 `mamske.bat` 批处理文件进行编译,详细使用方法请见 `mamske.bat` 文件;
57 |
58 | 2. 使用 Makefile,需要所使用的命令行环境支持 Make,cd 到 BUAAthesis 相应目录,目前支持以下功能
59 |
60 | + `make bachelor` # 编译本科生的 LATEX(文件默认项,亦可直接输入 make)
61 | + `make master` # 编译研究生的 LATEX 文件
62 | + `make kaitireport` # 编译本科生/研究生/博士生的开题报告/文献综述文件
63 | + `make clean` # 删除编译过程中生成的文件(除了 pdf)
64 | + `make depclean` # 删除编译过程中生成的文件(包括 pdf)
65 |
66 | 3. 使用 Visual Studio Code 等软件进行编译,请使用 `xelatex->bibtex->xelatex*2` 方式进行编译;
67 |
68 | ## 参考文献相关
69 |
70 | 模板参考文献格式采用国家标准 `GB/T 7714-2005` 《信息与文献 参考文献著录规则》之中描述的格式。代码实现为 `CTeX-org / gbt7714-bibtex-style` v2.0.1[https://github.com/CTeX-org/gbt7714-bibtex-style/](https://github.com/CTeX-org/gbt7714-bibtex-style/)。参考文献详细说明请见该项目 README.md 或 [https://mirror.ctan.org/biblio/bibtex/contrib/gbt7714/gbt7714.pdf](https://mirror.ctan.org/biblio/bibtex/contrib/gbt7714/gbt7714.pdf)。
71 |
72 | 参考文献提供两种排序方式,分别为 ` 按出现顺序 `(默认)和 ` 按作者姓名和年份 `,请按需在模板 `data\reference.tex` 中做相应修改。
73 |
74 | 注意:根据 `GB/T 7714-2005` 中 `8.4 节 出版项 ` 中相关规定:
75 |
76 | + 无出版地的中文文献著录 “出版地不详”,外文文献著录 “S.l.”
77 | + 无出版者的中文文献著录 “出版者不详”,外文文献著录 “s.n.”
78 |
79 | 相应的解决方法为
80 |
81 | + 若编译的参考文献条目中出现 “出版地不详” 或 “S.l.”,请在相应的 bib 条目中添加 address 相关信息
82 | + 若编译的参考文献条目中出现 “出版者不详” 或 “s.n.”,请在相应的 bib 条目中添加 publisher 相关信息
83 |
84 | 实际使用中应避免出现 `[S.l.]:[s.n.]` 这样的著录形式。
85 |
86 | ## 文件格式相关
87 |
88 | 目前论文提交网站不再要求必须提交 docx 等格式的 Word 文件,但部分老师会要求在 Word 文件上修改和批注。
89 | 可使用如下方法将 Latex 文件(或编译后的 pdf 格式文件)转换为 Word 文件。
90 |
91 | **注意**:将未公开的论文上传至网络有风险,推荐在本地进行转换。
92 |
93 | ### 本地转换
94 |
95 | 推荐使用 [latex2word](https://github.com/Mingzefei/latex2word) 这一项目。
96 | 该项目支持指定 Word 文件格式,并且支持公式转换、多子图导入、公式图表文献的交叉引用等功能,转换出的 Word 文件可满足修改和批注需求。
97 |
98 | ### 在线转换
99 |
100 | 如下网址效果较好:
101 |
102 | - [ilovepdf](https://www.ilovepdf.com/):整体效果好,包括页眉和页脚;公式支持差。
103 | - [nitro](https://cloud.gonitro.com/):需要注册;对超链接、目录、段落格式和字体等支持较好;公式支持差。
104 |
105 |
--------------------------------------------------------------------------------
/buaathesis.cls:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | %%%%% 'buaathesis.cls' BEGIN
3 |
4 | %%%%%%%%%% class clarification %%%%%%%%%%
5 | % 模板声明
6 |
7 | \NeedsTeXFormat{LaTeX2e}[2007/10/19]
8 | \ProvidesClass{buaathesis}
9 | [2020/03/05 v0.9
10 | The LaTeX template for thesis of BUAA]
11 | \typeout{Document Class `buaathesis' v0.9 by BHOSC (2020/03)}
12 |
13 | %%%%%%%%%% class options %%%%%%%%%%
14 | % 模板选项
15 |
16 | % 本模板自身包含五个选项
17 | % 前四个为对应学位类型,决定不同样式
18 | % 第五个为颜色选项,用于电子版的情况
19 | \newif\ifbuaa@bachelor\buaa@bachelorfalse
20 | \newif\ifbuaa@master\buaa@masterfalse
21 | \newif\ifbuaa@doctor\buaa@doctorfalse
22 | \newif\ifbuaa@professional\buaa@professionalfalse
23 | \newif\ifbuaa@classfied\buaa@classfiedfalse
24 | \newif\ifbuaa@color\buaa@colorfalse
25 | \newif\ifbuaa@twoteacher\buaa@twoteacherfalse
26 | \newif\ifbuaa@ktreport\buaa@ktreportfalse
27 | \DeclareOption{bachelor}{\buaa@bachelortrue}
28 | \DeclareOption{master}{\buaa@mastertrue}
29 | \DeclareOption{doctor}{\buaa@doctortrue}
30 | \DeclareOption{professional}{\buaa@professionaltrue}
31 | \DeclareOption{classfied}{\buaa@classfiedtrue}
32 | \DeclareOption{color}{\buaa@colortrue}
33 | \DeclareOption{twoteacher}{\buaa@twoteachertrue}
34 | \DeclareOption{ktreport}{\buaa@ktreporttrue}
35 | % 其余选项传递给ctexbook
36 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{ctexbook}}
37 | \ProcessOptions\relax
38 | % 引用ctexbook及基本设置
39 | \LoadClass[zihao=-4,a4paper]{ctexbook}[2007/10/19]
40 |
41 | %%%%%%%%%% global package %%%%%%%%%%
42 | % 全局通用宏包
43 |
44 | \RequirePackage{ifthen}
45 |
46 | %%%%%%%%%% font %%%%%%%%%%
47 | % 数学相关和字体设置
48 |
49 | \RequirePackage{amsmath,amssymb,amsfonts,mathrsfs,bm}
50 | \RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
51 | \RequirePackage{txfonts}
52 |
53 | %%%%%%%%%% hyphen %%%%%%%%%%
54 | % For the `\hyp{}` command. Allow the user to insert `hyp{}` manually to
55 | % adjust the line break when necessary.
56 | \RequirePackage{hyphenat}
57 |
58 | % 主要字体为Times New Roman和宋体
59 | % 模板某些标题需要华文行楷和32号字
60 | \setmainfont{Times New Roman}
61 | % 不需要设置CJKmainfont,ctex 宏包已经很好的处理了
62 | % 不仅设置了粗体为黑体,斜体为楷体,还兼容了winfonts和adobefonts
63 | % 直接设置反而会在只有adobefonts的情况下报错
64 | % \setCJKmainfont{宋体}
65 | % 重新定义了一下宋体和黑体,让其能支持textbf
66 | % 华文行楷、华文楷体同上
67 | \let\songti\relax
68 | \let\heiti\relax
69 | \setCJKfamilyfont{songti}[AutoFakeBold = {2.17}]{SimSun}
70 | \setCJKfamilyfont{heiti}[AutoFakeBold = {2.17}]{SimHei}
71 | \setCJKfamilyfont{hwxingkai}[AutoFakeBold = {2.17}]{STXingkai}
72 | \setCJKfamilyfont{hwkaiti}[AutoFakeBold = {2.17}]{STKaiti}
73 | \newcommand{\songti}{\CJKfamily{songti}}
74 | \newcommand{\heiti}{\CJKfamily{heiti}}
75 | \newcommand{\hwxingkai}{\CJKfamily{hwxingkai}}
76 | \newcommand{\hwkaiti}{\CJKfamily{hwkaiti}}
77 |
78 | % 预定义的字体大小,以后用得着
79 | \newcommand{\xiaochuhao}{\fontsize{32pt}{\baselineskip}\selectfont}
80 | \newcommand{\yihao}{\fontsize{26pt}{39pt}\selectfont}
81 | \newcommand{\xiaoyi}{\fontsize{24pt}{36pt}\selectfont}
82 | \newcommand{\erhao}{\fontsize{22pt}{33pt}\selectfont}
83 | \newcommand{\xiaoer}{\fontsize{18pt}{27pt}\selectfont}
84 | \newcommand{\sanhao}{\fontsize{16pt}{24pt}\selectfont}
85 | \newcommand{\xiaosan}{\fontsize{15pt}{22.5pt}\selectfont}
86 | \newcommand{\sihao}{\fontsize{14pt}{21pt}\selectfont}
87 | \newcommand{\xiaosi}{\fontsize{12pt}{18pt}\selectfont}
88 | \newcommand{\wuhao}{\fontsize{10.5pt}{15.75pt}\selectfont}
89 | \newcommand{\xiaowu}{\fontsize{9pt}{13.5pt}\selectfont}
90 | \newcommand{\liuhao}{\fontsize{7.5pt}{11.25pt}\selectfont}
91 |
92 | %%%%%%%%%% color %%%%%%%%%%
93 | % 颜色设置
94 |
95 | % 只用于电子版
96 | \RequirePackage{color}
97 | \definecolor{dkgreen}{rgb}{0,0.6,0}
98 | \definecolor{gray}{rgb}{0.5,0.5,0.5}
99 | \definecolor{mauve}{rgb}{0.58,0,0.82}
100 |
101 | %%%%%%%%%% page margin %%%%%%%%%%
102 | % 页面边距
103 |
104 | \RequirePackage{geometry}
105 | \newgeometry{
106 | top=30mm, bottom=25mm, left=30mm, right=20mm,
107 | headsep=5mm, includefoot
108 | }
109 | \savegeometry{bachelorgeometry}
110 |
111 | % geometry for tasks pages for bachelor thesis, see also #270
112 | \newgeometry{
113 | top=30mm, bottom=25mm, left=30mm, right=20mm,
114 | headsep=5mm
115 | }
116 | \savegeometry{bachelortaskgeometry}
117 |
118 | \newgeometry{
119 | top=25mm, bottom=25mm, left=30mm, right=20mm,
120 | headsep=5mm, headheight=10mm, footskip=10mm,
121 | }
122 | \savegeometry{mastergeometry}
123 |
124 | \ifbuaa@bachelor
125 | \loadgeometry{bachelorgeometry}
126 | \else
127 | \loadgeometry{mastergeometry}
128 | \fi
129 |
130 | %%%%%%%%%% space %%%%%%%%%%
131 | % 其他间距
132 |
133 | \renewcommand{\baselinestretch}{1.5}
134 | \setlength{\parindent}{2em}
135 | \setlength{\floatsep}{3pt plus 3pt minus 2pt} % 图形之间或图形与正文之间的距离
136 | \setlength{\abovecaptionskip}{10pt plus 1pt minus 1pt} % 图形中的图与标题之间的距离
137 | \setlength{\belowcaptionskip}{3pt plus 1pt minus 2pt} % 表格中的表与标题之间的距离
138 |
139 | %%%%%%%%%% header & footer %%%%%%%%%%
140 | % 页眉页脚
141 |
142 | % Force enter compat v3 mode when requires fancyhdr.
143 | %
144 | % There's chances after v3 that breaks BUAAThesis, see issue report:
145 | %
146 | % https://github.com/BHOSC/BUAAthesis/issues/265
147 | %
148 | % and commit from fancyhdr
149 | %
150 | % https://github.com/pietvo/fancyhdr/commit/00a7445aec70d3246de8faf108900d06e9caea1b
151 | %
152 | % The fix is tricky, but I think it is the best option we currently have...
153 | %
154 | \RequirePackage{fancyhdr}
155 | \newif\iff@nch@compatViii
156 | \let\f@nch@gbl\relax
157 | \let\f@nch@gbl\global
158 | \f@nch@compatViiitrue
159 |
160 | \fancypagestyle{frontmatter}{
161 | \renewcommand{\headrulewidth}{0pt}
162 | \renewcommand{\footrulewidth}{0pt}
163 | \fancyhf{}
164 | \fancyfoot[C]{\thepage}
165 | }
166 | \fancypagestyle{mainmatter}{
167 | \fancyhead{}
168 | \fancyfoot{}
169 | \ifbuaa@bachelor
170 | \ifbuaa@ktreport
171 | \fancyhead[C]{\zihao{-5}\hwkaiti
172 | \buaa@degreehead 学位论文\buaa@ktclass\vspace{1.5mm}
173 | }
174 | \fancyfoot[C]{
175 | \hspace{1.5mm}
176 | \hwkaiti\zihao{-5}\buaa@university\buaa@school 学院
177 | \hfill\hfill
178 | \songti\zihao{-5}$\cdot$\quad\thepage\quad$\cdot$
179 | \hspace{1.5mm}
180 | }
181 | % 本科开题报告有页脚线
182 | \renewcommand{\footrulewidth}{0.4bp}
183 | \else
184 | \fancyhead[C]{
185 | \includegraphics[width=37bp]{figure/buaamark.pdf}\hfill
186 | \raisebox{2ex}{\heiti\zihao{4}\buaa@university 毕业设计(论文)}\hfill
187 | \raisebox{2ex}{\songti\zihao{5}第\quad\thepage\quad 页}
188 | }
189 | \fi
190 | \else
191 | \ifbuaa@ktreport
192 | % 研究生开题报告/文献综述,与本科生格式基本一致
193 | \fancyhead[C]{\zihao{-5}\hwkaiti
194 | \buaa@degreehead 学位论文\buaa@ktclass\vspace{1.5mm}
195 | }
196 | \fancyfoot[C]{
197 | \hspace{1.5mm}
198 | \hwkaiti\zihao{-5}\buaa@university\buaa@school 学院
199 | \hfill\hfill
200 | \songti\zihao{-5}$\cdot$\quad\thepage\quad$\cdot$
201 | \hspace{1.5mm}
202 | }
203 | % 研究生开题报告有页脚线
204 | \renewcommand{\footrulewidth}{0.4bp}
205 | \else
206 | \if@twoside
207 | \fancyhead[CO]{\zihao{-5}\songti
208 | \buaa@university\buaa@degreehead 学位论文\vspace{1.5mm}
209 | }
210 | \fancyhead[CE]{\zihao{-5}\songti\leftmark\vspace{1.5mm}}
211 | \else
212 | \fancyhead[C]{\zihao{-5}\songti
213 | \ifthenelse{\isodd{\value{page}}}
214 | {\buaa@university\buaa@degreehead 学位论文}
215 | {\leftmark}
216 | \vspace{1.5mm}
217 | }
218 | \fi
219 | \fancyfoot[C]{\zihao{5}\thepage}
220 | \fi
221 | \fi
222 |
223 | \renewcommand{\headrulewidth}{0.5bp} % 页眉线宽度
224 | }
225 |
226 | \fancypagestyle{plain}{
227 | \pagestyle{fancy}
228 | }
229 |
230 | %%%%%%%%%% title %%%%%%%%%%
231 | % 标题
232 |
233 | % 汉化
234 | \renewcommand{\contentsname}{\heiti\zihao{-2}\bfseries 目\qquad 录}
235 | \renewcommand\listfigurename{\heiti\zihao{-2}\bfseries 插\ 图\ 目\ 录}
236 | \renewcommand\listtablename{\heiti\zihao{-2}\bfseries 表\ 格\ 目\ 录}
237 | \renewcommand\bibname{参\ 考\ 文\ 献}
238 | \renewcommand{\figurename}{图}
239 | \renewcommand{\tablename}{表}
240 |
241 | % 格式
242 | \ctexset{
243 | chapter={
244 | format={\centering\zihao{3}\heiti},
245 | nameformat={},
246 | aftername={\quad},
247 | titleformat={},
248 | beforeskip={-.5\baselineskip},
249 | afterskip={\baselineskip},
250 | },
251 | section={
252 | aftername={\quad},
253 | beforeskip={.5\baselineskip},
254 | afterskip={.5\baselineskip},
255 | },
256 | subsection={
257 | format={\zihao{-4}\heiti},
258 | aftername={\quad},
259 | beforeskip={.5\baselineskip},
260 | afterskip={.5\baselineskip},
261 | },
262 | }
263 |
264 | \ifbuaa@bachelor
265 | \ctexset{
266 | chapter={
267 | name={,},
268 | number={\arabic{chapter}},
269 | },
270 | section={
271 | format={\zihao{-4}\heiti},
272 | },
273 | }
274 | \else
275 | \ctexset{
276 | chapter={
277 | name={第,章},
278 | number={\chinese{chapter}},
279 | },
280 | section={
281 | format={\zihao{4}\heiti},
282 | },
283 | }
284 | \fi
285 |
286 | %%%%%%%%%% contents %%%%%%%%%%
287 | % 目录
288 |
289 | \RequirePackage{titletoc}
290 | \ifbuaa@bachelor
291 | \titlecontents{chapter}[0pt]{\heiti\zihao{-4}}{\thecontentslabel\ }{}
292 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}\contentspage}
293 | \titlecontents{section}[2em]{\vspace{0.1\baselineskip}\songti\zihao{-4}}{\thecontentslabel\ }{}
294 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}\contentspage}
295 | \titlecontents{subsection}[4em]{\vspace{0.1\baselineskip}\songti\zihao{-4}}{\thecontentslabel\ }{}
296 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}\contentspage}
297 | \else
298 | \titlecontents{chapter}[0pt]{\vspace{-0.25\baselineskip}\heiti\zihao{4}}{\thecontentslabel\ }{}
299 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}{\zihao{-4}\contentspage}}[\vspace{0.07\baselineskip}]
300 | \titlecontents{section}[2em]{\songti\zihao{-4}}{\thecontentslabel\ }{}
301 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}{\zihao{-4}\contentspage}}[\vspace{0.1\baselineskip}]
302 | \titlecontents{subsection}[4em]{\vspace{-0.2\baselineskip}\songti\zihao{5}}{\thecontentslabel\ }{}
303 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}{\zihao{-4}\contentspage}}[\vspace{0.1\baselineskip}]
304 | \fi
305 |
306 | % 取消图片、表格目录中的章节空格
307 | \newcommand*{\noaddvspace}{\renewcommand*{\addvspace}[1]{}}
308 | \addtocontents{lof}{\protect\noaddvspace}
309 | \addtocontents{lot}{\protect\noaddvspace}
310 |
311 | %表目录图目录的格式设置
312 | %表目录与图目录数字前增加“表”与“图”字,并且使目录行间距与section行间距一致
313 |
314 | \titlecontents{figure}[0pt]{\vspace{0.15\baselineskip}\songti\zihao{-4}}{\makebox[3em][l]{图~\thecontentslabel\quad}}{}
315 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}\contentspage}[\vspace{0.15\baselineskip}]
316 |
317 | \titlecontents{table}[0pt]{\vspace{0.15\baselineskip}\songti\zihao{-4}}{\makebox[3em][l]{表~\thecontentslabel\quad}}{}
318 | {\hspace{.5em}\titlerule*[4pt]{$\cdot$}\contentspage}[\vspace{0.15\baselineskip}]
319 |
320 | %%%%%%%%%% cross reference %%%%%%%%%%
321 | % 交叉引用
322 |
323 | \RequirePackage[xetex,unicode]{hyperref}
324 | \ifbuaa@color
325 | \hypersetup{colorlinks}
326 | \else
327 | \hypersetup{hidelinks}
328 | \fi
329 | \ifbuaa@ktreport
330 | \hypersetup{
331 | bookmarksnumbered,
332 | bookmarksopen,
333 | pdftitle={BUAA thesis},
334 | pdfauthor={BHOSC},
335 | pdfsubject={北航毕业设计开题报告/文献综述},
336 | pdfcreator={LaTeXed~By~BHOSC}
337 | }
338 | \else
339 | \hypersetup{
340 | bookmarksnumbered,
341 | bookmarksopen,
342 | pdftitle={BUAA thesis},
343 | pdfauthor={BHOSC},
344 | pdfsubject={北航毕业设计论文},
345 | pdfcreator={LaTeXed~By~BHOSC}
346 | }
347 | \fi
348 |
349 | %%%%%%%%%% reference %%%%%%%%%%
350 | % 参考文献
351 | \RequirePackage[sort&compress]{natbib}
352 | \bibpunct{[}{]}{,}{n}{}{}
353 | \setlength{\bibsep}{0pt}
354 | \newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}}
355 |
356 | %%%%%%%%%% table %%%%%%%%%%
357 | % 表格
358 |
359 | % 设置三线表格的上下边为粗实线
360 | \RequirePackage{booktabs}
361 |
362 | % 长表格
363 | \RequirePackage{longtable}
364 |
365 | % 表格中的行合并
366 | \RequirePackage{multirow}
367 |
368 | % 重定义table/tabular/tabularx环境,使表格内为5号字
369 | % TODO(huxuan): 支持 longtable
370 | \let\oldtable\table
371 | \let\endoldtable\endtable
372 | \renewenvironment{table}[1][h!]
373 | {\renewcommand{\arraystretch}{1.5}
374 | \oldtable[#1]\zihao{5}}
375 | {\renewcommand{\arraystretch}{1}
376 | \endoldtable}
377 |
378 | \let\oldtabular\tabular
379 | \let\endoldtabular\endtabular
380 | \renewenvironment{tabular}[1][h!]
381 | {\renewcommand{\arraystretch}{1.5}
382 | \oldtabular[#1]\zihao{5}}
383 | {\renewcommand{\arraystretch}{1}
384 | \endoldtabular}
385 |
386 | \RequirePackage{tabularx}
387 | \let\oldtabularx\tabularx
388 | \let\endoldtabularx\endtabularx
389 | \renewenvironment{tabularx}[2]
390 | {\renewcommand{\arraystretch}{1.5}
391 | \zihao{5}\oldtabularx{#1}{#2}}
392 | {\renewcommand{\arraystretch}{1}
393 | \endoldtabularx}
394 |
395 |
396 | \RequirePackage{array}
397 |
398 | %%%%%%%%%% picture %%%%%%%%%%
399 | % 图片
400 |
401 | \RequirePackage{graphicx}
402 | \graphicspath{{figure/}}
403 | \RequirePackage{pifont} % “秘级”后的五角星
404 | \RequirePackage{subfigure}
405 |
406 | %%%%%%%%%% list %%%%%%%%%%
407 | % 列表
408 |
409 | \RequirePackage{enumitem}
410 | \setlist{noitemsep}
411 | \setlist[1,2]{labelindent=\parindent}
412 | \setlist[enumerate,1]{label=\arabic*、}
413 | \setlist[enumerate,2]{label=(\arabic*)}
414 | \setlist{
415 | topsep=0pt,
416 | itemsep=0pt,
417 | partopsep=0pt,
418 | parsep=\parskip,
419 | }
420 |
421 | %%%%%%%%%% code %%%%%%%%%%
422 | % 代码
423 |
424 | % Listing 的设置请参考 http://en.wikibooks.org/wiki/LaTeX/Packages/Listings
425 | \RequirePackage{listings}
426 | \lstset{
427 | backgroundcolor=\color{white},
428 | basicstyle=\zihao{5}\ttfamily,
429 | columns=flexible,
430 | breakatwhitespace=false,
431 | breaklines=true,
432 | captionpos=b,
433 | frame=single,
434 | numbers=left,
435 | numbersep=5pt,
436 | showspaces=false,
437 | showstringspaces=false,
438 | showtabs=false,
439 | stepnumber=1,
440 | rulecolor=\color{black},
441 | tabsize=2,
442 | texcl=true,
443 | title=\lstname,
444 | escapeinside={\%*}{*)},
445 | extendedchars=false,
446 | mathescape=true,
447 | xleftmargin=3em,
448 | xrightmargin=3em,
449 | }
450 | \ifbuaa@color
451 | \lstset{
452 | numberstyle=\color{gray},
453 | keywordstyle=\color{blue},
454 | commentstyle=\color{dkgreen},
455 | stringstyle=\color{mauve},
456 | }
457 | \else
458 | \lstset{
459 | numberstyle=\color{black},
460 | keywordstyle=\color{black},
461 | commentstyle=\color{black},
462 | stringstyle=\color{black},
463 | }
464 | \fi
465 |
466 | % 重命名Listings标题头
467 | \renewcommand{\lstlistingname}{代码}
468 |
469 | %%%%%%%%%% theorem %%%%%%%%%%
470 | % 定理
471 |
472 | \theoremsymbol{\ensuremath{\square}}
473 | \newtheorem*{proof}{证明}
474 | \theoremstyle{plain}
475 | \theoremsymbol{}
476 | \theoremseparator{:}
477 | \newtheorem{assumption}{假设}[chapter]
478 | \newtheorem{definition}{定义}[chapter]
479 | \newtheorem{proposition}{命题}[chapter]
480 | \newtheorem{lemma}{引理}[chapter]
481 | \newtheorem{theorem}{定理}[chapter]
482 | \newtheorem{axiom}{公理}[chapter]
483 | \newtheorem{corollary}{推论}[chapter]
484 | \newtheorem{exercise}{练习}[chapter]
485 | \newtheorem{example}{例}[chapter]
486 | \newtheorem{remark}{注释}[chapter]
487 | \newtheorem{problem}{问题}[chapter]
488 | \newtheorem{conjecture}{猜想}[chapter]
489 |
490 | %%%%%%%%%% file directory %%%%%%%%%%
491 | % 文件目录
492 |
493 | \RequirePackage{dirtree}
494 | \ifbuaa@color
495 | \renewcommand*\DTstylecomment{\ttfamily\color{dkgreen}}
496 | \renewcommand*\DTstyle{\ttfamily\color{red}}
497 | \fi
498 |
499 | %%%%%%%%%% caption %%%%%%%%%%
500 | % 图表标题
501 |
502 | \RequirePackage{caption}
503 | \DeclareCaptionFormat{bachelorfigure}{\songti\zihao{5}{#1\textrm{#2}#3}}
504 | \DeclareCaptionFormat{bachelortable}{\heiti\bf\zihao{5}{#1\textrm{#2}#3}}
505 | \DeclareCaptionFormat{bachelorlstlisting}{\songti\bf\zihao{5}{#1\textrm{#2}#3}}
506 | \DeclareCaptionFormat{masterfigure}{\bf\songti\zihao{5}{#1\textrm{#2}#3}}
507 | \DeclareCaptionFormat{mastertable}{\bf\songti\zihao{5}{#1\textrm{#2}#3}}
508 | \DeclareCaptionFormat{masterlstlisting}{\bf\songti\zihao{5}{#1\textrm{#2}#3}}
509 | \ifbuaa@bachelor
510 | % 本科无论是否是开题报告,图表序号都和章节有关
511 | \captionsetup[figure]{format=bachelorfigure,labelsep=quad}
512 | \captionsetup[table]{format=bachelortable,labelsep=quad}
513 | \captionsetup[lstlisting]{format=bachelorlstlisting,labelsep=quad}
514 | \renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
515 | \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
516 | \renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
517 | \else
518 | % ktreport 中图标序号跟章节相关
519 | \ifbuaa@ktreport
520 | \captionsetup[figure]{format=masterfigure,labelsep=quad}
521 | \captionsetup[table]{format=mastertable,labelsep=quad}
522 | \captionsetup[lstlisting]{format=masterlstlisting,labelsep=quad}
523 | \renewcommand{\thefigure}{\arabic{chapter}.\arabic{figure}}
524 | \renewcommand{\thetable}{\arabic{chapter}.\arabic{table}}
525 | \renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
526 | \else
527 | \RequirePackage{remreset}
528 | \@removefromreset{table}{chapter}
529 | \@removefromreset{figure}{chapter}
530 | %使图表的标号与章节无关
531 | \captionsetup[figure]{format=masterfigure,labelsep=quad}
532 | \captionsetup[table]{format=mastertable,labelsep=quad}
533 | \captionsetup[lstlisting]{format=masterlstlisting,labelsep=quad}
534 | \renewcommand{\thefigure}{\arabic{figure}}
535 | \renewcommand{\thetable}{\arabic{table}}
536 | \renewcommand{\theequation}{\arabic{chapter}.\arabic{equation}}
537 | \fi
538 | \fi
539 |
540 | % Fix subfigure reference bug
541 | \let\p@subfigure=\thefigure
542 |
543 | % 图片表格标题命令,主要用于混排
544 | \newcommand\figcaption{\def\@captype{figure}\caption}
545 | \newcommand\tabcaption{\def\@captype{table}\caption}
546 |
547 | %%%%%%%%%% other settings %%%%%%%%%%
548 | % 杂项
549 |
550 | % 设置<附录>的图表编号与当前附录章号关联
551 | \newcommand{\rmrelation}{
552 | % 图、表、公式编号随 chapter 清零
553 | \@addtoreset{figure}{chapter}
554 | \@addtoreset{table}{chapter}
555 | \@addtoreset{equation}{chapter}
556 | %图、表、公式编号章节关联
557 | \renewcommand{\thefigure}{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure}
558 | \renewcommand{\thetable}{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table}
559 | \renewcommand{\theequation}{\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
560 | }
561 | \let\oldappendix\appendix
562 | \renewcommand{\appendix}{
563 | \oldappendix\rmrelation
564 | }
565 |
566 | % 下划线
567 | \RequirePackage{ulem}
568 |
569 | % 设置行距
570 | \RequirePackage{setspace}
571 |
572 | % 正文前的页码设置位大写罗马数字
573 | \renewcommand{\frontmatter}{
574 | \cleardoublepage
575 | \@mainmatterfalse
576 | \ifbuaa@bachelor
577 | \pagenumbering{Roman}
578 | \else
579 | \pagenumbering{roman}
580 | \fi
581 | }
582 |
583 | % 保证偶数页结束章节
584 | \newcommand{\clearemptydoublepage}{%
585 | \clearpage
586 | \if@twoside
587 | \ifodd
588 | \c@page
589 | \else
590 | \hbox{}\thispagestyle{empty}\newpage
591 | \if@twocolumn
592 | \hbox{}\newpage
593 | \fi
594 | \fi
595 | \fi
596 | }
597 |
598 | %%%%%%%%%% index %%%%%%%%%%
599 | % 首页
600 |
601 | % 本科生首页的右上角和底部的填写内容居中
602 | % cvrtc : CoVer - Right - Top - Center
603 | % cvcbc : CoVer - Center - Bottom - Center
604 | \newcommand{\ulinecvrtc}[1]{\uline{\makebox[9em][c]{\bf #1}}}
605 | \newcommand{\ulinecvcbc}[1]{\uline{\makebox[14em][c]{#1}}}
606 |
607 | % 中文首页
608 | \newcommand{\titlech}{
609 | \ifbuaa@bachelor
610 | \ifbuaa@ktreport
611 | \begin{titlepage}
612 | % 第二个()里的参数表示左移35pt,下移55pt
613 | \hfill
614 | \vskip 45bp
615 | \begin{center}
616 | \includegraphics[width=310bp]{figure/buaaname.pdf}
617 | ~~\\
618 | \vskip 60bp
619 | ~~\\
620 | \centerline{\yihao\heiti \textbf{\buaa@degree 论文\buaa@ktclass}}
621 | ~~\\
622 | \vskip 60bp
623 | ~~\\
624 | {
625 | \zihao{-3}\heiti
626 | \ifbuaa@twoteacher
627 | \begin{tabular}{c p{0.55\textwidth}<{\raggedright}}
628 | \hwkaiti \textbf{论文题目} : &\hwkaiti\buaa@thesistitle\\[.4ex]
629 | \hwkaiti \textbf{专~~~~~~~~业} : &\hwkaiti\buaa@major\\[.4ex]
630 | \hwkaiti \textbf{姓~~~~~~~~名} : &\hwkaiti\buaa@thesisauthor\\[.4ex]
631 | \hwkaiti \textbf{学~~~~~~~~号} : &\hwkaiti\buaa@studentID\\[.4ex]
632 | \hwkaiti \textbf{指导教师} : &\hwkaiti\buaa@teacher \quad \buaa@subteacher\\
633 | \end{tabular}
634 | \else
635 | \begin{tabular}{c p{0.55\textwidth}<{\raggedright}}
636 | \hwkaiti \textbf{论文题目} : &\hwkaiti\buaa@thesistitle\\[.4ex]
637 | \hwkaiti \textbf{专~~~~~~~~业} : &\hwkaiti\buaa@major\\[.4ex]
638 | \hwkaiti \textbf{姓~~~~~~~~名} : &\hwkaiti\buaa@thesisauthor\\[.4ex]
639 | \hwkaiti \textbf{学~~~~~~~~号} : &\hwkaiti\buaa@studentID\\[.4ex]
640 | \hwkaiti \textbf{指导教师} : &\hwkaiti\buaa@teacher\\
641 | \end{tabular}
642 | \fi
643 | }
644 | ~~\\
645 | \vskip 75bp
646 | ~~\\
647 | \centerline{\heiti\sanhao\textbf{\buaa@university\buaa@school 学院}}
648 | \vskip 20bp
649 | \centerline{\heiti\zihao{-3}\buaa@thesisdateyear ~~年~~\buaa@thesisdatemonth ~~月}
650 | \end{center}
651 | \end{titlepage}
652 | \else
653 | \begin{titlepage}
654 | % 第二个()里的参数表示左移35pt,下移55pt
655 | \begin{picture}(0,0)(35,55)
656 | \includegraphics[width=90pt]{figure/buaamark.pdf}
657 | \end{picture}
658 | \hfill
659 | \raisebox{-.2cm}[0pt][0pt]{
660 | \zihao{5}\heiti
661 | \begin{tabular}{c}
662 | 单位代码~\ulinecvrtc{\bf\buaa@unicode}\\[.1ex]
663 | 学\qquad 号~\ulinecvrtc{\bf\buaa@studentID}\\[.1ex]
664 | 分~~类~~号~\ulinecvrtc{\bf\buaa@category}\\
665 | \end{tabular}
666 | }
667 | \vskip 95bp
668 | \begin{center}
669 | \includegraphics[width=360bp]{figure/buaaname.pdf}
670 | \vskip 45bp
671 | \centerline{\zihao{-0}\heiti 毕业设计(论文)}
672 | ~~\\
673 | \vspace*{\stretch{4}}
674 | \begin{minipage}[h]{.8\textwidth}
675 | \centering{\heiti\zihao{2}\buaa@thesistitle}
676 | \end{minipage}
677 | \vskip 20bp
678 | \begin{minipage}[h]{.75\textwidth}
679 | \centering{\heiti\zihao{3}\buaa@thesissubtitle}
680 | \end{minipage}
681 | \vspace*{\stretch{3}}
682 | ~~\\
683 | {
684 | \zihao{-3}\heiti
685 | \ifbuaa@twoteacher
686 | \begin{tabular}{cc}
687 | 学~~~院~~~名~~~称~~&\ulinecvcbc{\buaa@school 学院}\\[.4ex]
688 | 专~~~业~~~名~~~称~~&\ulinecvcbc{\buaa@major 专业}\\[.4ex]
689 | 学~~~生~~~姓~~~名~~&\ulinecvcbc{\buaa@thesisauthor}\\[.4ex]
690 | 指~~~导~~~教~~~师~~&\ulinecvcbc{\buaa@teacher \quad \buaa@subteacher}\\
691 | \end{tabular}
692 | \else
693 | \begin{tabular}{cc}
694 | 学~~~院~~~名~~~称~~&\ulinecvcbc{\buaa@school 学院}\\[.4ex]
695 | 专~~~业~~~名~~~称~~&\ulinecvcbc{\buaa@major 专业}\\[.4ex]
696 | 学~~~生~~~姓~~~名~~&\ulinecvcbc{\buaa@thesisauthor}\\[.4ex]
697 | 指~~~导~~~教~~~师~~&\ulinecvcbc{\buaa@teacher}\\
698 | \end{tabular}
699 | \fi
700 | }
701 | \vskip 60bp
702 | \centerline{\heiti\zihao{-3}\buaa@thesisdateyear ~~年~~\buaa@thesisdatemonth ~~月}
703 | \end{center}
704 | \end{titlepage}
705 | \fi
706 | \else
707 | \ifbuaa@ktreport
708 | \begin{titlepage}
709 | % 第二个()里的参数表示左移35pt,下移55pt
710 | \hfill
711 | \vskip 45bp
712 | \begin{center}
713 | \includegraphics[width=310bp]{figure/buaaname.pdf}
714 | ~~\\
715 | \vskip 60bp
716 | ~~\\
717 | \centerline{\yihao\heiti \textbf{\buaa@degree 论文\buaa@ktclass}}
718 | ~~\\
719 | \vskip 60bp
720 | ~~\\
721 | {
722 | \zihao{-3}\heiti
723 | \ifbuaa@master
724 | \ifbuaa@twoteacher
725 | \begin{tabular}{c p{0.55\textwidth}<{\raggedright}}
726 | \hwkaiti \textbf{题~~~~~~~~目} : &\hwkaiti\buaa@thesistitle\\[.4ex]
727 | \hwkaiti \textbf{专~~~~~~~~业} : &\hwkaiti\buaa@major\\[.4ex]
728 | \hwkaiti \textbf{研究方向} : &\hwkaiti\buaa@direction\\[.4ex]
729 | \hwkaiti \textbf{研~~究~~生} : &\hwkaiti\buaa@thesisauthor\\[.4ex]
730 | \hwkaiti \textbf{学~~~~~~~~号} : &\hwkaiti\buaa@studentID\\[.4ex]
731 | \hwkaiti \textbf{指导教师} : &\hwkaiti\buaa@teacher \quad \buaa@subteacher\\
732 | \end{tabular}
733 | \else
734 | \begin{tabular}{c p{0.55\textwidth}<{\raggedright}}
735 | \hwkaiti \textbf{题~~~~~~~~目} : &\hwkaiti\buaa@thesistitle\\[.4ex]
736 | \hwkaiti \textbf{专~~~~~~~~业} : &\hwkaiti\buaa@major\\[.4ex]
737 | \hwkaiti \textbf{研究方向} : &\hwkaiti\buaa@direction\\[.4ex]
738 | \hwkaiti \textbf{研~~究~~生} : &\hwkaiti\buaa@thesisauthor\\[.4ex]
739 | \hwkaiti \textbf{学~~~~~~~~号} : &\hwkaiti\buaa@studentID\\[.4ex]
740 | \hwkaiti \textbf{指导教师} : &\hwkaiti\buaa@teacher\\
741 | \end{tabular}
742 | \fi
743 | \else
744 | \ifbuaa@twoteacher
745 | \begin{tabular}{c p{0.55\textwidth}<{\raggedright}}
746 | \hwkaiti \textbf{题~~~~~~~~目} : &\hwkaiti\buaa@thesistitle\\[.4ex]
747 | \hwkaiti \textbf{专~~~~~~~~业} : &\hwkaiti\buaa@major\\[.4ex]
748 | \hwkaiti \textbf{研究方向} : &\hwkaiti\buaa@direction\\[.4ex]
749 | \hwkaiti \textbf{博~~士~~生} : &\hwkaiti\buaa@thesisauthor\\[.4ex]
750 | \hwkaiti \textbf{学~~~~~~~~号} : &\hwkaiti\buaa@studentID\\[.4ex]
751 | \hwkaiti \textbf{指导教师} : &\hwkaiti\buaa@teacher \quad \buaa@subteacher\\
752 | \end{tabular}
753 | \else
754 | \begin{tabular}{c p{0.55\textwidth}<{\raggedright}}
755 | \hwkaiti \textbf{题~~~~~~~~目} : &\hwkaiti\buaa@thesistitle\\[.4ex]
756 | \hwkaiti \textbf{专~~~~~~~~业} : &\hwkaiti\buaa@major\\[.4ex]
757 | \hwkaiti \textbf{研究方向} : &\hwkaiti\buaa@direction\\[.4ex]
758 | \hwkaiti \textbf{博~~士~~生} : &\hwkaiti\buaa@thesisauthor\\[.4ex]
759 | \hwkaiti \textbf{学~~~~~~~~号} : &\hwkaiti\buaa@studentID\\[.4ex]
760 | \hwkaiti \textbf{指导教师} : &\hwkaiti\buaa@teacher\\
761 | \end{tabular}
762 | \fi
763 | \fi
764 | }
765 | ~~\\
766 | \vskip 75bp
767 | ~~\\
768 | \centerline{\heiti\sanhao\textbf{\buaa@university\buaa@school 学院}}
769 | \vskip 20bp
770 | \centerline{\heiti\zihao{-3}\buaa@thesisdateyear ~~年~~\buaa@thesisdatemonth ~~月}
771 | \end{center}
772 | \end{titlepage}
773 | \else
774 | \begin{titlepage}
775 | \begin{center}
776 | \begin{spacing}{1.5}
777 | {
778 | \zihao{5}\heiti\bfseries
779 | \begin{flushleft}
780 | 中图分类号:\buaa@category \\
781 | 论\,\,文\,\,编\,\,号:\buaa@thesisID\\
782 | \ifbuaa@classfied
783 | \buaa@clevel\ding{73}~~\buaa@climit \\
784 | \else
785 | \vskip 20bp
786 | \fi
787 | \end{flushleft}
788 | }
789 | \vskip 60bp
790 | \includegraphics[width=.5\textwidth]{figure/buaaname_ch.pdf}
791 | \vskip 30bp
792 | \centerline{\zihao{0}\ziju{0.2}\hwxingkai\buaa@degree 论文}
793 | ~~\\
794 | %\vskip 100bp
795 | \vspace*{\stretch{5}}
796 | \begin{minipage}[h]{.85\textwidth}
797 | \begin{spacing}{3}
798 | % actually, it should be 1.5, but I think 3 will be prefect.
799 | \centering{\xiaochuhao\songti\bfseries\buaa@thesistitle}
800 | \end{spacing}
801 | \end{minipage}
802 | %\vspace{5bp}
803 | % the space between title and subtitle, however, it seems doesn't work.
804 | \begin{minipage}[h]{.75\textwidth}
805 | \begin{spacing}{1.5}
806 | \centering{\heiti\zihao{3}\buaa@thesissubtitle}
807 | \end{spacing}
808 | \end{minipage}
809 | \vspace*{\stretch{4}}
810 | ~~\\
811 | %\vskip 80bp
812 | {
813 | \heiti\zihao{4}\ziju{0.2}
814 | \ifbuaa@twoteacher
815 | \begin{tabular}[b]{ll}
816 | 作~~者~~姓~~名~~ & \buaa@thesisauthor\\[.3ex]
817 | \ifbuaa@professional
818 | 专~~业~~名~~称~~ & \buaa@major\\[.3ex]
819 | \else
820 | 学~~科~~专~~业~~ & \buaa@major\\[.3ex]
821 | \fi
822 | 指~~导~~教~~师~~ & \buaa@teacher\quad\buaa@teacherdegree\\[.3ex]
823 | ~~ & \buaa@subteacher\quad\buaa@subteacherdegree\\[.3ex]
824 | 培~~养~~学~~院~~ & \buaa@school 学院\\
825 | \end{tabular}
826 | \else
827 | \begin{tabular}[b]{ll}
828 | 作~~者~~姓~~名~~ & \buaa@thesisauthor\\[.4ex]
829 | \ifbuaa@professional
830 | 专~~业~~名~~称~~ & \buaa@major\\[.4ex]
831 | \else
832 | 学~~科~~专~~业~~ & \buaa@major\\[.4ex]
833 | \fi
834 | 指~~导~~教~~师~~ & \buaa@teacher \quad\buaa@teacherdegree\\[.4ex]
835 | 培~~养~~学~~院~~ & \buaa@school 学院\\
836 | \end{tabular}
837 | \fi
838 | }
839 | \end{spacing}
840 | \end{center}
841 | \end{titlepage}
842 | \fi
843 | \fi
844 | }
845 |
846 | % 英文首页
847 | \newcommand{\titleeng}{
848 | \clearemptydoublepage
849 | \thispagestyle{empty}
850 | \vspace*{\stretch{1}}
851 | \begin{center}
852 | \begin{minipage}[h]{.8\textwidth}
853 | \begin{spacing}{2}
854 | \centering{\zihao{-2}\textbf{\buaa@thesistitleeng}}
855 | \end{spacing}
856 | \end{minipage}
857 | \vskip 20bp
858 | \begin{minipage}[h]{.75\textwidth}
859 | \centering{\zihao{-3}\buaa@thesissubtitleeng}
860 | \end{minipage}
861 | \vspace*{\stretch{1}}
862 | ~~\\
863 | {\zihao{4}A Dissertation Submitted for the Degree of \buaa@degreeeng}\\
864 | \vskip 110bp
865 | \begin{center}
866 | \zihao{-3}
867 | \ifbuaa@twoteacher
868 | \begin{tabular}{ll}
869 | \textbf{Candidate:\ }&\textbf{\buaa@thesisauthoreng}\\[0.5ex]
870 | \textbf{Supervisor:\ }&\textbf{\buaa@teacherdegreeeng ~~\buaa@teachereng}\\
871 | ~~ & \textbf{\buaa@subteacherdegreeeng ~~\buaa@subteachereng}\\
872 | \end{tabular}
873 | \else
874 | \begin{tabular}{ll}
875 | \textbf{Candidate:\ }&\textbf{\buaa@thesisauthoreng}\\[0.5ex]
876 | \textbf{Supervisor:\ }&\textbf{\buaa@teacherdegreeeng ~~\buaa@teachereng}\\
877 | \end{tabular}
878 | \fi
879 | \end{center}
880 | \vskip 125bp
881 | \zihao{3}{
882 | \buaa@schooleng \\[1.8ex]
883 | \buaa@universityeng , Beijing, China}
884 | \end{center}
885 | }
886 |
887 | %%%%%%%%%% abstract %%%%%%%%%%
888 | % 摘要
889 |
890 | % 中文摘要
891 | \newenvironment{cabstract}{%
892 | \newpage
893 | \vspace*{2bp}
894 | \ifbuaa@bachelor
895 | \begin{center}
896 | \begin{minipage}[h]{.75\textwidth}
897 | \centering{\zihao{3}\heiti\buaa@thesistitle}
898 | \end{minipage}
899 | \begin{minipage}[h]{.8\textwidth}
900 | \begin{flushright}
901 | {\zihao{3}\heiti\buaa@thesissubtitle}
902 | \end{flushright}
903 | % subtitle should be flush right?
904 | \end{minipage}
905 | \end{center}
906 | %\vskip 10bp
907 | \begin{flushright}
908 | \ifbuaa@twoteacher
909 | {\begin{tabular}{cl}
910 | 学\qquad 生:&\buaa@thesisauthor\\
911 | 指导教师:&\buaa@teacher\\
912 | ~~ & \buaa@subteacher\\
913 | % I don't know is this corrent and properly.
914 | \end{tabular}}
915 | \else
916 | {\begin{tabular}{cl}
917 | 学\qquad 生:&\buaa@thesisauthor\\
918 | 指导教师:&\buaa@teacher\\
919 | \end{tabular}}
920 | \fi
921 | \end{flushright}
922 | \fi
923 | \centerline{\heiti\zihao{3} 摘~~~~要}
924 | \ifbuaa@bachelor
925 | \vskip 10bp
926 | \par
927 | \else
928 | \vspace{5ex}
929 | \fi
930 | \setlength{\parindent}{24bp}
931 | }{%
932 | \vskip 21bp
933 | \ifbuaa@bachelor
934 | \noindent
935 | \fi
936 | {\heiti\zihao{-4} 关键词:}\heiti\buaa@ckeyword
937 | }
938 |
939 | % 英文摘要
940 | \newenvironment{eabstract}{%
941 | \newpage
942 | \vspace*{2bp}
943 | \ifbuaa@bachelor
944 | \begin{center}
945 | \begin{minipage}[h]{.75\textwidth}
946 | \centering{\bf\zihao{3}\buaa@thesistitleeng}
947 | \end{minipage}
948 | \begin{minipage}[h]{.8\textwidth}
949 | \begin{flushright}
950 | {\zihao{3}\heiti\buaa@thesissubtitleeng}
951 | \end{flushright}
952 | % subtitle should be flushright?
953 | \end{minipage}
954 | \end{center}
955 | \vskip 10bp
956 | \begin{flushright}
957 | \ifbuaa@twoteacher
958 | {\begin{tabular}{rl}
959 | Author:\ &\buaa@thesisauthoreng\\
960 | Tutor:\ &\buaa@teachereng\\
961 | ~~ & \buaa@subteachereng\\
962 | \end{tabular}}
963 | \else
964 | {\begin{tabular}{rl}
965 | Author:\ &\buaa@thesisauthoreng\\
966 | Tutor:\ &\buaa@teachereng\\
967 | \end{tabular}}
968 | \fi
969 | \end{flushright}
970 | \fi
971 | \centerline{\bf\zihao{3} Abstract}
972 | \ifbuaa@bachelor
973 | \vskip 10bp
974 | \par
975 | \else
976 | \vspace{5ex}
977 | \fi
978 | \setlength{\parindent}{24bp}
979 | }{%
980 | \vskip 21bp
981 | \ifbuaa@bachelor
982 | \noindent
983 | \fi
984 | {\bf\zihao{-4} Key words: }\buaa@ekeyword
985 | }
986 |
987 | %%%%%%%%%% announce %%%%%%%%%%
988 | % 本科生声明页
989 |
990 | \newcommand{\announce}{%
991 | \clearemptydoublepage
992 | \thispagestyle{empty}
993 | \vspace*{54bp}
994 | \centerline{\bf\zihao{-2}\songti 本人声明}
995 | \vskip 27bp
996 | \zihao{4}我声明,本论文及其研究工作是由本人在导师指导下独立完成的,在完成论文时所利用的一
997 | 切资料均已在参考文献中列出。\par
998 | \vskip 63bp
999 | \zihao{-4}
1000 | \hfill
1001 | \begin{tabular}{cl}
1002 | 作者:&\buaa@thesisauthor\\
1003 | 签字:&~~~~\\
1004 | 时间:& \buaa@thesisdateyear~年~\buaa@thesisdatemonth ~月
1005 | \end{tabular}
1006 | }
1007 |
1008 | %%%%%%%%%% assign %%%%%%%%%%
1009 | % 本科生任务书
1010 |
1011 | % 文字左对齐的下划线
1012 | \newcommand{\ulinel}[2][]{\uline{\makebox[#1\textwidth][l]{#2}}}
1013 | % 文字居中的下划线
1014 | \newcommand{\ulinec}[2][]{\uline{\makebox[#1\textwidth][c]{#2}}}
1015 | % 任务书条目序号
1016 | \newcounter{assign}
1017 | % 原始资料及设计要求
1018 | \def\buaa@bachelor@assign@req@one{}
1019 | \def\buaa@bachelor@assign@req@two{}
1020 | \def\buaa@bachelor@assign@req@three{}
1021 | \def\buaa@bachelor@assign@req@four{}
1022 | \def\buaa@bachelor@assign@req@five{}
1023 | \newcommand{\assignReq}[5]{
1024 | \def\buaa@bachelor@assign@req@one{#1}
1025 | \def\buaa@bachelor@assign@req@two{#2}
1026 | \def\buaa@bachelor@assign@req@three{#3}
1027 | \def\buaa@bachelor@assign@req@four{#4}
1028 | \def\buaa@bachelor@assign@req@five{#5}
1029 | }
1030 | % 工作内容
1031 | \def\buaa@bachelor@assign@work@one{}
1032 | \def\buaa@bachelor@assign@work@two{}
1033 | \def\buaa@bachelor@assign@work@three{}
1034 | \def\buaa@bachelor@assign@work@four{}
1035 | \def\buaa@bachelor@assign@work@five{}
1036 | \def\buaa@bachelor@assign@work@six{}
1037 | \newcommand{\assignWork}[6]{
1038 | \def\buaa@bachelor@assign@work@one{#1}
1039 | \def\buaa@bachelor@assign@work@two{#2}
1040 | \def\buaa@bachelor@assign@work@three{#3}
1041 | \def\buaa@bachelor@assign@work@four{#4}
1042 | \def\buaa@bachelor@assign@work@five{#5}
1043 | \def\buaa@bachelor@assign@work@six{#6}
1044 | }
1045 | % 参考文献
1046 | \def\buaa@bachelor@assign@ref@one{}
1047 | \def\buaa@bachelor@assign@ref@two{}
1048 | \def\buaa@bachelor@assign@ref@three{}
1049 | \def\buaa@bachelor@assign@ref@four{}
1050 | \def\buaa@bachelor@assign@ref@five{}
1051 | \def\buaa@bachelor@assign@ref@six{}
1052 | \def\buaa@bachelor@assign@ref@seven{}
1053 | \def\buaa@bachelor@assign@ref@eight{}
1054 | \newcommand{\assignRef}[8]{
1055 | \def\buaa@bachelor@assign@ref@one{#1}
1056 | \def\buaa@bachelor@assign@ref@two{#2}
1057 | \def\buaa@bachelor@assign@ref@three{#3}
1058 | \def\buaa@bachelor@assign@ref@four{#4}
1059 | \def\buaa@bachelor@assign@ref@five{#5}
1060 | \def\buaa@bachelor@assign@ref@six{#6}
1061 | \def\buaa@bachelor@assign@ref@seven{#7}
1062 | \def\buaa@bachelor@assign@ref@eight{#8}
1063 | }
1064 | % 任务书
1065 | \def\buaa@bachelor@assign{
1066 | \newpage
1067 | \thispagestyle{empty}
1068 | \parindent=0pt
1069 | \songti
1070 | {
1071 | \zihao{2}
1072 | {
1073 | \renewcommand{\CJKglue}{\hskip 1pt}
1074 | \centerline{\hwxingkai{北京航空航天大学}}
1075 | }
1076 | {
1077 | \renewcommand{\CJKglue}{\hskip 1.2pt}
1078 | \centerline{本科生毕业设计(论文)任务书}
1079 | }
1080 | }
1081 | {
1082 | \linespread{2}
1083 | \zihao{4}
1084 | \stepcounter{assign}
1085 | \Roman{assign}、毕业设计(论文)题目: \\[2.5ex]
1086 | \ulinel{\buaa@thesistitle}
1087 | \ulinel{\buaa@thesissubtitle}
1088 | \ulinel{}
1089 | \stepcounter{assign}
1090 | \Roman{assign}、毕业设计(论文)使用的原始资料(数据)及设计技术要求: \\[2.5ex]
1091 | \ulinel{\buaa@bachelor@assign@req@one}
1092 | \ulinel{\buaa@bachelor@assign@req@two}
1093 | \ulinel{\buaa@bachelor@assign@req@three}
1094 | \ulinel{\buaa@bachelor@assign@req@four}
1095 | \ulinel{\buaa@bachelor@assign@req@five}
1096 | \stepcounter{assign}
1097 | \Roman{assign}、毕业设计(论文)工作内容: \\[2.5ex]
1098 | \ulinel{\buaa@bachelor@assign@work@one}
1099 | \ulinel{\buaa@bachelor@assign@work@two}
1100 | \ulinel{\buaa@bachelor@assign@work@three}
1101 | \ulinel{\buaa@bachelor@assign@work@four}
1102 | \ulinel{\buaa@bachelor@assign@work@five}
1103 | \ulinel{\buaa@bachelor@assign@work@six}
1104 | \newpage
1105 | \thispagestyle{empty}
1106 | \begin{spacing}{1.9}
1107 | \zihao{4}
1108 | \stepcounter{assign}
1109 | \Roman{assign}、主要参考资料: \\[1.5ex]
1110 | \ulinel{\buaa@bachelor@assign@ref@one}
1111 | \ulinel{\buaa@bachelor@assign@ref@two}
1112 | \ulinel{\buaa@bachelor@assign@ref@three}
1113 | \ulinel{\buaa@bachelor@assign@ref@four}
1114 | \ulinel{\buaa@bachelor@assign@ref@five}
1115 | \ulinel{\buaa@bachelor@assign@ref@six}
1116 | \ulinel{\buaa@bachelor@assign@ref@seven}
1117 | \ulinel{\buaa@bachelor@assign@ref@eight}
1118 | \ulinec[.28]{\buaa@school}学院\ulinec[.28]{\buaa@major}~专业类~\ulinec[.15]{\buaa@class}班 \\
1119 | 学生\ulinec[.3]{\buaa@thesisauthor} \\
1120 | 毕业设计(论文)时间:~~\ulinec[.1]{\buaa@thesisbeginyear}年\ulinec[.06]{\buaa@thesisbeginmonth}月\ulinec[.06]{\buaa@thesisbeginday}日至\ulinec[.1]{\buaa@thesisendyear}年\ulinec[.06]{\buaa@thesisendmonth}月\ulinec[.06]{\buaa@thesisendday}日 \\
1121 | 答辩时间:\ulinec[.16]{\buaa@defenseyear}年\ulinec[.08]{\buaa@defensemonth}月\ulinec[.08]{\buaa@defenseday}日 \\
1122 | 成\qquad 绩:\ulinec[.3]{} \\
1123 | 指导教师:\ulinec[.3]{} \\
1124 | 兼职教师或答疑教师(并指出所负责部分):\\
1125 | \ulinel{}
1126 | \ulinel{}
1127 | \ulinec[.28]{}系(教研室) 主任(签字):\ulinec[.28]{} \\
1128 | \vfill
1129 | 注:任务书应该附在已完成的毕业设计(论文)的首页。
1130 | \end{spacing}
1131 | }
1132 | \parindent=2\ccwd
1133 | \linespread{1.5}
1134 | }
1135 |
1136 | %%%%%%%%%% nominate %%%%%%%%%%
1137 | % 研究生提名页
1138 |
1139 | \newcommand{\timingye}{%
1140 | \clearemptydoublepage
1141 | \thispagestyle{empty}
1142 | \begin{flushleft}
1143 | {\zihao{5}\heiti\bfseries
1144 | 中图分类号:\buaa@category\\
1145 | 论\,\,文\,\,编\,\,号:\buaa@thesisID\\}
1146 | \end{flushleft}
1147 | \begin{center}
1148 | \vskip 130bp
1149 | {\zihao{-2}\heiti{\ziju{1.3}\buaa@degreetitle 论文}}
1150 | \vskip 120bp
1151 | \begin{minipage}[h]{.85\textwidth}
1152 | \zihao{-1}\heiti\centering{\buaa@thesistitle}
1153 | \end{minipage}
1154 |
1155 | \vskip 130bp
1156 |
1157 | \begin{spacing}{2.2}
1158 | {\zihao{-4}\songti
1159 | \begin{tabular}[b]{llll}
1160 | \makebox[6em][s]{作者姓名\hfill} & \buaa@thesisauthor& 申请学位级别 & \buaa@appdegree \\
1161 | 指导教师姓名 & \makebox[9em][s]{\buaa@teacher\quad\buaa@subteacher\hfill} & 职\qquad 称 & \buaa@teacherdegree \\
1162 | \ifbuaa@professional
1163 | \makebox[6em][s]{专业名称\hfill} & \buaa@major &
1164 | \else
1165 | \makebox[6em][s]{学科专业\hfill} & \buaa@major &
1166 | \fi
1167 | \makebox[6em][s]{研究方向\hfill} & \buaa@direction \\
1168 | \makebox[6em][s]{学习时间自\hfill} &\buaa@thesisbeginyear~~年~~\buaa@thesisbeginmonth~~月~~\buaa@thesisbeginday~~日\qquad &
1169 | \makebox[6em][s]{\hfill 起至\hfill} & \buaa@thesisendyear~~年~~\buaa@thesisendmonth~~月~~\buaa@thesisendday~~日止\qquad\\
1170 | 论文提交日期 &\buaa@commityear~~年~~\buaa@commitmonth~~月~~\buaa@commitday~~日\qquad & 论文答辩日期& \buaa@defenseyear~~年~~\buaa@defensemonth~~月~~\buaa@defenseday~~日~\qquad\\
1171 | 学位授予单位 & \buaa@university &学位授予日期 &\buaa@awardyear~~年~~\buaa@awardmonth~~月~~\buaa@awardday~~日~\qquad\\
1172 | \end{tabular}}
1173 | \end{spacing}
1174 | \end{center}
1175 | }
1176 |
1177 | %%%%%%%%%% creation and use %%%%%%%%%%
1178 | % 研究生独创性声明和授权书
1179 |
1180 | \newcommand{\creationanduse}{%
1181 | \clearemptydoublepage
1182 | \thispagestyle{empty}
1183 | \vspace*{50bp}
1184 | \centerline{\zihao{3}\heiti 关于学位论文的独创性声明}
1185 | \zihao{-4}\songti
1186 | ~~\par
1187 | 本人郑重声明:所呈交的论文是本人在指导教师指导下独立进行研究工作所取得的成果,
1188 | 论文中有关资料和数据是实事求是的。尽我所知,除文中已经加以标注和致谢外,
1189 | 本论文不包含其他人已经发表或撰写的研究成果,也不包含本人或他人为获得北京航空航天大学
1190 | 或其它教育机构的学位或学历证书而使用过的材料。与我一同工作的同志对研究所做的任何贡献
1191 | 均已在论文中作出了明确的说明。\par
1192 | 若有不实之处,本人愿意承担相关法律责任。\par
1193 | ~~\par
1194 | {\zihao{5}\ 学位论文作者签名:\uline{\mbox{\hspace{7em}}}\hspace{5em}日期:\hspace{7ex}年\hspace{5ex}月\hspace{5ex}日}
1195 | \vskip130bp
1196 | \centerline{\zihao{3}\heiti 学位论文使用授权书}
1197 | ~~\par
1198 | 本人完全同意北京航空航天大学有权使用本学位论文(包括但不限于其印刷版和电子版),
1199 | 使用方式包括但不限于:保留学位论文,按规定向国家有关部门(机构)送交学位论文,
1200 | 以学术交流为目的赠送和交换学位论文,允许学位论文被查阅、借阅和复印,将学位论文的全部
1201 | 或部分内容编入有关数据库进行检索,采用影印、缩印或其他复制手段保存学位论文。\par
1202 | 保密学位论文在解密后的使用授权同上。\par
1203 | ~~\par
1204 | {\zihao{5}
1205 | \ 学位论文作者签名:\uline{\mbox{\hspace{7em}}}\hspace{5em}日期:\hspace{7ex}年\hspace{5ex}月\hspace{5ex}日\par
1206 | \ 指导教师签名:\uline{\mbox{\hspace{9em}}}\hspace{5em}日期:\hspace{7ex}年\hspace{5ex}月\hspace{5ex}日}
1207 | }
1208 |
1209 | %%%%%%%%%% denotation %%%%%%%%%%
1210 | % 符号对照表
1211 |
1212 | \newenvironment{denotation}
1213 | {
1214 | \chapter*{主要符号对照表\markboth{主要符号对照表}{}} % no tocline
1215 | \begin{list}{}%
1216 | {
1217 | \zihao{-4}
1218 | \renewcommand\makelabel[1]{##1\hfil}
1219 | \setlength{\labelwidth}{2.5cm} % 标签盒子宽度
1220 | \setlength{\labelsep}{0.5cm} % 标签与列表文本距离
1221 | \setlength{\itemindent}{0cm} % 标签缩进量
1222 | \setlength{\leftmargin}{10em} % 左边界
1223 | \setlength{\rightmargin}{0cm}
1224 | \setlength{\parsep}{0cm} % 段落间距
1225 | \setlength{\itemsep}{0cm} % 标签间距
1226 | \setlength{\listparindent}{0cm} % 段落缩进量
1227 | \setlength{\topsep}{0cm} % 标签与上文的间距
1228 | }
1229 | }
1230 | {\end{list}}
1231 |
1232 | %%%%%%%%%% settings for custom pages %%%%%%%%%%
1233 | % 首页重定义
1234 |
1235 | \renewcommand{\maketitle}{%
1236 | \titlech
1237 | \ifbuaa@bachelor
1238 | \ifbuaa@ktreport
1239 | \pagestyle{fancy}
1240 | \frontmatter
1241 | \else
1242 | \pagestyle{empty}
1243 | \loadgeometry{bachelortaskgeometry}
1244 | \buaa@bachelor@assign %本科生论文任务书
1245 | \loadgeometry{bachelorgeometry}
1246 | \announce %本科生声明
1247 | \pagestyle{fancy}
1248 | \frontmatter
1249 | \fi
1250 | \else
1251 | \ifbuaa@ktreport
1252 | \clearemptydoublepage
1253 | \frontmatter
1254 | \else
1255 | \titleeng %研究生英文封面
1256 | \timingye %研究生题名页
1257 | \creationanduse %研究生独创性声明和使用授权书
1258 | \clearemptydoublepage
1259 | \frontmatter
1260 | \fi
1261 | \fi
1262 | \songti
1263 | \zihao{-4}
1264 | }
1265 |
1266 | %%%%%%%%%% common user info %%%%%%%%%%
1267 | % 用户信息
1268 |
1269 | % 学校名称
1270 | \def\buaa@university{北京航空航天大学}
1271 | \def\buaa@universityeng{Beihang University}
1272 | \newcommand{\university}[2]{%
1273 | \def\buaa@university{#1}
1274 | \def\buaa@universityeng{#2}
1275 | }
1276 | % 学院
1277 | \def\buaa@school{}
1278 | \def\buaa@schooleng{}
1279 | \newcommand{\school}[2]{%
1280 | \def\buaa@school{#1}
1281 | \def\buaa@schooleng{#2}
1282 | }
1283 | % 专业
1284 | \def\buaa@major{}
1285 | \def\buaa@majoreng{}
1286 | \newcommand{\major}[2]{%
1287 | \def\buaa@major{#1}
1288 | \def\buaa@majoreng{#2}
1289 | }
1290 | % 论文标题和副标题
1291 | \def\buaa@thesistitle{}
1292 | \def\buaa@thesissubtitle{}
1293 | \def\buaa@thesistitleeng{}
1294 | \def\buaa@thesissubtitleeng{}
1295 | \newcommand{\thesistitle}[4]{%
1296 | \def\buaa@thesistitle{#1}
1297 | \def\buaa@thesissubtitle{#2}
1298 | \def\buaa@thesistitleeng{#3}
1299 | \def\buaa@thesissubtitleeng{#4}
1300 | }
1301 | % 作者
1302 | \def\buaa@thesisauthor{}
1303 | \def\buaa@thesisauthoreng{}
1304 | \newcommand{\thesisauthor}[2]{%
1305 | \def\buaa@thesisauthor{#1}
1306 | \def\buaa@thesisauthoreng{#2}
1307 | }
1308 | % 指导老师
1309 | \def\buaa@teacher{}
1310 | \def\buaa@teachereng{}
1311 | \newcommand{\teacher}[2]{%
1312 | \def\buaa@teacher{#1}
1313 | \def\buaa@teachereng{#2}
1314 | }
1315 | % 副指导老师
1316 | \def\buaa@subteacher{}
1317 | \def\buaa@subteachereng{}
1318 | \newcommand{\subteacher}[2]{%
1319 | \def\buaa@subteacher{#1}
1320 | \def\buaa@subteachereng{#2}
1321 | }
1322 | % 分类号
1323 | \def\buaa@category{}
1324 | \newcommand{\category}[1]{%
1325 | \def\buaa@category{#1}
1326 | }
1327 | % 论文开始时间
1328 | \def\buaa@thesisbeginyear{}
1329 | \def\buaa@thesisbeginmonth{}
1330 | \def\buaa@thesisbeginday{}
1331 | \newcommand{\thesisbegin}[3]{%
1332 | \def\buaa@thesisbeginyear{#1}
1333 | \def\buaa@thesisbeginmonth{#2}
1334 | \def\buaa@thesisbeginday{#3}
1335 | }
1336 | % 论文结束时间
1337 | \def\buaa@thesisendyear{}
1338 | \def\buaa@thesisendmonth{}
1339 | \def\buaa@thesisendday{}
1340 | \newcommand{\thesisend}[3]{%
1341 | \def\buaa@thesisendyear{#1}
1342 | \def\buaa@thesisendmonth{#2}
1343 | \def\buaa@thesisendday{#3}
1344 | }
1345 | % 答辩时间
1346 | \def\buaa@defenseyear{}
1347 | \def\buaa@defensemonth{}
1348 | \def\buaa@defenseday{}
1349 | \newcommand{\defense}[3]{%
1350 | \def\buaa@defenseyear{#1}
1351 | \def\buaa@defensemonth{#2}
1352 | \def\buaa@defenseday{#3}
1353 | }
1354 | % 中文摘要关键字
1355 | \def\buaa@ckeyword{}
1356 | \newcommand{\ckeyword}[1]{%
1357 | \def\buaa@ckeyword{#1}}
1358 | % 英文摘要关键字
1359 | \def\buaa@ekeyword{}
1360 | \newcommand{\ekeyword}[1]{%
1361 | \def\buaa@ekeyword{#1}}
1362 | % 学位
1363 | \def\buaa@degree{} % 中文首页
1364 | \def\buaa@degreeeng{} % 英文首页
1365 | \def\buaa@degreetitle{} % 题名页
1366 | \def\buaa@degreehead{} % 页眉页脚
1367 | \newcommand{\degree}[4]{%
1368 | \def\buaa@degree{#1}
1369 | \def\buaa@degreeeng{#2}
1370 | \def\buaa@degreetitle{#3}
1371 | \def\buaa@degreehead{#4}
1372 | }
1373 | \ifbuaa@bachelor
1374 | \degree{学士学位}{Bachelor}{学士学位}{学士}
1375 | \else
1376 | \ifbuaa@master
1377 | \ifbuaa@professional
1378 | \degree{专业硕士学位}{Master}{硕士学位}{硕士}
1379 | \else
1380 | \degree{硕士学位}{Master}{硕士学位}{硕士}
1381 | \fi
1382 | \else
1383 | \ifbuaa@professional
1384 | \degree{专业博士学位}{Doctor of Philosophy}{博士学位}{博士}
1385 | \else
1386 | \degree{博士学位}{Doctor of Philosophy}{博士学位}{博士}
1387 | \fi
1388 | \fi
1389 | \fi
1390 |
1391 | %%%%%%%%%% bachelor user info %%%%%%%%%%
1392 | % 开题文件类别
1393 | \def\buaa@ktclass{}
1394 | \newcommand{\ktclass}[1]{%
1395 | \def\buaa@ktclass{#1}
1396 | }
1397 |
1398 | %%%%%%%%%% bachelor user info %%%%%%%%%%
1399 | % 本科生信息
1400 |
1401 | % 班级
1402 | \def\buaa@class{}
1403 | \newcommand{\class}[1]{%
1404 | \def\buaa@class{#1}
1405 | }
1406 | % 单位代码
1407 | \def\buaa@unicode{1006}
1408 | \newcommand{\unicode}[1]{%
1409 | \def\buaa@unicode{#1}
1410 | }
1411 | % 学号
1412 | \def\buaa@studentID{}
1413 | \newcommand{\studentID}[1]{%
1414 | \def\buaa@studentID{#1}
1415 | }
1416 | % 论文时间
1417 | \def\buaa@thesisdateyear{}
1418 | \def\buaa@thesisdatemonth{}
1419 | \newcommand{\thesisdate}[2]{%
1420 | \def\buaa@thesisdateyear{#1}
1421 | \def\buaa@thesisdatemonth{#2}
1422 | }
1423 |
1424 | %%%%%%%%%% master user info %%%%%%%%%%
1425 | % 研究生信息
1426 |
1427 | % 保密等级
1428 | \def\buaa@clevel{}
1429 | \def\buaa@climit{}
1430 | \newcommand{\mibao}[2]{%
1431 | \def\buaa@clevel{#1}
1432 | \def\buaa@climit{#2}
1433 | }
1434 | % 研究方向
1435 | \def\buaa@direction{}
1436 | \newcommand{\direction}[1]{
1437 | \def\buaa@direction{#1}
1438 | }
1439 | % 导师职称
1440 | \def\buaa@teacherdegree{}
1441 | \def\buaa@teacherdegreeeng{}
1442 | \newcommand{\teacherdegree}[2]{%
1443 | \def\buaa@teacherdegree{#1}
1444 | \def\buaa@teacherdegreeeng{#2}
1445 | }
1446 | % 副导师职称
1447 | \def\buaa@subteacherdegree{}
1448 | \def\buaa@subteacherdegreeeng{}
1449 | \newcommand{\subteacherdegree}[2]{%
1450 | \def\buaa@subteacherdegree{#1}
1451 | \def\buaa@subteacherdegreeeng{#2}
1452 | }
1453 | % 申请学位级别(题名页)
1454 | \def\buaa@appdegree{}
1455 | \newcommand{\applydegree}[1]{%
1456 | \def\buaa@appdegree{#1}
1457 | }
1458 | % 论文编号
1459 | \def\buaa@thesisID{}
1460 | \newcommand{\thesisID}[1]{%
1461 | \def\buaa@thesisID{#1}
1462 | }
1463 | % 论文提交时间
1464 | \def\buaa@commityear{}
1465 | \def\buaa@commitmonth{}
1466 | \def\buaa@commitday{}
1467 | \newcommand{\commit}[3]{%
1468 | \def\buaa@commityear{#1}
1469 | \def\buaa@commitmonth{#2}
1470 | \def\buaa@commitday{#3}
1471 | }
1472 | % 授予学位时间
1473 | \def\buaa@awardyear{}
1474 | \def\buaa@awardmonth{}
1475 | \def\buaa@awardday{}
1476 | \newcommand{\award}[3]{%
1477 | \def\buaa@awardyear{#1}
1478 | \def\buaa@awardmonth{#2}
1479 | \def\buaa@awardday{#3}
1480 | }
1481 |
1482 | %%%%% 'buaathesis.cls' %%%%% END
1483 |
--------------------------------------------------------------------------------
/data/abstract.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 |
3 | % 中英文摘要
4 | \begin{cabstract}
5 | 本篇文档主要介绍{\bf 北航毕业设计论文\LaTeX{}模板}使用和相关软件环境的安装配置,
6 | 以及本模板所遵循的开源协议等。
7 | \end{cabstract}
8 |
9 | \begin{eabstract}
10 | Here is the Abstract in English. And this is a test sentence, just for
11 | a test to see how the buaathesis works. You can just ignore this.\par
12 | This is another pargraph.
13 | \end{eabstract}
--------------------------------------------------------------------------------
/data/appendix1-faq.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{常见问题}
3 | \label{chapter-faq}
4 | \begin{enumerate}
5 | \item 本模板如何使用?
6 | \label{faq-howtouse}
7 | \begin{itemize}
8 | \item 按照第2章的要求,先下载和安装相应的软件,推荐使用\TeX{}Live;
9 | \item 下载cls文件;
10 | \item 使用tex的编辑器或其他编辑器,编写论文,注意保存为UTF-8编码;
11 | \item xelatex编译。
12 | \end{itemize}
13 | \item Windows下的msmake.bat如何使用?
14 | \label{faq-msmake}
15 | \begin{itemize}
16 | \item 使用Windows的CMD命令行,进入到msmake.bat所在目录;
17 | \item 键入~msmake~后会显示相应的帮助文件;
18 | \item 按照所显示的相关信息再键入相应命令即可。
19 | \end{itemize}
20 | \item 使用TexLive如何更新?
21 | \label{faq-texliveupdate}
22 | TUG官方推荐\TeX{}Live通过镜像站进行更新,具体步骤为:
23 | \begin{itemize}
24 | \item 在“开始”菜单中,找到有TeX Live Manage程序;
25 | \item 在菜单“tlmgr”下选择“载入其他仓库”,选择最近的仓库即可(如果是北航校内用户并能够
26 | 访问到\href{http://mirror.buaa.edu.cn/}{北航开源镜像站}的话,可以在仓库地址中
27 | 输入\texttt{http://mirror.buaa.edu.cn/CTAN/systems/texlive/tlnet/});
28 | \item 按照目录选择更新。
29 | \end{itemize}
30 | \end{enumerate}
31 |
--------------------------------------------------------------------------------
/data/appendix2-contactus.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{联系我们}
3 |
--------------------------------------------------------------------------------
/data/bachelor/acknowledgement.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter*{致谢}
3 | \addcontentsline{toc}{chapter}{致谢}
4 | %此处致谢内容
5 | \cleardoublepage
6 |
--------------------------------------------------------------------------------
/data/bachelor/assign.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | % 任务书中的信息
3 | %% 原始资料及设计要求
4 | \assignReq
5 | {原始资料及设计要求第一行}
6 | {原始资料及设计要求第二行}
7 | {原始资料及设计要求第三行}
8 | {原始资料及设计要求第四行}
9 | {原始资料及设计要求第五行}
10 | %% 工作内容
11 | \assignWork
12 | {工作内容第一行}
13 | {工作内容第二行}
14 | {工作内容第三行}
15 | {工作内容第四行}
16 | {工作内容第五行}
17 | {工作内容第六行}
18 | %% 参考文献
19 | \assignRef
20 | {参考文献第一行}
21 | {参考文献第二行}
22 | {参考文献第三行}
23 | {参考文献第四行}
24 | {参考文献第五行}
25 | {参考文献第六行}
26 | {参考文献第七行}
27 | {参考文献第八行}
28 |
--------------------------------------------------------------------------------
/data/bachelor/bachelor_info.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 |
3 | % 班级
4 | \class{(班级号)}
5 |
6 | % 学号
7 | \studentID{(学号)}
8 |
9 | % 单位代码
10 | \unicode{10006}
11 |
12 | % 论文时间,用于首页
13 | \thesisdate{(年)}{(月)}
14 |
--------------------------------------------------------------------------------
/data/bibs.bib:
--------------------------------------------------------------------------------
1 | This file was created with JabRef 2.1 beta 2.
2 | Encoding: GB2312
3 |
4 | @book{kottwitz2011latex,
5 | title={LaTeX Beginner's Guide},
6 | author={Kottwitz, S.},
7 | isbn={9781847199867},
8 | url={http://books.google.com.hk/books?id=rB1Cb62dVnUC},
9 | year={2011},
10 | publisher={Packt Publishing}
11 | }
12 |
13 | @ARTICLE{idlemem,
14 | author = {A. Acharya and S. Setia},
15 | title = {Availability and Utility of Idle Memory in Workstation Clusters},
16 | journal = {ACM SIGMETRICS Performance Evaluation Review},
17 | year = {1999}
18 | }
19 | %期刊文章
20 |
21 | @TECHREPORT{sigsegv,
22 | author = {E. A. Anderson and J. M. Neefe},
23 | title = {An Exploration of Network RAM},
24 | institution = {UC Berkley},
25 | year = {1994},
26 | number = {CSD-98-1000},
27 | month = dec
28 | }
29 | %技术报告?
30 |
31 | @ARTICLE{Myrinet,
32 | author = {N.J. Boden and D. Cohen and R.E. Felderman and A.E. Kulawik and C.
33 | L. Seitz and J.N. Seizovic and W. Su},
34 | title = {Myrinet: A Gigabit-per-Second Local Area Network},
35 | journal = {IEEE Micro},
36 | year = {1995},
37 | volume = {15},
38 | pages = {29--36},
39 | number = {1}
40 | }
41 | %期刊文章
42 |
43 | @BOOK{ulk3rd,
44 | title = {Understanding the Linux Kernel},
45 | publisher = {O'{\MakeUppercase{R}}eilly},
46 | year = {2005},
47 | author = {Daniel P. Bovet and Marco Cesati},
48 | edition = {3rd},
49 | booktitle = {Understanding the Linux Kernel},
50 | isbn = {0-596-00565-2}
51 | }
52 | %书籍
53 |
54 | @BOOK{ldd3rd,
55 | title = {Linux Device Drivers},
56 | publisher = {O'{\MakeUppercase{R}}eilly},
57 | year = {2005},
58 | author = {Jonathan Corbet and Alessandro Rubini and Greg Kroah-Hartman},
59 | edition = {3rd},
60 | booktitle = {Linux Device Drivers}
61 | }
62 | %书籍
63 |
64 | @ARTICLE{GMM,
65 | author = {M. J. Feeley and W. E. Morgan and F. H. Pighin and A. R. Karlin and
66 | H. M. Levy and C. A. Thekkath},
67 | title = {Implementing Global Memory Management in a Workstation Cluster},
68 | journal = {ACM SIGOPS Operating Systems Review},
69 | year = {1995},
70 | pages = {201--212}
71 | }
72 | %期刊文章
73 |
74 | @ARTICLE{nrd,
75 | author = {M. D. Flouris and E. P. Markatos},
76 | title = {The Network RamDisk: Using Remote Memory on Heterogeneous NOWs},
77 | journal = {Cluster Computing},
78 | year = {1999},
79 | volume = {2},
80 | pages = {281--293},
81 | number = {4}
82 | }
83 | %期刊文章
84 |
85 | @INPROCEEDINGS{1992GMM,
86 | author = {M. J. Frankling and M. J. Carey and M. Livny},
87 | title = {Globla memory management in client-server DBMS architectures},
88 | booktitle = {Proceeding of the 18th VLDB Conference},
89 | year = {1992},
90 | month = aug
91 | }
92 | %会议论文?
93 |
94 | @INPROCEEDINGS{iSCSIIOprof,
95 | author = {Jizhong Han and Dan Zhou and Xubin He and Jinzhu Gao},
96 | title = {I/{\MakeUppercase{O}} Profiling for Distributed IP Storage Systems},
97 | booktitle = {Proceeding of The Second International Conference on Embedded Software
98 | and Systems},
99 | year = {2005},
100 | month = dec
101 | }
102 |
103 | @INPROCEEDINGS{icache1,
104 | author = {X. He and Q. Yang and M. Zhang},
105 | title = {A Caching Strategy to Improve iSCSI Performance},
106 | booktitle = {Proceeding of Local Computer Networks},
107 | year = {2002}
108 | }
109 |
110 | @MASTERSTHESIS{NFS,
111 | author = {M. R. Hines and M. Lewandowski and K. Gopalan},
112 | title = {Anemone: Adaptive Network Memory Engine},
113 | school = {Florida State University},
114 | year = {2003}
115 | }
116 | %硕士论文
117 |
118 | @INPROCEEDINGS{memserver,
119 | author = {L. Iftode and K. Li and K. Petersen},
120 | title = {Memory Servers for Multicomputers},
121 | booktitle = {Proceeding of the IEEE Spring COMPCON 93},
122 | year = {1993},
123 | pages = {538-547},
124 | month = feb
125 | }
126 |
127 | @INPROCEEDINGS{dodo,
128 | author = {S. Koussih and A. Acharyam, S. Setia},
129 | title = {Dodo:A User-level System for Exploiting Idle Memory in Workstation
130 | Clusters},
131 | booktitle = {Proceeding of the Eighth IEEE International Symposium on High Performance
132 | Distributed Computing},
133 | year = {1999}
134 | }
135 |
136 | @ARTICLE{HPBD,
137 | author = {S. Liang and R. Notonha and D. K. Panda},
138 | title = {Swapping to Remote Memory over InfiniBand: An Approach using a High
139 | Performance Network Block Device},
140 | journal = {IEEE Cluster Computing},
141 | year = {2005},
142 | month = sep
143 | }
144 | %期刊文章
145 |
146 | @BOOK{lkd2nd,
147 | title = {Linux Kernel Development},
148 | publisher = {Sams Publishing},
149 | year = {2005},
150 | author = {Robert Love},
151 | edition = {2nd},
152 | booktitle = {Linux Kernel Development},
153 | isbn = {0-672-32720-1}
154 | }
155 | %书籍
156 |
157 | @INPROCEEDINGS{rrmp,
158 | author = {E. P. Markatos and G. Dramitions},
159 | title = {Implementation of a Reliable Remote Memory Pager},
160 | booktitle = {Proceeding of the 1996 Usenix Technical Conference},
161 | year = {1996}
162 | }
163 |
164 | @OTHER{stream,
165 | author = {John McCalpin},
166 | etype = {CP},
167 | howpublished = {http://www.streambench.org},
168 | title = {Streambenchmark},
169 | url = {http://www.streambench.org}
170 | }
171 | %其他
172 |
173 | @INPROCEEDINGS{Nswap,
174 | author = {T. Newhall and S. Finney and K. Ganchevm and M. Spiegel},
175 | title = {Nswap:A Network Swapping Module for Linux Clusters},
176 | booktitle = {Proceeding of Euro-Par'03 International Conference on Parallel and
177 | Distributed Computing},
178 | year = {2003},
179 | address = {Klagenfurt, Austria},
180 | month = aug
181 | }
182 |
183 | @INPROCEEDINGS{manager,
184 | author = {J. Oleszkiewicz and L. Xiao and Y. Liu},
185 | title = {Parallel Network RAM: Effectively Utilizing Global Cluster memory
186 | for Large Data-Intensive Parallel Programs},
187 | booktitle = {Proceeding of International Conference on Parallel Proceeding},
188 | year = {2004},
189 | pages = {577-592}
190 | }
191 |
192 | @ARTICLE{Quadrics,
193 | author = {Fabrizio Petrini and Eitan Frachtenberg and Adolfy Hoisie and Salvador
194 | Coll},
195 | title = {Performance Evaluation of the Quadrics Interconnection Network},
196 | journal = {Journal of Cluster Computing},
197 | year = {2003},
198 | volume = {6},
199 | pages = {125--142},
200 | number = {2},
201 | month = apr
202 | }
203 | %期刊文章
204 |
205 | @INPROCEEDINGS{NBD,
206 | author = {Sun, H. Tang and M. Chen and J. Fan},
207 | title = {A Scalable Dynamic Network Memory Service System},
208 | booktitle = {Proceeding of High-Performance Computing in Asia-Pacific Region},
209 | year = {2005}
210 | }
211 |
212 | @INPROCEEDINGS{VMA,
213 | author = {T. S. Trevisan and V. S. Costal and L. Whately and C. L. Amorim},
214 | title = {Distributed Shared Memory in Kernel Mode},
215 | booktitle = {Proceeding of Computer Architecture and High Performance Computing},
216 | year = {2002}
217 | }
218 |
219 | @ARTICLE{bigmem,
220 | author = {L. Xiao and S. Chen and X. Zhang},
221 | title = {Adaptive Memory Allocations in Clusters to Handle Unexpctedly Large
222 | Data-Intensive Jobs},
223 | journal = {IEEE Transactions on Parallel and Distributed Systems},
224 | year = {2004},
225 | volume = {15},
226 | pages = {577-592},
227 | number = {6},
228 | month = jun
229 | }
230 | %期刊文章
231 |
232 | @OTHER{IB,
233 | etype = {OL},
234 | howpublished = {http://www.infinibandta.org/spec},
235 | key = {ITA},
236 | organization = {InfiniBand Trade Association},
237 | title = {The InfiniBand Architecture},
238 | url = {http://www.infinibandta.org/spec}
239 | }
240 | %其他
241 |
--------------------------------------------------------------------------------
/data/chapter1-intro.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{简介}
3 |
4 | \section{项目说明}
5 |
6 | 欢迎使用北京航空航天大学毕业设计论文毕业设计论文\LaTeX{}模板,
7 | 本模板由北航开源俱乐部(BHOSC)维护,根据北京航空航天大学教务处的
8 | 本科生毕业设计论文要求和研究生毕业设计论文要求来编写的。
9 |
10 | 目前本模板支持本科、硕士和博士研究生毕业设计论文要求规范。
11 |
12 | 本模板在编写过程中尽可能满足学校要求,但是由于原始规范主要针对Word。
13 | 和\LaTeX{}之间不可避免的差异加之编写者的水平限制,本模板很难做到完全一致。
14 | 我们十分欢迎北航的\LaTeX{}爱好者/专家参与到本模板的完善工作中,
15 | 希望本模板能够对各位同学的论文撰写工作提供便利,
16 | 感谢您对我们工作的信任以及任何可能的反馈和贡献。
17 | 如果您对开发和完善本模板\,BUAAthesis.cls\,有兴趣,
18 | 或者有任何想法和建议,请与我们联系!
19 |
20 | {\heiti 注意:}本模板在尽可能满足学校要求的同时,在细节处理上,
21 | 倾向于遵从\LaTeX{}排版规范,避免使用奇怪的宏包和编写者认为不规范的设置。
22 | 所以难免和学校提供的基于Word的样张存在细微差异,请谨慎使用!
23 |
24 | \section{相关信息}
25 |
26 | \subsection{模板维护及联系方式}
27 | \begin{tabular}{ll}
28 | \multicolumn{2}{l}{北航开源俱乐部 BeiHang OpenSource Club (BHOSC)} \\
29 | GoogleGroup & \url{https://groups.google.com/d/forum/BHOSC/} \\
30 | Github & \url{https://github.com/BHOSC/} \\
31 | IRC & \#beihang-osc @ FreeNode
32 | \end{tabular}
33 |
34 | \subsection{代码托管及相关页面}
35 | \begin{itemize}
36 | \item 毕业设计论文模板代码
37 | \item[] \url{https://github.com/BHOSC/BUAAthesis/}
38 | % TODO(huxuan): Others pages related to BUAAthesis
39 | % \item 软件学院本科毕设答辩演示模板
40 | % \item[] \url{https://github.com/huxuan/latex\_buaasoft\_bachelor\_slide}
41 | % \item 研究生毕设综述报告和开题报告模板
42 | % \item[] \url{https://github.com/JosephPeng/ZongshuKaiti\}
43 | \end{itemize}
44 |
45 | \subsection{贡献者}
46 | \begin{tabularx}{\textwidth}{@{\hspace{2em}}ll}
47 | \href{https://github.com/JosephPeng/}{Joseph \footnote{目前的维护者}} &
48 | \href{mailto:pengyongbuaa@gmail.com}{pengyongbuaa@gmail.com} \\
49 | \href{http://huxuan.org/}{huxuan \textsuperscript{1}} &
50 | \href{mailto:i@huxuan.org}{i@huxuan.org} \\
51 | \end{tabularx}
52 |
53 | \subsection{项目协议}
54 | 本项目主要遵从以下两套协议
55 | \begin{itemize}
56 | \item \href{http://www.gnu.org/licenses/gpl.txt}
57 | {GNU General Public License (GPLv3)}
58 | \item \href{http://www.latex-project.org/lppl.txt}
59 | {\LaTeX{} Project Public License (LPPL)}
60 | \end{itemize}
61 | 使用前请认真阅读相关协议,详情请见项目代码根目录下的 LICENSE 文件
62 |
63 | \section{免责声明}
64 | 本模板为编写者依据北京航空航天大学研究生院及教务处出台的
65 | 《北京航空航天大学研究生撰写学位论文规定(2009年7月修订)》和
66 | 《本科生毕业设计(论文)撰写规范及要求》编写而成,
67 | 旨在方便北京航空航天大学毕业生撰写学位论文使用。
68 |
69 | 如前所述,本模板为北航开源俱乐部\LaTeX{}爱好者依据学校的要求规范编写,
70 | 研究生院及教务处只提供毕业论文的写作规范,目前并未提供官方\LaTeX{}模板,
71 | 也未授权第三方模板为官方模板,故此模板仅为论文规范的参考实现,
72 | 不保证格式能完全满足审查老师要求。任何由于使用本模板而引起的论文格式等问题,
73 | 以及造成的可能后果,均与本模板编写者无关。
74 |
75 | 任何组织或个人以本模板为基础进行修改、扩展而生成新模板,请严格遵守相关协议。
76 | 由于违反协议而引起的任何纠纷争端均与本模板编写者无关。
77 |
78 | \section{版本历史}
79 | \begin{itemize}
80 | \item[1.0] 2012/07/24 已完成大体功能,说明文档和细节方面还有待完善。
81 | % “a.b”为版本号,b为奇数时为内测版本,为偶数时为发行版。
82 | \end{itemize}
83 |
--------------------------------------------------------------------------------
/data/chapter2-config.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{环境配置}
3 |
4 | \section{C\TeX{}套装 [Windows Only]}
5 |
6 | C\TeX{}套装是Windows下为中文优化的\LaTeX{}系统套件,主要基于MiKTeX系统,
7 | 集成了编辑器WinEdt和其他相关软件。整个系统封装在一个安装程序中,
8 | 安装方法与常规软件相同,无需任何配置,适合大部分Windows用户使用。
9 |
10 | \begin{description}
11 | \item[下载地址] \hfill
12 | \begin{description}
13 | \item[官方页面]
14 | \url{http://www.ctex.org/CTeXDownload}
15 | \item[清华镜像]
16 | \url{https://mirrors.tuna.tsinghua.edu.cn/ctex/unstable/}
17 | \item[中科大镜像]
18 | \url{http://mirrors.ustc.edu.cn/ctex/unstable/}
19 | \end{description}
20 | \item[安装方法] \hfill
21 | \begin{itemize}
22 | \item[] 与常规软件的安装方法类似
23 | \item[] 一直下一步稍加一些自定义(如安装路径)即可
24 | \item[] {\bf 注意:} 安装程序在某些情况下可能覆盖PATH环境变量,请在安装前注意备份PATH环境变量
25 | \end{itemize}
26 | \end{description}
27 |
28 | \section{\TeX{}Live [ Windows \& Linux ]}
29 |
30 | \TeX{}是自由软件,有很多发行版本,就像Linux的Ubuntu、Fedora等等。
31 | 每个发行版本都是一套工具集合,包括plain\TeX{},\LaTeX{},pdf\TeX{},dvips等。
32 | 其中比较流行的是\TeX{}Live,也包含在CTAN的开源镜像中。
33 |
34 | 推荐通过下载ISO镜像文件的方式安装:
35 | \begin{description}
36 | \item[官方说明]
37 | \url{http://www.tug.org/texlive/acquire-iso.html}
38 | \item[下载地址] 官方地址会自动跳转寻找"最近"镜像,还有几个较快的教育网镜像
39 | \begin{description}
40 | \item[官方地址]
41 | \url{http://mirror.ctan.org/systems/texlive/Images/texlive2016.iso}
42 | \item[清华镜像]
43 | \url{http://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/Images/}
44 | \item[中科大镜像]
45 | \url{https://mirrors.ustc.edu.cn/CTAN/systems/texlive/Images/}
46 | \end{description}
47 | \item[安装方法] \hfill
48 | \begin{enumerate}
49 | \item 通过虚拟光驱挂载镜像也可以直接打开或解压缩不过会比较慢
50 | \item 双击运行光盘镜像或者运行脚本
51 | \item[] Windows 用户可以直接双击运行\textsl{install-tl.bat}
52 | \item[] Linux 用户可以在终端下执行命令\textsl{./install-tl}
53 | \item 按照提示下一步即可,安装大致耗时10$\sim$20分钟,受机器配置影响。
54 | \end{enumerate}
55 | \end{description}
56 |
57 | 当然官方也提供了通过网络安装的方式,虽然通过可以通过镜像选择达到比较快的速度,
58 | 但是这里简便期间不再赘述,有兴趣的同学可以参考官方说明
59 | \url{http://www.tug.org/texlive/acquire-netinstall.html}。
60 |
61 | \section{Mac\TeX{} [ Mac ]}
62 |
63 | Mac\TeX{}是基于\TeX{}Live为Mac系统设计的套件。
64 |
65 | \begin{description}
66 | \item[官方网站]
67 | \url{http://tug.org/mactex/}
68 | \item[下载地址] 官方地址会自动跳转寻找"最近"镜像,还有几个较快的教育网镜像
69 | \begin{description}
70 | \item[官方地址]
71 | \url{http://mirror.ctan.org/systems/mac/mactex/MacTeX.pkg}
72 | \item[清华镜像]
73 | \url{http://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/mac/mactex/}
74 | \item[中科大镜像]
75 | \url{https://mirrors.ustc.edu.cn/CTAN/systems/mac/mactex/}
76 | \end{description}
77 | \item[安装方法] 同一般软件安装,下一步即可
78 | \end{description}
79 |
80 | \section{兼容性}
81 |
82 | 本模板依赖v2.0及以上版本的ctex包,\TeX{}Live 2015及以上版本、C\TeX{}2.9.3 可以正常使用。
83 | 对于低版本的\LaTeX{}发行版,需要使用包管理器升级ctex宏包。
84 |
85 | \section{安装字体 [ Linux ]}
86 |
87 | 北航的毕业设计论文要求使用Times New Roman和华文行楷这两种字体,在Linux系统上,这两种字
88 | 是没有预装在系统里的,因此Linux用户需要手动安装字体才能正常使用本模板。本节将以Ubuntu系统
89 | 为例演示字体的安装。
90 |
91 | 首先需要获取字体文件,Windows系统默认包含了Times New Roman和华文行楷这两种字体,可以从
92 | \verb|C:\Windows\Fonts\|文件夹下将字体文件拷贝出来(显示为\verb|STXingkai|和
93 | \verb|Times New Roman|),当然,用户也可以从其他途径获取这两个字体文件。然后将字体文件
94 | 拷贝到Ubuntu的\verb|/usr/share/fonts|目录下,为了方便管理,可以在这些外部字体放在一个新
95 | 文件夹中:
96 | \begin{lstlisting}[
97 | language={bash},
98 | caption={拷贝字体文件},
99 | label={copy-fonts},
100 | ]
101 | sudo cp /usr/share/fonts/msfonts/
102 | \end{lstlisting}
103 | 然后将字体文件的权限设置为644:
104 | \begin{lstlisting}[
105 | language={bash},
106 | caption={设置字体文件权限},
107 | label={set-fonts-permission},
108 | ]
109 | sudo chmod 644 /usr/share/fonts/msfonts/*
110 | \end{lstlisting}
111 | 接下来,进入到{\verb /usr/share/fonts/msfonts } 目录下,依次运行以下三个命令:
112 | \begin{lstlisting}[
113 | language={bash},
114 | caption={安装字体},
115 | label={install-fonts},
116 | ]
117 | sudo mkfontscale
118 | sudo mkfontdir
119 | sudo fc-cache -fv
120 | \end{lstlisting}
121 | 当看到命令行输出
122 | \begin{lstlisting}[
123 | language={bash},
124 | caption={正常输出结果},
125 | label={install-font-success},
126 | ]
127 | fc-cache: succeeded
128 | \end{lstlisting}
129 | 时,就完成了字体的安装。
130 |
131 | \section{关于编辑器}
132 |
133 | 以上介绍了三款\LaTeX{}套装,涵盖了主流的三大平台,除了C\TeX{}自带了WinEdt,
134 | 其余两款均需要自己选择编辑器,理论上任何文本编辑器都是可以使用的,
135 | 如Windows上的 vscode,Linux/MacOS上的vim,emacs,
136 | 一方面要考虑对\LaTeX{}的支持,一方面还是自己的熟悉程度。
137 |
138 | 这里推荐一款大众化的编辑器\TeX{}maker,它是跨平台的,支持Windows、Linux和MacOS。
139 |
140 | \begin{description}
141 | \item[官方网站]
142 | \url{http://www.xm1math.net/texmaker/}
143 | \item[下载地址]
144 | \url{http://www.xm1math.net/texmaker/download.html}
145 | \item[相关说明]
146 | \begin{itemize}
147 | \item 安装同一般软件的安装
148 | \item 配置Xe\LaTeX{}的编译,选择菜单栏“选项”->“配置\TeX{}Maker”,
149 | \item[] 在“\LaTeX{}”一栏填写
150 | \texttt{xelatex -interaction=nonstopmode\%.tex}
151 | \end{itemize}
152 | \end{description}
153 |
154 | \section{关于编译}
155 |
156 | \LaTeX{}的文件是通过编译生成的,对于本模板和毕业设计论文而言,
157 | 需要经过代码\ref{code-compile}所示步骤(以sample-bachelor.tex为例):
158 | \begin{lstlisting}[
159 | language={bash},
160 | caption={编译步骤},
161 | label={code-compile},
162 | ]
163 | xelatex sample-bachelor.tex
164 | bibtex sample-bachelor.aux
165 | xelatex sample-bachelor.tex
166 | xelatex sample-bachelor.tex
167 | \end{lstlisting}
168 | 当然,我们在模板里也提供了编译的执行脚本。
169 |
170 | \subsection{批处理 [ Windows only ]}
171 |
172 | 进入cmd(Win+R,然后输入cmd),cd到BUAAthesis对应目录,
173 | 如\verb|D:\BUAAthesis\|,然后运行\verb|msmake|即可。
174 |
175 | \subsection{Makefile [ Windows(cygwin) / Linux / MacOS ]}
176 | 需要要你的命令行环境支持Make,cd到BUAAthesis相应目录,
177 | 目前支持如代码\ref{code-make}所示的功能:
178 | \begin{lstlisting}[
179 | language={bash},
180 | caption={make 命令},
181 | label={code-make},
182 | ]
183 | make bachelor # 编译本科生的\LaTeX{}(文件默认项,亦可直接输入make)
184 | make master # 编译研究生的\LaTeX{}文件
185 | make kaitireport # 编译本科生/研究生的开题报告/文献综述的\LaTeX{}文件
186 | make clean # 删除编译过程中生成的文件(除了pdf)
187 | make depclean # 删除编译过程中生成的文件(包括pdf)
188 | \end{lstlisting}
189 |
--------------------------------------------------------------------------------
/data/chapter3-download.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{下载}
3 |
4 | \section{发行版本}
5 |
6 | 发行版本是本模板编写者会不定期更新打包的版本,适合大部分用户使用,
7 | 优点是相对较为稳定,下载和使用都更方便便捷,
8 | 缺点是可能不包含一些最新的更新,不过应该足够满足常规毕业设计论文撰写需求。
9 | 由于本模板仍在开发之中,我们将适时更新本说明文档及相关项目介绍和使用方法,
10 | 敬请关注后续进展。
11 |
12 | \section{开发版本}
13 |
14 | 开发版本是通过Git直接clone本模板托管在Github版本库中的最新代码,
15 | 适合有版本管理工具使用经验和对LaTeX使用较为熟练的用户。
16 | 优点是包含最新的模板代码,
17 | 缺点是稳定性无法保证,可能有一些小问题,
18 | 当然我们很欢迎您通过所有可能的方式将问题反馈给我们。
19 |
20 | \subsection{下载方法}
21 | 首先你需要打开准备存放毕业设计论文的目录,
22 | 通过命令\ref{code-git-clone}即可获取最新的模板代码,
23 | 需要注意的是这将在当前目录下新建一个名为BUAAthesis的文件夹。
24 | \begin{lstlisting}[
25 | language={bash},
26 | caption={git clone},
27 | label={code-git-clone},
28 | ]
29 | git clone git://github.com/BHOSC/BUAAthesis.git
30 | \end{lstlisting}
31 |
32 | \subsection{更新方法}
33 | 通过命令\ref{code-git-pull}即可实现模板代码的更新,
34 | 需要注意的是此处可能会出现冲突,相关处理方法将在后续说明。
35 | \begin{lstlisting}[
36 | language={bash},
37 | caption={git pull},
38 | label={code-git-pull},
39 | ]
40 | git pull origin master
41 | \end{lstlisting}
42 |
43 | \section{目录结构}
44 |
45 | 本模板项目完整的文件目录结构如下所示:
46 |
47 | {
48 | \dirtree{%
49 | .1 BUAAthesis/\DTcomment{根目录}.
50 | .2 buaathesis.cls\DTcomment{模板文件}.
51 | .2 buaathesis.bst\DTcomment{参考文献样式}.
52 | .2 sample-bachelor.tex\DTcomment{本科生示例文件}.
53 | .2 sample-master.tex\DTcomment{研究生示例文件}.
54 | .2 data/\DTcomment{数据文件夹}.
55 | .3 abstract.tex\DTcomment{中英文摘要}.
56 | .3 appendix1-faq.tex\DTcomment{附录1,常见问题}.
57 | .3 appendix2-contactus.tex\DTcomment{附录2,联系我们}.
58 | .3 bibs.bib\DTcomment{参考文献文件}.
59 | .3 chapter1-intro.tex.
60 | .3 chapter2-config.tex.
61 | .3 chapter3-download.tex.
62 | .3 chapter4-baisc.tex.
63 | .3 chapter5-usage.tex.
64 | .3 chapter6-implement.tex.
65 | .3 com\_info.tex\DTcomment{通用自定义信息}.
66 | .3 reference.tex\DTcomment{参考文献}.
67 | .3 bachelor/\DTcomment{本科生专属文件}.
68 | .4 assign.tex\DTcomment{任务书}.
69 | .4 bachelor\_info.tex\DTcomment{本科生专属信息}.
70 | .4 acknowledgement.tex\DTcomment{致谢页}.
71 | .3 master/\DTcomment{研究生专属文件}.
72 | .4 back1-achievement.tex\DTcomment{附页1,取得成绩}.
73 | .4 back2-acknowledgement.tex\DTcomment{附页2,致谢}.
74 | .4 back3-aboutauthor.tex\DTcomment{附页3,关于作者}.
75 | .4 denotation.tex\DTcomment{主要符号对照表}.
76 | .4 master\_info.tex\DTcomment{研究生专属信息}.
77 | .2 figure/\DTcomment{图片存放路径}.
78 | .3 buaamark.eps\DTcomment{北航Logo,用于页眉}.
79 | .3 buaaname.eps\DTcomment{北航校名,用于首页}.
80 | .3 fgbt.jpg\DTcomment{北航未来花园Logo,用于测试}.
81 | .2 Makefile\DTcomment{Linux下辅助脚本}.
82 | .2 msmake.bat\DTcomment{Windows下辅助脚本}.
83 | .2 README.md\DTcomment{Github项目说明}.
84 | .2 .gitignore\DTcomment{Git版本管理配置文件}.
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/data/chapter4-basic.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{\LaTeX{}基础知识}
3 | \label{chapter-basic}
4 |
5 | 本章主要为常用示例,推荐入门用户参照本文档的相应代码进行编写,
6 | 编写过程中主要考虑论文写作过程中主要使用到的样式类型,
7 | 更全面的\LaTeX{}基础语法请常见推荐的入门文档。
8 | % TODO(huxuan): Add reference of recommended document
9 |
10 | \section{\LaTeX{}的优势}
11 | \label{sec-latex-advantage}
12 |
13 | \subsection{样式格式}
14 | \label{subsec-style}
15 |
16 | \LaTeX{}可以实现内容和格式的分离,使得专注内容和忽略格式成为可能。
17 | 结合已有的模版,用户可以利用最基本的文本编辑器完成复杂格式文档的书写。
18 |
19 | 你不需要关心整个论文中任何的标题、目录、正文等所有内容的字体、字号,
20 | 还有段落的首行缩进、段前段后的间隔,利用本模版即可完成所有的工作。
21 | 包括目录(包括表格目录等)本身以及所有章节、图表的序号均为自动生成,
22 | \LaTeX{}都会自动帮你完成其他工作,你需要做的只有一个---专注于你写的内容。
23 |
24 | \subsection{版本管理}
25 | \label{subsec-version-control}
26 |
27 | 用\LaTeX{}编写的文档都是纯文本文件,所以可以使用版本管理,
28 | 正如你现在所看到的说明文档,是和\LaTeX{}模版一起托管在了Github上。
29 | 至于版本管理及其好处不在此赘述,感兴趣的同学请自行了解。
30 |
31 | \section{字体}
32 | \label{sec-font}
33 |
34 | 毕设论文一般不应过多使用字体。模版也已经设置好默认字体:{\bf 宋体}
35 | 和{\bf Times New Roman}字体。如有需要特别强调的地方,可参考以下示例。
36 | \begin{itemize}
37 | \item {\heiti 床前明月光,疑是地上霜。举头望明月,低头思故乡。}
38 | \item {\bf 床前明月光,疑是地上霜。举头望明月,低头思故乡。}
39 | \item \textbf{To be, or not to be, that's a question.}
40 | \item \texttt{To be, or not to be, that's a question.}
41 | \end{itemize}
42 |
43 | \section{特殊符号}
44 | \label{sec-symbol}
45 |
46 | 由于\LaTeX{}命令需要用到一些符号,因此一些特殊符号的录入需要特殊处理。
47 | 比较常见的有“\% \$ \& \{ \} \# \_ \^{} \textbackslash”等,
48 | 其他符号请自行搜索或参考tex自带的文档。
49 | % TODO(huxuan): Add reference of symbol document
50 |
51 | \section{长度单位和命令}
52 | \label{sec-length}
53 |
54 | \begin{itemize}
55 | \item 常规长度单位
56 | \begin{description}
57 | \item[cm] 厘米
58 | \item[in] 英寸
59 | \end{description}
60 | \item 文字相关长度,适用于与文字混排
61 | \begin{description}
62 | \item[em] 当前字体字符“M”的宽度,常用于水平距离
63 | \item[ex] 当前字体字符“x”的宽度,常用于竖直距离
64 | \end{description}
65 | \item 页面相关长度,适用于图表等浮动元素
66 | \begin{description}
67 | \item[\textbackslash textwidth] 页面主体文字部分的宽度
68 | \item[\textbackslash textheight] 页面主体文字部分的高度
69 | \end{description}
70 | \end{itemize}
71 |
72 | \section{空格、换行与分段}
73 | \label{sec-space-linkbreak-par}
74 |
75 | 在\LaTeX{}中,换行都会被忽略,连续的空格都会被认为是一个空格。
76 | 需使用空格时可以选择表\ref{tab-space}中适当的命令。换行与分段是不同的概念,
77 | 换行只是重新开始一行,新的段落需通过一个单独的空行实现。
78 | 故编写\LaTeX{}源文件时推荐以标点为间隔换行,一行不超过80个字符,
79 | 示例见本文档源文件。
80 |
81 | \begin{table}
82 | \centering
83 | \caption{\LaTeX{}中的空格}
84 | \label{tab-space}
85 | \begin{tabular}{l|l}
86 | \hline
87 | \verb|\qquad| & 当前字体下2个字母“M”的宽度 \\ \hline
88 | \verb|\quad| & 当前字体下1个字母“M”的宽度 \\ \hline
89 | \verb|\ | & 当前字体下1/3个字母“M”的宽度(斜杠后是一个空格) \\ \hline
90 | \verb|\;| & 当前字体下2/7个字母“M”的宽度 \\ \hline
91 | \verb|\,| & 当前字体下1/6个字母“M”的宽度 \\ \hline
92 | \verb|\!| & {\bf 缩进}当前字体下1/6个字母“M”的宽度 \\ \hline
93 | \end{tabular}
94 | \end{table}
95 |
96 | \section{标签和引用}
97 | \label{sec-label-ref}
98 |
99 | 标签和引用是用来生成如“见图6.4”等类似语句中的"6.4"这样的序号,
100 | 它的好处是当你改变顺序或者删除之前的某一个图表等内容时,
101 | 所有序号会在下次编译时自动重排。
102 |
103 | 设置标签是\verb|\label{}|命令,参数为该标签的名称,在引用时使用。
104 | 引用标签是\verb|\ref{}|命令,参数为设定好的对应标签名称。
105 | 引用标签所在页的页码是\verb|\pageref{}|命令,参数也是设定好的对应标签名称。
106 | 设置标签也是\LaTeX{}编码时的一个好习惯,推荐在即使用不到的情况下,
107 | 也给所有的章节和图表等内容都设定标签,示例见本文档源文件。
108 |
109 | \section{章、节、条、款、项}
110 | \label{sec-title}
111 |
112 | \subsection{章、节、条}
113 | \label{subsec-chap-etc}
114 |
115 | \begin{description}
116 | \item[章] \verb|\chapter{|章标题\}
117 | \item[节] \verb|\section{|节标题\}
118 | \item[条] \verb|\subsection{|条标题\}
119 | \end{description}
120 |
121 | \subsection{款、项}
122 | \label{subsec-item}
123 | 条目环境即目录结构中的款和项分为itemize,enumerate,description三种。
124 | itemize是最简单的,enumerate是带序号的,description是带描述的,
125 | 具体示例如下:
126 |
127 | \begin{enumerate}
128 | \item enumerate第一条:
129 | \begin{itemize}
130 | \item itemize第一点。
131 | \item itemize第二点。
132 | \end{itemize}
133 | \item enumerate第二条:
134 | \begin{description}
135 | \item[观点三] description第三点。
136 | \item[观点四] description第四点。
137 | \end{description}
138 | \end{enumerate}
139 |
140 | 默认情况下,列表项正文如果较长,列表项的内容将与第一行保持一致的缩进,例如
141 |
142 | \begin{enumerate}
143 | \item 列表项短文本
144 | \item 列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本
145 | 列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本
146 | \end{enumerate}
147 |
148 | 使用\verb|itemize|或\verb|enumerate|环境时,加上\verb|[wide]|选项就可以解决这个问题,
149 | 并且使用\verb|enumerate|环境创建的列表中的项同样会自动编号,
150 | 例如\verb|\begin{enumerate}[wide]|的效果:
151 |
152 | \begin{enumerate}[wide]
153 | \item 列表项短文本
154 | \item 列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本
155 | 列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本列表项长文本
156 | \end{enumerate}
157 |
158 | \section{图形}
159 | \label{sec-figure}
160 | 插入图形时可以使用\texttt{figure}环境,示例如图\ref{fig-sample}所示。
161 | 其中figure环境的参数\verb|[h!]|表示尽量排版在当前位置,一般情况下照用即可。
162 | \verb|\includegraphics|的参数\verb|[width=0.4\textwidth]|是图片大小的设置,
163 | 也可以使用height或者两个一起使用,设置其中一个即可实现等比例缩放。
164 | \begin{figure}[h!]
165 | \centering
166 | \includegraphics[width=0.4\textwidth]{figure/image.pdf}
167 | \caption{图片}
168 | \label{fig-sample}
169 | \end{figure}
170 |
171 | \section{表格}
172 | \label{sec-table}
173 |
174 | \subsection{浮动环境}
175 | \label{subsec-table-float}
176 | \texttt{table}为表格的浮动环境,主要用于添加标题和标签
177 | \texttt{tabular}为表格环境,通过参数定义表格列方向的样式,
178 | 如\verb+{l||c|r}+表示表格共三列,第一列左对齐{\bf l},
179 | 第二列居中对齐{\bf c},第三列右对齐{\bf r}。
180 | 其中前两列用两条竖线分隔,后两列之间只有一条竖线。
181 | 表格行方向的横线用\verb|\hline|表示,横线或竖线均可多条。
182 | 每一行中的列用“\&”作为间隔符,每一行之间使用“\verb|\\|”换行,
183 | 示例见表格\ref{tab-sample}。
184 | \begin{table}
185 | \centering
186 | \caption{浮动表格示例}
187 | \label{tab-sample}
188 | \begin{tabular}{l||c|r}
189 | \hline
190 | 第一列 & 第二列 & 第三列 \\ \hline \hline
191 | 左 & 居中对齐 & 右对齐 \\ \hline
192 | 左对 & 居中 & 右对 \\ \hline
193 | 左对齐 & 对齐 & 右 \\ \hline
194 | \end{tabular}
195 | \end{table}
196 | 如果在表格中需要使用脚注(footnote)功能,则需要将浮动表格环境置于一个minipage中,
197 | 否则脚注会被内容所吞掉。比如下表所示。但目前能力有限,无法将此表格居中,也无法添加
198 | 表格标题和引用。待改进。
199 |
200 | \begin{minipage}[h]{\textwidth}
201 | \begin{tabular}{|c|c|c|}
202 | \hline
203 | aaa\footnote{test} & bbb & ccc \\
204 | \hline
205 | \end{tabular}
206 | \end{minipage}
207 |
208 | \subsection{三线表格}
209 | \label{three-line-table}
210 |
211 | 论文中给出的表格示例为三线表格,在\LaTeX{}中制作三表表格也非常容易。使用\verb|\toprule|、
212 | \verb|\midrule|、\verb|\bottomrule|这三个命令来绘制横分割线即可。以本科生毕业设计手册中的
213 | 一个表格\ref{tab-three-line-table-example}为例:
214 |
215 | \begin{table}
216 | \centering
217 | \caption{降压损失计算结果}
218 | \label{tab-three-line-table-example}
219 | \begin{tabular}{lcr}
220 | \toprule
221 | 换热器 & 热边压降损失 & 冷边压降损失 \\
222 | \midrule
223 | 初级 & 2974.37 & 2931.52 \\
224 | 次级 & 2924.65 & 3789.76 \\
225 | \bottomrule
226 | \end{tabular}
227 | \end{table}
228 |
229 | \subsection{列合并和行合并}
230 | \label{subsec-tab-col-row}
231 | 列合并用\verb|\multicolumn{#1}{#2}{#3}|命令,\#1为所合并的列数,
232 | \#2为该列的样式,\#3为该列中的内容,示例如表\ref{tab-col}。
233 | 其中合并了第二行的二三列,合并的列数为2,样式是“c|”。需要注意的是,
234 | 列分隔符包含两列间可能的竖线(根据表格样式),故只需指定右侧是否有竖线即可。
235 |
236 | 行合并的命令为\verb|\multirow{#1}{#2}{#3}|,参数\#1和\#3与列合并相同。
237 | \#2为行合并单元格的宽度,一般用*来表示默认的计算值,
238 | 行合并后表格线一般是多段间断的线,需要使用命令\verb|\cline{X-Y}|,
239 | 来表示从第X列起始到第Y列结尾的横线,多段横线依次指定即可,
240 | 示例如表\ref{tab-row}所示,被合并的单元格只需留空即可。
241 |
242 | \begin{table}
243 | \begin{minipage}{.5\textwidth}
244 | \centering
245 | \caption{列合并示例}
246 | \label{tab-col}
247 | \begin{tabular}{l|l|l|l}
248 | \hline
249 | 1.1 & 1.2 & 1.3 & 1.4 \\ \hline
250 | 2.1 & \multicolumn{2}{c|}{2.2 \& 2.3} & 2.4 \\ \hline
251 | 3.1 & 3.2 & 3.3 & 3.4 \\ \hline
252 | \end{tabular}
253 | \end{minipage}
254 | \begin{minipage}{.5\textwidth}
255 | \centering
256 | \caption{行合并示例}
257 | \label{tab-row}
258 | \begin{tabular}{l|l|l}
259 | \hline
260 | 1.1 & 1.2 & 1.3 \\ \hline
261 | 2.1 & \multirow{2}*{2.2 \& 3.2} & 2.3 \\ \cline{1-1} \cline{3-3}
262 | 3.1 & & 3.3 \\ \hline
263 | 4.1 & 4.2 & 4.3 \\ \hline
264 | \end{tabular}
265 | \end{minipage}
266 | \end{table}
267 |
268 | \section{数学公式}
269 | \label{sec-math}
270 | 数学公式分为内嵌行公式和独立行公式。内嵌行公式是与正文段落混合排布的公式,
271 | \verb|$ $|表示内嵌行公式的环境,如$sin^2{\alpha}+cos^2{\alpha}=1$。独立行公式是独占一行的公式,
272 | 独立行公式分为两种,一种是后面不带公式编号,如下方公式所示。$$\begin{Bmatrix}1 & 2\\3 &4\end{Bmatrix}$$
273 | 另外一种是常用的带公式编号的独立行公式,推荐使用equation环境来自动实现独立行公式的编号,示例见公式\eqref{equ-sample}。
274 | \begin{equation}
275 | \label{equ-sample}
276 | E=mc^2
277 | \end{equation}
278 |
279 | 一般的数学公式只需掌握几个简单的命令,复杂的数学公式可能会用到更多的命令,
280 | 更深入的数学公式相关内容请参见文档。
281 | % TODO(huxuan): Add reference of recommended document relatex to formula
282 | % 数学符号可以翻阅symbols.pdf,或者使用工具http://detexify.kirelabs.org/classify.html
283 |
284 | \section{使用listings显示代码}
285 | \label{sec-listings}
286 | 使用\texttt{listings}环境可以进行更美观的代码整理和展示。
287 | 代码\ref{code-c-sample}即为一个简单示例。
288 | \begin{lstlisting}[
289 | language={C},
290 | caption={一段C源代码},
291 | label={code-c-sample},
292 | ]
293 | #include
294 |
295 | void main()
296 | {
297 | printf("Hello, world!");
298 | }
299 | \end{lstlisting}
300 |
301 | \section{更复杂的操作}
302 | \label{sec-more}
303 |
304 | \subsection{多图排列}
305 | \label{subsec-multi-fig}
306 | 两个或多个图形并排排列,可以参照图\ref{fig-mini-l}和\ref{fig-mini-r}的示例代码。
307 | \begin{figure}[h!] % [h!] 表示尽量排在当前位置
308 | \begin{minipage}{.5\textwidth} % .5\textwidth 表示正文宽度的一半
309 | \centering
310 | \includegraphics[width=0.6\textwidth]{figure/image.pdf}
311 | \caption{并排的左图}
312 | \label{fig-mini-l}
313 | \end{minipage}
314 | \begin{minipage}{.5\textwidth}
315 | \centering
316 | \includegraphics[width=0.6\textwidth]{figure/image.pdf}
317 | \caption{并排的右图}
318 | \label{fig-mini-r}
319 | \end{minipage}
320 | \end{figure}
321 |
322 | 图\ref{fig-sub}为子图排列,两个子图有各自的图题,
323 | 分别为图\ref{fig-sub-l}和图\ref{fig-sub-r},并有一个共同的图题。
324 | \begin{figure}[h!]
325 | \centering
326 | \subfigure[并排小图a]{
327 | \label{fig-sub-l}
328 | \includegraphics[width=0.3\textwidth]{figure/image.pdf}
329 | }
330 | \hspace{4em} % 水平间隔
331 | \subfigure[并排小图b]{
332 | \label{fig-sub-r}
333 | \includegraphics[width=0.3\textwidth]{figure/image.pdf}
334 | }
335 | \caption{子图并排的示例}
336 | \label{fig-sub}
337 | \end{figure}
338 |
339 | 若要将四个或多个图形以矩阵形式排列,可以参见图\ref{fig-matrix},
340 | 四个子图分别为图\ref{fig-matrix-a}、图\ref{fig-matrix-b}、
341 | 图\ref{fig-matrix-c}和图\ref{fig-matrix-d}。
342 | \begin{figure}[h!]
343 | \centering
344 | \subfigcapskip=6pt
345 | \begin{tabular}{cc}
346 | \subfigure[矩阵子图A]{
347 | \label{fig-matrix-a}
348 | \includegraphics[width=0.3\textwidth]{figure/image.pdf}
349 | } \hspace{4em} &
350 | \subfigure[矩阵子图B]{
351 | \label{fig-matrix-b}
352 | \includegraphics[width=0.3\textwidth]{figure/image.pdf}
353 | } \\
354 | \subfigure[矩阵子图C]{
355 | \label{fig-matrix-c}
356 | \includegraphics[width=0.3\textwidth]{figure/image.pdf}
357 | } \hspace{4em} &
358 | \subfigure[矩阵子图D]{
359 | \label{fig-matrix-d}
360 | \includegraphics[width=0.3\textwidth]{figure/image.pdf}
361 | } \\
362 | \end{tabular}
363 | \caption{矩形的subfig排列}
364 | \label{fig-matrix}
365 | \end{figure}
366 |
367 | 复杂的图形排列基本到此为止,一般情况下很少会用到也并不推荐使用,
368 | 如果对图形的编排的兴趣,可以参考推荐书目。
369 | % TODO(huxuan): Add reference to 《\LaTeX{}插图指南》
370 |
371 | \subsection{图形表格等混排}
372 | \label{subsec-morefigtab}
373 | 图形表格的并排显示可以参照图\ref{fig-tab-mix}和表格\ref{tab-fig-mix}的实现。
374 | 大体思路同图形的并排排列,亦可扩展至其他元素类型。
375 | \begin{figure}[h!]
376 | \begin{minipage}{0.5\textwidth}
377 | \centering
378 | \includegraphics[width=0.6\textwidth]{figure/image.pdf}
379 | \figcaption{左侧的图片} % 用于生成图片的编号
380 | \label{fig-tab-mix}
381 | \end{minipage}
382 | \begin{minipage}{0.5\textwidth}
383 | \centering
384 | \begin{tabular}{c||c|c} \hline
385 | Day & Data & other \\ \hline \hline
386 | Monday & 1 & 1.5 \\
387 | Tuesday & 2 & 2.5 \\
388 | Wednesday & 3 & 3.5 \\
389 | Thursday & 4 & 4.5 \\
390 | Friday & 5 & 5.5 \\ \hline
391 | \end{tabular}
392 | \tabcaption{右侧的表格} % 用于生成表格的编号
393 | \label{tab-fig-mix}
394 | \end{minipage}
395 | \end{figure}
396 |
397 | \subsection{长表格}
398 | \label{subsec-longtab}
399 | 当表格超过一页时可以使用longtable环境,如表\ref{tab-long-example}所示。
400 |
401 | \begin{longtable}{|l|l|l|}
402 | % 表格的首个表头
403 | \caption{长表格示例\label{tab-long-example}} \\
404 | \hline
405 | \multicolumn{1}{|c|}{\textbf{Time (s)}} &
406 | \multicolumn{1}{c|}{\textbf{Triple chosen}} &
407 | \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline
408 | \endfirsthead
409 | % 表格的其他表头
410 | \multicolumn{3}{l}{{\bfseries\tablename\ \thetable{} --接\,上\,页}} \\
411 | \hline \multicolumn{1}{|c|}{\textbf{Time (s)}} &
412 | \multicolumn{1}{c|}{\textbf{Triple chosen}} &
413 | \multicolumn{1}{c|}{\textbf{Other feasible triples}} \\ \hline
414 | \endhead
415 | % 表格的其他表尾
416 | \hline \multicolumn{3}{|r|}{{接\,下\,页}} \\ \hline
417 | \endfoot
418 | % 表格的最后表尾
419 | \hline \hline
420 | \endlastfoot
421 | 0 & (1, 11, 13725) & (1, 12, 10980), (1, 13, 8235), (2, 2, 0) \\
422 | 2745 & (1, 12, 10980) & (1, 13, 8235), (2, 2, 0), (2, 3, 0) \\
423 | 5490 & (1, 12, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
424 | 8235 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
425 | 10980 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
426 | 13725 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
427 | 16470 & (1, 13, 16470) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
428 | 19215 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
429 | 21960 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
430 | 24705 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
431 | 27450 & (1, 12, 16470) & (1, 13, 13725), (2, 2, 2745), (2, 3, 0) \\
432 | 30195 & (2, 2, 2745) & (2, 3, 0), (3, 1, 0) \\
433 | 32940 & (1, 13, 16470) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
434 | 35685 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
435 | 38430 & (1, 13, 10980) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
436 | 41175 & (1, 12, 13725) & (1, 13, 10980), (2, 2, 2745), (2, 3, 0) \\
437 | 43920 & (1, 13, 10980) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
438 | 150975 & (1, 13, 16470) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
439 | 153720 & (1, 12, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
440 | 156465 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
441 | 159210 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
442 | 161955 & (1, 13, 16470) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
443 | 164700 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
444 | 150975 & (1, 13, 16470) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
445 | 153720 & (1, 12, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
446 | 156465 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
447 | 159210 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
448 | 161955 & (1, 13, 16470) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
449 | 164700 & (1, 13, 13725) & (2, 2, 2745), (2, 3, 0), (3, 1, 0) \\
450 | \end{longtable}
451 |
452 |
453 | \subsection{定理定义环境}
454 | \label{subsec-thm}
455 | 本模版支持的定理定义环境及示例:如假设\ref{thm-assumption-example}、
456 | 定义\ref{thm-definition-example}、命题\ref{thm-proposition-example}、
457 | 注释\ref{thm-remark-example}、公理\ref{thm-axiom-example}、
458 | 引理\ref{thm-lemma-example}、定理\ref{thm-theorem-example}、
459 | 证明\ref{thm-proof-example}、推论\ref{thm-corollary-example}、
460 | 例\ref{thm-example-example}、练习\ref{thm-exercise-example}、
461 | 猜想\ref{thm-conjecture-example}、问题\ref{thm-problem-example}。
462 |
463 | \begin{assumption}
464 | \label{thm-assumption-example}
465 | 待月西厢下,迎风户半开;隔墙花影动,疑是玉人来。
466 | \begin{eqnarray}
467 | \label{equ-example-assumption}
468 | c & = & a^2 - b^2\\
469 | & = & (a+b)(a-b)
470 | \end{eqnarray}
471 | \end{assumption}
472 |
473 | \begin{definition}
474 | \label{thm-definition-example}
475 | 子曰:「道千乘之国,敬事而信,节用而爱人,使民以时。」
476 | \end{definition}
477 |
478 | \begin{proposition}
479 | \label{thm-proposition-example}
480 | 曾子曰:「吾日三省吾身 --- 为人谋而不忠乎?与朋友交而不信乎?传不习乎?」
481 | \end{proposition}
482 |
483 | \begin{remark}
484 | \label{thm-remark-example}
485 | 天不言自高,水不言自流。
486 | \begin{gather*}
487 | \begin{split}
488 | \varphi(x,z)
489 | & = z-\gamma_{10}x-\gamma_{mn}x^mz^n\\
490 | & = z-Mr^{-1}x-Mr^{-(m+n)}x^mz^n
491 | \end{split} \\[6pt]
492 | \begin{align}
493 | \zeta^0 & = (\xi^0)^2,\\
494 | \zeta^1 & = \xi^0\xi^1,\\
495 | \zeta^2 & = (\xi^1)^2,
496 | \end{align}
497 | \end{gather*}
498 | \end{remark}
499 |
500 | \begin{axiom}
501 | \label{thm-axiom-example}
502 | 两点间直线段距离最短。
503 | \begin{align}
504 | x & \equiv y+1\pmod{m^2}\\
505 | x & \equiv y+1\mod{m^2}\\
506 | x & \equiv y+1\pod{m^2}
507 | \end{align}
508 | \end{axiom}
509 |
510 | \begin{lemma}
511 | \label{thm-lemma-example}
512 | 《猫和老鼠》是我最爱看的动画片。
513 | \begin{multline*}%\tag*{[a]} % 这个不出现在索引中
514 | \int_a^b\biggl\{\int_a^b[f(x)^2g(y)^2+f(y)^2g(x)^2]
515 | -2f(x)g(x)f(y)g(y)dx\biggr\}dy \\
516 | =\int_a^b\biggl\{g(y)^2\int_a^bf^2
517 | +f(y)^2\int_a^bg^2-2f(y)g(y)\int_a^b fg\biggr\}dy
518 | \end{multline*}
519 | \end{lemma}
520 |
521 | \begin{theorem}
522 | \label{thm-theorem-example}
523 | 犯我强汉者,虽远必诛\hfill --- 陈汤(汉)
524 | \end{theorem}
525 |
526 | \begin{proof}
527 | \label{thm-proof-example}
528 | 燕赵古称多感慨悲歌之士。董生举进士,连不得志于有司,怀抱利器,郁郁适兹土,吾
529 | 知其必有合也。董生勉乎哉?
530 |
531 | 夫以子之不遇时,苟慕义强仁者,皆爱惜焉,矧燕、赵之士出乎其性者哉!然吾尝闻
532 | 风俗与化移易,吾恶知其今不异于古所云邪?聊以吾子之行卜之也。董生勉乎哉?
533 |
534 | 吾因子有所感矣。为我吊望诸君之墓,而观于其市,复有昔时屠狗者乎?为我谢
535 | 曰:“明天子在上,可以出而仕矣!” \hfill --- 韩愈《送董邵南序》
536 | \end{proof}
537 |
538 | \begin{corollary}
539 | \label{thm-corollary-example}
540 | 四川话配音的《猫和老鼠》是世界上最好看最好听最有趣的动画片。
541 | \begin{alignat}{3}
542 | V_i & =v_i - q_i v_j, & \qquad X_i & = x_i - q_i x_j, &
543 | \qquad U_i & = u_i, \qquad \text{for $i\ne j$;} \\
544 | V_j & = v_j, & \qquad X_j & = x_j, &
545 | \qquad U_j & u_j + \sum_{i\ne j} q_i u_i.
546 | \end{alignat}
547 | \end{corollary}
548 |
549 | \begin{example}
550 | \label{thm-example-example}
551 | 大家来看这个例子。
552 | \begin{equation}
553 | \left\{
554 | \begin{array}{l}
555 | \nabla f({\mbox{\boldmath $x$}}^*)-
556 | \sum\limits_{j=1}^p\lambda_j\nabla g_j
557 | ({\mbox{\boldmath $x$}}^*)=0 \\ [0.3cm]
558 | \lambda_jg_j({\mbox{\boldmath $x$}}^*)=0,
559 | \quad j=1,2,\cdots,p \\ [0.2cm]
560 | \lambda_j\ge 0,\quad j=1,2,\cdots,p.
561 | \end{array}
562 | \right.
563 | \end{equation}
564 | \end{example}
565 |
566 | \begin{exercise}
567 | \label{thm-exercise-example}
568 | 清列出 Andrew S. Tanenbaum 和 W. Richard Stevens 的所有著作。
569 | \end{exercise}
570 |
571 | \begin{conjecture}
572 | \label{thm-conjecture-example}
573 | \textit{Poincare Conjecture} If in a closed three-dimensional space,
574 | any closed curves can shrink to a point continuously,
575 | this space can be deformed to a sphere.
576 | \end{conjecture}
577 |
578 | \begin{problem}
579 | \label{thm-problem-example}
580 | 回答还是不回答,是个问题。
581 | \end{problem}
582 |
--------------------------------------------------------------------------------
/data/chapter5-usage.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{使用说明}
3 | \section{基本范例}
4 | \begin{table}
5 | \begin{center}
6 | \begin{tabular}{c||c}
7 | \hline
8 | 本科生论文基本结构 & 研究生论文基本结构\\\hline\hline
9 | 封面 & 封面(中、英文)\\
10 | 扉页 & 题名页、独创性声明和使用授权书\\
11 | 中英文摘要 & 中英文摘要\\
12 | 目录 & 目录\\
13 | 正文 & 图表清单及主要符号表(根据情况可省略)\\
14 | 致谢 & 主体部分\\
15 | 参考文献 & 参考文献\\
16 | 附录 & 附录\\
17 | ~~ & 攻读硕士/博士期间取得的研究\slash 学术成果\\
18 | ~~ & 致谢\\
19 | ~~ & 作者简介(仅博士生)\\
20 | \hline
21 | \end{tabular}
22 | \end{center}
23 | \end{table}
24 |
25 | 本科生论文结构推荐按如下的代码形式来组织整个论文。
26 | \lstinputlisting[
27 | language={[LaTeX]TeX},
28 | caption={本科生论文结构},
29 | label={code-bachelor-structure},
30 | ]{sample-bachelor.tex}
31 |
32 | 研究生则推荐使用如下的代码形式来组织论文。
33 | \lstinputlisting[
34 | language={[LaTeX]TeX},
35 | caption={研究生论文结构},
36 | label={code-master-structure},
37 | ]{sample-master.tex}
38 |
39 | 对于本科生或研究生的开题报告或文献综述,则推荐使用如下的代码形式组织。
40 | \lstinputlisting[
41 | language={[LaTeX]TeX},
42 | caption={开题报告/文献综述论文结构},
43 | label={code-kaitireport-structure},
44 | ]{sample-kaitireport.tex}
45 |
46 | \section{模板选项}
47 | \subsection{学位选项}
48 | \begin{itemize}
49 | \item bachelor---学士学位;
50 | \item master---硕士学位;
51 | \item doctor---博士学位;
52 | \item professional---添加该选项为专业硕士\slash 博士学位,否则为学术硕士\slash 博士学位。
53 | \item kaitireport---添加该选项为开题报告\slash 文献综述,否则为毕业论文。
54 | \end{itemize}
55 |
56 | \subsection{其他选项}
57 | \begin{itemize}
58 | \item oneside\slash twoside---单面\slash 双面打印;
59 | \item openany\slash openright---新的章节在任何页面开始\slash 新的章节从奇数页开始;
60 | \item classfied---保密论文;
61 | \item color---将论文中的链接文字用颜色标识。
62 | \end{itemize}
63 |
64 | \section{封面及正文前的一些设置}
65 | \subsection{封面}
66 | 本科生论文封面直接使用\texttt{\textbackslash maketitle}命令,将编译生成论文封面和任务书(任务书中的各项需要自己在assign.tex中填写),以及“本人声明”页。只需将\texttt{data/bachelor/bachelor\_info.tex}中的信息填写完整即可自行编译生成。
67 |
68 | 研究生(包括博士研究生)的毕设论文封面使用\texttt{\textbackslash maketitle}将生成中英文封面、题名页、和独创性声明与使用授权书。只需将\texttt{data/master/master\_info.tex}中的信息填写完整即可自行编译生成。
69 |
70 | \subsection{中英文摘要}
71 | 本科生和研究生的论文中英文摘要为\texttt{abstract.tex},请直接按照模板示例进行更改替换即可,关键词以及其他的一些个人论文信息在\texttt{data/bachelor/bachelor\_info.tex}或\texttt{data/master/master\_info.tex}中自行定义。
72 |
73 | \subsection{目录}
74 | 生成目录为命令\texttt{\textbackslash tableofcontents},需要xelatex两遍才能正确生成目录。
75 |
76 | 对于研究生,论文还需要有图表目录以及论文主要符号表。分别使用命令\texttt{\textbackslash listoffig\hyp{}ures}和\texttt{\textbackslash listoftables},而主要符号表则在\texttt{data/master/denotation.tex}中,请自行按照模板给出的样式替换即可。
77 |
78 | \section{正文}
79 | \subsection{章节}
80 | 正文中的各个章节,推荐将其每一章分为单独的\texttt{.tex}文件,然后使用\texttt{\textbackslash include\{chap\hyp{}ter.tex\}}将其包含进来即可。
81 |
82 | 章节中的内容如何编写,请见\hyperref[chapter-basic]{第\ref{chapter-basic}章~~\LaTeX{}基础知识}。
83 |
84 | \subsection{参考文献}
85 | 参考文献使用\texttt{BiBTeX}工具,参考文献的数据库为\texttt{bibs.bib},可以使用记事本等文本编辑器进行编辑。具体如何进行编辑也可参照示例模板给出的范例来编写。在Winedt软件中有具体的增加参考文献的选项;在\url{book.google.com}中搜索到的书籍,在页面的最下方也有\texttt{BiBTeX}的导出选项。
86 |
87 | \texttt{.bib}参考文献数据库文件中,每个类别后的第一个为标号,在示例的\texttt{bibs.bib}中第一个书箱的标号为\textbf{kottwitz2011latex},在引用此文献时,使用\verb|\upcite{kottwitz2011latex}|即可得到此文献\upcite{kottwitz2011latex}的引用\footnote{左侧“文献”的右上方即得到了此文献的引用。}。
88 | 使用\verb|\cite{kottwitz2011latex}|即可得到文献\cite{kottwitz2011latex}的引用\footnote{“文献”的后面得到了此文献的引用,不是上标形式。}。
89 |
90 | \section{正文之后的内容}
91 | \subsection{附录}
92 | 附录和正文中的章节编写方式一样。无特殊之处。
93 | \subsection{攻读硕士\slash 博士期间所取得的研究\slash 学术成果(研究生)}
94 | \subsection{致谢}
95 | \subsection{作者简介(博士研究生)}
96 | 博士学位论文应该提供作者简介,主要包括:姓名、性别、出生年月日、民族、出生地;
97 | 简要学历、工作经历(职务);以及攻读学位期间获得的其它奖励(除攻读学位期间取得的研究成果之外)。
98 |
--------------------------------------------------------------------------------
/data/chapter6-implement.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{模板代码实现}
3 |
--------------------------------------------------------------------------------
/data/com_info.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 |
3 | % 学院中英文名,中文不需要“学院”二字
4 | % 院系英文名可从以下导航页面进入各个学院的主页查看
5 | % https://www.buaa.edu.cn/jgsz/yxsz.htm
6 | \school
7 | {(学院名)}{(Name of School)}
8 |
9 | % 专业中英文名
10 | \major
11 | {(专业名)}{(Name of Major)}
12 |
13 | % 论文中英文标题
14 | \thesistitle
15 | {北京航空航天大学学位论文\LaTeX{}模板}
16 | {(副标题)}
17 | {\LaTeX{} Thesis Template for BeiHang University}
18 | {(Subtitle)}
19 |
20 | % 作者中英文名
21 | \thesisauthor
22 | {(姓名)}{(Name)}
23 |
24 | % 导师中英文名
25 | \teacher
26 | {(导师姓名)}{(Name of tutor)}
27 | % 副导师中英文名
28 | % 注:慎用‘副导师’,见北航研究生毕业论文规范
29 | %\subteacher{(副导师姓名)}{(Name of Subteacher)}
30 |
31 | % 中图分类号,可在 http://www.ztflh.com/ 查询
32 | \category{(中图分类号)}
33 |
34 | % 本科生为毕设开始时间;研究生为学习开始时间
35 | \thesisbegin{(年)}{(月)}{(日)}
36 |
37 | % 本科生为毕设结束时间;研究生为学习结束时间
38 | \thesisend{(年)}{(月)}{(日)}
39 |
40 | % 毕设答辩时间
41 | \defense{(年)}{(月)}{(日)}
42 |
43 | % 中文摘要关键字
44 | \ckeyword{北航开源俱乐部,\LaTeX{},论文}
45 |
46 | % 英文摘要关键字
47 | \ekeyword{BHOSC, \LaTeX{}, Thesis}
48 |
--------------------------------------------------------------------------------
/data/conclusion.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter*{结论\markboth{结论}{}}
3 | \addcontentsline{toc}{chapter}{结论}
4 |
5 | 本文主要介绍使用\LaTeX{}进行撰写论文的方法,文中范例丰富,涵盖基本的论文使用,在使用本\LaTeX{}模板时
6 | 可直接复制后进行内容的替换更改即可使用。
7 |
8 | 在第一章主要介绍了\LaTeX{}的背景、本模板的维护者信息以及开源协议等;
9 | 在第二章介绍了各个操作系统平台下\LaTeX{}的配置方法;
10 | 在第三章介绍了各\LaTeX{}版本及软件的下载地址;
11 | 在第四章介绍了\LaTeX{}的基本常用语法以及代码示例,高阶使用技巧等;
12 |
13 | \ldots\ldots\ldots
14 |
15 | 通过使用本模块来完成论文,可以基本掌握\LaTeX{}的使用,也在最小学习成本的基础上满足规范的论文格式,省去
16 | 后期调格式之苦,使作者更专注于论文,亦可更高效的完成论文。
17 |
--------------------------------------------------------------------------------
/data/master/back1-achievement.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{攻读博士/硕士学位期间取得的学术成果}
3 | % 此处标题及内容请自行更改
4 | \noindent 发表论文:
5 | \begin{enumerate}
6 |
7 | \item
8 | Gang Bai and Yue Qi. An Interactive 3D Exhibition System with
9 | Global Illumination for Digital Museum. In Lecture Notes in
10 | Computer Science, 2009, Volume 5670, Learning by Playing.
11 | Game-based Education System Design and Development, Pages 85-92.
12 |
13 | \item
14 | Hu Yong, Qi Yue and Bai Gang. Modeling and Editing Isotropic BRDF.
15 | In proceedings of the Second International Conference on Modeling,
16 | Simulation and Visualization Methods (WMSVM). 15-16 May, 2010,
17 | Sanya, China. Pages 74-77.
18 |
19 | \end{enumerate}
20 |
21 | \noindent 申请专利:
22 | \begin{enumerate}
23 |
24 | \item
25 | 齐越,马宗泉,白刚.基于任意位置多球的光源方向标定[P]. 中国发明专利(200910092909), 公开日2010年2月17日
26 |
27 | \end{enumerate}
28 |
--------------------------------------------------------------------------------
/data/master/back2-acknowledgement.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{致谢}
3 |
--------------------------------------------------------------------------------
/data/master/back3-aboutauthor.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \chapter{作者简介}
3 | xxxx 年 xx 月 xx 日出生于 xx 省 xx 县。
4 |
5 | xxxx 年 9 月考入 xx 大学 xx 系 xx 专业,xxxx 年 7 月本科毕业并获得 xx 学士学位。
6 |
7 | xxxx 年 9 月免试进入 xx 大学 xx 系攻读 xx 学位至今。
--------------------------------------------------------------------------------
/data/master/denotation.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \begin{denotation}
3 | \item[HPC] 高性能计算 (High Performance Computing)
4 | \item[cluster] 集群
5 | \item[Itanium] 安腾
6 | \item[SMP] 对称多处理
7 | \item[API] 应用程序编程接口
8 | \item[PI] 聚酰亚胺
9 | \item[MPI] 聚酰亚胺模型化合物,N-苯基邻苯酰亚胺
10 | \item[PBI] 聚苯并咪唑
11 | \item[MPBI] 聚苯并咪唑模型化合物,N-苯基苯并咪唑
12 | \item[PY] 聚吡咙
13 | \item[PMDA-BDA] 均苯四酸二酐与联苯四胺合成的聚吡咙薄膜
14 | \item[$\Delta G$] 活化自由能~(Activation Free Energy)
15 | \item[$\chi$] 传输系数~(Transmission Coefficient)
16 | \item[$E$] 能量
17 | \item[$m$] 质量
18 | \item[$c$] 光速
19 | \item[$P$] 概率
20 | \item[$T$] 时间
21 | \item[$v$] 速度
22 | \end{denotation}
23 |
--------------------------------------------------------------------------------
/data/master/master_info.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 |
3 | % 研究方向
4 | \direction{(研究方向)}
5 |
6 | % 导师职称中英文
7 | \teacherdegree{(导师职称)}{(Tutor Degree)}
8 | % 副导师职称中英文
9 | % 注:慎用‘副导师’,见北航研究生毕业论文规范
10 | %\subteacherdegree{(副导师职称)}{(Subteacher Degree)}
11 |
12 | % 保密等级 保密期限,注:非保密论文时不需要此项
13 | %\mibao{(保密等级)}{(保密期限)}
14 |
15 | %申请学位级别
16 | \applydegree{(学位级别)}
17 |
18 | % 论文编号,由10006+学号组成
19 | \thesisID{(论文编号)}
20 |
21 | % 论文提交时间
22 | \commit{(年)}{(月)}{(日)}
23 |
24 | % 学位授予日期
25 | \award{(年)}{(月)}{(日)}
26 |
--------------------------------------------------------------------------------
/data/reference.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \cleardoublepage
3 | \phantomsection
4 | \addcontentsline{toc}{chapter}{参考文献}
5 | \nocite{*}
6 | \bibliography{data/bibs}
7 | \cleardoublepage
--------------------------------------------------------------------------------
/figure/buaamark.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BHOSC/BUAAthesis/e969b76e9e4668e7e6a1ecd7cbc1c98d19b91342/figure/buaamark.pdf
--------------------------------------------------------------------------------
/figure/buaaname.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BHOSC/BUAAthesis/e969b76e9e4668e7e6a1ecd7cbc1c98d19b91342/figure/buaaname.pdf
--------------------------------------------------------------------------------
/figure/buaaname_ch.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BHOSC/BUAAthesis/e969b76e9e4668e7e6a1ecd7cbc1c98d19b91342/figure/buaaname_ch.pdf
--------------------------------------------------------------------------------
/figure/image.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BHOSC/BUAAthesis/e969b76e9e4668e7e6a1ecd7cbc1c98d19b91342/figure/image.pdf
--------------------------------------------------------------------------------
/gbt7714-author-year.bst:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `gbt7714-author-year.bst',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% gbt7714.dtx (with options: `2015,authoryear')
8 | %% -------------------------------------------------------------------
9 | %% GB/T 7714-2015 BibTeX Style
10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style
11 | %% Version: 2020/03/14 v2.0.1
12 | %% -------------------------------------------------------------------
13 | %% Copyright (C) 2016-2020 by Zeping Lee
14 | %% -------------------------------------------------------------------
15 | %% This file may be distributed and/or modified under the
16 | %% conditions of the LaTeX Project Public License, either version 1.3c
17 | %% of this license or (at your option) any later version.
18 | %% The latest version of this license is in
19 | %% https://www.latex-project.org/lppl.txt
20 | %% and version 1.3c or later is part of all distributions of LaTeX
21 | %% version 2005/12/01 or later.
22 | %% -------------------------------------------------------------------
23 | INTEGERS {
24 | uppercase.name
25 | max.num.authors
26 | period.between.author.year
27 | sentence.case.title
28 | link.title
29 | title.in.journal
30 | show.mark
31 | show.medium.type
32 | slash.for.extraction
33 | in.booktitle
34 | abbreviate.journal
35 | italic.journal
36 | bold.journal.volume
37 | show.missing.address.publisher
38 | space.before.pages
39 | only.start.page
40 | show.url
41 | show.doi
42 | show.note
43 | show.english.translation
44 | lang.zh.order
45 | lang.ja.order
46 | lang.en.order
47 | lang.ru.order
48 | lang.other.order
49 | }
50 |
51 | FUNCTION {load.config}
52 | {
53 | #1 'uppercase.name :=
54 | #3 'max.num.authors :=
55 | #0 'period.between.author.year :=
56 | #1 'sentence.case.title :=
57 | #0 'link.title :=
58 | #1 'title.in.journal :=
59 | #1 'show.mark :=
60 | #1 'show.medium.type :=
61 | #1 'slash.for.extraction :=
62 | #0 'in.booktitle :=
63 | #0 'abbreviate.journal :=
64 | #0 'italic.journal :=
65 | #0 'bold.journal.volume :=
66 | #1 'show.missing.address.publisher :=
67 | #0 'space.before.pages :=
68 | #0 'only.start.page :=
69 | #1 'show.url :=
70 | #1 'show.doi :=
71 | #0 'show.note :=
72 | #0 'show.english.translation :=
73 | #1 'lang.zh.order :=
74 | #2 'lang.ja.order :=
75 | #3 'lang.en.order :=
76 | #4 'lang.ru.order :=
77 | #5 'lang.other.order :=
78 | }
79 |
80 | ENTRY
81 | { address
82 | author
83 | booktitle
84 | date
85 | doi
86 | edition
87 | editor
88 | howpublished
89 | institution
90 | journal
91 | key
92 | language
93 | mark
94 | medium
95 | note
96 | number
97 | organization
98 | pages
99 | publisher
100 | school
101 | series
102 | title
103 | translator
104 | translation
105 | url
106 | urldate
107 | volume
108 | year
109 | }
110 | { entry.lang entry.is.electronic entry.numbered }
111 | { label extra.label sort.label short.list entry.mark entry.url }
112 |
113 | INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
114 |
115 | INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
116 |
117 | INTEGERS { charptr len }
118 |
119 | FUNCTION {init.state.consts}
120 | { #0 'before.all :=
121 | #1 'mid.sentence :=
122 | #2 'after.sentence :=
123 | #3 'after.block :=
124 | #4 'after.slash :=
125 | #3 'lang.zh :=
126 | #4 'lang.ja :=
127 | #1 'lang.en :=
128 | #2 'lang.ru :=
129 | #0 'lang.other :=
130 | }
131 |
132 | FUNCTION {bbl.anonymous}
133 | { entry.lang lang.zh =
134 | { "佚名" }
135 | { "Anon" }
136 | if$
137 | }
138 |
139 | FUNCTION {bbl.space}
140 | { entry.lang lang.zh =
141 | { "\ " }
142 | { " " }
143 | if$
144 | }
145 |
146 | FUNCTION {bbl.et.al}
147 | { entry.lang lang.zh =
148 | { "等" }
149 | { entry.lang lang.ja =
150 | { "他" }
151 | { entry.lang lang.ru =
152 | { "идр" }
153 | { "et~al." }
154 | if$
155 | }
156 | if$
157 | }
158 | if$
159 | }
160 |
161 | FUNCTION {citation.et.al}
162 | { bbl.et.al }
163 |
164 | FUNCTION {bbl.colon} { ": " }
165 |
166 | FUNCTION {bbl.wide.space} { "\quad " }
167 |
168 | FUNCTION {bbl.slash} { "//\allowbreak " }
169 |
170 | FUNCTION {bbl.sine.loco}
171 | { entry.lang lang.zh =
172 | { "[出版地不详]" }
173 | { "[S.l.]" }
174 | if$
175 | }
176 |
177 | FUNCTION {bbl.sine.nomine}
178 | { entry.lang lang.zh =
179 | { "[出版者不详]" }
180 | { "[s.n.]" }
181 | if$
182 | }
183 |
184 | FUNCTION {bbl.sine.loco.sine.nomine}
185 | { entry.lang lang.zh =
186 | { "[出版地不详: 出版者不详]" }
187 | { "[S.l.: s.n.]" }
188 | if$
189 | }
190 |
191 | FUNCTION {not}
192 | { { #0 }
193 | { #1 }
194 | if$
195 | }
196 |
197 | FUNCTION {and}
198 | { 'skip$
199 | { pop$ #0 }
200 | if$
201 | }
202 |
203 | FUNCTION {or}
204 | { { pop$ #1 }
205 | 'skip$
206 | if$
207 | }
208 |
209 | STRINGS { s t }
210 |
211 | FUNCTION {output.nonnull}
212 | { 's :=
213 | output.state mid.sentence =
214 | { ", " * write$ }
215 | { output.state after.block =
216 | { add.period$ write$
217 | newline$
218 | "\newblock " write$
219 | }
220 | { output.state before.all =
221 | 'write$
222 | { output.state after.slash =
223 | { bbl.slash * write$
224 | newline$
225 | }
226 | { add.period$ " " * write$ }
227 | if$
228 | }
229 | if$
230 | }
231 | if$
232 | mid.sentence 'output.state :=
233 | }
234 | if$
235 | s
236 | }
237 |
238 | FUNCTION {output}
239 | { duplicate$ empty$
240 | 'pop$
241 | 'output.nonnull
242 | if$
243 | }
244 |
245 | FUNCTION {output.after}
246 | { 't :=
247 | duplicate$ empty$
248 | 'pop$
249 | { 's :=
250 | output.state mid.sentence =
251 | { t * write$ }
252 | { output.state after.block =
253 | { add.period$ write$
254 | newline$
255 | "\newblock " write$
256 | }
257 | { output.state before.all =
258 | 'write$
259 | { output.state after.slash =
260 | { bbl.slash * write$ }
261 | { add.period$ " " * write$ }
262 | if$
263 | }
264 | if$
265 | }
266 | if$
267 | mid.sentence 'output.state :=
268 | }
269 | if$
270 | s
271 | }
272 | if$
273 | }
274 |
275 | FUNCTION {output.check}
276 | { 't :=
277 | duplicate$ empty$
278 | { pop$ "empty " t * " in " * cite$ * warning$ }
279 | 'output.nonnull
280 | if$
281 | }
282 |
283 | FUNCTION {fin.entry}
284 | { add.period$
285 | write$
286 | show.english.translation entry.lang lang.zh = and
287 | { ")"
288 | write$
289 | }
290 | 'skip$
291 | if$
292 | newline$
293 | }
294 |
295 | FUNCTION {new.block}
296 | { output.state before.all =
297 | 'skip$
298 | { output.state after.slash =
299 | 'skip$
300 | { after.block 'output.state := }
301 | if$
302 | }
303 | if$
304 | }
305 |
306 | FUNCTION {new.sentence}
307 | { output.state after.block =
308 | 'skip$
309 | { output.state before.all =
310 | 'skip$
311 | { output.state after.slash =
312 | 'skip$
313 | { after.sentence 'output.state := }
314 | if$
315 | }
316 | if$
317 | }
318 | if$
319 | }
320 |
321 | FUNCTION {new.slash}
322 | { output.state before.all =
323 | 'skip$
324 | { slash.for.extraction
325 | { after.slash 'output.state := }
326 | { after.block 'output.state := }
327 | if$
328 | }
329 | if$
330 | }
331 |
332 | FUNCTION {new.block.checka}
333 | { empty$
334 | 'skip$
335 | 'new.block
336 | if$
337 | }
338 |
339 | FUNCTION {new.block.checkb}
340 | { empty$
341 | swap$ empty$
342 | and
343 | 'skip$
344 | 'new.block
345 | if$
346 | }
347 |
348 | FUNCTION {new.sentence.checka}
349 | { empty$
350 | 'skip$
351 | 'new.sentence
352 | if$
353 | }
354 |
355 | FUNCTION {new.sentence.checkb}
356 | { empty$
357 | swap$ empty$
358 | and
359 | 'skip$
360 | 'new.sentence
361 | if$
362 | }
363 |
364 | FUNCTION {field.or.null}
365 | { duplicate$ empty$
366 | { pop$ "" }
367 | 'skip$
368 | if$
369 | }
370 |
371 | FUNCTION {italicize}
372 | { duplicate$ empty$
373 | { pop$ "" }
374 | { "\textit{" swap$ * "}" * }
375 | if$
376 | }
377 |
378 | INTEGERS { byte second.byte }
379 |
380 | INTEGERS { char.lang tmp.lang }
381 |
382 | STRINGS { tmp.str }
383 |
384 | FUNCTION {get.str.lang}
385 | { 'tmp.str :=
386 | lang.other 'tmp.lang :=
387 | #1 'charptr :=
388 | tmp.str text.length$ #1 + 'len :=
389 | { charptr len < }
390 | { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
391 | byte #128 <
392 | { charptr #1 + 'charptr :=
393 | byte #64 > byte #91 < and byte #96 > byte #123 < and or
394 | { lang.en 'char.lang := }
395 | { lang.other 'char.lang := }
396 | if$
397 | }
398 | { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
399 | byte #224 <
400 | { charptr #2 + 'charptr :=
401 | byte #207 > byte #212 < and
402 | byte #212 = second.byte #176 < and or
403 | { lang.ru 'char.lang := }
404 | { lang.other 'char.lang := }
405 | if$
406 | }
407 | { byte #240 <
408 | { charptr #3 + 'charptr :=
409 | byte #227 > byte #234 < and
410 | { lang.zh 'char.lang := }
411 | { byte #227 =
412 | { second.byte #143 >
413 | { lang.zh 'char.lang := }
414 | { second.byte #128 > second.byte #132 < and
415 | { lang.ja 'char.lang := }
416 | { lang.other 'char.lang := }
417 | if$
418 | }
419 | if$
420 | }
421 | { byte #239 =
422 | second.byte #163 > second.byte #172 < and and
423 | { lang.zh 'char.lang := }
424 | { lang.other 'char.lang := }
425 | if$
426 | }
427 | if$
428 | }
429 | if$
430 | }
431 | { charptr #4 + 'charptr :=
432 | byte #240 = second.byte #159 > and
433 | { lang.zh 'char.lang := }
434 | { lang.other 'char.lang := }
435 | if$
436 | }
437 | if$
438 | }
439 | if$
440 | }
441 | if$
442 | char.lang tmp.lang >
443 | { char.lang 'tmp.lang := }
444 | 'skip$
445 | if$
446 | }
447 | while$
448 | tmp.lang
449 | }
450 |
451 | FUNCTION {check.entry.lang}
452 | { author field.or.null
453 | title field.or.null *
454 | get.str.lang
455 | }
456 |
457 | FUNCTION {set.entry.lang}
458 | { language empty$
459 | { check.entry.lang }
460 | { language "english" = language "american" = or language "british" = or
461 | { lang.en }
462 | { language "chinese" =
463 | { lang.zh }
464 | { language "japanese" =
465 | { lang.ja }
466 | { language "russian" =
467 | { lang.ru }
468 | { check.entry.lang }
469 | if$
470 | }
471 | if$
472 | }
473 | if$
474 | }
475 | if$
476 | }
477 | if$
478 | 'entry.lang :=
479 | }
480 |
481 | FUNCTION {set.entry.numbered}
482 | { type$ "patent" =
483 | type$ "standard" = or
484 | type$ "techreport" = or
485 | { #1 'entry.numbered := }
486 | { #0 'entry.numbered := }
487 | if$
488 | }
489 |
490 | INTEGERS { nameptr namesleft numnames name.lang }
491 |
492 | FUNCTION {format.names}
493 | { 's :=
494 | #1 'nameptr :=
495 | s num.names$ 'numnames :=
496 | numnames 'namesleft :=
497 | { namesleft #0 > }
498 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
499 | nameptr max.num.authors >
500 | { bbl.et.al
501 | #1 'namesleft :=
502 | }
503 | { t "others" =
504 | { bbl.et.al }
505 | { t get.str.lang 'name.lang :=
506 | name.lang lang.en =
507 | { t #1 "{vv~}{ll}{~f{~}}" format.name$
508 | uppercase.name
509 | { "u" change.case$ }
510 | 'skip$
511 | if$
512 | t #1 "{, jj}" format.name$ *
513 | }
514 | { t #1 "{ll}{ff}" format.name$ }
515 | if$
516 | }
517 | if$
518 | }
519 | if$
520 | nameptr #1 >
521 | { ", " swap$ * * }
522 | 'skip$
523 | if$
524 | nameptr #1 + 'nameptr :=
525 | namesleft #1 - 'namesleft :=
526 | }
527 | while$
528 | }
529 |
530 | FUNCTION {format.key}
531 | { empty$
532 | { key field.or.null }
533 | { "" }
534 | if$
535 | }
536 |
537 | FUNCTION {format.authors}
538 | { author empty$ not
539 | { author format.names }
540 | { "empty author in " cite$ * warning$
541 | bbl.anonymous
542 | }
543 | if$
544 | }
545 |
546 | FUNCTION {format.editors}
547 | { editor empty$
548 | { "" }
549 | { editor format.names }
550 | if$
551 | }
552 |
553 | FUNCTION {format.translators}
554 | { translator empty$
555 | { "" }
556 | { translator format.names
557 | entry.lang lang.zh =
558 | { translator num.names$ #3 >
559 | { "译" * }
560 | { ", 译" * }
561 | if$
562 | }
563 | 'skip$
564 | if$
565 | }
566 | if$
567 | }
568 |
569 | FUNCTION {format.full.names}
570 | {'s :=
571 | #1 'nameptr :=
572 | s num.names$ 'numnames :=
573 | numnames 'namesleft :=
574 | { namesleft #0 > }
575 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
576 | t get.str.lang 'name.lang :=
577 | name.lang lang.en =
578 | { t #1 "{vv~}{ll}" format.name$ 't := }
579 | { t #1 "{ll}{ff}" format.name$ 't := }
580 | if$
581 | nameptr #1 >
582 | {
583 | namesleft #1 >
584 | { ", " * t * }
585 | {
586 | numnames #2 >
587 | { "," * }
588 | 'skip$
589 | if$
590 | t "others" =
591 | { " et~al." * }
592 | { " and " * t * }
593 | if$
594 | }
595 | if$
596 | }
597 | 't
598 | if$
599 | nameptr #1 + 'nameptr :=
600 | namesleft #1 - 'namesleft :=
601 | }
602 | while$
603 | }
604 |
605 | FUNCTION {author.editor.full}
606 | { author empty$
607 | { editor empty$
608 | { "" }
609 | { editor format.full.names }
610 | if$
611 | }
612 | { author format.full.names }
613 | if$
614 | }
615 |
616 | FUNCTION {author.full}
617 | { author empty$
618 | { "" }
619 | { author format.full.names }
620 | if$
621 | }
622 |
623 | FUNCTION {editor.full}
624 | { editor empty$
625 | { "" }
626 | { editor format.full.names }
627 | if$
628 | }
629 |
630 | FUNCTION {make.full.names}
631 | { type$ "book" =
632 | type$ "inbook" =
633 | or
634 | 'author.editor.full
635 | { type$ "collection" =
636 | type$ "proceedings" =
637 | or
638 | 'editor.full
639 | 'author.full
640 | if$
641 | }
642 | if$
643 | }
644 |
645 | FUNCTION {output.bibitem}
646 | { newline$
647 | "\bibitem[" write$
648 | label ")" *
649 | make.full.names duplicate$ short.list =
650 | { pop$ }
651 | { * }
652 | if$
653 | 's :=
654 | s text.length$ 'charptr :=
655 | { charptr #0 > s charptr #1 substring$ "[" = not and }
656 | { charptr #1 - 'charptr := }
657 | while$
658 | charptr #0 >
659 | { "{" s * "}" * }
660 | { s }
661 | if$
662 | "]{" * write$
663 | cite$ write$
664 | "}" write$
665 | newline$
666 | ""
667 | before.all 'output.state :=
668 | }
669 |
670 | FUNCTION {change.sentence.case}
671 | { entry.lang lang.en =
672 | { "t" change.case$ }
673 | 'skip$
674 | if$
675 | }
676 |
677 | FUNCTION {add.link}
678 | { url empty$ not
679 | { "\href{" url * "}{" * swap$ * "}" * }
680 | { doi empty$ not
681 | { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
682 | 'skip$
683 | if$
684 | }
685 | if$
686 | }
687 |
688 | FUNCTION {format.title}
689 | { title empty$
690 | { "" }
691 | { title
692 | sentence.case.title
693 | 'change.sentence.case
694 | 'skip$
695 | if$
696 | entry.numbered number empty$ not and
697 | { bbl.colon * number * }
698 | 'skip$
699 | if$
700 | link.title
701 | 'add.link
702 | 'skip$
703 | if$
704 | }
705 | if$
706 | }
707 |
708 | FUNCTION {tie.or.space.connect}
709 | { duplicate$ text.length$ #3 <
710 | { "~" }
711 | { " " }
712 | if$
713 | swap$ * *
714 | }
715 |
716 | FUNCTION {either.or.check}
717 | { empty$
718 | 'pop$
719 | { "can't use both " swap$ * " fields in " * cite$ * warning$ }
720 | if$
721 | }
722 |
723 | FUNCTION {is.digit}
724 | { duplicate$ empty$
725 | { pop$ #0 }
726 | { chr.to.int$
727 | duplicate$ "0" chr.to.int$ <
728 | { pop$ #0 }
729 | { "9" chr.to.int$ >
730 | { #0 }
731 | { #1 }
732 | if$
733 | }
734 | if$
735 | }
736 | if$
737 | }
738 |
739 | FUNCTION {is.number}
740 | { 's :=
741 | s empty$
742 | { #0 }
743 | { s text.length$ 'charptr :=
744 | { charptr #0 >
745 | s charptr #1 substring$ is.digit
746 | and
747 | }
748 | { charptr #1 - 'charptr := }
749 | while$
750 | charptr not
751 | }
752 | if$
753 | }
754 |
755 | FUNCTION {format.volume}
756 | { volume empty$ not
757 | { volume is.number
758 | { entry.lang lang.zh =
759 | { "第 " volume * " 卷" * }
760 | { "volume" volume tie.or.space.connect }
761 | if$
762 | }
763 | { volume }
764 | if$
765 | }
766 | { "" }
767 | if$
768 | }
769 |
770 | FUNCTION {format.number}
771 | { number empty$ not
772 | { number is.number
773 | { entry.lang lang.zh =
774 | { "第 " number * " 册" * }
775 | { "number" number tie.or.space.connect }
776 | if$
777 | }
778 | { number }
779 | if$
780 | }
781 | { "" }
782 | if$
783 | }
784 |
785 | FUNCTION {format.volume.number}
786 | { volume empty$ not
787 | { format.volume }
788 | { format.number }
789 | if$
790 | }
791 |
792 | FUNCTION {format.title.vol.num}
793 | { title
794 | sentence.case.title
795 | 'change.sentence.case
796 | 'skip$
797 | if$
798 | entry.numbered
799 | { number empty$ not
800 | { bbl.colon * number * }
801 | 'skip$
802 | if$
803 | }
804 | { format.volume.number 's :=
805 | s empty$ not
806 | { bbl.colon * s * }
807 | 'skip$
808 | if$
809 | }
810 | if$
811 | }
812 |
813 | FUNCTION {format.series.vol.num.title}
814 | { format.volume.number 's :=
815 | series empty$ not
816 | { series
817 | sentence.case.title
818 | 'change.sentence.case
819 | 'skip$
820 | if$
821 | entry.numbered
822 | { bbl.wide.space * }
823 | { bbl.colon *
824 | s empty$ not
825 | { s * bbl.wide.space * }
826 | 'skip$
827 | if$
828 | }
829 | if$
830 | title *
831 | sentence.case.title
832 | 'change.sentence.case
833 | 'skip$
834 | if$
835 | entry.numbered number empty$ not and
836 | { bbl.colon * number * }
837 | 'skip$
838 | if$
839 | }
840 | { format.title.vol.num }
841 | if$
842 | link.title
843 | 'add.link
844 | 'skip$
845 | if$
846 | }
847 |
848 | FUNCTION {format.booktitle.vol.num}
849 | { booktitle
850 | entry.numbered
851 | 'skip$
852 | { format.volume.number 's :=
853 | s empty$ not
854 | { bbl.colon * s * }
855 | 'skip$
856 | if$
857 | }
858 | if$
859 | }
860 |
861 | FUNCTION {format.series.vol.num.booktitle}
862 | { format.volume.number 's :=
863 | series empty$ not
864 | { series bbl.colon *
865 | entry.numbered not s empty$ not and
866 | { s * bbl.wide.space * }
867 | 'skip$
868 | if$
869 | booktitle *
870 | }
871 | { format.booktitle.vol.num }
872 | if$
873 | in.booktitle
874 | { duplicate$ empty$ not entry.lang lang.en = and
875 | { "In: " swap$ * }
876 | 'skip$
877 | if$
878 | }
879 | 'skip$
880 | if$
881 | }
882 |
883 | FUNCTION {remove.period}
884 | { 't :=
885 | "" 's :=
886 | { t empty$ not }
887 | { t #1 #1 substring$ 'tmp.str :=
888 | tmp.str "." = not
889 | { s tmp.str * 's := }
890 | 'skip$
891 | if$
892 | t #2 global.max$ substring$ 't :=
893 | }
894 | while$
895 | s
896 | }
897 |
898 | FUNCTION {abbreviate}
899 | { remove.period
900 | 't :=
901 | t "l" change.case$ 's :=
902 | ""
903 | s "physical review letters" =
904 | { "Phys Rev Lett" }
905 | 'skip$
906 | if$
907 | 's :=
908 | s empty$
909 | { t }
910 | { pop$ s }
911 | if$
912 | }
913 |
914 | FUNCTION {format.journal}
915 | { journal empty$ not
916 | { journal
917 | abbreviate.journal
918 | 'abbreviate
919 | 'skip$
920 | if$
921 | italic.journal entry.lang lang.en = and
922 | 'italicize
923 | 'skip$
924 | if$
925 | }
926 | { "" }
927 | if$
928 | }
929 |
930 | FUNCTION {set.entry.mark}
931 | { entry.mark empty$ not
932 | 'pop$
933 | { mark empty$ not
934 | { pop$ mark 'entry.mark := }
935 | { 'entry.mark := }
936 | if$
937 | }
938 | if$
939 | }
940 |
941 | FUNCTION {format.mark}
942 | { show.mark
943 | { entry.mark
944 | show.medium.type
945 | { medium empty$ not
946 | { "/" * medium * }
947 | { entry.is.electronic
948 | { "/OL" * }
949 | 'skip$
950 | if$
951 | }
952 | if$
953 | }
954 | 'skip$
955 | if$
956 | 'entry.mark :=
957 | "\allowbreak[" entry.mark * "]" *
958 | }
959 | { "" }
960 | if$
961 | }
962 |
963 | FUNCTION {num.to.ordinal}
964 | { duplicate$ text.length$ 'charptr :=
965 | duplicate$ charptr #1 substring$ 's :=
966 | s "1" =
967 | { "st" * }
968 | { s "2" =
969 | { "nd" * }
970 | { s "3" =
971 | { "rd" * }
972 | { "th" * }
973 | if$
974 | }
975 | if$
976 | }
977 | if$
978 | }
979 |
980 | FUNCTION {format.edition}
981 | { edition empty$
982 | { "" }
983 | { edition is.number
984 | { entry.lang lang.zh =
985 | { edition " 版" * }
986 | { edition num.to.ordinal " ed." * }
987 | if$
988 | }
989 | { entry.lang lang.en =
990 | { edition change.sentence.case 's :=
991 | s "Revised" = s "Revised edition" = or
992 | { "Rev. ed." }
993 | { s " ed." *}
994 | if$
995 | }
996 | { edition }
997 | if$
998 | }
999 | if$
1000 | }
1001 | if$
1002 | }
1003 |
1004 | FUNCTION {format.publisher}
1005 | { publisher empty$ not
1006 | { publisher }
1007 | { school empty$ not
1008 | { school }
1009 | { organization empty$ not
1010 | { organization }
1011 | { institution empty$ not
1012 | { institution }
1013 | { "" }
1014 | if$
1015 | }
1016 | if$
1017 | }
1018 | if$
1019 | }
1020 | if$
1021 | }
1022 |
1023 | FUNCTION {format.address.publisher}
1024 | { address empty$ not
1025 | { address
1026 | format.publisher empty$ not
1027 | { bbl.colon * format.publisher * }
1028 | { entry.is.electronic not show.missing.address.publisher and
1029 | { bbl.colon * bbl.sine.nomine * }
1030 | 'skip$
1031 | if$
1032 | }
1033 | if$
1034 | }
1035 | { entry.is.electronic not show.missing.address.publisher and
1036 | { format.publisher empty$ not
1037 | { bbl.sine.loco bbl.colon * format.publisher * }
1038 | { bbl.sine.loco.sine.nomine }
1039 | if$
1040 | }
1041 | { format.publisher empty$ not
1042 | { format.publisher }
1043 | { "" }
1044 | if$
1045 | }
1046 | if$
1047 | }
1048 | if$
1049 | }
1050 |
1051 | FUNCTION {extract.before.dash}
1052 | { duplicate$ empty$
1053 | { pop$ "" }
1054 | { 's :=
1055 | #1 'charptr :=
1056 | s text.length$ #1 + 'len :=
1057 | { charptr len <
1058 | s charptr #1 substring$ "-" = not
1059 | and
1060 | }
1061 | { charptr #1 + 'charptr := }
1062 | while$
1063 | s #1 charptr #1 - substring$
1064 | }
1065 | if$
1066 | }
1067 |
1068 | FUNCTION {extract.after.dash}
1069 | { duplicate$ empty$
1070 | { pop$ "" }
1071 | { 's :=
1072 | #1 'charptr :=
1073 | s text.length$ #1 + 'len :=
1074 | { charptr len <
1075 | s charptr #1 substring$ "-" = not
1076 | and
1077 | }
1078 | { charptr #1 + 'charptr := }
1079 | while$
1080 | { charptr len <
1081 | s charptr #1 substring$ "-" =
1082 | and
1083 | }
1084 | { charptr #1 + 'charptr := }
1085 | while$
1086 | s charptr global.max$ substring$
1087 | }
1088 | if$
1089 | }
1090 |
1091 | FUNCTION {contains.dash}
1092 | { duplicate$ empty$
1093 | { pop$ #0 }
1094 | { 's :=
1095 | { s empty$ not
1096 | s #1 #1 substring$ "-" = not
1097 | and
1098 | }
1099 | { s #2 global.max$ substring$ 's := }
1100 | while$
1101 | s empty$ not
1102 | }
1103 | if$
1104 | }
1105 |
1106 | FUNCTION {format.year}
1107 | { year empty$ not
1108 | { year extract.before.dash }
1109 | { date empty$ not
1110 | { date extract.before.dash }
1111 | { "empty year in " cite$ * warning$
1112 | urldate empty$ not
1113 | { "[" urldate extract.before.dash * "]" * }
1114 | { "" }
1115 | if$
1116 | }
1117 | if$
1118 | }
1119 | if$
1120 | extra.label *
1121 | }
1122 |
1123 | FUNCTION {format.date}
1124 | { type$ "patent" = type$ "newspaper" = or
1125 | date empty$ not and
1126 | { date }
1127 | { year }
1128 | if$
1129 | }
1130 |
1131 | FUNCTION {format.editdate}
1132 | { date empty$ not
1133 | { "\allowbreak(" date * ")" * }
1134 | { "" }
1135 | if$
1136 | }
1137 |
1138 | FUNCTION {format.urldate}
1139 | { urldate empty$ not entry.is.electronic and
1140 | { "\allowbreak[" urldate * "]" * }
1141 | { "" }
1142 | if$
1143 | }
1144 |
1145 | FUNCTION {hyphenate}
1146 | { 't :=
1147 | ""
1148 | { t empty$ not }
1149 | { t #1 #1 substring$ "-" =
1150 | { "-" *
1151 | { t #1 #1 substring$ "-" = }
1152 | { t #2 global.max$ substring$ 't := }
1153 | while$
1154 | }
1155 | { t #1 #1 substring$ *
1156 | t #2 global.max$ substring$ 't :=
1157 | }
1158 | if$
1159 | }
1160 | while$
1161 | }
1162 |
1163 | FUNCTION {format.pages}
1164 | { pages empty$
1165 | { "" }
1166 | { pages
1167 | only.start.page
1168 | 'extract.before.dash
1169 | 'hyphenate
1170 | if$
1171 | }
1172 | if$
1173 | }
1174 |
1175 | FUNCTION {format.journal.volume}
1176 | { volume empty$ not
1177 | { bold.journal.volume
1178 | { "\textbf{" volume * "}" * }
1179 | { volume }
1180 | if$
1181 | }
1182 | { "" }
1183 | if$
1184 | }
1185 |
1186 | FUNCTION {format.journal.number}
1187 | { number empty$ not
1188 | { "\penalty0 (" number * ")" * }
1189 | { "" }
1190 | if$
1191 | }
1192 |
1193 | FUNCTION {format.journal.pages}
1194 | { pages empty$
1195 | { "" }
1196 | { space.before.pages
1197 | { ": " }
1198 | { ":\penalty0 " }
1199 | if$
1200 | format.pages *
1201 | }
1202 | if$
1203 | }
1204 |
1205 | FUNCTION {format.periodical.year.volume.number}
1206 | { year empty$ not
1207 | { year extract.before.dash }
1208 | { "empty year in periodical " cite$ * warning$ }
1209 | if$
1210 | volume empty$ not
1211 | { ", " * volume extract.before.dash * }
1212 | 'skip$
1213 | if$
1214 | number empty$ not
1215 | { "\penalty0 (" * number extract.before.dash * ")" * }
1216 | 'skip$
1217 | if$
1218 | year contains.dash
1219 | { "--" *
1220 | year extract.after.dash empty$
1221 | volume extract.after.dash empty$ and
1222 | number extract.after.dash empty$ and not
1223 | { year extract.after.dash empty$ not
1224 | { year extract.after.dash * }
1225 | { year extract.before.dash * }
1226 | if$
1227 | volume empty$ not
1228 | { ", " * volume extract.after.dash * }
1229 | 'skip$
1230 | if$
1231 | number empty$ not
1232 | { "\penalty0 (" * number extract.after.dash * ")" * }
1233 | 'skip$
1234 | if$
1235 | }
1236 | 'skip$
1237 | if$
1238 | }
1239 | 'skip$
1240 | if$
1241 | }
1242 |
1243 | FUNCTION {check.url}
1244 | { url empty$ not
1245 | { "\url{" url * "}" * 'entry.url :=
1246 | #1 'entry.is.electronic :=
1247 | }
1248 | { howpublished empty$ not
1249 | { howpublished #1 #5 substring$ "\url{" =
1250 | { howpublished 'entry.url :=
1251 | #1 'entry.is.electronic :=
1252 | }
1253 | 'skip$
1254 | if$
1255 | }
1256 | { note empty$ not
1257 | { note #1 #5 substring$ "\url{" =
1258 | { note 'entry.url :=
1259 | #1 'entry.is.electronic :=
1260 | }
1261 | 'skip$
1262 | if$
1263 | }
1264 | 'skip$
1265 | if$
1266 | }
1267 | if$
1268 | }
1269 | if$
1270 | }
1271 |
1272 | FUNCTION {format.url}
1273 | { entry.url
1274 | }
1275 |
1276 | FUNCTION {output.url}
1277 | { entry.url empty$ not
1278 | { new.block
1279 | entry.url output
1280 | }
1281 | 'skip$
1282 | if$
1283 | }
1284 |
1285 | FUNCTION {check.doi}
1286 | { doi empty$ not
1287 | { #1 'entry.is.electronic := }
1288 | 'skip$
1289 | if$
1290 | }
1291 |
1292 | FUNCTION {is.in.url}
1293 | { 's :=
1294 | s empty$
1295 | { #1 }
1296 | { entry.url empty$
1297 | { #0 }
1298 | { s text.length$ 'len :=
1299 | entry.url text.length$ 'charptr :=
1300 | { entry.url charptr len substring$ s = not
1301 | charptr #0 >
1302 | and
1303 | }
1304 | { charptr #1 - 'charptr := }
1305 | while$
1306 | charptr
1307 | }
1308 | if$
1309 | }
1310 | if$
1311 | }
1312 |
1313 | FUNCTION {format.doi}
1314 | { ""
1315 | doi empty$ not
1316 | { "" 's :=
1317 | doi 't :=
1318 | #0 'numnames :=
1319 | { t empty$ not}
1320 | { t #1 #1 substring$ 'tmp.str :=
1321 | tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
1322 | { t #2 #1 substring$ empty$
1323 | { s tmp.str * 's := }
1324 | 'skip$
1325 | if$
1326 | s empty$ s is.in.url or
1327 | 'skip$
1328 | { numnames #1 + 'numnames :=
1329 | numnames #1 >
1330 | { ", " * }
1331 | { "DOI: " * }
1332 | if$
1333 | "\doi{" s * "}" * *
1334 | }
1335 | if$
1336 | "" 's :=
1337 | }
1338 | { s tmp.str * 's := }
1339 | if$
1340 | t #2 global.max$ substring$ 't :=
1341 | }
1342 | while$
1343 | }
1344 | 'skip$
1345 | if$
1346 | }
1347 |
1348 | FUNCTION {output.doi}
1349 | { doi empty$ not show.doi and
1350 | show.english.translation entry.lang lang.zh = and not and
1351 | { new.block
1352 | format.doi output
1353 | }
1354 | 'skip$
1355 | if$
1356 | }
1357 |
1358 | FUNCTION {check.electronic}
1359 | { "" 'entry.url :=
1360 | #0 'entry.is.electronic :=
1361 | 'check.doi
1362 | 'skip$
1363 | if$
1364 | 'check.url
1365 | 'skip$
1366 | if$
1367 | medium empty$ not
1368 | { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
1369 | { #1 'entry.is.electronic := }
1370 | 'skip$
1371 | if$
1372 | }
1373 | 'skip$
1374 | if$
1375 | }
1376 |
1377 | FUNCTION {format.note}
1378 | { note empty$ not show.note and
1379 | { note }
1380 | { "" }
1381 | if$
1382 | }
1383 |
1384 | FUNCTION {output.translation}
1385 | { show.english.translation entry.lang lang.zh = and
1386 | { translation empty$ not
1387 | { translation }
1388 | { "[English translation missing!]" }
1389 | if$
1390 | " (in Chinese)" * output
1391 | write$
1392 | format.doi duplicate$ empty$ not
1393 | { newline$
1394 | write$
1395 | }
1396 | 'pop$
1397 | if$
1398 | " \\" write$
1399 | newline$
1400 | "(" write$
1401 | ""
1402 | before.all 'output.state :=
1403 | }
1404 | 'skip$
1405 | if$
1406 | }
1407 |
1408 | FUNCTION {empty.misc.check}
1409 | { author empty$ title empty$
1410 | year empty$
1411 | and and
1412 | key empty$ not and
1413 | { "all relevant fields are empty in " cite$ * warning$ }
1414 | 'skip$
1415 | if$
1416 | }
1417 |
1418 | FUNCTION {monograph}
1419 | { output.bibitem
1420 | output.translation
1421 | author empty$ not
1422 | { format.authors }
1423 | { editor empty$ not
1424 | { format.editors }
1425 | { "empty author and editor in " cite$ * warning$
1426 | bbl.anonymous
1427 | }
1428 | if$
1429 | }
1430 | if$
1431 | output
1432 | period.between.author.year
1433 | 'new.sentence
1434 | 'skip$
1435 | if$
1436 | format.year "year" output.check
1437 | new.block
1438 | format.series.vol.num.title "title" output.check
1439 | "M" set.entry.mark
1440 | format.mark "" output.after
1441 | new.block
1442 | format.translators output
1443 | new.sentence
1444 | format.edition output
1445 | new.block
1446 | format.address.publisher output
1447 | format.pages bbl.colon output.after
1448 | format.urldate "" output.after
1449 | output.url
1450 | output.doi
1451 | new.block
1452 | format.note output
1453 | fin.entry
1454 | }
1455 |
1456 | FUNCTION {incollection}
1457 | { output.bibitem
1458 | output.translation
1459 | format.authors output
1460 | author format.key output
1461 | period.between.author.year
1462 | 'new.sentence
1463 | 'skip$
1464 | if$
1465 | format.year "year" output.check
1466 | new.block
1467 | format.title "title" output.check
1468 | "M" set.entry.mark
1469 | format.mark "" output.after
1470 | new.block
1471 | format.translators output
1472 | new.slash
1473 | format.editors output
1474 | new.block
1475 | format.series.vol.num.booktitle "booktitle" output.check
1476 | new.block
1477 | format.edition output
1478 | new.block
1479 | format.address.publisher output
1480 | format.pages bbl.colon output.after
1481 | format.urldate "" output.after
1482 | output.url
1483 | output.doi
1484 | new.block
1485 | format.note output
1486 | fin.entry
1487 | }
1488 |
1489 | FUNCTION {periodical}
1490 | { output.bibitem
1491 | output.translation
1492 | format.authors output
1493 | author format.key output
1494 | period.between.author.year
1495 | 'new.sentence
1496 | 'skip$
1497 | if$
1498 | format.year "year" output.check
1499 | new.block
1500 | format.title "title" output.check
1501 | "J" set.entry.mark
1502 | format.mark "" output.after
1503 | new.block
1504 | format.periodical.year.volume.number output
1505 | new.block
1506 | format.address.publisher output
1507 | format.urldate "" output.after
1508 | output.url
1509 | output.doi
1510 | new.block
1511 | format.note output
1512 | fin.entry
1513 | }
1514 |
1515 | FUNCTION {article}
1516 | { output.bibitem
1517 | output.translation
1518 | format.authors output
1519 | author format.key output
1520 | period.between.author.year
1521 | 'new.sentence
1522 | 'skip$
1523 | if$
1524 | format.year "year" output.check
1525 | new.block
1526 | title.in.journal
1527 | { format.title "title" output.check
1528 | "J" set.entry.mark
1529 | format.mark "" output.after
1530 | new.block
1531 | }
1532 | 'skip$
1533 | if$
1534 | format.journal "journal" output.check
1535 | format.journal.volume output
1536 | format.journal.number "" output.after
1537 | format.journal.pages "" output.after
1538 | format.urldate "" output.after
1539 | output.url
1540 | output.doi
1541 | new.block
1542 | format.note output
1543 | fin.entry
1544 | }
1545 |
1546 | FUNCTION {patent}
1547 | { output.bibitem
1548 | output.translation
1549 | format.authors output
1550 | author format.key output
1551 | period.between.author.year
1552 | 'new.sentence
1553 | 'skip$
1554 | if$
1555 | format.year "year" output.check
1556 | new.block
1557 | format.title "title" output.check
1558 | "P" set.entry.mark
1559 | format.mark "" output.after
1560 | new.block
1561 | format.date "year" output.check
1562 | format.urldate "" output.after
1563 | output.url
1564 | output.doi
1565 | new.block
1566 | format.note output
1567 | fin.entry
1568 | }
1569 |
1570 | FUNCTION {electronic}
1571 | { #1 #1 check.electronic
1572 | #1 'entry.is.electronic :=
1573 | output.bibitem
1574 | output.translation
1575 | format.authors output
1576 | author format.key output
1577 | period.between.author.year
1578 | 'new.sentence
1579 | 'skip$
1580 | if$
1581 | format.year "year" output.check
1582 | new.block
1583 | format.series.vol.num.title "title" output.check
1584 | "EB" set.entry.mark
1585 | format.mark "" output.after
1586 | new.block
1587 | format.address.publisher output
1588 | format.pages bbl.colon output.after
1589 | format.editdate "" output.after
1590 | format.urldate "" output.after
1591 | output.url
1592 | output.doi
1593 | new.block
1594 | format.note output
1595 | fin.entry
1596 | }
1597 |
1598 | FUNCTION {misc}
1599 | { journal empty$ not
1600 | 'article
1601 | { booktitle empty$ not
1602 | 'incollection
1603 | { publisher empty$ not
1604 | 'monograph
1605 | { entry.is.electronic
1606 | 'electronic
1607 | { "Z" set.entry.mark
1608 | monograph
1609 | }
1610 | if$
1611 | }
1612 | if$
1613 | }
1614 | if$
1615 | }
1616 | if$
1617 | empty.misc.check
1618 | }
1619 |
1620 | FUNCTION {archive}
1621 | { "A" set.entry.mark
1622 | misc
1623 | }
1624 |
1625 | FUNCTION {book} { monograph }
1626 |
1627 | FUNCTION {booklet} { book }
1628 |
1629 | FUNCTION {collection}
1630 | { "G" set.entry.mark
1631 | monograph
1632 | }
1633 |
1634 | FUNCTION {database}
1635 | { "DB" set.entry.mark
1636 | electronic
1637 | }
1638 |
1639 | FUNCTION {dataset}
1640 | { "DS" set.entry.mark
1641 | electronic
1642 | }
1643 |
1644 | FUNCTION {inbook} { book }
1645 |
1646 | FUNCTION {inproceedings}
1647 | { "C" set.entry.mark
1648 | incollection
1649 | }
1650 |
1651 | FUNCTION {conference} { inproceedings }
1652 |
1653 | FUNCTION {map}
1654 | { "CM" set.entry.mark
1655 | misc
1656 | }
1657 |
1658 | FUNCTION {manual} { monograph }
1659 |
1660 | FUNCTION {mastersthesis}
1661 | { "D" set.entry.mark
1662 | monograph
1663 | }
1664 |
1665 | FUNCTION {newspaper}
1666 | { "N" set.entry.mark
1667 | article
1668 | }
1669 |
1670 | FUNCTION {online}
1671 | { "EB" set.entry.mark
1672 | electronic
1673 | }
1674 |
1675 | FUNCTION {phdthesis} { mastersthesis }
1676 |
1677 | FUNCTION {proceedings}
1678 | { "C" set.entry.mark
1679 | monograph
1680 | }
1681 |
1682 | FUNCTION {software}
1683 | { "CP" set.entry.mark
1684 | electronic
1685 | }
1686 |
1687 | FUNCTION {standard}
1688 | { "S" set.entry.mark
1689 | misc
1690 | }
1691 |
1692 | FUNCTION {techreport}
1693 | { "R" set.entry.mark
1694 | misc
1695 | }
1696 |
1697 | FUNCTION {unpublished}
1698 | { "Z" set.entry.mark
1699 | misc
1700 | }
1701 |
1702 | FUNCTION {default.type} { misc }
1703 |
1704 | MACRO {jan} {"January"}
1705 |
1706 | MACRO {feb} {"February"}
1707 |
1708 | MACRO {mar} {"March"}
1709 |
1710 | MACRO {apr} {"April"}
1711 |
1712 | MACRO {may} {"May"}
1713 |
1714 | MACRO {jun} {"June"}
1715 |
1716 | MACRO {jul} {"July"}
1717 |
1718 | MACRO {aug} {"August"}
1719 |
1720 | MACRO {sep} {"September"}
1721 |
1722 | MACRO {oct} {"October"}
1723 |
1724 | MACRO {nov} {"November"}
1725 |
1726 | MACRO {dec} {"December"}
1727 |
1728 | MACRO {acmcs} {"ACM Computing Surveys"}
1729 |
1730 | MACRO {acta} {"Acta Informatica"}
1731 |
1732 | MACRO {cacm} {"Communications of the ACM"}
1733 |
1734 | MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1735 |
1736 | MACRO {ibmsj} {"IBM Systems Journal"}
1737 |
1738 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1739 |
1740 | MACRO {ieeetc} {"IEEE Transactions on Computers"}
1741 |
1742 | MACRO {ieeetcad}
1743 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1744 |
1745 | MACRO {ipl} {"Information Processing Letters"}
1746 |
1747 | MACRO {jacm} {"Journal of the ACM"}
1748 |
1749 | MACRO {jcss} {"Journal of Computer and System Sciences"}
1750 |
1751 | MACRO {scp} {"Science of Computer Programming"}
1752 |
1753 | MACRO {sicomp} {"SIAM Journal on Computing"}
1754 |
1755 | MACRO {tocs} {"ACM Transactions on Computer Systems"}
1756 |
1757 | MACRO {tods} {"ACM Transactions on Database Systems"}
1758 |
1759 | MACRO {tog} {"ACM Transactions on Graphics"}
1760 |
1761 | MACRO {toms} {"ACM Transactions on Mathematical Software"}
1762 |
1763 | MACRO {toois} {"ACM Transactions on Office Information Systems"}
1764 |
1765 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1766 |
1767 | MACRO {tcs} {"Theoretical Computer Science"}
1768 |
1769 | FUNCTION {sortify}
1770 | { purify$
1771 | "l" change.case$
1772 | }
1773 |
1774 | FUNCTION {chop.word}
1775 | { 's :=
1776 | 'len :=
1777 | s #1 len substring$ =
1778 | { s len #1 + global.max$ substring$ }
1779 | 's
1780 | if$
1781 | }
1782 |
1783 | FUNCTION {format.lab.names}
1784 | { 's :=
1785 | s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
1786 | t get.str.lang 'name.lang :=
1787 | name.lang lang.en =
1788 | { t #1 "{vv~}{ll}" format.name$}
1789 | { t #1 "{ll}{ff}" format.name$}
1790 | if$
1791 | s num.names$ #1 >
1792 | { bbl.space * citation.et.al * }
1793 | 'skip$
1794 | if$
1795 | }
1796 |
1797 | FUNCTION {author.key.label}
1798 | { author empty$
1799 | { key empty$
1800 | { cite$ #1 #3 substring$ }
1801 | 'key
1802 | if$
1803 | }
1804 | { author format.lab.names }
1805 | if$
1806 | }
1807 |
1808 | FUNCTION {author.editor.key.label}
1809 | { author empty$
1810 | { editor empty$
1811 | { key empty$
1812 | { cite$ #1 #3 substring$ }
1813 | 'key
1814 | if$
1815 | }
1816 | { editor format.lab.names }
1817 | if$
1818 | }
1819 | { author format.lab.names }
1820 | if$
1821 | }
1822 |
1823 | FUNCTION {author.key.organization.label}
1824 | { author empty$
1825 | { key empty$
1826 | { organization empty$
1827 | { cite$ #1 #3 substring$ }
1828 | { "The " #4 organization chop.word #3 text.prefix$ }
1829 | if$
1830 | }
1831 | 'key
1832 | if$
1833 | }
1834 | { author format.lab.names }
1835 | if$
1836 | }
1837 |
1838 | FUNCTION {editor.key.organization.label}
1839 | { editor empty$
1840 | { key empty$
1841 | { organization empty$
1842 | { cite$ #1 #3 substring$ }
1843 | { "The " #4 organization chop.word #3 text.prefix$ }
1844 | if$
1845 | }
1846 | 'key
1847 | if$
1848 | }
1849 | { editor format.lab.names }
1850 | if$
1851 | }
1852 |
1853 | FUNCTION {calc.short.authors}
1854 | { type$ "book" =
1855 | type$ "inbook" =
1856 | or
1857 | 'author.editor.key.label
1858 | { type$ "collection" =
1859 | type$ "proceedings" =
1860 | or
1861 | { editor empty$ not
1862 | 'editor.key.organization.label
1863 | 'author.key.organization.label
1864 | if$
1865 | }
1866 | 'author.key.label
1867 | if$
1868 | }
1869 | if$
1870 | 'short.list :=
1871 | }
1872 |
1873 | FUNCTION {calc.label}
1874 | { calc.short.authors
1875 | short.list
1876 | "("
1877 | *
1878 | format.year duplicate$ empty$
1879 | short.list key field.or.null = or
1880 | { pop$ "" }
1881 | 'skip$
1882 | if$
1883 | *
1884 | 'label :=
1885 | }
1886 |
1887 | FUNCTION {sort.language.label}
1888 | { entry.lang lang.zh =
1889 | { lang.zh.order }
1890 | { entry.lang lang.ja =
1891 | { lang.ja.order }
1892 | { entry.lang lang.en =
1893 | { lang.en.order }
1894 | { entry.lang lang.ru =
1895 | { lang.ru.order }
1896 | { lang.other.order }
1897 | if$
1898 | }
1899 | if$
1900 | }
1901 | if$
1902 | }
1903 | if$
1904 | int.to.chr$
1905 | }
1906 |
1907 | FUNCTION {sort.format.names}
1908 | { 's :=
1909 | #1 'nameptr :=
1910 | ""
1911 | s num.names$ 'numnames :=
1912 | numnames 'namesleft :=
1913 | { namesleft #0 > }
1914 | {
1915 | s nameptr "{vv{ } }{ll{ }}{ ff{ }}{ jj{ }}" format.name$ 't :=
1916 | nameptr #1 >
1917 | {
1918 | " " *
1919 | namesleft #1 = t "others" = and
1920 | { "zzzzz" * }
1921 | { numnames #2 > nameptr #2 = and
1922 | { "zz" * year field.or.null * " " * }
1923 | 'skip$
1924 | if$
1925 | t sortify *
1926 | }
1927 | if$
1928 | }
1929 | { t sortify * }
1930 | if$
1931 | nameptr #1 + 'nameptr :=
1932 | namesleft #1 - 'namesleft :=
1933 | }
1934 | while$
1935 | }
1936 |
1937 | FUNCTION {sort.format.title}
1938 | { 't :=
1939 | "A " #2
1940 | "An " #3
1941 | "The " #4 t chop.word
1942 | chop.word
1943 | chop.word
1944 | sortify
1945 | #1 global.max$ substring$
1946 | }
1947 |
1948 | FUNCTION {anonymous.sort}
1949 | { entry.lang lang.zh =
1950 | { "yi4 ming2" }
1951 | { "anon" }
1952 | if$
1953 | }
1954 |
1955 | FUNCTION {warn.empty.key}
1956 | { entry.lang lang.zh =
1957 | { "empty key in " cite$ * warning$ }
1958 | 'skip$
1959 | if$
1960 | }
1961 |
1962 | FUNCTION {author.sort}
1963 | { key empty$
1964 | { warn.empty.key
1965 | author empty$
1966 | { anonymous.sort }
1967 | { author sort.format.names }
1968 | if$
1969 | }
1970 | { key sortify }
1971 | if$
1972 | }
1973 |
1974 | FUNCTION {author.editor.sort}
1975 | { key empty$
1976 | { warn.empty.key
1977 | author empty$
1978 | { editor empty$
1979 | { anonymous.sort }
1980 | { editor sort.format.names }
1981 | if$
1982 | }
1983 | { author sort.format.names }
1984 | if$
1985 | }
1986 | { key sortify }
1987 | if$
1988 | }
1989 |
1990 | FUNCTION {author.organization.sort}
1991 | { key empty$
1992 | { warn.empty.key
1993 | author empty$
1994 | { organization empty$
1995 | { anonymous.sort }
1996 | { "The " #4 organization chop.word sortify }
1997 | if$
1998 | }
1999 | { author sort.format.names }
2000 | if$
2001 | }
2002 | { key sortify }
2003 | if$
2004 | }
2005 |
2006 | FUNCTION {editor.organization.sort}
2007 | { key empty$
2008 | { warn.empty.key
2009 | editor empty$
2010 | { organization empty$
2011 | { anonymous.sort }
2012 | { "The " #4 organization chop.word sortify }
2013 | if$
2014 | }
2015 | { editor sort.format.names }
2016 | if$
2017 | }
2018 | { key sortify }
2019 | if$
2020 | }
2021 |
2022 | FUNCTION {presort}
2023 | { set.entry.lang
2024 | set.entry.numbered
2025 | show.url show.doi check.electronic
2026 | calc.label
2027 | label sortify
2028 | " "
2029 | *
2030 | sort.language.label
2031 | type$ "book" =
2032 | type$ "inbook" =
2033 | or
2034 | 'author.editor.sort
2035 | { type$ "collection" =
2036 | type$ "proceedings" =
2037 | or
2038 | 'editor.organization.sort
2039 | 'author.sort
2040 | if$
2041 | }
2042 | if$
2043 | *
2044 | " "
2045 | *
2046 | year field.or.null sortify
2047 | *
2048 | " "
2049 | *
2050 | cite$
2051 | *
2052 | #1 entry.max$ substring$
2053 | 'sort.label :=
2054 | sort.label *
2055 | #1 entry.max$ substring$
2056 | 'sort.key$ :=
2057 | }
2058 |
2059 | STRINGS { longest.label last.label next.extra }
2060 |
2061 | INTEGERS { longest.label.width last.extra.num number.label }
2062 |
2063 | FUNCTION {initialize.longest.label}
2064 | { "" 'longest.label :=
2065 | #0 int.to.chr$ 'last.label :=
2066 | "" 'next.extra :=
2067 | #0 'longest.label.width :=
2068 | #0 'last.extra.num :=
2069 | #0 'number.label :=
2070 | }
2071 |
2072 | FUNCTION {forward.pass}
2073 | { last.label label =
2074 | { last.extra.num #1 + 'last.extra.num :=
2075 | last.extra.num int.to.chr$ 'extra.label :=
2076 | }
2077 | { "a" chr.to.int$ 'last.extra.num :=
2078 | "" 'extra.label :=
2079 | label 'last.label :=
2080 | }
2081 | if$
2082 | number.label #1 + 'number.label :=
2083 | }
2084 |
2085 | FUNCTION {reverse.pass}
2086 | { next.extra "b" =
2087 | { "a" 'extra.label := }
2088 | 'skip$
2089 | if$
2090 | extra.label 'next.extra :=
2091 | extra.label
2092 | duplicate$ empty$
2093 | 'skip$
2094 | { "{\natexlab{" swap$ * "}}" * }
2095 | if$
2096 | 'extra.label :=
2097 | label extra.label * 'label :=
2098 | }
2099 |
2100 | FUNCTION {bib.sort.order}
2101 | { sort.label 'sort.key$ :=
2102 | }
2103 |
2104 | FUNCTION {begin.bib}
2105 | { preamble$ empty$
2106 | 'skip$
2107 | { preamble$ write$ newline$ }
2108 | if$
2109 | "\begin{thebibliography}{" number.label int.to.str$ * "}" *
2110 | write$ newline$
2111 | "\providecommand{\natexlab}[1]{#1}"
2112 | write$ newline$
2113 | "\providecommand{\url}[1]{#1}"
2114 | write$ newline$
2115 | "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
2116 | write$ newline$
2117 | " \urlstyle{same}\fi"
2118 | write$ newline$
2119 | show.doi
2120 | { "\expandafter\ifx\csname href\endcsname\relax"
2121 | write$ newline$
2122 | " \DeclareUrlCommand\doi{\urlstyle{rm}}\else"
2123 | write$ newline$
2124 | " \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
2125 | write$ newline$
2126 | }
2127 | 'skip$
2128 | if$
2129 | }
2130 |
2131 | FUNCTION {end.bib}
2132 | { newline$
2133 | "\end{thebibliography}" write$ newline$
2134 | }
2135 |
2136 | READ
2137 |
2138 | EXECUTE {init.state.consts}
2139 |
2140 | EXECUTE {load.config}
2141 |
2142 | ITERATE {presort}
2143 |
2144 | SORT
2145 |
2146 | EXECUTE {initialize.longest.label}
2147 |
2148 | ITERATE {forward.pass}
2149 |
2150 | REVERSE {reverse.pass}
2151 |
2152 | ITERATE {bib.sort.order}
2153 |
2154 | SORT
2155 |
2156 | EXECUTE {begin.bib}
2157 |
2158 | ITERATE {call.type$}
2159 |
2160 | EXECUTE {end.bib}
2161 |
--------------------------------------------------------------------------------
/gbt7714-numerical.bst:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `gbt7714-numerical.bst',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% gbt7714.dtx (with options: `2015,numerical')
8 | %% -------------------------------------------------------------------
9 | %% GB/T 7714-2015 BibTeX Style
10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style
11 | %% Version: 2020/03/14 v2.0.1
12 | %% -------------------------------------------------------------------
13 | %% Copyright (C) 2016-2020 by Zeping Lee
14 | %% -------------------------------------------------------------------
15 | %% This file may be distributed and/or modified under the
16 | %% conditions of the LaTeX Project Public License, either version 1.3c
17 | %% of this license or (at your option) any later version.
18 | %% The latest version of this license is in
19 | %% https://www.latex-project.org/lppl.txt
20 | %% and version 1.3c or later is part of all distributions of LaTeX
21 | %% version 2005/12/01 or later.
22 | %% -------------------------------------------------------------------
23 | INTEGERS {
24 | uppercase.name
25 | max.num.authors
26 | period.between.author.year
27 | sentence.case.title
28 | link.title
29 | title.in.journal
30 | show.mark
31 | show.medium.type
32 | slash.for.extraction
33 | in.booktitle
34 | abbreviate.journal
35 | italic.journal
36 | bold.journal.volume
37 | show.missing.address.publisher
38 | space.before.pages
39 | only.start.page
40 | show.url
41 | show.doi
42 | show.note
43 | show.english.translation
44 | }
45 |
46 | FUNCTION {load.config}
47 | {
48 | #1 'uppercase.name :=
49 | #3 'max.num.authors :=
50 | #1 'sentence.case.title :=
51 | #0 'link.title :=
52 | #1 'title.in.journal :=
53 | #1 'show.mark :=
54 | #1 'show.medium.type :=
55 | #1 'slash.for.extraction :=
56 | #0 'in.booktitle :=
57 | #0 'abbreviate.journal :=
58 | #0 'italic.journal :=
59 | #0 'bold.journal.volume :=
60 | #1 'show.missing.address.publisher :=
61 | #0 'space.before.pages :=
62 | #0 'only.start.page :=
63 | #1 'show.url :=
64 | #1 'show.doi :=
65 | #0 'show.note :=
66 | #0 'show.english.translation :=
67 | }
68 |
69 | ENTRY
70 | { address
71 | author
72 | booktitle
73 | date
74 | doi
75 | edition
76 | editor
77 | howpublished
78 | institution
79 | journal
80 | key
81 | language
82 | mark
83 | medium
84 | note
85 | number
86 | organization
87 | pages
88 | publisher
89 | school
90 | series
91 | title
92 | translator
93 | translation
94 | url
95 | urldate
96 | volume
97 | year
98 | }
99 | { entry.lang entry.is.electronic entry.numbered }
100 | { label extra.label sort.label short.list entry.mark entry.url }
101 |
102 | INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
103 |
104 | INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other }
105 |
106 | INTEGERS { charptr len }
107 |
108 | FUNCTION {init.state.consts}
109 | { #0 'before.all :=
110 | #1 'mid.sentence :=
111 | #2 'after.sentence :=
112 | #3 'after.block :=
113 | #4 'after.slash :=
114 | #3 'lang.zh :=
115 | #4 'lang.ja :=
116 | #1 'lang.en :=
117 | #2 'lang.ru :=
118 | #0 'lang.other :=
119 | }
120 |
121 | FUNCTION {bbl.anonymous}
122 | { entry.lang lang.zh =
123 | { "佚名" }
124 | { "Anon" }
125 | if$
126 | }
127 |
128 | FUNCTION {bbl.space}
129 | { entry.lang lang.zh =
130 | { "\ " }
131 | { " " }
132 | if$
133 | }
134 |
135 | FUNCTION {bbl.et.al}
136 | { entry.lang lang.zh =
137 | { "等" }
138 | { entry.lang lang.ja =
139 | { "他" }
140 | { entry.lang lang.ru =
141 | { "идр" }
142 | { "et~al." }
143 | if$
144 | }
145 | if$
146 | }
147 | if$
148 | }
149 |
150 | FUNCTION {citation.et.al}
151 | { bbl.et.al }
152 |
153 | FUNCTION {bbl.colon} { ": " }
154 |
155 | FUNCTION {bbl.wide.space} { "\quad " }
156 |
157 | FUNCTION {bbl.slash} { "//\allowbreak " }
158 |
159 | FUNCTION {bbl.sine.loco}
160 | { entry.lang lang.zh =
161 | { "[出版地不详]" }
162 | { "[S.l.]" }
163 | if$
164 | }
165 |
166 | FUNCTION {bbl.sine.nomine}
167 | { entry.lang lang.zh =
168 | { "[出版者不详]" }
169 | { "[s.n.]" }
170 | if$
171 | }
172 |
173 | FUNCTION {bbl.sine.loco.sine.nomine}
174 | { entry.lang lang.zh =
175 | { "[出版地不详: 出版者不详]" }
176 | { "[S.l.: s.n.]" }
177 | if$
178 | }
179 |
180 | FUNCTION {not}
181 | { { #0 }
182 | { #1 }
183 | if$
184 | }
185 |
186 | FUNCTION {and}
187 | { 'skip$
188 | { pop$ #0 }
189 | if$
190 | }
191 |
192 | FUNCTION {or}
193 | { { pop$ #1 }
194 | 'skip$
195 | if$
196 | }
197 |
198 | STRINGS { s t }
199 |
200 | FUNCTION {output.nonnull}
201 | { 's :=
202 | output.state mid.sentence =
203 | { ", " * write$ }
204 | { output.state after.block =
205 | { add.period$ write$
206 | newline$
207 | "\newblock " write$
208 | }
209 | { output.state before.all =
210 | 'write$
211 | { output.state after.slash =
212 | { bbl.slash * write$
213 | newline$
214 | }
215 | { add.period$ " " * write$ }
216 | if$
217 | }
218 | if$
219 | }
220 | if$
221 | mid.sentence 'output.state :=
222 | }
223 | if$
224 | s
225 | }
226 |
227 | FUNCTION {output}
228 | { duplicate$ empty$
229 | 'pop$
230 | 'output.nonnull
231 | if$
232 | }
233 |
234 | FUNCTION {output.after}
235 | { 't :=
236 | duplicate$ empty$
237 | 'pop$
238 | { 's :=
239 | output.state mid.sentence =
240 | { t * write$ }
241 | { output.state after.block =
242 | { add.period$ write$
243 | newline$
244 | "\newblock " write$
245 | }
246 | { output.state before.all =
247 | 'write$
248 | { output.state after.slash =
249 | { bbl.slash * write$ }
250 | { add.period$ " " * write$ }
251 | if$
252 | }
253 | if$
254 | }
255 | if$
256 | mid.sentence 'output.state :=
257 | }
258 | if$
259 | s
260 | }
261 | if$
262 | }
263 |
264 | FUNCTION {output.check}
265 | { 't :=
266 | duplicate$ empty$
267 | { pop$ "empty " t * " in " * cite$ * warning$ }
268 | 'output.nonnull
269 | if$
270 | }
271 |
272 | FUNCTION {fin.entry}
273 | { add.period$
274 | write$
275 | show.english.translation entry.lang lang.zh = and
276 | { ")"
277 | write$
278 | }
279 | 'skip$
280 | if$
281 | newline$
282 | }
283 |
284 | FUNCTION {new.block}
285 | { output.state before.all =
286 | 'skip$
287 | { output.state after.slash =
288 | 'skip$
289 | { after.block 'output.state := }
290 | if$
291 | }
292 | if$
293 | }
294 |
295 | FUNCTION {new.sentence}
296 | { output.state after.block =
297 | 'skip$
298 | { output.state before.all =
299 | 'skip$
300 | { output.state after.slash =
301 | 'skip$
302 | { after.sentence 'output.state := }
303 | if$
304 | }
305 | if$
306 | }
307 | if$
308 | }
309 |
310 | FUNCTION {new.slash}
311 | { output.state before.all =
312 | 'skip$
313 | { slash.for.extraction
314 | { after.slash 'output.state := }
315 | { after.block 'output.state := }
316 | if$
317 | }
318 | if$
319 | }
320 |
321 | FUNCTION {new.block.checka}
322 | { empty$
323 | 'skip$
324 | 'new.block
325 | if$
326 | }
327 |
328 | FUNCTION {new.block.checkb}
329 | { empty$
330 | swap$ empty$
331 | and
332 | 'skip$
333 | 'new.block
334 | if$
335 | }
336 |
337 | FUNCTION {new.sentence.checka}
338 | { empty$
339 | 'skip$
340 | 'new.sentence
341 | if$
342 | }
343 |
344 | FUNCTION {new.sentence.checkb}
345 | { empty$
346 | swap$ empty$
347 | and
348 | 'skip$
349 | 'new.sentence
350 | if$
351 | }
352 |
353 | FUNCTION {field.or.null}
354 | { duplicate$ empty$
355 | { pop$ "" }
356 | 'skip$
357 | if$
358 | }
359 |
360 | FUNCTION {italicize}
361 | { duplicate$ empty$
362 | { pop$ "" }
363 | { "\textit{" swap$ * "}" * }
364 | if$
365 | }
366 |
367 | INTEGERS { byte second.byte }
368 |
369 | INTEGERS { char.lang tmp.lang }
370 |
371 | STRINGS { tmp.str }
372 |
373 | FUNCTION {get.str.lang}
374 | { 'tmp.str :=
375 | lang.other 'tmp.lang :=
376 | #1 'charptr :=
377 | tmp.str text.length$ #1 + 'len :=
378 | { charptr len < }
379 | { tmp.str charptr #1 substring$ chr.to.int$ 'byte :=
380 | byte #128 <
381 | { charptr #1 + 'charptr :=
382 | byte #64 > byte #91 < and byte #96 > byte #123 < and or
383 | { lang.en 'char.lang := }
384 | { lang.other 'char.lang := }
385 | if$
386 | }
387 | { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte :=
388 | byte #224 <
389 | { charptr #2 + 'charptr :=
390 | byte #207 > byte #212 < and
391 | byte #212 = second.byte #176 < and or
392 | { lang.ru 'char.lang := }
393 | { lang.other 'char.lang := }
394 | if$
395 | }
396 | { byte #240 <
397 | { charptr #3 + 'charptr :=
398 | byte #227 > byte #234 < and
399 | { lang.zh 'char.lang := }
400 | { byte #227 =
401 | { second.byte #143 >
402 | { lang.zh 'char.lang := }
403 | { second.byte #128 > second.byte #132 < and
404 | { lang.ja 'char.lang := }
405 | { lang.other 'char.lang := }
406 | if$
407 | }
408 | if$
409 | }
410 | { byte #239 =
411 | second.byte #163 > second.byte #172 < and and
412 | { lang.zh 'char.lang := }
413 | { lang.other 'char.lang := }
414 | if$
415 | }
416 | if$
417 | }
418 | if$
419 | }
420 | { charptr #4 + 'charptr :=
421 | byte #240 = second.byte #159 > and
422 | { lang.zh 'char.lang := }
423 | { lang.other 'char.lang := }
424 | if$
425 | }
426 | if$
427 | }
428 | if$
429 | }
430 | if$
431 | char.lang tmp.lang >
432 | { char.lang 'tmp.lang := }
433 | 'skip$
434 | if$
435 | }
436 | while$
437 | tmp.lang
438 | }
439 |
440 | FUNCTION {check.entry.lang}
441 | { author field.or.null
442 | title field.or.null *
443 | get.str.lang
444 | }
445 |
446 | FUNCTION {set.entry.lang}
447 | { language empty$
448 | { check.entry.lang }
449 | { language "english" = language "american" = or language "british" = or
450 | { lang.en }
451 | { language "chinese" =
452 | { lang.zh }
453 | { language "japanese" =
454 | { lang.ja }
455 | { language "russian" =
456 | { lang.ru }
457 | { check.entry.lang }
458 | if$
459 | }
460 | if$
461 | }
462 | if$
463 | }
464 | if$
465 | }
466 | if$
467 | 'entry.lang :=
468 | }
469 |
470 | FUNCTION {set.entry.numbered}
471 | { type$ "patent" =
472 | type$ "standard" = or
473 | type$ "techreport" = or
474 | { #1 'entry.numbered := }
475 | { #0 'entry.numbered := }
476 | if$
477 | }
478 |
479 | INTEGERS { nameptr namesleft numnames name.lang }
480 |
481 | FUNCTION {format.names}
482 | { 's :=
483 | #1 'nameptr :=
484 | s num.names$ 'numnames :=
485 | numnames 'namesleft :=
486 | { namesleft #0 > }
487 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
488 | nameptr max.num.authors >
489 | { bbl.et.al
490 | #1 'namesleft :=
491 | }
492 | { t "others" =
493 | { bbl.et.al }
494 | { t get.str.lang 'name.lang :=
495 | name.lang lang.en =
496 | { t #1 "{vv~}{ll}{~f{~}}" format.name$
497 | uppercase.name
498 | { "u" change.case$ }
499 | 'skip$
500 | if$
501 | t #1 "{, jj}" format.name$ *
502 | }
503 | { t #1 "{ll}{ff}" format.name$ }
504 | if$
505 | }
506 | if$
507 | }
508 | if$
509 | nameptr #1 >
510 | { ", " swap$ * * }
511 | 'skip$
512 | if$
513 | nameptr #1 + 'nameptr :=
514 | namesleft #1 - 'namesleft :=
515 | }
516 | while$
517 | }
518 |
519 | FUNCTION {format.key}
520 | { empty$
521 | { key field.or.null }
522 | { "" }
523 | if$
524 | }
525 |
526 | FUNCTION {format.authors}
527 | { author empty$ not
528 | { author format.names }
529 | { "empty author in " cite$ * warning$
530 | ""
531 | }
532 | if$
533 | }
534 |
535 | FUNCTION {format.editors}
536 | { editor empty$
537 | { "" }
538 | { editor format.names }
539 | if$
540 | }
541 |
542 | FUNCTION {format.translators}
543 | { translator empty$
544 | { "" }
545 | { translator format.names
546 | entry.lang lang.zh =
547 | { translator num.names$ #3 >
548 | { "译" * }
549 | { ", 译" * }
550 | if$
551 | }
552 | 'skip$
553 | if$
554 | }
555 | if$
556 | }
557 |
558 | FUNCTION {format.full.names}
559 | {'s :=
560 | #1 'nameptr :=
561 | s num.names$ 'numnames :=
562 | numnames 'namesleft :=
563 | { namesleft #0 > }
564 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
565 | t get.str.lang 'name.lang :=
566 | name.lang lang.en =
567 | { t #1 "{vv~}{ll}" format.name$ 't := }
568 | { t #1 "{ll}{ff}" format.name$ 't := }
569 | if$
570 | nameptr #1 >
571 | {
572 | namesleft #1 >
573 | { ", " * t * }
574 | {
575 | numnames #2 >
576 | { "," * }
577 | 'skip$
578 | if$
579 | t "others" =
580 | { " et~al." * }
581 | { " and " * t * }
582 | if$
583 | }
584 | if$
585 | }
586 | 't
587 | if$
588 | nameptr #1 + 'nameptr :=
589 | namesleft #1 - 'namesleft :=
590 | }
591 | while$
592 | }
593 |
594 | FUNCTION {author.editor.full}
595 | { author empty$
596 | { editor empty$
597 | { "" }
598 | { editor format.full.names }
599 | if$
600 | }
601 | { author format.full.names }
602 | if$
603 | }
604 |
605 | FUNCTION {author.full}
606 | { author empty$
607 | { "" }
608 | { author format.full.names }
609 | if$
610 | }
611 |
612 | FUNCTION {editor.full}
613 | { editor empty$
614 | { "" }
615 | { editor format.full.names }
616 | if$
617 | }
618 |
619 | FUNCTION {make.full.names}
620 | { type$ "book" =
621 | type$ "inbook" =
622 | or
623 | 'author.editor.full
624 | { type$ "collection" =
625 | type$ "proceedings" =
626 | or
627 | 'editor.full
628 | 'author.full
629 | if$
630 | }
631 | if$
632 | }
633 |
634 | FUNCTION {output.bibitem}
635 | { newline$
636 | "\bibitem[" write$
637 | label ")" *
638 | make.full.names duplicate$ short.list =
639 | { pop$ }
640 | { * }
641 | if$
642 | 's :=
643 | s text.length$ 'charptr :=
644 | { charptr #0 > s charptr #1 substring$ "[" = not and }
645 | { charptr #1 - 'charptr := }
646 | while$
647 | charptr #0 >
648 | { "{" s * "}" * }
649 | { s }
650 | if$
651 | "]{" * write$
652 | cite$ write$
653 | "}" write$
654 | newline$
655 | ""
656 | before.all 'output.state :=
657 | }
658 |
659 | FUNCTION {change.sentence.case}
660 | { entry.lang lang.en =
661 | { "t" change.case$ }
662 | 'skip$
663 | if$
664 | }
665 |
666 | FUNCTION {add.link}
667 | { url empty$ not
668 | { "\href{" url * "}{" * swap$ * "}" * }
669 | { doi empty$ not
670 | { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
671 | 'skip$
672 | if$
673 | }
674 | if$
675 | }
676 |
677 | FUNCTION {format.title}
678 | { title empty$
679 | { "" }
680 | { title
681 | sentence.case.title
682 | 'change.sentence.case
683 | 'skip$
684 | if$
685 | entry.numbered number empty$ not and
686 | { bbl.colon * number * }
687 | 'skip$
688 | if$
689 | link.title
690 | 'add.link
691 | 'skip$
692 | if$
693 | }
694 | if$
695 | }
696 |
697 | FUNCTION {tie.or.space.connect}
698 | { duplicate$ text.length$ #3 <
699 | { "~" }
700 | { " " }
701 | if$
702 | swap$ * *
703 | }
704 |
705 | FUNCTION {either.or.check}
706 | { empty$
707 | 'pop$
708 | { "can't use both " swap$ * " fields in " * cite$ * warning$ }
709 | if$
710 | }
711 |
712 | FUNCTION {is.digit}
713 | { duplicate$ empty$
714 | { pop$ #0 }
715 | { chr.to.int$
716 | duplicate$ "0" chr.to.int$ <
717 | { pop$ #0 }
718 | { "9" chr.to.int$ >
719 | { #0 }
720 | { #1 }
721 | if$
722 | }
723 | if$
724 | }
725 | if$
726 | }
727 |
728 | FUNCTION {is.number}
729 | { 's :=
730 | s empty$
731 | { #0 }
732 | { s text.length$ 'charptr :=
733 | { charptr #0 >
734 | s charptr #1 substring$ is.digit
735 | and
736 | }
737 | { charptr #1 - 'charptr := }
738 | while$
739 | charptr not
740 | }
741 | if$
742 | }
743 |
744 | FUNCTION {format.volume}
745 | { volume empty$ not
746 | { volume is.number
747 | { entry.lang lang.zh =
748 | { "第 " volume * " 卷" * }
749 | { "volume" volume tie.or.space.connect }
750 | if$
751 | }
752 | { volume }
753 | if$
754 | }
755 | { "" }
756 | if$
757 | }
758 |
759 | FUNCTION {format.number}
760 | { number empty$ not
761 | { number is.number
762 | { entry.lang lang.zh =
763 | { "第 " number * " 册" * }
764 | { "number" number tie.or.space.connect }
765 | if$
766 | }
767 | { number }
768 | if$
769 | }
770 | { "" }
771 | if$
772 | }
773 |
774 | FUNCTION {format.volume.number}
775 | { volume empty$ not
776 | { format.volume }
777 | { format.number }
778 | if$
779 | }
780 |
781 | FUNCTION {format.title.vol.num}
782 | { title
783 | sentence.case.title
784 | 'change.sentence.case
785 | 'skip$
786 | if$
787 | entry.numbered
788 | { number empty$ not
789 | { bbl.colon * number * }
790 | 'skip$
791 | if$
792 | }
793 | { format.volume.number 's :=
794 | s empty$ not
795 | { bbl.colon * s * }
796 | 'skip$
797 | if$
798 | }
799 | if$
800 | }
801 |
802 | FUNCTION {format.series.vol.num.title}
803 | { format.volume.number 's :=
804 | series empty$ not
805 | { series
806 | sentence.case.title
807 | 'change.sentence.case
808 | 'skip$
809 | if$
810 | entry.numbered
811 | { bbl.wide.space * }
812 | { bbl.colon *
813 | s empty$ not
814 | { s * bbl.wide.space * }
815 | 'skip$
816 | if$
817 | }
818 | if$
819 | title *
820 | sentence.case.title
821 | 'change.sentence.case
822 | 'skip$
823 | if$
824 | entry.numbered number empty$ not and
825 | { bbl.colon * number * }
826 | 'skip$
827 | if$
828 | }
829 | { format.title.vol.num }
830 | if$
831 | link.title
832 | 'add.link
833 | 'skip$
834 | if$
835 | }
836 |
837 | FUNCTION {format.booktitle.vol.num}
838 | { booktitle
839 | entry.numbered
840 | 'skip$
841 | { format.volume.number 's :=
842 | s empty$ not
843 | { bbl.colon * s * }
844 | 'skip$
845 | if$
846 | }
847 | if$
848 | }
849 |
850 | FUNCTION {format.series.vol.num.booktitle}
851 | { format.volume.number 's :=
852 | series empty$ not
853 | { series bbl.colon *
854 | entry.numbered not s empty$ not and
855 | { s * bbl.wide.space * }
856 | 'skip$
857 | if$
858 | booktitle *
859 | }
860 | { format.booktitle.vol.num }
861 | if$
862 | in.booktitle
863 | { duplicate$ empty$ not entry.lang lang.en = and
864 | { "In: " swap$ * }
865 | 'skip$
866 | if$
867 | }
868 | 'skip$
869 | if$
870 | }
871 |
872 | FUNCTION {remove.period}
873 | { 't :=
874 | "" 's :=
875 | { t empty$ not }
876 | { t #1 #1 substring$ 'tmp.str :=
877 | tmp.str "." = not
878 | { s tmp.str * 's := }
879 | 'skip$
880 | if$
881 | t #2 global.max$ substring$ 't :=
882 | }
883 | while$
884 | s
885 | }
886 |
887 | FUNCTION {abbreviate}
888 | { remove.period
889 | 't :=
890 | t "l" change.case$ 's :=
891 | ""
892 | s "physical review letters" =
893 | { "Phys Rev Lett" }
894 | 'skip$
895 | if$
896 | 's :=
897 | s empty$
898 | { t }
899 | { pop$ s }
900 | if$
901 | }
902 |
903 | FUNCTION {format.journal}
904 | { journal empty$ not
905 | { journal
906 | abbreviate.journal
907 | 'abbreviate
908 | 'skip$
909 | if$
910 | italic.journal entry.lang lang.en = and
911 | 'italicize
912 | 'skip$
913 | if$
914 | }
915 | { "" }
916 | if$
917 | }
918 |
919 | FUNCTION {set.entry.mark}
920 | { entry.mark empty$ not
921 | 'pop$
922 | { mark empty$ not
923 | { pop$ mark 'entry.mark := }
924 | { 'entry.mark := }
925 | if$
926 | }
927 | if$
928 | }
929 |
930 | FUNCTION {format.mark}
931 | { show.mark
932 | { entry.mark
933 | show.medium.type
934 | { medium empty$ not
935 | { "/" * medium * }
936 | { entry.is.electronic
937 | { "/OL" * }
938 | 'skip$
939 | if$
940 | }
941 | if$
942 | }
943 | 'skip$
944 | if$
945 | 'entry.mark :=
946 | "\allowbreak[" entry.mark * "]" *
947 | }
948 | { "" }
949 | if$
950 | }
951 |
952 | FUNCTION {num.to.ordinal}
953 | { duplicate$ text.length$ 'charptr :=
954 | duplicate$ charptr #1 substring$ 's :=
955 | s "1" =
956 | { "st" * }
957 | { s "2" =
958 | { "nd" * }
959 | { s "3" =
960 | { "rd" * }
961 | { "th" * }
962 | if$
963 | }
964 | if$
965 | }
966 | if$
967 | }
968 |
969 | FUNCTION {format.edition}
970 | { edition empty$
971 | { "" }
972 | { edition is.number
973 | { entry.lang lang.zh =
974 | { edition " 版" * }
975 | { edition num.to.ordinal " ed." * }
976 | if$
977 | }
978 | { entry.lang lang.en =
979 | { edition change.sentence.case 's :=
980 | s "Revised" = s "Revised edition" = or
981 | { "Rev. ed." }
982 | { s " ed." *}
983 | if$
984 | }
985 | { edition }
986 | if$
987 | }
988 | if$
989 | }
990 | if$
991 | }
992 |
993 | FUNCTION {format.publisher}
994 | { publisher empty$ not
995 | { publisher }
996 | { school empty$ not
997 | { school }
998 | { organization empty$ not
999 | { organization }
1000 | { institution empty$ not
1001 | { institution }
1002 | { "" }
1003 | if$
1004 | }
1005 | if$
1006 | }
1007 | if$
1008 | }
1009 | if$
1010 | }
1011 |
1012 | FUNCTION {format.address.publisher}
1013 | { address empty$ not
1014 | { address
1015 | format.publisher empty$ not
1016 | { bbl.colon * format.publisher * }
1017 | { entry.is.electronic not show.missing.address.publisher and
1018 | { bbl.colon * bbl.sine.nomine * }
1019 | 'skip$
1020 | if$
1021 | }
1022 | if$
1023 | }
1024 | { entry.is.electronic not show.missing.address.publisher and
1025 | { format.publisher empty$ not
1026 | { bbl.sine.loco bbl.colon * format.publisher * }
1027 | { bbl.sine.loco.sine.nomine }
1028 | if$
1029 | }
1030 | { format.publisher empty$ not
1031 | { format.publisher }
1032 | { "" }
1033 | if$
1034 | }
1035 | if$
1036 | }
1037 | if$
1038 | }
1039 |
1040 | FUNCTION {extract.before.dash}
1041 | { duplicate$ empty$
1042 | { pop$ "" }
1043 | { 's :=
1044 | #1 'charptr :=
1045 | s text.length$ #1 + 'len :=
1046 | { charptr len <
1047 | s charptr #1 substring$ "-" = not
1048 | and
1049 | }
1050 | { charptr #1 + 'charptr := }
1051 | while$
1052 | s #1 charptr #1 - substring$
1053 | }
1054 | if$
1055 | }
1056 |
1057 | FUNCTION {extract.after.dash}
1058 | { duplicate$ empty$
1059 | { pop$ "" }
1060 | { 's :=
1061 | #1 'charptr :=
1062 | s text.length$ #1 + 'len :=
1063 | { charptr len <
1064 | s charptr #1 substring$ "-" = not
1065 | and
1066 | }
1067 | { charptr #1 + 'charptr := }
1068 | while$
1069 | { charptr len <
1070 | s charptr #1 substring$ "-" =
1071 | and
1072 | }
1073 | { charptr #1 + 'charptr := }
1074 | while$
1075 | s charptr global.max$ substring$
1076 | }
1077 | if$
1078 | }
1079 |
1080 | FUNCTION {contains.dash}
1081 | { duplicate$ empty$
1082 | { pop$ #0 }
1083 | { 's :=
1084 | { s empty$ not
1085 | s #1 #1 substring$ "-" = not
1086 | and
1087 | }
1088 | { s #2 global.max$ substring$ 's := }
1089 | while$
1090 | s empty$ not
1091 | }
1092 | if$
1093 | }
1094 |
1095 | FUNCTION {format.year}
1096 | { year empty$ not
1097 | { year extract.before.dash }
1098 | { date empty$ not
1099 | { date extract.before.dash }
1100 | { "empty year in " cite$ * warning$
1101 | urldate empty$ not
1102 | { "[" urldate extract.before.dash * "]" * }
1103 | { "" }
1104 | if$
1105 | }
1106 | if$
1107 | }
1108 | if$
1109 | extra.label *
1110 | }
1111 |
1112 | FUNCTION {format.date}
1113 | { type$ "patent" = type$ "newspaper" = or
1114 | date empty$ not and
1115 | { date }
1116 | { year }
1117 | if$
1118 | }
1119 |
1120 | FUNCTION {format.editdate}
1121 | { date empty$ not
1122 | { "\allowbreak(" date * ")" * }
1123 | { "" }
1124 | if$
1125 | }
1126 |
1127 | FUNCTION {format.urldate}
1128 | { urldate empty$ not entry.is.electronic and
1129 | { "\allowbreak[" urldate * "]" * }
1130 | { "" }
1131 | if$
1132 | }
1133 |
1134 | FUNCTION {hyphenate}
1135 | { 't :=
1136 | ""
1137 | { t empty$ not }
1138 | { t #1 #1 substring$ "-" =
1139 | { "-" *
1140 | { t #1 #1 substring$ "-" = }
1141 | { t #2 global.max$ substring$ 't := }
1142 | while$
1143 | }
1144 | { t #1 #1 substring$ *
1145 | t #2 global.max$ substring$ 't :=
1146 | }
1147 | if$
1148 | }
1149 | while$
1150 | }
1151 |
1152 | FUNCTION {format.pages}
1153 | { pages empty$
1154 | { "" }
1155 | { pages
1156 | only.start.page
1157 | 'extract.before.dash
1158 | 'hyphenate
1159 | if$
1160 | }
1161 | if$
1162 | }
1163 |
1164 | FUNCTION {format.journal.volume}
1165 | { volume empty$ not
1166 | { bold.journal.volume
1167 | { "\textbf{" volume * "}" * }
1168 | { volume }
1169 | if$
1170 | }
1171 | { "" }
1172 | if$
1173 | }
1174 |
1175 | FUNCTION {format.journal.number}
1176 | { number empty$ not
1177 | { "\penalty0 (" number * ")" * }
1178 | { "" }
1179 | if$
1180 | }
1181 |
1182 | FUNCTION {format.journal.pages}
1183 | { pages empty$
1184 | { "" }
1185 | { space.before.pages
1186 | { ": " }
1187 | { ":\penalty0 " }
1188 | if$
1189 | format.pages *
1190 | }
1191 | if$
1192 | }
1193 |
1194 | FUNCTION {format.periodical.year.volume.number}
1195 | { year empty$ not
1196 | { year extract.before.dash }
1197 | { "empty year in periodical " cite$ * warning$ }
1198 | if$
1199 | volume empty$ not
1200 | { ", " * volume extract.before.dash * }
1201 | 'skip$
1202 | if$
1203 | number empty$ not
1204 | { "\penalty0 (" * number extract.before.dash * ")" * }
1205 | 'skip$
1206 | if$
1207 | year contains.dash
1208 | { "--" *
1209 | year extract.after.dash empty$
1210 | volume extract.after.dash empty$ and
1211 | number extract.after.dash empty$ and not
1212 | { year extract.after.dash empty$ not
1213 | { year extract.after.dash * }
1214 | { year extract.before.dash * }
1215 | if$
1216 | volume empty$ not
1217 | { ", " * volume extract.after.dash * }
1218 | 'skip$
1219 | if$
1220 | number empty$ not
1221 | { "\penalty0 (" * number extract.after.dash * ")" * }
1222 | 'skip$
1223 | if$
1224 | }
1225 | 'skip$
1226 | if$
1227 | }
1228 | 'skip$
1229 | if$
1230 | }
1231 |
1232 | FUNCTION {check.url}
1233 | { url empty$ not
1234 | { "\url{" url * "}" * 'entry.url :=
1235 | #1 'entry.is.electronic :=
1236 | }
1237 | { howpublished empty$ not
1238 | { howpublished #1 #5 substring$ "\url{" =
1239 | { howpublished 'entry.url :=
1240 | #1 'entry.is.electronic :=
1241 | }
1242 | 'skip$
1243 | if$
1244 | }
1245 | { note empty$ not
1246 | { note #1 #5 substring$ "\url{" =
1247 | { note 'entry.url :=
1248 | #1 'entry.is.electronic :=
1249 | }
1250 | 'skip$
1251 | if$
1252 | }
1253 | 'skip$
1254 | if$
1255 | }
1256 | if$
1257 | }
1258 | if$
1259 | }
1260 |
1261 | FUNCTION {format.url}
1262 | { entry.url
1263 | }
1264 |
1265 | FUNCTION {output.url}
1266 | { entry.url empty$ not
1267 | { new.block
1268 | entry.url output
1269 | }
1270 | 'skip$
1271 | if$
1272 | }
1273 |
1274 | FUNCTION {check.doi}
1275 | { doi empty$ not
1276 | { #1 'entry.is.electronic := }
1277 | 'skip$
1278 | if$
1279 | }
1280 |
1281 | FUNCTION {is.in.url}
1282 | { 's :=
1283 | s empty$
1284 | { #1 }
1285 | { entry.url empty$
1286 | { #0 }
1287 | { s text.length$ 'len :=
1288 | entry.url text.length$ 'charptr :=
1289 | { entry.url charptr len substring$ s = not
1290 | charptr #0 >
1291 | and
1292 | }
1293 | { charptr #1 - 'charptr := }
1294 | while$
1295 | charptr
1296 | }
1297 | if$
1298 | }
1299 | if$
1300 | }
1301 |
1302 | FUNCTION {format.doi}
1303 | { ""
1304 | doi empty$ not
1305 | { "" 's :=
1306 | doi 't :=
1307 | #0 'numnames :=
1308 | { t empty$ not}
1309 | { t #1 #1 substring$ 'tmp.str :=
1310 | tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or
1311 | { t #2 #1 substring$ empty$
1312 | { s tmp.str * 's := }
1313 | 'skip$
1314 | if$
1315 | s empty$ s is.in.url or
1316 | 'skip$
1317 | { numnames #1 + 'numnames :=
1318 | numnames #1 >
1319 | { ", " * }
1320 | { "DOI: " * }
1321 | if$
1322 | "\doi{" s * "}" * *
1323 | }
1324 | if$
1325 | "" 's :=
1326 | }
1327 | { s tmp.str * 's := }
1328 | if$
1329 | t #2 global.max$ substring$ 't :=
1330 | }
1331 | while$
1332 | }
1333 | 'skip$
1334 | if$
1335 | }
1336 |
1337 | FUNCTION {output.doi}
1338 | { doi empty$ not show.doi and
1339 | show.english.translation entry.lang lang.zh = and not and
1340 | { new.block
1341 | format.doi output
1342 | }
1343 | 'skip$
1344 | if$
1345 | }
1346 |
1347 | FUNCTION {check.electronic}
1348 | { "" 'entry.url :=
1349 | #0 'entry.is.electronic :=
1350 | 'check.doi
1351 | 'skip$
1352 | if$
1353 | 'check.url
1354 | 'skip$
1355 | if$
1356 | medium empty$ not
1357 | { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or
1358 | { #1 'entry.is.electronic := }
1359 | 'skip$
1360 | if$
1361 | }
1362 | 'skip$
1363 | if$
1364 | }
1365 |
1366 | FUNCTION {format.note}
1367 | { note empty$ not show.note and
1368 | { note }
1369 | { "" }
1370 | if$
1371 | }
1372 |
1373 | FUNCTION {output.translation}
1374 | { show.english.translation entry.lang lang.zh = and
1375 | { translation empty$ not
1376 | { translation }
1377 | { "[English translation missing!]" }
1378 | if$
1379 | " (in Chinese)" * output
1380 | write$
1381 | format.doi duplicate$ empty$ not
1382 | { newline$
1383 | write$
1384 | }
1385 | 'pop$
1386 | if$
1387 | " \\" write$
1388 | newline$
1389 | "(" write$
1390 | ""
1391 | before.all 'output.state :=
1392 | }
1393 | 'skip$
1394 | if$
1395 | }
1396 |
1397 | FUNCTION {empty.misc.check}
1398 | { author empty$ title empty$
1399 | year empty$
1400 | and and
1401 | key empty$ not and
1402 | { "all relevant fields are empty in " cite$ * warning$ }
1403 | 'skip$
1404 | if$
1405 | }
1406 |
1407 | FUNCTION {monograph}
1408 | { output.bibitem
1409 | output.translation
1410 | author empty$ not
1411 | { format.authors }
1412 | { editor empty$ not
1413 | { format.editors }
1414 | { "empty author and editor in " cite$ * warning$
1415 | ""
1416 | }
1417 | if$
1418 | }
1419 | if$
1420 | output
1421 | new.block
1422 | format.series.vol.num.title "title" output.check
1423 | "M" set.entry.mark
1424 | format.mark "" output.after
1425 | new.block
1426 | format.translators output
1427 | new.sentence
1428 | format.edition output
1429 | new.block
1430 | format.address.publisher output
1431 | format.year "year" output.check
1432 | format.pages bbl.colon output.after
1433 | format.urldate "" output.after
1434 | output.url
1435 | output.doi
1436 | new.block
1437 | format.note output
1438 | fin.entry
1439 | }
1440 |
1441 | FUNCTION {incollection}
1442 | { output.bibitem
1443 | output.translation
1444 | format.authors output
1445 | author format.key output
1446 | new.block
1447 | format.title "title" output.check
1448 | "M" set.entry.mark
1449 | format.mark "" output.after
1450 | new.block
1451 | format.translators output
1452 | new.slash
1453 | format.editors output
1454 | new.block
1455 | format.series.vol.num.booktitle "booktitle" output.check
1456 | new.block
1457 | format.edition output
1458 | new.block
1459 | format.address.publisher output
1460 | format.year "year" output.check
1461 | format.pages bbl.colon output.after
1462 | format.urldate "" output.after
1463 | output.url
1464 | output.doi
1465 | new.block
1466 | format.note output
1467 | fin.entry
1468 | }
1469 |
1470 | FUNCTION {periodical}
1471 | { output.bibitem
1472 | output.translation
1473 | format.authors output
1474 | author format.key output
1475 | new.block
1476 | format.title "title" output.check
1477 | "J" set.entry.mark
1478 | format.mark "" output.after
1479 | new.block
1480 | format.periodical.year.volume.number output
1481 | new.block
1482 | format.address.publisher output
1483 | format.date "year" output.check
1484 | format.urldate "" output.after
1485 | output.url
1486 | output.doi
1487 | new.block
1488 | format.note output
1489 | fin.entry
1490 | }
1491 |
1492 | FUNCTION {article}
1493 | { output.bibitem
1494 | output.translation
1495 | format.authors output
1496 | author format.key output
1497 | new.block
1498 | title.in.journal
1499 | { format.title "title" output.check
1500 | "J" set.entry.mark
1501 | format.mark "" output.after
1502 | new.block
1503 | }
1504 | 'skip$
1505 | if$
1506 | format.journal "journal" output.check
1507 | format.date "year" output.check
1508 | format.journal.volume output
1509 | format.journal.number "" output.after
1510 | format.journal.pages "" output.after
1511 | format.urldate "" output.after
1512 | output.url
1513 | output.doi
1514 | new.block
1515 | format.note output
1516 | fin.entry
1517 | }
1518 |
1519 | FUNCTION {patent}
1520 | { output.bibitem
1521 | output.translation
1522 | format.authors output
1523 | author format.key output
1524 | new.block
1525 | format.title "title" output.check
1526 | "P" set.entry.mark
1527 | format.mark "" output.after
1528 | new.block
1529 | format.date "year" output.check
1530 | format.urldate "" output.after
1531 | output.url
1532 | output.doi
1533 | new.block
1534 | format.note output
1535 | fin.entry
1536 | }
1537 |
1538 | FUNCTION {electronic}
1539 | { #1 #1 check.electronic
1540 | #1 'entry.is.electronic :=
1541 | output.bibitem
1542 | output.translation
1543 | format.authors output
1544 | author format.key output
1545 | new.block
1546 | format.series.vol.num.title "title" output.check
1547 | "EB" set.entry.mark
1548 | format.mark "" output.after
1549 | new.block
1550 | format.address.publisher output
1551 | date empty$
1552 | { format.date output }
1553 | 'skip$
1554 | if$
1555 | format.pages bbl.colon output.after
1556 | format.editdate "" output.after
1557 | format.urldate "" output.after
1558 | output.url
1559 | output.doi
1560 | new.block
1561 | format.note output
1562 | fin.entry
1563 | }
1564 |
1565 | FUNCTION {misc}
1566 | { journal empty$ not
1567 | 'article
1568 | { booktitle empty$ not
1569 | 'incollection
1570 | { publisher empty$ not
1571 | 'monograph
1572 | { entry.is.electronic
1573 | 'electronic
1574 | { "Z" set.entry.mark
1575 | monograph
1576 | }
1577 | if$
1578 | }
1579 | if$
1580 | }
1581 | if$
1582 | }
1583 | if$
1584 | empty.misc.check
1585 | }
1586 |
1587 | FUNCTION {archive}
1588 | { "A" set.entry.mark
1589 | misc
1590 | }
1591 |
1592 | FUNCTION {book} { monograph }
1593 |
1594 | FUNCTION {booklet} { book }
1595 |
1596 | FUNCTION {collection}
1597 | { "G" set.entry.mark
1598 | monograph
1599 | }
1600 |
1601 | FUNCTION {database}
1602 | { "DB" set.entry.mark
1603 | electronic
1604 | }
1605 |
1606 | FUNCTION {dataset}
1607 | { "DS" set.entry.mark
1608 | electronic
1609 | }
1610 |
1611 | FUNCTION {inbook} { book }
1612 |
1613 | FUNCTION {inproceedings}
1614 | { "C" set.entry.mark
1615 | incollection
1616 | }
1617 |
1618 | FUNCTION {conference} { inproceedings }
1619 |
1620 | FUNCTION {map}
1621 | { "CM" set.entry.mark
1622 | misc
1623 | }
1624 |
1625 | FUNCTION {manual} { monograph }
1626 |
1627 | FUNCTION {mastersthesis}
1628 | { "D" set.entry.mark
1629 | monograph
1630 | }
1631 |
1632 | FUNCTION {newspaper}
1633 | { "N" set.entry.mark
1634 | article
1635 | }
1636 |
1637 | FUNCTION {online}
1638 | { "EB" set.entry.mark
1639 | electronic
1640 | }
1641 |
1642 | FUNCTION {phdthesis} { mastersthesis }
1643 |
1644 | FUNCTION {proceedings}
1645 | { "C" set.entry.mark
1646 | monograph
1647 | }
1648 |
1649 | FUNCTION {software}
1650 | { "CP" set.entry.mark
1651 | electronic
1652 | }
1653 |
1654 | FUNCTION {standard}
1655 | { "S" set.entry.mark
1656 | misc
1657 | }
1658 |
1659 | FUNCTION {techreport}
1660 | { "R" set.entry.mark
1661 | misc
1662 | }
1663 |
1664 | FUNCTION {unpublished}
1665 | { "Z" set.entry.mark
1666 | misc
1667 | }
1668 |
1669 | FUNCTION {default.type} { misc }
1670 |
1671 | MACRO {jan} {"January"}
1672 |
1673 | MACRO {feb} {"February"}
1674 |
1675 | MACRO {mar} {"March"}
1676 |
1677 | MACRO {apr} {"April"}
1678 |
1679 | MACRO {may} {"May"}
1680 |
1681 | MACRO {jun} {"June"}
1682 |
1683 | MACRO {jul} {"July"}
1684 |
1685 | MACRO {aug} {"August"}
1686 |
1687 | MACRO {sep} {"September"}
1688 |
1689 | MACRO {oct} {"October"}
1690 |
1691 | MACRO {nov} {"November"}
1692 |
1693 | MACRO {dec} {"December"}
1694 |
1695 | MACRO {acmcs} {"ACM Computing Surveys"}
1696 |
1697 | MACRO {acta} {"Acta Informatica"}
1698 |
1699 | MACRO {cacm} {"Communications of the ACM"}
1700 |
1701 | MACRO {ibmjrd} {"IBM Journal of Research and Development"}
1702 |
1703 | MACRO {ibmsj} {"IBM Systems Journal"}
1704 |
1705 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
1706 |
1707 | MACRO {ieeetc} {"IEEE Transactions on Computers"}
1708 |
1709 | MACRO {ieeetcad}
1710 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
1711 |
1712 | MACRO {ipl} {"Information Processing Letters"}
1713 |
1714 | MACRO {jacm} {"Journal of the ACM"}
1715 |
1716 | MACRO {jcss} {"Journal of Computer and System Sciences"}
1717 |
1718 | MACRO {scp} {"Science of Computer Programming"}
1719 |
1720 | MACRO {sicomp} {"SIAM Journal on Computing"}
1721 |
1722 | MACRO {tocs} {"ACM Transactions on Computer Systems"}
1723 |
1724 | MACRO {tods} {"ACM Transactions on Database Systems"}
1725 |
1726 | MACRO {tog} {"ACM Transactions on Graphics"}
1727 |
1728 | MACRO {toms} {"ACM Transactions on Mathematical Software"}
1729 |
1730 | MACRO {toois} {"ACM Transactions on Office Information Systems"}
1731 |
1732 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
1733 |
1734 | MACRO {tcs} {"Theoretical Computer Science"}
1735 |
1736 | FUNCTION {sortify}
1737 | { purify$
1738 | "l" change.case$
1739 | }
1740 |
1741 | FUNCTION {chop.word}
1742 | { 's :=
1743 | 'len :=
1744 | s #1 len substring$ =
1745 | { s len #1 + global.max$ substring$ }
1746 | 's
1747 | if$
1748 | }
1749 |
1750 | FUNCTION {format.lab.names}
1751 | { 's :=
1752 | s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
1753 | t get.str.lang 'name.lang :=
1754 | name.lang lang.en =
1755 | { t #1 "{vv~}{ll}" format.name$}
1756 | { t #1 "{ll}{ff}" format.name$}
1757 | if$
1758 | s num.names$ #1 >
1759 | { bbl.space * citation.et.al * }
1760 | 'skip$
1761 | if$
1762 | }
1763 |
1764 | FUNCTION {author.key.label}
1765 | { author empty$
1766 | { key empty$
1767 | { cite$ #1 #3 substring$ }
1768 | 'key
1769 | if$
1770 | }
1771 | { author format.lab.names }
1772 | if$
1773 | }
1774 |
1775 | FUNCTION {author.editor.key.label}
1776 | { author empty$
1777 | { editor empty$
1778 | { key empty$
1779 | { cite$ #1 #3 substring$ }
1780 | 'key
1781 | if$
1782 | }
1783 | { editor format.lab.names }
1784 | if$
1785 | }
1786 | { author format.lab.names }
1787 | if$
1788 | }
1789 |
1790 | FUNCTION {author.key.organization.label}
1791 | { author empty$
1792 | { key empty$
1793 | { organization empty$
1794 | { cite$ #1 #3 substring$ }
1795 | { "The " #4 organization chop.word #3 text.prefix$ }
1796 | if$
1797 | }
1798 | 'key
1799 | if$
1800 | }
1801 | { author format.lab.names }
1802 | if$
1803 | }
1804 |
1805 | FUNCTION {editor.key.organization.label}
1806 | { editor empty$
1807 | { key empty$
1808 | { organization empty$
1809 | { cite$ #1 #3 substring$ }
1810 | { "The " #4 organization chop.word #3 text.prefix$ }
1811 | if$
1812 | }
1813 | 'key
1814 | if$
1815 | }
1816 | { editor format.lab.names }
1817 | if$
1818 | }
1819 |
1820 | FUNCTION {calc.short.authors}
1821 | { type$ "book" =
1822 | type$ "inbook" =
1823 | or
1824 | 'author.editor.key.label
1825 | { type$ "collection" =
1826 | type$ "proceedings" =
1827 | or
1828 | { editor empty$ not
1829 | 'editor.key.organization.label
1830 | 'author.key.organization.label
1831 | if$
1832 | }
1833 | 'author.key.label
1834 | if$
1835 | }
1836 | if$
1837 | 'short.list :=
1838 | }
1839 |
1840 | FUNCTION {calc.label}
1841 | { calc.short.authors
1842 | short.list
1843 | "("
1844 | *
1845 | format.year duplicate$ empty$
1846 | short.list key field.or.null = or
1847 | { pop$ "" }
1848 | 'skip$
1849 | if$
1850 | *
1851 | 'label :=
1852 | }
1853 |
1854 | INTEGERS { seq.num }
1855 |
1856 | FUNCTION {init.seq}
1857 | { #0 'seq.num :=}
1858 |
1859 | FUNCTION {int.to.fix}
1860 | { "000000000" swap$ int.to.str$ *
1861 | #-1 #10 substring$
1862 | }
1863 |
1864 | FUNCTION {presort}
1865 | { set.entry.lang
1866 | set.entry.numbered
1867 | show.url show.doi check.electronic
1868 | calc.label
1869 | label sortify
1870 | " "
1871 | *
1872 | seq.num #1 + 'seq.num :=
1873 | seq.num int.to.fix
1874 | 'sort.label :=
1875 | sort.label *
1876 | #1 entry.max$ substring$
1877 | 'sort.key$ :=
1878 | }
1879 |
1880 | STRINGS { longest.label last.label next.extra }
1881 |
1882 | INTEGERS { longest.label.width last.extra.num number.label }
1883 |
1884 | FUNCTION {initialize.longest.label}
1885 | { "" 'longest.label :=
1886 | #0 int.to.chr$ 'last.label :=
1887 | "" 'next.extra :=
1888 | #0 'longest.label.width :=
1889 | #0 'last.extra.num :=
1890 | #0 'number.label :=
1891 | }
1892 |
1893 | FUNCTION {forward.pass}
1894 | { last.label label =
1895 | { last.extra.num #1 + 'last.extra.num :=
1896 | last.extra.num int.to.chr$ 'extra.label :=
1897 | }
1898 | { "a" chr.to.int$ 'last.extra.num :=
1899 | "" 'extra.label :=
1900 | label 'last.label :=
1901 | }
1902 | if$
1903 | number.label #1 + 'number.label :=
1904 | }
1905 |
1906 | FUNCTION {reverse.pass}
1907 | { next.extra "b" =
1908 | { "a" 'extra.label := }
1909 | 'skip$
1910 | if$
1911 | extra.label 'next.extra :=
1912 | extra.label
1913 | duplicate$ empty$
1914 | 'skip$
1915 | { "{\natexlab{" swap$ * "}}" * }
1916 | if$
1917 | 'extra.label :=
1918 | label extra.label * 'label :=
1919 | }
1920 |
1921 | FUNCTION {bib.sort.order}
1922 | { sort.label 'sort.key$ :=
1923 | }
1924 |
1925 | FUNCTION {begin.bib}
1926 | { preamble$ empty$
1927 | 'skip$
1928 | { preamble$ write$ newline$ }
1929 | if$
1930 | "\begin{thebibliography}{" number.label int.to.str$ * "}" *
1931 | write$ newline$
1932 | "\providecommand{\natexlab}[1]{#1}"
1933 | write$ newline$
1934 | "\providecommand{\url}[1]{#1}"
1935 | write$ newline$
1936 | "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
1937 | write$ newline$
1938 | " \urlstyle{same}\fi"
1939 | write$ newline$
1940 | show.doi
1941 | { "\expandafter\ifx\csname href\endcsname\relax"
1942 | write$ newline$
1943 | " \DeclareUrlCommand\doi{\urlstyle{rm}}\else"
1944 | write$ newline$
1945 | " \providecommand\doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}}\fi"
1946 | write$ newline$
1947 | }
1948 | 'skip$
1949 | if$
1950 | }
1951 |
1952 | FUNCTION {end.bib}
1953 | { newline$
1954 | "\end{thebibliography}" write$ newline$
1955 | }
1956 |
1957 | READ
1958 |
1959 | EXECUTE {init.state.consts}
1960 |
1961 | EXECUTE {load.config}
1962 |
1963 | EXECUTE {init.seq}
1964 |
1965 | ITERATE {presort}
1966 |
1967 | SORT
1968 |
1969 | EXECUTE {initialize.longest.label}
1970 |
1971 | ITERATE {forward.pass}
1972 |
1973 | REVERSE {reverse.pass}
1974 |
1975 | ITERATE {bib.sort.order}
1976 |
1977 | SORT
1978 |
1979 | EXECUTE {begin.bib}
1980 |
1981 | ITERATE {call.type$}
1982 |
1983 | EXECUTE {end.bib}
1984 |
--------------------------------------------------------------------------------
/gbt7714.sty:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `gbt7714.sty',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% gbt7714.dtx (with options: `package')
8 | %% -------------------------------------------------------------------
9 | %% GB/T 7714-2015 BibTeX Style
10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style
11 | %% Version: 2020/03/14 v2.0.1
12 | %% -------------------------------------------------------------------
13 | %% Copyright (C) 2016-2020 by Zeping Lee
14 | %% -------------------------------------------------------------------
15 | %% This file may be distributed and/or modified under the
16 | %% conditions of the LaTeX Project Public License, either version 1.3c
17 | %% of this license or (at your option) any later version.
18 | %% The latest version of this license is in
19 | %% https://www.latex-project.org/lppl.txt
20 | %% and version 1.3c or later is part of all distributions of LaTeX
21 | %% version 2005/12/01 or later.
22 | %% -------------------------------------------------------------------
23 | \NeedsTeXFormat{LaTeX2e}[1999/12/01]
24 | \ProvidesPackage{gbt7714}
25 | [2020/03/14 v2.0.1 GB/T 7714-2015 BibTeX Style]
26 | \newif\ifgbt@legacy@interface
27 | \newif\ifgbt@mmxv
28 | \newif\ifgbt@numerical
29 | \newif\ifgbt@super
30 | \newcommand\gbt@obselete@option[1]{%
31 | \PackageWarning{gbt7714}{The option "#1" is obselete}%
32 | }
33 | \DeclareOption{2015}{%
34 | \gbt@obselete@option{2015}%
35 | \gbt@legacy@interfacetrue
36 | \gbt@mmxvtrue
37 | }
38 | \DeclareOption{2005}{%
39 | \gbt@obselete@option{2005}%
40 | \gbt@legacy@interfacetrue
41 | \gbt@mmxvfalse
42 | }
43 | \DeclareOption{super}{%
44 | \gbt@obselete@option{super}%
45 | \gbt@legacy@interfacetrue
46 | \gbt@numericaltrue
47 | \gbt@supertrue
48 | }
49 | \DeclareOption{numbers}{%
50 | \gbt@obselete@option{numbers}%
51 | \gbt@legacy@interfacetrue
52 | \gbt@numericaltrue
53 | \gbt@superfalse
54 | }
55 | \DeclareOption{authoryear}{%
56 | \gbt@obselete@option{authoryear}%
57 | \gbt@legacy@interfacetrue
58 | \gbt@numericalfalse
59 | }
60 | \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{natbib}}
61 | \ProcessOptions\relax
62 | % \RequirePackage[compress]{natbib}
63 | \setcitestyle{compress}
64 | \RequirePackage{url}
65 | \renewcommand\newblock{\space}
66 | \newcommand\bibstyle@super{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}}
67 | \newcommand\bibstyle@numbers{\bibpunct{[}{]}{,}{n}{,}{,}}
68 | \newcommand\bibstyle@authoryear{\bibpunct{(}{)}{;}{a}{,}{,}}
69 | \newcommand\bibstyle@inline{\bibstyle@numbers}
70 | \@namedef{bibstyle@gbt7714-numerical}{\bibstyle@super}
71 | \@namedef{bibstyle@gbt7714-author-year}{\bibstyle@authoryear}
72 | \@namedef{bibstyle@gbt7714-2005-numerical}{\bibstyle@super}
73 | \@namedef{bibstyle@gbt7714-2005-author-year}{\bibstyle@authoryear}
74 | \def\NAT@citexnum[#1][#2]#3{%
75 | \NAT@reset@parser
76 | \NAT@sort@cites{#3}%
77 | \NAT@reset@citea
78 | \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty
79 | \@for\@citeb:=\NAT@cite@list\do
80 | {\@safe@activestrue
81 | \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
82 | \@safe@activesfalse
83 | \@ifundefined{b@\@citeb\@extra@b@citeb}{%
84 | {\reset@font\bfseries?}
85 | \NAT@citeundefined\PackageWarning{natbib}%
86 | {Citation `\@citeb' on page \thepage \space undefined}}%
87 | {\let\NAT@last@num\NAT@num\let\NAT@last@nm\NAT@nm
88 | \NAT@parse{\@citeb}%
89 | \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
90 | \let\NAT@name=\NAT@all@names
91 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
92 | \fi
93 | \ifNAT@full\let\NAT@nm\NAT@all@names\else
94 | \let\NAT@nm\NAT@name\fi
95 | \ifNAT@swa
96 | \@ifnum{\NAT@ctype>\@ne}{%
97 | \@citea
98 | \NAT@hyper@{\@ifnum{\NAT@ctype=\tw@}{\NAT@test{\NAT@ctype}}{\NAT@alias}}%
99 | }{%
100 | \@ifnum{\NAT@cmprs>\z@}{%
101 | \NAT@ifcat@num\NAT@num
102 | {\let\NAT@nm=\NAT@num}%
103 | {\def\NAT@nm{-2}}%
104 | \NAT@ifcat@num\NAT@last@num
105 | {\@tempcnta=\NAT@last@num\relax}%
106 | {\@tempcnta\m@ne}%
107 | \@ifnum{\NAT@nm=\@tempcnta}{%
108 | \@ifnum{\NAT@merge>\@ne}{}{\NAT@last@yr@mbox}%
109 | }{%
110 | \advance\@tempcnta by\@ne
111 | \@ifnum{\NAT@nm=\@tempcnta}{%
112 | % \ifx\NAT@last@yr\relax
113 | % \def@NAT@last@yr{\@citea}%
114 | % \else
115 | % \def@NAT@last@yr{--\NAT@penalty}%
116 | % \fi
117 | \def@NAT@last@yr{-\NAT@penalty}%
118 | }{%
119 | \NAT@last@yr@mbox
120 | }%
121 | }%
122 | }{%
123 | \@tempswatrue
124 | \@ifnum{\NAT@merge>\@ne}{\@ifnum{\NAT@last@num=\NAT@num\relax}{\@tempswafalse}{}}{}%
125 | \if@tempswa\NAT@citea@mbox\fi
126 | }%
127 | }%
128 | \NAT@def@citea
129 | \else
130 | \ifcase\NAT@ctype
131 | \ifx\NAT@last@nm\NAT@nm \NAT@yrsep\NAT@penalty\NAT@space\else
132 | \@citea \NAT@test{\@ne}\NAT@spacechar\NAT@mbox{\NAT@super@kern\NAT@@open}%
133 | \fi
134 | \if*#1*\else#1\NAT@spacechar\fi
135 | \NAT@mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}%
136 | \NAT@def@citea@box
137 | \or
138 | \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
139 | \or
140 | \NAT@hyper@citea@space{\NAT@test{\NAT@ctype}}%
141 | \or
142 | \NAT@hyper@citea@space\NAT@alias
143 | \fi
144 | \fi
145 | }%
146 | }%
147 | \@ifnum{\NAT@cmprs>\z@}{\NAT@last@yr}{}%
148 | \ifNAT@swa\else
149 | % \@ifnum{\NAT@ctype=\z@}{%
150 | % \if*#2*\else\NAT@cmt#2\fi
151 | % }{}%
152 | \NAT@mbox{\NAT@@close}%
153 | \@ifnum{\NAT@ctype=\z@}{%
154 | \if*#2*\else\textsuperscript{#2}\fi
155 | }{}%
156 | \fi
157 | }{#1}{#2}%
158 | }%
159 | \renewcommand\NAT@citesuper[3]{\ifNAT@swa
160 | \if*#2*\else#2\NAT@spacechar\fi
161 | \unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close\if*#3*\else#3\fi}%
162 | \else #1\fi\endgroup}
163 | \def\NAT@citex%
164 | [#1][#2]#3{%
165 | \NAT@reset@parser
166 | \NAT@sort@cites{#3}%
167 | \NAT@reset@citea
168 | \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty
169 | \@for\@citeb:=\NAT@cite@list\do
170 | {\@safe@activestrue
171 | \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
172 | \@safe@activesfalse
173 | \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea%
174 | {\reset@font\bfseries ?}\NAT@citeundefined
175 | \PackageWarning{natbib}%
176 | {Citation `\@citeb' on page \thepage \space undefined}\def\NAT@date{}}%
177 | {\let\NAT@last@nm=\NAT@nm\let\NAT@last@yr=\NAT@year
178 | \NAT@parse{\@citeb}%
179 | \ifNAT@longnames\@ifundefined{bv@\@citeb\@extra@b@citeb}{%
180 | \let\NAT@name=\NAT@all@names
181 | \global\@namedef{bv@\@citeb\@extra@b@citeb}{}}{}%
182 | \fi
183 | \ifNAT@full\let\NAT@nm\NAT@all@names\else
184 | \let\NAT@nm\NAT@name\fi
185 | \ifNAT@swa\ifcase\NAT@ctype
186 | \if\relax\NAT@date\relax
187 | \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}\NAT@date}%
188 | \else
189 | \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
190 | \ifx\NAT@last@yr\NAT@year
191 | \def\NAT@temp{{?}}%
192 | \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
193 | {Multiple citation on page \thepage: same authors and
194 | year\MessageBreak without distinguishing extra
195 | letter,\MessageBreak appears as question mark}\fi
196 | \NAT@hyper@{\NAT@exlab}%
197 | \else\unskip\NAT@spacechar
198 | \NAT@hyper@{\NAT@date}%
199 | \fi
200 | \else
201 | \@citea\NAT@hyper@{%
202 | \NAT@nmfmt{\NAT@nm}%
203 | \hyper@natlinkbreak{%
204 | \NAT@aysep\NAT@spacechar}{\@citeb\@extra@b@citeb
205 | }%
206 | \NAT@date
207 | }%
208 | \fi
209 | \fi
210 | \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
211 | \or\@citea\NAT@hyper@{\NAT@date}%
212 | \or\@citea\NAT@hyper@{\NAT@alias}%
213 | \fi \NAT@def@citea
214 | \else
215 | \ifcase\NAT@ctype
216 | \if\relax\NAT@date\relax
217 | \@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
218 | \else
219 | \ifx\NAT@last@nm\NAT@nm\NAT@yrsep
220 | \ifx\NAT@last@yr\NAT@year
221 | \def\NAT@temp{{?}}%
222 | \ifx\NAT@temp\NAT@exlab\PackageWarningNoLine{natbib}%
223 | {Multiple citation on page \thepage: same authors and
224 | year\MessageBreak without distinguishing extra
225 | letter,\MessageBreak appears as question mark}\fi
226 | \NAT@hyper@{\NAT@exlab}%
227 | \else
228 | \unskip\NAT@spacechar
229 | \NAT@hyper@{\NAT@date}%
230 | \fi
231 | \else
232 | \@citea\NAT@hyper@{%
233 | \NAT@nmfmt{\NAT@nm}%
234 | \hyper@natlinkbreak{\NAT@spacechar\NAT@@open\if*#1*\else#1\NAT@spacechar\fi}%
235 | {\@citeb\@extra@b@citeb}%
236 | \NAT@date
237 | }%
238 | \fi
239 | \fi
240 | \or\@citea\NAT@hyper@{\NAT@nmfmt{\NAT@nm}}%
241 | \or\@citea\NAT@hyper@{\NAT@date}%
242 | \or\@citea\NAT@hyper@{\NAT@alias}%
243 | \fi
244 | \if\relax\NAT@date\relax
245 | \NAT@def@citea
246 | \else
247 | \NAT@def@citea@close
248 | \fi
249 | \fi
250 | }}\ifNAT@swa\else
251 | % \if*#2*\else\NAT@cmt#2\fi
252 | \if\relax\NAT@date\relax\else\NAT@@close\fi
253 | \if*#2*\else\textsuperscript{#2}\fi
254 | \fi}{#1}{#2}}
255 | \renewcommand\NAT@cite%
256 | [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\NAT@spacechar\fi
257 | #1\NAT@@close\if*#3*\else\textsuperscript{#3}\fi\else#1\fi\endgroup}
258 | \renewcommand\@biblabel[1]{[#1]\hfill}
259 | \g@addto@macro\UrlBreaks{%
260 | \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9%
261 | \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L\do\M
262 | \do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z
263 | \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l\do\m
264 | \do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z
265 | }
266 | \Urlmuskip=0mu plus 0.1mu
267 | \newif\ifgbt@bib@style@written
268 | \@ifpackageloaded{chapterbib}{}{%
269 | \def\bibliography#1{%
270 | \ifgbt@bib@style@written\else
271 | \bibliographystyle{gbt7714-numerical}%
272 | \fi
273 | \if@filesw
274 | \immediate\write\@auxout{\string\bibdata{\zap@space#1 \@empty}}%
275 | \fi
276 | \@input@{\jobname.bbl}}
277 | \def\bibliographystyle#1{%
278 | \gbt@bib@style@writtentrue
279 | \ifx\@begindocumenthook\@undefined\else
280 | \expandafter\AtBeginDocument
281 | \fi
282 | {\if@filesw
283 | \immediate\write\@auxout{\string\bibstyle{#1}}%
284 | \fi}%
285 | }%
286 | }
287 | \ifgbt@legacy@interface
288 | \ifgbt@numerical
289 | \ifgbt@super\else
290 | \citestyle{numbers}
291 | \fi
292 | \bibliographystyle{gbt7714-numerical}
293 | \else
294 | \bibliographystyle{gbt7714-author-year}
295 | \fi
296 | \fi
297 |
--------------------------------------------------------------------------------
/msmake.bat:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/BHOSC/BUAAthesis/e969b76e9e4668e7e6a1ecd7cbc1c98d19b91342/msmake.bat
--------------------------------------------------------------------------------
/sample-bachelor.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \documentclass[bachelor,openany,oneside,color,AutoFakeBold=true]{buaathesis}
3 |
4 | % 参考文献
5 | \usepackage{gbt7714}
6 | % 参考文献输出方式,numerical为按照出现顺序,authoryear为按照作者姓名和年份
7 | \citestyle{numerical}
8 | % \citestyle{authoryear}
9 |
10 | \begin{document}
11 |
12 | % 用户信息
13 | \include{data/com_info}
14 | \include{data/bachelor/bachelor_info}
15 |
16 | % 任务书信息
17 | \include{data/bachelor/assign}
18 |
19 | % 页眉页脚样式
20 | \pagestyle{mainmatter}
21 | % 封面、任务书、声明
22 | \maketitle
23 | % 摘要
24 | \include{data/abstract}
25 | % 目录
26 | \tableofcontents
27 |
28 | % 正文页码样式
29 | \mainmatter
30 |
31 | % 正文
32 | \include{data/chapter1-intro}
33 | \include{data/chapter2-config}
34 | \include{data/chapter3-download}
35 | \include{data/chapter4-basic}
36 | \include{data/chapter5-usage}
37 | \include{data/chapter6-implement}
38 | \include{data/conclusion}
39 |
40 | % 致谢
41 | \include{data/bachelor/acknowledgement}
42 | % 参考文献
43 | \include{data/reference}
44 |
45 | % 附录
46 | \appendix
47 | \include{data/appendix1-faq}
48 | \include{data/appendix2-contactus}
49 | \end{document}
50 |
--------------------------------------------------------------------------------
/sample-kaitireport.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 |
3 | % 默认为本科生开题报告
4 | % 如需修改为硕士/博士开题报告,请将bachelor替换为master/doctor
5 | \documentclass[bachelor, ktreport, twoside, color]{buaathesis}
6 | % openany, oneside
7 | % 参考文献
8 | \usepackage{gbt7714}
9 | % 参考文献输出方式,numerical为按照出现顺序,authoryear为按照作者姓名和年份
10 | \citestyle{numerical}
11 | % \citestyle{authoryear}
12 |
13 | \begin{document}
14 |
15 | % 开题文件类型,如果为文献综述请自行更改
16 | \ktclass{开题报告}
17 |
18 | % 学院中英文名称
19 | \school{(学院名)}{(Name of School)}
20 |
21 | % 专业中英文名
22 | \major{(专业名)}{(Name of Major)}
23 |
24 | % 研究方向名称(仅研究生)
25 | \direction{(研究方向)}
26 |
27 | % 论文中英文标题(注意,无论是否有子标题,必须包含3个以上的大括号)
28 | \thesistitle{北京航空航天大学学位论文\LaTeX{}模板}{}{}
29 |
30 | % 学号
31 | \studentID{(学号)}
32 |
33 | % 作者中英文名
34 | \thesisauthor{(姓名)}{(Name)}
35 |
36 | % 导师中英文名
37 | \teacher{(导师姓名)}{(Name of Tutor)}
38 |
39 | % 毕设答辩时间
40 | \thesisdate{(年)}{(月)}
41 |
42 | % 页眉页脚样式
43 | \pagestyle{mainmatter}
44 |
45 | % 封面、任务书、声明
46 | \maketitle
47 |
48 | % 前言页眉页脚样式
49 | \pagestyle{frontmatter}
50 |
51 | % % 摘要,仅文献综述需要
52 | % \include{data/abstract}
53 |
54 | % 目录
55 | \tableofcontents
56 |
57 | % 正文页码样式
58 | \mainmatter
59 | % 正文页眉页脚样式
60 | \pagestyle{mainmatter}
61 |
62 | % 正文
63 | \include{data/chapter1-intro}
64 | \include{data/chapter2-config}
65 | \include{data/chapter3-download}
66 | \include{data/chapter4-basic}
67 | \include{data/chapter5-usage}
68 | \include{data/chapter6-implement}
69 | \include{data/conclusion}
70 |
71 | % 参考文献
72 | \include{data/reference}
73 |
74 | % 附录
75 | \appendix
76 | \include{data/appendix1-faq}
77 | \include{data/appendix2-contactus}
78 |
79 | \end{document}
80 |
--------------------------------------------------------------------------------
/sample-master.tex:
--------------------------------------------------------------------------------
1 | % !Mode:: "TeX:UTF-8"
2 | \documentclass[master,openright,twoside,color,AutoFakeBold=true]{buaathesis}
3 |
4 | % 参考文献
5 | \usepackage{gbt7714}
6 | % 参考文献输出方式,numerical为按照出现顺序,authoryear为按照作者姓名和年份
7 | \citestyle{numerical}
8 | % \citestyle{authoryear}
9 |
10 | \begin{document}
11 |
12 | % 用户信息
13 | \include{data/com_info}
14 | \include{data/master/master_info}
15 |
16 | % 中英封面、提名页、授权书
17 | \maketitle
18 | % 前言页眉页脚样式
19 | \pagestyle{frontmatter}
20 | % 摘要
21 | \include{data/abstract}
22 | % 目录、插图目录、表格目录
23 | \tableofcontents
24 | \listoffigures
25 | \listoftables
26 | % 符号表
27 | \include{data/master/denotation}
28 |
29 | % 正文页码样式
30 | \mainmatter
31 | % 正文页眉页脚样式
32 | \pagestyle{mainmatter}
33 |
34 | % 正文
35 | \include{data/chapter1-intro}
36 | \include{data/chapter2-config}
37 | \include{data/chapter3-download}
38 | \include{data/chapter4-basic}
39 | \include{data/chapter5-usage}
40 | \include{data/chapter6-implement}
41 | \include{data/conclusion}
42 |
43 | % 参考文献
44 | \include{data/reference}
45 |
46 | % 附录
47 | \appendix
48 | \include{data/appendix1-faq}
49 | \include{data/appendix2-contactus}
50 |
51 | % 附页标题样式
52 | \backmatter
53 |
54 | % 附页
55 | \include{data/master/back1-achievement}
56 | \include{data/master/back2-acknowledgement}
57 | \include{data/master/back3-aboutauthor}
58 | \end{document}
59 |
--------------------------------------------------------------------------------