Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
49 lines (32 sloc) 1.29 KB

Working with Jupyter notebooks

Weaving from Jupyter notebooks

Weave supports using Jupyter Notebooks as input format. This means you can weave notebooks to any supported formats; by default, it will be weaved to HTML.

weave("notebook.ipynb") # will be weaved to HTML

!!! warning You can't use chunk options with notebooks.

Output to Jupyter notebooks

As of Weave 0.5.1. there is new notebook method to convert Weave documents to Jupyter notebooks using nbconvert.

notebook

You can specify jupyter used to execute the notebook with the jupyter_path keyword argument (this defaults to the "jupyter", i.e. whatever you have linked to that location).

Instead, you might want to use the convert_doc method below and run the code in Jupyter.

Converting between formats

You can convert between all supported input formats using the convert_doc function.

To convert from script to notebook:

convert_doc("examples/FIR_design.jl", "FIR_design.ipynb")

and from notebook to Markdown use:

convert_doc("FIR_design.ipynb", "FIR_design.jmd")
convert_doc(infile::AbstractString, outfile::AbstractString)
You can’t perform that action at this time.