我正在尝试将当前引用更改为使用biblatex
包所需的引用。我尝试使用apacite
并提出了类似的问题,但遇到了问题。
当前引用:
Abernethy, MA, Kuang, YF, & Qin, B. (2015). 首席执行官权力对薪酬合同设计的影响。会计评论, 90(4), 1265-1306. 摘自https://doi.org/10.2308/accr-50971
所需引用:
Abernethy, MA, YF Kuang 和 B. Qin. 2015. 首席执行官权力对薪酬合约设计的影响。会计评论90 (4): 1265-1306,https://doi.org/10.2308/accr-50971
需要做出改变
- 在名字之后,所有名字都以首字母开头,然后是姓氏
- 删除“取自”字样
- 为 URL 着色并加下划线
- 删除期刊名称后的逗号
- 删除年份的括号
- 在发行号后添加冒号(:)
- 删除最后一个句号并用逗号代替
\begin{filecontents}{tempfile.bib}
@article{abernethy2015influence,
title={The influence of CEO power on compensation contract design},
author={Abernethy, Margaret A and Kuang, Yu Flora and Qin, Bo},
journal={The Accounting Review},
volume={90},
number={4},
pages={1265--1306},
year={2015},
publisher={American Accounting Association},
url = {https://doi.org/10.2308/accr-50971},
}
\end{filecontents}
\documentclass[letterpaper, 12pt]{article}
\usepackage[hidelinks]{hyperref}
\usepackage[backend=biber,style=apa]{biblatex}
\usepackage{doi}
\renewcommand{\doitext}{}
\addbibresource{tempfile.bib}
\DeclareFieldFormat[article]{volume}{\apanum{#1}}%volume deitalicize
\usepackage{doi}
\renewcommand{\doitext}{}
\begin{document}
\cite{abernethy2015influence}
\printbibliography
\end{document}
答案1
以下代码将帮助您获得所需的部分内容。这主要是从文件中复制apa.bbx
并进行细微更改。您可以复制apa.bbx
并修改它以获得所需的内容。
\DeclareDelimFormat[bib,biblist]{finalnamedelim:apa:family-given}{%
\ifthenelse{\value{listcount}>\maxprtauth}
{}
{\addspace and\space}}
\renewbibmacro*{url+urldate}{%
\ifthenelse{\(\iffieldundef{url}\AND\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}\)\OR\NOT\iffieldundef{doi}}
{}
{\ifthenelse{\iffieldundef{abstracturl}\AND\iffieldundef{abstractloc}}
{}
{\printtext{\bibcpstring{abstract}}\addspace}%
\setunit*{\addspace}%
\printfield{urldescription}%
\setunit*{\addcolon\addspace}%
\iffieldundef{url}{}{\printfield{url}\renewcommand*{\finentrypunct}{\relax}}%
\iffieldundef{abstractloc}{}{\printfield{abstractloc}\renewcommand*{\finentrypunct}{\relax}}%
\iffieldundef{abstracturl}{}{\printfield{abstracturl}\renewcommand*{\finentrypunct}{\relax}}}}
这主要是从文件中复制而来,apa.bbx
并略作修改。
答案2
正如评论中所提到的,我认为您想要的风格与以不同biblatex-apa
的、更可定制的风格为基础是一个好主意biblatex-apa
,biblatex-apa
它是专门为实现复杂的 APA 样式要求而设计的,并不旨在任意定制。
通常,标准样式是定制样式的更好基础。在这里,我从我的biblatex-ext
捆,因为它的一些功能可以让我们的生活变得更加轻松。
一些相关链接
@article
当然,仅从一个参考书目条目的示例就不可能设计出完整的风格,但这应该可以帮助您入门。
\documentclass[12pt]{article}
\usepackage[backend=biber,
style=ext-authoryear-comp,
giveninits=true, uniquename=init,
articlein=false]{biblatex}
\usepackage{hyperref}
\DeclareDelimFormat[bib]{nameyeardelim}{\newunitpunct}
\DeclareFieldFormat{biblabeldate}{#1}
\DeclareFieldFormat
[article,inbook,incollection,inproceedings,patent,thesis,unpublished]
{title}{#1}
\renewcommand*{\volnumdelim}{\addnbspace}
\DeclareFieldFormat[article,periodical]{number}{\mkbibparens{#1}}
\renewcommand*{\bibpagespunct}{\addcolon\space}
\DeclareFieldFormat{pages}{#1}
\renewbibmacro*{doi+eprint+url}{%
\setunit{\addcomma\space}\newblock
\ifboolexpr{togl {bbx:doi} and not test {\iffieldxref{doi}}}
{\printfield{doi}}
{}%
\setunit{\addcomma\space}\newblock
\ifboolexpr{togl {bbx:eprint} and not test {\iffieldxref{eprint}}}
{\usebibmacro{eprint}}
{}%
\setunit{\addcomma\space}\newblock
\ifboolexpr{togl {bbx:url} and not test {\iffieldxref{url}}}
{\usebibmacro{url+urldate}}
{}}
\begin{filecontents}{\jobname.bib}
@article{abernethy2015influence,
title = {The Influence of {CEO} Power on Compensation Contract Design},
author = {Abernethy, Margaret A. and Kuang, Yu Flora and Qin, Bo},
journal = {The Accounting Review},
volume = {90},
number = {4},
pages = {1265-1306},
year = {2015},
doi = {10.2308/accr-50971},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Lorem \autocite{abernethy2015influence}
\printbibliography
\end{document}