CreateNotebook - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Jupyter

  

CreateNotebook

  

create a Jupyter notebook

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

CreateNotebook( nbfile, data,  opts )

Parameters

nbfile

-

string

data

-

expression or XML worksheet tree

opts

-

(optional) options as specified below

Options

• 

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.

Description

• 

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.

Examples

Create a notebook wrapping a single expression.

withJupyter:

expr2sinx+y

expr2sinx+y

(1)

CreateNotebookexpr.ipynb,expr,base=homedir

Create a notebook from a help page, in this case for the sine function.

CreateNotebookSineHelp.ipynb,sin,source=help,base=homedir

Create a notebook from a Maple worksheet.

MatrixExampleFileTools:-JoinPathexample,MatrixExample.mw,base=datadir

MatrixExample/maple/cbat/active/268316/data/example/MatrixExample.mw

(2)

CreateNotebookMatrixExample.ipynb,MatrixExample,source=worksheet,base=homedir

Compatibility

• 

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

Jupyter/package

Maple Kernel for Jupyter

XMLTools