Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: polished reports via pandoc #987

Closed
kkmann opened this issue Apr 10, 2019 · 2 comments
Closed

Feature request: polished reports via pandoc #987

kkmann opened this issue Apr 10, 2019 · 2 comments

Comments

@kkmann
Copy link

kkmann commented Apr 10, 2019

Hey,

I must say that I am a big fan of the jupyter notebook and what it has done to promote enjoyable literate programming over the past years.
However, I still mostly used R Markdown + knitr to script my analyses and get polished reports out. It is just so convenient to have the full power of pandoc, native support for code cell hiding, and markdown output of tables via 'knitr::kable' and the like.
Turning an .Rmd file in a polished pdf or html report is just sooo easy.
The yaml header adds so much flexibility and even referencing from a .bib file is super easy.
My main problem with R Markdown is that the 'notebook version' is not really working that well since the interactive mode only works with R Studio and the interface is much more cluttered than a nice, clean jupyter lab or notebook!

So, I really wonder whether there is any effort in terms of providing similar 'publication quality reporting' capabilities to jupyter notebooks? I mean, it should be fairly straight forward to include a yaml header cell type that get displayed in a nice way in the notebook itself (not as markdown ;)) and simply gets written to .md verbatim (skipped for all other formats).
Is there any hope for getting support for references using .bib files (again working both for the notebook itself and a .md export) or even cross-referencing of outputs?
I would just love to interactively develop a manuscript submission as jupyter notebook and then simply add a proper yaml header, export to .md, and get a polished submittable manuscript via pandoc (pdf/html/or even .docx).

Not quite sure whether this is the right place to raise this, but the issues seems to affect both nbconvert and the notebook format. Not quite sure what the best technical way of implementing this would be.

@mgeier
Copy link
Contributor

mgeier commented Apr 12, 2019

Some of your requests can be achieved with nbsphinx: https://nbsphinx.readthedocs.io/ (full disclosure: I'm the author).

Code cell hiding is not yet supported, but it is oft-requested (e.g. spatialaudio/nbsphinx#15, spatialaudio/nbsphinx#65, spatialaudio/nbsphinx#86, spatialaudio/nbsphinx#185).

Referencing with .bib files works: https://nbsphinx.readthedocs.io/en/0.4.2/markdown-cells.html#Citations.

Cross-referencing between notebooks also works: https://nbsphinx.readthedocs.io/en/0.4.2/markdown-cells.html#Links-to-Other-Notebooks.

Supported output formats are HTML, LaTeX and EPUB. Here's an example for PDF output: https://readthedocs.org/projects/nbsphinx/downloads/pdf/0.4.2/.

@MSeal
Copy link
Contributor

MSeal commented Apr 15, 2019

To add and weight in about the new cell type question, you may want to open the discussion on https://discourse.jupyter.org or in the format repo https://github.com/jupyter/nbformat/issues as adding new cell types would likely be a 5.x+ feature change for nbformat of the schema.

On code cell hiding https://github.com/jupyter/nbformat/blob/master/nbformat/v4/nbformat.v4.schema.json has support for source_hidden, though the UIs have been mostly on 4.2 format. There's some recent pushes to fill in gaps to 4.4 where these features exist. I believe nteract UI supports it and lab UI has it PR'd / soon to release (need to check on that).

@kkmann kkmann closed this as not planned Won't fix, can't repro, duplicate, stale Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants