0

How can I produce author-year citations in the format [LastNameInitials+Year] in LaTeX using the natbib package or any other package?

MWE:

@article{Smith_Jones_2010,
  author  = {A. Smith and B. Jones},
  title   = {A paper by Smith and Jones},
  journal = {Journal of Important Research},
  volume  = {10},
  pages   = {1--10},
  year    = {2010},
}

Assuming that you have a .bib file named mybibfile.bib with an entry for Smith_Jones_2010

Here's an example document that uses the natbib package:

\documentclass{article}
\usepackage{natbib}

\begin{document}

According to \citeauthor{Smith_Jones_2010} [\citeyear{Smith_Jones_2010}],...

\bibliographystyle{abbrvnat}
\bibliography{mybibfile}

\end{document}

I want the output to look like [J2010]. If there are multiple authors, say Smith Jones and James Smith, I want the output to be [JS2010].

I have tried various things and I have looked at various posts like this, this and this.

The first link is the closest that I have gotten. The issue is that, first there is a space between last name initials and the year, and secondly, the initials are not linked to the reference, only the year is linked.

In text citation looks like: [J 2010]

2
  • 1
    Have you tried the alpha bibliography style?
    – Mico
    Commented Apr 9, 2023 at 0:18
  • Not the exact thing that I am looking for, but much better and close to what I wanted. This will do it for me :) Thanks!
    – Josh
    Commented Apr 9, 2023 at 0:36

0

You must log in to answer this question.

Browse other questions tagged .