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

embed rendered notebooks in ordinary .rst #306

Open
mgasner opened this issue Jun 11, 2019 · 3 comments
Open

embed rendered notebooks in ordinary .rst #306

mgasner opened this issue Jun 11, 2019 · 3 comments

Comments

@mgasner
Copy link

mgasner commented Jun 11, 2019

Probably a dupe of #181, but it would be really great to be able to embed a rendered notebook into an ordinary .rst file. This is for the case where you aren't using notebooks to generate your docs, but rather documenting a system that is meant to be used in notebooks.

@mgasner
Copy link
Author

mgasner commented Jun 11, 2019

(This is like an extended, fancier version of what you can currently do with the undocumented .. nbinput:: and .. nboutput:: directives).

@mgeier
Copy link
Member

mgeier commented Jun 26, 2019

Yes #181 discusses including one or more notebooks within RST files, and it mentions the un-merged PR #33, which suggested a possible implementation. I mentioned my concerns there.

A slightly different approach has been taken by https://github.com/vidartf/nbsphinx-link, you should try if that is appropriate for your use case!

You should not use the nbinput and nboutput directives, because I consider them implementation details and they may even be removed in a future version.

But I've recently read about yet another approach:
https://blog.jupyter.org/integrating-output-in-documentation-with-jupyter-sphinx-ecf569ddab85
https://jupyter-sphinx.readthedocs.io/en/latest/
https://github.com/jupyter-widgets/jupyter-sphinx

Probably that's what you need?

@mgasner
Copy link
Author

mgasner commented Jul 8, 2019

Thanks very much. The jupyter-sphinx system looks great if what you are interested in doing is generating embedded plots, etc., from code that runs on a jupyter kernel, but where you aren't concerned about notebook formatting details.

In my case, I'm trying to document a system that is meant to be invoked interactively by users of jupyter notebooks -- so what I really want to do is render individual notebook cells (and perhaps their output) in sphinx docs as they would appear in jupyter itself. Your internal directives are the closest thing I've found that match this case.

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

2 participants