几年前,我询问如何让 Biblatex 在参考书目中引用以“由...翻译为...”形式出现的作品的翻译。
在那篇文章中,我被告知要使用relatedtype={bytranslator}
而不是relatedtype={translatedas}
。这通常很有效。但是,我刚刚遇到了一个小问题,即在未指定译者的情况下。在这种情况下,我认为应该删除“by ...”一词,这样只保留“translated as [title of work]”。但结果却是“translated by [title of work]”。也就是说,Biblatex 不是删除译者姓名前面的“by”一词,而是删除姓名后面的“as”一词。可以修复这个问题吗?
这是一个 MWE(请注意,这个例子是虚构的;这个翻译的译者实际上是已知的;但我遇到过译者不详的情况):
\documentclass[12pt]{article}
\usepackage{filecontents}
\begin{filecontents}{biblio.bib}
@book{Badiou2006,
author = {Badiou, Alain},
title = {Logiques des mondes},
subtitle = {L'\^{e}tre et l'\'{e}v\'{e}nement 2},
location = {Paris},
publisher = {\'{E}ditions du Seuil},
date = {2006},
related={Badiou2009},
relatedtype={bytranslator},
}
@book{Badiou2009,
author = {Badiou, Alain},
title = {Logics of worlds},
subtitle = {Being and event 2},
location = {London},
publisher = {Continuum},
year = {2009},
}
\end{filecontents}
\usepackage[style=authoryear,abbreviate=false]{biblatex}
\addbibresource{biblio.bib}
\begin{document}
Citing a book by \textcite{Badiou2006}.
\printbibliography
\end{document}
这将产生以下条目:
巴迪欧,阿兰(2006)。世界的逻辑。存在与事件 2。巴黎:Éditions du Seuil。被某某人翻译世界的逻辑。存在与事件 2(伦敦:Continuum,2009 年)。
应该是“翻译为”,而不是“翻译者”。如何实现?
编辑:
它们relatedtype
不仅适用于书籍,还适用于期刊或文集中的文章,例如:
@incollection{Althusser1976a,
author = {Althusser, Louis},
title = {Id\'{e}ologie et appareils id\'{e}ologiques d'\'{E}tat},
subtitle = {Notes pour une recherche},
location = {Paris},
publisher = {\'{E}ditions sociales},
year = {1976},
booktitle = {Positions, 1964--1975},
pages = {67-125},
related = {Althusser1971a},
relatedtype = {translatedbyas},
}
@incollection{Althusser1971a,
author = {Althusser, Louis},
translator = {Brewster, Ben},
title = {Ideology and ideological state apparatuses},
subtitle = {Notes towards an investigation},
location = {New York},
publisher = {Monthly Review Press},
year = {1971},
booktitle = {Lenin and philosophy and other essays},
pages = {127-186},
}
答案1
您可以定义一个新的relatedtype
基础,以bytranslator
处理缺失的翻译器。
这里唯一的技巧是检查是否translator
存在,并根据是否存在打印不同的字符串。下面related:translatedbyas
是related:bytranslator
来自biblatex.def
(v3.16 中的 ll. 2291-3008)。
\documentclass[12pt]{article}
\usepackage[style=authoryear,abbreviate=false]{biblatex}
\NewBibliographyString{translated}
\DefineBibliographyStrings{english}{
translated = {translated},
}
\makeatletter
\newbibmacro*{related:translatedbyas}[1]{%
\entrydata{#1}{%
\ifnameundef{translator}
{\bibstring{translated}}
{\bibstring{bytranslator}%
\setunit{\addspace}%
\renewbibmacro*{name:hook}[1]{%
\ifnumequal{\value{listcount}}{1}
{\mkrelatedstringtext{\lbx@initnamehook{##1}}}
{}}%
\printnames[bytranslator]{translator}}%
\setunit{\addspace}
\bibstring[\mkrelatedstringtext]{astitle}%
\setunit{\space}%
\usebibmacro{title}%
\setunit{\addspace}%
\printtext[parens]{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printdate}}}
\makeatother
\begin{filecontents}{\jobname.bib}
@book{Badiou2006,
author = {Badiou, Alain},
title = {Logiques des mondes},
subtitle = {L'être et l'événement 2},
location = {Paris},
publisher = {Éditions du Seuil},
date = {2006},
related = {Badiou2009},
relatedtype = {translatedbyas},
}
@book{Badiou2009,
author = {Badiou, Alain},
title = {Logics of worlds},
subtitle = {Being and event 2},
location = {London},
publisher = {Continuum},
year = {2009},
}
@book{Badiou2007,
author = {Badiou, Alain},
title = {Logiques des mondes},
subtitle = {L'être et l'événement 3},
location = {Paris},
publisher = {Éditions du Seuil},
date = {2007},
related = {Badiou2010},
relatedtype = {translatedbyas},
}
@book{Badiou2010,
author = {Badiou, Alain},
translator = {Toscano, Alberto},
title = {Logics of worlds},
subtitle = {Being and event 3},
location = {London},
publisher = {Continuum},
year = {2010},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
Citing a book by \textcite{Badiou2006,Badiou2007}.
\printbibliography
\end{document}
连同来自的代码biblatex:relatedtype={bytranslator} 与 @article 和 @incollection 无法按预期协同工作你可能会得到类似这样的结果
\makeatletter
\newbibmacro*{related:translatedbyas}[1]{%
\entrydata{#1}{%
\ifnameundef{translator}
{\bibstring{translated}}
{\bibstring{bytranslator}%
\setunit{\addspace}%
\renewbibmacro*{name:hook}[1]{%
\ifnumequal{\value{listcount}}{1}
{\mkrelatedstringtext{\lbx@initnamehook{##1}}}
{}}%
\printnames[bytranslator]{translator}%
\clearname{translator}}%
\setunit{\addspace}
\bibstring[\mkrelatedstringtext]{astitle}%
\setunit{\space}%
\usebibmacro{title}%
\ifentrytype{article}
{\usebibmacro{in:}%
\usebibmacro{journal+issuetitle}}
{}
\ifentrytype{inbook}
{\usebibmacro{in:}%
\usebibmacro{bybookauthor}%
\newunit\newblock
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}}
{}
\ifentrytype{incollection}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\printfield{edition}%
\newunit
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}}
{}
\ifentrytype{inproceedings}
{\usebibmacro{in:}%
\usebibmacro{maintitle+booktitle}%
\newunit\newblock
\usebibmacro{event+venue+date}%
\newunit\newblock
\usebibmacro{byeditor+others}%
\newunit\newblock
\iffieldundef{maintitle}
{\printfield{volume}%
\printfield{part}}
{}}
{}
\setunit{\addspace}%
\printtext[parens]{%
\printlist{location}%
\iflistundef{publisher}
{\setunit*{\addcomma\space}}
{\setunit*{\addcolon\space}}%
\printlist{publisher}%
\setunit*{\addcomma\space}%
\printdate}
\newunit\newblock
\printfield{note}%
\newunit\newblock
\printfield{chapter}%
\setunit{\bibpagespunct}%
\printfield{pages}}}
\makeatother