刪除authoryear-ibid中的後綴,例如。 (2011a)

刪除authoryear-ibid中的後綴,例如。 (2011a)

我很難刪除作者年同上引文中年份的後綴,如下圖所示。

引用圖片

這是我用於 biblatex 的代碼:

\usepackage[
    citestyle=verbose-ibid, 
    bibstyle=authoryear-ibid, 
    backend=biber]
    {biblatex}

我知道這個後綴表面上應該是可以控制的,labeldateparts但表面上它並沒有生效。任何幫助是極大的讚賞。

答案1

這可以透過簡單地清理欄位來完成extradate。請注意,此解決方案適用於您的特定用例,但在其他情況下可能會導致意外結果。在這種情況下,moewe 的解決方案更加穩健。請參閱那裡的評論進行一些討論。

\begin{filecontents}{\jobname.bib}

@book{Chomsky1986,
    Address = {Cambridge Mass.},
    Author = {Noam Chomsky},
    Publisher = {{MIT} Press},
    Title = {Barriers},
    Year = {1986}}

@book{Chomsky1986b,
    Address = {New York},
    Author = {Noam Chomsky},
    Publisher = {Praeger},
    Title = {Knowledge of Language: its nature, origin and use},
    Year = {1986}}
\end{filecontents}
\documentclass{article}
\usepackage[
    citestyle=verbose-ibid, 
    bibstyle=authoryear-ibid, 
]
    {biblatex}
\addbibresource{\jobname.bib}
\DeclareFieldFormat{extradate}{}
\begin{document}
\autocite{Chomsky1986b,Chomsky1986}
\printbibliography
\end{document}

程式碼的輸出

答案2

由於我不太喜歡使用空白字段格式抑製字段,因此這裡有一個直接重新定義所涉及命令的解決方案。

\documentclass{article}
\usepackage[
  citestyle=verbose-ibid,
  bibstyle=authoryear-ibid,
]{biblatex}

\renewbibmacro*{date+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[parens]{\printdate}}}

\renewbibmacro*{bbx:ifmergeddate}[2]{#1}%


\addbibresource{biblatex-examples.bib}
\begin{document}
\autocite{knuth:ct:b,knuth:ct:c}
\printbibliography
\end{document}

唐納德·E·高德納 (1986)。計算機和排版。卷。 B:TeX:程式。馬薩諸塞州雷丁:Addison-Wesley。計算機和排版。卷。 C: METAFONT 書。馬薩諸塞州雷丁:艾迪生-韋斯利。

稍微不那麼激進的方法仍然會留下痕跡,labeldate只需重新定義date+extradate如下(並保持bbx:ifmergeddate不變)

\renewbibmacro*{date+extradate}{%
  \iffieldundef{labelyear}
    {}
    {\printtext[parens]{%
       \iflabeldateisdate
         {\printdate}
         {\printlabeldate}}}}%

刪除額外日期的另一種但更直接的方法是

\DeclareFieldInputHandler{extradate}{\def\NewValue{}}

相關內容