rossant / ipymd

Use the IPython notebook as an interactive Markdown editor
BSD 3-Clause "New" or "Revised" License
484 stars 42 forks source link

RMarkdown/RNotebook support #86

Open grst opened 6 years ago

grst commented 6 years ago

I created RMarkdown support for ipymd. With my extension, Rmd files edited in rstudio can be directly opened with jupyter.

Notably, this format two output-files:

Like that, input and output are separated, which is really handy when working with version control.

Images are fully supported

Images and other content, such as tables, are fully supported. Unlike the other markdown formats, Rmarkdown is thus a full replacement for jupyter nbformat.

The ipymd-cell representation was not sufficient

As I wanted to cover all information from jupyter nbformat, the sparse cell representation used for the other formats was not sufficient. I therefore use the jupyter nbformat as internal representation and convert directly between notebook and rmarkdown. This required to implement a 'special case' in FormatManager.

I couldn't think of an elegant solution to address this, without rewriting a good deal of core code.

I added a virtualenv for testing/developing

make jupyter will run jupyter in a virtual environment with ipymd enabled, so that I don't have to mess with my production instance of jupyter.

I improved the README

I restructured the README, starting with a concise motivation, then an overview of formats and installation instructions

rossant commented 6 years ago

Thanks for this, it sounds very good! I'm afraid I might not have time to review this carefully in the near future. I'm wondering if there is any watcher here who'd be willing to have a look and even have commit rights on this repository? FWIW I've also been working on another project, https://github.com/podoc/podoc, which might some day replace ipymd. It is still highly experimental. The work that has been done in this PR might be used there as well.

grst commented 6 years ago

Thanks for pointing me to podoc! This looks very interesting and you are very welcome to re-use the code there.