├── .gitignore
├── Makefile
├── README.md
├── bstutf8.bst
├── data
├── abstract.tex
├── ack.tex
├── appendix01.tex
├── appendix02.tex
├── chap01.tex
├── chap02.tex
├── chap03.tex
├── denotation.tex
├── info.tex
└── resume.tex
├── figures
├── building.jpg
├── cat.jpg
├── don-hires.eps
├── logo.jpg
├── scnu.pdf
├── scnu.svg
├── struct.pdf
├── tikz.pdf
├── title.pdf
├── title.svg
└── typography.pdf
├── makepdf.bat
├── myscnu.sty
├── ref
└── refs.bib
├── scnuthesis.cls
├── scnuthesis.pdf
├── thesis.pdf
└── thesis.tex
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Core latex/pdflatex auxiliary files:
2 | *.aux
3 | *.lof
4 | *.log
5 | *.lot
6 | *.fls
7 | *.out
8 | *.toc
9 | *.fmt
10 | *.fot
11 | *.cb
12 | *.cb2
13 | .*.lb
14 |
15 | ## Intermediate documents:
16 | *.dvi
17 | *.xdv
18 | *-converted-to.*
19 | # these rules might exclude image files for figures etc.
20 | # *.ps
21 | # *.eps
22 | # *.pdf
23 |
24 | ## Generated if empty string is given at "Please type another file name for output:"
25 | .pdf
26 |
27 | ## Bibliography auxiliary files (bibtex/biblatex/biber):
28 | *.bbl
29 | *.bcf
30 | *.blg
31 | *-blx.aux
32 | *-blx.bib
33 | *.run.xml
34 |
35 | ## Build tool auxiliary files:
36 | *.fdb_latexmk
37 | *.synctex
38 | *.synctex(busy)
39 | *.synctex.gz
40 | *.synctex.gz(busy)
41 | *.pdfsync
42 |
43 | ## Auxiliary and intermediate files from other packages:
44 | # algorithms
45 | *.alg
46 | *.loa
47 |
48 | # achemso
49 | acs-*.bib
50 |
51 | # amsthm
52 | *.thm
53 |
54 | # beamer
55 | *.nav
56 | *.pre
57 | *.snm
58 | *.vrb
59 |
60 | # changes
61 | *.soc
62 |
63 | # cprotect
64 | *.cpt
65 |
66 | # elsarticle (documentclass of Elsevier journals)
67 | *.spl
68 |
69 | # endnotes
70 | *.ent
71 |
72 | # fixme
73 | *.lox
74 |
75 | # feynmf/feynmp
76 | *.mf
77 | *.mp
78 | *.t[1-9]
79 | *.t[1-9][0-9]
80 | *.tfm
81 |
82 | #(r)(e)ledmac/(r)(e)ledpar
83 | *.end
84 | *.?end
85 | *.[1-9]
86 | *.[1-9][0-9]
87 | *.[1-9][0-9][0-9]
88 | *.[1-9]R
89 | *.[1-9][0-9]R
90 | *.[1-9][0-9][0-9]R
91 | *.eledsec[1-9]
92 | *.eledsec[1-9]R
93 | *.eledsec[1-9][0-9]
94 | *.eledsec[1-9][0-9]R
95 | *.eledsec[1-9][0-9][0-9]
96 | *.eledsec[1-9][0-9][0-9]R
97 |
98 | # glossaries
99 | *.acn
100 | *.acr
101 | *.glg
102 | *.glo
103 | *.gls
104 | *.glsdefs
105 |
106 | # gnuplottex
107 | *-gnuplottex-*
108 |
109 | # gregoriotex
110 | *.gaux
111 | *.gtex
112 |
113 | # htlatex
114 | *.4ct
115 | *.4tc
116 | *.idv
117 | *.lg
118 | *.trc
119 | *.xref
120 |
121 | # hyperref
122 | *.brf
123 |
124 | # knitr
125 | *-concordance.tex
126 | # TODO Comment the next line if you want to keep your tikz graphics files
127 | *.tikz
128 | *-tikzDictionary
129 |
130 | # listings
131 | *.lol
132 |
133 | # makeidx
134 | *.idx
135 | *.ilg
136 | *.ind
137 | *.ist
138 |
139 | # minitoc
140 | *.maf
141 | *.mlf
142 | *.mlt
143 | *.mtc[0-9]*
144 | *.slf[0-9]*
145 | *.slt[0-9]*
146 | *.stc[0-9]*
147 |
148 | # minted
149 | _minted*
150 | *.pyg
151 |
152 | # morewrites
153 | *.mw
154 |
155 | # nomencl
156 | *.nlg
157 | *.nlo
158 | *.nls
159 |
160 | # pax
161 | *.pax
162 |
163 | # pdfpcnotes
164 | *.pdfpc
165 |
166 | # sagetex
167 | *.sagetex.sage
168 | *.sagetex.py
169 | *.sagetex.scmd
170 |
171 | # scrwfile
172 | *.wrt
173 |
174 | # sympy
175 | *.sout
176 | *.sympy
177 | sympy-plots-for-*.tex/
178 |
179 | # pdfcomment
180 | *.upa
181 | *.upb
182 |
183 | # pythontex
184 | *.pytxcode
185 | pythontex-files-*/
186 |
187 | # thmtools
188 | *.loe
189 |
190 | # TikZ & PGF
191 | *.dpth
192 | *.md5
193 | *.auxlock
194 |
195 | # todonotes
196 | *.tdo
197 |
198 | # easy-todo
199 | *.lod
200 |
201 | # xmpincl
202 | *.xmpi
203 |
204 | # xindy
205 | *.xdy
206 |
207 | # xypic precompiled matrices
208 | *.xyc
209 |
210 | # endfloat
211 | *.ttt
212 | *.fff
213 |
214 | # Latexian
215 | TSWLatexianTemp*
216 |
217 | ## Editors:
218 | # WinEdt
219 | *.bak
220 | *.sav
221 |
222 | # Texpad
223 | .texpadtmp
224 |
225 | # Kile
226 | *.backup
227 |
228 | # KBibTeX
229 | *~[0-9]*
230 |
231 | # auto folder when using emacs and auctex
232 | ./auto/*
233 | *.el
234 |
235 | # expex forward references with \gathertags
236 | *-tags.tex
237 |
238 | # standalone packages
239 | *.sta
240 |
241 | # generated if using elsarticle.cls
242 | *.spl
243 | code/
244 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | thesis: thesis.tex thesis.pdf
2 |
3 | zip:
4 | git archive master --format=zip > scnuthesis-`git describe master`-basic.zip
5 |
6 | view: thesis.pdf
7 | xdg-open thesis.pdf
8 |
9 | thesis.pdf: thesis.tex scnuthesis.cls data/*.tex
10 | xelatex thesis
11 | bibtex thesis
12 | bibtex thesis
13 | xelatex thesis
14 | xelatex thesis
15 |
16 | clean:
17 | rm -v *.aux *.log *.toc *.ind *.gls *.glo *.idx *.ilg *.out *.bbl *.thm *.blg *.lot *.lof *~
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | SCNUThesis
2 | =============
3 |
4 | 符合华南师范大学硕士/博士学位论文格式要求的 LaTeX 模板。
5 |
6 | > SCNUThesis 正在招募新的维护者,在这之前,此项目将不再维护。如果你有兴趣和精力,希望在毕业前为母校做点贡献,可以邮件跟原作者交流。
7 |
8 | * 原作者:[@wzpan](http://github.com/wzpan)
9 | * 维护者:招募中。
10 |
11 | ## 相关页面 ##
12 |
13 | :octocat: 项目主页: http://scnu.github.io/scnuthesis/
14 |
15 | :octocat: 输出示例: http://scnu.github.io/scnuthesis/thesis.html (请克隆后再修改,不要直接改源文件,避免泄漏你的研究成果)
16 |
17 |
在线编辑:https://www.overleaf.com/1576337499pzfnsnsmftnw
18 |
19 | :octocat: **本科版**: https://github.com/scnu/scnuthesis/tree/bachelor_degree
20 |
21 | ## Table of Contents ##
22 |
23 | * [简介](#简介)
24 | * [模板特色](#模板特色)
25 | * [版本历史](#版本历史)
26 | * [下载须知](#下载须知)
27 | * [安装使用](#安装使用)
28 | * [如何参与](#如何参与)
29 | * [成果展示](#成果展示)
30 | * [其他说明](#其他说明)
31 | * [特别感谢](#特别感谢)
32 |
33 | ## 简介
34 |
35 | 符合华南师范大学硕士/博士学位论文格式要求的 [LaTeX](https://github.com/scnu/scnuthesis/wiki/%E6%BC%AB%E8%B0%88-LaTeX) 模板。关于这个项目的发起原因,请下载这个[slides](http://code.google.com/p/scnuthesis/downloads/detail?name=scnuthesis.pdf&can=2&q=)。
36 |
37 | 这个项目遵循[The LaTeX project public license](http://latex-project.org/lppl/)。在使用过程中如果有任何意见、建议或者疑惑,欢迎联系维护者。你可以:
38 |
39 | * 在[issues](https://github.com/scnu/scnuthesis/issues)板块提交意见和建议(推荐);
40 | * 在[项目主页](http://scnu.github.io/scnuthesis/#comment)下方留言区留言;
41 | * 直接给维护者发邮件(不推荐);
42 | * 但在你联系维护者之前,建议先认真看看这份[F&Q](https://github.com/scnu/scnuthesis/wiki/F&Q)。
43 |
44 | **郑重声明**:这份模板由个人爱好者维护,并非学校提供的官方模板。如果因为使用这份模板蒙受了任何经济、学术上的损失,作者将不承担任何责任。
45 |
46 | ## 模板特色
47 |
48 | * 根据官方提供的华南师范大学学位论文格式要求进行开发,基本符合格式规范;
49 | * 使用xelatex来处理中文,配置简单,同时支持TTF和OTF两种字体方案;
50 | * 提供多个模板选项,用户在文档中只需修改一行内容,就可以指定不同的排版样式,包括硕士/博士论文封面、单面/双面排版、TTF/OTF字库选择、盲评/非盲评论文等;
51 | * 针对不同的用户群体分别提供 basic 版本和 pro 版本,前者只包含编译论文所需要的格式宏包(master 分支),而后者还包含了模板的源代码(pro 分支)。
52 |
53 | ## 版本历史 ##
54 |
55 | 详细的版本历史请查阅模板使用手册 scnuthesis.pdf 末尾的修改细节。
56 |
57 | ## 下载须知 ##
58 |
59 | * 对于普通用户,如果不需要定制本模板,请直接使用 master 分支,或者直接 [在线编辑](#在线编辑) 。
60 | * 对于有更多 LaTeX 经验的用户,如果需要更多的定制,可以使用 pro 分支,这个分支比 basic 版多了模板的相关驱动文件。
61 |
62 | ## 安装使用 ##
63 |
64 | ### 如果使用的是 Windows ###
65 |
66 | 1. 下载安装 MikTeX 或者 CTeX;
67 |
68 | 2. 使用 WinEdit 、TeXMaker 或其他文本编辑器打开 thesis.tex 文件。
69 |
70 | 3. 如果使用的是 Windows XP 或更早的 Windows 系列,请去掉第45行的vista选项,即将第45行内容改为:
71 |
72 | ```
73 | \documentclass[master,twoside,ttf,chapterhead]{scnuthesis}
74 | ```
75 |
76 | 如果使用的是 Windows Vista 或更高的版本,则不需要做任何改动。
77 |
78 | 4. 双击模板目录下的 makepdf.bat,生成示例论文。
79 |
80 | ### 如果使用的是 Linux ###
81 |
82 | 1. 安装 TexLive;
83 |
84 | 2. 配置字体:将 Windows 下的 simsun.ttf, simhei.ttf, simkai.ttf,simli,ttf,simfang.ttf 拷贝到 `~/.fonts` 目录下;
85 |
86 | 终端下输入
87 |
88 | ``` bash
89 | $ fc-cache
90 | ```
91 |
92 | 完成后输入
93 |
94 | ``` bash
95 | $ fc-list :lang=zh
96 | ```
97 |
98 | 观察列表中是否有宋体等 Windows字体。
99 |
100 | 3. 使用Emacs或其他文本编辑器打开thesis.tex文件。
101 |
102 | 4. 如果字体拷贝的来源是 Windows XP 或更早的 Windows 系列,请去掉第45行的vista选项,即将第45行内容改为:
103 |
104 | ```
105 | \documentclass[master,twoside,ttf,chapterhead]{scnuthesis}
106 | ```
107 |
108 | 如果来源是 Windows Vista 或更高的版本,则不需要做任何改动。
109 |
110 | 5. `cd` 进去模板目录,然后输入这条命令:
111 |
112 | ```
113 | $ make
114 | ```
115 |
116 | 将生成示例论文。
117 |
118 | ### 在线编辑 ###
119 |
120 | 1. 注册一个 [ShareLaTeX](https://www.sharelatex.com?r=76bc0f35&rm=d&rs=b) 账号;
121 | 2. 克隆 SCNUThesis 的[在线模板](https://www.sharelatex.com/project/53075d2d4164da985a003334?r=76bc0f35&rs=ps&rm=d);
122 | 3. 在网站左侧的文件资源管理器中找到 thesis.tex 并打开;
123 | 4. 点击页面右上方的 Recompile 按钮,将生成示例论文。
124 |
125 | 
126 |
127 | 注意:由于在线模板已经预先配好了字体方案,因此去掉了 vista、ttf 和 otf 字体相关的选项。
128 |
129 | ## 如何参与 ##
130 |
131 | 由于工作关系,[@wzpan](http://github.com/wzpan) 已经没有时间再维护 SCNUThesis。我们迫切希望得到更多 LaTeX 爱好者的支持,尤其是 _SCNUers_ 。如果要加入对 SCNUThesis 的贡献,你可以:
132 |
133 | 1. 到[官方 github 主页](http://github.com/scnu/scnuthesis/)上 fork 这个项目,做出你的修改,然后向 scnu 组织发送 pull request;
134 | 2. 给 [@wzpan](http://github.com/wzpan) 发送邮件,申请成为 scnu 组织的成员,你将具有 developer 的权限。
135 |
136 | ## 成果展示 ##
137 |
138 | 你也用了 SCNUThesis 吗?在[这个页面](https://github.com/scnu/scnuthesis/wiki/showcase)里加上你的成果,方便后面的人参考吧!
139 |
140 | ## 其他说明 ##
141 |
142 | 具体的使用方法请参考附带的thesis.pdf示例文件。
143 |
144 | **如果喜欢这份模板,请为这个项目加一颗星,谢谢!**
145 |
146 | ***Happy Texing!***
147 |
148 | ## 特别感谢 ##
149 |
150 | 这个模板的制作得到了很多高校的TEXer们的帮助,尤其是国防科大的 [NudtPaper](http://nudtpaper.googlecode.com) 和清华大学的 [Thu-Thesis](https://github.com/xueruini/thuthesis),在这里要特别谢谢他们的热心帮助!
151 |
--------------------------------------------------------------------------------
/bstutf8.bst:
--------------------------------------------------------------------------------
1 | %% BUPTThesis.bst
2 | %%
3 | %% 北京邮电大学研究生学位论文参考文献 BibTeX 样式
4 | %%
5 | %% 项目主页:http://code.google.com/p/buptthesis/
6 | %%
7 | %% 本样式基于 IEEEtran 和 ThuThesis 修改而成,基本满足北京邮电大学研究生论文格式要求
8 | %%
9 | %% 作者:
10 | %% 张煜 (email:dazzlezhang@gmail.com)
11 | %%
12 | %% 更新记录:
13 | %% $LastChangedBy$
14 | %% $LastChangedDate$
15 | %% $LastChangedRevision$
16 |
17 | %% 一些设置的缺省值
18 | % 英文姓名排版格式字符串, 按~<, Jr.>格式
19 | FUNCTION {default.name.format.string} {"{vv~}{ll}{~f}{, Jj}"}
20 |
21 | % 列出的最多作者数目, 即当作者数目超过下列数字时, 超出部分的作者姓名将略去
22 | FUNCTION {default.max.num.names.before.forced.et.al} { #3 }
23 |
24 | % 是否为盲审版本, #0 表示盲审将隐去作者信息, #1 表示非盲审
25 | FUNCTION {default.is.for.peer.review} { #0 }
26 | %%%%%%%%%%%%%%
27 | % 一些辅助函数
28 | %%%%%%%%%%%%%%
29 | % #0 不在终端显示开始/完成的提示信息
30 | % #1 显示提示信息
31 | FUNCTION {is.print.banners.to.terminal} {#1}
32 |
33 | %%%%%%%%%%%%%%%%
34 | % 版本与提示信息
35 | %%%%%%%%%%%%%%%%
36 | % 版本信息
37 | FUNCTION{bst.file.version} { "0.2" }
38 | FUNCTION{bst.file.date} { "2009/01/25" }
39 | FUNCTION{bst.file.website} {
40 | "http://code.google.com/p/buptthesis/" }
41 |
42 | % 开始提示信息
43 | FUNCTION {banner.message}{
44 | is.print.banners.to.terminal
45 | { "-- BUPTThesis.bst version" " " * bst.file.version *
46 | " (" * bst.file.date * ") " * "by Yu Zhang." *
47 | top$
48 | "-- " bst.file.website *
49 | top$
50 | "-- See the " quote$ * "userguide.pdf" * quote$ *
51 | " manual for usage information." *
52 | top$
53 | }
54 | { skip$ }
55 | if$
56 | }
57 |
58 | % 完成提示信息
59 | FUNCTION {completed.message} {
60 | is.print.banners.to.terminal
61 | { "" top$ "Done." top$ }
62 | { skip$ }
63 | if$
64 | }
65 |
66 | %%%%%%%%%%%%%%%%%%%
67 | %% 预定义的字符串宏
68 | %%%%%%%%%%%%%%%%%%%
69 | % 英文月份
70 | MACRO {jan} {"January"}
71 | MACRO {feb} {"February"}
72 | MACRO {mar} {"March"}
73 | MACRO {apr} {"April"}
74 | MACRO {may} {"May"}
75 | MACRO {jun} {"June"}
76 | MACRO {jul} {"July"}
77 | MACRO {aug} {"August"}
78 | MACRO {sep} {"September"}
79 | MACRO {oct} {"October"}
80 | MACRO {nov} {"November"}
81 | MACRO {dec} {"December"}
82 |
83 | %%%%%%%%%%%%
84 | %% 条目定义
85 | %%%%%%%%%%%%
86 | ENTRY { address % 地址
87 | assignee % 标准授权人
88 | author % 作者
89 | booktitle % 专著/论文集名
90 | chapter %
91 | day %
92 | dayfiled %
93 | edition % 版本
94 | editor % 编者
95 | howpublished % 出版形式
96 | esubtype % 电子文献子类
97 | institution %
98 | journal % 期刊
99 | key %
100 | language % 语言
101 | month % 月
102 | monthfiled %
103 | nationality %
104 | newsletter %
105 | note %
106 | number %
107 | number2 %
108 | organization %
109 | pages %
110 | publisher %
111 | refdate %
112 | update % 电子文档更新或修改日期
113 | school %
114 | series %
115 | title %
116 | translator %
117 | type %
118 | volume %
119 | volume2 %
120 | year %
121 | year2 %
122 | yearfiled %
123 | url % URL
124 | pubaddress % 出版地
125 | CTLname_format_string % 作者英文姓名排版格式
126 | CTLmax_names_forced_etal % 强制略去的最大作者数
127 | CTLauthor_name_english % 作者英文姓名
128 | CTLauthor_name_chinese % 作者中文姓名
129 | CTLfor_peer_review % 是否匿名
130 | }
131 | {}
132 | { label }
133 |
134 | %%%%%%%%%%%%%
135 | %% 字符串常量
136 | %%%%%%%%%%%%%
137 | % FUNCTION {bbl.anonymous} { language empty$ { "Anon" } { "佚名" } if$ }
138 | FUNCTION {bbl.anonymous} { "" }
139 | FUNCTION {bbl.etal} { language empty$ { "et~al" } { "等" } if$ }
140 | FUNCTION {bbl.sine.loco} { language empty$ { "S.~l." } { "出版地不详" } if$ }
141 | FUNCTION {bbl.sine.nomine} { language empty$ { "s.~n." } { "出版者不详" } if$ }
142 |
143 | FUNCTION {bbl.comma} { language empty$ { ", " } { "," } if$ }
144 | FUNCTION {bbl.colon} { language empty$ { ": " } { ":" } if$ }
145 | FUNCTION {bbl.period} { language empty$ { "." } { "." } if$ }
146 | FUNCTION {bbl.parallel} { "~//~" }
147 |
148 | FUNCTION {bbl.st} { "st" } % 序数词后缀
149 | FUNCTION {bbl.nd} { "nd" } % 序数词后缀
150 | FUNCTION {bbl.rd} { "rd" } % 序数词后缀
151 | FUNCTION {bbl.th} { "th" } % 序数词后缀
152 |
153 | FUNCTION {bbl.number} { "第" }
154 | FUNCTION {bbl.author} { "作者" }
155 |
156 | %%%%%%%%%%%%
157 | %% 整型变量
158 | %%%%%%%%%%%
159 | INTEGERS { output.state before.all mid.sentence after.title after.sentence url.sentence after.block before.pages }
160 | INTEGERS { number.label longest.label.width multiresult
161 | nameptr namesleft numnames lastnamecapitalized namelength charptr }
162 | INTEGERS { max.num.names.before.forced.et.al }
163 | INTEGERS { is.for.peer.review }
164 |
165 | %%%%%%%%%%%%%
166 | %% 字符串变量
167 | %%%%%%%%%%%%%
168 | STRINGS { s
169 | t
170 | longest.label
171 | thename
172 | name.emph.author.en % 强调现实的作者英文姓名
173 | name.emph.author.zh % 强调显示的作者中文姓名
174 | name.format.string % 姓名的格式字符串
175 | author.name.in.english % 作者英文姓名
176 | author.name.in.chinese % 作者中文姓名
177 | }
178 |
179 | %%%%%%%%%%%%%%%%%%%%%
180 | %% LaTeX 参考文献代码
181 | %%%%%%%%%%%%%%%%%%%%%
182 |
183 | % 输出 .bbl 文件开始
184 | FUNCTION {begin.bib} {
185 | "% Generated by BUPTThesis.bst, version: " bst.file.version *
186 | " (" * bst.file.date * ")" *
187 | write$ newline$ % 输出注释行,说明产生该bbl的bst及版本
188 |
189 | preamble$ empty$ % 输出前导
190 | 'skip$
191 | { preamble$ write$ newline$ }
192 | if$
193 |
194 | "\begin{thebibliography}{" longest.label * "}" *
195 | write$ newline$ % 输出 \begin{thebiliography}{x}
196 | }
197 |
198 | % 输出 .bbl 文件结束部分
199 | FUNCTION {end.bib} {
200 | newline$
201 | "\end{thebibliography}"
202 | write$ newline$
203 | }
204 |
205 | %%%%%%%%%%%%
206 | %% 底层函数
207 | %%%%%%%%%%%%
208 |
209 | % 控制变量初始化
210 | FUNCTION {initialize.controls} {
211 | default.name.format.string 'name.format.string :=
212 | default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al :=
213 | default.is.for.peer.review 'is.for.peer.review :=
214 | }
215 |
216 | % 初始化最长 label
217 | FUNCTION {initialize.longest.label} {
218 | "" 'longest.label :=
219 | #1 'number.label :=
220 | #0 'longest.label.width :=
221 | }
222 |
223 | % 最长 label pass
224 | FUNCTION {longest.label.pass}
225 | { number.label int.to.str$ 'label :=
226 | number.label #1 + 'number.label :=
227 | label width$ longest.label.width >
228 | { label 'longest.label :=
229 | label width$ 'longest.label.width :=
230 | }
231 | { skip$ }
232 | if$
233 | }
234 |
235 | % 逻辑非: 栈顶元素的逻辑非
236 | FUNCTION {not} {
237 | { #0 }
238 | { #1 }
239 | if$
240 | }
241 |
242 | % 逻辑与
243 | FUNCTION {and} {
244 | { skip$ }
245 | { pop$ #0 }
246 | if$
247 | }
248 |
249 | % 逻辑或
250 | FUNCTION {or} {
251 | { pop$ #1 }
252 | { skip$ }
253 | if$
254 | }
255 |
256 | % 返回 #1 : 栈顶字符是数字"0"~"9"
257 | % 返回 #0 : 其他
258 | FUNCTION {is.num} {
259 | chr.to.int$
260 | duplicate$ "0" chr.to.int$ < not
261 | swap$ "9" chr.to.int$ > not and
262 | }
263 |
264 | % 栈顶整数乘以10
265 | FUNCTION {bump.int.mag} {
266 | #0 'multiresult := % 初始化乘运算结果 y <- 0
267 | { duplicate$ #0 > } % 栈顶整数 x = 0 时才停止循环
268 | { #1 - % x <- x - 1
269 | multiresult #10 +
270 | 'multiresult := % y <- y + 10
271 | }
272 | while$
273 | pop$ % 释放 x
274 | multiresult % y 压栈返回
275 | }
276 |
277 | % 将栈顶字符("0"~"9")转换为整数(0~9)
278 | FUNCTION {char.to.integer} {
279 | duplicate$
280 | is.num
281 | { chr.to.int$ "0" chr.to.int$ - }
282 | { "noninteger character " quote$ * swap$ * quote$ *
283 | " in integer field of " * cite$ * warning$
284 | #0 % 如果栈定字符不是("0"~"9"), 给出警告返回 0
285 | }
286 | if$
287 | }
288 |
289 | % 将栈顶字符串转换为整数
290 | FUNCTION {string.to.integer} {
291 | duplicate$ text.length$ 'namesleft := % namesleft <- 字符串长度
292 | #1 'nameptr := % nameptr <- 1
293 | #0 'numnames := % numnames <- 0
294 | { nameptr namesleft > not } % while( ! ( nameptr > namesleft ) )
295 | { duplicate$ nameptr #1 substring$ % 取第 nameptr 个字符 x
296 | char.to.integer numnames bump.int.mag +
297 | 'numnames := % numnames <- chr2int( x ) + 10 * numnames
298 | nameptr #1 +
299 | 'nameptr := % nameptr <- nameptr + 1
300 | }
301 | while$
302 | pop$ % 释放栈顶元素
303 | numnames % numnames 压栈返回
304 | }
305 |
306 | % convert the strings "yes" or "no" to #1 or #0 respectively
307 | FUNCTION {yes.no.to.int}
308 | { "l" change.case$ duplicate$
309 | "yes" =
310 | { pop$ #1 }
311 | { duplicate$ "no" =
312 | { pop$ #0 }
313 | { "unknown boolean " quote$ * swap$ * quote$ *
314 | " in " * cite$ * warning$
315 | #0
316 | }
317 | if$
318 | }
319 | if$
320 | }
321 |
322 | % 初始化状态常量
323 | FUNCTION {initialize.status.constants}
324 | { #0 'before.all := % 起始
325 | #1 'mid.sentence := % 句中
326 | #2 'after.sentence := % 句末
327 | #3 'after.block := % 块后
328 | #4 'after.title := %
329 | #5 'before.pages := %
330 | }
331 |
332 | FUNCTION {remove.char}
333 | { 't :=
334 | 's :=
335 | ""
336 | { s empty$ not }
337 | { s #1 #1 substring$
338 | s #2 global.max$ substring$ 's :=
339 | duplicate$ t = 'pop$
340 | { * }
341 | if$
342 | }
343 | while$
344 | }
345 |
346 | STRINGS {z}
347 | FUNCTION {remove.period}
348 | { 'z :=
349 | ""
350 | { z empty$ not }
351 | { z #1 #1 substring$
352 | z #2 global.max$ substring$ 'z :=
353 | duplicate$ "." = 'pop$
354 | { * }
355 | if$
356 | }
357 | while$
358 | }
359 |
360 | FUNCTION {remove.dots} {
361 | duplicate$ "input=" swap$ * warning$
362 | "language=" language * warning$
363 | language empty$
364 | { "." remove.char
365 | duplicate$ "output('.')=" swap$ * warning$ }
366 | { "." remove.char
367 | duplicate$ "output('.')=" swap$ * warning$
368 | "." remove.char
369 | duplicate$ "output('.')=" swap$ * warning$ }
370 | if$
371 | }
372 |
373 | FUNCTION {bibinfo.check}
374 | { swap$
375 | duplicate$ missing$
376 | {
377 | pop$ pop$
378 | ""
379 | }
380 | { duplicate$ empty$
381 | {
382 | swap$ pop$
383 | }
384 | { swap$
385 | pop$
386 | }
387 | if$
388 | }
389 | if$
390 | }
391 |
392 | %%%%%%%%%%%%
393 | %% 调试例程
394 | %%%%%%%%%%%%
395 |
396 | % 默认调试输出函数
397 | FUNCTION {debug.output} {
398 | "[DEBUG] " swap$ * top$
399 | }
400 |
401 | % 状态调试输出函数
402 | FUNCTION {debug.output.status} {
403 | "---- output.state="
404 | output.state before.all =
405 | { "before.all" }
406 | { output.state mid.sentence =
407 | { "mid.sentence" }
408 | { output.state after.sentence =
409 | { "after.sentence" }
410 | { output.state url.sentence =
411 | { "url.sentence" }
412 | { output.state before.pages =
413 | { "before.pages" }
414 | { "after.block" }
415 | if$
416 | }
417 | if$
418 | }
419 | if$
420 | }
421 | if$
422 | }
423 | if$
424 | * debug.output
425 | }
426 |
427 | FUNCTION {output.year}
428 | { 't :=
429 | number empty$
430 | volume empty$
431 | and
432 | { add.period$ write$ }
433 | { ", " * write$ }
434 | if$
435 | t
436 | }
437 |
438 | % STRINGS {z}
439 | % FUNCTION {remove.dots}
440 | % { 'z :=
441 | % ""
442 | % { z empty$ not }
443 | % { z #1 #1 substring$
444 | % z #2 global.max$ substring$ 'z :=
445 | % duplicate$ bbl.period = 'pop$
446 | % { * }
447 | % if$
448 | % }
449 | % while$
450 | % %z
451 | % }
452 |
453 | % 对于中文文献, 用全角句点替换英文句点
454 | FUNCTION {replace.half.width.period} {
455 | % % DEBUG
456 | % duplicate$ "-- replace.half.width.period(" swap$ * ")" * debug.output
457 | % % END OF DEBUG
458 | language empty$
459 | { " " * } % 对于英文文献, 在句点后加一空格
460 | { duplicate$ text.length$ 'numnames := % numnames 等于字符串长度
461 | % % DEBUG
462 | % numnames int.to.str$ "---- text.length$=" swap$ * debug.output
463 | % % END OF DEBUG
464 | duplicate$ numnames #1 substring$ "." =
465 | { % % DEBUG
466 | % "---- Found '.' at the end" debug.output
467 | % % END OF DEBUG
468 | numnames #1 -
469 | #1 swap$ substring$
470 | bbl.period *
471 | }
472 | { skip$ }
473 | if$
474 | }
475 | if$
476 | % % DEBUG
477 | % duplicate$ "---- Return=" swap$ * debug.output
478 | % % END OF DEBUG
479 | }
480 |
481 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
482 | %% 输出例程: 输出栈顶项并根据需要添加标点符号
483 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
484 |
485 | % 非空项输出函数: 用于输出非空项
486 | FUNCTION {output.nonnull} {
487 | % % DEBUG
488 | % duplicate$ "output.nonnull(" swap$ * ")" * debug.output
489 | % debug.output.status
490 | % % END OF DEBUG
491 | swap$
492 | % 根据当前输出状态添加前置标点符号
493 | % before.all 起始, 不添加任何标点符号直接输出
494 | % mid.sentence 句中, 前置逗号输出
495 | % after.sentence 句末, 前置句号输出
496 | % after.block 块后, 前置句号, 后置 \newblock 输出
497 | % after.title
498 | output.state mid.sentence =
499 | { bbl.comma * write$ } % mid.sentence 前置逗号
500 | { output.state after.block =
501 | { add.period$ % 块后, 后置句号
502 | replace.half.width.period % 为中文文献替换句点
503 | write$
504 | newline$
505 | % "\newblock " write$
506 | } % 后置 \newblock 输出
507 | { output.state before.all =
508 | { write$ } % 起始, 不添加任何标点符号直接输出
509 | { output.state after.title =
510 | { bbl.parallel *
511 | write$ }
512 | { output.state before.pages =
513 | { bbl.colon *
514 | write$ }
515 | { add.period$ % 句末, 前置句号输出
516 | replace.half.width.period
517 | write$ } %
518 | if$
519 | }
520 | if$
521 | }
522 | if$
523 | }
524 | if$
525 | mid.sentence 'output.state :=
526 | }
527 | if$
528 | % s
529 | }
530 |
531 | % 无警告输出函数
532 | FUNCTION {output} {
533 | duplicate$ empty$
534 | { pop$ } % 若输出项为空, 则舍去空输出项
535 | { output.nonnull } % 否则调用非空输出函数
536 | if$
537 | }
538 |
539 | % 警告输出函数: 同 output, 但是对于空项给出警告提示
540 | FUNCTION {output.warn}
541 | { 't :=
542 | duplicate$ empty$
543 | { pop$ "empty " t * " in " * cite$ * warning$ }
544 | { output.nonnull }
545 | if$
546 | }
547 |
548 | % 将数字字符串转换成序数词形式字符串(例如: "7" -> "7th")
549 | FUNCTION {num.to.ordinal} {
550 | duplicate$ #-1 #1 substring$ "1" =
551 | { bbl.st * }
552 | { duplicate$ #-1 #1 substring$ "2" =
553 | { bbl.nd * }
554 | { duplicate$ #-1 #1 substring$ "3" =
555 | { bbl.rd * }
556 | { bbl.th * }
557 | if$
558 | }
559 | if$
560 | }
561 | if$
562 | }
563 |
564 | % 从字符串中提取前导数字的函数
565 | % 如果栈顶字符串以数字开头(例如: "11th"), 则将字符串用其数字部分(即,"11")
566 | % 替换. 否则, 保持原字符串不变. 用于版本转换函数(convert.edition)
567 | % s 保存提取出的数字, t 保存剩余待扫描的字符串.
568 | FUNCTION {extract.num} {
569 | duplicate$ 't := % t <- 输入字符串
570 | "" 's := % s <- ""
571 | { t empty$ not } % while( t != "" ) {
572 | { t #1 #1 substring$ % tmp <- t[0]
573 | t #2 global.max$ substring$
574 | 't := % t <- t[2:global.max$]
575 | duplicate$ is.num % if( is.num( tmp ) )
576 | { s swap$ * 's := } % s <- s & tmp
577 | { pop$ "" 't := } % else t <- ""
578 | if$ % }
579 | } %
580 | while$ % if( s == "" )
581 | s empty$ % ;
582 | 'skip$ % else
583 | { pop$ s } % return s
584 | if$ %
585 | }
586 |
587 | % 将1st~10th单词形式的序数词转换成阿拉伯数字形式
588 | FUNCTION {word.to.num} {
589 | duplicate$ "l" change.case$
590 | 's := % s <- lower( arg )
591 | s "first" = % if ( s == "first" )
592 | { pop$ "1" } % return "1"
593 | { skip$ }
594 | if$
595 | s "second" = % if ( s == "second" )
596 | { pop$ "2" } % return "2"
597 | { skip$ }
598 | if$
599 | s "third" =
600 | { pop$ "3" }
601 | { skip$ }
602 | if$
603 | s "fourth" =
604 | { pop$ "4" }
605 | { skip$ }
606 | if$
607 | s "fifth" =
608 | { pop$ "5" }
609 | { skip$ }
610 | if$
611 | s "sixth" =
612 | { pop$ "6" }
613 | { skip$ }
614 | if$
615 | s "seventh" =
616 | { pop$ "7" }
617 | { skip$ }
618 | if$
619 | s "eighth" =
620 | { pop$ "8" }
621 | { skip$ }
622 | if$
623 | s "ninth" =
624 | { pop$ "9" }
625 | { skip$ }
626 | if$
627 | s "tenth" =
628 | { pop$ "10" }
629 | { skip$ }
630 | if$
631 | }
632 |
633 | % 转换字符串形式的序数词为数字形式的序数词
634 | % 例如: 将 "Eleventh" 转换为 "11th"
635 | FUNCTION {convert.edition} {
636 | duplicate$ empty$ 'skip$
637 | { duplicate$ #1 #1 substring$
638 | is.num % if( is.num( arg[1] ) ) {
639 | { extract.num % tmp <- extract.num( arg )
640 | num.to.ordinal % tmp <- num.to.ordinal( tmp )
641 | } % } else {
642 | { word.to.num % tmp <- word.to.num( arg )
643 | duplicate$ #1 #1 substring$
644 | is.num % if( is.num( tmp[1] ) )
645 | { num.to.ordinal } % tmp <- num.to.ordinal( tmp )
646 | { "edition ordinal word "
647 | quote$ * edition * quote$ *
648 | " may be too high (or improper) for conversion" *
649 | " in " * cite$ * warning$ % else output warning
650 | }
651 | if$
652 | }
653 | if$
654 | }
655 | if$
656 | }
657 |
658 | FUNCTION {start.entry}
659 | { newline$
660 | "\bibitem{" write$
661 | cite$ write$
662 | "}" write$
663 | newline$
664 | ""
665 | before.all 'output.state :=
666 | }
667 |
668 | FUNCTION {fin.entry}
669 | { add.period$
670 | replace.half.width.period
671 | write$
672 | newline$
673 | }
674 |
675 | % FUNCTION {fin.entry}
676 | % { duplicate$ empty$
677 | % 'pop$
678 | % 'write$
679 | % if$
680 | % newline$
681 | % }
682 |
683 | FUNCTION {new.block}
684 | { output.state before.all =
685 | 'skip$
686 | { after.block 'output.state := }
687 | if$
688 | }
689 |
690 | FUNCTION {new.sentence}
691 | { output.state after.block =
692 | 'skip$
693 | { output.state before.all =
694 | 'skip$
695 | { after.sentence 'output.state := }
696 | if$
697 | }
698 | if$
699 | }
700 |
701 | FUNCTION {new.block.checka}
702 | { empty$
703 | 'skip$
704 | 'new.block
705 | if$
706 | }
707 |
708 | FUNCTION {new.block.checkb}
709 | { empty$
710 | swap$ empty$
711 | and
712 | 'skip$
713 | 'new.block
714 | if$
715 | }
716 |
717 | FUNCTION {new.sentence.checka}
718 | { empty$
719 | 'skip$
720 | 'new.sentence
721 | if$
722 | }
723 |
724 | FUNCTION {new.sentence.checkb}
725 | { empty$
726 | swap$ empty$
727 | and
728 | 'skip$
729 | 'new.sentence
730 | if$
731 | }
732 |
733 | FUNCTION {field.or.null}
734 | { duplicate$ empty$
735 | { pop$ "" }
736 | 'skip$
737 | if$
738 | }
739 |
740 | FUNCTION {emphasize}
741 | { duplicate$ empty$
742 | { pop$ "" }
743 | { "{\em " swap$ * "}" * }
744 | if$
745 | }
746 |
747 |
748 |
749 |
750 |
751 | FUNCTION {format.language}
752 | { language empty$
753 | 'skip$
754 | 'skip$
755 | if$
756 | }
757 | FUNCTION {is.space}
758 | { chr.to.int$
759 | duplicate$ #32 =
760 | { pop$ #1 }
761 | { pop$ #0 }
762 | if$
763 | }
764 | FUNCTION {is.lower.char}
765 | {
766 | chr.to.int$
767 | duplicate$ #96 >
768 | { #123 <
769 | { #1 }
770 | { #0 }
771 | if$
772 | }
773 | { pop$ #0 }
774 | if$
775 | }
776 |
777 | % 将last name转换为全大写
778 | FUNCTION {capitalize.last.name} {
779 | "u" change.case$
780 | }
781 | % FUNCTION {capitalize.last.name}
782 | % {
783 | % 'thename := % 输入参数 thename
784 | % thename text.length$
785 | % 'namelength := % namelength := thename 的长度
786 | % #1 'charptr :=
787 | % #0 'lastnamecapitalized :=
788 | % ""
789 |
790 | % { charptr #1 - namelength <
791 | % % % debug
792 | % % duplicate$ int.to.str$ "( charptr + #1 > namelength ) == " swap$ * warning$
793 | % % % eod
794 | % }
795 | % {
796 | % % % debug
797 | % % "charptr = " charptr int.to.str$ *
798 | % % ", lastnamecapitalized = " *
799 | % % lastnamecapitalized int.to.str$ * warning$
800 | % % % eod
801 | % lastnamecapitalized #1 =
802 | % { thename charptr namelength charptr - #1 + substring$ *
803 | % namelength #1 + 'charptr :=
804 | % % % debug
805 | % % duplicate$ "top of the stack = " swap$ * warning$
806 | % % % eod
807 | % }
808 | % { thename charptr #1 substring$
809 | % % % debug
810 | % % duplicate$ "the char = " swap$ * warning$
811 | % % % eod
812 | % duplicate$ is.lower.char
813 | % % % debug
814 | % % duplicate$ int.to.str$ "is.lower.char = " swap$ * warning$
815 | % % % eod
816 | % { "u" change.case$ * }
817 | % { duplicate$ is.space
818 | % % % debug
819 | % % duplicate$ int.to.str$ "is.space = " swap$ * warning$
820 | % % % eod
821 | % { #1 'lastnamecapitalized :=
822 | % *
823 | % }
824 | % { *
825 | % }
826 | % if$
827 | % }
828 | % if$
829 | % % % debug
830 | % % duplicate$ "top of the stack = " swap$ * warning$
831 | % % % eod
832 | % charptr #1 + 'charptr :=
833 | % }
834 | % if$
835 | % }
836 | % while$
837 | % }
838 | % 格式化盲审姓名
839 | FUNCTION {format.names.for.peer.review} {
840 | 's := % s := author域
841 | #1 'nameptr := % nameptr 是姓名指针,初始化为 1
842 | s num.names$ 'numnames := % 利用 num.names$ 获得 s 中的作者数量存入 nameptr
843 | numnames 'namesleft := % 未处理的姓名数 namesleft := numnames
844 | % 循环处理所有姓名
845 | { namesleft #0 > } % if namesleft > #0 (还有姓名没有格式化)
846 | { s nameptr % 选择第 nameptr 个姓名
847 | name.format.string % 按 name.format.string 的格式排版
848 | format.name$ % 调用 format.name$
849 | remove.period % 并删除缩写符号'.'
850 | 't := % 格式化后的姓名暂存于 t
851 | language empty$
852 | { author.name.in.english }% 如果是英文文献将 author.name.in.english 压栈
853 | { author.name.in.chinese } % 否则将 author.name.in.chinese 压栈
854 | if$
855 | t = % 用当前的姓名与栈上的姓名做比较
856 | { nameptr int.to.str$ % 将作者序号转化为字符串
857 | "\CJKnumber{" swap$ * "}" * % 使用中文数字
858 | bbl.number swap$ * bbl.author * % 加上``第''和``作者''
859 | % duplicate$ debug.output
860 | }
861 | { skip$ }
862 | if$
863 | nameptr #1 + 'nameptr := % 姓名指针加 1
864 | namesleft #1 - 'namesleft := % 剩余姓名数减 1
865 | }
866 | while$
867 | }
868 | % 格式化非盲审姓名
869 | FUNCTION {format.names.for.non.peer.review} {
870 | % 初始化
871 | 's := % s := author域
872 | #1 'nameptr := % nameptr 是姓名指针,初始化为 1
873 | s num.names$ 'numnames := % 利用 num.names$ 获得 s 中的作者数量存入 nameptr
874 | numnames 'namesleft := % 未处理的姓名数 namesleft := numnames
875 | % 循环处理所有姓名
876 | { namesleft #0 > } % if namesleft > #0 (还有姓名没有格式化)
877 | { s nameptr % 选择第 nameptr 个姓名
878 | name.format.string % 按 name.format.string 的格式排版
879 | format.name$ % 调用 format.name$
880 | % language empty$
881 | % { "u" change.case$ } % 如果不是语言为空, 做大写转换
882 | % { skip$ }
883 | % if$ %
884 | remove.period % 并删除缩写符号'.'
885 | 't := % 格式化后的姓名暂存于 t
886 | nameptr #1 >
887 | { nameptr max.num.names.before.forced.et.al #1 + =
888 | { "others" 't := % 如果当前作者的序数已经超出了最大列显作者数
889 | #1 'namesleft := } % 则置未处理姓名数为#1, 以便跳出循环
890 | { skip$ } % 如果作者序数在允许范围内, 则跳过
891 | if$ %
892 | bbl.comma * % 添加逗号
893 | namesleft #1 > % 若当前姓名不是最后一个
894 | { t * } % 显示当前姓名
895 | { t "others" = % 若当前姓名是最后一个且后面有略去的姓名
896 | { bbl.etal * } % 添加", et~al"或",等"
897 | { t * } % 如果没有略去姓名,以句点结束
898 | if$ %
899 | }
900 | if$ %
901 | }
902 | { t } % 如果是第一个作者, 直接将排版后的姓名压栈
903 | if$
904 | nameptr #1 + 'nameptr := % 姓名指针加 1
905 | namesleft #1 - 'namesleft := % 剩余姓名数减 1
906 | }
907 | while$
908 | }
909 | % 格式化姓名
910 | FUNCTION {format.names} {
911 | is.for.peer.review
912 | { format.names.for.peer.review } % 格式化盲审姓名
913 | { format.names.for.non.peer.review } % 格式化非盲审姓名
914 | if$
915 | }
916 | FUNCTION {format.authors}
917 | { author empty$
918 | { bbl.anonymous
919 | "The author in " cite$ * " is missing." * warning$ }
920 | { author format.names }
921 | if$
922 | }
923 |
924 | FUNCTION {format.editors}
925 | { editor empty$
926 | { bbl.anonymous
927 | "The editor in " cite$ * " is missing." * warning$
928 | }
929 | { editor format.names }
930 | if$
931 | }
932 |
933 | FUNCTION {format.assignees} {
934 | assignee empty$
935 | { "" }
936 | { assignee format.names }
937 | if$
938 | }
939 |
940 | % 译者格式
941 | FUNCTION {format.translators}
942 | { translator empty$
943 | { "" } % 无译者
944 | { new.block % 有译者
945 | translator format.names ",译" *
946 | }
947 | if$
948 | }
949 |
950 | % 机构格式
951 | FUNCTION {format.institution} {
952 | institution empty$
953 | { "" }
954 | { institution }
955 | if$
956 | }
957 |
958 | % 组织格式
959 | FUNCTION {format.organization} {
960 | organization empty$
961 | { "" }
962 | { organization }
963 | if$
964 | }
965 |
966 | % 文献类型标志代码/电子文献载体标志代码
967 | FUNCTION {bib.type.designator} {
968 | % % DEBUG
969 | % "bib.type.designator(type:" type$ * debug.output
970 | % " url: " url empty$ { "" }{ url } if$ * debug.output
971 | % % END OF DEBUG
972 |
973 | % 文献类型标志代码
974 | type$ "book" = type$ "inbook" = or
975 | { "M" }
976 | { type$ "standard" =
977 | { "S" }
978 | { type$ "proceedings" = type$ "conference" = or type$ "inproceedings" = or
979 | { "C" }
980 | { type$ "patent" =
981 | { "P" }
982 | { type$ "phdthesis" = type$ "mastersthesis" = or
983 | { "D" }
984 | { type$ "techreport" =
985 | { "R" }
986 | { type$ "article" = type$ "periodical" = or
987 | { "J" }
988 | { type$ "online" = type$ "webpage" = or type$ "www" = or
989 | { "EB" }
990 | { type$ "electronic" =
991 | { esubtype empty$
992 | { url empty$
993 | { "" }
994 | { "EB" }
995 | if$
996 | }
997 | { esubtype "webpage" =
998 | { "EB" }
999 | { esubtype "database" =
1000 | { "DB" }
1001 | { esubtype "program" =
1002 | { "CP" }
1003 | { "" }
1004 | if$ % electronics[program]
1005 | }
1006 | if$ % electronics[database]
1007 | }
1008 | if$ % electronics[webpage]
1009 | }
1010 | if$
1011 | }
1012 | { "" } % 其他
1013 | if$ % electronics
1014 | }
1015 | if$ % online/webpage/www
1016 | }
1017 | if$ % article/periodical
1018 | }
1019 | if$ % techreport
1020 | }
1021 | if$ % phdthesis/mastersthesis
1022 | }
1023 | if$ % patent
1024 | }
1025 | if$ % proceedings/inproceedings/conference
1026 | }
1027 | if$ % standard
1028 | }
1029 | if$ % book/inbook
1030 | % % DEBUG
1031 | % duplicate$ " doc.designator: " swap$ * debug.output
1032 | % % END OF DEBUG
1033 | % 电子文献载体标志代码
1034 | duplicate$ "" =
1035 | { skip$ }
1036 | { "~[" swap$ *
1037 | howpublished empty$
1038 | { url empty$
1039 | { "" }
1040 | { "/OL" }
1041 | if$
1042 | }
1043 | { howpublished "online" =
1044 | { "/OL" }
1045 | { howpublished "magtype" =
1046 | { "MT" }
1047 | { howpublished "disk" =
1048 | { "DK" }
1049 | { howpublished "cdrom" =
1050 | { "CD" }
1051 | { "" }
1052 | if$ % cdrom
1053 | }
1054 | if$ % disk
1055 | }
1056 | if$ % magitude type
1057 | }
1058 | if$ % online
1059 | }
1060 | if$
1061 | * "]" *
1062 | }
1063 | if$
1064 | }
1065 |
1066 | FUNCTION {format.title}
1067 | { title empty$
1068 | { "" }
1069 | { new.block
1070 | title }
1071 | if$
1072 | }
1073 |
1074 | % 格式化年月日``YYYY-MM-DD''
1075 | FUNCTION {format.year.month.day} {
1076 | year empty$
1077 | { "YYYY" }
1078 | { year }
1079 | if$
1080 | "-" *
1081 | month empty$
1082 | { "MM" * }
1083 | { month text.length$ #2 <
1084 | { "0" * }
1085 | { skip$ }
1086 | if$
1087 | month *
1088 | }
1089 | if$
1090 | "-" *
1091 | day empty$
1092 | { "DD" * }
1093 | { day text.length$ #2 <
1094 | { "0" * }
1095 | 'skip$
1096 | if$
1097 | day *
1098 | }
1099 | if$
1100 | }
1101 |
1102 | FUNCTION {format.reference.date} {
1103 | refdate empty$
1104 | { ""
1105 | url empty$
1106 | { skip$ }
1107 | { "The refdate in " cite$ * " is missing." * warning$ }
1108 | if$
1109 | }
1110 | { output.state mid.sentence =
1111 | { before.all 'output.state := }
1112 | { skip$ }
1113 | if$
1114 | "~[" refdate * "]" * }
1115 | if$
1116 | }
1117 |
1118 | % patent的题名项: 专利题名: 专利国别, 专利号~[文献类型标志]
1119 | FUNCTION {format.patent.title} {
1120 | title empty$ % 专利提名
1121 | { "" }
1122 | { new.block
1123 | title bbl.colon *
1124 | nationality empty$ % 专利国别, 专利号
1125 | { % 专利国别为必备项
1126 | "The nationality in " cite$ * " is missing." * warning$
1127 | }
1128 | { number empty$
1129 | { % 专利号为必选项
1130 | "The number in " cite$ * " is missing." * warning$
1131 | }
1132 | { % 产生``专利国别, 专利号''
1133 | nationality * bbl.comma * number *
1134 | }
1135 | if$
1136 | }
1137 | if$
1138 | % 文献类型标志
1139 | bib.type.designator *
1140 | }
1141 | if$
1142 | }
1143 |
1144 | % patent的出版项:
1145 | FUNCTION {format.patent.publication} {
1146 | new.block
1147 | format.year.month.day
1148 | % % DEBUG
1149 | % duplicate$ "End of format.patent.publication, top = " swap$ * debug.output
1150 | % % END OF DEBUG
1151 | url empty$
1152 | { skip$ }
1153 | { refdate empty$
1154 | { "The refdate in " cite$ * " is missing." * warning$ }
1155 | { "~[" * refdate * "]" * }
1156 | if$
1157 | }
1158 | if$
1159 | }
1160 |
1161 | % electronic的主要责任者:
1162 | % author 或 organization
1163 | FUNCTION {format.electronic.authors}
1164 | {
1165 | author empty$
1166 | { organization empty$
1167 | { " " }
1168 | { organization }
1169 | if$
1170 | }
1171 | { format.authors }
1172 | if$
1173 | }
1174 |
1175 | % electronic的出版项
1176 | FUNCTION {format.electronic.publication} {
1177 | new.block
1178 | % 出版地: 出版者
1179 | address empty$
1180 | { "" }
1181 | { address
1182 | publisher empty$
1183 | { skip$ }
1184 | { bbl.colon * publisher * }
1185 | if$
1186 | }
1187 | if$
1188 |
1189 | % 出版年
1190 | year empty$
1191 | { skip$ }
1192 | { publisher empty$
1193 | { "" }
1194 | { bbl.comma }
1195 | if$
1196 | * year * }
1197 | if$
1198 | }
1199 |
1200 | %% article的标题格式
1201 | FUNCTION {format.atitle}
1202 | { title empty$
1203 | { "" }
1204 | { title
1205 | newsletter empty$
1206 | { "~[J" * }
1207 | { newsletter "yes" =
1208 | { "~[N" * }
1209 | { "~[J" * }
1210 | if$
1211 | }
1212 | if$
1213 | url empty$
1214 | { "]" * }
1215 | { "/OL]" * }
1216 | if$
1217 | }
1218 | if$
1219 | }
1220 | %% incollection的标题格式
1221 | FUNCTION {format.ictitle}
1222 | { title empty$
1223 | { "" }
1224 | { title "~[M]~//~" *
1225 | editor format.names *
1226 | }
1227 | if$
1228 | }
1229 | %% inproceedings的标题格式
1230 | FUNCTION {format.iptitle}
1231 | { title empty$
1232 | { "" }
1233 | { title "~[C]~//~" *
1234 | editor format.names *
1235 | }
1236 | if$
1237 | }
1238 |
1239 | FUNCTION {n.dashify}
1240 | { 't :=
1241 | ""
1242 | { t empty$ not }
1243 | { t #1 #1 substring$ "-" =
1244 | { t #1 #2 substring$ "--" = not
1245 | { "--" *
1246 | t #2 global.max$ substring$ 't :=
1247 | }
1248 | { { t #1 #1 substring$ "-" = }
1249 | { "-" *
1250 | t #2 global.max$ substring$ 't :=
1251 | }
1252 | while$
1253 | }
1254 | if$
1255 | }
1256 | { t #1 #1 substring$ *
1257 | t #2 global.max$ substring$ 't :=
1258 | }
1259 | if$
1260 | }
1261 | while$
1262 | }
1263 |
1264 | % 年,卷(期)
1265 | FUNCTION {format.year.volume.number} {
1266 | year empty$
1267 | { "" }
1268 | { type$ "periodical" =
1269 | { new.block }
1270 | { mid.sentence 'output.state := }
1271 | if$
1272 | year
1273 | volume empty$
1274 | 'skip$
1275 | { bbl.comma * volume * }
1276 | if$
1277 | number empty$
1278 | 'skip$
1279 | { "~(" * number * ")" * }
1280 | if$
1281 | year2 empty$
1282 | { skip$ }
1283 | { "~--" *
1284 | year2 "now" =
1285 | { skip$ }
1286 | { year2 *
1287 | volume2 empty$
1288 | { skip$ }
1289 | { bbl.comma * volume2 * }
1290 | if$
1291 | number2 empty$
1292 | 'skip$
1293 | { "~(" * number2 * ")" * }
1294 | if$
1295 | }
1296 | if$
1297 | }
1298 | if$
1299 | }
1300 | if$
1301 | % %% DEBUG
1302 | % duplicate$ "format.year.volume.number=" swap$ * debug.output
1303 | % %% END OF DEBUG
1304 | }
1305 |
1306 | %
1307 | FUNCTION {format.date}
1308 | { year empty$
1309 | { month empty$
1310 | { "" }
1311 | { "there's a month but no year in " cite$ * warning$
1312 | month
1313 | }
1314 | if$
1315 | }
1316 | { month empty$
1317 | { year }
1318 | { month bbl.comma * year * }
1319 | if$
1320 | }
1321 | if$
1322 | }
1323 | function {format.year.year}
1324 | { year empty$
1325 | 'skip$
1326 | { year "--" *
1327 | year2 empty$
1328 | 'skip$
1329 | { year2 "now" =
1330 | 'skip$
1331 | { year2 * }
1332 | if$
1333 | }
1334 | if$
1335 | }
1336 | if$
1337 | }
1338 |
1339 | % 专著标题格式
1340 | FUNCTION {format.book.title} {
1341 | new.block % 生成一个新的block
1342 | title
1343 | type$ "proceedings" =
1344 | { address empty$
1345 | { skip$ }
1346 | { bbl.comma * address * bbl.comma *
1347 | month empty$
1348 | { skip$ }
1349 | { month * }
1350 | if$
1351 | year empty$
1352 | { skip$ }
1353 | { year * }
1354 | if$
1355 | }
1356 | if$
1357 | }
1358 | { skip$ }
1359 | if$
1360 | bib.type.designator * % 标题 + [文献标志代码/电子文献载体标志代码]
1361 | }
1362 |
1363 | % 科技报告标题格式
1364 | FUNCTION {format.techreport.title} {
1365 | title empty$
1366 | { "" }
1367 | { new.block % 生成一个新的block
1368 | title % 标题 +
1369 | number empty$ % 编号 +
1370 | { "" }
1371 | { bbl.comma * number }
1372 | if$ *
1373 | bib.type.designator * % [文献标志代码/电子文献载体标志代码]
1374 | }
1375 | if$
1376 | }
1377 |
1378 | % 连续出版物标题格式
1379 | FUNCTION {format.jtitle}
1380 | { title "~[J" *
1381 | url empty$
1382 | { "]" * }
1383 | { "/OL]" * }
1384 | if$
1385 | }
1386 |
1387 | % 论文集标题格式
1388 | FUNCTION {format.ptitle.volume}
1389 | { title
1390 | volume empty$
1391 | { "~[C]" }
1392 | { bbl.colon volume * "~[C]" * }
1393 | if$ *
1394 | %emphasize
1395 | }
1396 | FUNCTION {tie.or.space.connect}
1397 | { duplicate$ text.length$ #3 <
1398 | { "~" }
1399 | { " " }
1400 | if$
1401 | swap$ * *
1402 | }
1403 |
1404 | FUNCTION {either.or.check}
1405 | { empty$
1406 | 'pop$
1407 | { "can't use both " swap$ * " fields in " * cite$ * warning$ }
1408 | if$
1409 | }
1410 |
1411 | FUNCTION {format.bvolume}
1412 | { volume empty$
1413 | { "" }
1414 | { language empty$
1415 | { "volume" volume tie.or.space.connect }
1416 | { volume }
1417 | if$
1418 | series empty$
1419 | 'skip$
1420 | { " of " * series emphasize * }
1421 | if$
1422 | "volume and number" number either.or.check
1423 | }
1424 | if$
1425 | }
1426 |
1427 | FUNCTION {format.number.series}
1428 | { volume empty$
1429 | { number empty$
1430 | { series field.or.null }
1431 | { output.state mid.sentence =
1432 | { "number" }
1433 | { "Number" }
1434 | if$
1435 | number tie.or.space.connect
1436 | series empty$
1437 | { "there's a number but no series in " cite$ * warning$ }
1438 | { " in " * series * }
1439 | if$
1440 | }
1441 | if$
1442 | }
1443 | { "" }
1444 | if$
1445 | }
1446 |
1447 | % 版本项格式
1448 | FUNCTION {format.edition} {
1449 | edition empty$
1450 | { "" }
1451 | { new.block % 版本项按一个block输出
1452 | language empty$ % 英文文献版本号自动转换成数字形式的序数词
1453 | { edition convert.edition
1454 | "l" change.case$ " ed" *
1455 | }
1456 | { edition } % 中文文献版本号直接输出
1457 | if$
1458 | }
1459 | if$
1460 | }
1461 |
1462 |
1463 | FUNCTION {format.url}
1464 | { url empty$
1465 | { "" }
1466 | { new.block
1467 | "\url{" url * "}" *
1468 | }
1469 | if$
1470 | }
1471 |
1472 | FUNCTION {multi.page.check}
1473 | { 't :=
1474 | #0 'multiresult :=
1475 | { multiresult not
1476 | t empty$ not
1477 | and
1478 | }
1479 | { t #1 #1 substring$
1480 | duplicate$ "-" =
1481 | swap$ duplicate$ "," =
1482 | swap$ "+" =
1483 | or or
1484 | { #1 'multiresult := }
1485 | { t #2 global.max$ substring$ 't := }
1486 | if$
1487 | }
1488 | while$
1489 | multiresult
1490 | }
1491 |
1492 | FUNCTION {format.pages}
1493 | { pages empty$
1494 | { "" }
1495 | { before.pages 'output.state :=
1496 | pages multi.page.check
1497 | { "" pages n.dashify tie.or.space.connect }
1498 | { "" pages tie.or.space.connect }
1499 | if$
1500 | }
1501 | if$
1502 | }
1503 |
1504 | FUNCTION {format.vol.num.pages}
1505 | { volume field.or.null
1506 | number empty$
1507 | 'skip$
1508 | { "(" number * ")" * *
1509 | volume empty$
1510 | { newsletter empty$
1511 | { "there's a number but no volume in " cite$ * warning$ }
1512 | 'skip$
1513 | if$
1514 | }
1515 | 'skip$
1516 | if$
1517 | }
1518 | if$
1519 | pages empty$
1520 | 'skip$
1521 | { duplicate$ empty$
1522 | { pop$ format.pages }
1523 | { bbl.colon * pages n.dashify * }
1524 | if$
1525 | }
1526 | if$
1527 | % duplicate$ "top of stack = " swap$ * warning$
1528 | url empty$
1529 | 'skip$
1530 | { refdate empty$
1531 | { "there's an url but no refdate in " cite$ * warning$ }
1532 | { %duplicate$ "url and refdate is not empty, top of stack = " swap$ * warning$
1533 | "~[" * refdate * "]" *
1534 | }
1535 | if$
1536 | %duplicate$ "top of stack = " swap$ * warning$
1537 | }
1538 | if$
1539 | }
1540 |
1541 | FUNCTION {format.chapter.pages}
1542 | { chapter empty$
1543 | { "" }
1544 | { type empty$
1545 | { "chapter" }
1546 | { type "l" change.case$ }
1547 | if$
1548 | chapter tie.or.space.connect
1549 | pages empty$
1550 | 'skip$
1551 | { ", " * format.pages * }
1552 | if$
1553 | }
1554 | if$
1555 | }
1556 |
1557 | FUNCTION {format.in.booktitle}
1558 | { booktitle empty$
1559 | { "" }
1560 | { editor empty$
1561 | { language empty$
1562 | { " " booktitle * }
1563 | % { "Proceedings of " booktitle * }
1564 | { " " booktitle * }
1565 | if$
1566 | }
1567 | { language empty$
1568 | % { "In: " format.editors * ", Proceedings of " * booktitle * }
1569 | { " " booktitle * }
1570 | { " " booktitle * }
1571 | if$
1572 | }
1573 | if$
1574 | }
1575 | if$
1576 | }
1577 |
1578 | FUNCTION {format.in.ed.booktitle.volume}
1579 | { booktitle empty$
1580 | { "" }
1581 | { editor empty$
1582 | { language empty$
1583 | % { "Proceedings of " booktitle * }
1584 | { " " booktitle * }
1585 | { " " booktitle * }
1586 | if$
1587 | }
1588 | { language empty$
1589 | %{ "In: " format.editors * ", Proceedings of " * booktitle * }
1590 | { " " booktitle * }
1591 | { " " booktitle * }
1592 | if$
1593 | }
1594 | if$
1595 | %% volume
1596 | volume empty$
1597 | 'skip$
1598 | { language empty$
1599 | { "Vol." * volume * }
1600 | { ":第" * volume * "卷" * }
1601 | if$
1602 | }
1603 | if$
1604 | }
1605 | if$
1606 | }
1607 |
1608 | FUNCTION {empty.misc.check}
1609 | { author empty$ title empty$ howpublished empty$
1610 | month empty$ year empty$ note empty$
1611 | and and and and and
1612 | { "all relevant fields are empty in " cite$ * warning$ }
1613 | 'skip$
1614 | if$
1615 | }
1616 |
1617 | FUNCTION {format.thesis.type}
1618 | { type empty$
1619 | 'skip$
1620 | { pop$
1621 | type "t" change.case$
1622 | }
1623 | if$
1624 | }
1625 |
1626 | FUNCTION {format.tr.number}
1627 | { type empty$
1628 | { "Technical Report" }
1629 | 'type
1630 | if$
1631 | number empty$
1632 | { "t" change.case$ }
1633 | { number tie.or.space.connect }
1634 | if$
1635 | }
1636 |
1637 | FUNCTION {format.article.crossref}
1638 | { key empty$
1639 | { journal empty$
1640 | { "need key or journal for " cite$ * " to crossref " * crossref *
1641 | warning$
1642 | ""
1643 | }
1644 | { "In {\em " journal * "\/}" * }
1645 | if$
1646 | }
1647 | { "In " key * }
1648 | if$
1649 | " \cite{" * crossref * "}" *
1650 | }
1651 |
1652 | FUNCTION {format.crossref.editor}
1653 | { editor #1 "{ll }{f{~}}" format.name$
1654 | editor num.names$ duplicate$
1655 | #2 >
1656 | { pop$ " et~al." * }
1657 | { #2 <
1658 | 'skip$
1659 | { editor #2 "{ll }{f{~}}" format.name$ "others" =
1660 | { " et~al." * }
1661 | { " and " * editor #2 "{ll }{f{~}}" format.name$ * }
1662 | if$
1663 | }
1664 | if$
1665 | }
1666 | if$
1667 | }
1668 |
1669 | FUNCTION {format.book.crossref}
1670 | { volume empty$
1671 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$
1672 | "In "
1673 | }
1674 | { "Volume" volume tie.or.space.connect
1675 | " of " *
1676 | }
1677 | if$
1678 | editor empty$
1679 | editor field.or.null author field.or.null =
1680 | or
1681 | { key empty$
1682 | { series empty$
1683 | { "need editor, key, or series for " cite$ * " to crossref " *
1684 | crossref * warning$
1685 | "" *
1686 | }
1687 | { "{\em " * series * "\/}" * }
1688 | if$
1689 | }
1690 | { key * }
1691 | if$
1692 | }
1693 | { format.crossref.editor * }
1694 | if$
1695 | " \cite{" * crossref * "}" *
1696 | }
1697 |
1698 | FUNCTION {format.incoll.inproc.crossref}
1699 | { editor empty$
1700 | editor field.or.null author field.or.null =
1701 | or
1702 | { key empty$
1703 | { booktitle empty$
1704 | { "need editor, key, or booktitle for " cite$ * " to crossref " *
1705 | crossref * warning$
1706 | ""
1707 | }
1708 | { "In {\em " booktitle * "\/}" * }
1709 | if$
1710 | }
1711 | { "In " key * }
1712 | if$
1713 | }
1714 | { "In " format.crossref.editor * }
1715 | if$
1716 | " \cite{" * crossref * "}" *
1717 | }
1718 |
1719 | % 出版地: 出版者
1720 | FUNCTION {format.address.publisher} {
1721 | new.block
1722 | type$ "inproceedings" =
1723 | { pubaddress empty$
1724 | { "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地
1725 | publisher empty$
1726 | { "there's neither pubaddress nor publisher in " cite$ * warning$
1727 | "[" * bbl.sine.nomine * "]" * % 无出版者
1728 | }
1729 | { "there's a publisher but no pubaddress in " cite$ * warning$
1730 | publisher * % 有出版者
1731 | }
1732 | if$
1733 | }
1734 | { pubaddress bbl.colon * % 有出版地
1735 | publisher empty$
1736 | { "there's a pubaddress but no publisher in " cite$ * warning$
1737 | "[" * bbl.sine.nomine * "]" * % 无出版者
1738 | }
1739 | { publisher * } % 有出版者
1740 | if$
1741 | }
1742 | if$
1743 | }
1744 | { address empty$
1745 | { "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地
1746 | publisher empty$
1747 | { "there's neither address nor publisher in " cite$ * warning$
1748 | "[" * bbl.sine.nomine * "]" * % 无出版者
1749 | }
1750 | { "there's a publisher but no address in " cite$ * warning$
1751 | publisher * % 有出版者
1752 | }
1753 | if$
1754 | }
1755 | { address bbl.colon * % 有出版地
1756 | publisher empty$
1757 | { "there's a address but no publisher in " cite$ * warning$
1758 | "[" * bbl.sine.nomine * "]" * % 无出版者
1759 | }
1760 | { publisher * } % 有出版者
1761 | if$
1762 | }
1763 | if$
1764 | }
1765 | if$
1766 | }
1767 |
1768 | % 出版地: 出版者, 出版年
1769 | FUNCTION {format.address.publisher.year} {
1770 | % % DEBUG
1771 | % "-- format.address.publisher.year(){" debug.output
1772 | % "-- address =" address * debug.output
1773 | % "-- publisher=" publisher * debug.output
1774 | % "-- year =" year * debug.output
1775 | % % END OF DEBUG
1776 | new.block
1777 | type$ "inproceedings" =
1778 | { pubaddress empty$
1779 | { "" % "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地
1780 | publisher empty$
1781 | { "there's neither pubaddress nor publisher in " cite$ * warning$
1782 | "" * % "[" * bbl.sine.nomine * "]" * % 无出版者
1783 | }
1784 | { "there's a publisher but no pubaddress in " cite$ * warning$
1785 | publisher * % 有出版者
1786 | }
1787 | if$
1788 | }
1789 | { publisher empty$
1790 | { "there's a pubaddress but no publisher in " cite$ * warning$
1791 | "" % "[" * bbl.sine.nomine * "]" * % 无出版者
1792 | }
1793 | { pubaddress bbl.colon * % 有出版地
1794 | publisher * } % 有出版者
1795 | if$
1796 | }
1797 | if$
1798 | }
1799 | { address empty$
1800 | { "" % "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地
1801 | publisher empty$
1802 | { "there's neither address nor publisher in " cite$ * warning$
1803 | "" * % "[" * bbl.sine.nomine * "]" * % 无出版者
1804 | }
1805 | { "there's a publisher but no address in " cite$ * warning$
1806 | publisher * % 有出版者
1807 | }
1808 | if$
1809 | }
1810 | { publisher empty$
1811 | { "there's a address but no publisher in " cite$ * warning$
1812 | "" % "[" * bbl.sine.nomine * "]" * % 无出版者
1813 | }
1814 | { address bbl.colon * % 有出版地
1815 | publisher * } % 有出版者
1816 | if$
1817 | }
1818 | if$
1819 | }
1820 | if$
1821 |
1822 | % 出版年
1823 | year empty$
1824 | { "there's no year in " cite$ * warning$ }
1825 | { type$ "inproceedings" =
1826 | { bbl.comma * year * }
1827 | { publisher empty$
1828 | { year * }
1829 | { bbl.comma * year * }
1830 | if$
1831 | }
1832 | if$
1833 |
1834 | type$ "periodical" =
1835 | { year2 empty$ % 对连续出版物可以排版 year2
1836 | { skip$ }
1837 | { "--" *
1838 | year2 "l" change.case$ "now" =
1839 | { skip$ }
1840 | { year2 * }
1841 | if$
1842 | }
1843 | if$
1844 | }
1845 | { skip$ }
1846 | if$
1847 | }
1848 | if$
1849 | % % DEBUG
1850 | % duplicate$ "-- }=" swap$ * debug.output
1851 | % % END OF DEBUG
1852 | }
1853 |
1854 | % 出版地: 学校, 出版年
1855 | FUNCTION {format.address.school.year} {
1856 | new.block
1857 | address empty$
1858 | { "" % "[" bbl.sine.loco * "]" * bbl.colon * % 无出版地
1859 | school empty$
1860 | { "there's neither address nor school in " cite$ * warning$
1861 | "[" bbl.sine.nomine * "]" * % 无出版者
1862 | }
1863 | { "there's a school but no address in " cite$ * warning$
1864 | school * % 有出版者
1865 | }
1866 | if$
1867 | }
1868 | { address bbl.colon * % 有出版地
1869 | school empty$
1870 | { "there's a address but no school in " cite$ * warning$
1871 | "[" bbl.sine.nomine * "]" * % 无出版者
1872 | }
1873 | { school * } % 有出版者
1874 | if$
1875 | }
1876 | if$
1877 | % 出版年
1878 | year empty$
1879 | { "there's no year in " cite$ * warning$ }
1880 | { bbl.comma * year * }
1881 | if$
1882 | }
1883 |
1884 |
1885 | % FUNCTION {format.title.type}
1886 | % { title empty$
1887 | % { type empty$
1888 | % { "" }
1889 | % { "there's a type but no title in " cite$ * warning$
1890 | % type
1891 | % }
1892 | % if$
1893 | % }
1894 | % { type empty$
1895 | % 'title
1896 | % { title bbl.colon * type * }
1897 | % if$
1898 | % }
1899 | % if$
1900 | % }
1901 |
1902 | FUNCTION {format.note} {
1903 | note empty$
1904 | { new.block "" }
1905 | { url empty$
1906 | { new.block }
1907 | { before.all 'output.state := }
1908 | if$
1909 | note }
1910 | if$
1911 | }
1912 |
1913 | %%%%%%%%%%%%%%%%%
1914 | %% 著录格式: 专著
1915 | %%%%%%%%%%%%%%%%%
1916 |
1917 | % 普通图书
1918 | FUNCTION {book} {
1919 | start.entry % 开始
1920 |
1921 | author empty$ % 主要责任者
1922 | { format.editors "author and editor" output.warn }
1923 | { format.authors output.nonnull }
1924 | if$
1925 | format.book.title "title" output.warn % 题名项
1926 | format.translators output % 其他责任者(可选)
1927 | format.edition output % 版本项
1928 | format.address.publisher.year output.nonnull %
1929 | format.reference.date output %
1930 | format.url output % 获取或访问路径
1931 | format.note output % 备注
1932 |
1933 | fin.entry
1934 | }
1935 |
1936 | % 标准
1937 | FUNCTION {standard} {
1938 | start.entry
1939 |
1940 | organization empty$ % 主要责任人
1941 | { format.institution "organization and institution" output.warn }
1942 | { format.organization output.nonnull }
1943 | if$
1944 | format.book.title "title" output.warn % 题名项
1945 | format.translators output % 其他责任人
1946 | format.edition output % 版本项
1947 | format.address.publisher.year output.nonnull % 出版项
1948 | format.url output % URL
1949 | format.note output % 备注项
1950 |
1951 | fin.entry
1952 | }
1953 |
1954 | % 学位论文
1955 | FUNCTION {phdthesis} {
1956 | start.entry
1957 |
1958 | format.authors "author" output.warn
1959 | format.book.title "title" output.warn
1960 | format.address.school.year output
1961 | format.note output
1962 |
1963 | fin.entry
1964 | }
1965 |
1966 | % 会议录/论文集
1967 | FUNCTION {proceedings} {
1968 | start.entry
1969 |
1970 | editor empty$
1971 | { organization empty$
1972 | { format.institution "author, organization institution" output.warn }
1973 | { format.organization output.nonnull }
1974 | if$
1975 | }
1976 | { format.editors output.nonnull }
1977 | if$
1978 | format.book.title "title" output.warn
1979 | format.address.publisher.year output
1980 | format.note output
1981 |
1982 | fin.entry
1983 | }
1984 |
1985 | % 科技报告
1986 | FUNCTION {techreport} {
1987 | start.entry
1988 |
1989 | author empty$
1990 | { organization empty$
1991 | { format.institution
1992 | "author, organization and institution" output.warn }
1993 | { format.organization output.nonnull }
1994 | if$
1995 | }
1996 | { format.authors output.nonnull }
1997 | if$
1998 | format.techreport.title "title" output.warn
1999 | format.address.publisher.year output.nonnull
2000 | format.url output
2001 | format.note output
2002 |
2003 | fin.entry
2004 | }
2005 |
2006 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
2007 | %% 著录格式: 专著中析出的文献
2008 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%
2009 |
2010 | FUNCTION {format.collection.editors} {
2011 | booktitle empty$
2012 | { "" }
2013 | { after.title 'output.state :=
2014 | format.editors }
2015 | if$
2016 | }
2017 | FUNCTION {format.address} {
2018 | booktitle empty$
2019 | { new.block }
2020 | { mid.sentence 'output.state := }
2021 | if$
2022 | address empty$
2023 | { "" }
2024 | { address }
2025 | if$
2026 | }
2027 |
2028 | FUNCTION {format.month.year} {
2029 | month empty$
2030 | { "" }
2031 | { month " " * }
2032 | if$
2033 | year empty$
2034 | { "There is month but no year in " cite$ * warning$ }
2035 | { year * }
2036 | if$
2037 | }
2038 |
2039 | FUNCTION {format.collection.title} {
2040 | booktitle empty$
2041 | { "" }
2042 | { new.block
2043 | "In " booktitle *
2044 | % address empty$
2045 | % { skip$ }
2046 | % { bbl.comma * address * bbl.comma *
2047 | % month empty$
2048 | % { skip$ }
2049 | % { month * }
2050 | % if$
2051 | % year empty$
2052 | % { skip$ }
2053 | % { " " * year * }
2054 | % if$
2055 | % }
2056 | % if$
2057 | }
2058 | if$
2059 | }
2060 | % 图书中析出的文献
2061 | FUNCTION {inbook} {
2062 | start.entry
2063 |
2064 | author empty$
2065 | { format.editors "author and editor" output.warn }
2066 | { format.authors output.nonnull }
2067 | if$
2068 | format.book.title "title" output.warn
2069 | format.collection.editors "editor" output.warn
2070 | format.collection.title "booktitle" output.warn
2071 | format.translators output % 其他责任人
2072 | format.edition output % 版本项
2073 | format.address.publisher.year output.nonnull % 出版项
2074 | format.pages "pages" output.warn %
2075 | format.url output % URL
2076 | format.note output % 备注项
2077 |
2078 | fin.entry
2079 | }
2080 |
2081 | %%%%%%%%%%%%%%%%%
2082 | %% 著录格式: 专利
2083 | %%%%%%%%%%%%%%%%%
2084 | FUNCTION {patent} {
2085 | start.entry
2086 |
2087 | author empty$
2088 | { format.assignees "assignee" output.warn }
2089 | { format.authors output.nonnull }
2090 | if$
2091 | format.patent.title "title" output.warn
2092 | format.patent.publication output
2093 | format.url output
2094 | format.note output
2095 |
2096 | fin.entry
2097 | }
2098 |
2099 | % 电子文献更新或修改日期
2100 | FUNCTION {format.update.date} {
2101 | update empty$
2102 | { "" }
2103 | { output.state mid.sentence =
2104 | { before.all 'output.state := }
2105 | { skip$ }
2106 | if$
2107 | "~(" update * ")" * }
2108 | if$
2109 | }
2110 |
2111 | %%%%%%%%%%%%%%%%%%%%%
2112 | %% 著录格式: 电子文献
2113 | %%%%%%%%%%%%%%%%%%%%%
2114 | FUNCTION {electronic} {
2115 | start.entry
2116 |
2117 | author empty$
2118 | { organization "author and organization" output.warn }
2119 | { format.authors output.nonnull }
2120 | if$
2121 | format.book.title output
2122 | format.electronic.publication output
2123 | format.update.date output
2124 | format.reference.date output
2125 | format.url output
2126 | format.note output
2127 |
2128 | fin.entry
2129 | }
2130 |
2131 | %%%%%%%%%%%%%%%%%%%%%%%
2132 | %% 著录格式: 连续出版物
2133 | %%%%%%%%%%%%%%%%%%%%%%%
2134 | FUNCTION {periodical} {
2135 | start.entry
2136 |
2137 | editor empty$
2138 | { format.organization "editors and organization" output.warn }
2139 | { format.editors output.nonnull }
2140 | if$
2141 | format.book.title "title" output.warn
2142 | format.year.volume.number output
2143 | format.address.publisher.year output
2144 | format.url output
2145 | format.note output
2146 |
2147 | fin.entry
2148 | }
2149 |
2150 | FUNCTION {format.journal.title} {
2151 | journal empty$
2152 | { "" }
2153 | { new.block journal }
2154 | if$
2155 | }
2156 |
2157 | % 连续出版物中析出的文献
2158 | FUNCTION {article}
2159 | { start.entry
2160 |
2161 | format.authors "author" output.warn
2162 | format.book.title "title" output.warn
2163 | format.journal.title "journal" output.warn
2164 | format.year.volume.number output
2165 | format.pages "pages" output.warn
2166 | format.reference.date output
2167 | format.url output
2168 | format.note output
2169 |
2170 | fin.entry
2171 | }
2172 |
2173 | FUNCTION {booklet}
2174 | { start.entry
2175 | format.authors output
2176 | new.block
2177 | format.title "title" output.warn
2178 | howpublished address new.block.checkb
2179 | howpublished output
2180 | address output
2181 | format.date output
2182 | new.block
2183 | note output
2184 | fin.entry
2185 | }
2186 |
2187 | FUNCTION {incollection}
2188 | { start.entry
2189 | format.authors "author" output.warn
2190 | new.block
2191 | format.ictitle "title" output.warn
2192 | new.block
2193 | crossref missing$
2194 | { %format.in.ed.booktitle "booktitle" output.warn
2195 | %format.bvolume output
2196 | format.in.ed.booktitle.volume "booktitle" output.warn
2197 | format.number.series output
2198 | format.chapter.pages output
2199 | new.sentence
2200 | % publisher "publisher" output.warn
2201 | % address output
2202 | format.address.publisher.year output
2203 | format.edition output
2204 | format.date ":" * format.pages * output
2205 | %format.date "year" output.warn
2206 | }
2207 | { format.incoll.inproc.crossref output.nonnull
2208 | format.chapter.pages output
2209 | }
2210 | if$
2211 | new.block
2212 | note output
2213 | fin.entry
2214 | }
2215 |
2216 | % 论文集中析出的文献
2217 | FUNCTION {inproceedings} {
2218 | start.entry
2219 |
2220 | format.authors "author" output.warn
2221 | format.book.title "title" output.warn
2222 | format.collection.editors "editor" output.warn
2223 | format.collection.title "booktitle" output.warn
2224 | format.address output
2225 | format.month.year output
2226 | % format.address.publisher.year output.nonnull % 出版项
2227 | format.pages "pages" output.warn %
2228 | format.url output % URL
2229 | format.note output % 备注项
2230 | % format.in.booktitle "booktitle" output.warn
2231 | % %format.bvolume output
2232 | % %format.number.series output
2233 | % %format.pages output
2234 | % address empty$
2235 | % { organization publisher new.sentence.checkb
2236 | % organization output
2237 | % publisher output
2238 | % %format.date "year" output.warn
2239 | % %year output
2240 | % format.date ":" * format.pages * output
2241 | % }
2242 | % { %address output.nonnull
2243 | % format.address.publisher.year output
2244 | % %format.date "year" output.warn
2245 | % % year output
2246 | % format.date ":" * format.pages * output
2247 | % new.sentence
2248 | % organization output
2249 | % %publisher output
2250 | % }
2251 | % if$
2252 | % new.block
2253 | % pages output
2254 | %remove.dots
2255 |
2256 | % { format.incoll.inproc.crossref output.nonnull
2257 | % format.pages output
2258 | % }
2259 | % if$
2260 | % new.block
2261 | % note output
2262 | fin.entry
2263 | }
2264 |
2265 | FUNCTION {manual}
2266 | { start.entry
2267 | author empty$
2268 | { organization empty$
2269 | 'skip$
2270 | { organization output.nonnull
2271 | address output
2272 | }
2273 | if$
2274 | }
2275 | { format.authors output.nonnull }
2276 | if$
2277 | new.block
2278 | format.book.title "title" output.warn
2279 | author empty$
2280 | { organization empty$
2281 | { address new.block.checka
2282 | address output
2283 | }
2284 | 'skip$
2285 | if$
2286 | }
2287 | { organization address new.block.checkb
2288 | organization output
2289 | address output
2290 | }
2291 | if$
2292 | format.edition output
2293 | format.date output
2294 | new.block
2295 | note output
2296 | fin.entry
2297 | }
2298 |
2299 | % FUNCTION {masterthesis.type}
2300 | % { "~[D]"
2301 | % % language empty$
2302 | % % { "[Master Thesis]" }
2303 | % % { "[硕士学位论文]" }
2304 | % % if$
2305 | % }
2306 |
2307 | % FUNCTION {mastersthesis}
2308 | % { start.entry
2309 | % format.authors "author" add.period$ output.warn
2310 | % new.block
2311 | % format.title remove.dots " " * masterthesis.type * output
2312 | % new.block
2313 | % format.address.school output
2314 | % %address output
2315 | % %school "school" output.warn
2316 | % format.date "year" output.warn
2317 | % new.block
2318 | % note output
2319 | % fin.entry
2320 | % }
2321 |
2322 | FUNCTION {misc}
2323 | { start.entry
2324 |
2325 | format.authors output
2326 | % title howpublished new.block.checkb
2327 | format.title output
2328 | % howpublished new.block.checka
2329 | % howpublished output
2330 | % format.date output
2331 | format.address output
2332 | format.month.year output
2333 | format.pages "pages" output.warn
2334 | format.url output
2335 | % new.block
2336 | format.note output
2337 | fin.entry
2338 | % empty.misc.check
2339 | }
2340 |
2341 | FUNCTION {phdthesis.type}
2342 | { "~[D]"
2343 | % language empty$
2344 | % { "[PhD Thesis]" }
2345 | % { "[博士学位论文]" }
2346 | % if$
2347 | }
2348 |
2349 |
2350 |
2351 |
2352 | FUNCTION {unpublished}
2353 | { start.entry
2354 | format.authors "author" output.warn
2355 | new.block
2356 | format.title "title" output.warn
2357 | new.block
2358 | note "note" output.warn
2359 | format.date output
2360 | fin.entry
2361 | }
2362 |
2363 | % 专用控制条目 BUPTThesisBSTCTL 用于提供方便的用户设置接口
2364 | FUNCTION {BUPTThesisBSTCTL}{
2365 | is.print.banners.to.terminal
2366 | { "** BUPTThesis BST control entry " quote$ * cite$ *
2367 | quote$ * " detected." *
2368 | top$
2369 | }
2370 | { skip$ }
2371 | if$
2372 | % CTLuse_article_number
2373 | % empty$
2374 | % { skip$ }
2375 | % { CTLuse_article_number
2376 | % yes.no.to.int
2377 | % 'is.use.number.for.article :=
2378 | % }
2379 | % if$
2380 | % CTLuse_paper
2381 | % empty$
2382 | % { skip$ }
2383 | % { CTLuse_paper
2384 | % yes.no.to.int
2385 | % 'is.use.paper :=
2386 | % }
2387 | % if$
2388 | % CTLuse_forced_etal
2389 | % empty$
2390 | % { skip$ }
2391 | % { CTLuse_forced_etal
2392 | % yes.no.to.int
2393 | % 'is.forced.et.al :=
2394 | % }
2395 | % if$
2396 | % 显示作者数目
2397 | CTLmax_names_forced_etal
2398 | empty$
2399 | { skip$ }
2400 | { CTLmax_names_forced_etal
2401 | string.to.integer
2402 | 'max.num.names.before.forced.et.al :=
2403 | }
2404 | if$
2405 | % 论文作者英文姓名
2406 | CTLauthor_name_english
2407 | empty$
2408 | { skip$ }
2409 | { CTLauthor_name_english
2410 | 'author.name.in.english :=
2411 | % #1 'is.for.peer.review :=
2412 | % "CTLauthor_name_english=" author.name.in.english * debug.output
2413 | }
2414 | if$
2415 | % 论文作者中文姓名
2416 | CTLauthor_name_chinese
2417 | empty$
2418 | { skip$ }
2419 | { CTLauthor_name_chinese
2420 | 'author.name.in.chinese :=
2421 | % #1 'is.for.peer.review :=
2422 | % "CTLauthor_name_chinese=" author.name.in.chinese * debug.output
2423 | }
2424 | if$
2425 | CTLfor_peer_review
2426 | empty$
2427 | { skip$ }
2428 | { CTLfor_peer_review
2429 | yes.no.to.int
2430 | 'is.for.peer.review :=
2431 | }
2432 | if$
2433 | % CTLnames_show_etal
2434 | % empty$
2435 | % { skip$ }
2436 | % { CTLnames_show_etal
2437 | % string.to.integer
2438 | % 'num.names.shown.with.forced.et.al :=
2439 | % }
2440 | % if$
2441 | % CTLuse_alt_spacing
2442 | % empty$
2443 | % { skip$ }
2444 | % { CTLuse_alt_spacing
2445 | % yes.no.to.int
2446 | % 'is.use.alt.interword.spacing :=
2447 | % }
2448 | % if$
2449 | % CTLalt_stretch_factor
2450 | % empty$
2451 | % { skip$ }
2452 | % { CTLalt_stretch_factor
2453 | % 'ALTinterwordstretchfactor :=
2454 | % "\renewcommand{\BIBentryALTinterwordstretchfactor}{"
2455 | % ALTinterwordstretchfactor * "}" *
2456 | % write$ newline$
2457 | % }
2458 | % if$
2459 | % CTLdash_repeated_names
2460 | % empty$
2461 | % { skip$ }
2462 | % { CTLdash_repeated_names
2463 | % yes.no.to.int
2464 | % 'is.dash.repeated.names :=
2465 | % }
2466 | % if$
2467 | % CTLname_emph_author_en % 强调显示的作者英文姓名
2468 | % empty$
2469 | % { skip$ } % 若没有给出则跳过
2470 | % { CTLname_emph_author_en
2471 | % 'name.emph.author.en := % 否则更新 name.emph.author.en
2472 | % }
2473 | % if$
2474 | % CTLname_emph_author_zh % 强调显示的作者中文姓名
2475 | % empty$
2476 | % { skip$ } % 若没有给出则跳过
2477 | % { CTLname_emph_author_zh
2478 | % 'name.emph.author.zh := % 否则更新 name.emph.author.zh
2479 | % }
2480 | % if$
2481 | CTLname_format_string % 英文姓名排版格式字符串
2482 | empty$
2483 | { skip$ } % 若没有自定义则跳过
2484 | { CTLname_format_string % 否则更新 name.format.string
2485 | 'name.format.string :=
2486 | }
2487 | if$
2488 | % CTLname_latex_cmd
2489 | % empty$
2490 | % { skip$ }
2491 | % { CTLname_latex_cmd
2492 | % 'name.latex.cmd :=
2493 | % }
2494 | % if$
2495 | % CTLname_url_prefix
2496 | % missing$
2497 | % { skip$ }
2498 | % { CTLname_url_prefix
2499 | % 'name.url.prefix :=
2500 | % }
2501 | % if$
2502 |
2503 |
2504 | % num.names.shown.with.forced.et.al max.num.names.before.forced.et.al >
2505 | % { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$
2506 | % max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al :=
2507 | % }
2508 | % { skip$ }
2509 | % if$
2510 | }
2511 |
2512 | %%%%%%%%%%%%
2513 | %% 条目别名
2514 | %%%%%%%%%%%%
2515 | FUNCTION {mastersthesis} {phdthesis}
2516 | FUNCTION {conference} {inproceedings}
2517 | FUNCTION {online} {electronic}
2518 | FUNCTION {internet} {electronic}
2519 | FUNCTION {webpage} {electronic}
2520 | FUNCTION {www} {electronic}
2521 | FUNCTION {default.type} {misc}
2522 |
2523 |
2524 | %%%%%%%%%%
2525 | %% 主程序
2526 | %%%%%%%%%%
2527 |
2528 | READ
2529 |
2530 | EXECUTE {initialize.controls} % 初始化控制变量
2531 | EXECUTE {initialize.status.constants} % 初始化状态常量
2532 | EXECUTE {banner.message} % 显示初始提示信息
2533 |
2534 | EXECUTE {initialize.longest.label} % 初始化最长的标号
2535 | ITERATE {longest.label.pass} % 处理最长的标号
2536 |
2537 | EXECUTE {begin.bib} % 开始
2538 | ITERATE {call.type$} %
2539 | EXECUTE {end.bib} % 结束
2540 |
2541 | EXECUTE {completed.message} % 显示完成提示信息
2542 |
2543 | %% EOF
2544 |
--------------------------------------------------------------------------------
/data/abstract.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \begin{cabstract}
3 | 华南师范大学是一所有着悠久历史和深厚人文底蕴的高等学府,学校地处中国改革开放之%
4 | 都——广州,深得岭南开放务实之精神,有着素朴的传统和良好的学风,七十多年来,学校坚%
5 | 持师范教育的特色,始终致力于培养人格健全、有思想、有能力、有社会责任感的优秀人才。%
6 |
7 | 在大学日益参与经济社会发展的新世纪,华南师范大学正以崭新的风貌、开阔的世界眼光,%
8 | 不断拓展大学的育人理念,创造良好的教学和包容的学术研究环境,营造丰富的校园文化,%
9 | 努力构建特色鲜明、开放式、综合性高水平教学研究型大学。%
10 | \end{cabstract}
11 | \ckeywords{华南师范大学;论文;模板}
12 |
13 | \begin{eabstract}
14 | South China Normal University is an institution of higher education with a
15 | long history and a rich legacy. Situated in Guangzhou, the open metropolis in
16 | South China, South China Normal University is imbued with Lingnan's
17 | pioneering and pragmatic spirits. It has developed a tradition of elegant
18 | simplicity and fostered a strong learning environment. In the past seventy
19 | years or so, South China Normal University has preserved its characteristics
20 | of teacher education and has been devoted to cultivating talents with moral
21 | integrity, independent thinking, innovative ability and sense of social
22 | responsibility.
23 |
24 | In the new century in which the institutions of higher education are getting
25 | increasingly involved in the social and economic development, South China
26 | Normal University has adopted an international view on education. Having
27 | broadened its horizon on the key issue of cultivating talents, it has made its
28 | greatest efforts to create a congenial and harmonious environment for both
29 | teaching and academic research and has fostered a rich variety of campus
30 | culture. It aims to build itself into a high-level comprehensive teaching and
31 | research-oriented university with open distinctive features.
32 | \end{eabstract}
33 | \ekeywords{SCNU; thesis; template}
34 |
35 |
--------------------------------------------------------------------------------
/data/ack.tex:
--------------------------------------------------------------------------------
1 | %%% Local Variables:
2 | %%% mode: latex
3 | %%% TeX-master: "../main"
4 | %%% End:
5 | %!TEX root = ../thesis.tex
6 |
7 | \begin{ack}
8 |
9 | 首先要感谢党,感谢国家!
10 |
11 | 这份模板的制作首先得到了我的导师计算机学院李兴民教授,以及计算机学院陈寅副教授的
12 | 热心支持,衷心感谢他们的教诲和指导意见!
13 |
14 | 除此之外,还要感谢计算机学院的卓雄辉书记、雷蕾副书记、汤庸院长、单志龙副院长、王
15 | 立斌副教授等,感谢他们对我的鼓励和帮助。
16 |
17 | 在做这个模板的时候也获得了其他高校的\TeX{}er们的帮助,尤其是国防科大
18 | 的\nudtpaper{}和清华大学的\thuthesis{},如果没有这些前辈们的工作,这份模板也不
19 | 可能这么快出来和大家见面。另外,感谢戴高远,潘嘉昕,高有等同学为这个模板提供了
20 | 很多宝贵的素材和建议,感谢周晓倩同学和莫城为同学参与模板的测试工作。
21 |
22 | 感谢以上所有人的努力付出,希望\scnuthesis{}能够在未来的日子里成
23 | 为\textit{SCNUer}们的毕业论文好帮手,帮助大家完成格式规范、排版精美的论文!
24 |
25 | \end{ack}
26 |
--------------------------------------------------------------------------------
/data/appendix01.tex:
--------------------------------------------------------------------------------
1 | %%% Local Variables:
2 | %%% mode: latex
3 | %%% TeX-master: "../main"
4 | %%% End:
5 | %!TEX root = ../thesis.tex
6 |
7 | \chapter{外文资料原文}
8 | \label{cha:engorg}
9 | \section[First Principles]{first principles}
10 |
11 | \subsection{Typography exists to honor content.}
12 |
13 | Like oratory, music, dance, calligraphy -- like anything that lends its grace to language -- typography is an art that can be deliberately misused. It is a craft by which the meanings of a text (or its absence of meaning) can be clarified, honored and shared, or knowingly disguised.
14 |
15 | In a world rife with unsolicited messages, typography must often draw attention to itself before it will be read. Yet in order to be read, it must relinquish the attention it has drawn. Typography with anything to say therefore aspires to a kind of statuesque transparency. Its other traditional role is durability: not immunity to change, but a clear superiority to fashion. Typography at its best is a visual form of language linking timelessness and time.
16 |
17 | One of the principles of durable typography is always legibility; another is something more than legibility: some earned or unearned interest that gives its living energy to the page. It takes various forms and goes by various names, including serenity, liveliness, grace and joy.
18 |
19 | These principles apply, in different ways, to the typography of business cards, instruction sheets and postage stamps, as well as to editions of religious scriptures, literary classics and other books that aspire to join their ranks. Within limits, the same principles apply even to stock market reports, airline schedules, milk cartons, classified ads. But laughter, grace and joy, like legibility itself, all feed on meaning, which the writer, the words and the subject, not the typographer, must generally provide.
20 |
21 | In 1770, a bill was introduced in the English Parliament with the following provisions:
22 | \begin{quote}$\ldots$ all women of whatever age, rank, profession, or degree, whether virgins, maids, or widows, that shall $\ldots$ impose upon, seduce, and betray into matrimony, any of His Majesty's subjects, by the scents, paints, cosmetic washes, artificial teeth, false hair, Spanish wool, iron stays, hoops, high heeled shoes {\rm [}or{\rm ]} bolstered hips shall incur the pen\-alty of the law in force against witchcraft $\ldots$ and $\ldots$ the marriage, upon conviction, shall stand null and void.
23 | \end{quote}
24 | The function of typography, as I understand it, is neither to further the power of witches nor to bolster the defenses of those, like this unfortunate parliamentarian, who live in terror of being tempted and deceived. The satisfactions of the craft come from elucidating, and perhaps even ennobling, the text, not from deluding the unwary reader by applying scents, paints and iron stays to empty prose. But humble texts, such as classified ads or the telephone directory, may profit as much as anything else from a good typographical bath and a change of clothes. And many a book, like many a warrior or dancer or priest of either sex, may look well with some paint on its face, or indeed with a bone in its nose.
25 |
26 | \subsection{Letters have a life and dignity of their own.}
27 |
28 | Letterforms that honor and elucidate what humans see and say deserve to be honored in their turn. Well-chosen words deserve well-chosen letters; these in their turn deserve to be set with affection, intelligence, knowledge and skill. Typography is a link, and it ought, as a matter of honor, courtesy and pure delight, to be as strong as the others in the chain.
29 |
30 | Writing begins with the making of footprints, the leaving of sighs. Like speaking, it is a perfectly natural act which humans have carried to complex extremes. The typographer's task has always been to add a somewhat unnatural edge, a protective shell of artificial order, to the power of the writing hand. The tools have altered over the centuries, and the exact degree of unnaturalness desired has varied from place to place and time to time, but the character of the essential transformation between manuscript and type has scarcely changed.
31 |
32 | The original purpose of type was simply copying. The job of the typographer was to imitate the scribal hand in a form that permitted exact and fast replication. Dozens, then hundreds, then thousands of copies were printed in less time than a scribe would need to finish one. This excuse for setting texts in type has disappeared. In the age of photolithography, digital scanning and offset printing, it is as easy to print directly from handwritten copy as from text that is typographically composed. Yet the typographer's task has little changed. It is still to give the illusion of superhuman speed and stamina -- and of superhuman patience and precision~-- to the writing hand.
33 |
34 | Typography is just that: idealized writing. Writers themselves now rarely have the calligraphic skill of earlier scribes, but they evoke countless versions of ideal script by their varying voices and literary styles. To these blind and often invisible visions, the typographer must respond in visible terms.
35 |
36 |
--------------------------------------------------------------------------------
/data/appendix02.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \chapter{其它附录}
3 | 其它附录的内容可以放到这里,当然如果你愿意,可
4 | 以把这部分也放到独立的文件中,然后将其 \verb|\input| 到主文件中。
--------------------------------------------------------------------------------
/data/chap01.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \chapter{绪论}
3 |
4 | \section{本模板的意义}
5 |
6 | \subsection{现有的学位论文模板的不足}
7 | 学位论文作为高校教学计划中的重要环节,对提高教学质量、培养学生综合应用能力具有十%
8 | 分重要的意义。根据国家制定的《科学技术报告、学位论文和学术论文的编写格式》,华南%
9 | 师范大学采用Microsoft Word等文字处理系统制作了相应的学位论文模板。然而,在应用这%
10 | 些模板的过程中,却出现了几下几种问题\cite{Maddage2009}:
11 | \begin{enumerate}
12 | \item 无法自动处理图表、公式的序号、参考文献引用标号的变动,经常出现因疏忽而前后%
13 | 文体格式不一致的现象;
14 | \item 无法实现论文的格式和内容的有效分离,导致模板的格式很容易被学生无意中修改,%
15 | 从而影响了学位论文规范化管理的质量;
16 | \item 受制于Word版本的兼容性问题,在不同版本的文档之间常会有显示上的出入。%
17 | \end{enumerate}
18 |
19 | \subsection{\LaTeX{}的特性}
20 | \TeX{}作为一个功能强大的特别适合于排版科技文献和书籍的格式化排版程序~,其具有以下几点特性:
21 | \begin{enumerate}
22 | \item 强大的宏定义功能。\TeX{}是一种宏命令编程语言,能够处理非常复杂的排版任务,并生成高质量的输出;
23 | \item 方便的自动编号功能。文章、书籍的章、节、段落以及公式、图表、参考文献、页码等均可自动编号;
24 | \item 良好的通用性。\LaTeX{}几乎在所有的计算机操作系统平台上得到实现。\LaTeX{}的源文%
25 | 件可在不同的平台之间自由的交换,而得到的输出是完全相同的。
26 | \end{enumerate}
27 |
28 |
29 |
30 |
31 | \subsection{采用\LaTeX{}学位论文模板的意义}
32 | 采用\LaTeX{}学位论文模板将有以下几点意义:
33 | \begin{enumerate}
34 | \item 有效地解决以往的\verb|Word|模板中所存在的问题,有助于提高毕业生的学位论文的排版质量;
35 | \item 有助于推动LaTeX在学生群体中的普及,学会使用\LaTeX{}来生成高质量的文档;
36 | \item 本模板在Github\footnote{项目主页:
37 | \url{https://github.com/scnu/scnuthesis}}上开源。让更多爱好者研究学习,并不断完善,以适应日后的需求。
38 | \end{enumerate}
39 |
40 |
41 | \section{(1.2 题目)}
42 | 绪论内容
43 |
44 | 绪论内容
45 |
46 | 绪论内容
47 |
48 | 绪论内容
49 |
50 | 绪论内容
51 |
52 | 绪论内容
53 |
54 | \section{(1.3 题目)}
55 | 绪论内容
56 |
57 | 绪论内容
58 |
59 | 绪论内容
60 |
61 | 绪论内容
62 |
63 | 绪论内容
64 |
65 | 绪论内容
66 |
67 | \subsection{(1.3.1 题目)}
68 | 绪论内容
69 |
70 | 绪论内容
71 |
72 | 绪论内容
73 |
74 | 绪论内容
75 |
76 | \subsection{(1.3.2 题目)}
77 |
78 | 绪论内容
79 |
80 | 绪论内容
81 |
82 |
83 |
--------------------------------------------------------------------------------
/data/chap02.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \chapter{论文正文}
3 | \label{chap:main}
4 | 本章将进入论文排版的正文
5 | 主要包括:字体段落,图片表格,公式定理,参考文献四部分。
6 | 版面将包括在\scnuthesis{}中使用到的所有格式,模板中自定义命令到或者特有的东西都将被一一介绍,
7 | 希望大家能看到对自己有用的东西,方便上手。
8 |
9 | 为了节省时间,这份说明的内容同样参考了国防科技大学的\nudtpaper{}模板~,在此表示感谢。
10 |
11 | \section{字体段落}
12 | \label{sec:font}
13 |
14 | 本节内容来自华南师范大学外部门户\footnote{外部门户主页:\url{http://www.scnu.edu.cn/}}。
15 |
16 | 华南师范大学始建于1933年,是一所学科门类齐全的国家“211 工程”重点建设大学和广东%
17 | 省省属重点大学。学校现有广州石牌、广州大学城和南海3个校区,占地面积共3079亩,%
18 | 校舍面积共 126万平方米。校园环境优美,景色怡人~,人文景观遍布,文化气息浓厚,为广%
19 | 大师生提供了良好的学习、工作和生活环境。
20 |
21 | 学校现有4个国家重点学科(含1个重点培育学科), 9个国家“211 工程”重点建设学%
22 | 科,2个广东省一级学科重点学科,11个广东省二级学科重点学科。有71个本科专业,有14个%
23 | 博士学位授权一级学科、90个博士学位授权点(未含2011年8月一级学科调整后新增的博士%
24 | 点)、1个博士专业学位授权点,33个硕士学位授权一级学科、174个硕士学位授权点(未%
25 | 含2011年8月一级学科调整后新增的硕士点)、10个硕士专业学位授权点,涉及到哲学、经济%
26 | 学、法学、教育学、文学、历史学、理学、工学、管理学、农学、医学等11个学科门%
27 | 类。 有12个博士后流动站。
28 |
29 | 学校拥有一批实力较强的实验室和科研基地。有教育部激光生命科学重点实验室、环境理论
30 | 化学重点实验室(省部共建)、教育部电化学储能材料与技术工程研究中心、卫生部(中医
31 | 药管理局)中医药与光子技术实验室、国家理科基础科学研究和教学人才培养基地、教育部
32 | 部省共建人文社科重点研究基地(心理应用研究中心)、国家体育总局重点研究基地(体育
33 | 社会科学研究基地),有7个广东省重点实验室(中心),6个广东省高校科研型重点实验
34 | 室,3个广东省高校产学研结合示范基地,6个广东省普通高校人文社会科学重点研究基
35 | 地,1个广东省高校工程技术研究中心。学校还拥有“物理学科基础课”、“信息传
36 | 播”~、“心理学”等3个国家级实验教学示范中心,7个广东省实验教学示范中心。此外,教
37 | 育部高校辅导员培训和研修基地、广东省普通高等学校师资培训中心~、广东省网络图书馆、
38 | 广东高校建筑规划设计院等机构均设在学校。
39 |
40 | 70 多年来,学校数易校名,几度迁徙,虽历经沧桑,却弦歌不辍。一代又一代华师人秉承勷
41 | 勤大学师范学院{\kai “研究高深学术,养成社会之专门人才”}的优良传统,承传南方大
42 | 学{\kai “忠诚团结,朴实虚心,勤劳勇敢,实事求是”}的革命精神~,践行{\kai “艰苦奋斗、严谨治
43 | 学、求实创新、为人师表”}的校训,筚路蓝缕,薪火相传,共同铸就了学校今天的繁荣与
44 | 发展。
45 |
46 | 华南师范大学历史上的名字包括:
47 |
48 | \begin{itemize}
49 | \item[楷体] {\kai 广州市立师范学校}
50 | \item[黑体] {\hei 勷勤大学师范学院}
51 | \item[隶书] {\li 勷勤大学教育学院}
52 | \item[宋体] {\song 广东省立教育学院}
53 | \item[仿宋] {\fs 广东省立文理学院}
54 | \item[粗体] {\bfseries 广东省文理学院}
55 | \item[斜体] {\itshape 华南师范学院}
56 | \item[粗斜体] {\bfseries\itshape 广东师范学院}
57 | \item[字体颜色] {\textcolor{red}{华南师范大学}}
58 | \end{itemize}
59 |
60 | 上面这段内容使用了itemize列表环境,\LaTeX{}默认的列表环境会在条目之间插入
61 | 过多的行距,若用户需要紧凑的行距,可以使用compactitem环境。
62 |
63 | 下面测试英文字体:
64 |
65 | Remember the \textsf{more} \textbf{font} {\bfseries\tiny you \sffamily use,
66 | \Large the \scshape more \itshape beautiful \slshape your \footnotesize
67 | document becomes.}
68 |
69 | \begin{itemize}
70 | \item[英文黑体] Typeset text in \textbf{bold} series
71 | \item[英文斜体] Typeset text in \textit{italic} shape
72 | \item[Roman字体] Typeset text in roman family
73 | \item[Sans Serif字体] Typeset text in \textsf{sans serif} family
74 | \item[typewriter字体] Typeset text in \texttt{typewriter} family
75 | \end{itemize}
76 |
77 | 下面测试字号:
78 | \begin{itemize}
79 | \item[初号] {\chuhao 华南师范大学}
80 | \item[小初] {\xiaochu 华南师范大学}
81 | \item[一号] {\yihao 华南师范大学}
82 | \item[小一] {\xiaoyi 华南师范大学}
83 | \item[二号] {\erhao 华南师范大学}
84 | \item[小二] {\xiaoer 华南师范大学}
85 | \item[三号] {\sanhao 华南师范大学}
86 | \item[小三] {\xiaosan 华南师范大学}
87 | \item[四号] {\sihao 华南师范大学}
88 | \item[小四] {\xiaosi 华南师范大学}
89 | \item[五号] {\wuhao 华南师范大学}
90 | \item[小五] {\xiaowu 华南师范大学}
91 | \end{itemize}
92 |
93 | \section{表格明细}
94 | \label{sec:figure}
95 | 表格是书中的重要组成部分,这一章将从简单的表格讲起,到复杂的表格为止。
96 |
97 | \subsection{基本表格}
98 | \label{sec:basictable}
99 |
100 | 模板中关于表格的宏包有三个: \textsf{booktabs}、\textsf{array} 和
101 | \textsf{longtabular},命令有一个 \verb|\hlinewd|。三线表建议使用\textsf{booktabs}中提供的,
102 | 包含toprule、midrule 和 bottomrule三条命令。
103 | 它们与\textsf{longtable} 能很好的配合使用。如果表格比较简单的话可以直接用命令
104 | \verb|hlinewd{xpt}| 控制。下面来看一个表格:
105 | \begin{table}[htb]
106 | \centering
107 | \begin{minipage}[t]{0.8\linewidth} % 如果想在表格中使用脚注,minipage是个不错的办法
108 | \caption[模板文件]{模板文件。如果表格的标题很长,那么在表格索引中就会很不美
109 | 观,所以要像 chapter 那样在前面用中括号写一个简短的标题。这个标题会出现在索
110 | 引中。}
111 | \label{tab:template-files}
112 | \begin{tabular*}{\linewidth}{lp{10cm}}
113 | \toprule[1.5pt]
114 | {\hei 文件名} & {\hei 描述} \\
115 | \midrule[1pt]
116 | scnuthesis.ins & \LaTeX{} 安装文件,docstrip\footnote{表格中的脚注} \\
117 | scnuthesis.dtx & 所有的一切都在这里面\footnote{再来一个}。\\
118 | scnuthesis.cls & 模板类文件。\\
119 | scnuthesis.cfg & 模板配置文。cls 和 cfg 由前两个文件生成。\\
120 | bstutf8.bst & 参考文献 Bibtex 样式文件。\\
121 | myscnu.sty & 常用的包和命令写在这里,减轻主文件的负担。\\
122 | \bottomrule[1.5pt]
123 | \end{tabular*}
124 | \end{minipage}
125 | \end{table}
126 |
127 | 如果你不需要在表格中插入脚注,可以将minipage环境去掉。
128 |
129 | 表 \ref{tab:template-files} 列举了本模板主要文件及其功能。
130 | 请大家注意三线表中各条线对应的命令。这个例子还展示了如何在表格中正确使用脚注。
131 | 由于 \LaTeX{} 本身不支持在表格中使用 \verb|\footnote|,所以我们不得不将表格放在
132 | 小页中,而且最好将表格的宽度设置为小页的宽度,这样脚注看起来才更美观。
133 |
134 | 如果遇到表格内容自动调整的问题,可以有两种解决办法: 其一就是用\verb|tabular*|,在
135 | 两列之间全部插入空白,该方法存在的缺点是当只有两列需要自动调整时,若小页预留空间
136 | 过大,可能插入过多的\verb|fill|,导致不美观; 另外一种就是使用\verb|tabularx|自动
137 | 调整了,需要定制一个\textbf{Z}环境,在新版本中,该命令已添加到\verb|myscnu.sty|中。
138 | 下面是这两个方法实现的对比,各位可以仔细对比一下,推荐使用后者。
139 |
140 | \begin{table}[htbp]
141 | \centering
142 | \begin{minipage}[t]{0.9\linewidth}
143 | \caption{Reed Solomon码的典型应用}
144 | \label{tab:RSused}
145 | \begin{tabular*}{\linewidth}{c @{\extracolsep{\fill}} c}
146 | \toprule[1.5pt]
147 | {\hei 应用领域} & {\hei 编码方案}\\
148 | \midrule[1pt]
149 | 磁盘驱动器 & RS(32,28,5)码 \footnote{码长为32、维数为28、最小距离为5} \\
150 | CD & 交叉交织RS码(CIRC) \\
151 | DVD & RS(208,192,17)码、RS(182,172,11)码 \\
152 | 光纤通信 & RS(255,229,17)码 \\
153 | \bottomrule[1.5pt]
154 | \end{tabular*}
155 | \end{minipage}
156 | \end{table}
157 |
158 | \begin{table}[htbp]
159 | \centering
160 | \begin{minipage}[t]{0.9\linewidth}
161 | \caption{Reed Solomon码的典型应用}
162 | \label{tab:RSuse}
163 | \begin{tabularx}{\linewidth}{cZ}
164 | \toprule[1.5pt]
165 | {\hei 应用领域} & {\hei 编码方案}\\
166 | \midrule[1pt]
167 | 磁盘驱动器 & RS(32,28,5)码 \footnote{码长为32、维数为28、最小距离为5} \\
168 | CD & 交叉交织RS码(CIRC) \\
169 | DVD & RS(208,192,17)码、RS(182,172,11)码 \\
170 | 光纤通信 & RS(255,229,17)码 \\
171 | \bottomrule[1.5pt]
172 | \end{tabularx}
173 | \end{minipage}
174 | \end{table}
175 |
176 | \subsection{复杂表格}
177 | \label{sec:complicatedtable}
178 |
179 | 我们经常会在表格下方标注数据来源,或者对表格里面的条目进行解释。前面的脚注是一种
180 | 不错的方法,如果你不喜欢脚注。那么完全可以在表格后面自己写注释,比如表~\ref{tab:tabexamp1}。
181 | \begin{table}[htbp]
182 | \centering
183 | \caption{复杂表格示例 1}
184 | \label{tab:tabexamp1}
185 | \begin{minipage}[t]{0.8\textwidth}
186 | \begin{tabularx}{\linewidth}{|l|X|X|X|X|}
187 | \hline
188 | \multirow{2}*{\backslashbox{x}{y}} & \multicolumn{2}{c|}{First Half} & \multicolumn{2}{c|}{Second Half}\\
189 | \cline{2-5}
190 | & 1st Qtr &2nd Qtr&3rd Qtr&4th Qtr \\
191 | \hline
192 | East$^{*}$ & 20.4& 27.4& 90& 20.4 \\
193 | West$^{**}$ & 30.6 & 38.6 & 34.6 & 31.6 \\
194 | \hline
195 | \end{tabularx}\\[2pt]
196 | \footnotesize
197 | *:东部\\
198 | **:西部
199 | \end{minipage}
200 | \end{table}
201 |
202 | 此外,表~\ref{tab:tabexamp1} 同时还演示了另外两个功能:1)通过 \textsf{tabularx} 的
203 | \texttt{|X|} 扩展实现表格自动放大;2)通过命令 \verb|\backslashbox| 在表头部分
204 | 插入反斜线。
205 |
206 | 为了使我们的例子更接近实际情况,我会在必要的时候插入一些“无关”文字,以免太多图
207 | 表同时出现,导致排版效果不太理想。
208 |
209 | 学校七十余载薪火相传,名师荟萃,著名的教育家罗浚、汪德亮,五四新诗开创者之一康白
210 | 情,古代文学家李镜池,古汉语学家吴三立,历史学家王越,逻辑学家李匡武,心理学家阮
211 | 镜清,教育学家叶佩华、朱勃,数学家叶述武,物理学家黄友谋、刘颂豪,著名体育教育家
212 | 袁浚等众多名家、名师先后在此执教。该校虽数度易名、几经迁徙,但一代又一代华师人秉
213 | 承勷勤大学师范学院``研究高深学术,养成社会之专门人才''的优良传统,承传南方大
214 | 学``忠诚团结,实事求是''的革命精神,践行``艰苦奋斗、严谨治学、求实创新、为人师
215 | 表''的校训,不断推动学校事业向前发展。特别是改革开放以来,抓住科教兴国、人才强国
216 | 的发展机遇,凭借建设文化省、教育强省和国家``211工程''的强劲东风,形成了学校现在
217 | 跨越式发展的大好局面。
218 |
219 | 不可否认 \LaTeX{} 的表格功能没有想象中的那么强大,不过只要你足够认真,足够细致,那么
220 | 同样可以排出来非常复杂非常漂亮的表格。请参看表~\ref{tab:tabexamp2}。
221 | \begin{table}[htbp]
222 | \centering\dawu[1.3]
223 | \caption{复杂表格示例 2}
224 | \label{tab:tabexamp2}
225 | \begin{tabular}[c]{|c|m{0.8in}|c|c|c|c|c|}\hline
226 | \multicolumn{2}{|c|}{Network Topology} & \# of nodes &
227 | \multicolumn{3}{c|}{\# of clients} & Server \\\hline
228 | GT-ITM & Waxman Transit-Stub & 600 &
229 | \multirow{2}{2em}{2\%}&
230 | \multirow{2}{2em}{10\%}&
231 | \multirow{2}{2em}{50\%}&
232 | \multirow{2}{1.2in}{Max. Connectivity}\\\cline{1-3}
233 | \multicolumn{2}{|c|}{Inet-2.1} & 6000 & & & &\\\hline
234 | \multirow{2}{1in}{Xue} & Rui & Ni &\multicolumn{4}{c|}{\multirow{2}*{\scnuthesis}}\\\cline{2-3}
235 | & \multicolumn{2}{c|}{ABCDEF} &\multicolumn{4}{c|}{} \\\hline
236 | \end{tabular}
237 | \end{table}
238 |
239 | \subsection{子表格与跨页表格}
240 |
241 | 浮动体的并排放置一般有两种情况:1)二者没有关系,为两个独立的浮动体;2)二者隶属
242 | 于同一个浮动体。对表格来说并排表格既可以像图~\ref{tab:parallel1}、图~\ref{tab:parallel2}
243 | 使用小页环境,也可以如图~\ref{tab:subtable} 使用子表格来做。后面我们将讲解图的例子。
244 | \begin{table}[htb]
245 | \noindent\begin{minipage}{0.45\textwidth}
246 | \centering
247 | \caption{第一个并排子表格}
248 | \label{tab:parallel1}
249 | \begin{tabular}{p{2cm}p{2cm}}
250 | \toprule[1.5pt]
251 | 111 & 222 \\\midrule[1pt]
252 | 222 & 333 \\\bottomrule[1.5pt]
253 | \end{tabular}
254 | \end{minipage}
255 | \begin{minipage}{0.45\textwidth}
256 | \centering
257 | \caption{第二个并排子表格}
258 | \label{tab:parallel2}
259 | \begin{tabular}{p{2cm}p{2cm}}
260 | \toprule[1.5pt]
261 | 111 & 222 \\\midrule[1pt]
262 | 222 & 333 \\\bottomrule[1.5pt]
263 | \end{tabular}
264 | \end{minipage}
265 | \end{table}
266 |
267 | 学校教师队伍结构良好、水平较高,拥有一批在国内外具有一定影响的专家学者。现有教师
268 | 队伍 1900 多人,其中教授 400 多人,副教授 500 多人,博士、硕士研究生导师 800 多人,
269 | 具有博士、硕士学位和研究生学历的1500 多人。在师资队伍中,有中国科学院院士 7 人、
270 | 瑞典皇家科学院院士2人、“千人计划”入围者 1人、长江学者4人、获得国家杰出青年基金
271 | 项目资助者3人、“新世纪百千万人才”国家级人选 5人、国家级教学名师2 人、广东省领军
272 | 人才4人、珠江学者4人、广东省高等学校“千百十工程”国家级培养对象5人,拥有教育
273 | 部“长江学者与创新团队发展计划”创新团队 1个、广东省创新科研团队1个,并有国务院学
274 | 位委员会学科评议组成员 3 人、教育部高等学校教学指导委员会成员 12 人。
275 |
276 | \begin{table}[htbp]
277 | \centering
278 | \caption{并排子表格}
279 | \label{tab:subtable}
280 | \subfloat[第一个子表格]{
281 | \begin{tabular}{p{2cm}p{2cm}}
282 | \toprule[1.5pt]
283 | 111 & 222 \\\midrule[1pt]
284 | 222 & 333 \\\bottomrule[1.5pt]
285 | \end{tabular}}\hskip2cm
286 | \subfloat[第二个子表格]{
287 | \begin{tabular}{p{2cm}p{2cm}}
288 | \toprule[1.5pt]
289 | 111 & 222 \\\midrule[1pt]
290 | 222 & 333 \\\bottomrule[1.5pt]
291 | \end{tabular}}
292 | \end{table}
293 |
294 | 如果您要排版的表格长度超过一页,那么推荐使用 \textsf{longtable} 或者 \textsf{supertabular}
295 | 宏包,表~\ref{tab:performance} 就是 \textsf{longtable} 的简单示例。
296 | \begin{longtable}[c]{c*{6}{r}}
297 | \caption{实验数据}\label{tab:performance}\\
298 | \toprule[1.5pt]
299 | 测试程序 & \multicolumn{1}{c}{正常运行} & \multicolumn{1}{c}{同步}
300 | & \multicolumn{1}{c}{检查点} & \multicolumn{1}{c}{卷回恢复}
301 | & \multicolumn{1}{c}{进程迁移} & \multicolumn{1}{c}{检查点} \\
302 | & \multicolumn{1}{c}{时间 (s)} & \multicolumn{1}{c}{时间 (s)}
303 | & \multicolumn{1}{c}{时间 (s)} & \multicolumn{1}{c}{时间 (s)}
304 | & \multicolumn{1}{c}{时间 (s)} & 文件(KB) \\
305 | \midrule[1pt]%
306 | \endfirsthead%
307 |
308 | \multicolumn{7}{c}{续表~\thetable\hskip1em 实验数据}\\
309 |
310 | \toprule[1.5pt]
311 | 测试程序 & \multicolumn{1}{c}{正常运行} & \multicolumn{1}{c}{同步}
312 | & \multicolumn{1}{c}{检查点} & \multicolumn{1}{c}{卷回恢复}
313 | & \multicolumn{1}{c}{进程迁移} & \multicolumn{1}{c}{检查点} \\
314 | & \multicolumn{1}{c}{时间 (s)} & \multicolumn{1}{c}{时间 (s)}
315 | & \multicolumn{1}{c}{时间 (s)} & \multicolumn{1}{c}{时间 (s)}
316 | & \multicolumn{1}{c}{时间 (s)} & 文件(KB) \\
317 | \midrule[1pt]%
318 | \endhead%
319 | \hline%
320 |
321 | \multicolumn{7}{r}{续下页}%
322 |
323 | \endfoot%
324 | \endlastfoot%
325 | CG.A.2 & 23.05 & 0.002 & 0.116 & 0.035 & 0.589 & 32491 \\
326 | CG.A.4 & 15.06 & 0.003 & 0.067 & 0.021 & 0.351 & 18211 \\
327 | CG.A.8 & 13.38 & 0.004 & 0.072 & 0.023 & 0.210 & 9890 \\
328 | CG.B.2 & 867.45 & 0.002 & 0.864 & 0.232 & 3.256 & 228562 \\
329 | CG.B.4 & 501.61 & 0.003 & 0.438 & 0.136 & 2.075 & 123862 \\
330 | CG.B.8 & 384.65 & 0.004 & 0.457 & 0.108 & 1.235 & 63777 \\
331 | MG.A.2 & 112.27 & 0.002 & 0.846 & 0.237 & 3.930 & 236473 \\
332 | MG.A.4 & 59.84 & 0.003 & 0.442 & 0.128 & 2.070 & 123875 \\
333 | MG.A.8 & 31.38 & 0.003 & 0.476 & 0.114 & 1.041 & 60627 \\
334 | MG.B.2 & 526.28 & 0.002 & 0.821 & 0.238 & 4.176 & 236635 \\
335 | MG.B.4 & 280.11 & 0.003 & 0.432 & 0.130 & 1.706 & 123793 \\
336 | MG.B.8 & 148.29 & 0.003 & 0.442 & 0.116 & 0.893 & 60600 \\
337 | LU.A.2 & 2116.54 & 0.002 & 0.110 & 0.030 & 0.532 & 28754 \\
338 | LU.A.4 & 1102.50 & 0.002 & 0.069 & 0.017 & 0.255 & 14915 \\
339 | LU.A.8 & 574.47 & 0.003 & 0.067 & 0.016 & 0.192 & 8655 \\
340 | LU.B.2 & 9712.87 & 0.002 & 0.357 & 0.104 & 1.734 & 101975 \\
341 | LU.B.4 & 4757.80 & 0.003 & 0.190 & 0.056 & 0.808 & 53522 \\
342 | LU.B.8 & 2444.05 & 0.004 & 0.222 & 0.057 & 0.548 & 30134 \\
343 | EP.A.2 & 123.81 & 0.002 & 0.010 & 0.003 & 0.074 & 1834 \\
344 | EP.A.4 & 61.92 & 0.003 & 0.011 & 0.004 & 0.073 & 1743 \\
345 | EP.A.8 & 31.06 & 0.004 & 0.017 & 0.005 & 0.073 & 1661 \\
346 | EP.B.2 & 495.49 & 0.001 & 0.009 & 0.003 & 0.196 & 2011 \\
347 | EP.B.4 & 247.69 & 0.002 & 0.012 & 0.004 & 0.122 & 1663 \\
348 | EP.B.8 & 126.74 & 0.003 & 0.017 & 0.005 & 0.083 & 1656 \\
349 | \bottomrule[1.5pt]
350 | \end{longtable}
351 |
352 | 为了排版方便,这里要插入一些随机的文字,那就加上猩猩博客的东西吧:
353 | ``越来越喜欢吃,自己做的川菜,每次做菜,都像是创作的过程,%
354 | 随心所欲; 发现家常菜真的很难做好,越是简单的菜,越是难以做好。
355 | 献上一个鱼香肉丝,让我跟随简单的脚步,creat出简约的菜品。''
356 |
357 | \subsection{其它}
358 | \label{sec:tableother}
359 | 有的同学不想让某个表格或者图片出现在索引里面,那么请使用命令 \verb|\caption*{}|,
360 | 这个命令不会给表格编号,也就是出来的只有标题文字而没有“表~XX”,“图~XX”,否则
361 | 索引里面序号不连续就显得不伦不类,这也是 \LaTeX{} 里星号命令默认的规则。
362 |
363 | \section{绘图插图}
364 |
365 | 绘图工具分为 GUI 的和 CLI 两种。GUI即是所见即所得的绘图工具~,常见的包
366 | 括 Visio、Inkscape、CorelDraw、XFig(jFig)、WinFig、Tpx、Ipe、Dia等;CLI则是需要编
367 | 译后才能够得到图形的工具,比较流行的有 PGF/TikZ~、Asymptote、pstricks等。GUI 类绘
368 | 图工具比较易于上手,而 CLI 类绘图工具则能够画出更加精确的图形。关于各类绘图工具的
369 | 比较和使用方法~,推荐用户到C\TeX{}论坛{\url{http://bbs.ctex.org/}}以及China\TeX{}论坛
370 | {\url{http://bbs.chinatex.org/forum.php}}上的相关板块进行更加深入的了解。
371 |
372 | \subsection{插图}
373 | \label{sec:graphs}
374 |
375 | 强烈推荐《\LaTeXe 插图指南》!关于子图形使用细节请参看\textsf{subfig}手册。
376 |
377 | \subsubsection{一个图形}
378 | \label{sec:onefig}
379 | 一般图形都是处在浮动环境中。之所以称为浮动是指最终排版效果图形的位置不一定与源文
380 | 件中的位置对应,这也是刚使
381 | 用 \LaTeX{} 同学可能遇到的问题。如果要强制固定浮动图形的位置,请使用 \textsf{float} 宏包,
382 | 它提供了 \texttt{[H]} 参数,但是除非特别需要,不建议使用\texttt{[H]},
383 | 而是倾向于使用\texttt{[htbp]},给\LaTeX{}更多选择。比如图~\ref{fig:ipe}。
384 | \begin{figure}[htbp] % use float package if you want it here
385 | \centering
386 | \includegraphics[width=\textwidth]{tikz}
387 | \caption{利用TikZ制图}
388 | \label{fig:ipe}
389 | \end{figure}
390 |
391 | 大学之道,在明明德,在亲民,在止于至善。知止而后有定;定而后能静;静而后能安;安
392 | 而后能虑;虑而后能得。物有本末,事有终始。知所先后,则近道矣。古之欲明明德于天
393 | 下者,先治其国;欲治其国者,先齐其家;欲齐其家者~,先修其身;欲修其身者,先正其心;
394 | 欲正其心者,先诚其意;欲诚其意者~,先致其知;致知在格物。物格而后知至;知至而后
395 | 意诚;意诚而后心正;心正而后身修;身修而后家齐;家齐而后国治;国治而后天下
396 | 平。自天子以至于庶人,壹是皆以修身为本。其本乱而未治者 否矣。其所厚者薄,而其所
397 | 薄者厚,未之有也!
398 |
399 | \hfill \pozhehao《大学》
400 |
401 | \subsubsection{多个图形}
402 | \label{sec:multifig}
403 |
404 | 如果多个图形相互独立,并不共用一个图形计数器,那么用 \verb|minipage| 或者
405 | \verb|parbox| 就可以。否则,请参看图~\ref{fig:big1},它包含两个小图,分别是图~\ref{fig:subfig1}
406 | 和图~\ref{fig:subfig2}。推荐使用 \verb|\subfloat|,不要再用
407 | \verb|\subfigure| 和 \verb|\subtable|。
408 | \begin{figure}[htb]
409 | \centering%
410 | \subfloat[第一个小图形]{%
411 | \label{fig:subfig1}
412 | \includegraphics[height=2cm]{logo.jpg}}\hspace{4em}%
413 | \subfloat[第二个小图形。如果标题很长的话,它会自动换行,这个 caption 就是这样的例子]{%
414 | \label{fig:subfig2}
415 | \includegraphics[height=2cm]{don-hires}}
416 | \caption{包含子图形的大图形}
417 | \label{fig:big1}
418 | \end{figure}
419 |
420 | 培育英才万万千,建设祖国锦绣河山,华师儿女奋勇当先,珠江滚滚红绵艳~,岭南大地草木
421 | 春,改革开放阳光好,华师园里花烂漫。
422 |
423 | 艰苦奋斗众志坚,严谨治学成风范,求实创新勇开拓,为人师表代代相传,教育改革宏图展,
424 | 师范园地好摇篮,培育祖国栋梁材,神圣职责我承担。
425 |
426 |
427 | 下面这个例子显示并排$3\times2$的图片,见图\ref{fig:subfig:3x2}:
428 | \begin{figure}[htb]
429 | \centering
430 | \subfloat[]{\includegraphics[width=.27\textwidth]{typography}} \qquad
431 | \subfloat[]{\includegraphics[width=.27\textwidth]{typography}} \qquad
432 | \subfloat[]{\includegraphics[width=.27\textwidth]{typography}} \qquad
433 | \subfloat[]{\includegraphics[width=.27\textwidth]{typography}} \qquad
434 | \subfloat[]{\includegraphics[width=.27\textwidth]{typography}} \qquad
435 | \subfloat[]{\includegraphics[width=.27\textwidth]{typography}}
436 | \caption{并排图片}
437 | \label{fig:subfig:3x2}
438 | \end{figure}
439 |
440 | 要注意,\texttt{qquad}相当于\verb|\hspace{2em}|,也就是2个字符的宽度,约0.08倍页宽,
441 | 图片宽度设定为0.27倍页宽是合适的;在该环境中,尽量不要手动换行。
442 |
443 | 向前向前向前向前,华师儿女永远向前!
444 |
445 | 如果要把编号的两个图形并排,那么小页就非常有用了:
446 | \begin{figure}[htb]
447 | \begin{minipage}{0.48\textwidth}
448 | \centering
449 | \includegraphics[height=4cm]{building.jpg}
450 | \caption{并排第一个图}
451 | \label{fig:parallel1}
452 | \end{minipage}\hfill
453 | \begin{minipage}{0.48\textwidth}
454 | \centering
455 | \includegraphics[height=4cm]{cat.jpg}
456 | \caption{并排第二个图}
457 | \label{fig:parallel2}
458 | \end{minipage}
459 | \end{figure}
460 |
461 | \section{公式定理}
462 | \label{sec:equation}
463 | 贝叶斯公式如式~(\ref{equ:chap1:bayes}),其中 $p(y|\mathbf{x})$ 为后验;
464 | $p(\mathbf{x})$ 为先验;分母 $p(\mathbf{x})$ 为归一化因子。
465 | \begin{equation}
466 | \label{equ:chap1:bayes}
467 | p(y|\mathbf{x}) = \frac{p(\mathbf{x},y)}{p(\mathbf{x})}=
468 | \frac{p(\mathbf{x}|y)p(y)}{p(\mathbf{x})}
469 | \end{equation}
470 |
471 | 论文里面公式越多,\TeX{} 就越 happy。再看一个 \textsf{amsmath} 的例子:
472 | \newcommand{\envert}[1]{\left\lvert#1\right\rvert}
473 | \begin{equation}\label{detK2}
474 | \det\mathbf{K}(t=1,t_1,\dots,t_n)=\sum_{I\in\mathbf{n}}(-1)^{\envert{I}}
475 | \prod_{i\in I}t_i\prod_{j\in I}(D_j+\lambda_jt_j)\det\mathbf{A}
476 | ^{(\lambda)}(\overline{I}|\overline{I})=0.
477 | \end{equation}
478 |
479 | 大家在写公式的时候一定要好好看 \textsf{amsmath} 的文档,并参考模板中的用法:
480 | \begin{multline*}%\tag{[b]} % 这个出现在索引中的
481 | \int_a^b\biggl\{\int_a^b[f(x)^2g(y)^2+f(y)^2g(x)^2]
482 | -2f(x)g(x)f(y)g(y)\,dx\biggr\}\,dy \\
483 | =\int_a^b\biggl\{g(y)^2\int_a^bf^2+f(y)^2
484 | \int_a^b g^2-2f(y)g(y)\int_a^b fg\biggr\}\,dy
485 | \end{multline*}
486 |
487 | 多列公式也是比较常见的情况,比较常用的办法是用align环境实现:
488 |
489 | \begin{equation}
490 | \mathbf{X} = \left(\begin{array}{ccc}
491 | x_{11} & x_{12} & \ldots \\
492 | x_{21} & x_{22} & \ldots \\
493 | \vdots & \vdots & \ddots \end{array} \right)
494 | \end{equation}
495 |
496 | \begin{equation}
497 | y = \left\{ \begin{array}{ll}
498 | a & \textrm{if $d>c$}\\
499 | b+x & \textrm{in the morning}\\
500 | l & \textrm{all day long}
501 | \end{array} \right.
502 | \end{equation}
503 |
504 | \begin{equation}
505 | \left(\begin{array}{c|c}
506 | 1 & 2 \\
507 | \hline 3 & 4 \end{array}\right)
508 | \end{equation}
509 |
510 | \begin{eqnarray}
511 | f(x) & = & \cos x \\
512 | f'(x) & = & -\sin x \\
513 | \int_{0}^{x} f(y)\,dy & = & \sin x
514 | \end{eqnarray}
515 |
516 | {\setlength\arraycolsep{2pt}
517 | \begin{eqnarray}
518 | \sin x & = & x -\frac{x^{3}}{3!} +\frac{x^{5}}{5!}-{} \nonumber\\
519 | & & {}-\frac{x^{7}}{7!}+{}\cdots
520 | \end{eqnarray}}
521 |
522 | 另外,\texttt{split}环境可能在XeCJK上不能使用,我们测试一下,看\ref{equ:split}:
523 | \begin{equation}\label{equ:split}
524 | \begin{split}
525 | [z^n]C(z) &= [z^n] \biggl[\frac{e^{3/4}}{\sqrt{1-z}} +
526 | e^{-3/4}(1-z)^{1/2} + \frac{e^{-3/4}}{4}(1-z)^{3/2}
527 | + O\Bigl( (1-z)^{5/2}\Bigr)\biggr] \\
528 | &= \frac{e^{-3/4}}{\sqrt{\pi n}} - \frac{5e^{-3/4}}{8\sqrt{\pi
529 | n^3}} + \frac{e^{-3/4}}{128 \sqrt{\pi n^5}} +
530 | O\biggl(\frac{1}{\sqrt{\pi
531 | n^7}}\biggr)
532 | \end{split}
533 | \end{equation}
534 | \textbf{注意:} 论文模板中为了与xeCJK稳定版本兼容,调校了split命令,代价是不能在inline使用split命令。
535 |
536 | \begin{theorem}
537 | \label{chapTSthm:rayleigh solution}
538 | 假定 $X$ 的二阶矩存在:
539 | \begin{equation}
540 | O_R(\textbf{x},F)=\sqrt{\frac{\textbf{u}_1^T\textbf{A}\textbf{u}_1} {\textbf{u}_1^T\textbf{B}\textbf{u}_1}}=\sqrt{\lambda_1},
541 | \end{equation}
542 | 其中 $\textbf{A}$ 等于 $(\textbf{x}-EX)(\textbf{x}-EX)^T$,\textbf{B} 表示协方差阵 $E(X-EX)(X-EX)^T$,$\lambda_1$
543 | $\textbf{u}_1$ 是 $\lambda_1$对应的特征向量, $\omega,\ve{\omega},\omegaup,\ve{\omegaup}$.
544 | \end{theorem}
545 |
546 | \begin{proof}
547 | 上述优化问题显然是一个 Rayleigh 商问题。我们有
548 | \begin{align}
549 | O_R(\textbf{x},F)=\sqrt{\frac{\textbf{u}_1^T\textbf{A}\textbf{u}_1} {\textbf{u}_1^T\textbf{B}\textbf{u}_1}}=\sqrt{\lambda_1},
550 | \end{align}
551 | 其中 $\lambda_1$ 下列广义特征值问题的最大特征值:
552 | $$
553 | \textbf{A}\textbf{z}=\lambda\textbf{B}\textbf{z}, \textbf{z}\neq 0.
554 | $$
555 | $\textbf{u}_1$ 是 $\lambda_1$对应的特征向量。结论成立。
556 | \end{proof}
557 |
558 | \subsection{非回路故障的推理算法}
559 | 我们知道,故障诊断的最终目的,是将故障定位到部件,而由于信号-部件依赖矩阵的存在,因此,实质性的工作是找出由故障部件发出异常信号,
560 | 不妨称为源异常信号,而如前所述,源异常信号与异常信号依赖矩阵$\mathbf{S_a}$的全零列是存在一一对应的关系的。因此,我们只要获得了$\mathbf{S_a}$的全零列的相关信息,
561 | 也就获得了源异常信号的信息,从而能进一步找到故障源。
562 | 通过以上分析,我们构造算法\ref{alg53},用于实现非回路故障诊断。
563 |
564 | 算法\ref{alg53}中,称$\beta$为源异常信号向量,该向量中与源异常信号对应的元素值为1,其它为0;
565 | 称$\gamma$为部件状态向量,该向量中非0元素对应的部件为故障部件~,0元素对应的部件为正常部件。
566 | 值得一提的是$\beta$和$\beta_a$的区别。$\beta$指出了源异常信号在所有信号中排序的位置,因此其维数与信号总数相同;
567 | 而$\beta_a$指出了源异常信号在所有异常信号中排序的位置,因此其维数与异常信号总数相同。如前所述,信号的“排序”是固定的,
568 | 这保证了算法在执行中不出现混乱。
569 | \begin{algorithm}[htbp]
570 | \caption{非回路故障诊断算法}
571 | \label{alg53}
572 | \begin{algorithmic}[1]
573 | \REQUIRE 信号--部件依赖矩阵$\mathbf{A}$,信号依赖矩阵$\mathbf{S}$,信号状态向量$\alpha$
574 | \ENSURE 部件状态向量$\gamma$
575 | \STATE $\mathbf{P}\leftarrow\left(<\alpha>\right)$
576 | \STATE $\mathbf{S_{a}}\leftarrow\mathbf{P^T}\mathbf{S}\mathbf{P}$
577 | \FOR{$i=1$ to $S_a$的阶数$m$}
578 | \STATE $s_i\leftarrow s_i$的第$i$个行向量
579 | \ENDFOR
580 | \STATE $\beta_a\leftarrow\lnot \left(s_1\lor s_2\lor \cdots\lor s_m\right)^T$
581 | \STATE $\beta\leftarrow\mathbf{P}\beta_a$
582 | \STATE $\gamma\leftarrow\mathbf{A}\beta$
583 | \end{algorithmic}
584 | \end{algorithm}
585 | \subsubsection{第一类故障回路的推理算法}
586 | 第一类故障回路推理与非回路故障推理是算法基本相同,稍微不同的是$\beta_a$的计算。因为第一类故障回路中的信号全部可能是源异常信号,因此我们不必计算
587 | $\beta_a=\lnot \left(\left[s_1\lor s_2\lor \cdots\lor s_m\right]^T\right)$,而直接取$\beta_a=\underbrace{\left[\begin{array}{cccc}1&1&\cdots&1\end{array}\right]^T}_m$,将$\beta_a$代入
588 | 算法\ref{alg53},有
589 | \[\beta=\mathbf{P}\beta_a=\mathbf{P}\underbrace{\left[\begin{array}{cccc}1&1&\cdots&1\end{array}\right]^T}_m=\alpha\]
590 | 因此一类故障回路的推理算法变得相当简单,例如算法\ref{alg54}
591 | \begin{algorithm}[htbp]
592 | \caption{第一类故障回路诊断算法}
593 | \label{alg54}
594 | \begin{algorithmic}[1]
595 | \REQUIRE 信号--部件依赖矩阵$\mathbf{A}$,信号状态向量$\alpha$
596 | \ENSURE 部件状态向量$\gamma$
597 | \STATE $\gamma\leftarrow\mathbf{A}\alpha$
598 | \end{algorithmic}
599 | \end{algorithm}
600 |
601 | \section{参考文献}
602 | \label{sec:bib}
603 | 当然参考文献可以直接写 bibitem,虽然费点功夫,但是好控制,各种格式可以自己随意改
604 | 写,在\scnuthesis{}里面,建议使用JabRef编辑和管理文献,再结合\verb|bstutf8.bst|之后,
605 | 对中文的支持也很好。
606 |
607 | 本模板推荐使用 BIB\TeX,样式文件为 bstutf8.bst,基本符合学校的参考文献格式(如专利
608 | 等引用未加详细测试)。看看这个例子,关于书的\upcite{tex, companion},
609 | 还有这些\upcite{clzs},关于杂志的\upcite{ELIDRISSI94,
610 | MELLINGER96, SHELL02},硕士论文\upcite{zhubajie, metamori2004},博士论文
611 | \upcite{shaheshang, FistSystem01},标准文件\upcite{IEEE-1363}~,会议论文\upcite{DPMG},%
612 | 技术报告\upcite{NPB2}。中文参考文献\upcite{cnarticle}\textsf{特别注意},需要在\verb|bibitem|中
613 | 增加\verb|language|域并设为\verb|zh|,英文此项可不填,之后由\verb|bstutf8|统一处理
614 | (具体就是决定一些文献的显示格式,如等、etc)。
615 | 若使用\verb|JabRef|,则选择\textsf{Options}$\rightarrow$\textsf{Set Up General Fields},
616 | 在\verb|General:|后加入\verb|language|就可以了。
617 |
618 | 有时候不想要上标,那么可以这样 \cite{shaheshang},这个非常重要。
619 |
620 | \section{代码高亮}
621 | 有些时候我们需要在论文中引入一段代码,用来衬托正文的内容,或者体现关键思路的实现。
622 | 在模板中,统一使用\texttt{listings}宏包,并且设置了基本的内容格式,并建议用户只
623 | 使用三个接口,分别控制:编程语言,行号以及边框。简洁达意即可,下面分别举例说明。
624 |
625 | 首先是设定语言,来一个C的,使用的是默认设置:
626 | \begin{lstlisting}[language=C]
627 | void sort(int arr[], int beg, int end)
628 | {
629 | if (end > beg + 1)
630 | {
631 | int piv = arr[beg], l = beg + 1, r = end;
632 | while (l < r)
633 | {
634 | if (arr[l] <= piv)
635 | l++;
636 | else
637 | swap(&arr[l], &arr[--r]);
638 | }
639 | swap(&arr[--l], &arr[beg]);
640 | sort(arr, beg, l);
641 | sort(arr, r, end);
642 | }
643 | }
644 | \end{lstlisting}
645 |
646 | 当我们需要高亮Java代码,不需要行号,不需要边框时,可以:
647 | \begin{lstlisting}[language=Java,numbers=none,frame=none]
648 | // A program to display the message
649 | // "Hello World!" on standard output
650 |
651 | public class HelloWorld {
652 |
653 | public static void main(String[] args) {
654 | System.out.println("Hello World!");
655 | }
656 |
657 | } // end of class HelloWorld
658 | \end{lstlisting}
659 |
660 | 细心的用户可能发现,行号被放在了正文框之外,事实上这样是比较美观的,如果有些用户希望在正文框架之内布置所有内容,
661 | 可以:
662 | \begin{lstlisting}[language=perl,xleftmargin=2em,framexleftmargin=1.5em]
663 | #!/usr/bin/perl
664 | print "Hello, world!\n";
665 | \end{lstlisting}
666 |
667 | 好了,就这么多,\texttt{listings}宏包的功能很强大也很复杂,如果需要自己定制,可以
668 | 查看其手册,耐心阅读总会找到答案。\textbf{注意:} 当前中文注释的处理还不是很完善,
669 | 对于注释请妥善处理。在本模板中,推荐算法环境或者去掉中文的listings代码环境。如果
670 | 需要包含中文注释,不要求代码高亮~,就用\texttt{code}环境,这个环境是Verbatim的定制
671 | 版,调用的fancyvbr宏包,用户可在myscnu.sty中修改。
672 |
673 | \begin{code}
674 | public class HelloWorld {
675 | public static void main(String[] args) {
676 | System.out.println("Hello World!");
677 | }
678 | } // 世界,你好!
679 | \end{code}
680 |
681 | \section{中文习惯}
682 | \label{sec:chinese}
683 |
684 | 对于itermize过大的行间距,用户可以使用compactitem环境来替代,但是模板中不进行默认替代,
685 | 因为只有用户真正发现列表不好看才会找到这里。
686 |
687 | 对于中文双引号,可以直接使用全角的\verb|“|和\verb|”|。但是英文则不行!英文的引
688 | 号用法请自行Google,或者阅读我的
689 | \href{https://dl.dropbox.com/u/49734213/LaTeX%E6%9C%AD%E8%AE%B0.pdf}{\LaTeX{}}札
690 | 记。
691 |
692 | 中文破折号为一个两个字宽垂直居中的直线,输入法直接得到的破折号没有垂直居中(——),
693 | 这看起来不舒服。所以模板中定义了一个破折号的命令 \verb|\pozhehao|,请看:
694 |
695 | 艰苦奋斗、严谨治学、求实创新、为人师表\hfill \pozhehao{}华南师范大学校训
--------------------------------------------------------------------------------
/data/chap03.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \chapter{结论}
3 | \label{chap:conclusion}
4 |
5 | 如来道:“圣僧,汝前世原是我之二徒,名唤金蝉子。因为汝不听说法,轻慢
6 | 我之大教,故贬汝之真灵,转生东土。今喜皈依,秉我迦持,又乘吾教,取去真经,
7 | 甚有功果,加升大职正果,汝为旃檀功德佛。孙悟空,汝因大闹天宫,吾以甚深法
8 | 力,压在五行山下,幸天灾满足,归于释教;且喜汝隐恶扬善,在途中炼魔降怪有
9 | 功,全终全始,加升大职正果,汝为斗战胜佛。猪悟能,汝本天河水神,天蓬元帅。
10 | 为汝蟠桃会上酗酒戏了仙娥,贬汝下界投胎,身如畜类。幸汝记爱人身,在福陵山
11 | 云栈洞造孽,喜归大教,入吾沙门,保圣僧在路,却又有顽心,色情未泯。因汝挑
12 | 担有功,加升汝职正果,做净坛使者。”八戒口中嚷道:“他们都成佛,如何把我
13 | 做个净坛使者?”如来道:“因汝口壮身慵,食肠宽大。盖天下四大部洲,瞻仰吾
14 | 教者甚多,凡诸佛事,教汝净坛,乃是个有受用的品级。如何不好——沙悟净,汝
15 | 本是卷帘大将,先因蟠桃会上打碎玻璃盏,贬汝下界,汝落于流沙河,伤生吃人造
16 | 孽,幸皈吾教,诚敬迦持,保护圣僧,登山牵马有功,加升大职正果,为金身罗汉。”
17 | 又叫那白马:“汝本是西洋大海广晋龙王之子。因汝违逆父命,犯了不孝之罪,幸
18 | 得皈身皈法,皈我沙门,每日家亏你驮负圣僧来西,又亏你驮负圣经去东,亦有功
19 | 者,加升汝职正果,为八部天龙。”
20 |
21 | 因此:
22 |
23 | \begin{compactitem}
24 | \item 唐僧封为旃檀功德佛;
25 | \item 孙悟空封为斗战胜佛;
26 | \item 猪八戒封为净坛使者;
27 | \item 沙河尚封为金身罗汉;
28 | \item 白龙马封为八部天龙。
29 | \item 华师是个好学校。
30 | \end{compactitem}
31 |
32 |
33 |
--------------------------------------------------------------------------------
/data/denotation.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \begin{denotation}
3 |
4 | \item[SCNU] 华南师范大学 (South China Normal University)
5 | \item[API] 应用程序编程接口
6 | \item[cluster] 集群
7 | \item[graphic] 图形
8 | \item[communication] 通信
9 | \item[3D] 三维 (Three Dimemsion)
10 | \item[BMP] 位图
11 | \item[PNG] 便携式网络图形 (Portable Network Graphics)
12 | \item[Watershed] 分水岭
13 | \item[GUI] 图形用户界面 (Graphical User Interface)
14 | \item[$E$] 能量
15 | \item[$m$] 质量
16 | \item[$c$] 光速
17 | \item[$P$] 概率
18 | \item[$T$] 时间
19 | \item[$v$] 速度
20 |
21 | \end{denotation}
22 |
--------------------------------------------------------------------------------
/data/info.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \classification{} % 分类号
3 | \udc{} % UDC号
4 | \confidentiality{公开} % 密级
5 | \serialno{2021023266} % 学号
6 | \mastertype{专业} % 硕士学位类型(只用于硕士论文)
7 | \title{华南师范大学硕士/博士学位论文\LaTeX{}模板使用手册}
8 | \entitle{HOW TO USE THE \LaTeX{} DOCUMENT CLASS\\ FOR SCNU DISSERTATIONS}
9 | \displaytitle{华南师范大学硕士/博士学位论文\LaTeX{}模板使用手册}
10 | \author{张三}
11 | \enauthor{San Zhang}
12 | \subject{计算机技术}
13 | \ensubject{Computer Technology}
14 | \degreename{电子信息硕士}
15 | \researchfield{计算机技术}
16 | \school{人工智能学院}
17 | \supervisor{李四}
18 | \ensupervisor{Si Li}
19 | \protitle{教授}
20 | \zhdate{\zhtoday}
21 |
--------------------------------------------------------------------------------
/data/resume.tex:
--------------------------------------------------------------------------------
1 | %!TEX root = ../thesis.tex
2 | \begin{resume}
3 |
4 | \section*{发表的学术论文} % 发表的和录用的合在一起
5 |
6 | \begin{enumerate}[{[}1{]}]
7 | \addtolength{\itemsep}{-.36\baselineskip}%缩小条目之间的间距,下面类似
8 | \item Yang Y, Ren T L, Zhang L T, et al. Miniature microphone with silicon-
9 | based ferroelectric thin films. Integrated Ferroelectrics, 2003,
10 | 52:229-235. (SCI 收录, 检索号:758FZ.)
11 | \item 杨轶, 张宁欣, 任天令, 等. 硅基铁电微声学器件中薄膜残余应力的研究. 中国机
12 | 械工程, 2005, 16(14):1289-1291. (EI 收录, 检索号:0534931 2907.)
13 | \item 杨轶, 张宁欣, 任天令, 等. 集成铁电器件中的关键工艺研究. 仪器仪表学报,
14 | 2003, 24(S4):192-193. (EI 源刊.)
15 | \item Yang Y, Ren T L, Zhu Y P, et al. PMUTs for handwriting recognition. In
16 | press. (已被 Integrated Ferroelectrics 录用. SCI 源刊.)
17 | \item Wu X M, Yang Y, Cai J, et al. Measurements of ferroelectric MEMS
18 | microphones. Integrated Ferroelectrics, 2005, 69:417-429. (SCI 收录, 检索号
19 | :896KM.)
20 | \item 贾泽, 杨轶, 陈兢, 等. 用于压电和电容微麦克风的体硅腐蚀相关研究. 压电与声
21 | 光, 2006, 28(1):117-119. (EI 收录, 检索号:06129773469.)
22 | \item 伍晓明, 杨轶, 张宁欣, 等. 基于MEMS技术的集成铁电硅微麦克风. 中国集成电路,
23 | 2003, 53:59-61.
24 | \end{enumerate}
25 |
26 | \section*{研究成果} % 有就写,没有就删除
27 | \begin{enumerate}[{[}1{]}]
28 | \addtolength{\itemsep}{-.36\baselineskip}%
29 | \item 任天令, 杨轶, 朱一平, 等. 硅基铁电微声学传感器畴极化区域控制和电极连接的
30 | 方法: 中国, CN1602118A. (中国专利公开号.)
31 | \item Ren T L, Yang Y, Zhu Y P, et al. Piezoelectric micro acoustic sensor
32 | based on ferroelectric materials: USA, No.11/215, 102. (美国发明专利申请号.)
33 | \end{enumerate}
34 | \end{resume}
35 |
--------------------------------------------------------------------------------
/figures/building.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/building.jpg
--------------------------------------------------------------------------------
/figures/cat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/cat.jpg
--------------------------------------------------------------------------------
/figures/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/logo.jpg
--------------------------------------------------------------------------------
/figures/scnu.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/scnu.pdf
--------------------------------------------------------------------------------
/figures/scnu.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
887 |
--------------------------------------------------------------------------------
/figures/struct.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/struct.pdf
--------------------------------------------------------------------------------
/figures/tikz.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/tikz.pdf
--------------------------------------------------------------------------------
/figures/title.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/title.pdf
--------------------------------------------------------------------------------
/figures/title.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
83 |
--------------------------------------------------------------------------------
/figures/typography.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/figures/typography.pdf
--------------------------------------------------------------------------------
/makepdf.bat:
--------------------------------------------------------------------------------
1 | @echo off
2 | if "%1"=="" goto :NO_ARGS
3 | if "%1"=="clean" goto :CLEAN_ME
4 | goto :ERROR
5 |
6 | :NO_ARGS
7 | call :makefile
8 | goto :EOF
9 | :CLEAN_ME
10 | call :CleanFolder
11 | goto :EOF
12 | :ERROR
13 | call :helpme
14 | goto :EOF
15 |
16 |
17 | :CleanFolder
18 | del *.aux *.lo? *.toc *.ind *.inx *.gls *.glo *.ist *.idx *.ilg *.out *.bak *.bbl *.brf *.blg *.dvi *.ps data\*.aux
19 | goto :EOF
20 |
21 | :makefile
22 | call :CleanFolder
23 | xelatex thesis.tex rem generate .toc file
24 | xelatex thesis.tex rem generate pdf file
25 | goto :EOF
26 |
27 | :helpme
28 | echo Wrong parameter, the usage is:
29 | echo "make" - to make the pdf file
30 | echo "make clean" - to clean the work directory
31 | goto :EOF
32 |
--------------------------------------------------------------------------------
/myscnu.sty:
--------------------------------------------------------------------------------
1 | \ProvidesPackage{myscnu}
2 | % 这里添加你的论文中专门使用的宏包
3 |
4 | % 算法以及列表环境
5 | \RequirePackage{cases,listings}
6 | \RequirePackage{fancyvrb}
7 | \RequirePackage[chapter]{algorithm}
8 | \RequirePackage{algorithmic}
9 | \RequirePackage{CJKnumb}
10 |
11 | % 配置Lstlisting
12 | \lstset{
13 | columns=flexible,sensitive=true,lineskip=-3pt,
14 | basicstyle=\small\ttfamily,
15 | keywordstyle=\color{blue}\bfseries,
16 | stringstyle=\ttfamily,
17 | commentstyle=\color{red!50!green!50!blue!50},
18 | numbers=left,numberstyle=\tiny,
19 | xleftmargin=0.5em,xrightmargin=0.5em,aboveskip=0.5em,
20 | showstringspaces=false,breaklines=true,extendedchars=true,escapeinside=``,
21 | frame=shadowbox,rulesepcolor=\color{red!20!green!20!blue!20}}
22 |
23 | % 配置算法包
24 | \algsetup{indent=3em}
25 | \floatname{algorithm}{算法}
26 | \renewcommand{\algorithmicrequire}{\textbf{已知:}}
27 | \renewcommand{\algorithmicensure}{\textbf{求:}}
28 |
29 | \DefineVerbatimEnvironment{code}{Verbatim}%
30 | {frame=single,framerule=0.3mm,rulecolor=\color{black},%
31 | fillcolor=\color{red!20!green!20!blue!20},framesep=1mm,fontsize=\small}
32 |
33 | % 自定义其他命令
34 | \newcommand{\myscnu}{我的导言}
35 | \newcommand{\ve}[1]{\ensuremath{\bm #1}}
36 |
37 | % tabularx 中的 Z 环境,居中自动调整
38 | \newcolumntype{Z}{>{\centering\arraybackslash}X}
39 |
40 | % %
41 | \endinput
42 |
--------------------------------------------------------------------------------
/ref/refs.bib:
--------------------------------------------------------------------------------
1 | % This file was created with JabRef 2.7.2.
2 | % Encoding: UTF8
3 |
4 | @ARTICLE{ELIDRISSI94,
5 | author = {{Chafik El Idrissi}, M. and {Roney}, A. and {Frigon}, C. and {Larzilli{\`e}re},M.},
6 | title = {Measurements of total kinetic-energy released to the {$N=2$} dissociation
7 | limit of {H}$_2$ --- evidence of the dissociation of very high vibrational
8 | {R}ydberg states of {H}$_2$ by doubly-excited states},
9 | journal = {Chemical Physics Letters},
10 | year = {1994},
11 | volume = {224},
12 | pages = {260-266},
13 | number = {10}
14 | }
15 |
16 | @BOOK{companion,
17 | title = {The {\LaTeX} Companion},
18 | publisher = {Addison-Wesley Publishing Company},
19 | year = {1994},
20 | author = {Michel Goosens and Frank Mittelbach and Alexander Samarin},
21 | pages = {112--125},
22 | address = {Reading, MA}
23 | }
24 |
25 | @BOOK{IEEE-1363,
26 | title = {{IEEE} Standard Specifications for Public-Key Cryptography},
27 | publisher = {IEEE},
28 | year = {2000},
29 | author = {{IEEE Std 1363-2000}},
30 | address = {New York}
31 | }
32 |
33 | @MASTERSTHESIS{metamori2004,
34 | author = {Ashwin Raju Jeyakumar},
35 | title = {Metamori: A library for Incremental File Checkpointing},
36 | school = {Virgina Tech},
37 | year = {2004},
38 | address = {Blacksburg},
39 | month = {jun 21}
40 | }
41 |
42 | @INPROCEEDINGS{DPMG,
43 | author = {Kim, Sangbum and Woo, Namyoon and Yeom, Heon Y. and Park, Taesoon
44 | and Park, Hyoungwoo},
45 | title = {Design and {I}mplementation of {D}ynamic {P}rocess {M}anagement for
46 | {G}rid-enabled {MPICH}},
47 | booktitle = {the 10th European PVM/MPI Users' Group Conference},
48 | year = {2003},
49 | address = {Venice, Italy},
50 | month = {sep}
51 | }
52 |
53 | @BOOK{tex,
54 | title = {The {\TeX} Book},
55 | publisher = {Addison-Wesley Publishing Company},
56 | year = {1989},
57 | author = {Donald E. Knuth},
58 | address = {Reading, MA},
59 | edition = {15th}
60 | }
61 |
62 | @ARTICLE{Maddage2009,
63 | author = {Maddage, N. and Li, H. and Kankanhalli, M.},
64 | title = {A Survey of Music Structure Analysis Techniques for Music Applications},
65 | journal = {Recent Advances in Multimedia Signal Processing and Communications},
66 | year = {2009},
67 | pages = {551--577},
68 | owner = {ehome},
69 | publisher = {Springer},
70 | timestamp = {2012.06.13}
71 | }
72 |
73 | @ARTICLE{MELLINGER96,
74 | author = {Mellinger, A. and Vidal, C. R. and Jungen, Ch.},
75 | title = {Laser reduced fluorescence study of the carbon-monoxide nd triplet
76 | {R}ydberg series-experimental results and multichannel quantum-defect
77 | analysis},
78 | journal = {J. Chem. Phys.},
79 | year = {1996},
80 | volume = {104},
81 | pages = {8913-8921},
82 | number = {5}
83 | }
84 |
85 | @ARTICLE{SHELL02,
86 | author = {Michael Shell},
87 | title = {How to Use the {IEEEtran {\LaTeX}} Class},
88 | journal = {Journal of {\LaTeX} Class Files},
89 | year = {2002},
90 | volume = {12},
91 | pages = {100--120},
92 | number = {4}
93 | }
94 |
95 | @TECHREPORT{NPB2,
96 | author = {Alex Woo and David Bailey and Maurice Yarrow and Wijngaart Wijngaart
97 | and Tim Harris and William Saphir},
98 | title = {The {NAS} Parallel Benchmarks 2.0},
99 | institution = {The Pennsylvania State University CiteSeer Archives},
100 | year = {1995},
101 | month = {dec 05},
102 | url = {http://www.nasa.org/}
103 | }
104 |
105 | @PHDTHESIS{FistSystem01,
106 | author = {Erez Zadok},
107 | title = {{FiST}: A System for Stackable File System Code Generation},
108 | school = {Computer Science Department, Columbia University},
109 | year = {2001},
110 | address = {USA},
111 | month = {May}
112 | }
113 |
114 | @PHDTHESIS{shaheshang,
115 | author = {沙和尚},
116 | title = {论流沙河的综合治理},
117 | school = {清华大学},
118 | year = {2005},
119 | address = {北京},
120 | language = {zh}
121 | }
122 |
123 | @MASTERSTHESIS{zhubajie,
124 | author = {猪八戒},
125 | title = {论流体食物的持久保存这是一个很长很长的题目用来测试BiBTeX会不会出现乱码貌似北邮的BST工作的很好},
126 | school = {广寒宫大学},
127 | year = {2005},
128 | address = {北京},
129 | language = {zh}
130 | }
131 |
132 | @INPROCEEDINGS{cnproceed,
133 | author = {王重阳 and 黄药师 and 欧阳峰 and 洪七公 and 段皇帝},
134 | title = {武林高手从入门到精通},
135 | booktitle = {第~$N$~次华山论剑},
136 | year = {2006},
137 | address = {西安, 中国},
138 | month = {sep},
139 | language = {zh}
140 | }
141 |
142 | @ARTICLE{cnarticle,
143 | author = {贾宝玉 and 林黛玉 and 薛宝钗 and 贾探春},
144 | title = {论刘姥姥食量大如牛之现实意义},
145 | journal = {红楼梦杂谈},
146 | year = {1800},
147 | volume = {224},
148 | pages = {260--266},
149 | language = {zh}
150 | }
151 |
152 | @INBOOK{clzs,
153 | chapter = {大人物还是讲人情的},
154 | pages = {185-207},
155 | title = {沧浪之水},
156 | publisher = {人民文学出版社},
157 | year = {2001},
158 | author = {阎真},
159 | language = {zh}
160 | }
161 |
162 | @comment{jabref-meta: selector_publisher:}
163 |
164 | @comment{jabref-meta: selector_author:}
165 |
166 | @comment{jabref-meta: selector_journal:}
167 |
168 | @comment{jabref-meta: selector_keywords:}
169 |
170 |
--------------------------------------------------------------------------------
/scnuthesis.cls:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `scnuthesis.cls',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% scnuthesis.dtx (with options: `cls')
8 | %%
9 | %% !Mode:: "TeX:UTF-8"
10 | %%
11 | %% This is a generated file.
12 | %%
13 | %% Copyright (C) 2015 by Joseph Pan
14 | %%
15 | %% This file may be distributed and/or modified under the
16 | %% conditions of the LaTeX Project Public License, either version 1.3a
17 | %% of this license or (at your option) any later version.
18 | %% The latest version of this license is in:
19 | %%
20 | %% http://www.latex-project.org/lppl.txt
21 | %%
22 | %% and version 1.3a or later is part of all distributions of LaTeX
23 | %% version 2004/10/01 or later.
24 | %%
25 | %% To produce the documentation run the original source files ending with `.dtx'
26 | %% through LaTeX.
27 | %%
28 | %% Any Suggestions : Joseph Pan
29 | %% Thanks LiuBenYuan for the nudtpapre class!
30 | %% Thanks Xue Ruini for the thuthesis class!
31 | %% Thanks sofoot for the original NUDT paper class!
32 | %%
33 | \NeedsTeXFormat{LaTeX2e}[1999/12/01]
34 | \ProvidesClass{scnuthesis}
35 |
36 | \newif\ifismaster\ismastertrue
37 | \newif\ifisttf\isttftrue
38 | \DeclareOption{master}{\ismastertrue}
39 | \DeclareOption{doctor}{\ismasterfalse}
40 | \newif\ifisanon\isanonfalse
41 | \DeclareOption{anon}{\isanontrue}
42 | \newif\ifistwoside\istwosidefalse
43 | \DeclareOption{twoside}{\istwosidetrue}
44 | \DeclareOption{ttf}{\isttftrue}
45 | \DeclareOption{otf}{\isttffalse}
46 | \newif\ifisvista\isvistafalse
47 | \DeclareOption{vista}{\isvistatrue}
48 | \newif\ifischapter\ischapterfalse
49 | \DeclareOption{chapterhead}{\ischaptertrue}
50 | \DeclareOption*{\PackageWarning{scnuthesis}{Unknown Option '\CurrentOption'}}
51 | \ProcessOptions\relax
52 | \RequirePackage{ifthen,calc}
53 | \ifistwoside
54 | \LoadClass[a4paper,12pt,openright,twoside]{book}
55 | \else
56 | \LoadClass[a4paper,12pt,openany]{book}
57 | \fi
58 | \RequirePackage[includeheadfoot]{geometry}
59 | \RequirePackage[center,pagestyles]{titlesec}
60 | \RequirePackage{titletoc}
61 | \RequirePackage{graphicx}
62 | \RequirePackage[config]{subfig}
63 | \RequirePackage{float}
64 | \RequirePackage{array}
65 | \RequirePackage{longtable}
66 | \RequirePackage{booktabs}
67 | \RequirePackage{multirow}
68 | \RequirePackage{tabularx}
69 | \RequirePackage{diagbox}
70 | \RequirePackage[neverdecrease]{paralist}
71 | \RequirePackage{xcolor}
72 | \RequirePackage{amsmath,amssymb,bm}
73 | \RequirePackage[varg]{txfonts}
74 | \RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
75 | \RequirePackage[no-math,BoldFont,SlantFont]{xeCJK}
76 | \RequirePackage{CJKnumb}
77 | \punctstyle{hangmobanjiao}
78 | \RequirePackage{ulem}
79 | \RequirePackage{indentfirst}
80 | \RequirePackage{setspace}
81 | \RequirePackage[numbers,sort&compress,square]{natbib}
82 | \RequirePackage[CJKbookmarks=true,pdfborder=0 0 1]{hyperref}
83 | \defaultfontfeatures{Mapping=tex-text}
84 | \xeCJKsetcharclass{"0}{"2E7F}{0}
85 | \xeCJKsetcharclass{"2E80}{"FFFF}{1}
86 | \newcommand\installTTF{%
87 | \setmainfont{Times New Roman}
88 | \setsansfont{Arial}
89 | \setmonofont{Courier New}
90 | \ifisvista
91 | \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
92 | \setCJKmonofont{KaiTi} % Pluto use LiSu Thu use Kaiti, orig is SimSun
93 | \setCJKfamilyfont{fs}{FangSong}
94 | \setCJKfamilyfont{kai}{KaiTi}
95 | \else
96 | \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi_GB2312}]{SimSun}
97 | \setCJKmonofont{KaiTi_GB2312} % Pluto use LiSu Thu use Kaiti, orig is SimSun
98 | \setCJKfamilyfont{fs}{FangSong_GB2312}
99 | \setCJKfamilyfont{kai}{KaiTi_GB2312}
100 | \fi
101 | \setCJKsansfont{SimHei}
102 | \setCJKfamilyfont{song}{SimSun}
103 | \setCJKfamilyfont{hei}{SimHei}
104 | \setCJKfamilyfont{li}{LiSu}
105 | \setCJKfamilyfont{you}{YouYuan}
106 | }
107 | \newcommand\installOTF{%
108 | \setmainfont{Times New Roman} % could be changed to "Times New Roman PS Std"
109 | \setsansfont{Arial}
110 | \setmonofont{Courier New}
111 | \setCJKmainfont[BoldFont={Adobe Heiti Std},ItalicFont={Adobe Kaiti Std}]{Adobe Song Std}
112 | \setCJKsansfont{Adobe Heiti Std}
113 | \setCJKmonofont{Adobe Kaiti Std}
114 | \setCJKfamilyfont{song}{Adobe Song Std}
115 | \setCJKfamilyfont{hei}{Adobe Heiti Std}
116 | \setCJKfamilyfont{fs}{Adobe Fangsong Std}
117 | \setCJKfamilyfont{kai}{Adobe Kaiti Std}
118 | \setCJKfamilyfont{li}{Adobe Kaiti Std}
119 | \setCJKfamilyfont{you}{Adobe Kaiti Std}
120 | }
121 |
122 | \ifisttf
123 | \installTTF
124 | \else
125 | \installOTF
126 | \fi
127 | \newcommand{\song}{\CJKfamily{song}} % 宋体
128 | \newcommand{\fs}{\CJKfamily{fs}} % 仿宋体
129 | \newcommand{\kai}{\CJKfamily{kai}} % 楷体
130 | \newcommand{\hei}{\CJKfamily{hei}} % 黑体
131 | \newcommand{\li}{\CJKfamily{li}} % 隶书
132 | \newcommand{\you}{\CJKfamily{you}} % 幼圆
133 | \def\songti{\song}
134 | \def\fangsong{\fs}
135 | \def\kaishu{\kai}
136 | \def\heiti{\hei}
137 | \def\lishu{\li}
138 | \def\youyuan{\you}
139 | \newlength\thu@linespace
140 | \newcommand{\thu@choosefont}[2]{%
141 | \setlength{\thu@linespace}{#2*\real{#1}}%
142 | \fontsize{#2}{\thu@linespace}\selectfont}
143 | \def\thu@define@fontsize#1#2{%
144 | \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
145 | \thu@choosefont{##1}{#2}}}
146 | \thu@define@fontsize{chuhao}{42bp}
147 | \thu@define@fontsize{xiaochu}{36bp}
148 | \thu@define@fontsize{yihao}{26bp}
149 | \thu@define@fontsize{xiaoyi}{24bp}
150 | \thu@define@fontsize{erhao}{22bp}
151 | \thu@define@fontsize{xiaoer}{18bp}
152 | \thu@define@fontsize{sanhao}{16bp}
153 | \thu@define@fontsize{xiaosan}{15bp}
154 | \thu@define@fontsize{sihao}{14bp}
155 | \thu@define@fontsize{banxiaosi}{13bp}
156 | \thu@define@fontsize{xiaosi}{12bp}
157 | \thu@define@fontsize{dawu}{11bp}
158 | \thu@define@fontsize{wuhao}{10.5bp}
159 | \thu@define@fontsize{xiaowu}{9bp}
160 | \thu@define@fontsize{liuhao}{7.5bp}
161 | \thu@define@fontsize{xiaoliu}{6.5bp}
162 | \thu@define@fontsize{qihao}{5.5bp}
163 | \thu@define@fontsize{bahao}{5bp}
164 | \newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}} % 上标形式引用
165 | \newcommand{\china}{中华人民共和国}
166 | \def\thuthesis{\textsc{Thu}-\textsc{Thesis}}
167 | \def\nudtpaper{\textsc{Nudt}\textsc{Paper}}
168 | \def\scnuthesis{\textsc{SCNU}\textsc{Thesis}}
169 | \newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex}
170 | \newcommand{\chapterlabel}{}
171 | \renewcommand\contentsname{\hei 目\hspace{1em}录}
172 | \renewcommand\listfigurename{\hei 图\hspace{1em}目\hspace{1em}录}
173 | \renewcommand\listtablename{\hei 表\hspace{1em}目\hspace{1em}录}
174 | \newcommand\denotationname{\hei 符号列表}
175 | \newcommand\ackname{致\hspace{1em}谢}
176 | \newcommand\resumename{作者攻读学位期间发表的学术论文目录}
177 | \newcommand\listequationname{公式索引}
178 | \newcommand\equationname{公式}
179 | \renewcommand\bibname{参考文献}
180 | \renewcommand\indexname{索引}
181 | \renewcommand\figurename{图}
182 | \renewcommand\tablename{表}
183 | \renewcommand\appendixname{附录}
184 | \def\CJK@today{\the\year 年 \the\month 月 \the\day 日}
185 | \newcommand\zhtoday{\CJK@today}
186 | \newcommand\entoday{\today{}}
187 | \geometry{top=21mm,bottom=25.5mm,left=30mm,right=30mm}
188 | \geometry{headheight=9mm,headsep=1mm,footskip=10mm}
189 | \renewcommand\setheadrule[1]{%
190 | \ifdim#1=\z@
191 | \let\makeheadrule\@empty
192 | \else
193 | \def\makeheadrule{%
194 | \makebox[0pt][l]{\rule[.2\baselineskip]{\linewidth}{1.5pt}}%
195 | }%
196 | \fi
197 | }
198 |
199 | \renewcommand{\chaptermark}[1]{\markboth{\chaptertitlename~\ #1}{}}
200 |
201 | \renewpagestyle{plain}{
202 | \sethead{}{\raisebox{.65\baselineskip}
203 | {
204 | \songti \wuhao
205 | \ifischapter % 标题作为页眉
206 | \ifistwoside
207 | {
208 | \ifodd \value{page} % 奇数页
209 | {\chaptertitle}
210 | \else % 偶数页
211 | {\@displaytitle}\fi
212 | }
213 | \else
214 | {\chaptertitle}\fi
215 | \else %标题不作为页眉
216 | {\@displaytitle}\fi
217 | }
218 | }{}
219 | \headrule%
220 | \setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
221 | \footrule%
222 | \setfootrule{1bp}
223 | }
224 |
225 | \newpagestyle{mpage}{
226 | \sethead{}{\raisebox{.65\baselineskip}
227 | {
228 | \songti \wuhao
229 | \ifischapter % 标题作为页眉
230 | \ifistwoside
231 | {
232 | \ifodd \value{page} % 奇数页
233 | {第\thechapter 章\hspace{1em}\chaptertitle}
234 | \else % 偶数页
235 | {\@displaytitle}\fi
236 | }
237 | \else
238 | {第\thechapter 章\hspace{1em}\chaptertitle}\fi
239 | \else %标题不作为页眉
240 | {\@displaytitle}\fi
241 | }
242 | }{}
243 | \headrule%
244 | \setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
245 | \footrule%
246 | \setfootrule{1bp}
247 | }
248 |
249 | \newpagestyle{appendixpage}{
250 | \sethead{}{\raisebox{.65\baselineskip}
251 | {
252 | \songti \wuhao
253 | \ifischapter % 标题作为页眉
254 | \ifistwoside
255 | {
256 | \ifodd \value{page} % 奇数页
257 | {附录\thechapter\hspace{1em}\chaptertitle}
258 | \else % 偶数页
259 | {\@displaytitle}\fi
260 | }
261 | \else
262 | {附录\thechapter\hspace{1em}\chaptertitle}\fi
263 | \else %标题不作为页眉
264 | {\@displaytitle}\fi
265 | }
266 | }{}
267 | \headrule%
268 | \setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
269 | \footrule%
270 | \setfootrule{1bp}
271 | }
272 |
273 | \newpagestyle{emptypage}{
274 | \sethead{}{\raisebox{.65\baselineskip}
275 | {
276 | \songti \wuhao
277 | \ifischapter % 标题作为页眉
278 | \ifistwoside
279 | {
280 | \ifodd \value{page} % 奇数页
281 | {\chapterlabel}
282 | \else % 偶数页
283 | {\@displaytitle}\fi
284 | }
285 | \else
286 | {\chapterlabel}\fi
287 | \else %标题不作为页眉
288 | {\@displaytitle}\fi
289 | }
290 | }{}
291 | \headrule%
292 | \setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
293 | \footrule%
294 | \setfootrule{1bp}
295 | }
296 |
297 | \renewcommand\frontmatter{%
298 | \if@openright\cleardoublepage\else\clearpage\fi
299 | \@mainmatterfalse
300 | \pagenumbering{Roman}
301 | \pagestyle{plain}
302 | }
303 |
304 | \renewcommand\mainmatter{%
305 | \if@openright\cleardoublepage\else\clearpage\fi
306 | \@mainmattertrue
307 |
308 | \pagenumbering{arabic}
309 | \normalsize % normal, 正文开始
310 | \def\@tabular{\wuhao[1.25]\old@tabular} % 之后表格字体使用5号
311 |
312 | \pagestyle{mpage}
313 | }
314 | \renewcommand\backmatter{%
315 | \if@openright\cleardoublepage\else\clearpage\fi
316 | \titleformat{\chapter}{\filcenter \heiti \sanhao}{附录\,\thechapter\,}{1em}{}
317 | \titlecontents{chapter}[0pt]{\vspace{0.25\baselineskip} \heiti \xiaosi[1.25]}
318 | {附录\,\thecontentslabel\quad}{}
319 | {\hspace{.5em}\titlerule*{.}\contentspage}
320 | \@mainmattertrue
321 | \pagestyle{appendixpage}
322 | }
323 | \renewcommand\cleardoublepage{\clearpage\if@openright \ifodd\c@page
324 | \else
325 | \newpage{}
326 | \thispagestyle{empty}
327 | \vspace*{\fill}
328 | \begin{center}
329 | \end{center}
330 | \vspace*{\fill}
331 | \clearpage\fi\fi%
332 | }
333 | %%
334 | \newcommand\cabstractname{摘\hspace{1em}要}
335 | \newcommand\ckeywordsname{\hspace{-2em}{\heiti \sihao 关键词:}}
336 | \newcommand\ckeywords[1]{{\xiaosi \songti \ckeywordsname #1}}
337 |
338 | \newcommand\eabstractname{ABSTRACT}
339 | \newcommand\ekeywordsname{\hspace{-2em}{\textsf{KEY WORDS:}}}
340 | \newcommand\ekeywords[1]{{\xiaosi \ekeywordsname~#1}}
341 | \newenvironment{cabstract}{%
342 | {\if@openright\cleardoublepage\else\clearpage\fi}%
343 | \addcontentsline{toc}{chapter}{\cabstractname}%
344 | ~
345 | \begin{spacing}{2.0}
346 | \begin{center}{\sanhao \hei \@displaytitle}\end{center}%
347 | \end{spacing}
348 | \xiaosi \vspace{1.4pt}%
349 | \ifisanon{}\else{
350 | \begin{center}%
351 | \begin{tabular}[c]{ll}%
352 | 专业名称: & \@subject \\%
353 | 申请者:& \@author \\%
354 | 导师: & \@supervisor \\%
355 | \end{tabular}%
356 | \end{center}%
357 | }\fi
358 | ~\\%
359 | ~\\%
360 | ~\\%
361 | {\heiti\xiaosan \cabstractname} %
362 |
363 | % \@afterheading
364 | }
365 | {\par\vspace{2em}\par}
366 |
367 | \newenvironment{eabstract}{%
368 | \if@openright\cleardoublepage\else\clearpage\fi%
369 | \addcontentsline{toc}{chapter}{\eabstractname}%
370 | ~
371 | \begin{spacing}{2.0}
372 | \begin{center}{\sanhao \textsf{\@entitle}}\end{center}%
373 | \end{spacing}
374 | \xiaosi \vspace{1.4pt}
375 | \ifisanon{}\else{
376 | \begin{center}%
377 | \begin{tabular}[c]{ll}%
378 | Major: & \@ensubject \\%
379 | Name:& \@enauthor \\%
380 | Supervisor: & \@ensupervisor \\%
381 | \end{tabular}%
382 | \end{center}%
383 | }\fi
384 | ~\\%
385 | ~\\%
386 | ~\\%
387 | {\sihao \textsf \eabstractname} %
388 |
389 | % \@afterheading
390 | }
391 | {\par\vspace{2em}\par}
392 | \titlecontents{chapter}[0pt]{\vspace{0.25\baselineskip} \heiti \xiaosi[1.25]}
393 | {第\CJKnumber{\thecontentslabel}章\quad}{}
394 | {\hspace{.5em}\titlerule*{.}\contentspage}
395 | \titlecontents{section}[2em]{\songti \xiaosi[1.25]}
396 | {\thecontentslabel\quad}{}
397 | {\hspace{.5em}\titlerule*{.}\contentspage}
398 | \titlecontents{subsection}[4em]{\songti \xiaosi[1.25]}
399 | {\thecontentslabel\quad}{}
400 | {\hspace{.5em}\titlerule*{.}\contentspage}
401 | \titlecontents{figure}[0pt]{\songti \xiaosi[1.25]}
402 | {\makebox[3.5em][l]{图~\thecontentslabel\quad}}{}
403 | {\hspace{.5em}\titlerule*{.}\contentspage}
404 | \titlecontents{table}[0pt]{\songti \xiaosi[1.25]}
405 | {\makebox[3.5em][l]{表~\thecontentslabel\quad}}{}
406 | {\hspace{.5em}\titlerule*{.}\contentspage}
407 | \renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
408 | \global\@topnum\z@
409 | \@afterindentfalse
410 | \secdef\scnu@chapter\@schapter}
411 | \def\scnu@chapter[#1]#2{
412 | \ifnum \c@secnumdepth >\m@ne
413 | \if@openright\cleardoublepage\else\clearpage\fi
414 | \phantomsection
415 | \if@mainmatter
416 | \refstepcounter{chapter}%
417 | \addcontentsline{toc}{chapter}%
418 | {\protect\numberline{\thechapter}#1}%
419 | \else
420 | \addcontentsline{toc}{chapter}{#1}%
421 | \fi
422 | \else
423 | \addcontentsline{toc}{chapter}{#1}%
424 | \fi
425 | \chaptermark{#1}%
426 | \if@twocolumn
427 | \@topnewpage[\@makechapterhead{#2}]%
428 | \else
429 | \@makechapterhead{#2}%
430 | \@afterheading
431 | \fi
432 | }
433 | \newcommand{\sectionbreak}{%
434 | \addpenalty{-300}%
435 | \vspace*{0pt}%
436 | }
437 | \setlength{\topskip}{0pt}
438 | \setcounter{secnumdepth}{3}
439 | \titleformat{\chapter}{\filcenter \songti \bfseries \sanhao[1.25]}{第\CJKnumber{\thechapter}章\,}{1em}{}
440 | \titleformat{\section}{\songti \bfseries\xiaosan[1.25]}{\thesection}{1em}{}
441 | \titleformat{\subsection}{\songti \bfseries\sihao[1.25]}{\thesubsection}{1em}{}
442 | \titleformat{\subsubsection}{\songti \bfseries\xiaosi[1.25]}{\thesubsubsection}{1em}{}
443 | \titlespacing{\chapter}{0pt}{2.4ex-\topskip-\heightof{A}}{2.4ex}
444 | \titlespacing{\section}{0pt}{2ex-\heightof{a}}{2ex}
445 | \titlespacing{\subsection}{0em}{2ex}{2ex}
446 | \titlespacing{\subsubsection}{0em}{1ex}{0ex}
447 | \renewcommand\normalsize{%
448 | \xiaosi%
449 | \renewcommand{\baselinestretch}{1.4}%
450 | \setlength\abovedisplayskip{10bp \@plus 2bp \@minus 2bp}%
451 | \setlength\abovedisplayshortskip{10bp \@plus 2bp \@minus 2bp}%
452 | \setlength\belowdisplayskip{\abovedisplayskip}%
453 | \setlength\belowdisplayshortskip{\abovedisplayshortskip}%
454 | }
455 | \setlength{\parindent}{2em}
456 | \setlength{\parskip}{0bp \@plus .5bp \@minus .5bp}
457 | \newcommand*{\ziju}[1]{\renewcommand{\CJKglue}{\hskip #1}}
458 | \renewenvironment{thebibliography}[1]{%
459 |
460 | \thispagestyle{emptypage}
461 | \chapter*{\bibname}%
462 |
463 | \addcontentsline{toc}{chapter}{\bibname}
464 |
465 | \list{\@biblabel{\@arabic\c@enumiv}}%
466 | {\renewcommand{\makelabel}[1]{##1\hfill}
467 | \settowidth\labelwidth{1.1cm}
468 | \setlength{\labelsep}{0.4em}
469 | \setlength{\itemindent}{0pt}
470 | \setlength{\leftmargin}{\labelwidth+\labelsep}
471 | \addtolength{\itemsep}{-0.7em}
472 | \usecounter{enumiv}%
473 | \let\p@enumiv\@empty
474 | \renewcommand\theenumiv{\@arabic\c@enumiv}}%
475 | \sloppy\frenchspacing
476 | \clubpenalty4000%
477 | \@clubpenalty \clubpenalty
478 | \widowpenalty4000%
479 | \interlinepenalty4000%
480 | \sfcode`\.\@m
481 | }
482 | {\def\@noitemerr
483 | {\@latex@warning{Empty `thebibliography' environment}}%
484 | \endlist\frenchspacing}
485 |
486 | \setlength{\floatsep}{12bp \@plus 2bp \@minus 1bp}
487 | \setlength{\intextsep}{12bp \@plus 2bp \@minus 1bp}
488 | \setlength{\textfloatsep}{12bp \@plus 2bp \@minus 1bp}
489 | \setlength{\@fptop}{0bp \@plus1.0fil}
490 | \setlength{\@fpsep}{12bp \@plus2.0fil}
491 | \setlength{\@fpbot}{0bp \@plus1.0fil}
492 | \renewcommand{\textfraction}{0.15}
493 | \renewcommand{\topfraction}{0.85}
494 | \renewcommand{\bottomfraction}{0.65}
495 | \renewcommand{\floatpagefraction}{0.80}
496 | \let\old@tabular\@tabular
497 | \def\thu@tabular{\wuhao[1.25]\old@tabular}
498 | \DeclareCaptionLabelFormat{thu}{{\wuhao[1.25]\song #1~\rmfamily #2}}
499 | \DeclareCaptionLabelSeparator{thu}{\hspace{1em}}
500 | \DeclareCaptionFont{thu}{\wuhao[1.25]}
501 | \captionsetup{labelformat=thu,labelsep=thu,font=thu}
502 | \captionsetup[table]{position=top,belowskip={12bp-\intextsep},aboveskip=6bp}
503 | \captionsetup[figure]{position=bottom,belowskip={9bp-\intextsep},aboveskip=6bp}
504 | \captionsetup[subfloat]
505 | {labelformat=simple,font=thu,captionskip=6bp,nearskip=6bp,farskip=0bp,topadjust=0bp}
506 | \renewcommand{\thesubfigure}{(\alph{subfigure})}
507 | \renewcommand{\thesubtable}{(\alph{subtable})}
508 | \let\thu@LT@array\LT@array
509 | \def\LT@array{\thu@LT@array}
510 | \newenvironment{denotation}[1][3cm]{
511 | \if@openright\cleardoublepage\else\clearpage\fi
512 | \thispagestyle{emptypage}
513 | \chapter*{\denotationname} % no tocline
514 | \addcontentsline{toc}{chapter}{\denotationname}%
515 | \noindent\begin{list}{}%
516 | {\vskip-30bp\xiaosi[1.6]
517 | \renewcommand\makelabel[1]{##1\hfil}
518 | \setlength{\labelwidth}{#1} % 标签盒子宽度
519 | \setlength{\labelsep}{1cm} % 标签与列表文本距离
520 | \setlength{\itemindent}{0cm} % 标签缩进量
521 | \setlength{\leftmargin}{\labelwidth+\labelsep} % 左边界
522 | \setlength{\rightmargin}{0cm}
523 | \setlength{\parsep}{0cm} % 段落间距
524 | \setlength{\itemsep}{0cm} % 标签间距
525 | \setlength{\listparindent}{0cm} % 段落缩进量
526 | \setlength{\topsep}{0pt} % 标签与上文的间距
527 | }
528 | }{\end{list}}
529 | \newenvironment{ack}{%
530 | \thispagestyle{emptypage}
531 | \chapter*{\ackname}%
532 | \addcontentsline{toc}{chapter}{\ackname}%
533 | \ifisanon\color{white}\else\relax\fi%
534 | \xiaosi%
535 | \@mainmatterfalse
536 | \@afterheading
537 | }
538 | {\par\vspace{2em}\par}
539 | \newenvironment{resume}{%
540 | \thispagestyle{emptypage}
541 | \chapter*{\resumename}
542 | \addcontentsline{toc}{chapter}{\resumename}
543 | \ifisanon\color{white}\else\relax\fi%
544 | \xiaosi
545 | \@mainmatterfalse
546 | \@afterheading
547 | }
548 | {\par\vspace{2em}\par}
549 | \renewtheoremstyle{nonumberplain}%
550 | {\item[\hspace*{2em} \theorem@headerfont ##1\ \theorem@separator]}%
551 | {\item[\hspace*{2em} \theorem@headerfont ##1\ (##3)\theorem@separator]}
552 | \theoremstyle{nonumberplain}
553 | \theorembodyfont{\rmfamily}
554 | \theoremheaderfont{\sffamily}
555 | \theoremsymbol{\ensuremath{\blacksquare}}
556 | \theoremseparator{:\,}
557 | \newtheorem{proof}{证明}[chapter]
558 | \newtheorem{assumption}{假设}[chapter]
559 | \newtheorem{definition}{定义}[chapter]
560 |
561 | \renewtheoremstyle{plain}%
562 | {\item[\hspace*{2em} \theorem@headerfont ##1\ ##2\theorem@separator]}%
563 | {\item[\hspace*{2em} \theorem@headerfont ##1\ ##2\ (##3)\theorem@separator]}
564 | \theoremstyle{plain}
565 | \theorembodyfont{\kai}
566 | \theoremheaderfont{\hei}
567 | \theoremsymbol{}
568 | \newtheorem{lemma}{引理}[chapter]
569 | \newtheorem{theorem}{定理}[chapter]
570 | \newtheorem{axiom}{公理}[chapter]
571 | \newtheorem{corollary}{推论}[chapter]
572 | \newtheorem{conjecture}{猜想}[chapter]
573 | \newtheorem{proposition}{命题}[chapter]
574 | \newtheorem{exercise}{练习}[section]
575 | \newtheorem{example}{例}[section]
576 | \newtheorem{problem}{问题}[section]
577 | \newtheorem{remark}{注释}[section]
578 | \renewenvironment{split}{%
579 | \if@display%
580 | \ifinner%
581 | \@xp\@xp\@xp\split@aligned%
582 | \else%
583 | \ifst@rred \else \global\@eqnswtrue \fi%
584 | \fi%
585 | \fi%
586 | \collect@body\gather@split%
587 | }{%
588 | \crcr%
589 | \egroup%
590 | \egroup%
591 | \iftagsleft@ \@xp\lendsplit@ \else \@xp\rendsplit@ \fi%
592 | }
593 | \def\classification#1{\def\@classification{#1}} % 中图分类号
594 | \def\serialno#1{\def\@serialno{#1}} % 学号
595 | \def\udc#1{\def\@udc{#1}} % UDC号
596 | \def\mastertype#1{\def\@mastertype{#1}} % 硕士学位类型
597 | \def\confidentiality#1{\def\@confidentiality{#1}} % 密级
598 | \def\title#1{\def\@title{#1}} % 中文题目
599 | \def\displaytitle#1{\def\@displaytitle{#1}} % 文章标题
600 | \def\entitle#1{\def\@entitle{#1}} % 英文标题
601 | \def\author#1{\def\@author{#1}} % 中文作者名
602 | \def\enauthor#1{\def\@enauthor{#1}} % 英文作者名
603 | \def\zhdate#1{\def\@zhdate{#1}} % 中文日期
604 | \def\subject#1{\def\@subject{#1}} % 中文学科
605 | \def\ensubject#1{\def\@ensubject{#1}} % 英文学科
606 | \def\researchfield#1{\def\@researchfield{#1}} % 中文研究方向
607 | \def\supervisor#1{\def\@supervisor{#1}} % 导师
608 | \def\ensupervisor#1{\def\@ensupervisor{#1}} % 导师英文名
609 | \def\protitle#1{\def\@protitle{#1}} % 导师的职称
610 | \def\school#1{\def\@school{#1}} % 学院
611 | \def\degreename#1{\def\@degreename{#1}} % 专业学位名称
612 |
613 | \def\optionpaperclass#1{\def\@optionpaperclass{#1}} % paperclass
614 | \def\optionpaperclassen#1{\def\@optionpaperclassen{#1}} % paperclass english
615 | \def\optionas#1{\def\@optionas{#1}} % Advisor OR Supervisor
616 | \ifismaster
617 | \optionpaperclass{硕士}
618 | \optionpaperclassen{Master}
619 | \optionas{Advisor}
620 | \else
621 | \optionpaperclass{博士}
622 | \optionpaperclassen{Doctor}
623 | \optionas{Supervisor}
624 | \fi
625 |
626 | % ==== 论文标题调整。added by jayvee start ====%
627 | \def\@title@width{18em}
628 | \newcommand\@title@box[2][\@title@width]{
629 | \def\@@title@uline{\rule[-.6ex]{#1}{.4pt}}
630 | \def\@@title@box##1{\parbox[t]{#1}{##1}}
631 | \newlength\@@title@temp@ht
632 | \settoheight\@@title@temp@ht{\@@title@box{#2}}
633 | \settodepth\@tempdima{\@@title@box{#2}}
634 | \advance\@@title@temp@ht\@tempdima
635 | \ifdim\@@title@temp@ht=0pt
636 | \@@title@uline%
637 | \else
638 | \leavevmode%
639 | \ifdim\@@title@temp@ht>\normalbaselineskip
640 | \rlap{\smash{\@@title@box{
641 | \@whiledim\@@title@temp@ht>0pt
642 | \leavevmode
643 | \do{
644 | \rlap{\@@title@uline}\\
645 | \addtolength\@@title@temp@ht{-\normalbaselineskip}
646 | }
647 | }}}
648 | \@@title@box{\centering #2}\\
649 | \else
650 | \parbox[t]{\@title@width}{\uline{\hfill\@title\hfill}}\\
651 | \fi
652 | \fi
653 | }
654 | % ==== added by jayvee end ====%
655 |
656 | \def\maketitle{%
657 | \renewcommand{\baselinestretch}{1.3}%
658 | \def\entry##1##2##3{%
659 | \multicolumn{##1}{l}{\underline{\hbox to ##2{\hfil##3\hfil}}}
660 | }
661 | \null
662 | \ifisanon%
663 | \author{}%
664 | \enauthor{}%
665 | \supervisor{}%
666 | \ensupervisor{}%
667 | \protitle{}%
668 | \else\relax\fi%
669 | \pagenumbering{alph}% not display, for print only
670 | \thispagestyle{empty}%
671 | \begin{center}\leavevmode % 表格环境
672 | \begin{minipage}{\textwidth}
673 | \vspace{-1cm}
674 | {\songti \xiaosi[1.25]%
675 | \begin{tabular}{llcll}
676 | \hspace{3.7em} 分类号: & \entry{1}{0cm}{\@classification} \hspace*{6.2cm} %
677 | 密级: & \entry{1}{0cm}{\@confidentiality} \\[1.5mm]
678 | \hspace{3.7em} UDC & \entry{1}{0cm}{\@udc} \hspace*{6.2cm}%
679 | 学号: & \entry{1}{0cm}{\@serialno}
680 | \end{tabular}
681 | }
682 | \par
683 | \end{minipage}
684 | \par
685 | \vspace*{3cm} %插入空白
686 | \includegraphics[width=11cm]{title.pdf}\\
687 | %\vspace{-1.5cm} %文字上移
688 | \sanhao\textbf{\textit{South China Normal University}}\\
689 | \vspace{-0.5cm} %插入空白
690 | {\songti \bfseries \xiaochu \ziju{2pt} \@optionpaperclass{}学位论文\\}
691 | \ifismaster
692 | \vspace{0.2cm} %插入空白
693 | {\songti \xiaoer \textbf{(\@mastertype 学位)}\\}
694 | \fi
695 |
696 | \vspace{1.8cm} %插入空白
697 | % added by jayvee
698 | \@title@box{\@title}
699 |
700 | \vspace{45bp}
701 | {\songti \sihao
702 | \begin{tabular}{lp{5cm}c}
703 | \raisebox{-1.5ex}[0pt]{学\hspace{0.5em}位\hspace{0.5em}申\hspace{0.5em}请\hspace{0.5em}人:} &
704 | {\fs \hfil\raisebox{-1ex}[0pt]{\@author}\hfil{}} & \\[0.5ex]
705 | \cline{2-2}
706 | \raisebox{-1.5ex}[0pt]{专\hspace{0.2em}业\hspace{0.2em}学\hspace{0.2em}位\hspace{0.2em}名\hspace{0.2em}称:} &
707 | {\fs \hfil\raisebox{-1ex}[0pt]{\@degreename}\hfil{}} & \\[0.5ex]
708 | \cline{2-2}
709 | \raisebox{-1.5ex}[0pt]{专\hspace{0.2em}业\hspace{0.2em}学\hspace{0.2em}位\hspace{0.2em}领\hspace{0.2em}域:} &
710 | {\fs \hfil\raisebox{-1ex}[0pt]{\@researchfield}\hfil{}} & \\[0.5ex]
711 | \cline{2-2}
712 | \raisebox{-1.5ex}[0pt]{所\hspace{1em}在\hspace{1em}院\hspace{1em}系:} &
713 | {\fs \hfil\raisebox{-1ex}[0pt]{\@school}\hfil{}} & \\[0.5ex]
714 | \cline{2-2}
715 | \raisebox{-1.5ex}[0pt]{导师姓名及职称:} &
716 | {\fs \hfil\raisebox{-1ex}[0pt]{\@supervisor~\@protitle}\hfil{}} & \\[0.5ex]
717 | \cline{2-2}
718 | \end{tabular}
719 | }\\
720 | \vspace{2cm}
721 | {\sihao \@zhdate}
722 | \vspace{1cm}
723 | \end{center}%
724 | \vspace{1mm}
725 | \cleardoublepage%
726 | }
727 | \endinput
728 | %%
729 | %% End of file `scnuthesis.cls'.
730 |
--------------------------------------------------------------------------------
/scnuthesis.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/scnuthesis.pdf
--------------------------------------------------------------------------------
/thesis.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/scnu/scnuthesis/a85b00f5a411c099eef5985a8f1bbf32ca1e80fe/thesis.pdf
--------------------------------------------------------------------------------
/thesis.tex:
--------------------------------------------------------------------------------
1 | %%
2 | %% This is file `thesis.tex',
3 | %% generated with the docstrip utility.
4 | %%
5 | %% The original source files were:
6 | %%
7 | %% scnuthesis.dtx (with options: `thesis')
8 | %%
9 | %% !Mode:: "TeX:UTF-8"
10 | %%
11 | %% This is a generated file.
12 | %%
13 | %% Copyright (C) 2015 by Joseph Pan
14 | %%
15 | %% This file may be distributed and/or modified under the
16 | %% conditions of the LaTeX Project Public License, either version 1.3a
17 | %% of this license or (at your option) any later version.
18 | %% The latest version of this license is in:
19 | %%
20 | %% http://www.latex-project.org/lppl.txt
21 | %%
22 | %% and version 1.3a or later is part of all distributions of LaTeX
23 | %% version 2004/10/01 or later.
24 | %%
25 | %% To produce the documentation run the original source files ending with `.dtx'
26 | %% through LaTeX.
27 | %%
28 | %% Any Suggestions : Joseph Pan
29 | %% Thanks LiuBenYuan for the nudtpapre class!
30 | %% Thanks Xue Ruini for the thuthesis class!
31 | %% Thanks sofoot for the original NUDT paper class!
32 | %%
33 | %1. 如果是研究生论文,常用的选项是:
34 | % \documentclass[master,twoside,vista,ttf]{scnuthesis}
35 | %2. 如果是博士生论文,常用的选项是:
36 | % \documentclass[doctor,twoside,vista,ttf]{scnuthesis}
37 | %3. 如果使用是Windows XP之前的Windows系列,或者使用从这个系列拷贝过来的字体,则需要将Vista选项去掉,如:
38 | % \documentclass[master,twoside,ttf]{scnuthesis}
39 | %4. 建议使用OTF字体获得较好的页面显示效果
40 | % OTF字体从网上获得,各个系统名称统一,不用加vista选项
41 | % 如果你下载的是最新的(1201)OTF英文字体,建议修改scnuthesis.cls,使用PS Std
42 | % \documentclass[doctor,twoside,otf]{scnuthesis}
43 | %5. 如果想生成盲评,传递anon即可,仍需修改个人成果部分
44 | % \documentclass[master,otf,anon]{scnuthesis}
45 | %6. 让章节标题作为页眉,可以使用chapterhead选项。如果和twoside一起使用,则奇数页页眉为章节标题,偶数页为文章标题。
46 | % \documentclass[master,otf,twoside,chapterhead]{scnuthesis}
47 | %
48 | \documentclass[master,vista,ttf,twoside]{scnuthesis}
49 | \usepackage{anyfontsize}
50 | \usepackage{myscnu}
51 |
52 | \begin{document}
53 | \graphicspath{{figures/}}
54 | \input{data/info}
55 | % 插入摘要,制作封面
56 | \ifisanon{}\else{\maketitle}\fi
57 | \frontmatter
58 | \input{data/abstract}
59 |
60 | % 生成目录
61 | \tableofcontents
62 | \listoftables % 如果要生成表目录
63 | \listoffigures % 如果要生成图目录
64 |
65 | \renewcommand{\chapterlabel}{\denotationname} %设置页眉
66 |
67 | \input{data/denotation} % 如果要生成符号列表
68 |
69 | % 更新图标题和表标题设置
70 | \renewcommand{\thetable}{\thechapter{}-\arabic{table}}
71 | \renewcommand{\thefigure}{\thechapter{}-\arabic{figure}}
72 |
73 | % 书写正文,可以根据需要增添章节。
74 | \mainmatter
75 | \input{data/chap01}
76 | \input{data/chap02}
77 | \input{data/chap03}
78 |
79 | % 参考文献
80 | \cleardoublepage
81 | \renewcommand{\chapterlabel}{\bibname} % 设置参考文献的页眉
82 | \bibliographystyle{bstutf8}
83 | \bibliography{ref/refs}
84 |
85 | % 附录
86 | \appendix
87 | \backmatter
88 | \input{data/appendix01}
89 | \input{data/appendix02}
90 |
91 | % 致谢
92 | \cleardoublepage
93 | \renewcommand{\chapterlabel}{\ackname} % 设置参考文献的页眉
94 | \input{data/ack}
95 |
96 | % 作者攻读学位期间发表的学术论文目录
97 | \cleardoublepage
98 | \renewcommand{\chapterlabel}{\resumename} % 设置作者个人成果的页眉
99 | \input{data/resume}
100 |
101 | \end{document}
102 | %%
103 |
--------------------------------------------------------------------------------