
Estoy en la lamentable situación que tengo que citar como se describe en el título.
Eso no es problema siempre y cuando no haya dos entradas bibliográficas diferentes con el mismo autor y el mismo año. En ese caso obtengo en las entradas de texto como (Author 2012a)
y (Author 2012b)
pero en las referencias debería haber una entrada adjunta que debería verse como (cited as: 2012a)
.
No soy lo suficientemente bueno redefiniendo cosas en biblatex para manejar eso. Idealmente sería necesaria la siguiente solución:
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.
Actualmente este es mi ejemplo mínimo de trabajo:
\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}
Actualmente esto se ve así:
Si bien me veo obligado a hacerlo así:
(En la captura de pantalla solucioné el problema insertando manualmente " addendum = {(cited as: 2012a)}
)"
Espero que alguien pueda ayudarme a lograr esto de la manera condicional que describí.
Respuesta1
Cambiar el nombre de bibmacro{finentry}
. La parte 'a' está dentro del extrayear
campo y 2012
dentro del labelyear
campo. Luego agregue un lógico que si extrayear
no está definido no imprime nada. Por otro lado, si está definido, imprima los campos labelyear
y entrayear
entre los pares.
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}