Skip to content

xiajunwen1007/wolfram-language-notebook

 
 

Repository files navigation

Notebook support for Wolfram Language in VS Code

Prerequisites

Install this extension from VS Code Marketplace.

Getting Started

To create a new Wolfram Language notebook, execute Create New Wolfram Language Notebook in the Command Palette, or create a new file with .wlnb extension.

Execute Manage Kernels command and choose Use wolframscript to add wolframscript to the kernel configuration and connect to it. The status of the kernel will be shown in the status bar.

Add a code cell, type Wolfram language code in the cell, and evaluate it.

getting-started

Features

Syntax Highlighting: The notebook highlights Wolfram language syntax, common built-in functions, and full character names, e.g. \[Alpha].

Auto-completion and Usages: Auto-completion for built-in functions are provided. Their usage information is displayed when typing and hovering.

Output Renderer: The notebook renders common Wolfram language expressions into HTML for better presentations. Graphics are shown as rasterized images.

Export as Wolfram notebook: The notebooks can be exported as Wolfram notebooks, containing markdown cells, code cells and their outputs.

Remote kernel: When configured, the notebook can establish an ssh connection to the remote machine and launch a kernel on it. Computations are done remotely, but code and outputs are stored locally.

Kernel Configuration

To add a new kernel, click ⨉ Wolfram Kernel in the status bar and choose Add a new kernel (when no kernel is currently connected). By default, the command launching the kernels is wolframscript and the port is randomly selected between 49152 and 65535. For remote kernels, you may choose the private key file for ssh authentication, or skip this step if it is already available to ssh.

To edit or remove kernel configurations, find kernel.configurations in the extension settings page, and edit settings.json. Each kernel is an entry with the kernel name as the key and the following configurations as the value:

Key Value
type "local"/"remote"
command command to launch the kernel, e.g. "wolframscript"
ports ranges of numbers, e.g. "1,3,6-9"
sshCommand the ssh command, e.g. "ssh"
sshHost user@hostname
sshCredentialType "key"/"none"
sshCredential path to the ssh credential

Release Notes

Check Release Notes.

About

Notebook support for Wolfram Language in VS Code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Mathematica 35.7%
  • TypeScript 34.1%
  • JavaScript 16.2%
  • CSS 14.0%