且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改iPython notebook markdown单元格中的字体

更新时间:2023-09-29 23:20:04

在Ubuntu上可以使用:

On Ubuntu this works:

<style>
.text_cell_render {
font-family: Times New Roman, serif;
}
</style>

您的示例中的 ... 其他可能的选项,如列出例如 http://www.w3schools.com/css/css_text.asp

The ... in your example indicate other possible options like listed e.g. in http://www.w3schools.com/css/css_text.asp

但是,这个CSS适用于所有渲染的单元格文本,即。降价和标题。如果你想格式化只是markdown文本使用 .text_cell_render p {。单个标题可以用 h1 h2 ,etc代替 p

However, this CSS applies to all rendered cell text, ie. markdown and heading. If you want to format just the markdown text use .text_cell_render p {. The individual headings can be addressed with h1, h2, etc instead of p.