How to reference a IPython notebook cell in markdown?

后端 未结 2 889
Happy的楠姐
Happy的楠姐 2020-12-12 19:05

How do I reference a cell in a IPython notebook markdown?

I know how to make a reference to an external link. But is there a way to assign an ID to a cell and then r

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-12 19:23

    Yes, there's way to do just that in IPython.

    First, define the destination in the cell you want to link with a html anchor tag and give it an Id. For example:

    
    

    Note - When you run the above cell in markdown, it will become invisible. You can add some text above the anchor to identify the cell.

    Second, create the internal hyperlink to the destination created above using Markdown syntax in another cell and run it:

    [Another Cell](#another_cell)
    

    Now, clicking on link should take you to the destination.

提交回复
热议问题