Install JupyterLab
conda create -n sage
(note: your folder will be called sage
. you can also name this folder something else other than sage
)conda install -c conda-forge jupyterlab=1.0.1
Now you can start JupyterLab using the command jupyter lab
on the terminal while in your sage environment.
Install Sagemath kernel
In a command window, run the command
jupyter kernelspec install /path/to/sage/local/share/jupyter/kernels/sagemath --user
(if you have multiple Sagemath installations, you can do /path/to/sage/local/share/jupyter/kernels/sagemath/ --user --name ChosenName
)
To link Jupyterlab to Sage, first open the file kernel.json
which may be located in Library/Jupyter/kernels/sagemath/kernel.json
or in a different path. To look up the path, first look up the available kernels.
jupyter kernelspec list
or sage kernelspec list
(I am not sure which one is correct - someone please edit this line)"env":{"SAGE_ROOT":"/path/to/sage"}
kernel.json
.To make Jupyterlab an app in Chrome:
jupyter lab --generate-config
~/.jupyter/jupyter_notebook_config.py
c.LabApp.browser = ‘/path/to/Google Chrome/ —-app=%s’
c.LabApp.browser = '/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app=%s’
conda activate [Name of your conda environment, which is this example is Sage]
jupyter lab
on the terminal. This should open a browser (your default browser) running JupyterLab.conda deactivate
We want to (re)define some keyboard shortcuts
Ctrl+PageDown
Ctrl+PageUp
Ctrl+P
Alt+B
In JupyterLab open the Advanced Settings Editor (Settings -> Advanced Settings Editor
) and open Keyboard Shortcuts
.
Copy and paste the following to the editor and save. This code works for Jupyterlab >= 1.0.0
{
"shortcuts": [
{
"command": "application:activate-next-tab",
"keys": [
"Ctrl PageDown"
],
"selector": "body"
},
{
"command": "application:activate-previous-tab",
"keys": [
"Ctrl PageUp"
],
"selector": "body"
},
{
"command": "codemirror:change-mode",
"keys": ["Accel P"],
"args": { "name": "Python" },
"selector": ".jp-FileEditor"
},
{
"command": "filemenu:create-console",
"keys": ["Alt B"],
"selector": ".jp-FileEditor"
},
]
}
view(...)
"freezes cell"attach(*files)
does not workor
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing