[IPython-dev] Renumber cells for nbconvert

Doug Blank doug.blank at gmail.com
Thu Sep 18 17:55:35 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.
>

I was thinking about adding a "Force cell renumbering" option in our Calico
Document Tools extension for another reason: in class, I sometimes want to
clear the output, but still have the numbers for reference. Unfortunately,
the "clear all output" clears the cell numbers too. This would be trivial
code, but like Thomas mentioned, it destroys the sequence of operation.

Although, I just tested the ability to renumber cells using a different
scheme, such as "A", "B", "C", ... or "I", "II", "III" (or some other
pattern) and that appears to work. Renumbering using a different numbering
scheme could show the order, but also indicate that this isn't operation
order.


> What about automatic figure numbering?
>

Do you have a standard method of referring to figures? We have a
bibliography tool, and so a Figure Renumbering Tool would fit right in with
that.


> Of course, the low-tech solution is to tell everyone that they have to
> make sequentially-numbered section headings or something similar.
>

We have a Heading Numbering Tool in the collection (and ways to move
sections) that you might like. See:

http://calicoproject.org/ICalico#Calico_Notebook_Extensions

-Doug


> 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/cb24a13d/attachment.html>


More information about the IPython-dev mailing list