ipython notebook anchor link to refer a cell directly from outside

后端 未结 3 1219
悲哀的现实
悲哀的现实 2021-02-13 22:12

I am writing documentation for a notebook-based framework. When referring to important cells in a demo-notebook, can I point to a particular cell by using some sort of anchor?

3条回答
  •  醉话见心
    2021-02-13 23:03

    Creating internal links within Markdown works quite well in practice for me. For example, you can make a table of contents by making a list in a markdown cell at the top of the page.

    *[jump to code cell 2](#cell2)
    *[jump to code cell 3](#cell3)
    *[jump to code cell 4](#cell4)
    

    Then you just insert a markdown cell right above the code cell you want to link to (say code cell 2). Just add one line of code:

    
    

    See this tutorial for more explanation: http://nbviewer.ipython.org/github/rasbt/python_reference/blob/master/tutorials/table_of_contents_ipython.ipynb

提交回复
热议问题