The plain
bibliography style dates back to about 1994 and is thus not programmed to do anything with a field called url
. (In the early 1990s, I don't think that too many people were facing the problem of citing electronically published documents that were available online. Recall that the first decent graphical browser, netscape, wasn't released until some time in late 1994.)
You should (a) load the natbib
citation management package with the option numbers
along with the url
package, (b) change the bibliography style from plain
to plainnat
, and (c) change the contents of the url
fields as follows: Instead of
url = "\url{https://www.w3.org/TR/owl2-overview/}",
write
url = "https://www.w3.org/TR/owl2-overview/",
The output of a full MWE:
\RequirePackage{filecontents}
\begin{filecontents}{exbib.bib}
@incollection{OWL,
title={{OWL 2 Web Ontology Language}},
url = "https://www.w3.org/TR/owl2-overview/",
year= {2012},
publisher={W3C Recommendation}
}
@misc{urlexample,
author = {jj},
title = {jjk},
url = "http://aiweb.techfak.uni-bielefeld.de/content/bworld-robot-control-software/",
year = {2008},
note = "[Online; accessed 19-July-2008]"
}
@misc{PROV,
title={{PROV-O: The PROV Ontology}},
url = {http://www.w3.org/TR/prov-o/},
year={2013},
publisher={W3C Recommendation}
}
\end{filecontents}
\documentclass[12pt,a4paper]{report}
\usepackage[hyphens,spaces,obeyspaces]{url}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\usepackage[numbers]{natbib}
\bibliographystyle{plainnat}
\begin{document}
\cite{OWL}
\cite{PROV}
\cite{urlexample}
\newpage
\bibliography{exbib}
\end{document}
Best Answer
Some suggestions:
Do provide a
year
field. That way, you'll get properly-formed citation call-out labels.Using the entry type
@online
does no harm, but also little good, since it (a) isn't defined in thealpha
bibliography style and (b) thus automatically gets treated as an entry of type@misc
, which is the "catch-all" or "default" entry type. The use of the entry type@online
, by the way, is the trigger for the warning messageI'd use the
note
field instead of thehowpublished
field for the URL and the date the website was last visited. That way, the year-related information will come before the URL.Don't include the ".bib" extension in the argument of
\bibliography
. I.e., write\bibliography{biblio}
, not\bibliography{biblio.bib}
.An MWE: