4

I will first give you the codes then I will explain my problem:

\documentclass[a4paper,10]{article}
\usepackage[utf8]{inputenc}
\usepackage{natbib}
\usepackage{hyperref}

\begin{document}
  I hereby cite \citep{Adams_2013}.

  \bibliography{article_lib}
  \bibliographystyle{agsm}
\end{document}

Here is the BibTex file entry:

@MISC{Adams_2013,
author = {W. Adams},
title = {Breaching reservoirs},
month = {June},
year = {2013},
volume = {13},
number = {6},
language = {English},
howpublished = {AfroAIDSinfo Online},
organization = {AfroAIDSinfo},
note = {Retrieved 04 June 2013},
url = {http://www.afroaidsinfo.org/MRCWeb/appmanager/mrc/afroaidsinfo;jsessionid=qS16RJ2DzhkKvPp1h1xW14gmRSysHHTFbfzhn0QSZxv251QPJGxF!404223779?_nfpb=true&_windowLabel=editorials_1_1&editorials_1_1_actionOverride=%2Fpageflows%2Feditorials%2Fbegin&editorials_1_1cm_nodepath=%2FBEA+Repository%2FArticles%2FScience%2FClinical+Science%2FAntiretroviral+therapy%2FBreaching+HIV},
journal = {AfroAIDSinfo},
timestamp = {2013.06.04}
}

When I run the following in terminal:

latex example
bibtex example
latex example
latex example

I get the following error message:

The top-level auxiliary file: example.aux

I found no \bibstyle command---while reading file example.aux

(There was one error message)

How do I solve this problem? I need to include the url. Everything was working well until I included the url in the BibTeX database. I had the bibtex entry as @ARTICLE and it worked well, minus the url. Then, I changed it to @MISC with the url and now it doesn't work.

Following the advice on here I loaded the hyperref package to enable url usage. But, it doesn't work. I wrapped the url in the bibtex file in double quotation marks, but I got the same result.

Here is the thread whose advice I followed: How can I use BibTeX to cite a web page?

2
  • Your error indicates that you have not got the right information in the .aux file. Did you run LaTeX on exactly the file shown and BibTeX with exactly the same file name?
    – Joseph Wright
    Commented Jun 25, 2013 at 12:52
  • Have you tried loading the har2nat and url packages (as well as natbib)? Then, delete the aux files and recompile (latex, bibtex, latex, latex).
    – Mico
    Commented Jun 25, 2013 at 14:03

2 Answers 2

4

the problem is with the code %2F which occurs more than once in the url.

unfortunately, \harvardurl doesn't "protect" the url code as it should, so the % is taken as a comment and latex stops reading the line when it hits the first one, so you've got a runaway argument.

a possible patch is to add \usepackage{url} and \let\harvardurl\url. and specify [breaklinks] as an option to hyperref. the result is pretty awful, but really, it's terribly hard to get good results with a url that long!

4

I usually load hyperref (\usepackage[breaklinks,hidelinks]{hyperref}) add the \url{...} part straight into my bib editing program (BibDesk). That way you end up with:

@MISC{Adams_2013,
author = {W. Adams},
title = {Breaching reservoirs},
month = {June},
year = {2013},
volume = {13},
number = {6},
language = {English},
howpublished = {AfroAIDSinfo Online},
organization = {AfroAIDSinfo},
note = {Retrieved 04 June 2013},
url = {\url{http://www.afroaidsinfo.org/MRCWeb/appmanager/mrc/afroaidsinfo;jsessionid=qS16RJ2DzhkKvPp1h1xW14gmRSysHHTFbfzhn0QSZxv251QPJGxF!404223779?_nfpb=true&_windowLabel=editorials_1_1&editorials_1_1_actionOverride=%2Fpageflows%2Feditorials%2Fbegin&editorials_1_1cm_nodepath=%2FBEA+Repository%2FArticles%2FScience%2FClinical+Science%2FAntiretroviral+therapy%2FBreaching+HIV}},
journal = {AfroAIDSinfo},
timestamp = {2013.06.04}
}

Is that an option for you?

You must log in to answer this question.

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