[英]Different font settings for editing code and markdown cells in the Jupyter Notebook
[英]jupyter notebook justify text in markdown cells
嘿,我想用Jupyter筆記本做論文。 因此,最好將降價單元格中的文本格式化為對齊文本。
我使用以下設置創建了{yourUser}/.jupyter/custom/custom.css
文件:
( 更多示例 )
.text_cell_render { /* Customize text cells */
font-family: "Arial";
font-size: 15pt;
line-height: 145%;
text-align: justify;
word-wrap: break-word;
}
.CodeMirror pre { /* Customize code cells */
font-size: 14pt;
}
我的問題現在是,我的CSS的所有設置都適用於我的筆記本,但text-align: justify;
除外text-align: justify;
這也只是某些部分。
現在,我的測試筆記本顯示了一種奇怪的行為:如果我以這種方式插入普通文本,則沒有對齊文本,但是如果我以某種方式在應用對齊的順序內格式化文本。
我該如何工作? 干杯!
以下似乎有效:
.text_cell_render p { text-align: justify; text-justify: inter-word; }
顯然,筆記本電腦的CSS中有一個.rendered_html p
規則,該規則會覆蓋.text_cell_render
的設置。 附加的“ p”標記使新規則的特定性足以覆蓋默認規則。 看到這個github線程 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.