4

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 (/usr/local/texlive/texmf-local/bibtex/bib/local).

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?

  • run this document in TeXmaker with Latexmk to find out if everything works: \documentclass{article} \begin{document} \nocite{*} \bibliographystyle{plain} \bibliography{xampl} \end{document} It should give a bibliography in the output. – user2478 May 22 '14 at 14:34
  • Yes. I run that and got the bibliography. – maxienholanda May 22 '14 at 14:55
  • Note that you don't need to hash your local tree (unless tour setup is very unusual) – Joseph Wright May 22 '14 at 14:58
  • @maxienholanda: Then everythings works fine and if you have a symlink in the directory /usr/local/texlive/texmf-local/bibtex/bib/local/... everything will be ok. Test it if you create a symlink to the xampl.bib which is in /bibtex/bib/base/ and name the link my.bib. Run texhash and test the document with \bibliography{my} – user2478 May 22 '14 at 15:25
  • 1
    For future Googler, creating a symlink solution like this works for me. I do not know what caused the OP to not being able to do it. – Heisenberg Nov 22 '14 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.