biblatex-philosophy 中的 Origdate 引用

biblatex-philosophy 中的 Origdate 引用

我需要按照哈佛标准将原始出版日期,即该年份打印在重印日期旁边的括号中。我遵循moewe 的回答大部分情况下都可以正常工作:

\documentclass[chapterprefix=false,numbers=endperiod,headsepline=1pt,DIV=classic]{scrbook}

\usepackage[backend=biber,style=philosophy-classic,scauthors=bib]{biblatex}
\renewcommand*{\volnumpunct}{\addthinspace}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat{volume}{{#1}}
\DeclareFieldFormat{number}{(#1)}
\DeclareFieldFormat{pages}{pp. #1}
\renewcommand*{\postnotedelim}{: }
\DeclareFieldFormat{postnote}{#1}
\DeclareNameAlias{sortname}{family-given}
\DeclareNameWrapperFormat{sortname}{%
  \iftoggle{bbx:scauthorsbib}{\usebibmacro{bbx:scswitch}}{}%
  #1}

%moewe:

\DeclareFieldFormat{origdate}{\mkbibbrackets{#1}}
\renewbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{origyear}
    {}
    {\printorigdate
     \setunit{\addspace}}%
  \iffieldundef{labelyear}
    {}
    {\printtext[bibhyperref]{\printlabeldateextra}}}

\DeclareCiteCommand{\citeorigyear}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printfield{origyear}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\renewbibmacro*{date+extradate}{%
  \iffieldundef{origyear}
    {}
    {\printorigdate
     \setunit{\addspace}}%
  \iffieldundef{labelyear}
    {}
    {\printtext[parens]{%
       \iflabeldateisdate
         {\printdateextra}
         {\printlabeldateextra}}}}
\addbibresource{bibliography.bib}

\begin{document}
\printbibliography[heading=bibintoc]
\end{document}

在此处输入图片描述

但是,正如您所看到的,我将biblatex-philosophy其视为origdate与翻译数据相关的字段:

以下 [orig*] 字段可以保存翻译或原始版本数据。根据 origfields=trans(默认)或 origfields=origed 选项(见下文),它们前面分别带有字符串“trans.”或“orig. ed.”。请注意,打印这些字段需要 origdate/transdate 字段。

我怎样才能摆脱这些字符串并只在位置字段末尾添加一个点?

答案1

如果您不打算使用origtitle、、字段(并且它们已被弃用origlocationorigpublisher以支持该related功能),您可以发出origfields=none,。(如果您需要它们返回特定条目,您可以origed根据每个条目设置选项。)

\documentclass[chapterprefix=false,numbers=endperiod,headsepline=1pt,DIV=classic]{scrbook}

\usepackage[
  backend=biber,
  style=philosophy-classic,
  origfields=none,
  scauthors=bib,
]{biblatex}

\renewcommand*{\volnumpunct}{\addthinspace}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat{volume}{{#1}}
\DeclareFieldFormat{number}{\mkbibparens{#1}}
%\DeclareFieldFormat{pages}{pp. #1}

\DeclareDelimFormat{postnotedelim}{\addcolon\space}
\DeclareFieldFormat{postnote}{#1}

\DeclareNameAlias{sortname}{family-given}
\DeclareNameWrapperFormat{sortname}{%
  \iftoggle{bbx:scauthorsbib}{\usebibmacro{bbx:scswitch}}{}%
  #1}


\DeclareFieldFormat{origdate}{\mkbibbrackets{#1}}
\renewbibmacro*{cite:labeldate+extradate}{%
  \iffieldundef{origyear}
    {}
    {\printorigdate
     \setunit{\addspace}}%
  \iffieldundef{labelyear}
    {}
    {\printtext[bibhyperref]{\printlabeldateextra}}}

\DeclareCiteCommand{\citeorigyear}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\printfield{origyear}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\renewbibmacro*{date+extradate}{%
  \iffieldundef{origyear}
    {}
    {\printorigdate
     \setunit{\addspace}}%
  \iffieldundef{labelyear}
    {}
    {\printtext[parens]{%
       \iflabeldateisdate
         {\printdateextra}
         {\printlabeldateextra}}}}

\begin{filecontents}{\jobname.bib}
@book{test,
  author   = {Walter Ordsmith},
  title    = {An Old Work},
  date     = {2010},
  edition  = {5},
  origdate = {1981},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
\autocite{test}
\printbibliography[heading=bibintoc]
\end{document}

Ordsmith, Walter [1981] (2010),《旧书》,第 5 版。

相关内容