1

I have a reference in one of my papers which I cite several times. So I abbreviate it after full citation the first time round and then I use the abbreviated version of the citation in rest of the paper. Here is what I do:

Fernandez-Villaverde, Guerron-Quintana, Kuester and Rubio-Ramirez (2015) (FGKR now on) look at ...

Courtesy of inputs I received here, I succeeded in hyperlinking every instance of abbreviated citation ('FGKR' in this case). Here is how my PDF output looks:

enter image description here

Now I want to change how I use the key 'FGKR' the first time around. Instead of using it for the first time like the above example, I want to write it like this:

Fernandez-Villaverde, Guerron-Quintana, Kuester and Rubio-Ramirez (2015, FGKR hereafter) show that ...

In this example, 'FGKR' is inside the first full citation. I want it to work just like it did before with hyperlink. I just want it to appear within the braces when I use the full citation the first time. How can I do this?

Here is my MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{natbib}
\bibliographystyle{ecta}
\usepackage[colorlinks,citecolor=red]{hyperref}
\title{A Paper} 

\usepackage{filecontents}

\begin{filecontents}{\jobname.bib}
@article{fernandez2015fiscal,
title={Fiscal Volatility Shocks and Economic Activity},
author={Fern{\'a}ndez-Villaverde, Jes{\'u}s and Guerr{\'o}n-Quintana, Pablo 
and Kuester, Keith and Rubio-Ram{\'\i}rez, Juan},
journal={The American Economic Review},
volume={105},
number={11},
pages={3352--3384},
year={2015},
publisher={American Economic Association}
}
\end{filecontents}
\defcitealias{fernandez2015fiscal}{FGKR}

\begin{document}
\maketitle

\section{Introduction}
\citet*{fernandez2015fiscal} (\citetalias{fernandez2015fiscal} now on) look 
 at \ldots

\bibliographystyle{ecta}
\bibliography{\jobname}

\end{document}
0

1 Answer 1

2

The natbib package allows its main user macros -- \citet and \citep -- to take up to two optional arguments; these arguments will be placed after (in the case of 1 optional argument) or before and after (in the case of two optional arguments) the main citation call-out.

You may also want to load the natbib package with the option longnamesfirst. That way, the list of authors won't be truncated the first time a piece with three or more authors is cited.

Incidentally, nothing good will every come from providing two or more \bibliographystyle instructions per document.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{fernandez2015fiscal,
  title  = {Fiscal Volatility Shocks and Economic Activity},
  author = {Fern{\'a}ndez-Villaverde, Jes{\'u}s and 
            Guerr{\'o}n-Quintana, Pablo and 
            Kuester, Keith and 
            Rubio-Ram{\'i}rez, Juan},
  journal= {American Economic Review},
  volume = {105},
  number = {11},
  pages  = {3352--3384},
  year   = {2015},
  publisher={American Economic Association}
}
\end{filecontents}

\documentclass[12pt,a4paper]{article}
\usepackage[T1]{fontenc} % new
\usepackage[english]{babel}

\usepackage[longnamesfirst]{natbib}
\defcitealias{fernandez2015fiscal}{FGKR}
\bibliographystyle{ecta}

\usepackage{xurl} % for arbitrary line breaks in URL strings
\usepackage[colorlinks,citecolor=red]{hyperref}

\begin{document}

\section{Introduction}
\citet[\citetalias{fernandez2015fiscal} hereafter]{fernandez2015fiscal} look at

%\bibliographystyle{ecta} % don't run this command twice!
\bibliography{mybib}
\end{document}
8
  • Hi @Mico, thank you so much. Sorry for repeating \bibliographystyle instruction twice. I missed to notice I was repeating it. May I ask a related question? I am writing full citation in my documents using \citet* as opposed to your suggestion to use longnamefirst with natbib. Is one of the methods superior to the other one?
    – V Kahn
    Commented Jun 28, 2019 at 8:00
  • When I compile my document with \usepackage{xurl}, I get an error message saying 'File xurl.sty not found' (I am using an online LaTeX editor/compiler). But when I change xurl with url, it works. What might be causing this issue and whether using xurl is the same as url? My code is exactly the same as in the MWE I posted.
    – V Kahn
    Commented Jul 1, 2019 at 10:48
  • 1
    @VivekSharma — When did you last update your TeX distribution? The xurl package was released within the past 12 months.
    – Mico
    Commented Jul 1, 2019 at 10:52
  • 1
    @VivekSharma - Overleaf is at least a year behind the “cutting edge”, as far as LaTeX packages are concerned.
    – Mico
    Commented Jul 1, 2019 at 10:56
  • 1
    @VivekSharma - No, the packages are not the same. (Otherwise, why have two packages?) As I wrote as a comment next to \usepackage{xurl}, this package allows "arbitrary line breaks in URL strings". That's not the case with the url package.
    – Mico
    Commented Jul 1, 2019 at 11:21

You must log in to answer this question.

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