如何从 JabRef 中获取 InCollection 中书名前面的每个编辑的姓名?

如何从 JabRef 中获取 InCollection 中书名前面的每个编辑的姓名?

我正在使用 Biblatex 编制参考书目,并引用了许多属于合集/编辑书籍的文章。根据我的参考指南,我需要姓氏、名字首字母。(年份)。“标题”。在:姓氏、名字首字母(编辑)、书名。位置:出版商、页数。

大部分都很好,但我的 \printbibliography 命令只允许我将编辑者放在标题之前,并使用“第一作者等”,但我需要在书名之前列出每个编辑者。

我使用 JabRef,其中我使用 InCollection 作为格式。我在 Latex 中的前言如下所示:

\documentclass[a4paper, 12pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{soul}
\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{subcaption}
\usepackage{hanging}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\setlength{\headsep}{1.2cm}

\onehalfspacing
\pagestyle{fancy}

\lhead{Header}
\chead{Headrer}
\rhead{Header}

\usepackage{fontspec} 
\setmainfont{Times New Roman}
\usepackage[style=ext-authoryear, firstinits=true,  backend=biber, 
innamebeforetitle = true]{biblatex}

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

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


\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\addbibresource{bibfile.bib}
\nocite{*}
\renewcommand*{\nameyeardelim}{\addcomma\space}

我已在下面附加两个来源,因为我已将它们输入 JabRef。

@InCollection{Andreadisetal,
  author    = {Andreadis, I. and Cremonesi, C. and Kartsounidou, E. and Kasprowicz, D. and Hess, A.},
  title     = {Attitudinal and Behavioral Responses to Populist Communication: The Impact of Populist Message Elements on Populist Attitudes and Voting Intentions},
  booktitle = {Communicating populism: comparing actor perceptions, media coverage, and effects on citizens in Europe},
  year      = {2019},
  publisher = {Routledge},
  location  = {New York},
  editor   = {Reinemann, C. and Stanyer, J. and Aalberg, T. and Esser, F. and De Vreese, C.H.},
}

@InCollection{Bruns&Highfield,
  author    = {Bruns, A. and Highfield, T.},
  title     = {Is Habermas on Twitter? Social Media and the Public Sphere},
  booktitle = {The Routledge Companion to Social Media and Politics},
  year      = {2016},
  editor    = {Bruns, A. and Enli, G. and Skogerbø, E. and Larsson, A.O. and Christensen, C.},
  publisher = {Routledge},
  location  = {New York},
}

有没有办法向 LaTeX 指定我想要在书名前显示所有编辑者的名字,而不仅仅是在书名前显示“et al.”?

答案1

基于https://tex.stackexchange.com/a/287780/36296以下对bbx:in:editor宏的重新定义将显示最多 42 个编辑器 - 如果需要更多,请根据需要增加这个数字。

另请注意,该选项firstinits已弃用,请改用giveninits

\documentclass[a4paper, 12pt]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{soul}
\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage[margin=2.5cm]{geometry}
\usepackage{fancyhdr}
\usepackage{setspace}
\usepackage{listings}
\usepackage{color}
\usepackage{subcaption}
\usepackage{hanging}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\setlength{\headsep}{1.2cm}

\onehalfspacing
\pagestyle{fancy}

\lhead{Header}
\chead{Headrer}
\rhead{Header}
\setlength{\headheight}{14.5pt}

%\usepackage{fontspec} 
%\setmainfont{Times New Roman}
\usepackage[style=ext-authoryear, giveninits=true, uniquename=init, backend=biber, 
innamebeforetitle = true,
]{biblatex}

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

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


\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\addbibresource{\jobname.bib}
\nocite{*}
\renewcommand*{\nameyeardelim}{\addcomma\space}

\makeatletter
\renewbibmacro*{bbx:in:editor}[1]{%
  \ifboolexpr{
    test \ifuseeditor
    and
    not test {\ifnameundef{editor}}
  }
    {\ifboolexpr{togl {bbx:innameidem} and test {\bbx@ineditoridem}}
       {\bibstring[\mkibid]{idem\thefield{gender}}}
       {\printnames[ineditor][1-42]{editor}}%
     \setunit{\printdelim{editortypedelim}}%
     \usebibmacro{#1}%
     \clearname{editor}}
    {}}
\makeatother


\begin{document}
\cite{Andreadisetal} \cite{Bruns&Highfield}

\printbibliography
\end{document}

在此处输入图片描述

相关内容