Skip to content

Latest commit

 

History

History
70 lines (58 loc) · 1.8 KB

jupytext-markdown.md

File metadata and controls

70 lines (58 loc) · 1.8 KB
jupyter
celltoolbar jupytext kernelspec rise
Slideshow
cell_metadata_filter cell_metadata_json formats notebook_metadata_filter text_representation
all
true
md
all,-language_info,-jupytext.text_representation.jupytext_version
extension format_name format_version
.md
markdown
1.2
display_name language name
Python 3
python
python3
autolaunch
true

using jupytext

if you have jupytext enabled, you can use RISE in a usual manner
on notebooks that are stored as .py or .md (or other extensions, for that matter).

exact same behaviour

there is almost nothing that changes in this case as far as RISE is concerned

the only notable difference is for locating the notebook-specific CSS file

of course, and as you might expect, if your notebook
is called either mynotebook.py or mynotebook.md,
or, here again, any other extension
then it is mynotebook.css that is used,
if it exists, to load a notebook-specific CSS

pros and cons

jupytext is supercool if you use git a lot, and you don't carre about saving cell outputs
no need anymore to run nbstripout all the f... time

# you can still embed code of course
def syracuse(n):
    while n != 1: 
        if n % 2 == 0:
            n //= 2
            yield n
        else:
            n = 3*n + 1
            yield n
# but the output is no longer stored
for n in (4, 8, 27):
    print(f'n=${n} :', end=' ')
    for i in syracuse(n):
        print(i, end=' ')
    print()