问题描述
如何修改C:\Python32\Lib\site-packages\IPython\frontend\html\\\
otebook\static\css
档在IPython的笔记本目录,而不破坏源文件?
How to change the C:\Python32\Lib\site-packages\IPython\frontend\html\notebook\static\cssfile in the iPython notebook directory without destroying the source file?
我只想在笔记本中设置黑色背景,然后使用蓝色或类别和功能的橙色文本颜色。
I just want to have a black background in the notebook, and then have orange text colors with blue or whatever for classes and functions.
任何人都可以帮忙吗?我知道在哪里可以找到源文件但不知道如何修改它们。
Can anyone help in this one? I know where to find the source files but not how to modify them.
我感谢任何答案。谢谢大家。
I appreciate any answers. Thanks everybody.
推荐答案
您可以在<$中使用名为 custom.css
的文件c $ c>< ipython profile dir> / profile_< profilename> /static/custom/custom.css 将应用于您的笔记本。浏览器缓存可能很激进,您可能需要强制刷新几次。
You can use a file named custom.css
in <ipython profile dir>/profile_<profilename>/static/custom/custom.css
that will be applied to your notebook. Browser caching might be aggressive, you might need to force refresh a few times.
单词着色是通过,支持主题。改变,这将是稍微有点复杂,并且可能需要在一些JavaScript注射< IPython的轮廓DIR> / profile_< PROFILENAME> /static/custom/custom.js
Coloring of words is done through codemirror, which supports theming. Changing this will be slightly more involved and might require some JavaScript injection in <ipython profile dir>/profile_<profilename>/static/custom/custom.js
.
我写了一篇更详细但过时的文章,,可能适用于新版本。
I wrote a more detailed, but outdated, explanation which can probably be adapted to new versions.
这篇关于改变字体和在ipython笔记本中的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!