# Adding Name and year Bracket to reference list

I'm new to LaTeX, and using natbib to handle my citations:

\usepackage[authoryear,square]{natbib}
\bibliographystyle{authordate1}
\bibliography{sample}


Now my citations inside the article looks fine [author, year], but when the reference list is shown at the end I want the same [author, year] cell to be next to each reference. How can I do that ?

Here is MWEB example:

\documentclass[a4paper,12pt]{article}
\usepackage[authoryear,square]{natbib}

\usepackage{filecontents}
\begin{filecontents}{sample.bib}
@article{lorenz1963,
title={Deterministic nonperiodic flow},
author={Lorenz, Edward N},
journal={Journal of the atmospheric sciences},
volume={20},
number={2},
pages={130--141},
year={1963}
}

\end{filecontents}

\begin{document}
\citep{lorenz1963}
\bibliographystyle{authordate1}
\bibliography{sample}
\end{document}


Thank you !

• Welcome to TeX.SE. Which document class do you use? – Mico May 13 '17 at 7:20
• Thanks ! I'm using : \documentclass[a4paper,12pt]{article} – ValientProcess May 13 '17 at 7:24
• Incidentally, why would you wish to have these completely useless strings clutter up the formatted bibliography? – Mico May 13 '17 at 7:25
• Please show not only a code snippet but a minimal working example with bibliography (MWEB). This would help us to reproduce and understand the problem and to test our suggestions before posting them. So it would help us to help you. Nevertheless, for new documents I would recommend to use biblatex + biber instead of the old bibtex system, because it is better configurable. – Schweinebacke May 13 '17 at 7:27
• I think it would be easier to find the full reference of the citation that way (and I don't want to use numbers in the article) – ValientProcess May 13 '17 at 7:27

One can take advantage that the format of the .bbl file will be

\bibitem[\protect\citename{Lorenz, }1963]{lorenz1963}


so we can use the part in brackets to become the beginning of the citation text.

\begin{filecontents*}{\jobname.bib}
@article{lorenz1963,
title={Deterministic nonperiodic flow},
author={Lorenz, Edward N},
journal={Journal of the atmospheric sciences},
volume={20},
number={2},
pages={130--141},
year={1963}
}
\end{filecontents*}

\documentclass[a4paper,12pt]{article}
\usepackage[authoryear,square]{natbib}

\AtBeginDocument{
\let\natbibbibitem\bibitem
\let\bibitem\valientbibitem
}
\makeatletter
\def\valientbibitem[#1]#2{%
\natbibbibitem[#1]{#2}%
\begingroup\let\citename\@firstofone
[#1]
\endgroup
}
\makeatother
\begin{document}

\citep{lorenz1963}

\bibliographystyle{authordate1}
\bibliography{\jobname}

\end{document}


I agree with the comments saying this is just cluttering the bibliography.

During testing, I discovered that there is a bug in authordate1.bst that causes a spurious space that's added when “et al.” appears in a citation callout.

This can only be cured by fixing the source. Make a copy of authordate1.bst calling it authordate1-fix.bst in the working directory. In it change all occurrences of

{\em et~al.\ }\relax


into

{\em et~al\@.}\relax


In your document do \bibliographystyle{authordate1-fix}.

You could

• not load the natbib package, and

• provide a dummy definition for \citename, and

• use \cite instead of \citep to generate the citation call-outs.

\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@article{lorenz1963,
title={Deterministic nonperiodic flow},
author={Lorenz, Edward N.},
journal={Journal of the Atmospheric Sciences},
volume={20},
number={2},
pages={130--141},
year={1963}
}
\end{filecontents}

\documentclass[a4paper,12pt]{article}