[英]How to make new cells in ipython notebook markdown by default?
[英]Changing the font in iPython notebook markdown cells
我只是想將 Ipython (1.0.0) 筆記本 markdown 單元格中的默認字體更改為其他字體,並嘗試使用 markdown 單元格中的樣式標簽來執行此操作,而不是通過創建 custom.ZC7A628CBA22E28EB17B5F5C6AE2A26 的路徑。 我不知道 CSS,我的需求很少。 經過一番研究,我發現了以下代碼片段:
<style>
div.text_cell_render {
font-family: "Times New Roman", serif;
...
}
</style>
我將上述 CSS 代碼應用於 markdown 單元格,但是其他 markdown 文本單元格中的字體沒有改變。 我必須先打開一些東西嗎? 下面是它的樣子:
在Ubuntu上,這有效:
<style>
.text_cell_render {
font-family: Times New Roman, serif;
}
</style>
您示例中的...
表示其他可能的選項,例如http://www.w3schools.com/css/css_text.asp中列出的選項
但是,此CSS適用於所有呈現的單元格文本,即。 降價和標題。 如果只想格式化降價文字,請使用.text_cell_render p {
。 可以使用h1
, h2
等代替p
來處理各個標題。
要在 Jupyter 筆記本中更改 CSS 樣式,只需在頂部使用 styles 創建一個單元格:
%%html
<style>
.rendered_html p {
font-size: 17px;
font-family: Ubuntu Mono;
text-align:justify}
</style>
更多信息在這里
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.