1

I would like to create a remotely accessible, centralized .bib bibliography on GitHub that I can use in my .Rnw and .tex files in various directories. It would also make it easier to collaborate and decrease files in constant transit amongst collaborators. As an aside, I am more familiar with working with a GUI IDE like RStudio rather than the command line.

I tried Googling and found a few leads that didn't end up working. In particular, I found a guide on using submodules, but couldn't get it to work. I already tried \bibliography{https://github.com/usernamehere/MyProjects.git/bibliography.bib}, but this also did not work. Can someone please provide me with some new leads to explore?

Update:

Still can't get it to work. Taking the suggestions of Guido and Alan Munn in the comments below, I have tried a variation of the following MWE pseudocode (pseudo, because I omit my Git user name for anonymity). Am I making a mistake somewhere that prevents the citations from showing up?

** Temporarily left my GitHub username in place for a MWE **

\documentclass{article}  
\usepackage[backend=biber]{biblatex}  
\addbibresource[location=remote]{https://raw.githubusercontent.com/aw236/myrefs/master/myrefs.bib}

% Variations attempted that don't work:
% \addbibresource[location=remote]{https://github.com/aw236/myrefs/myrefs.bib}
% \addbibresource[location=remote,type=file]{https://github.com/aw236/myrefs/myrefs.bib}

\begin{document}
asdf.

\nocite{*}
\printbibliography
\end{document}
Mensch
  • 65,388
  • 2
    Try using \addbibresource[location=remote]{https:// etc.} The \bibliography command is deprecated in biblatex. – Alan Munn Mar 12 '15 at 20:49
  • 1
    You should try with \addbibresource[location=remote]{http:...}. Also, there is a trailing / before https, and the manual specifies that only ftp and http protocols are supported. – Guido Mar 12 '15 at 20:50
  • @Guido Thanks. It appears that it also works with https though: http://tex.stackexchange.com/questions/176325/addbibresourcelocation-remote-does-not-resolve-cross-references. I modified my post above with MWE (pseudocode to protect anonymity). – user2205916 Mar 13 '15 at 02:27
  • the url should point to a bib file. There is a / at the end. – Guido Mar 13 '15 at 02:34
  • @Guido Thanks. Removing the / does not solve the problem. – user2205916 Mar 13 '15 at 02:35
  • Your MWE works on my system (Biber 1.9, biblatex 2.9a, everything else up to date) even though I had to ait quite some time on the first Biber run. (Of course in your MWE no citations will show up at all - no matter if it worked or not, to check that add a \printbibliography at the end.) How does the "does not work" manifest itself - do you get an error, a warning, nothing shows up an empty .bbl file etc.? Please show us the .blg (Biber log file). – moewe Mar 13 '15 at 06:45
  • @moewe Thanks for your advice. Nothing shows up, even after adding a \printbibliography statement. Not sure what the explanation is, since I already have a \nocite{*} in the body of my code. – user2205916 Mar 16 '15 at 14:50
  • What did the .blg file say? Also try running Biber in debug mode (biber --debug file) and report your .blg findings. – moewe Mar 16 '15 at 14:54
  • Did you have any luck getting this to work? If not, please, give us more to work on: Biber's log output (the .blg file), have a look at the .bbl file (is it even created?). – moewe Mar 17 '15 at 12:00
  • Neither the .blg nor the .bbl files are created. Here's a link to the .Rnw filee I'm running in RStudio -- I think that may be the best way to resolve the root of this problem. https://www.dropbox.com/s/y8yzivtxx4umy84/test.Rnw?dl=0 – user2205916 Mar 17 '15 at 17:01
  • You do realise that the file you run (the one you linked to) is not the same as your MWE above, right? Because in your MWE you have the correct line \addbibresource[location=remote]{https://raw.githubusercontent.com/aw236/myrefs/master/myrefs.bib}, while in your .Rnw file you run \addbibresource[location=remote,type=file]{https://github.com/aw236/myrefs/myrefs.bib} (the right solution is there, but commented out). Anyway, did you even run Biber on the file (normally at least a .blg is created even if something went wrong)? What is Biber's output on a manual run via the command line? – moewe Mar 18 '15 at 06:42
  • @moewe After posting my MWE, I tinkered with my .Rnw file. In my .Rnw file, the suggested line of code, \addbibresource[location=remote]{https://raw.githubusercontent.com/aw236/myrefs‌​/master/myrefs.bib} didn't work, so I commented it out and iteratively tried a few other possibilities. Consequently, my linked .Rnw differs from the MWE. I'm not sure if I even run Biber, since I rely on the RStudio IDE which normally handles such things. I won't be able to further investigate the answers to your helpful troubleshooting questions until Saturday (too much homework right now). Thanks. – user2205916 Mar 25 '15 at 20:56
  • What about trying a normal TeX file first, that is take your above example as .tex file and compile it via the command line (pdflatex test, biber test, pdflatex test, pdflatex test, assuming that your MWE file is called test.tex). And check if that works, if it doesn't then the problem is with how RStudio invokes LaTeX/Biber etc. – moewe Mar 27 '15 at 13:25
  • A short search reveals that (at least in the past) RStudio has its problems with Biber. You will however have to run Biber to use the remote access fun. See knitr and biblatex, the easiest way out is probably to configure RStudio to start latexmk or arara. – moewe Mar 27 '15 at 13:28
  • @moewe I'll investigate your helpful leads tomorrow afternoon and get back to you. My graduate program emphasizes use of RStudio and I think solving this problem can benefit my workflow and that of my classmates. Thank you very much for your help. – user2205916 Mar 27 '15 at 18:14
  • I can reproduce the problem with Biber 2.1 (the current version), Biber 2.2 (beta) (available from sourceforge) did not have any problems in my test though, so I assume the problem was solved by updating some Perl components. – moewe Aug 23 '15 at 09:10
  • 4
    I'm voting to close this question as off-topic because it is solved by a software update (running the MWE with Biber version 2.2 works perfectly fine). – moewe Nov 04 '15 at 10:05

0 Answers0