[IPython-dev] Renumber cells for nbconvert

Doug Blank doug.blank at gmail.com
Thu Sep 18 18:41:22 EDT 2014


On Thu, Sep 18, 2014 at 5:44 PM, Jon Wilson <jsw at fnal.gov> wrote:

>  Hi Thomas,
> Yes, it does break that, which is unfortunate.
>

Jon, further reflection in the forced renumbering of cells (even when
clearing output) seems like a Really Bad Idea.... it is mucking around with
the reproducibility of the notebook---sorta like photoshopping a model to
make them like they don't. But, what about an automatic *labelling* of
cells? I'm thinking about a tool that could add a markdown cell above each
code cell that could label it, like the attached picture.


> What about automatic figure numbering?
>

Then we can treat code cells like figures, and renumber both, for reference
purposes.

-Doug


>
> Of course, the low-tech solution is to tell everyone that they have to
> make sequentially-numbered section headings or something similar.
> Regards,
> Jon
>
>
> On 09/18/2014 04:41 PM, Thomas Kluyver wrote:
>
>  On 18 September 2014 14:36, Jon Wilson <jsw at fnal.gov> wrote:
>
>> That sounds great, but some of our notebooks can take hours or even days
>> to execute, so I don't think that this is an option.  The notebook that
>> prompted this email, according to the student whose notebook it is, takes
>> 20-30 minutes to run.
>
>
>  I had a feeling you were going to say that. ;-) It should be fairly
> straightforward to build an extension that renumbers cells without running
> them, but I'd rather not promote that, because it breaks the model of cell
> numbers representing execution order.
>
> Thomas
>
>
> _______________________________________________
> IPython-dev mailing listIPython-dev at scipy.orghttp://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/20140918/57fc8971/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2014-09-18 18:35:23.png
Type: image/png
Size: 40496 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140918/57fc8971/attachment.png>


More information about the IPython-dev mailing list