Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revisionBoth sides next revision | ||
playground:test_jupyter [2020/03/26 12:50] – created hnagel | playground:test_jupyter [2020/04/02 09:29] – hnagel | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Polymake jupyter tutorials ====== | ====== Polymake jupyter tutorials ====== | ||
- | ===== Creating a notebook that should end up on the Polymake website: ===== | + | ===== Creating a notebook that should end up on the Polymake website ===== |
- | The goal is to automate the conversion process from ipynb markdown, | + | The goal is to automate the conversion process from ipynb markdown, |
- | What is added automatically by dokuwiki: | + | What is added automatically by dokuwiki: |
- | What the ipynb2dokuwiki converter should optimally do: - use nbconvert preprocessor to run all cells and create the output beforehand? - add preamble - with a link to the ipynb file - a cd command so that the following notebook code also works in the shell? | + | the table of content based on markdown titles and subtitles (TODO: how extactly) |
- | When multiple people work on one tutorial: - it is easier to solve merge conflicts or comprehend changes when ipynbs are committed with output cells cleared and no base64 attachements yet | + | ==== What the ipynb2dokuwiki script does: ==== |
- | before | + | Markdown cells will be converted with pypandoc. Code source and output in text format are put in a code frame. Output svgs are extracted\\ |
+ | Extracts all attached media from and replaces the links | ||
+ | |||
+ | ==== What the ipynb2dokuwiki script should optimally do ==== | ||
+ | |||
+ | Use nbconvert preprocessor to run all cells and create the output beforehand? Add preamble with a link to the ipynb file. Add a cd command so that the following notebook code also works in the shell? | ||
+ | |||
+ | ==== Miscellaneous ==== | ||
+ | |||
+ | When multiple people work on one tutorial it is easier to solve merge conflicts or comprehend changes when ipynbs are committed with output cells cleared and no base64 attachements yet. | ||
+ | |||
+ | Before | ||
+ | |||
+ | roblems with pypandoc, which converts ipynb markdown to dokuwiki markdown: 1. enumerations? | ||
==== Embedded images ==== | ==== Embedded images ==== | ||
- | After conversion the caption " | + | After conversion the caption " |
==== Code and code output ==== | ==== Code and code output ==== | ||
<code perl> | <code perl> | ||
Line 22: | Line 35: | ||
> # one svg output | > # one svg output | ||
> svg(cube(3)-> | > svg(cube(3)-> | ||
+ | > print "SVG output above"; | ||
</ | </ | ||
- | {{ tutorial: | + | {{ media:tutorial: |
<code perl> | <code perl> | ||
+ | SVG output above | ||
> # multiple svg outputs in a scrollable window | > # multiple svg outputs in a scrollable window | ||
> svg(cube(3)-> | > svg(cube(3)-> | ||
> svg(cube(3)-> | > svg(cube(3)-> | ||
</ | </ | ||
- | {{ tutorial: | + | {{ media:tutorial: |
- | {{ tutorial: | + | {{ media:tutorial: |
<code perl> | <code perl> | ||
> # a threejs output | > # a threejs output | ||
> cube(3)-> | > cube(3)-> | ||
</ | </ |