Centering Text in IPython notebook markdown/heading cells?

前端 未结 4 2071
耶瑟儿~
耶瑟儿~ 2021-02-05 01:28

I want to customize my notebook, make it more readable and stylish. So for that, I want to start with centering my headers. Is it possible?

4条回答
  •  借酒劲吻你
    2021-02-05 01:44

    Knowing that in jupyter (ipython) notebook markdown cells the title level is identified by the number of # (# for top level headings or h1, ## for h2, ....), I use the following combination of HTML and markdown:

    #

    Your centered level h1 title

    ##

    Your centered level h2 title

    etc..

    It's straightforward and the easiest to remember but please do comment if there's any disadvantage in doing so.

    Tested in jupyter version 4.4.0 (not sure about other version but no reason it doesn't work).

提交回复
热议问题