我正在写博士论文,但是当我尝试按照学校的要求输出参考文献格式时,我感到很沮丧,它需要如下(我的论文只需要以下三种类型),
期刊[J]
書[M]
其他需求:
- 多位作者:当作者人数多于 3 人时,保留前三位,其余作者使用“et al”。
- 排序:按外观。
我的问题是上面的书目风格是什么样的?
如果没有现有的书目样式适合它,我应该如何从头开始构建这种样式?
.bib
:
@article{brauner91,
author = {Brauner, N.},
title = {Vapour absorption into falling film},
journal = {ASME J},
year = {1991},
volume = {34},
pages = {76-82},
number = {3}
}
@book{baehr1994,
title={Heat and mass transfer},
author={Baehr, H. D.},
year={1994},
page={221}
publisher={Berlin:Springer-Verlag}
}
@inproceedings{leiner1989,
year = {1989},
pages={68--71},
author = {Leiner, A.},
title = {Optical techniques for heat transfer measurements},
booktitle = { COLLINS W. Proc Int Conf on Energy and Environment},
publisher={New York: Academic Press}
}
答案1
尝试以下操作
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[style=numeric,backend=biber,giveninits=true,sorting=none,maxnames=3,minnames=3]{biblatex}
\addbibresource{biblatex-examples.bib}
\DeclareNameAlias{default}{family-given}
\renewcommand*{\revsdnamepunct}{}
\renewrobustcmd*{\bibinitperiod}{}
\renewcommand*{\finalnamedelim}{\multinamedelim}
\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{journaltitle}{#1\isdot}
\DeclareFieldFormat*{issuetitle}{#1}
\DeclareFieldFormat*{maintitle}{#1}
\DeclareFieldFormat*{booktitle}{#1}
\newbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\ifentrytype{article}{\setunit{}\printtext{[A]}}{}
\ifentrytype{book}{\setunit{}\printtext{[B]}}{}%
\ifentrytype{inproceedings}{\setunit{}\printtext{[C]}}{}
\newunit}%
\printfield{titleaddon}}
\renewbibmacro*{in:}{\ifentrytype{article}{}{\printtext{//}}}
\renewbibmacro*{journal+issuetitle}{%
\usebibmacro{journal}%
\iffieldundef{series}
{}
{\newunit
\printfield{series}}%
\setunit{\addcomma\space}%
\printfield{issue}%
\setunit{\addcomma\space}%
\usebibmacro{date}
\setunit{\addcolon\space}%
\usebibmacro{issue}%
\setunit{\addcomma\space}%
\usebibmacro{volume+number+eid}%
\setunit{\addspace}%
\newunit}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\DeclareFieldFormat{pages}{#1}
\DeclareFieldFormat{postnote}{#1}
\DeclareFieldFormat{multipostnote}{#1}
\renewcommand*{\bibpagespunct}{\addcolon\addspace}
\renewcommand{\postnotedelim}{%
\iffieldpages{postnote}
{\addcolon\space}
{\addspace}}
\begin{document}
\cite{sigfridsson,brauner91,baehr1994,leiner1989,aksin}
\printbibliography
\end{document}
其中大部分内容相当标准,可以在自定义 biblatex 样式的指南,biblatex:删除参考书目中姓氏和名字之间的逗号,Biblatex authoryear-comp 中的冒号代替“p.”,Biblatex:对于非数字的引用,没有 \postnotedelim,biblatex:文章卷号周围的括号
您的风格的奇怪要求是在标题后指示条目类型,因为我们将“//”分隔符作为“in”,它们是通过以下方式实现的
\renewbibmacro*{title}{%
\ifboolexpr{
test {\iffieldundef{title}}
and
test {\iffieldundef{subtitle}}
}
{}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}%
\ifentrytype{article}{\setunit{}\printtext{[A]}}{}
\ifentrytype{book}{\setunit{}\printtext{[B]}}{}%
\ifentrytype{inproceedings}{\setunit{}\printtext{[C]}}{}
\newunit}%
\printfield{titleaddon}}
\renewbibmacro*{in:}{\ifentrytype{article}{}{\printtext{//}}}
后者当然遵循一般模式抑制“In:” biblatex。