How to change font size and markdown cell color in Ipython laptop (py 2.7)

I am trying to write an article on an Ipython laptop, so I want to decorate it a bit. I usually do this with "#" to resize. However, I noticed that # stops working when the indent is greater than 4

###Python Paper ####Python Oaoer 

I also tried: .text_cell_render {font-family: Times New Roman, serif; } However, it shows an invalid syntax error.

Another method I tried is to find ipython in my laptop. It also went south. Can someone come up with a little.

I'm new to Python, please forgive my ignorance and ask for spoon feeding. thanks in advance

+5
source share
1 answer

If you want to change the look of your laptop, refer to this document: iPython Style Sheets

CSS in the cell is not recommended, but maybe like this:

 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> """) 
+13
source

Source: https://habr.com/ru/post/1238333/


All Articles