我可以告诉 Biblatex 将贡献者类型放在贡献者姓名后的括号中,而不是放在前面以 authoryear 样式写的短语中吗?

我可以告诉 Biblatex 将贡献者类型放在贡献者姓名后的括号中,而不是放在前面以 authoryear 样式写的短语中吗?

我正在做一个项目,需要一种特定的 Heimildir 风格(即参考文献)。我已经得到了我想要的一切:

参考

只是我需要短语“Gefið út af”(相当于英文中的“Edited by”)出现在编辑者姓名后面,即“(ritstj.)”(相当于英文中的“(ed./eds.)”)。我知道我可以使用 Bibtex 和 APA 样式来实现这一点,但 APA 样式只显示首字母,而不显示全名,而这正是我需要的。我正在使用 babel 包来替换常用短语(例如用“bls.”替换“pp.”),所以我认为我真正需要的是一种移动“贡献者类型”字段的方法。

梅威瑟:

\documentclass{article}

\begin{filecontents}{citelist.bib}
@book{enisskola,
    langid = {icelandic},
    options = {useeditor=false},
    year={1986},
    title = {Ensk-íslensk skólaorðabók},
    editor = {{Jón Skaptason}},
    publisher = {Örn og Örlygur},
    location = {Reykjavík}
    }  

@incollection{lucy1997,
    langid = {british},
    address = {Cambridge},
    year = {1997},
    title = {The linguistics of \lq color\rq},
    booktitle = {Color Categories in Thought and Language},
    author = {John A. Lucy},
    editor = {Clyde L. Hardin and Luisa Maffi},
    publisher = {Cambridge University Press},
    location = {Cambridge},
    pages = {320--346}
    }
}
\end{filecontents}

\usepackage[utf8]{inputenc}
\usepackage[LY1]{fontenc}
\usepackage[icelandic]{babel}
\usepackage{csquotes}
\usepackage{lmodern}

\usepackage[sortlocale=auto,backend=biber,style=authoryear]{biblatex}
\addbibresource{citelist.bib}

\begin{document}


citations:  \\
I cited \cite{enisskola}    \\
I cited \cite{lucy1997} \\

\printbibliography

\end{document}

答案1

您可以通过将代码从editor...宏复制到byeditor...宏来获得您想要的内容。

下面应该是一个开始。

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[icelandic]{babel}
\usepackage{csquotes}
\usepackage{lmodern}

\usepackage[backend=biber, style=authoryear]{biblatex}

\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}

\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}

\renewbibmacro*{byeditor}{%
  \ifnameundef{editor}
    {}
    {\printnames{editor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{editorstrg}%
     \clearname{editor}}%
  \usebibmacro{byeditorx}}

\newbibmacro*{editorstrg:x}[1]{%
  \printtext[editortype]{%
    \iffieldundef{#1type}
      {\ifboolexpr{
         test {\ifnumgreater{\value{#1}}{1}}
         or
         test {\ifandothers{#1}}
       }
         {\bibstring{editors}}
         {\bibstring{editor}}}
      {\ifbibxstring{\thefield{#1type}}
         {\ifboolexpr{
            test {\ifnumgreater{\value{#1}}{1}}
            or
            test {\ifandothers{#1}}
          }
            {\bibstring{\thefield{#1type}s}}
            {\bibstring{\thefield{#1type}}}}
         {\thefield{#1type}}}}}

\renewbibmacro*{byeditorx}{%
  \ifnameundef{editora}
    {}
    {\printnames{editora}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{editorstrg:x}{editora}}%
  \ifnameundef{editorb}
    {}
    {\printnames{editorb}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{editorstrg:x}{editorb}}%
  \ifnameundef{editorc}
    {}
    {\printnames{editorc}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{editorstrg:x}{editorc}}}

\renewbibmacro*{bytranslator}{%
  \ifnameundef{translator}
    {}
    {\printnames{translator}%
     \setunit{\printdelim{translatortypedelim}}%
     \usebibmacro{translatorstrg}%
     \clearname{translator}}}

\renewbibmacro*{byholder}{%
  \printnames{holder}}

\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\printnames{editor}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{editor+othersstrg}%
     \clearname{editor}}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

\renewbibmacro*{bytranslator+others}{%
  \ifnameundef{translator}
    {}
    {\printnames{translator}%
     \setunit{\printdelim{translatortypedelim}}%
     \usebibmacro{translator+othersstrg}%
     \clearname{translator}}%
  \usebibmacro{withothers}}

\begin{filecontents}{\jobname.bib}
@book{enisskola,
    langid    = {icelandic},
    options   = {useeditor=false},
    year      = {1986},
    title     = {Ensk-íslensk skólaorðabók},
    editor    = {{Jón Skaptason}},
    publisher = {Örn og Örlygur},
    location  = {Reykjavík},
}
@incollection{lucy1997,
    langid    = {british},
    address   = {Cambridge},
    year      = {1997},
    title     = {The linguistics of \lq color\rq},
    booktitle = {Color Categories in Thought and Language},
    author    = {John A. Lucy},
    editor    = {Clyde L. Hardin and Luisa Maffi},
    publisher = {Cambridge University Press},
    location  = {Cambridge},
    pages     = {320--346},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
I cited \autocite{enisskola}
I cited \autocite{lucy1997}

\printbibliography
\end{document}

恩斯克-伊斯伦斯克学校 (1986)。 Jón Skaptason(复制)。雷克雅未克:Örn og Örlygur。//Lucy,John A.(1997 年)。 “‘颜色’语言学”。 Í:思想和语言中的颜色类别。哈丁,克莱德 L. 和路易莎玛菲 (ritstj.)。剑桥:剑桥大学出版社,bls。 320–346。

相关内容