2

I am using Jupyter notebooks for internal documentation of my PhD research. I develop my notebooks in PyCharm, push them to my Github repository and finally I share nbviewer links with my supervisors.

I would like to be able to cite papers and books within the notebook and to generate a list of references at the end of it, similarly to what I do in Latex documents. I checked this answer, but it's not what I am looking for, because I don't want to convert my notebook to a pdf document, I want to render citations and references within the notebook itself, so within the .ipynb file.

The closest thing that I could find is the Document Tools of the Calico suite (see this video), that apparently now has become a Calysto notebook extension. The problem for this solution is: will it work in PyCharm?

Do I have any other options to handle citations and references within a Jupyter notebook?

fma
  • 219
  • 2
  • 14
  • 1
    For JupyterLab: https://github.com/krassowski/jupyterlab-citation-manager. If you are seeking PyCharm specific solutions I would change the title (Jupyter Notebook is an application maintained by Project Jupyter together with JupyterLab; Jupyter notebook is a standard of notebooks used in Jupyter Notebook, PyCharm and others). – krassowski Sep 09 '22 at 11:31
  • Title changed! And thanks for the indication. From what I can see from the Citation Manager extension for JupyterLab it should be possible to follow a certain markdown syntax to replicate the rendering of citations and bibliography with PyCharm, even if it would not be automatized, right? – fma Sep 09 '22 at 15:56

1 Answers1

2

You might want to have a look at Quarto. It is quite powerful and easy to use for turning Notebooks/Markdown into shareable documents that contain citations and a bibliography, but also code, plots and interactive elements. It builds on pandoc, and you would still have to convert the notebooks (e.g., to HTML) for sharing, so it might not be exactly what you want. However, plots can be rendered automatically, and code included in the output if you like. While you are editing the notebook, you can use the preview command to see the rendered document in sync (see here for examples).

I agree that having support for rendering citations in notebooks directly in Jupyter Lab would be nice. However, the conversion step at least has the advantage that you don't depend on your collaborators using the same tools for working with notebooks as you. You could basically see it as an alternative to using nbviewer, which also converts your notebook to a static HTML file. To automate the uploading/sharing process, you can use Quarto's publishing capabilites, for example rendering the notebook on Github Pages.

astoeriko
  • 730
  • 8
  • 20