0

I am in the unfortunate situation that I have to cite as described in the title.

Thats no problem as long as there are not two different bibliography entries with same author and same year. In that case I get in the text entries like (Author 2012a) and (Author 2012b) but in the references there should be a entry appended that should look like (cited as: 2012a).

I am not good enough in redefining stuff in biblatex to handle that. Ideally the following solution would be needed:

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.

Currently this is my minimal working example:

\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}

Currently this looks like:

enter image description here

While I am forced to do it like this:

enter image description here

(In the screenshot I worked around the issue by manually inserting "addendum = {(cited as: 2012a)})"

I hope someone can help me achieve this in the conditional way I described.

1
  • 2
    You could try something like this \renewbibmacro{finentry}{\printtext{(cited as: }\printnames{labelname} \printfield{labelyear}\printfield{extrayear}\printtext{)}\finentry} You can test for the extrayear field if you don't want the text when the entry is unique. Sep 24, 2014 at 13:28

1 Answer 1

2

Rename de bibmacro{finentry}. The part 'a' is into extrayear field and the 2012 into labelyear field. Then add a logical that if extrayear is undefined prints nothing. In the other hand, if it is defined then print the labelyear and entrayear fields betweet parens.

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}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .