0

I did not find the solution to my exact problem so I open a new post. I would like to cite in the text like this: (Doe, 2001) but with my code I have (Doe, J., 2001). Can you please suggest me how can I change the code to avoid the first name?

\documentclass[12pt,a4paper,openany]{report}
\usepackage{natbib}
\bibliographystyle{abbrvnat}
\setcitestyle{authoryear,open={(},close={)}}
...
\begin{document}
\autocite{Doe2001}
...
\bibliography{bib}
\end{document}

The .bib file is imported from Mendeley and it's like this

@article{Doe2001, 
title = {{...}}, 
year = {2001}, 
journal = {...}, 
author = {Doe, J.}, 
number = {...}, 
pages = {...}, 
volume = {...}, 
doi = {...}, 
issn = {...}, 
keywords = {...}
  • Welcomew to tex.sx. The reference from Mendeley does have a first initial. What it doesn't do is separate the initial from the surname. Add a comma: author = {Doe, J.}, – barbara beeton Jun 19 at 19:57
  • @barbarabeeton unfortunately I wrote wrong, the comma was already there. I changed the code... any other idea? – hydra Jun 19 at 20:50
  • Oh, dear! The only other thing I can think of to try is to reverse the two parts of the name: author = {J. Doe}, – barbara beeton Jun 19 at 21:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.