# How to include URLs with ecta style?

I am using ecta (Econometrica) style for references. I want to include URLs with them but ecta style does not support it. I tried using note and howpublished but it appears the ecta style overrides them. I also tried using urlbst package as suggested by @moewe here but it throws up the following error even though I use the commands \usepackage{urlbst} (I am compiling the document online):

Sans urlbest package, I don't get the error but URLs don't show up in my references:

Is there any way to include URLs with ecta style? Here's my MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{natbib}
\bibliographystyle{ecta}
\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}
howpublished = {http://www.aeaweb.org/articles?id=10.1257/aer.20121236}
}
\end{filecontents}

\begin{document}
\maketitle

\section{Introduction}
\citet*{fernandez2015fiscal} look at \ldots

\bibliography{\jobname}

\end{document}

• I don't think you can use urlbst on overleaf – user191948 Jul 1 at 10:54
• @user191948, I am not. It's not in my MWE because I saw it wasn't working. I am curious though -- why it doesn't work on Overleaf? And is there another way to include URLs with ecta style? – V Kahn Jul 1 at 10:57
• urlbst is not a classic latex package, it is more a perl script that changes things in bst files. I doubt overleaf will allow their users to run such scripts – user191948 Jul 1 at 10:59
• yes, security... – user191948 Jul 1 at 11:30
• For me using note works with ecta, i.e., the url is displayed properly in the bibliography (however, howpublished does not work). Do you get any errors or warnings from BibTeX? – Marijn Jul 1 at 14:48

As an emergency hack, you could add the internet address to the pages:

\documentclass[12pt,a4paper]{article}
\usepackage[english]{babel}
\usepackage{natbib}
\bibliographystyle{ecta}
\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 \url{http://www.aeaweb.org/articles?id=10.1257/aer.20121236}},
year={2015},
publisher={American Economic Association}
}
\end{filecontents*}

\begin{document}
\maketitle

\section{Introduction}
\citet*{fernandez2015fiscal} look at \ldots

\bibliographystyle{ecta}
\bibliography{\jobname}

\end{document}


• I did but it does nothing. – V Kahn Jul 1 at 10:52
• Thanks, @user19148. It certainly gets the job done. I wonder if there's a better or more efficient way of doing it but in any case, it does the job. – V Kahn Jul 1 at 11:15

As suggested in the other answer, and in comments, using \url within a BibTeX note field is probably the best you can do with stock BibTeX style files.

I can add to that a comment on urlbst (I'm its author).

As @user191948 noted, urlbst isn't a LaTeX package, so you can't ‘use’ it with \usepackage. Instead, it's a Perl script, which will adapt (well, hack) pre-existing BibTeX style files, to create a new style which has a url and lastpublished field, and a new @webpage entry type.

That is,

urlbst ecta.bst ecta-url.bst


creates a style file called ecta-url.bst, which you can use with \bibliographystyle{ecta-url} as you might expect. I've just done this locally, and verified that the script does appear to work OK with the ECTA style file, in the practical sense that BibTeX doesn't object to ecta-url.bst. The edits that urlbst makes are rather heuristic in nature, so it's not guaranteed to work on ‘odd’ style files, which don't have one of the standard style files in their pretty immediate lineage.

I've only used Overleaf once or twice, but perhaps you can do this, and include your ecta-url.bst file amongst your project source files.