[IPython-User] adding extra content to htmlnotebook

Min RK benjaminrk@gmail....
Sat Jan 7 18:54:20 CST 2012


On Jan 7, 2012, at 13:31, Zoltán Vörös <zvoros@gmail.com> wrote:

> Hi Min,
>> Are you just asking for line-numbers? These can already be toggled with ^M-L.  See the QuickHelp info for other shortcuts.
> This I have overlooked. Thanks for the pointer!
>> You can show/hide the output of the current cell with the Output: Toggle button on the left (shortcut ^M-T).  Or you can actively remove the output of all cells with ClearAll, in which case they won't be available again until the code is re-run.
> But what if I want to hide the input of the cell? The scenario that I have in mind is that one could have a long function definition in the notebook, and it is important to see and have access to the code while you are working on it, but it could be hidden, once it is proved to work properly. This definition of a function doesn't even produce an output. If you will, this would be very similar to code folding in many editors, though I don't think that a full-blown code folder is absolutely necessary. Also, the shortcut that you mentioned hides the complete output. In the case of the input, I believe it would be advisable to keep the first line of the cell, so that one would know what the content is.

Ah, I misunderstood what you were aiming for.  It sounds like we should have basic code-folding, like any normal editor, except at the level of cells instead of scopes.  I think it should be possible to hack this into injected JavaScript in a markdown cell (see earlier emails on the list), but I imagine code folding is useful enough that it should be in IPython itself.

-MinRK

> Zoltán


More information about the IPython-User mailing list