1.css改法
anaconda\Lib\site-packages\notebook\static\custom\custom.css
.CodeMirror pre {font-family: Consolas; font-size: 12pt;}
* {font-family: Consolas;}
div.output_area pre {font-family: Consolas; font-size: 12pt;}
div.input_prompt {font-family: Consolas; font-size: 12pt;}
div.out_prompt_overlay {font-family: Consolas; font-size: 12pt;}
div.prompt {font-family: Consolas; font-size: 12pt;}
span.cm-comment {font-family: Consolas !important; font-style:normal !important; color:#BB3D00 !important;}
2.更换主题
1.pip install --upgrade jupyterthemes
usage: jt [-h] [-l] [-t THEME] [-f MONOFONT] [-fs MONOSIZE] [-nf NBFONT] [-nfs NBFONTSIZE] [-tf TCFONT] [-tfs TCFONTSIZE] [-dfs DFFONTSIZE] [-ofs OUTFONTSIZE] [-mathfs MATHFONTSIZE] [-m MARGINS] [-cursw CURSORWIDTH] [-cursc CURSORCOLOR] [-cellw CELLWIDTH] [-lineh LINEHEIGHT] [-altp] [-altmd] [-altout] [-P] [-T] [-N] [-kl] [-vim] [-r] [-dfonts]
2.主题列表jt -l
3.我的主题
- 暗黑系
jt -t oceans16 -f fira -fs 10 -cellw 80% -ofs 11 -dfs 11 -T
- 明亮系
jt -t grade3 -f roboto -fs 12 -cellw 80% -ofs 11 -dfs 11 -T
3.使用当前路径打开jupyter
- 在Anaconda Prompt中输入jupyter notebook --generate-config生成配置文件
- 生成的配置文件在C:\Users{username}.jupyter\jupyter_notebook_config.py
- 将里面的配置
c.ServerApp.notebook_dir = ''
取消注释