![](/img/trans.png)
[英]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.