Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ipython notebook navigate between cells

is there a way in ipython notebook to navigate between cells which are far apart? For example if I have a large notebook and I want to move from a cell near the top of the notebook and then back to one at the bottom. Can I do this? I was thinking there might be a "goto cell 23" command or if not something similar to the mark command in vim. thanks

like image 525
user2560444 Avatar asked Apr 16 '15 10:04

user2560444


2 Answers

You can create internal hyperlinks to navigate between cells. Here's how you can do that:

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.

like image 74
Amit Verma Avatar answered Oct 18 '22 20:10

Amit Verma


There is a table-of-content extension which uses the heading cells to generate a floating toc with hyperlinks. This is quite similar to marks in vim. You can find it here. This extension is also discussed in this question and looks e.g like

enter image description here

like image 24
Jakob Avatar answered Oct 18 '22 19:10

Jakob