3

Latex only lets you have a relative or an absolute path when importing a bib file, so you may have something like

\bibliography{../mybib}

Is it possible to call a url instead? For instance, something like

\bibliography{http://www.example.com/mybib}

I'm using natbib and Texmaker if that makes a difference.

nikolas
  • 263
  • 2
  • 10

1 Answers1

2

BibTeX cannot access remote files such URLs, as the short example

\documentclass{article}
\begin{document}
\cite{sigfridsson}
\bibliographystyle{plain}
\bibliography{http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples}
\end{document}

shows. You get an error along the lines of

I couldn't open database file http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib

The Biber back-end which replaces BibTeX if you use biblatex can do that for you.

The following will work

\documentclass{article}
\usepackage[backend=biber,style=authoryear]{biblatex}

\addbibresource{http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/examples/biblatex-examples.bib}

\begin{document}
\cite{sigfridsson}
\printbibliography
\end{document}

if you have access to the internet.

But of course you will have to switch to biblatex to use Biber. See What to do to switch to biblatex? and bibtex vs. biber and biblatex vs. natbib.

moewe
  • 175,683