ipython notebook navigate between cells - ipython

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

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.

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

Related

Eureka - Custom Inline Row

I am trying to write a custom inline row using Eureka but I couldn't do it by following the documentation in the Github page of the library.
Also I copy-pasted this answer but it throws a segmentation error. I also tried searching for tutorials on the internet to follow but there is none.
Can someone clearly and basically explain how can I do this?
See if this is the place you want to look into
Also, are you using this library just to do a collapsible cell? You can do that by yourself and that is really not hard & a lot of code to implement. Check out this exmaple. All you need is to define child cells and parent cells in a section and reload it with animation!
I know it's a long tutorial. You can probably skip the top half, and start reading from Expanding and Collapsing section. The basic idea is, a collapsible cell and the collapsed cell are within a section, and you have a variable per section of cells to remember if the section is expanded or not. When clicked on the first cell of the section, if it's already expanded, reduce the cell count to one and do a reload to this section using animation Fade. and vice versa. This Fade animation will produce the animation you want.

How to split a Jupyter notebook into several slides?

Jupyter allows to produce slides either via nbconvert or (even better) dynamically and within a notebook with RISE.
However, when I launch RISE on my notebook or create slides with nbconvert, it creates only a single (potentially huge) slide. I thought it would/could automatically split at every header lines, but it does not.
How can I split the notebook into different slides?
You need to bring in a specific tool that is not shown by default. In the notebook, go to
View > Cell Toolbar > Slideshow
and a drop-down menu now appears at the right end of each cell, showing a "slide label" (my terminology).
By default, the label is -, meaning that the cell is part of the same block than the cell above.
If you change the label to slide, the cell is now the first cell of a new slide. (new slide would probably be a better label indeed).
You will find other labels too that closely follow Reveal.js' way of working:
The subslide label correspond also to a new slide, but placed in a "vertical stack" so dear to Reveal.js. fragments are used for progressive display of the elements of a slide. skip cells are not displayed, and notes are for speaker notes.

In a Jupyter notebook, how can I scroll past the last cell?

This is a simple ergonomics question. There's an option in the editor Geany than enables the user to scroll past the last line displayed. This allows the user to, for example, bring the last line of code up to eye-level on a vertically-oriented display.
How can I do something similar in a Jupyter notebook? I don't want my head pointed downward all the time. How can I scroll past the last cell?
I'd expect the result to be someway comparable to using the Chromium extension More Page Space.
I was just looking for the same feature. I'm not sure if there is an official solution, but you can accomplish something similar to what you want by customizing the css. Try adding the following block to ~/.jupyter/custom/custom.css:
.end_space {
height: 75vh;
}

Referencing to a cell in a notebook from ipython notebook

I'm building a tutorial notebook, and I want the first cell to act as a TOC, linking to other cells in the notebook. so you could read the header, click a link and get to the cell of interest. Is this possible?
I searched this questions and came up with nothing, so it must be super trivial... :)
Thanks!
On master (1.0.dev) heading cell have an anchor if you click on it that you can reference. (only header cells) you can also have a look at this

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.