# Referencing bib files with spaces in the filename

I am using a Mac with TeX Live and Mendeley for automatically generating .bib files, some of which have spaces in the file names. I would like to know how to reference such files from LaTeX as using "" or \ doesn't seem to work.

-
Does this help? How to include graphics with spaces in their path? –  Martin Schröder Mar 14 '13 at 22:04
possible duplicate of How to include graphics with spaces in their path? –  Marco Daniel Apr 23 '13 at 17:40
I don't see that this is a duplicate. It is the bibtex stage that chokes on the space in the filename. –  Andrew Swann Apr 23 '13 at 18:36

This depends on which backend you are using.

If the backend is bibtex then no spaces are allowed in the filename (and there are other restrictions such as the length of the name must not be more than 40 characters). LaTeX will happily write the file name to the .aux file, but bibtex will complain when it reads the resulting \bibdata command.

If you use biber as the backend, which is now the standard for biblatex then this restriction has been removed, you just use \addbibresource as standard:

\documentclass{article}

\usepackage{biblatex}

\begin{document}
\nocite{*}
\printbibliography

\end{document}


If file with spaces.bib contains

@Article{Auth,
author =   {Author},
title =    {Title},
journal =  {Jour.},
year =     2000
}


then you get

after running through pdflatex, biber, pdflatex.

-
Thank you for your suggestion. I use bibtex as my backend. I have not previously tried using biber for references. –  Ilya Shmorgun Apr 26 '13 at 20:28