#20690: Live documentation in Jupyter using Thebe
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-7.3
Component: documentation | Resolution:
Keywords: days77, jupyter, | Merged in:
thebe, notebook |
Authors: Florent Cayré, | Reviewers: Vincent Delecroix
Nicolas M. Thiéry |
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/fcayre/thebe-20690 | 5f9fc0e62bfe1c37f6a3419e9170ef0159f615f8
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by fcayre):
* commit: 07035fd4b6db42b55131c19026f274e4e624f33b =>
5f9fc0e62bfe1c37f6a3419e9170ef0159f615f8
* branch:
public/live_documentation_in_jupyter_using_thebe-20690-experimental =>
u/fcayre/thebe-20690
Old description:
> Thebe is a Jupyter javascript plugin for static sites that allows for
> rendering selected divs of the HTML as live cells connected to a
> Jupyter server:
>
> https://oreillymedia.github.io/thebe/
>
> The goal of this ticket is to use this technology to implement live
> documentation in the Jupyter notebook as we had in the legacy Sage
> notebook.
>
> Kuddos to Rob Beezer for pointing us to Thebe in his presentation of
> MathBookXML at Sage Days 77.
>
> Steps:
> - [X] Configure Sphinx to add the Thebe javascript library in the static
> page
> - [X] Configure Sphinx to add a small header to our html page with:
> - [X] Inclusion of the Thebe javascript
> - [X] Thebe configuration: which divs to make live
> Currently, we include all <pre> tags that contain the "sage:"
> prompt
> TODO: shall we change to <pre> tags that start with the "sage:"
> prompt ?
> to do?
> - [X] Only activate Thebe if the page is served by a Jupyter instance
> Currently we check that the protocol is http
> - [X] A button to activate live cells
>
> - [X] Configure the Jupyter notebook in Sage to somehow provide the
> server configuration to Thebe (not needed in fact)
>
> - [/] Preparse or customize/configure Thebe to support Sage's doctest
> syntax:
> - [ ] Strip out the "sage: " prompts and "....:" and "... "
> continuation prompts
> - [X] Strip out the outputs
> Bonus: show the included outputs below the cell until the new
> output is computed
> - [X] Support doctests with several commands by spliting into several
> cells
>
> - [X] Check what's the right way for including thebe.js in the Sage
> sources. Should we have a spkg? (to be discussed at Sage Days 74
> with Volker).
>
> following ticket for possible improvement: #20893
New description:
Thebe is a Jupyter javascript plugin for static sites that allows for
rendering selected divs of the HTML as live cells connected to a
Jupyter server:
https://oreillymedia.github.io/thebe/
The goal of this ticket is to use this technology to implement live
documentation in the Jupyter notebook as we had in the legacy Sage
notebook.
Kuddos to Rob Beezer for pointing us to Thebe in his presentation of
MathBookXML at Sage Days 77.
Steps:
- [X] Configure Sphinx to add the Thebe javascript library in the static
page
- [X] Configure Sphinx to add a small header to our html page with:
- [X] Inclusion of the Thebe javascript
- [X] Thebe configuration: which divs to make live
Currently, we include all <pre> tags that contain the "sage:"
prompt
TODO: shall we change to <pre> tags that start with the "sage:"
prompt ?
to do?
- [X] Only activate Thebe if the page is served by a Jupyter instance
Currently we check that the protocol is http
- [X] A button to activate live cells
- [X] Configure the Jupyter notebook in Sage to somehow provide the
server configuration to Thebe (not needed in fact)
- [X] Preparse or customize/configure Thebe to support Sage's doctest
syntax:
- [X] Strip out the "sage: " prompts and "....:" and "... "
continuation prompts
- [X] Strip out the outputs
Bonus: show the included outputs below the cell until the new
output is computed
What's been done here is: output is show until the "activate"
button is clicked.
- [X] Support doctests with several commands by spliting into several
cells
- [X] Check what's the right way for including thebe.js in the Sage
sources. Should we have a spkg? (to be discussed at Sage Days 74
with Volker).
following ticket for possible improvement: #20893
--
--
Ticket URL: <https://trac.sagemath.org/ticket/20690#comment:19>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.