[IPython-dev] Renumber cells for nbconvert

Thomas Kluyver takowl at gmail.com
Thu Sep 18 17:30:52 EDT 2014


Hi Jon,

The simplest thing would be to use the ExecutePreprocessor available now in
master to run the notebooks in order before converting them. That both puts
the numbers in order and keeps them corresponding to the order of execution.

Thomas

On 18 September 2014 14:10, Jon Wilson <jsw at fnal.gov> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140918/a7dd095c/attachment.html>


More information about the IPython-dev mailing list