我正在尝试找到一种方法来表明某一章是重印的(在下面的 MWE 中,test1
是重印的test2
)。我看了看这但是我想要一个不需要向文件添加诸如和之Reprintedin
类的字段的解决方案,因为我的是由 Zotero 生成的,并且给出了字段的类型(尽管我可以添加一个字段)。Reprintpages
.bib
.bib
note
有没有办法交叉引用(或任何其他解决方法)?
请考虑以下 MWE:
\RequirePackage{filecontents}
\begin{filecontents*}{mybib.bib}
@incollection{test1,
address = {London},
title = {Deliberation and democratic legitimacy},
isbn = {0415302102},
lccn = {JA71 .D36 2003},
booktitle = {Debates in contemporary political philosophy: {An} anthology},
publisher = {Routledge},
author = {Cohen, Joshua},
editor = {Matravers, Derek and Pike, Jonathan E.},
year = {2003 [1989]},
pages = {342--360},
}
@book{test2,
address = {Oxford},
title = {The {Good} polity: {Normative} analysis of the state},
isbn = {0631158049},
lccn = {JC325 .G59 1989},
shorttitle = {The {Good} polity},
publisher = {Blackwell},
editor = {Hamlin, Alan P. and Pettit, Philip},
year = {1989}
}
}
\end{filecontents*}
\documentclass[a4paper]{article}
% Set the values for the bibliography
\usepackage[
style=apa,
backend=biber,
isbn=false,
url=false,
doi=false,
eprint=false,
hyperref=true,
backref=false,
firstinits=false,
]{biblatex}
% Recommended by biblatex
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\usepackage{xpatch}
% Set language
\usepackage[british]{babel}
\DeclareLanguageMapping{british}{british-apa}
\addbibresource{mybib.bib}
\begin{document}
\cite{test1}
\printbibliography
\end{document}
理想情况下,我希望获得以下文内引用:
(Cohen,2003[1989])
并在参考文献列表中附上以下完整引文:
Cohen, J. (2003)。审议与民主合法性。收录于 D. Matravers & JE Pike (编),当代政治哲学中的辩论:选集 (第 342-360 页)。(转载自良好政体:国家的规范分析,第 17-34 页,AP Hamlin 和 P. Pettit 编,1989 年,牛津:Blackwell)。伦敦:Routledge。
答案1
无需更改文件bib
。可以使用以下方法添加有关原始出版物的信息\DeclareSourcemap
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map{
\step[fieldsource=entrykey, match=\regexp{test1},
fieldset=related, fieldvalue={test2}]
\step[fieldsource=entrykey, match=\regexp{test1},
fieldset=relatedtype, fieldvalue={reprintfrom}]
}
}
}
biblatex样式apa
在书目信息中不包含重印日期。因此,我们可以使用该xpatch
包(即使用来\usepackage{xpatch}
加载它)和以下代码对其进行修补
\xpatchbibmacro{related:reprintfrom}
{\usebibmacro{location+publisher}}
{\usebibmacro{date}\setunit{\addcomma\addspace}\usebibmacro{location+publisher}}
{}
{}
同样,apa
没有指定重印作品的编辑者是编辑者。因此,我们可以ed/eds
通过再次修补bibmacro
用于类型reprintfrom
(related:reprintfrom
)的相关作品的字符串来添加该字符串
\xpatchbibmacro{related:reprintfrom}
{\printnames[apanames][-\value{listtotal}]{editor}}
{\printnames[apanames][-\value{listtotal}]{editor}%
\ifnameundef{editor}{}{\addcomma\addspace\usebibmacro{apaeditorstrg}{editor}}}
{}
{}
最后,要打印全文,Reprint from
有两种选择:第一种是加载选项abbreviate=false
(biblatex
但它会关闭所有缩写)或者我们可以重新定义与其关联的参考书目字符串(reprintfrom
);这可以按照以下代码完成:
\DefineBibliographyStrings{british}{
reprintfrom = {Reprinted from}
}