HertieDataScience / SyllabusAndLectures

Hertie School of Governance Introduction to Collaborative Social Science Data Analysis
MIT License
37 stars 60 forks source link

Question re in-text citation generation from .bib file #47

Closed laurencehendry closed 8 years ago

laurencehendry commented 8 years ago

Hi @ChristopherGandrud

@codykoebnick and I are having trouble with the HTML output of our RStudio Markdown for our research proposal.

When previewing the HTML file on Github the preview does not generate the in-text citations from our .bib file that exists in our Github repository.

After a little spying, we experimented with changing the 'working directory' in our file per your helpful example but to no avail (viz. does setting the working directory only work locally, or can we do this in our repository? What is the rempis package, and how can we use it?)

Please could you help?

@laurencehendry

mcallaghan commented 8 years ago

I believe your repmis::LoadandCite function call may be overwriting your library.bib file. If you set it to a different name, and then include two bibliography files like this

bibliography: 
- bibliography.bib 
- RpackageCitations.bib

in your YAML header, it might help, but you may need to recover an un-overwritten version of your library file.

christophergandrud commented 8 years ago

Thanks for posting that issue. It looks like @mcallaghan might be correct on this. LoadAndCite overwrites what every file you tell it to write to. So it is important to keep your automatically generated package citation .bib separate from your lit review .bib.

Luckily it will be easy to recover your literature review .bib file. It seems to be here.