When I include url in the .bib file latex throws the error:
Tex capacity exceeded, sorry[save size=5000]
Do you have any idea why?
Below I paste the package I use and one reference
\documentclass[english]{article}
\usepackage[utf8]{inputenc} %write accent without the \ [' ` ^]
\usepackage{lmodern,textcomp} % + the above package use euro directly
\usepackage{babel}
\usepackage{harvard}
\bibliographystyle{agsm}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{hyperref}
\usepackage[margin=1.5in]{geometry}
%\usepackage{times}
\begin{document}
as in \cite{AhlinTownsend2007}, blah, blah blah...
\cite{DufloBanerjee2013}
\bibliography{test}
\end{document}
and the test.bib file
@article {AhlinTownsend2007,
author = {Ahlin, Christian and Townsend, Robert M.},
title = {Using Repayment Data to Test Across Models of Joint Liability Lending*},
journal = {The Economic Journal},
volume = {117},
publisher = {Blackwell Publishing Ltd},
number = {517},
pages = {F11-F51},
issn = {1468-0297},
doi = {10.1111/j.1468-0297.2007.02014.x},
url = {http://dx.doi.org/10.1111/j.1468-0297.2007.02014.x},
year = {2007},
}
@techreport{DufloBanerjee2013,
title={The miracle of microfinance? Evidence from a randomized evaluation},
author={Duflo, Esther and Banerjee, Abhijit and Glennerster, Rachel and Kinnan, Cynthia G},
year={2013},
institution={National Bureau of Economic Research},
}
Best Answer
I'm afraid I also cannot replicate the capacity-exceedance error you're reporting.
However, I have two suggestions -- both motivated by the fact that you're using the
hyperref
package -- which may be useful. Moreover, one of these suggestions involves usingnatbib
instead ofharvard
. With this change, the capacity-exceedance error may also disappear on its own.If you want a URL string to be an active hyperlink that users can click on, you should write the url field as
instead of as
If you want the citation callouts in the body of the document to become hyperlinks to the corresponding entries in the bibliography, don't load the
harvard
citation management package. Instead, load thenatbib
citation management package and the auxiliaryhar2nat
package. Since you're using theagsm
bibliography style, which is part of theharvard
package, it's necessary to loadhar2nat
, as it provides macros that "translate" some of theharvard
-specific macros into forms thatnatbib
can process. (When switching fromharvard
tonatbib
/har2nat
, it's generally necessary to delete all auxiliary files that were created during an earlier compilation run.)In the example below, note that the
natbib
package is loaded with the optionlongnamesfirst
in order to replicate the feature of theharvard
package that the names of all authors should be provided the first time a given entry is cited. (Subsequent callouts to a given entry are typeset asFirstAuthor et al.
.) Separately, observe that one should encase the wordEvidence
in curly braces in order to keep it from being converted to all-lowercase.