Reputation: 1127
I am trying to write a paper in Ipython notebook, therefore I want to decorate it a little bit. Usually I do it with the "#" to change the size. However, I noticed that the # stops working when the indent is more than 4
###Python Paper
####Python Oaoer
I also tried: .text_cell_render { font-family: Times New Roman, serif; } However it shows invalid syntax error.
Another method I tried was to locate the ipython in my laptop. That went south too. Could anybody elaborate a little.
I am fairly new to Python, forgive my ignorance and request for spoon-feeding. Thanks in advance
Upvotes: 8
Views: 28626
Reputation: 3549
If you want to change the appearance of your notebook, please refer to this document: iPython style sheets
CSS in a cell is not recommended but is possible like so:
from IPython.core.display import HTML
HTML("""
<style>
div.cell { /* Tunes the space between cells */
margin-top:1em;
margin-bottom:1em;
}
div.text_cell_render h1 { /* Main titles bigger, centered */
font-size: 2.2em;
line-height:1.4em;
text-align:center;
}
div.text_cell_render h2 { /* Parts names nearer from text */
margin-bottom: -0.4em;
}
div.text_cell_render { /* Customize text cells */
font-family: 'Times New Roman';
font-size:1.5em;
line-height:1.4em;
padding-left:3em;
padding-right:3em;
}
</style>
""")
Upvotes: 20