Python Jupyter-更改默认字体 [英] Python Jupyter - Change default font

查看:248
本文介绍了Python Jupyter-更改默认字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将Jupyter中显示的默认字体更改为Gill sans,但是在知道要去哪里编辑时遇到了问题.

I want to change the default font (to Gill sans) that displays in Jupyter, but am having problems knowing where I go to edit it.

我已经查看了.ipython文件夹,但是没有Static文件夹,而我已经查看了.jupyter文件夹,并且它是空的.

I have looked in the .ipython folder and I have no Static folder, and I have looked in the .jupyter folder and it is empty.

有人知道吗?

推荐答案

您可以通过向其中的文件添加值来修改Jupyter笔记本的样式.

You can modify the styles of Jupyter notebook by adding values to the file in;

.jupyter\custom\custom.css

如果custom目录不在.jupyter中,则将其添加并添加custom.css.

If the custom dir isn't in .jupyter just make it and add custom.css in it.

在新的空白custom.css文件中,您可以添加类似这样的内容以更改代码镜像的字体;

In your new blank custom.css file you can add something like this to change the font for the code mirror;

.CodeMirror pre, .CodeMirror-dialog, .CodeMirror-dialog .CodeMirror-search-field, .terminal-app .terminal {
    font-family: YOUR-FAV-FONT;
    font-size: 12pt;
}

以下是列出custom.css .来自我在github上的 one-dark-notebook回购.随时克隆/分叉并做任何事情.

Here is a example of a pimped out custom.css. It's from my one-dark-notebook repo on github. feel free to clone/fork it and do whatever.

这篇关于Python Jupyter-更改默认字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆