This has been driving me crazy all day. Tried everything before asking a new question, I apologize in advance if I missed something.
What I'm trying to do is to have a centralized
.bib file that I can later call from any
.tex file using bibtex. However (this is the fun part), the .bib file has to be used by a windows machine, as well as a mac through dropbox. My main system is a mac using texlive 2013 and Texmaker.
I first put the .bib file in
/~/dropbox/references/references.bib and created a symlink in the terminal (
ln -s references.bib references2.bib), which I put in the local tmxtree (
I then run
mktexlsr to update the database and run bibtex from Texmaker. I get the following error message:
I couldn't open database file reference2.bib
I tried the same but with an alias created in the finder instead of the symlink and again, no luck.
To understand what was going on, I reversed the procedure: I left the symlink in the dropbox folder and placed the "original" file in the texmf tree. This worked beautifully. So, apparently bibtex does not like links. However, this is not an acceptable solution, because if I do this, then the windows machine cannot see the symlink that is now in dropbox.
Additional things I tried:
(1) I saw here that there is a bibtex option
--include-directory=/path/to/include that tells bibtex to look in said directory for the
.bib file. However, it seems that this is not available in Texlive 2013. I couldn't get it to work in Texmaker, nor could I find any reference to that invoking
bibtex --help or
man bibtex from the terminal.
(2) I tried using
BIBINPUTS=/~/dropbox/references/ and it did work, but only when running bibtex directly from the terminal, and not from texmaker. I'm running mavericks, so I did what I could to get this environment variable to stick, but with no luck.
In summary, the specific questions I have are:
Is there any way to make bibtex work with a symlink or alias? and if not,
How can I have a centralized
.bib file that lives in dropbox and can be called by both a windows computer, and a mac running texmaker?