How to reference a IPython notebook cell in markdown?

Solution 1:

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:

<a id='another_cell'></a>

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.

Solution 2:

If you want to link directly to a specific section of your notebook, it can be useful to use this code: [section title](#section-title). Note that, for the text in the parentheses, you should replace spaces and special characters with a hyphen.

As an example, consider this case in which we want to insert a link to the section 'Univariate + One step ahead':

Section that I want to link

To do so, we just need to add the code [Univariate + One step ahead](#Univariate-+-One-step-ahead):

Code to create the link

This way we avoid the introduction of an anchor tag, since the section title already acts as one.