6

How could I make my own reference (bibtex or other) to some arbitrary weblink like http://www.inf.ed.ac.uk/teaching/courses/anlp/slides/anlp13.pdf so that it appears under the 'References' of the PDF file generated by LaTeX.

Martin Scharrer
  • 262,582

2 Answers2

5

For BibTeX you will need to create a MISC entry like the one below:

@MISC{doe:website,
      AUTHOR = "John Doe",
      TITLE = "the website title",
      MONTH = feb,
      YEAR = 2011,
      NOTE = "\url{http://whereever/file.ext}"
}

There are also other keys which can be used. I'm using Zotero, a Firefox Plugin, to collect my references. It produces the following BibTeX entry from e.g. this page:

@misc{_bibtex_????,
    title = {bibtex - How to make my own reference for some arbitrary weblink - {TeX} - {LaTeX} - Stack Exchange},
    url = {http://tex.stackexchange.com/questions/11818/how-to-make-my-own-reference-for-some-arbitrary-weblink},
    howpublished = {http://tex.stackexchange.com/questions/11818/how-to-make-my-own-reference-for-some-arbitrary-weblink}
}

However, whether or not and how the URL is displayed depends on your used reference style.


If you are using BibLaTeX (note the extra 'La') then you can use the new ONLINE type:

@ONLINE{Doe:2011:Online,
  author = {Doe, John},
  title = {This is an example},
  month = feb,
  year = 2011,
  url = {http://www.test.org/doe/}
}
Martin Scharrer
  • 262,582
  • For URLs, note field is not comfortable to use. It's better to use another bibstyle or biblatex. And I was told not to cite a web page (no author, no date) directly, but put it in a footnote. I'm not sure if it is a good manner to create such a misc entry. – Leo Liu Feb 23 '11 at 12:13
  • @Leo: I agree. I simply answered on the technical aspect of the question. Like you said BibLaTeX is much better here. In this specific case I would assume he uses the author and date of the linked presentation. – Martin Scharrer Feb 23 '11 at 12:22
0
% \usepackage{hyperref}
\href{http://www.inf.ed.ac.uk/teaching/courses/anlp/slides/anlp13.pdf}{This paper}

I had not realized that you didn't know there's a url field in many bibstyles. The four basic bibstyles (plain, unsrt, abbrev, alpha) are too old for URLs. More modern styles, like the ones provided by natbib(plainnat, unsrtnat, alphanat), and many others (e.g. ieeetrans and the ones created by custum-bib), provide a url BibTeX field.

Leo Liu
  • 77,365