[IPython-dev] First experiences and usability suggestions for notebook and nbconvert
Matthias BUSSONNIER
bussonniermatthias at gmail.com
Wed Jul 17 03:46:19 EDT 2013
Hi David,
Le 16 juil. 2013 à 17:56, David P. Sanders a écrit :
> Hi,
>
> I have been playing with the notebook and nbconvert from master, and have some feedback on some basic usability issues, which I hope will be useful.
It is always insightful to get fresh feedback, thanks a lot for that we really appreciate.
> Note that I am not (yet) a developer, but am rather trying to get a feel for things before possibly moving in that direction...
>
> Please let me know if this is not the correct forum for such comments, and if I should, for example, instead open issues.
>
>
> 1. Ipython command line invocation
> - Would it be possible to get rid of the hyphens in --pylab and --profile in the ipython invocation? I understand that this is to do with implementation, but it is neither easy to remember, nor to motivate to novices that they should type this!
Thomas already answered , --pylab and --profile can be placed anywhere and it is pretty common in unix world
to have long option with a double dash. Of course you can set them permanently in you profile as Jon said, but there
is a particularity of --pylab.
I would suggest not to start IPython in --pylab mode but to use the %pylab magic at top of your notebooks.
First because un-pylabing a kernel is not possible
Second because your readers do not know you started with pylab (with this wa can say that --pylab make the notebook not-reproductible).
>
> - Is there a good (non-historical) reason to use 'nbconvert' instead of just
> ipython convert TARGET FILENAME?
> Or even convertnb, so that the verb and noun are in the natural order.
Not really, but I would say that `convert` itself would be too confusing in discussion.
I think there are already confusion due to the `notebook` term used for the server, the file, the application
the js-client... etc etc. I'd like to avoid this with convert.
> Or make nbconvert just a separate binary (which, I understand, it basically is anyway, at least on unices):
> nbconvert TARGET FILENAME?
I would have prefered that , for various reason it has been decided not to.
you could make a bash alias.
> - Is it possible / easy to set up bash completion to press <TAB> after 'ipython' and have the options displayed?
Debian package does it. we should have an example script somewhere in the source tree.
IIRC it is a 2 step process that parses the output of `ipython --help-all` to get all the option
and gen generate the ipython completion file.
>
> - It would great to be able to type
> ipython notebook odes.ipynb
> and have the relevant ipynb open directly, instead of going via the dashboard
Won't enter into detail, but 1 not possible right now.
2 , does not always make sense as the server can be on another computer.
It is (kind of) doable as a separate project. We will encourage anyone outside
of the core team to write a CLI tool that control the notebook.
> I strongly suggest to replace 'full_html' with just 'html'
> and 'simple_html' could be 'basic_html'
Yes, It will come in time.
>
> - I was expecting that the HTML output would look exactly like on nbviewer, which is also a static copy of the notebook, but it looks different
> I guess this is a CSS thing -- is there a good solution to have something exactly like on nbviewer?
We are polishing nbconvert API, after that I will use it on nbviewer. So the style will converge.
Question of time.
> - Folding:
> In my notebook, the output of several cells were folded, in particular the result of things like
> help(odeint)
> [I am planning on using this for a course, and wanted to record this step in the notebook]
> But in the result of nbconvert, the full output of the documentation is shown.
>
> This is very bad news -- how can the output folding be respected and not shown?
Might need js-extension in the notebook.
With custom templates and js.
Not too hard, just take time to do.
The question of having it in the core is different.
>
> - Suppressing code cells in LaTeX output:
> Towards the reproducible paper goal, how can code cells be suppressed in the LaTeX output. I guess with the metadata somehow?
Pretty trivial 4 line template inheriting.
- inherit the template you wish (1 line)
- 1 blank line
- overwrite {block cell_input}{end block} to be empty
- overwrite {block input_prompt}{end block} to be empty
Use you template.
>
>
> 3. Notebook issues:
> - Keyboard shortcuts:
> I am a keyboard person: for me, all functionality which is accessible via menus should be assigned a (preferably modifiable) keyboard shortcut.
> In particular, it seems that split cell, merge cell, and close and halt are currently missing shortcuts.
We don't have enough available keys, we will have to make it configurable.
>
> - Similarly, could there be toolbar icons for split and merge?
DIY, easy, ping if need help:
http://elacave.lmdb.eu/~carreau/yui/classes/IPython.customjs.html
>
> - Basic find and replace in the notebook:
> Find and replace, at least a basic one, is a must-have feature for refactoring.
> This seems to already be available in CodeMirror.
SHoudl be doable with custom-js , if yo achieve to make an extension that does it, please PR.
> - In-place file editing
> It seems that by combining the %load and %%file magics,
> one has a kludgy way of editing an arbitrary file.
> Maybe this could be combined easily into an %%edit magic?
Difficult with current architecture, will come later.
>
> - Is there a way of deleting multiple input cells simultaneously, rather than pressing Ctrl M-d several times or clicking the scissors icon several times (which admittedly is easier in this case). This would be very nice to have
Not yet, but we will go toward multi-cell selection.
>
>
> 4. Notebook styling:
> - There seems to be much appetite for notebook styling, e.g. xkcdify.
>
> Here is a gist I found, referenced from a blog post that Brian commented on at some point, with a very basic interface. Something like this would be great to have, with a user-contributed style database:
>
> https://gist.github.com/aflaxman/5707238
>
> Maybe this could just be via load_ext?
You might have seen my comment on xkcd issue.
> By the way, is there a list of the possible extensions available?
On the wiki,
also ,
I'm trying to regroup some js-extensions here : http://bit.ly/14Y7jul
(contribution welcomed)
>
> - Will Min's nbtoc extension be integrated?
Not yet.
More information about the IPython-dev
mailing list