ipython notebook字体设置_更改iPython notebook markdown单元格中的字体

I just wanted to change the default font in Ipython (1.0.0) notebook markdown cells to something else, and tried doing this using style tags in a markdown cell instead of going through the path of creating a custom.css. I do not know CSS, and my needs are very minimal. After some research, I found the following code snippet:

div.text_cell_render {

font-family: "Times New Roman", serif;

...

}

I applied the above CSS code to a markdown cell, however the font in the other markdown text cells did not change. Do I have to turn something on first? Below is how it looks like:

解决方案

On Ubuntu this works:

.text_cell_render {

font-family: Times New Roman, serif;

}

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

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值