Add demo of use Jupyter Notebook for lesson #94

Open
wants to merge 2 commits into
from

Projects

None yet

1 participant

@rgaiacs
Contributor
rgaiacs commented Jan 19, 2017

Motivation

Make easy to have the correct output of Python code or any other language supported by Jupyter Notebook.

User case

I helped @alex-konovalov with the Software Carpentry Sage idea lesson. Sage is supported by Jupyter Notebook. And GAP developers, @alex-konovalov wrote the Software Carpentry GAP lesson, is working to have a kernel supported by Jupyter.

Screenshots

Markdown lesson (from the lesson-example repository)

screencapture-swcarpentry-github-io-lesson-example-04-formatting-1484786584239

RMarkdown lesson (from the lesson-example repository)

screencapture-swcarpentry-github-io-lesson-example-06-rmarkdown-example-1484786529982

Jupyter notebook lesson (from this pull request)

screencapture-localhost-4000-07-jupyter-1484786481713

The layout looks the same of the other sources.

"Limitations"

Jupyter notebook doesn't allow cells inside cells what makes having something like

> ## Challenge Title
>
> This is the body of the challenge.
>
> ```{python}
> it may include some code that Jupyter notebook is going to execute
> ```
> {: .source}
>
> > ## Solution
> >
> > This is the body of the solution.
> >
> > ```{python}
> > it may also include some code that Jupyter notebook is going to execute
> > ```
> > {: .output}
> {: .solution}
{: .challenge}

but Jupyter doesn't sanitize the HTML in Markdown cells what allows us to have the open of a HTML tag in one Markdown cell and the close of that HTML tag in another Markdown cell, like

<blockquote class="challenge">
## Challenge Title

This is the body of the challenge.

```{python}
it may include some code that Jupyter notebook is going to execute
```

<blockquote class="solution">
## Solution

This is the body of the solution.

```{python}
it may also include some code that Jupyter notebook is going to execute
```
</blockquote>
</blockquote>

I know that we try to avoid type HTML but I couldn't find another solution.

Next actions

Get feedback from @valentina-s, @tbekolay, @k8hertweck, @ChristinaLK, @gvwilson, @tracykteal, @ctb, @ethanwhite, and everyone from the community.

@rgaiacs rgaiacs added the discussion label Jan 19, 2017
@rgaiacs rgaiacs referenced this pull request in alex-konovalov/sage-lesson Jan 19, 2017
Merged

Minor fixes and improvements for Sage (Jupyter Notebook) -> Markdown #9

@rgaiacs rgaiacs referenced this pull request in swcarpentry/styles Feb 18, 2017
Open

Add support for converting Jupyter Notebook files. #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment