Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm using bibtex for my bibliography in LaTeX. I have some URL's I need to cite in the paper. How do I add URLs into the .bib file?

A typical section in my .bib file looks like this:

@conference{eigenfacepaper,
  title={{Face recognition using eigenfaces}},
  author={Turk, M. and Pentland, A.},
  booktitle={Proc. IEEE Conf. on Computer Vision and Pattern Recognition},
  volume={591},
  year={1991}
}

I tried some misc sections in bibtex but they don't show up in my document.

share|improve this question

migrated from stackoverflow.com Nov 24 '11 at 0:10

This question came from our site for professional and enthusiast programmers.

    
Please have a look at this question: tex.stackexchange.com/questions/36248/… –  Marco Daniel Feb 3 '12 at 15:17

6 Answers 6

up vote 114 down vote accepted

The last time I cited an URL, I used a BibTeX entry of the following form:

@misc{bworld,
  author = {Ingo Lütkebohle},
  title = {{BWorld Robot Control Software}},
  howpublished = "\url{http://aiweb.techfak.uni-bielefeld.de/content/bworld-robot-control-software/}",
  year = {2008}, 
  note = "[Online; accessed 19-July-2008]"
}

If that does not show up, then it might indeed be a problem with your BibTeX style (or you forgot to \usepackage{url} or \usepackage{hyperref} in your main .tex file).

share|improve this answer
    
Thank you for the full example –  Janusz Nov 18 '09 at 19:06
23  
Don't forget to add \usepackage{url} in your tex file; doesn't work for me otherwise. –  humble coffee May 3 '10 at 2:49
    
This worked great for me with revtex (I'm adding this comment so this answer shows up in searches for revtex). –  zje Apr 12 '12 at 16:34
8  
\usepackage{hyperref} is rather more powerful and flexible than \usepackage{url}. –  Mohan Oct 18 '12 at 15:23

To use url with a plain bibliography style you can use this format:

@misc{Doe:2009:Online,
author = {author},
title = {Title of Citation},
year = {2010 (accessed December 7, 2014)}, 
howpublished = "\url{http://www.myurl.com}"}

Additionally you need to add the url package

\usepackage{url}

If you want to use the url attribute in you need to use natbib because standard bibstyles (such as plain) will not typeset the url key contents of the individual entries; it is required to use one of natbib's own entries, e.g. plainnat.

For example

@ONLINE{Doe:2009:Online,
author = {Doe, Ringo},
title = {This is a test entry of type {@ONLINE}},
month = jun,
year = {2009},
url = {http://www.test.org/doe/}
}

and the document

\documentclass{article}

\usepackage{biblatex}
\bibliography{test.bib}

\title{BibTeX Website citatations with the \textsf{biblatex}~package}
\date{}

\begin{document}

\maketitle
\nocite{Doe:2009:Online}
\printbibliography

\end{document}

Source: http://nschloe.blogspot.ro/2009/06/bibtex-how-to-cite-website_21.html

share|improve this answer
    
This would be better as a comment on the accepted answer. Post it on gist.github.com (don't forget to add the .tex extension for syntax highlighting) and paste the link as your comment :) –  Sean Allred Dec 7 at 22:13
    
Hi Sean. I really have to disagree with you on that. First Im not really only extending on the accepted answer but providing additional information and second I think it is bad practice to provide essential info in a comment. I think it is better to edit the original answer (if only extending a little when the answer is very popular) or provide a new one. In my case I compiled infos from different answers into a new one bc I think all of them do only tackle part of the question. –  for3st Dec 7 at 22:21
    
If the information is truly essentially helpful, then it would do more good as an edit to the vastly popular answer – it simply won't help anyone down here :( Additionally, this answer is self-contradictory – it doesn't use natbib, but rather the separate (and better IMO) BibLaTeX. –  Sean Allred Dec 7 at 22:26

You need to

 \usepackage{url}

and then

 howpublished={\url{http://my.url.com/}},
share|improve this answer
    
This doesn't really fit into my bibtex file –  Janusz Nov 18 '09 at 13:39
2  
shouldn't it be \usepackage{url} and not \includepackage{url}? –  Bryce Thomas Mar 15 '10 at 10:34
    
@Bryce: erm, yes. I've amended it. sorry. –  Peter Mar 15 '10 at 10:42
    
this does not work for mine –  LCFactorization Jan 20 at 7:33

UK TEX FAQ usually have really good answers for TeX related questions: URLs in BibTeX bibliographies

share|improve this answer

Correct me if I'm wrong, but I think you are trying to reference websites and not articles in a journal, for instance. And, having placed said references in a misc entry, they don't show up when you reference them. If that is correct, then the problem is your bibliography style (bst file) does not have an entry in it for dealing with a misc type. I would suggest that you use biblatex as it highly customizable and includes an online entry type specifically for your purpose. Alternatively, you could use custom-bib, which will give you a custom bst file that would display a misc entry. However, I think biblatex is still your best bet.

share|improve this answer
    
It would be most unusual for a bibliography style not to recognize the extremely common @misc entry type. In fact, such a style would have to be considered to be broken. –  Mico Nov 9 at 22:53

Depends what BibTeX style you're using. In the ordinary ones I usually use

note={\url{http://...}}

in biblatex (and natbib too, I think), you can just write

url={http://...}
share|improve this answer
    
This doesn't really fit into my bibtex file –  Janusz Nov 18 '09 at 13:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.