Biblatex: テキストの authoryear、参考文献の authortitle

Biblatex: テキストの authoryear、参考文献の authortitle

タイトル通り引用せざるを得ない残念な状況に陥っております。

同じ著者および同じ年を持つ 2 つの異なる参考文献エントリがない限り、問題ありません。その場合、テキスト エントリには および のようなエントリが入ります(Author 2012a)が、(Author 2012b)参考文献には のようなエントリが追加されている必要があります(cited as: 2012a)

私は、biblatex でそれを処理するために、物事を再定義する能力が十分ではありません。理想的には、次の解決策が必要になります。

If there are multiple citations of the same author and year, then append "(cited as: <year><year_label>)", if not, do whatever you would normally do.

現在、これが私の最小限の動作例です:

\documentclass{article}
\usepackage[maxcitenames=3,style=authortitle,citestyle=authoryear,dashed=false,backend=biber]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\newbibmacro*{publisher+location+date}{%
      \printlist{publisher}%
      \iflistundef{location}
        {\setunit*{\addcomma\space}}
        {\setunit*{\addcolon\space}}%
      \printlist{location}%
      \setunit*{\space}%
      \usebibmacro{date}%
      \newunit
    }

\begin{filecontents}{\jobname.bib}
  @article{JoeDoe2012,
    Author = {Joe Doe},
    Title = {My article's title},
    Journal = {My journal's title},
    Editor = {Ben Editor},
    URL = {http://webpage.com},
    Year = {2012},
  }

  @article{JoeDoe20121,
    Author = {Joe Doe},
    Title = {Same author same year},
    Journal = {My journal's title},
    Editor = {Ben Editor},
    URL = {http://webpage.com},
    Year = {2012},
  }
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
  We cite \autocite{JoeDoe2012} and \autocite{JoeDoe20121}
  \printbibliography
\end{document}

現時点では次のようになっています:

ここに画像の説明を入力してください

私はこのようにすることを余儀なくされています:

ここに画像の説明を入力してください

addendum = {(cited as: 2012a)}(スクリーンショットでは、手動で「 )」を挿入することで問題を回避しました。

私が説明した条件付きの方法でこれを達成するのを誰かが手伝ってくれることを願っています。

答え1

de の名前を変更しますbibmacro{finentry}。部分 'a' はextrayearフィールドに入り、 はフィールド2012に入りますlabelyear。次に、 が未定義の場合は何も出力しないという論理を追加しますextrayear。一方、 が定義されている場合は、labelyearと のフィールドをentrayear括弧で囲んで出力します。

MWE:

\documentclass{article}
\usepackage[maxcitenames=3,style=authortitle,citestyle=authoryear,dashed=false,backend=biber]{biblatex}
\DeclareNameAlias{sortname}{last-first}
\newbibmacro*{publisher+location+date}{%
      \printlist{publisher}%
      \iflistundef{location}
        {\setunit*{\addcomma\space}}
        {\setunit*{\addcolon\space}}%
      \printlist{location}%
      \setunit*{\space}%
      \usebibmacro{date}%
      \newunit
    }

\renewbibmacro{finentry}{%
\usebibmacro{citeas}%
\finentry}

\newbibmacro*{citeas}{%
\iffieldundef{extrayear}
  {}
  {\setunit{\adddot\space}
  \newunit\newblock
  \printtext[citeas]{%
  \printfield{labelyear}%
  \printfield{extrayear}}}}

\DeclareFieldFormat{citeas}{\mkbibparens{Cite as:\space#1}}

\begin{filecontents}{\jobname.bib}
  @article{JoeDoe2012,
    Author = {Joe Doe},
    Title = {My article's title},
    Journal = {My journal's title},
    Editor = {Ben Editor},
    URL = {http://webpage.com},
    Year = {2012},
  }

  @article{JoeDoe20121,
    Author = {Joe Doe},
    Title = {Same author same year},
    Journal = {My journal's title},
    Editor = {Ben Editor},
    URL = {http://webpage.com},
    Year = {2012},
  }

    @article{Moe2013,
      Author = {Moe Doe},
      Title = {Other author},
      Journal = {My journal's title},
      Editor = {Ben Editor},
      URL = {http://webpage.com},
      Year = {2010},
    }
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
  We cite \parencite{JoeDoe2012} and \parencite{JoeDoe20121}.

  Other author \parencite{Moe2013}
  \printbibliography
\end{document}

ここに画像の説明を入力してください

関連情報