2

I reference URLs through bibtex like this :

@incollection{PROV,
  title={PROV-O: The PROV Ontology},
  url = "\url{http://www.w3.org/TR/prov-o/}",
  year={2013},
  publisher={W3C Recommendation}
}

But the URL does not appear in the references. I also tried howpublished, but it also does not work.

I also found this citation here [in this post][1], it cannot be compiled at all.

@misc{urlexample,
  author = {jj},
  title = {{jjk}},
  howpublished = "\url{http://aiweb.techfak.uni-bielefeld.de/content/bworld-robot-control-software/}",
  year = {2008}, 
  note = "[Online; accessed 19-July-2008]"
}

Here the class of document and also bibliography style:

 \documentclass[12pt,a4paper]{report}

\bibliographystyle{plain} 

\bibliography{Masterthesis}

Here also the output of compiling Bibetex:

Process started

This is BibTeX, Version 0.99d (TeX Live 2015/Debian) The top-level auxiliary file: Masterthesis_RDD.aux The style file: plain.bst Database file #1: Masterthesis.bib Warning--I didn't find a database entry for "PRPOV" Warning--to sort, need author, organization, or key in WebIndex2016 Warning--to sort, need author or key in OWL Warning--to sort, need author or key in PROV Warning--empty author in OWL Warning--empty booktitle in OWL Warning--empty booktitle in RDFS Warning--empty booktitle in RDF Warning--empty booktitle in SPARQL11 Warning--empty booktitle in SPIN Warning--empty booktitle in SPARQL Warning--empty booktitle in ICV (There were 12 warnings)

Process exited normally

I add MWE here:

.tex :

\documentclass[12pt,a4paper]{report}
\usepackage{url}
\usepackage{hyperref}


\begin{document}



\cite{OWL}
\cite{PROV}
\cite{urlexample}


\newpage
  %bib%

\bibliographystyle{plain} 



\bibliography{exbib}

\end{document}

exbib.bib:

@incollection{OWL,
  title={OWL 2 Web Ontology Language},
  url = "\url{https://www.w3.org/TR/owl2-overview/}",
  year={2012},
  publisher={W3C Recommendation}
}

@misc{urlexample,
  author = {jj},
  title = {{jjk}},
  howpublished = "\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}
}
  [1]: http://tex.stackexchange.com/questions/35977/how-to-add-a-url-to-a-latex-bibtex-file
5
  • 1
    url = {http://www.w3.org/TR/prov-o/}, is a different way of writing it. It depends on what kind of style you are using.
    – Runar
    Jun 26, 2016 at 20:58
  • @RunarTrollet it does not make any difference. Jun 26, 2016 at 21:07
  • 1
    Please post an MWE
    – Runar
    Jun 26, 2016 at 21:13
  • @RunarTrollet just added. Jun 26, 2016 at 21:22
  • 1
    Incidentally, the warning message that no entry for "PRPOV" was found arises from a typo: the entry's key is spelled "PROV" in the bib file, not "PRPOV".
    – Mico
    Jun 26, 2016 at 21:39

1 Answer 1

3

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:

enter image description here

\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}

You must log in to answer this question.

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