我需要为我的论文生成以下风格,
为此,biblatex
我尝试了以下风格,但仍然遇到两个问题。
- 在年份的前缀中,不应有标点符号。
- 作者姓名首字母之间不应留标点和空格。
- 一些姓名本身就在号码牌上,姓名首字母超过一个字符,首字母之间有空格和标点符号。我该如何处理才能获得所需的大学格式?例如,
author = {Allwin, A. K. and Maria, P. K. and Ruby, J. L.}
以下是最小工作示例:mwe.tex
\documentclass[a4paper]{article}
\usepackage[citestyle=authoryear,hyperref=true,
natbib=true,minnames=1,maxnames=2,minbibnames=10,
maxbibnames=11,bibstyle=custom,firstinits=true,backend=bibtex]{biblatex}
\bibliography{literature}
\begin{document}
\nocite{*}
\printbibliography[title=REFERENCES]
\end{document}
biblatex 样式文件:custom.bbx
\ProvidesFile{custom.bbx}
\DeclareFieldFormat[article]{title}{~`#1',}
\DeclareFieldFormat[article]{journal}{~#1,}
\DeclareFieldFormat[article]{year}{~#1,}
\DeclareFieldFormat[article]{pages}{~pp. #1.}
\DeclareFieldFormat[article]{volume}{~vol.~#1,}
\DeclareFieldFormat[article]{number}{no.~#1,}
\DeclareNameFormat[article]{author}{%
\ifthenelse{\value{listcount}=1}{
\ifblank{#1}{}{#1\addcomma\space}
\ifblank{#4}{}{#4\addcomma}}{
\ifthenelse{\value{listcount}=\value{liststop}}
{
\ifblank{#1}{}{~\&~#1\addcomma\space}
\ifblank{#4}{}{#4\addcomma}
}
{
\ifblank{#1}{}{#1\addcomma\space}
\ifblank{#4}{}{#4\addcomma}
}
}
}
\DeclareBibliographyDriver{article}{%
\printnames{author}%
\newunit\newblock
\printfield{year}%
\newunit\newblock
\printfield{title}%
\newunit\newblock
\printfield{journal}%
\newunit\newblock
\printfield{volume}%
\newunit\newblock
\printfield{number}%
\newunit\newblock
\printfield{pages}%
\finentry}
样本围兜卡文件:literature.bib
@article{allwin_drilling_2009,
title = {Drilling of fibers},
volume = {18},
number = {2},
journal = {Journal of Materials},
author = {Allwin, A. K. and Maria, P. K. and Ruby, J. L.},
year = {2007},
pages = {1--7},
},
@article{suraj_solid_2007,
title = {Solid-tool machining},
volume = {10},
shorttitle = {Solid-tool machining handbook},
number = {1},
journal = {International Composite Committee},
author = {Suraj, J. K. and Chandran, M. P.},
year = {2007},
pages = {66--72},
},
@article{jayakumar_mech_2011,
title={Mechanical behaviors of polyester composite},
author={Jayakumar, S. G.},
journal={Polymers and Fibers},
volume={15},
number={11},
pages={155--164},
year={2011},
},
@article{waldron2003generalized,
title={Generalized Welch bound equality sequences are tight frames},
author={Waldron, Shayne},
journal={Information Theory, IEEE Transactions on},
volume={49},
number={9},
pages={2307--2309},
year={2003},
publisher={IEEE}
},
@article{conley1998nativity,
title={Nativity and wealth in mid-nineteenth-century cities},
author={Conley, Timothy G and Galenson, David W},
journal={Journal of Economic History},
volume={58},
pages={468--493},
year={1998},
publisher={Cambridge Univ Press}
},
@article{alishahi2009bounds,
title={Bounds on the sum capacity of synchronous binary CDMA channels},
author={Alishahi, Kasra and Marvasti, Farokh and Aref, Vahid and Pad, Pedram},
journal={Information Theory, IEEE Transactions on},
volume={55},
number={8},
pages={3577--3593},
year={2009},
publisher={IEEE}
}
答案1
我认为使用标准样式并根据需求进行修改会对您有所帮助。就目前情况而言,您的custom.bbx
不支持除此以外的任何条目类型@article
,并且实际上并未从所有事物biblatex
可以做的事情中受益。
由于您似乎使用了authoryear
,我将解释如何修改该样式以获得您想要的内容,您将需要使用 biber(即backend=biber
,而不是backend=bibtex
)才能充分理解这个解决方案。
首先我们确保单位分隔符确实是逗号
\renewcommand*{\newunitpunct}{\addcomma\space}
为了处理姓名格式,我们需要包加载选项firstinits=true
和terseinits=true
,后者可以删除首字母的空格和标点符号。我们还需要
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\finalnamedelim}{\addspace\&\space}
姓名顺序始终为“姓氏和名字”,且姓氏前面有“&”符号。
为了得到不带括号的年份,我们添加
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
{\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}%
最后,
\newbibmacro*{in:}{%
\ifentrytype{article}
{}
{\printtext{%
\bibstring{in}\intitlepunct}}}
\DeclareFieldFormat[article,periodical]{volume}{\bibstring{volume}~#1}% volume of a journal
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}% number of a journal
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit{\addcomma\space}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
处理文章的“in”(我想你不喜欢这样)以及卷数和数字段格式。
我还建议加载csquotes
并babel
使用british
语言选项,以获得正确的引号。
平均能量损失
\documentclass[british,a4paper]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, natbib=true, minnames=1, maxnames=2, maxbibnames=11, firstinits=true, terseinits=true, backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{allwin_drilling_2009,
title = {Drilling of fibers},
volume = {18},
number = {2},
journal = {Journal of Materials},
author = {Allwin, A. K. and Maria, P. K. and Ruby, J. L.},
year = {2007},
pages = {1--7},
}
@article{suraj_solid_2007,
title = {Solid-tool machining},
volume = {10},
shorttitle = {Solid-tool machining handbook},
number = {1},
journal = {International Composite Committee},
author = {Suraj, J. K. and Chandran, M. P.},
year = {2007},
pages = {66--72},
}
@article{jayakumar_mech_2011,
title={Mechanical behaviors of polyester composite},
author={Jayakumar, S. G.},
journal={Polymers and Fibers},
volume={15},
number={11},
pages={155--164},
year={2011},
}
@article{waldron2003generalized,
title={Generalized Welch bound equality sequences are tight frames},
author={Waldron, Shayne},
journal={Information Theory, IEEE Transactions on},
volume={49},
number={9},
pages={2307--2309},
year={2003},
publisher={IEEE}
}
@article{conley1998nativity,
title={Nativity and wealth in mid-nineteenth-century cities},
author={Conley, Timothy G and Galenson, David W},
journal={Journal of Economic History},
volume={58},
pages={468--493},
year={1998},
publisher={Cambridge Univ Press}
}
@article{alishahi2009bounds,
title={Bounds on the sum capacity of synchronous binary CDMA channels},
author={Alishahi, Kasra and Marvasti, Farokh and Aref, Vahid and Pad, Pedram},
journal={Information Theory, IEEE Transactions on},
volume={55},
number={8},
pages={3577--3593},
year={2009},
publisher={IEEE}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\renewcommand*{\newunitpunct}{\addcomma\space}
\DeclareNameAlias{sortname}{last-first}
\renewcommand*{\finalnamedelim}{\addspace\&\space}
\renewbibmacro*{date+extrayear}{%
\iffieldundef{\thefield{datelabelsource}year}
{}
{\iffieldsequal{year}{\thefield{datelabelsource}year}
{\printdateextralabel}%
{\printfield{labelyear}%
\printfield{extrayear}}}}%
\newbibmacro*{in:}{%
\ifentrytype{article}
{}
{\printtext{%
\bibstring{in}\intitlepunct}}}
\DeclareFieldFormat[article,periodical]{volume}{\bibstring{volume}~#1}% volume of a journal
\DeclareFieldFormat[article,periodical]{number}{\bibstring{number}~#1}% number of a journal
\renewbibmacro*{volume+number+eid}{%
\printfield{volume}%
\setunit{\addcomma\space}%
\printfield{number}%
\setunit{\addcomma\space}%
\printfield{eid}}
\begin{document}
\nocite{*}
\printbibliography[title=REFERENCES]
\end{document}
给出
如果你坚持名字之间没有标点符号,还请添加
\renewcommand*{\multinamedelim}{\space}