我想更改Jupyter中显示的默认字体(到Gill sans),但是我知道去哪里编辑它会有问题。
我查看了.ipython文件夹,我没有静态文件夹,我查看了.jupyter文件夹,它是空的。
有人知道吗?
答案 0 :(得分:9)
您可以通过在文件中添加值来修改Jupyter笔记本的样式;
.jupyter\custom\custom.css
如果custom
目录不在.jupyter
,只需制作并在其中添加custom.css
。
在新的空白custom.css
文件中,您可以添加类似这样的内容来更改代码镜像的字体;
.CodeMirror pre, .CodeMirror-dialog, .CodeMirror-dialog .CodeMirror-search-field, .terminal-app .terminal {
font-family: YOUR-FAV-FONT;
font-size: 12pt;
}
以下是pimped out custom.css的示例。它来自我在github上的one-dark-notebook repo。随时克隆/分叉并做任何事情。
答案 1 :(得分:3)
您可以在/.jupyter/jupyter_qtconsole_config.py或命令行中设置defalut字体。有关命令行示例,请查看此文档(第23页) https://media.readthedocs.org/pdf/qtconsole/latest/qtconsole.pdf
答案 2 :(得分:2)
您可以从命令行更改字体大小,背景主题,单元格宽度等。查看以下GitHub页面。 https://github.com/dunovank/jupyter-themes