[Tex/LaTex] have a path argument that contains spaces


I'm trying to get biblatex to see where I have my .bib file located, but I have a space in the path to the file:

\addbibresource{~/Documents/My Project/TheBib.bib}

How do I specify a full path that includes a space? Is there a way to specify a relative path?

M(Not)WE, as requested:


\usepackage[backend=bibtex, natbib=true, citestyle=verbose]{biblatex}
\addbibresource{~/Documents/Projects/NoSpaces/Sources.bib} % Works
%\addbibresource{~/Documents/Projects/Some Spaces/Sources.bib} % Fails
%\addbibresource{"~/Documents/Projects/Some Spaces/Sources.bib"} % Fails





Best Answer

(Note: I'm working on a mac)

There are two problems with the path you specify:

1- The space: simply enclose the path in double quotes (")

2- The ~. TeX won't treat it as a substitute for /Users/You. You might want to consider using relative paths: a) ./indicates the current working directory b) ../ moves one step up the directory tree.

So if your file structure is as

My project
       bib --> TheBib.bib

You need only use ./bib/TheBib.bib. If however your file structure is something like

My project
       tex --> main.tex
       bib --> TheBib.bib

You use ../bib/TheBib.bib

And so on