如何更改 Jupyter Notebook 中的字体

问题描述 投票:0回答:2

如何更改 Jupyter Notebook 中的字体?我想更改 Jupyter Notebook 中的字体,并且我使用的是 Python 2.7

python python-2.7 fonts jupyter-notebook
2个回答
6
投票

我知道您可以使用

jupyterthemes
包来做到这一点。请参阅下面的示例,了解如何安装软件包和更改字体。

pip install jupyterthemes
# set font/font-size of markdown (text cells) and notebook (interface)
# see sans-serif & serif font tables below
jt -tf merriserif -tfs 10 -nf ptsans -nfs 13

您可能会在 github 存储库上找到列出的其他字体。

这个包的第一个目的是改变 jupyter 的主题。 也许这是一个尝试比默认背景对眼睛不那么刺激的背景的机会。我个人跑步:

jupyter-theme -t oceans16 -T

0
投票

您可以使用 Jupyter 文件资源管理器部分中提供的

Settings Editor
更新 Jupyter 设置,例如字体系列、字体大小和缩进。

可以修改代码编辑器(在后台使用

CodeMirror
)、代码控制台甚至 CSV 查看器的设置。

Jupyter's Setting Editor

如果您觉得编辑底层 JSON 文件更舒服,您还可以切换“设置”视图以使用右上角的

JSON Settings Editor

JSON Editor for Jupyter's Settings

通过这种方式,您可以像 VSCode 一样调整设置。

Editing CodeMirror Settings

记得点击所需的插件,在本例中为 CodeMirror。

© www.soinside.com 2019 - 2024. All rights reserved.