Skip to content

Instantly share code, notes, and snippets.

@danieltomasz
Created June 19, 2018 15:41
Show Gist options
  • Save danieltomasz/cadeab3d5a9dd7e70b29eb926d0ffb95 to your computer and use it in GitHub Desktop.
Save danieltomasz/cadeab3d5a9dd7e70b29eb926d0ffb95 to your computer and use it in GitHub Desktop.
making .bib references in jupyter notebook

Formatted Reference Links for Jupyter Notebooks based on .bib Files

Installation

This requires the bibtex-parser package also.

First, download the dependencies and package to the ~/.jupyter/custom location

mkdir ~/.jupyter/custom
cd ~/.jupyter/custom
git clone [email protected]:mikolalysenko/bibtex-parser.git
git clone [email protected]:michaelplews/jupyter_markdown_citations.git
cd jupyter_markdown_citations

Next, symlink (or copy) your .bib file (mine is exported from Mendeley) to the same folder:

ln -s /directory/to/bib_file.bib #for symlinking
cp /directory/to/bib_file.bib . #for copying
#only use one of the above options

Generate the custom_bibliography.js file with the make_bib_js.py file:

python make_bib_js.py bib_file.bib

Lastly, add this app to your custom.js file:

cd ~/.jupyter/custom
echo "require(['custom/jupyter_markdown_citations/citations']);" >> custom.js

Reloading your .iPyNb page in the browser should now load this package.

Enjoy!

(source)[https://github.com/michaelplews/jupyter_markdown_citations/blob/master/README.md]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment