Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Centering Headings in IPython notebook

I would like to center heading cells in IPython notebook.

I know it is possible to create centered headlines by writing HTML, but then I can't get a reference to the cell when using table of contents (nbtoc ext.)

Is there a way to write HTML headings with reference or heading cells with centered text?

Thanks!

like image 287
idoda Avatar asked Dec 09 '25 22:12

idoda


2 Answers

If you want to center a heading without custom css, you can surround your text with center tags.

For example, if you wanted to make a centered h1 title cell:

# <center>Title</center>
like image 162
J.Makela Avatar answered Dec 12 '25 09:12

J.Makela


Another option is to use:

<h3 align="center">This is a centered header</h3> 

as shown here.

like image 41
ostrokach Avatar answered Dec 12 '25 08:12

ostrokach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!