I use Mendeley to organise citations. It exports a .bib file automatically to a folder on my Mac.
I also have another .bib file that I use for other citations not stored in Mendeley (websites mostly). This file is stored in a folder containing all my LaTeX projects in separate folders.
The reason that the .bib files are stored separate of the LaTeX project is that multiple projects use the same citations and this way I only have to maintain one .bib file (the other one is maintained by Mendeley).
Inspired by the question on VCS I added my current LaTeX project to bitbucket.org using git.
It is a directory that contains my .tex files and images, not the .bib file.
In my main.tex I include the two bibliographies as follows:
\bibliography{~/Documents/Dropbox/Mendeley/library,../other_refs}
My goal now is to make the repository self-contained, so that someone can just clone it and compile the LaTeX document.
As my .bib files are not in the repo, how can I achieve this?
Symlinks are not an option as git does not follow symlinks anymore.
bibexportscript can be what you want – egreg Mar 14 '14 at 14:34bibexportand unfortunately it doesn't work well. It doesn't recognize some citation types likeelectronicormisc. This result in a.bibfile that is broken and needs to be manually fixed. – Saaru Lindestøkke Mar 14 '14 at 15:04export.bstto add fields, see the documentation; for new entries like@electronic, I believe it's sufficient to add aFUNCTIONat the end, similar to the existing ones. Maybe you can look also tobibextract.sh– egreg Mar 14 '14 at 15:09