Skip to content

Conversation

@rgaiacs
Copy link
Contributor

@rgaiacs 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.

@olexandr-konovalov
Copy link
Contributor

@rgaiacs any further plans about this PR?

@rgaiacs
Copy link
Contributor Author

rgaiacs commented May 23, 2018

any further plans about this PR?

No. I didn't receive any interest from @swcarpentry/python-maintainers about this plus I'm not happy with the use of the HTML tags.

I know that #202 would not work for Sage or Gap. :-(

@fmichonneau fmichonneau added type:discussion Discussion or feedback about the lesson and removed discussion labels Aug 21, 2018
@fmichonneau fmichonneau changed the base branch from gh-pages to main October 13, 2021 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:discussion Discussion or feedback about the lesson

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants