biblatex - 如何在名称后面的括号中输入“编辑者”?(作者年份)

biblatex - 如何在名称后面的括号中输入“编辑者”?(作者年份)

对于诸如合集、论文集等来源类型,我必须在括号中注明编辑。参考书目项目的相关部分目前如下所示

编辑:F. Seibt

但必须

Seibt,F.(编辑)

对于多位编辑来说,现状是

编辑:GER Lloyd/GEL Owen

但必须如此

Lloyd, 德国 / Owen, 格鲁吉亚 (编辑)

\documentclass[
12pt,
a4paper
]
{scrreprt}

\usepackage[T1]{fontenc}
\usepackage{lmodern}

\usepackage[
language=auto,
style=authoryear,
backend=bibtex,
isbn=false,
doi=false,
citereset=chapter,
maxcitenames=3,
dashed=false,
sorting=nyt,
firstinits=true,
terseinits=false
maxbibnames=99,
uniquename=init
]{biblatex}

\begin{filecontents*}{lit.bib}
@InCollection{brandt,
  options     = {useprefix=false},
  hyphenation     = {german},
  indexsorttitle  = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448},
  author      = {von Brandt, Ahasver and Erich Hoffmann},
  editor      = {Ferdinand Seibt},
  indextitle      = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448, Die},
  title       = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448},
  shorttitle      = {Die nordischen L{\"a}nder},
  booktitle   = {Europa im Hoch- und Sp{\"a}tmittelalter},
  series      = {Handbuch der europ{\"a}ischen Geschichte},
  number      = {2},
  publisher   = {Klett-Cotta},
  location    = {Stuttgart},
  date        = {1987},
  pages       = {884--917},
}
@InProceedings{moraux,
  keywords    = {secondary},
  hyphenation     = {french},
  indexsorttitle  = {De Anima dans la tradition grecque},
  author      = {Moraux, Paul},
  editor      = {Lloyd, G. E. R. and Owen, G. E. L.},
  indextitle      = {\emph{De Anima} dans la tradition gr{\`e}cque, Le},
  title       = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
  subtitle    = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}
            Themistius},
  shorttitle      = {\emph{De Anima} dans la tradition gr{\`e}cque},
  booktitle   = {Aristotle on Mind and the Senses},
  booktitleaddon  = {Proceedings of the Seventh Symposium Aristotelicum},
  eventdate   = {1975},
  publisher   = cup,
  location    = {Cambridge},
  date        = {1979},
  pages       = {281--324},
  annotation      = {This is a typical \texttt{inproceedings} entry. Note the \texttt{booksubtitle},
            \texttt{shorttitle}, \texttt{indextitle}, and \texttt{indexsorttitle} fields.
            Also note the \texttt{eventdate} field.}
}
\end{filecontents*}

\addbibresource{lit.bib}

\DeclareNameAlias{sortname}{last-first}

\renewcommand{\multinamedelim}{\addslash}
\renewcommand{\finalnamedelim}{\addslash}

\begin{document}
\chapter{First Chapter}
\begin{itemize}
    \item This is for the \verb+@incollection+ type by \citeauthor{brandt}.\footcite[See][p. 12]{brandt} The bibliography item currently looks like
    \begin{verbatim}
    Ed. by F. Seibt
    \end{verbatim}
    but I must have
    \begin{verbatim}
    Seibt, F. (editor)
    \end{verbatim}
    \item Then for \verb+@inproceedings+, in the case of multiple editors: these are just some words to have a sentence.\footcite[Cp.][p. xi]{moraux}. This currently looks like
    \begin{verbatim}
    Ed. by G. E. R. Lloyd/G. E. L. Owen
    \end{verbatim}
    but I must have
    \begin{verbatim}
    Lloyd, G. E. R./Owen, G. E. L. (editors)
    \end{verbatim}
\end{itemize}
\printbibliography
\end{document}

答案1

为了达到所需的结果,您必须执行两个步骤:

  1. 更改编辑器名称和字符串编辑器的顺序
  2. 将编辑器字符串放在括号内。

第一个可以通过重新定义 bibmacro 来实现{byeditor+others}

\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
     \setunit{\addspace}%
     \usebibmacro{byeditor+othersstrg}%
     \clearname{editor}%
     \newunit}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}

第二个要求也可以通过重新定义来实现,但我更喜欢使用包的更优雅的方式xpatch

\usepackage{xpatch}
\xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}

通过这些设置,您可以获得以下 MWE:(我用babel加载ngerman

\documentclass[
12pt,
a4paper,
ngerman,
]
{scrreprt}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage[
language=auto,
style=authoryear,
backend=biber,
isbn=false,
doi=false,
citereset=chapter,
maxcitenames=3,
dashed=false,
sorting=nyt,
firstinits=true,
terseinits=false
maxbibnames=99,
uniquename=init
]{biblatex}

\begin{filecontents*}{lit.bib}
@InCollection{brandt,
  options     = {useprefix=false},
  hyphenation     = {german},
  indexsorttitle  = {Nordischen Lander von der Mitte des 11. Jahrhunderts bis 1448},
  author      = {von Brandt, Ahasver and Erich Hoffmann},
  editor      = {Ferdinand Seibt},
  indextitle      = {Nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448, Die},
  title       = {Die nordischen L{\"a}nder von der Mitte des 11.~Jahrhunderts bis 1448},
  shorttitle      = {Die nordischen L{\"a}nder},
  booktitle   = {Europa im Hoch- und Sp{\"a}tmittelalter},
  series      = {Handbuch der europ{\"a}ischen Geschichte},
  number      = {2},
  publisher   = {Klett-Cotta},
  location    = {Stuttgart},
  date        = {1987},
  pages       = {884--917},
  annotation      = {An \texttt{incollection} entry with a \texttt{series} and a \texttt{number}.
            Note the format of the printed name and compare the \texttt{useprefix} option in
            the \texttt{options} field as well as \texttt{vangennep}. Also note the
            \texttt{indextitle, and \texttt{indexsorttitle} fields}}
}
@InProceedings{moraux,
  keywords    = {secondary},
  hyphenation     = {french},
  indexsorttitle  = {De Anima dans la tradition grecque},
  author      = {Moraux, Paul},
  editor      = {Lloyd, G. E. R. and Owen, G. E. L.},
  indextitle      = {\emph{De Anima} dans la tradition gr{\`e}cque, Le},
  title       = {Le \emph{De Anima} dans la tradition gr{\`e}cque},
  subtitle    = {Quelques aspects de l'interpretation du trait{\'e}, de Theophraste {\`a}
            Themistius},
  shorttitle      = {\emph{De Anima} dans la tradition gr{\`e}cque},
  booktitle   = {Aristotle on Mind and the Senses},
  booktitleaddon  = {Proceedings of the Seventh Symposium Aristotelicum},
  eventdate   = {1975},
  publisher   = cup,
  location    = {Cambridge},
  date        = {1979},
  pages       = {281--324},
  annotation      = {This is a typical \texttt{inproceedings} entry. Note the \texttt{booksubtitle},
            \texttt{shorttitle}, \texttt{indextitle}, and \texttt{indexsorttitle} fields.
            Also note the \texttt{eventdate} field.}
}
\end{filecontents*}

\addbibresource{lit.bib}

\DeclareNameAlias{sortname}{last-first}

\renewcommand{\multinamedelim}{\addslash}
\renewcommand{\finalnamedelim}{\addslash}


\renewbibmacro*{byeditor+others}{%
  \ifnameundef{editor}
    {}
    {\printnames[byeditor]{editor}%
     \setunit{\addspace}%
     \usebibmacro{byeditor+othersstrg}%
     \clearname{editor}%
     \newunit}%
  \usebibmacro{byeditorx}%
  \usebibmacro{bytranslator+others}}
\usepackage{xpatch}
\xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}



\begin{document}

\chapter{First Chapter}
\begin{itemize}
    \item This is for the \verb+@incollection+ type by \citeauthor{brandt}.\footcite[See][p. 12]{brandt} The bibliography item currently looks like
    \begin{verbatim}
    Ed. by F. Seibt
    \end{verbatim}
    but I must have
    \begin{verbatim}
    Seibt, F. (editor)
    \end{verbatim}
    \item Then for \verb+@inproceedings+, in the case of multiple editors: these are just some words to have a sentence.\footcite[Cp.][p. xi]{moraux}. This currently looks like
    \begin{verbatim}
    Ed. by G. E. R. Lloyd/G. E. L. Owen
    \end{verbatim}
    but I must have
    \begin{verbatim}
    Lloyd, G. E. R./Owen, G. E. L. (editors)
    \end{verbatim}
\end{itemize}
\printbibliography
\end{document}

结果是:

enter image description here

相关内容