biblatex-apa 排序问题

biblatex-apa 排序问题

我遇到的一个问题就是biblatex-apa同一作者的两部作品没有按照从最早到最近的时间顺序排列。

\documentclass{article}

\usepackage[style=apa]{biblatex}
\addbibresource{bibliography.bib}

\begin{document}

\nocite{*}
\printbibliography

\end{document}
@thesis{test1,
  author = {Doe, John},
  year = 2022,
  title = {Test title},
  type = {Unpublished manuscript},
  institution = {Test Institution},
}

@presentation{test2,
  author = {Doe, John},
  eventdate = {2023-08-23/2023-08-25},
  title = {Sample title},
  titleaddon = {Paper presentation},
  eventtitle = {Test Event},
  venue = {Test Venue},
}

在此处输入图片描述

我不确定这是否与条目类型有关,但@thesis@presentation是我正在使用的类型。

答案1

你应该报告此事https://github.com/plk/biblatex-apa/issues当指导biblatex-apa-test-references.bib用于eventdate条目@presentationbiblatex-apa排序时也应该考虑到这一点。

目前,您可以添加以下排序模板的重新定义以eventdate在排序时包含信息。

\documentclass{article}

\usepackage[style=apa]{biblatex}

\DeclareSortingTemplate{apa}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{pubstate}
  }
  \sort{
    \field{sortyear}
    \field{year}
    \field{eventyear}
    \literal{-2000000000}% APA has "nodates" coming first
  }
  \sort{
    \field{month}
    \field{eventmonth}
    \literal{-2000000000}% APA has "nodates" coming first
  }
  \sort{
    \field{day}
    \field{eventday}
    \literal{-2000000000}% APA has "nodates" coming first
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{volume}
    \literal{0}
  }
}

\begin{filecontents}[overwrite]{\jobname.bib}
@thesis{test1,
  author = {Doe, John},
  year = 2022,
  title = {Test title},
  type = {Unpublished manuscript},
  institution = {Test Institution},
}

@presentation{test2,
  author = {Doe, John},
  eventdate = {2023-08-23/2023-08-25},
  title = {Sample title},
  titleaddon = {Paper presentation},
  eventtitle = {Test Event},
  venue = {Test Venue},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}

\nocite{*}
\printbibliography

\end{document}

Doe, J. (2022)。测试标题 [未发表的手稿]。测试机构。Doe, J. (2023 年 8 月 23-25 日)。样本标题 [论文展示]。测试活动,测试地点。

相关内容