[Tex/LaTex] Reference a website in bib

bibliographiesnatbib

I want to reference a website in my bib file. I use:

\usepackage{natbib}

I found:

@misc{Xmisc,
 %author    = "",
 %title     = "",
 %howpublished = "",
 %year     = "XXXX",
 %month    = "",
 %note     = "",
}

but this does not include Last Visited field.

Any suggestions?

Best Answer

The relevant information isn't the package natbib. It is import which bibliographystyle do you use.

The bibliographystyle plainnat allows the following entries:

address    author    booktitle    chapter    doi    eid    edition
editor    howpublished    institution    isbn    issn
journal    key    month    note    number    organization
pages    publisher    school    series    title    type
url    volume    year

So you can do the following:

\documentclass[12pt,english,a4paper]{report}
\usepackage{natbib}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@misc{test,
author={Christian Faulhammer},
title={What is a minimal working example?},
howpublished ={Website},
year={2009},
month=8,
url ={http://www.minimalbeispiel.de/mini-en.html},
note ={last checked: 05.09.2011},
}
\end{filecontents}
\begin{document}
\cite{test}
\bibliographystyle{plainnat}
\bibliography{references}
\end{document}

With biblatex:

\documentclass[12pt,english,a4paper]{report}
\usepackage{babel}
\usepackage[style=authoryear]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{references.bib}
@online{test,
author="Christian Faulhammer",
title="What is a minimal working example?",
howpublished ="Website",
date = "2009-08-18",
url ="http://www.minimalbeispiel.de/mini-en.html",
urldate="2011-09-06",
}
\end{filecontents}
%\bibliography{references}
\addbibresource{references.bib}
\begin{document}
\cite{test}
\printbibliography

\end{document}