私はプロジェクトに取り組んでおり、特定のスタイルの Heimildir (つまり References) が必要です。ほぼ希望どおりのものがすべて揃っています:
ただし、"Gefið út af" (英語の "Edited by" に相当) というフレーズを、編集者名の後に "(ritstj.)" (英語の "(ed./eds.)" に相当) として表示する必要があります。Bibtex と APA スタイルでこれを行うことはできますが、APA スタイルではイニシャルのみが表示され、必要なフルネームは表示されません。私は一般的なフレーズ ("pp." の代わりに "bls." など) を置き換える babel パッケージを使用しているので、本当に必要なのは、その "contributor type" フィールドを移動する方法だけだと思います。
MWE:
\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}