我对某些biblatex
设置感到困惑(年度评审风格 2):
1)文中的引用应该用圆括号代替方括号,用“与”号代替“and”,因此:Tex et al. (1)、Ba & Rise (2)。
2)在参考文献中,条目应如下所示
- Tex L、Bar F、Rate P。2011 年。最小标题。LaTeX 期刊问题。 1(1):110--20
- Ba K, Rise S. 2012.最小标题。BibLaTeX 期刊问题。 1(1):110--31
我尝试过调整数字样式(以便获得连续编号的引用),但这可能不是一个好主意(?)。例如,关于 1),我发现 biblatex:如何删除 authoryear 样式中年份周围的括号? 但是 A. Munn 提出的去掉年份括号的技巧似乎并不适用于数字引用样式。
我知道有些要求可能很难实现(例如,页面范围是 110-20 而不是 110-120),但如果能为实现 1)和 2)提供任何帮助,我们将不胜感激。
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage{blindtext}
\usepackage{csquotes}
\usepackage[
backend=bibtex,
style=numeric,
sorting=none,
firstinits=true,
terseinits=true,
uniquename=init,
maxcitenames=2,
date=iso8601,
urldate=iso8601
]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{bib.bib}
@Article{foo,
author={Tex, La and Bar, Foo and Rate, Pi},
journal={Journal of LaTeX questions},
pages={110--120},
title={{Minimal title}},
volume={1},
number={1},
year={2011}}
@Article{bar,
author={Ba, Ka and Rise, Sun},
journal={Journal of BibLaTeX questions},
pages={110--131},
title={{Minimal title}},
volume={1},
number={1},
year={2012}}
\end{filecontents*}
% bibliography
\DeclareFieldFormat{labelnumberwidth}{#1.}% use 1., 2., ... in the references
\DeclareNameAlias{default}{last-first}
\renewbibmacro*{volume+number+eid}{% use volume(number) for articles for example
\setunit*{\adddot\space}%
\printfield{volume}%
\printfield{number}}
\DeclareFieldFormat*{number}{(#1)}
\DeclareFieldFormat*{title}{#1}% remove quotes from title
\renewbibmacro*{in:}{}% remove in label
\DeclareFieldFormat{isbn}{ISBN #1}% format isbn number
\bibliography{bib.bib}% bibliography data
\renewcommand*{\cite}[2][]{\textcite[#1]{#2}}
\begin{document}
\blindtext[1]; see \cite{foo}, \cite{bar}.
\printbibliography
\end{document}
答案1
将括号替换为圆括号全部引用,你应该采用 中的引用命令定义,并将、和 的numeric.cbx
每个实例替换为\mkbibbrackets
、和。在我的示例中,我修补了bibmacro。\bibopenbracket
\bibclosebracket
\mkbibparens
\bibopenparen
\bibcloseparen
textcite
为了在参考书目中将年份放在作者之后,我使用了一种 hack:使用,但从 复制bibenvironmentbibstyle=authoryear
的定义。(使用 时还 必须重新定义而不是。)bibliography
numeric.bbx
sortname
default
\DeclareNameAlias
要压缩页面范围,请使用\mkcomprange
。有关详细信息,请参阅手册第 4.6.4 节。
\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[
backend=bibtex,
citestyle=numeric,
bibstyle=authoryear,
sorting=none,
firstinits=true,
terseinits=true,
uniquename=init,
maxcitenames=2,
date=iso8601,
urldate=iso8601
]{biblatex}
\usepackage{filecontents}
\begin{filecontents*}{bib.bib}
@Article{foo,
author={Tex, La and Bar, Foo and Rate, Pi},
journal={Journal of LaTeX questions},
pages={110--120},
title={{Minimal title}},
volume={1},
number={1},
year={2011}}
@Article{bar,
author={Ba, Ka and Rise, Sun},
journal={Journal of BibLaTeX questions},
pages={110--131},
title={{Minimal title}},
volume={1},
number={1},
year={2012}}
\end{filecontents*}
% bibliography
\DeclareFieldFormat{labelnumberwidth}{#1.}% use 1., 2., ... in the references
\DeclareNameAlias{sortname}{last-first}
\renewbibmacro*{volume+number+eid}{% use volume(number) for articles for example
\setunit*{\adddot\space}%
\printfield{volume}%
\printfield{number}}
\DeclareFieldFormat*{number}{(#1)}
\DeclareFieldFormat*{title}{#1}% remove quotes from title
\renewbibmacro*{in:}{}% remove in label
\DeclareFieldFormat{isbn}{ISBN #1}% format isbn number
\addbibresource{bib.bib}% bibliography data
\renewcommand*{\cite}[2][]{\textcite[#1]{#2}}
\defbibenvironment{bibliography}
{\list
{\printtext[labelnumberwidth]{%
\printfield{prefixnumber}%
\printfield{labelnumber}}}
{\setlength{\labelwidth}{\labelnumberwidth}%
\setlength{\leftmargin}{\labelwidth}%
\setlength{\labelsep}{\biblabelsep}%
\addtolength{\leftmargin}{\labelsep}%
\setlength{\itemsep}{\bibitemsep}%
\setlength{\parsep}{\bibparsep}}%
\renewcommand*{\makelabel}[1]{\hss##1}}
{\endlist}
{\item}
\usepackage{xpatch}
\xpatchbibmacro{date+extrayear}{%
\printtext[parens]%
}{%
\setunit{\addperiod\space}%
\printtext%
}{}{}
\xapptobibmacro{journal+issuetitle}{\addcolon\space}{}{}
\xpatchbibmacro{textcite}{\bibopenbracket}{\bibopenparen}{}{}
\xpatchbibmacro{textcite}{\bibclosebracket}{\bibcloseparen}{}{}
\renewcommand*{\revsdnamepunct}{}
\renewcommand*{\multinamedelim}{\addspace\&\space}
\renewcommand*{\finalnamedelim}{\addspace\&\space}
\AtBeginBibliography{%
\renewcommand*{\multinamedelim}{\addcomma\space}%
\renewcommand*{\finalnamedelim}{\addcomma\space}%
}
\DeclareFieldFormat{pages}{\unskip\mkcomprange{#1}}
\DeclareFieldFormat{postnote}{\mkcomprange{#1}}
\DeclareFieldFormat{multipostnote}{\mkcomprange{#1}}
\begin{document}
Some text; see \cite{foo}, \cite{bar}.
\printbibliography
\end{document}