user_guide:tutorials:latest:jupyter_tutorials

This tutorial is probably also available as a Jupyter notebook in the demo folder in the polymake source and on github.

Different versions of this tutorial: latest release, release 4.11, release 4.10, release 4.9, release 4.8, release 4.7, release 4.6, release 4.5, release 4.4, release 4.3, release 4.2, release 4.1, release 4.0, release 3.6, nightly master

Polymake jupyter tutorials that should end up on the website

Jupyter notebooks support github flavored markdown gfm which will be further treated by pandocfilters and pandoc during the conversion to dokuwiki. Here are some useful links:

In order to make everything work in both jupyter and dokuwiki (and without reediting much after conversion), there are a few general things to take note of :

  • Use only lower case letters, digits, hyphens and underscores for your notebook name. [a-z0-9_-]
  • Do not put code (with backticks) inside of link or image captions

Others require their own section:

Filenames of images should be lower case aswell and they should be base64 attached. Dragging and dropping them into the notebook creates a syntax like ![tooltip](attachment:logo.png). tooltip

This syntax, however, does not support image formatting inside of the notebook or the dokuwiki page it will end up on. Thus, if you need more control use img tags and their style attribute. Some examples:

An inline image: <img src=attachment:logo.png width=15 alt="tooltip" style="display: inline"> tooltip

As a block: <img src=attachment:logo.png alt="tooltip"><img> tooltip

To display the image as a centered block in dokuwiki, like it is the default in jupyter, you may add something like style="display: block, margin-left: auto, margin-right: auto" or use the css class="center-block" tooltip

Attached images will be extracted and the conversion process handles the replacement of “attachment:” with a proper link to the image in dokuwiki.

To other ipynbs:

[Tutorial on Polytopes](apps_polytope.ipynb): Tutorial on polytopes

Internal section links:

[More Markdown](#More-Markdown): More Markdown

Due to differing seperation characters - in jupyter and _ in polymake dokuwiki, it is not possible to link to section headings with hyphens directly, yet simply adding a dokuwiki friendly hyperlink <a id="a_non_hyphen_free_heading"></a> is a workaround:

[A non hyphen-free heading](#a_non_hyphen_free_heading): A non hyphen-free heading

Links to sections in other ipynbs:

[Convex Hulls in the tutorial on polytopes](apps_polytope.ipynb#Convex-Hulls) Convex Hulls in the tutorial on polytopes

To something in the documentation:

[linearprogram properties](https://polymake.org/doku.php/documentation/latest/polytope/linearprogram#properties) linearprogram properties

To a downloadable file:

[filtrationexample]https://polymake.org/lib/exe/fetch.php/tutorial/filtrationexample.top filtrationexample

Svg and threejs output created in notebooks will also end up on the dokuwiki website. Thus, for working with notebooks that already contain svg output, it is recommended to have the perl SVG module installed and svg configured

> reconfigure("common::svg.rules");

If svg is configured, it will be the prefered output for lattices in jupyter polymake.

> svg(cube(3)->HASSE_DIAGRAM->VISUAL);
> cube(3)->HASSE_DIAGRAM->VISUAL;

> # two threejs outputs
> cube(3)->VISUAL;
> simplex(3)->VISUAL;
unnamed
Transparency
depthWrite
Rotation
x-axis
y-axis
z-axis
Rotation speed
Display
Objects
Camera
SVG
Download
New tab
unnamed
Transparency
depthWrite
Rotation
x-axis
y-axis
z-axis
Rotation speed
Display
Objects
Camera
SVG
Download
New tab

For testing and comparing.

sub sup del and s

subscript supscript deleted deleted

These tags are explicitly processed while conversion.

Emphasis

This text will be italic This will also be italic

This text will be bold This will also be bold

You can combine them

Lists

Unordered
  • Item 1
  • Item 2
    • Item 2a
    • Item 2b
Ordered
  1. Item 1
  2. Item 2
  3. Item 3
    1. Item 3a
    2. Item 3b
Task Lists
  • [x] @mentions, #refs, links, formatting, and tags supported
  • [x] list syntax required (any unordered or ordered list supported)
  • [x] this is a complete item
  • [ ] this is an incomplete item
Tables

You can create tables by assembling a list of words and dividing them with hyphens - (for the first row), and then separating each column with a pipe |:

First Header Second Header
Content from cell 1 Content from cell 2
Content in the first columnContent in the second column
Strikethrough

Any word wrapped with two tildes (like this) will appear crossed out.

  • user_guide/tutorials/latest/jupyter_tutorials.txt
  • Last modified: 2023/11/06 10:57
  • by 127.0.0.1