我可以告訴 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}

Ensk-íslensk skólaorðabók (1986)。喬恩‧斯卡普塔森 (Jón Skaptason)。雷克雅未克:Örn og Örlygur。 「『顏色』的語言學」。 Í:思想和語言中的顏色類別。克萊德·L·哈丁(Hardin)和路易莎·馬菲(Luisa Maffi)(ritstj.)。劍橋:劍橋大學出版社,bls。 320–346。

相關內容