多文件编译
毕业论文篇幅较长,单一文件的编译方式不太方便,可按照文档的逻辑层次,把整个文档分成多个源文件 ,提供的\include{filename}
命令可用来导入另一个文件的内容作为一个章节,文件名不用带.tex
扩展名。\include{filename}
命令会在命令之前和之后使用\clearpage
或\cleardoublepage
另起新页,并将文件内容贴到\include{filename}
命令所在位置。
定制论文样式
设置标题字体及标题样式
Arial字体的使用
- 先定义新字体Arial:
\newfontfamily\sectionef{Arial}
- 在需要使用Arial字体的地方输入命令:
\sectionef
设置标题
- 英文标题字体采用,中文标题采用黑体
- 一级标题居中,小三号
- 二级标题左对齐,四号
\usepackage{titlesec}
\newfontfamily\sectionef{Arial} % 设置Arial字体
% \newCJKfontfamily\sectioncf{STXihei} % 设置黑体
\titleformat{\section}{\center\zihao{-3}\heiti\sectionef}{ % 设置一级标题居中,中文字体为黑体,英文字体为Arial,字号为小三号
第\,\thesection\,章}{1em}{}
\titleformat*{\subsection}{\zihao{4}\heiti\sectionef} % 设置二级标题中文字体为黑体,英文字体为Arial字号为四号
设置页边距,页眉,页脚
- 页边距左右均为3.2 cm,上下均为3.8 cm
- 页眉居中显示当前章标题
- 页脚居中显示当前页码
- 封面不显示页码,中英文摘要和目录页码采用大写罗马格式,正文及参考文献采用小写阿拉伯格式
由于titlesec
宏包会改变页眉章标题格式,所以需要重新定义页眉章标题格式,如果没有引入titlesec
宏包,可采用\fancyhead[C]{\leftmark}
完成页眉居中显示当前章标题。
\usepackage{geometry}
\geometry{left=3.2cm,right=3.2cm,top=3.8cm,bottom=3.8cm} % 设置页边距
\usepackage{fancyhdr} % 设置页眉
\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage} % 设置页码
\renewcommand{\sectionmark}[1]{\markboth{第\thesection 章\quad % 设置页眉内容为章标题
\ #1}{}}
页码格式的设置可在不同源文件中加入页码控制语句,具体参见论文源码一节。
%---------------------------cover.tex-------------------------------
\thispagestyle{empty} % 当前页不显示页码
%------------------------abstract_cn.tex-------------------------------
\setcounter{page}{1} % 设置当前页页码编号从1开始计数
\pagenumbering{Roman} % 设置页码字体为大写罗马字体
%----------------------------main.tex-------------------------------
\setcounter{page}{1} % 设置当前页页码编号从1开始计数
\pagenumbering{arabic} % 设置页码字体为小写阿拉伯字体
定义中英文摘要环境
定义中文摘要环境
% -*- coding: utf-8 -*-
\newcommand{\cnabstractname}{\zihao{-3}摘\quad 要} % 定义中文摘要环境
\newenvironment{cnabstract}{%
% \quotation
\par\small
\mbox{}\hfill{\bfseries \cnabstractname}\hfill\mbox{}\par
\vskip 2.5ex}{\par\vskip 2.5ex}
定义英文摘要环境
\newcommand{\enabstractname}{\zihao{-3}Abstract} % 定义英文摘要环境
\newenvironment{enabstract}{%
% \quotation
\par\small
\mbox{}\hfill{\sectionef{\enabstractname}}\hfill\mbox{}\par % \sectionef:英文摘要使用Arial字体
\vskip 2.5ex}{\par\vskip 2.5ex}
目录的生成及相关问题处理
\tableofcontents
可以自动生成目录,但是所生成的目录中不包括中英文摘要和参考文献,因此我们需要将他们手动添加到目录。 这里以英文摘要为例:
\phantomsection % 解决目录中超链接地址错误问题
\addcontentsline{toc}{section}{ABSTRACT(英文摘要)} % 将英文摘要添加到目录
\addcontentsline{toc}{section}{ABSTRACT(英文摘要)}
虽然可以将ABSTRACT(英文摘要)
添加至目录,但是此时的链接地址是错误的,需要加上\phantomsection
进行调整。
编译警告的处理
在添加中文摘要至目录时,编辑器出现警告:Token not allowed in a PDF string
,原因是一些命令语句无法在书签中显示。例如:
\addcontentsline{toc}{section}{摘\quad 要} % 将中文摘要添加到目录
这里的\quad
就无法在书签中显示,需要用空格替换后才能显示,可采用如下操作进行处理。
\addcontentsline{toc}{section}{摘\texorpdfstring{\quad}{} 要} % 将中文摘要添加到目录
设置参考文献格式
设置参考文献引用格式
\usepackage[bookmarks=true,colorlinks,linkcolor=black,
citecolor=black]{hyperref} % 设置超链接
\usepackage[superscript]{cite} % 引入参考文献格式包
\bibliographystyle{mybst} % 参考文献格式采用自制的mybst
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{
\citeleft}\cite{#1}\textsuperscript{\citeright}}} % 设置参考文献序号格式
文献按引用顺序排序,引用标号形式为:,颜色为黑色,\upcite{1,2,3}
可达到的效果。
设置参考文献显示格式
提供了七种基本的参考文献显示格式,但是都不符合毕业论文参考文献的引用格式,所以需要我们自己定制参考文献格式控制文件bst
。由于bst
是逆波兰式语法,且参考文献格式控制文件bst
篇幅较长,因此我们可以直接复制一种基本的参考文献显示格式,并对其修改,这里修改unsrt
。
将文献年份放在期刊卷数和页码之前
将bst
文件中的format.date "year" output.check
放在format.vol.num.pages output
之前,这里以article
类为例:
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
format.date "year" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
中文期刊作者超过三个人,在第三作者后加等
新定义article_cn
类表示中文期刊,在bst
文件中添加以下代码:
FUNCTION {format.names.cn}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$
if$
t "其他" =
{ " {\kaishu 等}." * }
{ " and " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {format.authors.cn}
{ author empty$
{ "" }
{ author format.names.cn }
if$
}
FUNCTION {article_cn}
{ output.bibitem
format.authors.cn "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal emphasize "journal" output.check
format.date "year" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
引用中文文献时,在bib
文件中写入以下内容即可在第三作者后添加 “ 等 ” 。
@article_cn{关键字,
title = "题目",
journal = "期刊名",
year = "年份",
volume = "卷数",
pages = "开始页码-结束页码",
author = "作者1 and 作者2 and 作者3 and 其他",
}
文献不同属性用"."分隔
将output.nonnull
函数中的{ ", " * write$ }
修改为{ ". " * write$ }
即可,函数实现如下:
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
{ ". " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
文献年份和期刊卷数以“,”隔开
将format.vol.num.pages
函数中的volume field.or.null
修改为 :
volume empty$
'skip$
{ duplicate$ empty$
{ pop$ format.volume }
{ ", " * volume * }
if$
}
if$
修改后的format.vol.num.pages
函数如下:
FUNCTION {format.vol.num.pages}
{
volume empty$
'skip$
{ duplicate$ empty$
{ pop$ format.volume }
{ ", " * volume * }
if$
}
if$
number empty$
'skip$
{ "(" number * ")" * *
volume empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
}
if$
pages empty$
'skip$
{ duplicate$ empty$
{ pop$ format.pages }
{ ":" * pages n.dashify * }
if$
}
if$
}
去掉文献末尾的"."
去掉fin.entry
函数中的add.period$
。
FUNCTION {fin.entry}
{
write$
newline$
}
去掉期刊名称的强调字体
把journal emphasize "journal" output.check
修改为journal "journal" output.check
:
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal "journal" output.check
format.date "year" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {article_cn}
{ output.bibitem
format.authors.cn "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal "journal" output.check
format.date "year" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
LaTeX论文源码
- 论文封面源文件
cover.tex
% -*- coding: utf-8 -*-
% cover.tex
\thispagestyle{empty}
\begin{figure}[t]
\parbox{1.5cm}{
\includegraphics[scale=0.7]{sdu.jpg}
}
\parbox{5.5cm}{
\begin{center}
\includegraphics[scale=0.25]{words.png}
\tiny ****************** \quad ** \quad ********** % 填写学校的英文名字
\end{center}
}
\end{figure}
\begin{center}
\quad \\
\quad \\
\heiti \fontsize{45}{17} 毕\quad 业\quad 论\quad 文
\vskip 3.5cm
\heiti \zihao{2} 在此打印论文题目,二号黑体
\end{center}
\vskip 3.5cm
\begin{quotation}
\songti \fontsize{15}{15}
\doublespacing
\par\setlength\parindent{12em}
\quad
学\hspace{0.61cm} 院:\underline{略略略略学院\quad}
专\hspace{0.61cm} 业:\underline{略略略略略略略}
学生姓名:\underline{\qquad 德彪西\qquad }
学\hspace{0.61cm} 号:\underline{\quad 00000000000\quad}
指导教师:\underline{\qquad 傅里叶 \qquad}
\vskip 2cm
\centering
2019年**月**日
\end{quotation}
- 论文中文摘要源文件
abstract_cn.tex
% -*- coding: utf-8 -*-
% abstract_cn.tex
\setcounter{page}{1} % 设置当前页页码编号从1开始计数
\fancyhead[C]{中\quad 文\quad 摘\quad 要} % 设置页眉内容为“中 文 摘 要”
\pagenumbering{Roman} % 设置页码字体为大写罗马字体
\newcommand{\cnabstractname}{\zihao{-3}摘\quad 要} % 定义中文摘要环境
\newenvironment{cnabstract}{%
% \quotation
\par\small
\mbox{}\hfill{\bfseries \cnabstractname}\hfill\mbox{}\par
\vskip 2.5ex}{\par\vskip 2.5ex}
% \clearpage
\phantomsection % 解决目录中超链接地址错误问题
\addcontentsline{toc}{section}{摘\texorpdfstring{\quad}{} 要} % 将中文摘要添加到目录
\begin{cnabstract}
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
中文摘要 中文摘要 中文摘要 中文摘要 中文摘要 中文摘要
\textbf{关键字:}中文摘要
\end{cnabstract}
- 论文英文摘要源文件
abstract_en.tex
% abstract_en.tex
\fancyhead[C]{英\quad 文\quad 摘\quad 要} % 设置页眉为“英 文 摘 要”
\newcommand{\enabstractname}{\zihao{-3}Abstract} % 定义英文摘要环境
\newenvironment{enabstract}{%
% \quotation
\par\small
\mbox{}\hfill{\sectionef{\enabstractname}}\hfill\mbox{}\par % \sectionef:英文摘要使用Arial字体
\vskip 2.5ex}{\par\vskip 2.5ex}
\phantomsection % 解决目录中超链接地址错误问题
\addcontentsline{toc}{section}{ABSTRACT(英文摘要)} % 将英文摘要添加到目录
\begin{enabstract}
This is the abstract in English. This is the abstract in English.
This is the abstract in English.
This is the abstract in English. This is the abstract in English.
This is the abstract in English.
This is the abstract in English. This is the abstract in English.
This is the abstract in English.
This is the abstract in English. This is the abstract in English.
This is the abstract in English.
This is the abstract in English. This is the abstract in English.
This is the abstract in English.
This is the abstract in English. This is the abstract in English.
This is the abstract in English. This is the abstract in English.
\textbf{Keywords:} Abstract
\end{enabstract}
- 论文目录源文件
contents.tex
% contents.tex
\phantomsection % 解决目录中超链接地址问题
\renewcommand{\contentsname}{目\quad 录} % 自定义目录标题格式
\addcontentsline{toc}{section}{目\texorpdfstring{\quad}{} 录} % 将\quad替换为“ ”在书签中显示,并将目录地址添加到目录
\begin{center}
\tableofcontents % 显示目录
\end{center}
- 论文结论、参考文献、致谢源文件
conclusion_reference_thanks.tex
% conclusion_reference_thanks.tex
\fancyhead[C]{结\quad 论} % 设置页眉内容为“结 论”
\phantomsection % 解决目录中超链接地址问题
\addcontentsline{toc}{section}{结论} % 将结论添加到目录
\section*{结\quad 论} % 无编号标题“结 论”
\newpage % 另起一页
\fancyhead[C]{参\quad 考\quad 文\quad 献} % 设置页眉内容为“参 考 文 献”
\phantomsection % 解决目录中超链接地址问题
\addcontentsline{toc}{section}{参考文献} % 将参考文献添加到目录
\bibliography{reference.bib} % 显示参考文献
\newpage % 另起一页
\fancyhead[C]{致\quad 谢\quad 及\quad 声\quad 明} % 设置页眉内容为“致 谢 及 声 明”
\phantomsection % 解决目录中超链接地址问题
\addcontentsline{toc}{section}{致谢及声明} % 将致谢及声明添加到目录
\section*{致\quad 谢 } % 无编号标题“致 谢”
衷心感谢导师***教授和***副教授对本人的精心指导。
他们的言传身教将使我终生受益。
二位导师广博的学识和严谨的治学态度将使我受益终生。
感谢***教研室的全体老师和同学多年来的关心和支持!
感谢所有关心和帮助过我的人们!
- 论文参考文献引用示例源文件
reference.bib
% Encoding: UTF8
@article{1,
title = "Measurements of total kinetic-energy released to the {$N=2$} dissociation limit of {$H_{2}$} - evidence of the dissociation of very high vibrational Rydberg states of {$H_{2}$} by doubly-excited states.",
journal = "Chem. Phys. Lett",
year = "1994",
volume = "224",
pages = "260-266",
author = "Elidrissi M C and Roney A and Frigon C and others",
}
@article_cn{2,
title = "利用{REMPI}方法测量{BaF}高里德堡系列光谱",
journal = "化学物理学报",
year = "1995",
volume = "8",
pages = "308-311",
author = "马辉 and 李俭 and 刘耀明 and 其他",
}
@article{3,
title = "{R}ydberg series and ionization potential of the {$H_{2}$} molecule. {J. Mol}",
journal = "Spectrosc",
year = "1972",
volume = "41",
pages = "425-486",
author = "Herzberg G and Jungen Ch",
}
- 论文主文件
main.tex
% -*- coding=utf-8 -*-
% main.tex
\documentclass[UTF8, a4paper]{ctexart}
\usepackage{titlesec}
\newfontfamily\sectionef{Arial} % 设置Arial字体
% \newCJKfontfamily\sectioncf{STXihei} % 设置黑体
\titleformat{\section}{\center\zihao{-3}\heiti\sectionef}{ % 设置一级标题居中,中文字体为黑体,英文字体为Arial,字号为小三号
第\,\thesection\,章}{1em}{}
\titleformat*{\subsection}{\zihao{4}\heiti\sectionef} % 设置二级标题中文字体为黑体,英文字体为Arial字号为四号
\usepackage{geometry}
\geometry{left=3.2cm,right=3.2cm,top=3.8cm,bottom=3.8cm} % 设置页边距
\usepackage[bookmarks=true,colorlinks,linkcolor=black,
citecolor=black]{hyperref} % 设置超链接
\usepackage{graphicx}
\usepackage[superscript]{cite} % 引入参考文献格式包
\bibliographystyle{mybst} % 参考文献格式采用自制的mybst
\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{
\citeleft}\cite{#1}\textsuperscript{\citeright}}} % 设置参考文献序号格式
\usepackage{setspace}
\usepackage{fancyhdr} % 设置页眉
\pagestyle{fancy}
\fancyhf{}
\cfoot{\thepage} % 设置页码
% \CTEXsetup[name = {第,章}]{section} % 设置章节格式
\begin{document}
\include{cover} % 封面
\include{abstract_cn} % 中文摘要
\include{abstract_en} % 英文摘要
\fancyhead[C]{\leftmark} % 设置页眉内容为章标题
\include{contents} % 目录
\setcounter{page}{1}
\pagenumbering{arabic}
\renewcommand{\sectionmark}[1]{\markboth{第\thesection 章\quad % 设置页眉内容为章标题
\ #1}{}}
\markboth{leftmark}{rightmark}
%------------------以下部分可写成一个文件然后以章节形式导入---------------------------
\section{引\texorpdfstring{\quad}{} 言} % 将\quad替换为“ ”在书签中显示
\subsection{课题的目的和意义}
核辐射开始放假\upcite{1,2,3}
\newpage
\section{Arial Unicode MS}
%----------------------------------------------------------------------------------------------------------
\include{conclusion_reference_thanks}
\end{document}
- 论文参考文献格式源文件
mybst.bst
% -*- coding=utf-8 -*-
% BibTeX standard bibliography style `unsrt'
% Version 0.99b (8-Dec-10 release) for BibTeX versions 0.99a or later.
% Copyright (C) 1984, 1985, 1988, 2010 Howard Trickey and Oren Patashnik.
% Unlimited copying and redistribution of this file are permitted as long as
% it is unmodified. Modifications (and redistribution of modified versions)
% are also permitted, but only if the resulting file is renamed to something
% besides btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst.
% This restriction helps ensure that all standard styles are identical.
% The file btxbst.doc has the documentation for this style.
ENTRY
{ address
author
booktitle
chapter
edition
editor
howpublished
institution
journal
key
month
note
number
organization
pages
publisher
school
series
title
type
volume
year
}
{}
{ label }
INTEGERS { output.state before.all mid.sentence after.sentence after.block }
FUNCTION {init.state.consts}
{ #0 'before.all :=
#1 'mid.sentence :=
#2 'after.sentence :=
#3 'after.block :=
}
STRINGS { s t }
FUNCTION {output.nonnull}
{ 's :=
output.state mid.sentence =
{ ". " * write$ }
{ output.state after.block =
{ add.period$ write$
newline$
"\newblock " write$
}
{ output.state before.all =
'write$
{ add.period$ " " * write$ }
if$
}
if$
mid.sentence 'output.state :=
}
if$
s
}
FUNCTION {output}
{ duplicate$ empty$
'pop$
'output.nonnull
if$
}
FUNCTION {output.check}
{ 't :=
duplicate$ empty$
{ pop$ "empty " t * " in " * cite$ * warning$ }
'output.nonnull
if$
}
FUNCTION {output.bibitem}
{ newline$
"\bibitem{" write$
cite$ write$
"}" write$
newline$
""
before.all 'output.state :=
}
FUNCTION {fin.entry}
{ % 去掉add.period$
write$
newline$
}
FUNCTION {new.block}
{ output.state before.all =
'skip$
{ after.block 'output.state := }
if$
}
FUNCTION {new.sentence}
{ output.state after.block =
'skip$
{ output.state before.all =
'skip$
{ after.sentence 'output.state := }
if$
}
if$
}
FUNCTION {not}
{ { #0 }
{ #1 }
if$
}
FUNCTION {and}
{ 'skip$
{ pop$ #0 }
if$
}
FUNCTION {or}
{ { pop$ #1 }
'skip$
if$
}
FUNCTION {new.block.checka}
{ empty$
'skip$
'new.block
if$
}
FUNCTION {new.block.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.block
if$
}
FUNCTION {new.sentence.checka}
{ empty$
'skip$
'new.sentence
if$
}
FUNCTION {new.sentence.checkb}
{ empty$
swap$ empty$
and
'skip$
'new.sentence
if$
}
FUNCTION {field.or.null}
{ duplicate$ empty$
{ pop$ "" }
'skip$
if$
}
FUNCTION {emphasize}
{ duplicate$ empty$
{ pop$ "" }
{ "{\em " swap$ * "}" * }
if$
}
INTEGERS { nameptr namesleft numnames }
FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$
if$
t "others" =
{ " et~al." * }
{ " and " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {format.names.cn}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
nameptr #1 >
{ namesleft #1 >
{ ", " * t * }
{ numnames #2 >
{ "," * }
'skip$
if$
t "其他" =
{ " {\kaishu 等}." * }
{ " and " * t * }
if$
}
if$
}
't
if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
while$
}
FUNCTION {format.authors.cn}
{ author empty$
{ "" }
{ author format.names.cn }
if$
}
FUNCTION {format.authors}
{ author empty$
{ "" }
{ author format.names }
if$
}
FUNCTION {format.editors}
{ editor empty$
{ "" }
{ editor format.names
editor num.names$ #1 >
{ ", editors" * }
{ ", editor" * }
if$
}
if$
}
FUNCTION {format.title}
{ title empty$
{ "" }
{ title "t" change.case$ }
if$
}
FUNCTION {n.dashify}
{ 't :=
""
{ t empty$ not }
{ t #1 #1 substring$ "-" =
{ t #1 #2 substring$ "--" = not
{ "--" *
t #2 global.max$ substring$ 't :=
}
{ { t #1 #1 substring$ "-" = }
{ "-" *
t #2 global.max$ substring$ 't :=
}
while$
}
if$
}
{ t #1 #1 substring$ *
t #2 global.max$ substring$ 't :=
}
if$
}
while$
}
FUNCTION {format.date}
{ year empty$
{ month empty$
{ "" }
{ "there's a month but no year in " cite$ * warning$
month
}
if$
}
{ month empty$
'year
{ month " " * year * }
if$
}
if$
}
FUNCTION {format.btitle}
{ title emphasize
}
FUNCTION {tie.or.space.connect}
{ duplicate$ text.length$ #3 <
{ "~" }
{ " " }
if$
swap$ * *
}
FUNCTION {either.or.check}
{ empty$
'pop$
{ "can't use both " swap$ * " fields in " * cite$ * warning$ }
if$
}
FUNCTION {format.bvolume}
{ volume empty$
{ "" }
{ "volume" volume tie.or.space.connect
series empty$
'skip$
{ " of " * series emphasize * }
if$
"volume and number" number either.or.check
}
if$
}
FUNCTION {format.number.series}
{ volume empty$
{ number empty$
{ series field.or.null }
{ output.state mid.sentence =
{ "number" }
{ "Number" }
if$
number tie.or.space.connect
series empty$
{ "there's a number but no series in " cite$ * warning$ }
{ " in " * series * }
if$
}
if$
}
{ "" }
if$
}
FUNCTION {format.edition}
{ edition empty$
{ "" }
{ output.state mid.sentence =
{ edition "l" change.case$ " edition" * }
{ edition "t" change.case$ " edition" * }
if$
}
if$
}
INTEGERS { multiresult }
FUNCTION {multi.page.check}
{ 't :=
#0 'multiresult :=
{ multiresult not
t empty$ not
and
}
{ t #1 #1 substring$
duplicate$ "-" =
swap$ duplicate$ "," =
swap$ "+" =
or or
{ #1 'multiresult := }
{ t #2 global.max$ substring$ 't := }
if$
}
while$
multiresult
}
FUNCTION {format.pages}
{ pages empty$
{ "" }
{ pages multi.page.check
{ "pages" pages n.dashify tie.or.space.connect }
{ "page" pages tie.or.space.connect }
if$
}
if$
}
FUNCTION {format.vol.num.pages}
{
volume empty$
'skip$
{ duplicate$ empty$
{ pop$ format.volume }
{ ", " * volume * }
if$
}
if$
number empty$
'skip$
{ "(" number * ")" * *
volume empty$
{ "there's a number but no volume in " cite$ * warning$ }
'skip$
if$
}
if$
pages empty$
'skip$
{ duplicate$ empty$
{ pop$ format.pages }
{ ":" * pages n.dashify * }
if$
}
if$
}
FUNCTION {format.chapter.pages}
{ chapter empty$
'format.pages
{ type empty$
{ "chapter" }
{ type "l" change.case$ }
if$
chapter tie.or.space.connect
pages empty$
'skip$
{ ", " * format.pages * }
if$
}
if$
}
FUNCTION {format.in.ed.booktitle}
{ booktitle empty$
{ "" }
{ editor empty$
{ "In " booktitle emphasize * }
{ "In " format.editors * ", " * booktitle emphasize * }
if$
}
if$
}
FUNCTION {empty.misc.check}
{ author empty$ title empty$ howpublished empty$
month empty$ year empty$ note empty$
and and and and and
{ "all relevant fields are empty in " cite$ * warning$ }
'skip$
if$
}
FUNCTION {format.thesis.type}
{ type empty$
'skip$
{ pop$
type "t" change.case$
}
if$
}
FUNCTION {format.tr.number}
{ type empty$
{ "Technical Report" }
'type
if$
number empty$
{ "t" change.case$ }
{ number tie.or.space.connect }
if$
}
FUNCTION {format.article.crossref}
{ key empty$
{ journal empty$
{ "need key or journal for " cite$ * " to crossref " * crossref *
warning$
""
}
{ "In {\em " journal * "\/}" * }
if$
}
{ "In " key * }
if$
" \cite{" * crossref * "}" *
}
FUNCTION {format.crossref.editor}
{ editor #1 "{vv~}{ll}" format.name$
editor num.names$ duplicate$
#2 >
{ pop$ " et~al." * }
{ #2 <
'skip$
{ editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" =
{ " et~al." * }
{ " and " * editor #2 "{vv~}{ll}" format.name$ * }
if$
}
if$
}
if$
}
FUNCTION {format.book.crossref}
{ volume empty$
{ "empty volume in " cite$ * "'s crossref of " * crossref * warning$
"In "
}
{ "Volume" volume tie.or.space.connect
" of " *
}
if$
editor empty$
editor field.or.null author field.or.null =
or
{ key empty$
{ series empty$
{ "need editor, key, or series for " cite$ * " to crossref " *
crossref * warning$
"" *
}
{ "{\em " * series * "\/}" * }
if$
}
{ key * }
if$
}
{ format.crossref.editor * }
if$
" \cite{" * crossref * "}" *
}
FUNCTION {format.incoll.inproc.crossref}
{ editor empty$
editor field.or.null author field.or.null =
or
{ key empty$
{ booktitle empty$
{ "need editor, key, or booktitle for " cite$ * " to crossref " *
crossref * warning$
""
}
{ "In {\em " booktitle * "\/}" * }
if$
}
{ "In " key * }
if$
}
{ "In " format.crossref.editor * }
if$
" \cite{" * crossref * "}" *
}
FUNCTION {article}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal "journal" output.check
format.date "year" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {article_cn}
{ output.bibitem
format.authors.cn "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ journal "journal" output.check
format.date "year" output.check
format.vol.num.pages output
}
{ format.article.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {book}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check }
{ format.authors output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
if$
}
if$
new.block
format.btitle "title" output.check
crossref missing$
{ format.bvolume output
new.block
format.number.series output
new.sentence
publisher "publisher" output.check
address output
}
{ new.block
format.book.crossref output.nonnull
}
if$
format.edition output
format.date "year" output.check
new.block
note output
fin.entry
}
FUNCTION {booklet}
{ output.bibitem
format.authors output
new.block
format.title "title" output.check
howpublished address new.block.checkb
howpublished output
address output
format.date output
new.block
note output
fin.entry
}
FUNCTION {inbook}
{ output.bibitem
author empty$
{ format.editors "author and editor" output.check }
{ format.authors output.nonnull
crossref missing$
{ "author and editor" editor either.or.check }
'skip$
if$
}
if$
new.block
format.btitle "title" output.check
crossref missing$
{ format.bvolume output
format.chapter.pages "chapter and pages" output.check
new.block
format.number.series output
new.sentence
publisher "publisher" output.check
address output
}
{ format.chapter.pages "chapter and pages" output.check
new.block
format.book.crossref output.nonnull
}
if$
format.edition output
format.date "year" output.check
new.block
note output
fin.entry
}
FUNCTION {incollection}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
format.bvolume output
format.number.series output
format.chapter.pages output
new.sentence
publisher "publisher" output.check
address output
format.edition output
format.date "year" output.check
}
{ format.incoll.inproc.crossref output.nonnull
format.chapter.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {inproceedings}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
crossref missing$
{ format.in.ed.booktitle "booktitle" output.check
format.bvolume output
format.number.series output
format.pages output
address empty$
{ organization publisher new.sentence.checkb
organization output
publisher output
format.date "year" output.check
}
{ address output.nonnull
format.date "year" output.check
new.sentence
organization output
publisher output
}
if$
}
{ format.incoll.inproc.crossref output.nonnull
format.pages output
}
if$
new.block
note output
fin.entry
}
FUNCTION {conference} { inproceedings }
FUNCTION {manual}
{ output.bibitem
author empty$
{ organization empty$
'skip$
{ organization output.nonnull
address output
}
if$
}
{ format.authors output.nonnull }
if$
new.block
format.btitle "title" output.check
author empty$
{ organization empty$
{ address new.block.checka
address output
}
'skip$
if$
}
{ organization address new.block.checkb
organization output
address output
}
if$
format.edition output
format.date output
new.block
note output
fin.entry
}
FUNCTION {mastersthesis}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
"Master's thesis" format.thesis.type output.nonnull
school "school" output.check
address output
format.date "year" output.check
new.block
note output
fin.entry
}
FUNCTION {misc}
{ output.bibitem
format.authors output
title howpublished new.block.checkb
format.title output
howpublished new.block.checka
howpublished output
format.date output
new.block
note output
fin.entry
empty.misc.check
}
FUNCTION {phdthesis}
{ output.bibitem
format.authors "author" output.check
new.block
format.btitle "title" output.check
new.block
"PhD thesis" format.thesis.type output.nonnull
school "school" output.check
address output
format.date "year" output.check
new.block
note output
fin.entry
}
FUNCTION {proceedings}
{ output.bibitem
editor empty$
{ organization output }
{ format.editors output.nonnull }
if$
new.block
format.btitle "title" output.check
format.bvolume output
format.number.series output
address empty$
{ editor empty$
{ publisher new.sentence.checka }
{ organization publisher new.sentence.checkb
organization output
}
if$
publisher output
format.date "year" output.check
}
{ address output.nonnull
format.date "year" output.check
new.sentence
editor empty$
'skip$
{ organization output }
if$
publisher output
}
if$
new.block
note output
fin.entry
}
FUNCTION {techreport}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
format.tr.number output.nonnull
institution "institution" output.check
address output
format.date "year" output.check
new.block
note output
fin.entry
}
FUNCTION {unpublished}
{ output.bibitem
format.authors "author" output.check
new.block
format.title "title" output.check
new.block
note "note" output.check
format.date output
fin.entry
}
FUNCTION {default.type} { misc }
MACRO {jan} {"January"}
MACRO {feb} {"February"}
MACRO {mar} {"March"}
MACRO {apr} {"April"}
MACRO {may} {"May"}
MACRO {jun} {"June"}
MACRO {jul} {"July"}
MACRO {aug} {"August"}
MACRO {sep} {"September"}
MACRO {oct} {"October"}
MACRO {nov} {"November"}
MACRO {dec} {"December"}
MACRO {acmcs} {"ACM Computing Surveys"}
MACRO {acta} {"Acta Informatica"}
MACRO {cacm} {"Communications of the ACM"}
MACRO {ibmjrd} {"IBM Journal of Research and Development"}
MACRO {ibmsj} {"IBM Systems Journal"}
MACRO {ieeese} {"IEEE Transactions on Software Engineering"}
MACRO {ieeetc} {"IEEE Transactions on Computers"}
MACRO {ieeetcad}
{"IEEE Transactions on Computer-Aided Design of Integrated Circuits"}
MACRO {ipl} {"Information Processing Letters"}
MACRO {jacm} {"Journal of the ACM"}
MACRO {jcss} {"Journal of Computer and System Sciences"}
MACRO {scp} {"Science of Computer Programming"}
MACRO {sicomp} {"SIAM Journal on Computing"}
MACRO {tocs} {"ACM Transactions on Computer Systems"}
MACRO {tods} {"ACM Transactions on Database Systems"}
MACRO {tog} {"ACM Transactions on Graphics"}
MACRO {toms} {"ACM Transactions on Mathematical Software"}
MACRO {toois} {"ACM Transactions on Office Information Systems"}
MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"}
MACRO {tcs} {"Theoretical Computer Science"}
READ
STRINGS { longest.label }
INTEGERS { number.label longest.label.width }
FUNCTION {initialize.longest.label}
{ "" 'longest.label :=
#1 'number.label :=
#0 'longest.label.width :=
}
FUNCTION {longest.label.pass}
{ number.label int.to.str$ 'label :=
number.label #1 + 'number.label :=
label width$ longest.label.width >
{ label 'longest.label :=
label width$ 'longest.label.width :=
}
'skip$
if$
}
EXECUTE {initialize.longest.label}
ITERATE {longest.label.pass}
FUNCTION {begin.bib}
{ preamble$ empty$
'skip$
{ preamble$ write$ newline$ }
if$
"\begin{thebibliography}{" longest.label * "}" * write$ newline$
}
EXECUTE {begin.bib}
EXECUTE {init.state.consts}
ITERATE {call.type$}
FUNCTION {end.bib}
{ newline$
"\end{thebibliography}" write$ newline$
}
EXECUTE {end.bib}
由于默认的加粗方式不是伪加粗,而是以粗体字代替原字体,例如宋体加粗后以黑体的形式展示,因此标题中的黑体默认是粗体,换句话说即中的黑体不支持加粗命令。如果非要加粗或者改成黑体的正常体,可以尝试修改线宽。