Jupyter
CreateNotebook
create a Jupyter notebook
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
CreateNotebook( nbfile, data, opts )
nbfile
-
string
data
expression or XML worksheet tree
opts
(optional) options as specified below
base=one of bindir, datadir, homedir, mapledir, tempdir, toolboxdir, worksheetdir.
The base option specifies a base directory. The parameter nbfile is interpreted as a relative path under this directory. For the meaning of worksheetdir see interface; for any other of these symbols, see kernelopts.
source = one of expression, help, or worksheet
Specifies the source of data to use in populating the newly created notebook. If source=help, the input data is interpreted as a help query and and the resulting page will be translated. If source=worksheet, the input data is interpreted as a string corresponding to the filename of a worksheet. The default, source=expression, interprets data as an expression.
target = one of file or string
Specifies whether the generated notebook should be written to a file or returned as a string. The default is file.
CreateNotebook(nbfile) creates a Jupyter notebook containing the data data.
If data is an parsed worksheet expression, the data is written to a Jupyter notebook using Worksheet:-WorksheetToJupyter. Otherwise, the input is taken to be an ordinary Maple expression and it is entered into the generated worksheet as-is.
Create a notebook wrapping a single expression.
with⁡Jupyter:
expr≔2⁢sin⁡x+y
CreateNotebook⁡expr.ipynb,expr,base=homedir
Create a notebook from a help page, in this case for the sine function.
CreateNotebook⁡SineHelp.ipynb,sin,source=help,base=homedir
Create a notebook from a Maple worksheet.
MatrixExample≔FileTools:-JoinPath⁡example,MatrixExample.mw,base=datadir
MatrixExample≔/maple/cbat/active/268316/data/example/MatrixExample.mw
CreateNotebook⁡MatrixExample.ipynb,MatrixExample,source=worksheet,base=homedir
The Jupyter[CreateNotebook] command was introduced in Maple 2022.
For more information on Maple 2022 changes, see Updates in Maple 2022.
See Also
Export as Maple Text
Jupyter/package
Maple Kernel for Jupyter
XMLTools
Download Help Document