[IPython-dev] Renumber cells for nbconvert
Kiko
kikocorreoso at gmail.com
Tue Sep 23 03:49:52 EDT 2014
For the cell renumbering I did this:
http://nbviewer.ipython.org/github/kikocorreoso/brythonmagic/blob/master/notebooks/Brython%20usage%20in%20the%20IPython%20notebook.ipynb#Include-the-cell-number-for-each-cell
I add additional info in the prompt area. It is made using Brython (see
https://github.com/kikocorreoso/brythonmagic for more info) but you could
easily translate that to JS.
Warning: I don't know if I am breaking something of the nb structure or if
what I'm using to get the cell numbers will be available on later versions.
2014-09-19 21:18 GMT+02:00 Cyrille Rossant <cyrille.rossant at gmail.com>:
> FYI here is a simple JS extension that linearly renumber all cells in
> the notebook:
>
>
> http://nbviewer.ipython.org/github/ipython-books/cookbook-code/blob/master/notebooks/chapter03_notebook/03_controls.ipynb
>
> 2014-09-18 23:10 GMT+02:00 Jon Wilson <jsw at fnal.gov>:
> > Hi,
> > We often share around nbconverted notebooks in my research group. But,
> > it is difficult to refer (when in a phone meeting) to specific figures
> > or pieces of code or other output in the notebook. This is because the
> > cells are often executed out of order, so they have non-sequential
> numbers.
> >
> > Now, in some situations, knowing the order of execution is crucial.
> > But usually in this case, the order is unimportant. The non-sequential
> > ordering is due to things like "oh, I made a mistake in the fifth
> > figure, let me try a few things to fix it, now the 4th figure needs to
> > be fixed too," etc.
> >
> > So, if it were possible to re-number the cells, either in the notebook
> > proper or in the nbconvert step, that would make our lives a little bit
> > easier.
> >
> > Alternatively, it would be pretty awesome if figures could have
> > automatic (sequential) figure numbering. Then the cell numbering
> > wouldn't matter nearly as much.
> > Regards,
> > Jon
> > _______________________________________________
> > IPython-dev mailing list
> > IPython-dev at scipy.org
> > http://mail.scipy.org/mailman/listinfo/ipython-dev
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140923/24d0a1f7/attachment.html>
More information about the IPython-dev
mailing list