按原版日期排序参考书目

按原版日期排序参考书目

有没有办法使用 origdate 作为标准对参考书目进行排序。

我尝试定义一个新的排序方案,但是它不起作用。它出了什么问题?

最小示例:

\documentclass[12pt]{book}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[english]{babel}
\usepackage[autostyle]{csquotes}

\usepackage[backend=biber,bibstyle=verbose,sorting=noyt]{biblatex}
% To make origdate visible
\renewbibmacro*{title}{%
  \ifboolexpr{
    test {\iffieldundef{title}}
    and
    test {\iffieldundef{subtitle}}
  }
    {}
    {\printtext[title]{%
       \printfield[titlecase]{title}%
       \setunit{\subtitlepunct}%
       \printfield[titlecase]{subtitle}}%
     \newunit}%
     \iffieldundef{origyear}{}{\setunit{}
    \mkbibparens{\printorigdate}
    \newunit}
}

% New sorting scheme

\DeclareSortingScheme{noyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{sortorigdate}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{
  \field{origdate}
  }
  \sort{
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field[padside=left,padwidth=4,padchar=0]{volume}
    \literal{0000}
  }
}

\addbibresource{example.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

example.bib 文件:

@book{a,
  author       = {Doe, John},
  title        = {Another Super Book},
  date         = 2006,
  origdate = {1994},
  publisher        = {Publisher}
}
@book{b,
  author       = {Doe, John},
  title        = {Super Book},
  date         = 2006,
  origdate = {1991},
  publisher        = {Publisher}
}

@book{c,
  author       = {Sponge, Bob},
  title        = {My Life},
  date         = 2007,
  publisher        = {Publisher}
}

结果如下:

在此处输入图片描述

我希望“超级书”能位列列表第一位。

答案1

根据评论(感谢 jon 和 moewe),以下是正确的排序方案:

\DeclareSortingScheme{noyt}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort{
    \field{sortname}
    \field{author}
    \field{editor}
    \field{translator}
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field{origyear}
    \field{sortyear}
    \field{year}
  }
  \sort{
    \field{sorttitle}
    \field{title}
  }
  \sort{
    \field[padside=left,padwidth=4,padchar=0]{volume}
    \literal{0000}
  }
}

相关内容